Expand description
Store file schemas (SPEC 5).
Every store file is TOML with schema = 1 at the top. A
TomlDocument pairs the typed value with the toml_edit document it
was read from. Saving merges the typed value back into that document, so
comments, key order, formatting and keys this build does not know survive;
loading and saving an unchanged file returns the same bytes (including a
UTF-8 BOM and CRLF line endings).
Every table type keeps keys it does not model in a flattened extra map,
which is how unknown keys survive even a rewrite from the typed value.
Re-exports§
pub use validate::Diagnostic;pub use validate::Diagnostics;pub use validate::Severity;pub use validate::StoreDocument;pub use validate::StoreFile;pub use validate::validate_store_file;
Modules§
- applied
store/machines/<machine-id>.applied.toml: the last apply of a machine (SPEC 8.7). No file content, values or hashes; those stay machine-local.- catalogs
store/catalogs.toml: the catalogs the user browses and searches (#26). Built-in catalogs are always there (a table for one may only turn it off); the user adds MCP registries and git taps. Synced like every store file.- clients
- Client ids and
store/clients.tomlpreferences (SPEC 5.4, 7.3, 7.5). - ids
- Identifier rules (SPEC 5.1). Store files keep ids as plain strings so a
bad id survives a rewrite and is reported by validation with
ErrorCode::InvalidIdinstead of failing to load. - machine
store/machines/<machine-id>.toml: per-machine overlay (SPEC 5.6). Written only by the machine it describes.- project
- Project manifests:
<P>/.surjection/project.toml(shared) and<P>/.surjection/project.local.toml(private), mirrored in the store underprojects/<project-id>/(SPEC 5.5). - secrets
store/secrets.toml(SPEC 5.3). The reference grammar it uses lives incrate::secrets::grammar.- server
store/servers/<id>.toml(SPEC 5.2).- settings
store/settings.toml: portable UI and behavior preferences (SPEC 5.7). Machine-specific values live instate/local-settings.toml.- skill_
meta store/skill-meta/<id>.toml: skill metadata kept outside the skill directory (SPEC 12.1).- sources
store/sources.toml: trust decisions about install sources (SPEC 17, #24). One table per source key (github.com/acme/skillsfor one repository,github.com/acme/*for an owner,git.acme.corp/*for a host,file:///C:/repos/xfor a local repository;http://orgit://before the host for a source fetched without encryption), so a pull merges decisions about different sources field by field.- validate
- Validation results and per-file dispatch for store files (SPEC 5).
Structs§
- Toml
Document - A typed store file plus the document it came from.
Constants§
- SCHEMA_
VERSION - The only store schema version this build reads and writes.
Traits§
- Store
Model - A store file type.
Functions§
- json_
schema - JSON Schema of
T, pretty-printed with a final newline. Optional fields are simply not required: TOML has nonull.