Commit Graph

1 Commits

Author SHA1 Message Date
Bill
af6fa169b7 Sprint 291: Add HTTP/SSE daemon mode to whetstone_mcp (Steps 1983-1987)
Eliminates the dual-process bug where multiple Claude Code sessions each
spawn their own whetstone_mcp stdio process with split in-memory state.
All sessions now share a single persistent daemon via MCP HTTP+SSE transport.

Changes:
- MCPHttpServer.h: HTTP+SSE transport (cpp-httplib via FetchContent).
  GET /sse streams events per session, POST /message routes JSON-RPC,
  GET /health for status. Thread-safe session map with mutex/cv/queue.
- MCPBridge.h: adds runHttp(port, workspace) method
- mcp_main.cpp: --daemon/--port flags, daemon.pid lockfile, duplicate guard
- CMakeLists.txt: FetchContent for cpp-httplib, step1983-1987 targets
- tools/start-whetstone-daemon.sh: idempotent startup, health-check poll
- 5/5 tests passing (step1987_test)

Note: Documents/.mcp.json switched to SSE transport in working directory
(not tracked in this repo). Daemon must be started before Claude Code sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 11:18:11 -06:00