feat(P4-003): @mosaic/log — log ingest, parsing, tiered storage

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>
This commit is contained in:
2026-03-13 08:51:10 -05:00
parent fb3c308efd
commit 666d2bc36d
12 changed files with 260 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
{
"name": "@mosaic/log",
"version": "0.0.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
@@ -15,6 +16,10 @@
"typecheck": "tsc --noEmit",
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"@mosaic/db": "workspace:*",
"drizzle-orm": "^0.45.1"
},
"devDependencies": {
"typescript": "^5.8.0",
"vitest": "^2.0.0"