mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-27 04:30:59 +00:00
Updates `@agentclientprotocol/sdk` to 1.9.0 (schema v1.26.0, v2.0.0-alpha.9) and adapts the agent to the v2 spec clarifications in that release. ## Changes **Client-provided system prompt (unstable)** - Advertises `sessionCapabilities.systemPrompt` with `mode.override` on v1 and `session.systemPrompt` on v2. - Accepted on `session/new`, `load`, `resume`, and `fork`: - `append` adds the text after the Claude Code preset. - `override` replaces the preset with the text. Tools, MCP servers, permissions, and settings (including CLAUDE.md through `settingSources`) are unchanged. - An unsupported mode or non-text content fails with `invalid_params` before any session is created, reused, or forked. - Takes precedence over the `_meta.systemPrompt` extension. AIR custom instructions still follow the client text. - A different prompt on resume recreates a live session. Claude Code reuses its saved system prompt until the next compaction, which the RFD allows. **v2 session/resume state snapshot** - Sends the current foreground state (`idle`, `running`, or `requires_action`) after any replay and before the response, as the clarified spec requires. This applies even without a replay. **v2 replay of subagents** - No longer replays a child's past `running`/`idle` as current activity. Each replayed child gets one `state_update` with its last state after the replay. **v2 tool call `_meta` patches** - Reports carry only the top-level keys that changed. `claudeCode` is still sent whole, since clients don't merge nested objects. - A removed key is sent as `null`. - A tool call id that starts again removes the old keys. - A replayed tool call this connection has not reported sends `_meta: null` first, then the current keys. **Cancellation and close** - A `session/close` whose turns don't end within the teardown timeout settles them as cancelled. The client gets `idle` with `cancelled`, or `-32800` for a prompt never inserted, before the close response. - A prompt racing `session/close` ends as cancelled (`-32800` on v2) instead of `-32603`. On v1 it now returns `stopReason: cancelled`, matching a prompt queued just before the close. - A stream error after a cancel ends the work as `cancelled` instead of `error`. ## Not in this PR - After a URL-mode MCP elicitation is accepted, the session reports `running` right away. The spec asks for `requires_action` until the external interaction finishes, but a server may never send `elicitation_complete`, so this needs its own design. - `requires_action` is reported while one foreground subagent waits, even if other foreground work can continue. This is SHOULD-level in the spec. ## Testing - `npm run build`, `npm run check`, and `npm run test:run` pass. - Golden files changed because of the new capability and the resume snapshot. `compare.ts` allows the new capability against origin/main. - `session index cost > reads only the changed transcript for a subscription` failed intermittently locally (about 3 in 15 runs) on a loaded machine. This PR doesn't touch the session index, but watch it in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
2.4 KiB
JSON
91 lines
2.4 KiB
JSON
{
|
|
"name": "@agentclientprotocol/claude-agent-acp",
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"version": "0.91.0",
|
|
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
|
|
"main": "dist/lib.js",
|
|
"types": "dist/lib.d.ts",
|
|
"bin": {
|
|
"claude-agent-acp": "dist/index.js"
|
|
},
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/lib.d.ts",
|
|
"import": "./dist/lib.js"
|
|
},
|
|
"./*": "./*"
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"!dist/tests/",
|
|
"README.md",
|
|
"LICENSE",
|
|
"package.json"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"dev": "npm run build && npm run start",
|
|
"example:simple-client": "node --experimental-strip-types --disable-warning=ExperimentalWarning examples/simple-client.ts",
|
|
"lint": "eslint src --ext .ts",
|
|
"lint:fix": "eslint src --ext .ts --fix",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"check": "npm run lint && npm run format:check",
|
|
"release:preflight": "bash scripts/release-preflight.sh",
|
|
"test": "vitest",
|
|
"test:integration": "RUN_INTEGRATION_TESTS=true vitest run",
|
|
"test:run": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"claude",
|
|
"acp",
|
|
"agent",
|
|
"anthropic",
|
|
"typescript",
|
|
"sdk",
|
|
"code"
|
|
],
|
|
"homepage": "https://github.com/agentclientprotocol/claude-agent-acp#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/agentclientprotocol/claude-agent-acp/issues"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/agentclientprotocol/claude-agent-acp.git"
|
|
},
|
|
"author": "Zed Industries",
|
|
"license": "Apache-2.0",
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"dependencies": {
|
|
"@agentclientprotocol/sdk": "1.9.0",
|
|
"@anthropic-ai/claude-agent-sdk": "0.3.300",
|
|
"diff": "9.0.0",
|
|
"zod": "4.6.7"
|
|
},
|
|
"devDependencies": {
|
|
"@anthropic-ai/sdk": "0.134.0",
|
|
"@eslint/js": "10.0.1",
|
|
"@tsconfig/node22": "22.0.6",
|
|
"@types/node": "26.6.5",
|
|
"@typescript-eslint/eslint-plugin": "8.71.2",
|
|
"@typescript-eslint/parser": "8.71.2",
|
|
"ajv": "8.20.0",
|
|
"ajv-formats": "3.0.1",
|
|
"eslint": "10.12.0",
|
|
"eslint-config-prettier": "10.1.8",
|
|
"globals": "17.13.0",
|
|
"prettier": "3.9.10",
|
|
"ts-node": "10.9.2",
|
|
"typescript": "6.0.3",
|
|
"vitest": "5.0.4"
|
|
}
|
|
}
|