olai-stack-state
The state store the trestle CLI and the
desktop app share. It is one SQLite database under $TRESTLE_HOME, defaulting to the
platform data directory, and it holds:
- workspaces with their vars
- environments: an editable draft (the placement-free
env.toml, themodule.yamltexts it lists, vars) and a head - revisions: numbered, immutable snapshots of a draft, with a digest
- instances: a revision to run, its desired state, overrides and overlay sources
- slot leases: host-wide, so two instances never share a slot, whatever their workspace
Secrets are stored as references (SecretRef); their values stay with their provider.
Several processes can use the store at once. Writes are serialized, and a Watcher
notices commits made elsewhere. trestle-workspace.toml and environment directories
can be imported, and exported again with the instances' slots.
use ;
use ;
#