diff --git a/packages/dashboard/src/routes/register-auth-routes.ts b/packages/dashboard/src/routes/register-auth-routes.ts index c2927774b8..7b886835e1 100644 --- a/packages/dashboard/src/routes/register-auth-routes.ts +++ b/packages/dashboard/src/routes/register-auth-routes.ts @@ -603,6 +603,12 @@ export const registerAuthRoutes: ApiRouteRegistrar = (ctx) => { const acpBridgeAvailable = typeof process.env.FUSION_CLAUDE_ACP_BRIDGE === "string" && process.env.FUSION_CLAUDE_ACP_BRIDGE.length > 0; + // FNXC:ClaudeAcp 2026-06-15-11:40: + // `active` must reflect the ACTUAL dispatch determinant โ€” FUSION_CLAUDE_ACP + // (set by applyClaudeAcpEnable from the flag OR the operator force-override), + // not the flag alone โ€” so the status isn't misleading when an operator forces + // it on/off. + const acpEnvOn = process.env.FUSION_CLAUDE_ACP === "1"; // R17: the driver writes this signal when a turn comes back "Not logged in" // (the bridged `claude` can't authenticate). Surface it so the UI can offer // fall-back-to-`-p` or fix-auth. Path matches ACP_BRIDGE_AUTH_SIGNAL_PATH. @@ -628,7 +634,7 @@ export const registerAuthRoutes: ApiRouteRegistrar = (ctx) => { acp: { enabled: acpEnabled, bridgeAvailable: acpBridgeAvailable, - active: enabled && acpEnabled && acpBridgeAvailable, + active: enabled && acpBridgeAvailable && acpEnvOn, authFailed: acpAuthFailed, authReason: acpAuthReason, }, diff --git a/packages/engine/src/claude-acp-enable.ts b/packages/engine/src/claude-acp-enable.ts index e02fb7ab86..884028197b 100644 --- a/packages/engine/src/claude-acp-enable.ts +++ b/packages/engine/src/claude-acp-enable.ts @@ -1,4 +1,5 @@ /** + * FNXC:ClaudeAcp 2026-06-15-11:40: * Route A enable resolution (experimental, DEFAULT ON). * * The `pi-claude-cli` provider drives Claude through the `claude-code-cli-acp` diff --git a/packages/pi-claude-cli/src/acp-driver.ts b/packages/pi-claude-cli/src/acp-driver.ts index 7b8b9a929d..2e1fe14cc8 100644 --- a/packages/pi-claude-cli/src/acp-driver.ts +++ b/packages/pi-claude-cli/src/acp-driver.ts @@ -79,6 +79,7 @@ const MAX_TURN_CHARS = 5_000_000; const MAX_ID_CHARS = 256; /** + * FNXC:ClaudeAcp 2026-06-15-11:40: * Cross-process signal for the dashboard: when the bridged `claude` can't * authenticate (R17 โ€” e.g. a detached daemon with no keychain), the turn comes * back as "Not logged in ยท Please run /login" instead of a real answer. We diff --git a/plugins/fusion-plugin-acp-runtime/src/index.ts b/plugins/fusion-plugin-acp-runtime/src/index.ts index c998af80ea..e79ff8a5f5 100644 --- a/plugins/fusion-plugin-acp-runtime/src/index.ts +++ b/plugins/fusion-plugin-acp-runtime/src/index.ts @@ -49,6 +49,7 @@ const plugin: FusionPlugin = definePlugin({ "will be auto-approved under an allow-all policy. Prefer an approval-required policy.", ); } + // FNXC:ClaudeAcp 2026-06-15-11:40: // KTD10 (Route A): publish the bundled `claude-code-cli-acp` bridge path // process-wide so the pi-claude-cli provider's kill-switch can resolve it // WITHOUT a manual FUSION_CLAUDE_ACP_BRIDGE env var. This only PUBLISHES the