M README.md => README.md +6 -4
@@ 2,10 2,8 @@
Personal AI assistant log aggregator. `lethe` stores turn-level NDJSON from
assistant collectors in SQLite and exposes a JSON API for listing and reading
-sessions. This repo now includes the server (`cmd/lethe`) and the first
-collector (`cmd/lethe-collector`) for Claude Code transcripts.
-
-Search and the opencode collector remain in `lethe-search-and-opencode`.
+sessions. This repo includes the server (`cmd/lethe`) and collectors
+(`cmd/lethe-collector`) for Claude Code and opencode transcripts.
## Purpose
@@ 199,6 197,10 @@ the proxy. Everything under `/api/v1/*` is authed.
| POST | `/api/v1/ingest` | yes | `Content-Type: application/x-ndjson`; one `TurnEvent` per line. Idempotent at the turn level per owner. |
| GET | `/api/v1/sessions` | yes | Paginated. Filters: `tool`, `host`, `since`, `until`, `limit`, `offset`. Admins may pass `?owner=<user>` or `?owner=*`. |
| GET | `/api/v1/sessions/{tool}/{host}/{session_id}` | yes | Full session with turns inline. Admins may pass `?owner=<user>`. |
+| GET | `/api/v1/projects` | yes | Aggregated project list by working directory. |
+| GET | `/api/v1/stats` | yes | Aggregate counts: sessions, turns, tokens per tool/host/day. |
+| GET | `/api/v1/saved-searches` | yes | CRUD for persisted search queries. |
+| GET | `/api/v1/search` | yes | FTS5 text search over turns (and optionally tool outputs). Filters: `q` (required), `tool`, `host`, `since`, `until`, `include_tool_outputs`, `limit`, `cursor`. |
| GET | `/healthz` | no | Liveness — constant 200 `ok`. |
| GET | `/readyz` | no | Readiness — runs every registered probe; 200 with `{"checks":{...}}` or 503. |
| GET | `/metrics` | no | Prometheus exposition. |
M docs/TODO.md => docs/TODO.md +2 -2
@@ 8,11 8,11 @@ Index of task specs and their state. Each row points at a `docs/tasks/<slug>.md`
|---|---|---|---|
| 1 | [`lethe-server`](tasks/lethe-server.md) | **Verified** | Backend skeleton: SQLite ingest, sessions list/detail, forward-auth, RFC 7807, deployable on phoebe behind Authelia. Shipped over 9 phases. |
| 2 | [`lethe-collector-claude-code`](tasks/lethe-collector-claude-code.md) | **Reviewed** | Per-host systemd-user collector that tails `~/.claude/projects/*.jsonl` and POSTs normalized turns to ingest. Blocks #8 and #9. |
-| 3 | [`lethe-search-and-opencode`](tasks/lethe-search-and-opencode.md) | Designed (deferred) | Adds `GET /api/v1/search` (FTS5) and an `opencode` collector. Blocks #7. |
+| 3 | [`lethe-search-and-opencode`](tasks/lethe-search-and-opencode.md) | **Reviewed** | Adds `GET /api/v1/search` (FTS5) and an `opencode` collector. Ublocks #7. |
| 4 | [`lethe-web-ui-foundation`](tasks/lethe-web-ui-foundation.md) | **Reviewed** | Vite/React/TS SPA, embed pipeline, shell + Home + Session views, palette skeleton, 5 stub routes. Plus `/sessions` aggregate fields. |
| 5 | [`lethe-web-ui-aggregates`](tasks/lethe-web-ui-aggregates.md) | **Reviewed** | Backend `/projects` + `/stats` endpoints, Projects index + Project detail + Stats screen. Replaces 3 of #4's stubs. |
| 6 | [`lethe-web-ui-palette-savedsearch`](tasks/lethe-web-ui-palette-savedsearch.md) | **Reviewed** | Full ⌘K palette (PROJECT/SESSION items), saved-searches table + UI, palette pulls from it. Small backend (1 table) + Settings → Saved searches. |
-| 7 | `lethe-web-ui-search` | Blocked on #3 | Search route: turn-level results, FTS `<mark>` highlighting, save-search action. |
+| 7 | `lethe-web-ui-search` | Unblocked (#3 done) | Search route: turn-level results, FTS `<mark>` highlighting, save-search action. |
| 8 | [`lethe-web-ui-settings-display`](tasks/lethe-web-ui-settings-display.md) | **Reviewed** | Settings → Display: theme toggle (light/dark/system), density toggle, "show tool calls" toggle, persisted to localStorage. |
| 9 | `lethe-web-ui-health-sources` | Blocked on #2 (and ideally #3) | Settings → Sources (per-host-per-tool config table) + `/health` route (collector ingestion table, status pills, footer strip with backfill progress and last-error). |
| 10 | [`lethe-oidc-stub`](tasks/lethe-oidc-stub.md) | **Reviewed** | Promote the in-test `oidcTestServer` (`internal/server/auth/oidctestserver_test.go`) to an exported `internal/testutil/oidcstub/` package, optionally wrap as `cmd/oidc-stub`. Unblocks real-browser smoke for #5 (the deferred verify item) and any future SPA route work without standing up Authelia locally. JWT-based by design — see `~/data/home/second-brain/wiki/jwt-for-sessions.md`: lethe is the OIDC verifier, JWT is the only legal wire format here. |