## Summary
- Adds and to
- Creates with , , , , and in
- Implements MCP streamable HTTP transport at (POST for JSON-RPC, GET for SSE reconnect)
- Exposes 14 tools across three domains: brain (projects, tasks, missions, conversations), memory (search, preferences, insights), and coord (mission status, task listing)
- Requires valid BetterAuth session for all MCP connections (401 Unauthorized if missing)
- Stateful session management: each initialized client gets its own + pair, keyed by header
- Uses the same low-level Fastify hook pattern as the auth handler
## Test plan
- [ ] Gateway starts without errors with new MCP module wired in
- [ ] POST /mcp without auth returns 401
- [ ] POST /mcp with valid session and initialize payload creates session and returns Mcp-Session-Id header
- [ ] Subsequent requests with Mcp-Session-Id routed to correct transport
- [ ] tools/list returns all 14 registered tools
- [ ] tools/call executes brain/memory/coord tools correctly
- [ ] Unknown Mcp-Session-Id returns 404
- [ ] Gateway shutdown closes all open MCP sessions
Closes #52
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Fix socket singleton lifecycle: add destroySocket() and auto-reset on disconnect
so page remounts always get a fresh authenticated connection
- Add explicit WebSocket transport preference to avoid polling fallback
- Filter socket events by conversationId to prevent cross-conversation bleed
when switching between conversations mid-stream
- Use activeIdRef pattern so event handlers see current activeId without
stale closures or listener re-registration on every render
- On agent:end, append accumulated text as assistant message to local state
(matching TUI pattern; Pi session is in-memory so DB reload would miss it)
- Preserve REST persist of user messages for conversation history on reload
- Clear streaming state on conversation switch
- StreamingMessage: show animated typing indicator before first token arrives
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Test plan
Closes #52
🤖 Generated with Claude Code