Add SummarizationService that reads hot agent logs (>24h), groups by
session, calls a cheap LLM (gpt-4o-mini default, configurable via
SUMMARIZATION_MODEL) to extract key insights, stores them with
embeddings in the insights table, and transitions processed logs to
warm tier. Add CronService with node-cron for scheduled execution
(summarization every 6h, tier management daily at 3am). Tier
management promotes warm→cold (30d) and purges cold logs (90d).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement AgentLogsRepo with structured log ingest (single + batch),
flexible query builder (filter by session, level, category, tier,
date range), and tiered storage management (hot→warm→cold→purge).
Add getLogsForSummarization() for the summarization pipeline.
Wire LogModule into gateway with REST endpoints at /api/logs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add EmbeddingService using OpenAI-compatible embeddings API (supports
text-embedding-3-small, configurable via EMBEDDING_MODEL and
EMBEDDING_API_URL env vars). Wire embedding generation into insight
creation and semantic search endpoint. POST /api/memory/search now
generates a query embedding and performs cosine distance search via
pgvector when OPENAI_API_KEY is configured.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- #62: piSession.dispose() missing in destroySession
- #63: React anti-pattern in TUI agent:end handler
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark P1-001, P1-007, P1-008, P2-001, P5-002, P6-005 as done (PR #61).
Add session 2 log entry for vertical slice delivery.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Jason directed: build Pi TUI → Gateway → Discord communication
spine before backfilling horizontal layers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>