Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
note the run.reconciled ledger kind in the storage classification (#4540)
[._.]/ Adam Eivya4774227b33c
diff --git a/docs/STORAGE.md b/docs/STORAGE.mdindex 75924d7212..5f45548e92 100644--- a/docs/STORAGE.md+++ b/docs/STORAGE.md@@ -100,7 +100,7 @@ PostgreSQL is a **required** install/runtime dependency (see [Backup & Restore](- Media job queue — runtime queue state can stay file-backed short term, but **job history and artifact lineage are `db-primary`** and should move to the DB.- Browser CDP profile / downloads — `data/browser-profile/`, `data/browser-downloads/` — cache, non-overridable backup excludes.- Brain parity audit results — `data/brain_parity_reports.json` (`server/services/brainParity.js`, #4519). The last record-level brain-parity report per peer, keyed by peer `instanceId` (the same key `data/instances_sync_cursors.json` uses). `ephemeral-file` because it is a point-in-time *observation* about two installs, fully regenerable by re-running the audit, and stale the moment either side syncs — the durable state it describes lives in the brain stores. **Intentionally machine-local — never federated**: it is this install's view of a peer, and each peer computes its own. No sync cursor, no tombstone, no migration (an absent file reads as "nothing audited yet"). Per-type record lists are capped at 25 ids with a `truncated` flag so a badly diverged install can't grow the file without bound.-- CoS run event ledger — `data/cos/run-events.jsonl` + one retained archive generation `run-events.1.jsonl` (`server/services/agentRunEventLog.js`, #4540). The ordered, append-only trace of how a CoS agent run reached its current state: spawn, handoff to/from the CoS Runner, first output, PTY reconnect, pause/resume, interruption, PR-claim verification, orphan reap, runner re-adoption, and finalization. `ephemeral-file` because the DURABLE record of a run is still `data/runs/{id}/metadata.json` — this is a regenerable-by-observation diagnostic over it, with no cross-record queries, no relationships, and no sync cursor; the projection that derives current status is a pure fold (`server/lib/agentRunEvents.js`), so losing the ledger costs post-mortem detail and nothing else. **Intentionally machine-local — never federated**: every line describes a process on THIS box, so a peer would inherit a trace of runs that never existed there. No sync cursor, no tombstone, no `PORTOS_SCHEMA_VERSIONS` entry. Bounded on TWO axes, because neither alone is a retention policy. A COUNT: the active generation rotates at 5000 events and exactly one archive is kept, so the ledger is capped at ~2×5000 events forever with no cleanup job. And an AGE (30 days), because the count alone bounds a busy install but lets a quiet one keep a trace of a run from last spring, describing a workspace, a provider, and a code path that no longer exist. Expired events are filtered out of every read (so the bound holds continuously) and swept off disk on a throttled prune (so the files actually shrink). No migration and no `data.reference/` seed: an absent file reads as an empty ledger. Payloads are redacted at APPEND time (prompt/description/output/result keys dropped to a `{ redacted, chars }` stub, home-dir prefix scrubbed, string/array/key/depth capped), so no reader has to re-redact. Backed up with the rest of `data/cos/` — it is small, bounded, and the thing you most want after the crash you are debugging.+- CoS run event ledger — `data/cos/run-events.jsonl` + one retained archive generation `run-events.1.jsonl` (`server/services/agentRunEventLog.js`, #4540). The ordered, append-only trace of how a CoS agent run reached its current state: spawn, handoff to/from the CoS Runner, first output, PTY reconnect, pause/resume, interruption, PR-claim verification, orphan reap, runner re-adoption, finalization, and the ledger-driven close of a run record left open (`run.reconciled`, `server/services/agentRunReconciler.js`). `ephemeral-file` because the DURABLE record of a run is still `data/runs/{id}/metadata.json` — this is a regenerable-by-observation diagnostic over it, with no cross-record queries, no relationships, and no sync cursor; the projection that derives current status is a pure fold (`server/lib/agentRunEvents.js`), so losing the ledger costs post-mortem detail and nothing else. **Intentionally machine-local — never federated**: every line describes a process on THIS box, so a peer would inherit a trace of runs that never existed there. No sync cursor, no tombstone, no `PORTOS_SCHEMA_VERSIONS` entry. Bounded on TWO axes, because neither alone is a retention policy. A COUNT: the active generation rotates at 5000 events and exactly one archive is kept, so the ledger is capped at ~2×5000 events forever with no cleanup job. And an AGE (30 days), because the count alone bounds a busy install but lets a quiet one keep a trace of a run from last spring, describing a workspace, a provider, and a code path that no longer exist. Expired events are filtered out of every read (so the bound holds continuously) and swept off disk on a throttled prune (so the files actually shrink). No migration and no `data.reference/` seed: an absent file reads as an empty ledger. Payloads are redacted at APPEND time (prompt/description/output/result keys dropped to a `{ redacted, chars }` stub, home-dir prefix scrubbed, string/array/key/depth capped), so no reader has to re-redact. Backed up with the rest of `data/cos/` — it is small, bounded, and the thing you most want after the crash you are debugging.- Remote-API metadata cache — `data/cache/huggingface-repos.json` (`server/services/huggingFaceRepoCache.js`). Hugging Face per-repo records (file sizes, native context window) backing the local-LLM catalog's quant pickers. `ephemeral-file` rather than `db-primary` because it is a pure projection of someone else's API with no queries, no relationships, and no sync cursor — and because it is *machine-local by construction*: it exists to spare THIS install's cold-start requests, so federating it would be pure noise. Long TTL (7 days) since published GGUF file sizes are immutable, but bounded because a repo can gain a new quant. Non-overridable backup exclude — regenerable on demand, and stale by restore time anyway. Purgeable from Data Manager (`cache` category).---