From 7b17e7c1dcc5a4e4518529299926c293228dfa09 Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Mon, 4 May 2026 09:21:30 +0300 Subject: [PATCH] docs: refresh README and TODO after search+opencode merge README: add search, projects, stats, saved-searches to API surface table; remove stale reference to unshipped search task TODO: mark #3 reviewed, unblock #7 --- README.md | 10 ++++++---- docs/TODO.md | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fa2ebf37b77cacff421be1efe02da536a3691be8..ac8c8f3ced45b637ae7397f6a6831dc608ffffcb 100644 --- a/README.md +++ b/README.md @@ -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=` or `?owner=*`. | | GET | `/api/v1/sessions/{tool}/{host}/{session_id}` | yes | Full session with turns inline. Admins may pass `?owner=`. | +| 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. | diff --git a/docs/TODO.md b/docs/TODO.md index 063f75e3178c8fd130d0dcfcfc0154cfdbadb5b4..e2bbcce6068c9d1509cd5ccb4460f10b1c70ec09 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -8,11 +8,11 @@ Index of task specs and their state. Each row points at a `docs/tasks/.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 `` highlighting, save-search action. | +| 7 | `lethe-web-ui-search` | Unblocked (#3 done) | Search route: turn-level results, FTS `` 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. |