Repository navigation
Conversation
Wire the Agent Client Protocol v1 JSON-RPC stdio transport as a new headless mode so external clients can drive the existing session runtime. It maps session/new, session/load, session/prompt, and session/cancel onto the runtime host, streams agent events as session/update notifications, and bridges permission requests back to the client. RPC remains unchanged; ACP only adds the protocol entry and its mode-specific trust/extension bindings. Resolves stepfun-ai#224
CI caught two plan-mode assertions still expecting the old RPC-only copy after ACP generalized the approval path. Update the expected result text and warning substring; no behavior change. Refs stepfun-ai#224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #224
What this adds
A native
--mode acpheadless mode that speaks Agent Client Protocol v1 over stdio.initialize,session/new,session/load,session/prompt, andsession/cancelare mapped onto the existingAgentSessionRuntimeHost; no new session engine is introduced.session/updatenotifications, including assistant text, thinking, tool calls, tool results, plans, and available commands.session/request_permission;input(), editor, and custom component dialogs are explicitly unsupported in ACP.Files
packages/coding-agent/src/modes/acp/acp-types.ts,acp-wire.ts,acp-mode.tsapps/cli/src/modes/acp.tsapps/cli/src/main.ts,packages/coding-agent/src/main.ts,packages/coding-agent/src/cli/args.ts,packages/coding-agent/docs/acp.md, README/usage/security/settings/quickstart/extensions docsVerification
pnpm run checkpasses: Biome, pinned deps, TS import/layer/ui/workspace/entry/contracts/boundary checks,tsgo --noEmit, and browser smoke.vitest --run test/acp-wire.test.ts test/acp-mode.test.ts test/args.test.ts(168 tests). The ACP mode test drivesinitialize, a streaming prompt turn, a permission request/response, and cancellation without blocking stdin.Notes
This PR is intentionally scoped to the stdio protocol entry and mode bindings. MCP capabilities are advertised as unsupported for now; HTTP/SSE MCP can be layered on after the core transport is accepted.