Adds streamViaAcp: a drop-in alternative to streamViaCli that drives Claude through the claude-code-cli-acp bridge over ACP instead of `claude -p`. Returns the same AssistantMessageEventStream, so streamSimple dispatches to either transport behind a kill-switch (FUSION_CLAUDE_ACP=1 + an injected bridge path), OFF by default — the live `-p` path is byte-for-byte untouched until soak. - Full-history prompt every turn (buildPrompt) — the ACP path has no --resume (R13). - Forwards schema-only MCP servers so Claude emits correct tool calls; breaks early on the first tool_call (cancel turn, surface to pi) so the bridge never executes Fusion's tools — mirrors the `-p` break-early pattern. - Translation reuses the tested createEventBridge by synthesizing Claude stream events from ACP session/updates, sharing pi sequencing + tool-name mapping. - Bridge env forwards only HOME/PATH so `claude` authenticates from the login session (R17); never inherited process.env or API keys. Verified: 3/3 translation unit tests; real-bridge session/update shapes confirmed (agent_message_chunk text + tool_call); 326/326 existing pi-claude-cli tests green; typecheck clean. Remaining for Route A: engine injection of the bridge path (KTD10), U12 picker/ auth/status, U13 workflow verification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
922 B
JSON
39 lines
922 B
JSON
{
|
|
"name": "@fusion/pi-claude-cli",
|
|
"version": "0.43.1",
|
|
"description": "Fusion vendored fork: pi coding-agent extension that routes LLM calls through the Claude Code CLI. Forked from rchern/pi-claude-cli (MIT). See UPSTREAM.md.",
|
|
"license": "MIT",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "index.ts",
|
|
"keywords": [
|
|
"pi-package"
|
|
],
|
|
"pi": {
|
|
"extensions": [
|
|
"index.ts"
|
|
]
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/Runfusion/Fusion",
|
|
"directory": "packages/pi-claude-cli"
|
|
},
|
|
"dependencies": {
|
|
"@agentclientprotocol/sdk": "0.24.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@earendil-works/pi-ai": "*",
|
|
"@earendil-works/pi-coding-agent": "*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.0.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^4.1.0"
|
|
},
|
|
"scripts": {
|
|
"test": "vitest run --reporter=dot",
|
|
"typecheck": "tsc --noEmit"
|
|
}
|
|
}
|