Commit Graph

6 Commits

Author SHA1 Message Date
11d468cf7b fix: remediate 10 review findings in communication spine
- Fix createSession race condition with in-flight promise map
- Fix listener leak: always cleanup previous subscription per client
- Fix REST timeout returning HTTP 200 — now rejects with 504
- Fix fire-and-forget Discord sends — await with error handling
- Fix non-null assertion on client.user in Discord plugin
- Fix TUI disconnect mid-stream deadlock (reset streaming state)
- Add connect_error handler to TUI and Discord plugin
- Add connected guard on TUI message submit
- Add relayEvent guard for disconnected sockets
- Sanitize error messages sent to WebSocket clients
- Add error logging/context to AgentService create/prompt/destroy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:31:39 -05:00
98380e610d feat: communication spine — gateway, TUI, Discord
Gateway:
- Agent service wrapping Pi SDK createAgentSession (in-process)
- Chat WebSocket gateway (Socket.IO) streaming agent events
- Chat REST controller for synchronous requests
- NestJS module structure: AgentModule (global), ChatModule

CLI:
- Ink-based TUI client connecting to gateway via WebSocket
- Commander-based CLI with `mosaic tui` command
- Streaming message display with React components

Discord:
- Discord.js bot with mention-based activation + DM support
- Routes messages through gateway WebSocket
- Chunked response delivery (2000-char Discord limit)
- Single-guild binding for v0.1.0

Architecture: All channels → Gateway WebSocket → Pi SDK → LLM

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:24:33 -05:00
888bc32be1 docs: mark P0-001 scaffold monorepo as done
PR #60 merged, issue #1 closed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:12:44 -05:00
6d0d288e31 feat(P0-001): scaffold monorepo structure (#60)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-03-13 01:11:46 +00:00
339641352e docs: record vertical slice reorder in scratchpad
Jason directed: build Pi TUI → Gateway → Discord communication
spine before backfilling horizontal layers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 20:06:17 -05:00
e7f338e3a9 chore: planning gate — milestones, issues, and task breakdown
Break PRD into 8 milestones (Phase 0–7) with 59 issues on Gitea.
Populate TASKS.md, update mission manifest, initialize scratchpad.
Repo created at git.mosaicstack.dev/mosaic/mosaic-stack.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:51:51 -05:00