mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 17:01:02 +00:00
2.1 KiB
2.1 KiB
ACP Notes (From Docs)
Core protocol model
ACP is JSON-RPC 2.0 with bidirectional methods plus notifications.
Client to agent baseline methods:
initializeauthenticate(optional if agent requires auth)session/newsession/prompt- optional:
session/load,session/set_mode,session/set_config_option - notification:
session/cancel
Agent to client baseline method:
session/request_permission
Agent to client optional methods:
fs/read_text_file,fs/write_text_fileterminal/create,terminal/output,terminal/wait_for_exit,terminal/kill,terminal/release
Agent to client baseline notification:
session/update
Required protocol behavior
- Paths must be absolute.
- Line numbers are 1-based.
- Initialization must negotiate protocol version.
- Capabilities omitted by peer must be treated as unsupported.
Transport state
- ACP formally defines stdio transport today.
- ACP docs mention streamable HTTP as draft/in progress.
- Custom transports are allowed if JSON-RPC lifecycle semantics are preserved.
Session lifecycle
session/newcreates session, returnssessionId.session/loadis optional and gated byloadSessioncapability.session/promptruns one turn and returnsstopReason.- Streaming progress is entirely via
session/updatenotifications. - Cancellation is
session/cancelnotification and must end withstopReason=cancelled.
Tool and HITL model
- Tool calls are modeled through
session/update(tool_call,tool_call_update). - HITL permission flow is a request/response RPC call (
session/request_permission).
ACP agent process relevance for this repo
From ACP docs agent list:
- Claude: ACP via agent process (
zed-industries/claude-code-acp). - Codex: ACP via agent process (
zed-industries/codex-acp). - OpenCode: ACP agent listed natively.
Gap to confirm for launch scope:
- Amp is not currently listed in ACP docs as a native ACP agent or published agent process.
- We need an explicit product decision: block Amp in v1 launch or provide/build an ACP agent process.