@agentproto/adapter-claude-code 0.1.0-alpha.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -39,7 +39,13 @@ var claudeCode = defineAgentCli({
39
39
  },
40
40
  models: {
41
41
  default: "claude-sonnet-4-6",
42
- allowed: ["claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5"],
42
+ allowed: [
43
+ "claude-sonnet-4-6",
44
+ "claude-opus-4-8",
45
+ "claude-opus-4-7",
46
+ "claude-opus-4-6",
47
+ "claude-haiku-4-5"
48
+ ],
43
49
  env: { anthropic: "ANTHROPIC_API_KEY" }
44
50
  },
45
51
  capabilities: {
@@ -60,7 +66,14 @@ var claudeCode = defineAgentCli({
60
66
  // existing session across cold starts (api restart, sandbox reap,
61
67
  // multi-machine).
62
68
  resumable: true,
63
- bidirectional: true
69
+ bidirectional: true,
70
+ // Claude Code's Read tool can ingest any absolute path the host
71
+ // surfaces via the prompt. Pair with the daemon's POST /files/upload
72
+ // route + a host UI drag-drop handler: drop a file → daemon writes
73
+ // to `cwd/.agentproto-attachments/<name>` → host pastes the path
74
+ // into the terminal → Claude reads it natively. No protocol-level
75
+ // multimodal round-trip needed; pure file-path injection.
76
+ file_attach: true
64
77
  },
65
78
  modes: [
66
79
  { id: "default", description: "Standard interactive mode." },
@@ -83,10 +96,26 @@ var claudeCode = defineAgentCli({
83
96
  options: [
84
97
  {
85
98
  id: "model",
99
+ // string (not enum) so any valid Anthropic model ID is accepted
100
+ // without requiring a code change to expand the list. Applied via
101
+ // ACP session/set_config_option(configId:"model") after newSession
102
+ // — the claude-agent-acp wrapper does not forward its own CLI args
103
+ // to the underlying claude process, so bin_args_template alone
104
+ // cannot select the model.
105
+ type: "string",
106
+ description: "Anthropic model ID (e.g. 'claude-opus-4-8', 'claude-sonnet-4-6'). Applied via ACP session/set_config_option after the session is created. Omit to use the claude-code default."
107
+ },
108
+ {
109
+ id: "effort",
86
110
  type: "enum",
87
- enum: ["claude-sonnet-4-6", "claude-opus-4-7", "claude-haiku-4-5"],
88
- description: "Override the default model for this operator binding.",
89
- bin_args_template: ["--model", "{value}"]
111
+ // Effort is model-dependent: the same label maps to different
112
+ // underlying compute budgets across models, and the model's own
113
+ // default differs (Sonnet 4.6 / Opus 4.8 default to "high";
114
+ // Opus 4.7 defaults to "xhigh"). "max" and "ultracode" are
115
+ // session-only — not valid in persisted settings. Omit to keep
116
+ // the model's own default rather than hardcoding one here.
117
+ enum: ["low", "medium", "high", "xhigh", "max", "ultracode"],
118
+ description: "Reasoning effort level. Model-dependent: the same label \u2260 the same compute budget across models, and defaults differ by model (e.g. Sonnet 4.6 / Opus 4.8 default to 'high'; Opus 4.7 to 'xhigh'). 'max' and 'ultracode' are session-only. Omit to keep the model's own default."
90
119
  },
91
120
  {
92
121
  id: "max_turns",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAYO,IAAM,aAA6B,cAAA,CAAe;AAAA,EACvD,IAAA,EAAM,aAAA;AAAA,EACN,EAAA,EAAI,aAAA;AAAA,EACJ,WAAA,EACE,uLAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAAA,EACT,GAAA,EAAK,KAAA;AAAA,EACL,QAAA,EAAU,CAAC,IAAA,EAAM,uCAAuC,CAAA;AAAA,EACxD,OAAA,EAAS;AAAA,IACP;AAAA,MACE,MAAA,EAAQ,KAAA;AAAA,MACR,OAAA,EAAS,uCAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,aAAA,EAAe;AAAA,IACb,GAAA,EAAK,wDAAA;AAAA,IACL,KAAA,EAAO,sBAAA;AAAA,IACP,KAAA,EAAO,UAAA;AAAA,IACP,UAAA,EAAY;AAAA,GACd;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,GAAA,EAAK,cAAA;AAAA,IACL,KAAA,EAAO,EAAE,GAAA,EAAK,CAA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AAAA,EACA,OAAA,EAAS;AAAA,IACP;AAAA,MACE,EAAA,EAAI,OAAA;AAAA,MACJ,IAAA,EAAM,MAAA;AAAA,MACN,IAAA,EAAM,CAAC,mBAAA,EAAqB,iBAAA,EAAmB,kBAAkB,CAAA;AAAA,MACjE,WAAA,EAAa,uDAAA;AAAA,MACb,iBAAA,EAAmB,CAAC,SAAA,EAAW,SAAS;AAAA,KAC1C;AAAA,IACA;AAAA,MACE,EAAA,EAAI,WAAA;AAAA,MACJ,IAAA,EAAM,SAAA;AAAA,MACN,GAAA,EAAK,CAAA;AAAA,MACL,GAAA,EAAK,GAAA;AAAA,MACL,WAAA,EACE,4FAAA;AAAA,MACF,iBAAA,EAAmB,CAAC,aAAA,EAAe,SAAS;AAAA;AAC9C,GACF;AAAA,EACA,YAAA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWZ,OAAA,EAAS,eAAA;AAAA,IACT,SAAA,EAAW,CAAC,eAAA,EAAiB,gBAAA,EAAkB,cAAc,MAAM,CAAA;AAAA,IACnE,cAAA,EAAgB;AAAA,MACd,eAAA,EAAiB,IAAA;AAAA,MACjB,SAAA,EAAW,CAAC,cAAA,EAAgB,UAAU;AAAA;AACxC,GACF;AAAA,EACA,MAAM,CAAC,aAAA,EAAe,WAAA,EAAa,KAAA,EAAO,iBAAiB,QAAQ;AACrE,CAAC;AAEM,SAAS,iBAAA,GAAqC;AACnD,EAAA,OAAO,sBAAsB,UAAU,CAAA;AACzC","file":"index.mjs","sourcesContent":["/**\n * @agentproto/adapter-claude-code — AIP-45 adapter for Anthropic's\n * Claude Code via the @agentclientprotocol/claude-agent-acp wrapper.\n */\n\nimport {\n createAgentCliRuntime,\n defineAgentCli,\n type AgentCliHandle,\n type AgentCliRuntime,\n} from \"@agentproto/driver-agent-cli\"\n\nexport const claudeCode: AgentCliHandle = defineAgentCli({\n name: \"claude-code\",\n id: \"claude-code\",\n description:\n \"Anthropic's Claude Code wrapped as an ACP agent via @agentclientprotocol/claude-agent-acp. Spawned via `npx -y @agentclientprotocol/claude-agent-acp` and driven over stdio JSON-RPC.\",\n version: \"0.1.0\",\n bin: \"npx\",\n bin_args: [\"-y\", \"@agentclientprotocol/claude-agent-acp\"],\n install: [\n {\n method: \"npm\",\n package: \"@agentclientprotocol/claude-agent-acp\",\n global: true,\n },\n ],\n version_check: {\n cmd: \"npm view @agentclientprotocol/claude-agent-acp version\",\n parse: \"(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\",\n range: \">=0.30.0\",\n timeout_ms: 15_000,\n },\n auth: {\n ref: \"./SECRETS.md\",\n state: { env: [\"ANTHROPIC_API_KEY\"] },\n },\n sandbox: \"./SANDBOX.md\",\n protocol: \"acp\",\n acp: \"./claude-code-acp.ACP.md\",\n session: {\n mode: \"persistent\",\n idle_timeout_ms: 1_800_000,\n context_carryover: true,\n },\n models: {\n default: \"claude-sonnet-4-6\",\n allowed: [\"claude-sonnet-4-6\", \"claude-opus-4-7\", \"claude-haiku-4-5\"],\n env: { anthropic: \"ANTHROPIC_API_KEY\" },\n },\n capabilities: {\n streaming: true,\n tool_calls: true,\n sub_agents: false,\n file_io: true,\n // ACP wrapper forwards `image` content blocks in user prompts\n // straight to Anthropic Messages API. Hosts SHOULD send images\n // inline (see CLAUDE-CODE.md) instead of passing paths and\n // hoping the model uses Read.\n multimodal: true,\n // The wrapper (@agentclientprotocol/claude-agent-acp >= 0.30)\n // advertises `loadSession: true` and exposes the full session\n // lifecycle (newSession / loadSession / resumeSession / forkSession)\n // over JSON-RPC. Pairs with `continuation.default: native-resume`\n // below — the host persists the sessionId and reattaches to the\n // existing session across cold starts (api restart, sandbox reap,\n // multi-machine).\n resumable: true,\n bidirectional: true,\n },\n modes: [\n { id: \"default\", description: \"Standard interactive mode.\" },\n {\n id: \"plan\",\n description:\n \"Plan-only mode — Claude Code reasons and proposes but does not edit or run commands.\",\n bin_args_append: [\"--permission-mode\", \"plan\"],\n },\n {\n id: \"accept-edits\",\n description: \"Auto-accept file edits; commands still prompt.\",\n bin_args_append: [\"--permission-mode\", \"acceptEdits\"],\n },\n {\n id: \"bypass-permissions\",\n description:\n \"Skip all permission prompts. Use only in trusted automation contexts.\",\n bin_args_append: [\"--permission-mode\", \"bypassPermissions\"],\n },\n ],\n options: [\n {\n id: \"model\",\n type: \"enum\",\n enum: [\"claude-sonnet-4-6\", \"claude-opus-4-7\", \"claude-haiku-4-5\"],\n description: \"Override the default model for this operator binding.\",\n bin_args_template: [\"--model\", \"{value}\"],\n },\n {\n id: \"max_turns\",\n type: \"integer\",\n min: 1,\n max: 200,\n description:\n \"Hard cap on tool-use turns within a single send. Claude Code stops after this many cycles.\",\n bin_args_template: [\"--max-turns\", \"{value}\"],\n },\n ],\n continuation: {\n // native-resume: each turn cold-spawns claude, then ACP `loadSession`\n // reattaches to the saved sessionId. Survives api restarts, sandbox\n // reaps, multi-machine — claude reads its own JSONL session store.\n // Requires the host to register `configureNativeResume({load, save})`\n // hooks; without them the strategy degrades to per-spawn behaviour\n // (no continuity).\n //\n // pinned-session is still supported as a fallback for hosts that\n // haven't wired the resume hooks yet — same warm-process semantics\n // as pre-AIP-45-extension behaviour.\n default: \"native-resume\",\n supported: [\"native-resume\", \"pinned-session\", \"transcript\", \"none\"],\n pinned_session: {\n idle_timeout_ms: 1_800_000,\n key_scope: [\"conversation\", \"operator\"],\n },\n },\n tags: [\"claude-code\", \"anthropic\", \"acp\", \"agent-runtime\", \"coding\"],\n})\n\nexport function claudeCodeRuntime(): AgentCliRuntime {\n return createAgentCliRuntime(claudeCode)\n}\n\nexport type { AgentCliHandle, AgentCliRuntime }\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;AAYO,IAAM,aAA6B,cAAA,CAAe;AAAA,EACvD,IAAA,EAAM,aAAA;AAAA,EACN,EAAA,EAAI,aAAA;AAAA,EACJ,WAAA,EACE,uLAAA;AAAA,EACF,OAAA,EAAS,OAAA;AAA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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWZ,OAAA,EAAS,eAAA;AAAA,IACT,SAAA,EAAW,CAAC,eAAA,EAAiB,gBAAA,EAAkB,cAAc,MAAM,CAAA;AAAA,IACnE,cAAA,EAAgB;AAAA,MACd,eAAA,EAAiB,IAAA;AAAA,MACjB,SAAA,EAAW,CAAC,cAAA,EAAgB,UAAU;AAAA;AACxC,GACF;AAAA,EACA,MAAM,CAAC,aAAA,EAAe,WAAA,EAAa,KAAA,EAAO,iBAAiB,QAAQ;AACrE,CAAC;AAEM,SAAS,iBAAA,GAAqC;AACnD,EAAA,OAAO,sBAAsB,UAAU,CAAA;AACzC","file":"index.mjs","sourcesContent":["/**\n * @agentproto/adapter-claude-code — AIP-45 adapter for Anthropic's\n * Claude Code via the @agentclientprotocol/claude-agent-acp wrapper.\n */\n\nimport {\n createAgentCliRuntime,\n defineAgentCli,\n type AgentCliHandle,\n type AgentCliRuntime,\n} from \"@agentproto/driver-agent-cli\"\n\nexport const claudeCode: AgentCliHandle = defineAgentCli({\n name: \"claude-code\",\n id: \"claude-code\",\n description:\n \"Anthropic's Claude Code wrapped as an ACP agent via @agentclientprotocol/claude-agent-acp. Spawned via `npx -y @agentclientprotocol/claude-agent-acp` and driven over stdio JSON-RPC.\",\n version: \"0.1.0\",\n bin: \"npx\",\n bin_args: [\"-y\", \"@agentclientprotocol/claude-agent-acp\"],\n install: [\n {\n method: \"npm\",\n package: \"@agentclientprotocol/claude-agent-acp\",\n global: true,\n },\n ],\n version_check: {\n cmd: \"npm view @agentclientprotocol/claude-agent-acp version\",\n parse: \"(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\",\n range: \">=0.30.0\",\n timeout_ms: 15_000,\n },\n auth: {\n ref: \"./SECRETS.md\",\n state: { env: [\"ANTHROPIC_API_KEY\"] },\n },\n sandbox: \"./SANDBOX.md\",\n protocol: \"acp\",\n acp: \"./claude-code-acp.ACP.md\",\n session: {\n mode: \"persistent\",\n idle_timeout_ms: 1_800_000,\n context_carryover: true,\n },\n models: {\n default: \"claude-sonnet-4-6\",\n allowed: [\n \"claude-sonnet-4-6\",\n \"claude-opus-4-8\",\n \"claude-opus-4-7\",\n \"claude-opus-4-6\",\n \"claude-haiku-4-5\",\n ],\n env: { anthropic: \"ANTHROPIC_API_KEY\" },\n },\n capabilities: {\n streaming: true,\n tool_calls: true,\n sub_agents: false,\n file_io: true,\n // ACP wrapper forwards `image` content blocks in user prompts\n // straight to Anthropic Messages API. Hosts SHOULD send images\n // inline (see CLAUDE-CODE.md) instead of passing paths and\n // hoping the model uses Read.\n multimodal: true,\n // The wrapper (@agentclientprotocol/claude-agent-acp >= 0.30)\n // advertises `loadSession: true` and exposes the full session\n // lifecycle (newSession / loadSession / resumeSession / forkSession)\n // over JSON-RPC. Pairs with `continuation.default: native-resume`\n // below — the host persists the sessionId and reattaches to the\n // existing session across cold starts (api restart, sandbox reap,\n // multi-machine).\n resumable: true,\n bidirectional: true,\n // Claude Code's Read tool can ingest any absolute path the host\n // surfaces via the prompt. Pair with the daemon's POST /files/upload\n // route + a host UI drag-drop handler: drop a file → daemon writes\n // to `cwd/.agentproto-attachments/<name>` → host pastes the path\n // into the terminal → Claude reads it natively. No protocol-level\n // multimodal round-trip needed; pure file-path injection.\n file_attach: true,\n },\n modes: [\n { id: \"default\", description: \"Standard interactive mode.\" },\n {\n id: \"plan\",\n description:\n \"Plan-only mode — Claude Code reasons and proposes but does not edit or run commands.\",\n bin_args_append: [\"--permission-mode\", \"plan\"],\n },\n {\n id: \"accept-edits\",\n description: \"Auto-accept file edits; commands still prompt.\",\n bin_args_append: [\"--permission-mode\", \"acceptEdits\"],\n },\n {\n id: \"bypass-permissions\",\n description:\n \"Skip all permission prompts. Use only in trusted automation contexts.\",\n bin_args_append: [\"--permission-mode\", \"bypassPermissions\"],\n },\n ],\n options: [\n {\n id: \"model\",\n // string (not enum) so any valid Anthropic model ID is accepted\n // without requiring a code change to expand the list. Applied via\n // ACP session/set_config_option(configId:\"model\") after newSession\n // — the claude-agent-acp wrapper does not forward its own CLI args\n // to the underlying claude process, so bin_args_template alone\n // cannot select the model.\n type: \"string\" as const,\n description:\n \"Anthropic model ID (e.g. 'claude-opus-4-8', 'claude-sonnet-4-6'). \" +\n \"Applied via ACP session/set_config_option after the session is created. \" +\n \"Omit to use the claude-code default.\",\n },\n {\n id: \"effort\",\n type: \"enum\" as const,\n // Effort is model-dependent: the same label maps to different\n // underlying compute budgets across models, and the model's own\n // default differs (Sonnet 4.6 / Opus 4.8 default to \"high\";\n // Opus 4.7 defaults to \"xhigh\"). \"max\" and \"ultracode\" are\n // session-only — not valid in persisted settings. Omit to keep\n // the model's own default rather than hardcoding one here.\n enum: [\"low\", \"medium\", \"high\", \"xhigh\", \"max\", \"ultracode\"],\n description:\n \"Reasoning effort level. Model-dependent: the same label ≠ the same \" +\n \"compute budget across models, and defaults differ by model \" +\n \"(e.g. Sonnet 4.6 / Opus 4.8 default to 'high'; Opus 4.7 to 'xhigh'). \" +\n \"'max' and 'ultracode' are session-only. Omit to keep the model's own default.\",\n },\n {\n id: \"max_turns\",\n type: \"integer\" as const,\n min: 1,\n max: 200,\n description:\n \"Hard cap on tool-use turns within a single send. Claude Code stops after this many cycles.\",\n bin_args_template: [\"--max-turns\", \"{value}\"],\n },\n ],\n continuation: {\n // native-resume: each turn cold-spawns claude, then ACP `loadSession`\n // reattaches to the saved sessionId. Survives api restarts, sandbox\n // reaps, multi-machine — claude reads its own JSONL session store.\n // Requires the host to register `configureNativeResume({load, save})`\n // hooks; without them the strategy degrades to per-spawn behaviour\n // (no continuity).\n //\n // pinned-session is still supported as a fallback for hosts that\n // haven't wired the resume hooks yet — same warm-process semantics\n // as pre-AIP-45-extension behaviour.\n default: \"native-resume\",\n supported: [\"native-resume\", \"pinned-session\", \"transcript\", \"none\"],\n pinned_session: {\n idle_timeout_ms: 1_800_000,\n key_scope: [\"conversation\", \"operator\"],\n },\n },\n tags: [\"claude-code\", \"anthropic\", \"acp\", \"agent-runtime\", \"coding\"],\n})\n\nexport function claudeCodeRuntime(): AgentCliRuntime {\n return createAgentCliRuntime(claudeCode)\n}\n\nexport type { AgentCliHandle, AgentCliRuntime }\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentproto/adapter-claude-code",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0",
4
4
  "description": "@agentproto/adapter-claude-code — AIP-45 AGENT-CLI adapter for Anthropic's Claude Code via @agentclientprotocol/claude-agent-acp. Spawns the ACP wrapper and drives Claude Code as an agentproto agent CLI.",
5
5
  "keywords": [
6
6
  "agentproto",
@@ -41,10 +41,10 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@agentproto/driver-agent-cli": "0.1.0-alpha.0"
44
+ "@agentproto/driver-agent-cli": "0.2.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "^25.1.0",
47
+ "@types/node": "^25.6.2",
48
48
  "tsup": "^8.5.1",
49
49
  "typescript": "^5.9.3",
50
50
  "vitest": "^3.2.4",