Expand description
Harness descriptor files: the data half of a harness adapter.
A descriptor is a TOML file carrying every declarative value a harness
adapter exposes (label, dirs, capability booleans, phrases, templates,
banner prose, the write-guard data block) plus references to named
capabilities — the code-backed features in super::capabilities
(transcript parsers, slug generation, shadow preflight).
Loading is schema-gated: the TOML transcodes to JSON and must satisfy the
bundled schema/harness-descriptor.schema.json, then the cross-field
invariants in [validate_descriptor] — the load-time form of the old
cross-harness adapter tests, so user-supplied descriptor files inherit the
same checks.
Modules§
- layers
- Descriptor source layers: where a descriptor’s TOML text came from.
Structs§
- Dispatch
Section - Guard
Section - The write-guard data block: everything the generic guard engine
([
super::guard]) needs to arm a hook and render a deny verdict. Embedded built-in descriptors only — the guard fails open, solayers::check_user_layer_restrictionsbars user layers from declaring it. - Harness
Descriptor - A parsed, schema-checked, invariant-checked harness descriptor.
- Model
Section - RunSection
- Run-option capabilities. The
Defaultmirrors the baseline every harness gets without opting in: no guard, bootstrap/stage-name allowed unstaged. - Shadow
Section - Skills
Block Section - Staging
Section - Tools
Section - Transcript
Section
Enums§
- Descriptor
Error - A descriptor that failed to load. Every variant carries the descriptor’s source path so the message is actionable on its own.
Constants§
- EMBEDDED_
DESCRIPTORS - The three built-in harness descriptors, embedded like the schemas: a
(source path, TOML text)pair per harness, in registry order.
Functions§
- finalize_
descriptor - Deserialize and invariant-check a (possibly merged) descriptor value.
provenancenames every contributing file (e.g.base.toml (built-in) + overlay.toml (project)) so a post-merge violation is traceable. - load_
descriptor - Parse, schema-check, and invariant-check one descriptor.
sourcenames the descriptor in error messages (its file path). - merge_
descriptor_ value - Merge
overlayontobase, field by field: objects merge recursively per key; scalars, arrays, and nulls replace wholesale. This is the layering rule — a later descriptor file overrides individual fields of an earlier one, never whole-file shadowing. - parse_
descriptor_ value - Parse one descriptor file’s TOML into a JSON value and schema-check it.
This is the per-file gate every layered source passes individually — the
schema requires only
label, so partial override files validate here too, while unknown fields and bad capability names are still rejected with the file’s own path in the message.