Repository navigation
[AI-1139] kcap mcp flow-result + review-flow launcher injection - #240
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…server (AI-1139) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ar-then-whitelist) (AI-1139) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…via strict MCP config (AI-1139) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR Summary by QodoAdd flow-result MCP server and strictly whitelist it for review-flow launches
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
…EADME (Qodo review on #240) Malformed tools/call params (non-object params, non-string name) now yield a JSON-RPC -32602 error instead of throwing past the stdio loop and killing the reviewer's only result-submission tool. README documents the new daemon-launched server per the user-facing-CLI-surface rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CLI half of AI-1139 — pairs with kurrent-io/kcap-server#920 (merged). Hosted review-flow reviewers get a dedicated result-submission MCP tool instead of relying solely on the transcript marker.
kcap mcp flow-result— new stdio MCP server (deliberately separate fromkcap mcp flows: a hard security boundary, no flow-starting tools can leak to an unattended reviewer). One tool:submit_review_result(round_token, kind, findings)→POST /api/flows/reviewer/result. ReadsKCAP_FLOW_AGENT_IDfrom daemon-injected env (exit 2 if run manually). Retry policy for the launch race (no_active_flow/no_open_round: 5 attempts, 3 s apart);stale_round_tokensurfaces immediately with the server's discard guidance and deliberately NO marker-fallback hint (routing a stale result through the marker would bypass the round-token guard); all other errors carry the marker-fallback reminder.-c mcp_servers={}FIRST (replaces the whole config.toml table), then the dottedkcap-flow-resultoverrides into the empty table. Order is the security invariant (dotted overrides alone MERGE and would re-expose user-registered servers); tests pin it.--mcp-confignow whitelists exactlykcap-flow-result(AOT-safe JsonNode construction);--strict-mcp-configand--disallowedTools Agentunchanged. Both launchers fall back to zero servers when the daemon lacks a server URL / kcap path.Testing
Mixed versions are safe both ways: old daemon + new server → marker path; new daemon + old server → tool error pointing at the marker fallback.
🤖 Generated with Claude Code