feat(panel): migrate trajectory cache to incremental SQLite ledger

- Add short-connection WAL trajectory_store.sqlite (and remote ssh-*.sqlite) with transactional .json-to-.bak migration, O(delta) step UPSERTs, undo tail truncation, and ledger_epoch/write_seq cross-process sync
- Split steps into string-interned compact accounting tuples (retaining anomaly and step account owners) and lazy detail_json with an explicit 24-session hot LRU and precomputed O(1) cold metadata flags
- Archive deleted source conversations permanently across cache rebuilds and skip redundant 404 trajectory RPCs while un-archiving automatically if sources reappear
This commit is contained in:
fish
2026-11-24 13:36:24 +09:00
parent 8b025a969c
commit 275955c37f
10 changed files with 2104 additions and 56 deletions
+2 -1
View File
@@ -28,10 +28,11 @@ const BACKEND_MODULE_FILES = [
'../backend/account-switch.mjs',
'../backend/http-helpers.mjs',
'../backend/settings-schema.mjs',
'../backend/sqlite-client.mjs',
'../backend/trajectory-sqlite-ledger.mjs',
'../backend/trajectory-cache-store.mjs',
'../backend/config.mjs',
'../backend/endpoint-registry.mjs',
'../backend/sqlite-client.mjs',
'../backend/proto-wire.mjs',
'../backend/cli-sqlite-reader.mjs',
'../backend/cli-statusline-config.mjs',