Expand description
The harness descriptor registry — the resolution authority for harness identifiers.
Descriptor sources load into label-keyed entries, and every way the rest of
the crate names a harness funnels through them: Harness::resolve turns
a string into a validated handle (resolving --harness after parsing, and
behind the artifact Deserialize), Harness::known enumerates the
entries, and adapter_for serves each handle’s HarnessAdapter.
Structs§
- Harness
Info - One registered harness as
harness list/show/lintsee it: identity, contributing sources in layer order, the merged descriptor value, and the resolved descriptor. - Unknown
Harness Error - A harness name that no registry entry matches. Names every registered harness so the rejection is actionable wherever it surfaces (artifact deserialization, direct resolution).
Enums§
- Registry
Build Error - A descriptor source set that cannot form a registry. Only embedded and
--harness-filesources can produce this — discovered layer files fail soft (skipped with a warning in [BuiltRegistry::warnings]) so a broken user descriptor never bricks the CLI. - Registry
Init Error - The registry could not be initialized from the layered sources.
Constants§
- DEFAULT_
HARNESS_ NAME - The registry-level default harness — what
--harnessfalls back to when absent. A registry concept rather than a descriptor field, so layered user-supplied descriptor files (#136) can never fight over an exactly-one-default invariant.
Functions§
- adapter_
for - Resolve the adapter for a
Harness. This is the single dispatch point on the harness identifier for all harness-specific behavior; every other module goes through the returned trait object. - all_
config_ dir_ names - The union of every harness’s project-local config dir names (sorted, deduplicated): the dirs harness-agnostic code must treat as protected — staging’s sibling-asset filter, the guard’s Bash tamper rule, and detect-stray-writes’ staging-dir lookbehind.
- all_
tool_ vocabulary - The union of every harness’s tool vocabulary (each list sorted,
deduplicated). Computed once behind a
LazyLock— the guard arbiter consults it on every hooked tool call. - default_
harness_ name - The effective default harness name: the
--harness-filedescriptor’s label when one is loaded, elseDEFAULT_HARNESS_NAME. - harness_
info - Every registered harness in registry order, with provenance and the
resolved descriptor — the data source for the
harnesssubcommands. - has_
embedded_ layer - True when
harnesshas an embedded built-in descriptor among its sources — i.e. it is not defined by user-supplied descriptor files alone. Preflight uses this to hard-reject--guardon user-only harnesses (the write guard stays restricted to built-ins because it fails open). - init_
registry - Initialize the registry from every descriptor layer: embedded built-ins →
user-global (
<config-root>/harnesses/*.toml) → project-local (<cwd>/.eval-magic/harnesses/*.toml) → the optional one-off--harness-file. Called once by the CLI entry point, before anything resolves a harness.