Skip to main content

Module store

Module store 

Source
Expand description

Durable history for fleet events.

Caliban exposes only live state, so Prospero persists a normalized event log to satisfy “observe = live + history”. The Store trait abstracts the backend; JsonlStore is the first-stab append-only implementation (a sqlite-backed Store can drop in later without touching callers).

Structs§

JsonlStore
Append-only JSON-lines store. All events go to a single events.jsonl; replay filters by stream key. Simple and debuggable for the first stab; rotation and per-agent sharding are deferred.
UsageRow
One aggregate row: everything one workspace did on one UTC day.

Traits§

Store
A durable, append-only event log keyed by stream.

Functions§

prune_store_older_than
Delete events older than max_age from store, returning the count removed. The daemon’s age-based retention policy (#4), factored out of crate::fleet::FleetManager::prune_older_than so the k8s arm — which builds no FleetManager (#83) — can prune off the shared store too.