Ensure Grok and Claude ACP sessions report usable custom-tool bridge outcomes and model labels. - Copy the MCP schema server into runtime build output and fail custom-tool setup with stable diagnostics. - Record bridge failure metadata safely and normalize ACP string model markers. - Add bridge smoke coverage, adapter regressions, documentation, and a patch changeset. Files changed: .changeset/fn-8422-mcp-bridge.md | 7 ++++ docs/grok-cli-contract.md | 8 +++++ .../src/__tests__/agent-session-helpers.test.ts | 37 ++++++++++++++++++++++ packages/engine/src/__tests__/pi.test.ts | 16 ++++++++++ packages/engine/src/agent-session-helpers.ts | 20 ++++++++++++ packages/engine/src/pi.ts | 27 ++++++++++++++-- plugins/fusion-plugin-claude-runtime/README.md | 6 ++++ plugins/fusion-plugin-claude-runtime/package.json | 2 +- .../src/__tests__/runtime-adapter.test.ts | 30 ++++++++++++++++++ .../src/__tests__/tool-bridge.test.ts | 33 ++++++++++++++++++- .../src/runtime-adapter.ts | 30 ++++++++++++++++-- .../src/tool-bridge.ts | 24 +++++++++++--- plugins/fusion-plugin-claude-runtime/src/types.ts | 2 ++ plugins/fusion-plugin-grok-runtime/package.json | 2 +- .../src/__tests__/runtime-adapter.test.ts | 24 ++++++++++++++ .../src/__tests__/tool-bridge.test.ts | 33 ++++++++++++++++++- .../src/runtime-adapter.ts | 30 ++++++++++++++++-- .../fusion-plugin-grok-runtime/src/tool-bridge.ts | 24 +++++++++++--- plugins/fusion-plugin-grok-runtime/src/types.ts | 2 ++ 19 files changed, 338 insertions(+), 19 deletions(-) Fusion-Task-Id: FN-8422 Fusion-Task-Lineage: 6738f1bd-23f7-4fd3-8490-178d956b362d Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
1.4 KiB
Claude Runtime Plugin
fusion-plugin-claude-runtime exposes Claude Code as Fusion runtime claude and CLI provider claude-cli. It communicates through Agent Client Protocol (ACP), preserving streaming updates, tool calls, and multi-turn sessions.
The plugin uses the pinned claude-code-cli-acp bridge (0.1.1). CLI packaging stages its reviewed launcher beside the bundled plugin, while the published @runfusion/fusion dependency installs the matching optional native bridge for the operator's OS and CPU. The runtime never falls back to a same-named executable on PATH.
This is additive to Fusion's experimental pi-claude-cli Route A. Route A remains available; selecting the claude runtime explicitly selects this first-class ACP transport.
Fusion custom-tools bridge
The fusion-custom-tools MCP server launches mcp-schema-server.cjs beside the loaded bridge module. It is kept beside src/ for source loading and copied beside dist/ by pnpm build; do not remove that postbuild copy or dist-loaded sessions will fail initialize with handshake failed: connection closed: initialize response.
When requested Fusion tools cannot start their bridge, the adapter emits FUSION_TOOL_BRIDGE_FAILED: mcp-schema-server-missing or FUSION_TOOL_BRIDGE_FAILED: bridge-start-failed, omits the unusable MCP entry, and the engine stores only the fixed outcome and tool count in session:runtime-resolved run audit metadata.