mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 08:03:46 +00:00
- Add hidden `mock-agent-process` CLI subcommand implementing a stdio JSON-RPC echo agent (ported from examples/mock-acp-agent) - Update write_mock_agent_process_launcher() to exec the new subcommand instead of exiting with error - Update sdks/react to support React 18 and 19 peer dependencies - Update @types/react to v19 across workspace (pnpm override + inspector) - Fix RefObject<T | null> compatibility for React 19 useRef() signatures - Add version reference replacement logic to release update_version.ts covering all docs, examples, and code files listed in CLAUDE.md - Add missing files to CLAUDE.md Install Version References list (architecture.mdx, boxlite, modal, computesdk docs and examples) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7.1 KiB
7.1 KiB
Instructions
Naming and Ownership
- This repository/product is Sandbox Agent.
- Gigacode is a separate user-facing UI/client, not the server product name.
- Gigacode integrates with Sandbox Agent via the OpenCode-compatible surface (
/opencode/*) when that compatibility layer is enabled. - Canonical extension namespace/domain string is
sandboxagent.dev(no hyphen). - Canonical custom ACP extension method prefix is
_sandboxagent/...(no hyphen).
Docs Terminology
- Never mention "ACP" in user-facing docs (
docs/**/*.mdx) except in docs that are specifically about ACP itself (e.g.docs/acp-http-client.mdx). - Never expose underlying protocol method names (e.g.
session/request_permission,session/create,_sandboxagent/session/detach) in non-ACP docs. Describe the behavior in user-facing terms instead. - Do not describe the underlying protocol implementation in docs. Only document the SDK surface (methods, types, options). ACP protocol details belong exclusively in ACP-specific pages.
- Do not use em dashes (
—) in docs. Use commas, periods, or parentheses instead.
Docs Source Of Truth (HTTP/CLI)
- For HTTP/CLI docs/examples, source of truth is:
server/packages/sandbox-agent/src/router.rsserver/packages/sandbox-agent/src/cli.rs
- Keep docs aligned to implemented endpoints/commands only (for example ACP under
/v1/acp, not legacy/v1/sessionsAPIs).
E2E Agent Testing
- When asked to test agents e2e and you do not have the API tokens/credentials required, always stop and ask the user where to find the tokens before proceeding.
ACP Adapter Audit
scripts/audit-acp-deps/adapters.jsonis the single source of truth for ACP adapter npm packages, pinned versions, and the@agentclientprotocol/sdkpin.- The Rust fallback install path in
server/packages/agent-management/src/agents.rsreads adapter entries fromadapters.jsonat compile time viainclude_str!. - Run
cd scripts/audit-acp-deps && npx tsx audit.tsto compare our pinned versions against the ACP registry and npm latest. - When bumping an adapter version, update
adapters.jsononly — the Rust code picks it up automatically. - When adding a new agent, add an entry to
adapters.json(the_fallback arm ininstall_agent_process_fallbackhandles it). - When updating the
@agentclientprotocol/sdkpin, update bothadapters.json(sdkDeps) andsdks/acp-http-client/package.json.
Change Tracking
- If the user asks to "push" changes, treat that as permission to commit and push all current workspace changes, not a hand-picked subset, unless the user explicitly scopes the push.
- Keep CLI subcommands and HTTP endpoints in sync.
- Update
docs/cli.mdxwhen CLI behavior changes. - Regenerate
docs/openapi.jsonwhen HTTP contracts change. - Keep
docs/inspector.mdxanddocs/sdks/typescript.mdxaligned with implementation. - Append blockers/decisions to
research/acp/friction.mdduring ACP work. - Each agent has its own doc page at
docs/agents/<name>.mdxlisting models, modes, and thought levels. Update the relevant page when changingfallback_config_options. To regenerate capability data, runcd scripts/agent-configs && npx tsx dump.ts. Source data:scripts/agent-configs/resources/*.jsonand hardcoded entries inserver/packages/sandbox-agent/src/router/support.rs(fallback_config_options). - Some agent models are gated by subscription (e.g. Claude
opus). The live report only shows models available to the current credentials. The static doc and JSON resource files should list all known models regardless of subscription tier.
Adding Providers
When adding a new sandbox provider, update all of the following:
sdks/typescript/src/providers/<name>.ts— provider implementationsdks/typescript/package.json— add./<name>export, peerDependencies, peerDependenciesMeta, devDependenciessdks/typescript/tsup.config.ts— add entry point and externalsdks/typescript/tests/providers.test.ts— add test entryexamples/<name>/— create example withsrc/index.tsandtests/<name>.test.tsdocs/deploy/<name>.mdx— create deploy guidedocs/docs.json— add to Deploy pages navigationdocs/quickstart.mdx— add tab in "Start the sandbox" step, add credentials entry in "Passing LLM credentials" accordion
Adding Agents
When adding a new agent, update all of the following:
docs/agents/<name>.mdx— create agent page with usage snippet and capabilities tabledocs/docs.json— add to the Agents group under Agentdocs/quickstart.mdx— add tab in the "Create a session and send a prompt" CodeGroup
Persist Packages (Deprecated)
- The
@sandbox-agent/persist-*npm packages (persist-sqlite,persist-postgres,persist-indexeddb,persist-rivet) are deprecated stubs. They still publish to npm but throw a deprecation error at import time. - Driver implementations now live inline in examples and consuming packages:
- SQLite:
examples/persist-sqlite/src/persist.ts - Postgres:
examples/persist-postgres/src/persist.ts - IndexedDB:
frontend/packages/inspector/src/persist-indexeddb.ts - Rivet: inlined in
docs/multiplayer.mdx - In-memory: built into the main
sandbox-agentSDK (InMemorySessionPersistDriver)
- SQLite:
- Docs (
docs/session-persistence.mdx) link to the example implementations on GitHub instead of referencing the packages. - Do not re-add
@sandbox-agent/persist-*as dependencies anywhere. New persist drivers should be copied into the consuming project directly.
Install Version References
- Channel policy:
- Sandbox Agent install/version references use a pinned minor channel
0.N.x(for curl URLs andsandbox-agent/@sandbox-agent/clinpm/bun installs). - Gigacode install/version references use
latest(for@sandbox-agent/gigacodeinstall/run commands andgigacode-install.*release promotion). - Release promotion policy:
latestreleases must still updatelatest; when a release islatest, Sandbox Agent must also be promoted to the matching minor channel0.N.x.
- Sandbox Agent install/version references use a pinned minor channel
- Keep every install-version reference below in sync whenever versions/channels change:
README.mddocs/acp-http-client.mdxdocs/cli.mdxdocs/quickstart.mdxdocs/sdk-overview.mdxdocs/react-components.mdxdocs/session-persistence.mdxdocs/architecture.mdxdocs/deploy/local.mdxdocs/deploy/cloudflare.mdxdocs/deploy/vercel.mdxdocs/deploy/daytona.mdxdocs/deploy/e2b.mdxdocs/deploy/docker.mdxdocs/deploy/boxlite.mdxdocs/deploy/modal.mdxdocs/deploy/computesdk.mdxfrontend/packages/website/src/components/GetStarted.tsx.claude/commands/post-release-testing.mdexamples/cloudflare/Dockerfileexamples/boxlite/Dockerfileexamples/boxlite-python/Dockerfileexamples/daytona/src/index.tsexamples/shared/src/docker.tsexamples/docker/src/index.tsexamples/e2b/src/index.tsexamples/vercel/src/index.tssdks/typescript/src/providers/shared.tsscripts/release/main.tsscripts/release/promote-artifacts.tsscripts/release/sdk.tsscripts/sandbox-testing/test-sandbox.ts