Expand description
Descriptor source layers: where a descriptor’s TOML text came from.
Discovery order is precedence order — embedded built-ins, then user-global
(~/.config/eval-magic/harnesses/*.toml), then project-local
(.eval-magic/harnesses/*.toml), then a one-off --harness-file. Later
layers override earlier ones field-by-field (see
merge_descriptor_value). Every source
carries its layer and display path so registry entries can report
provenance (harness list/show) and error messages can name the
contributing file.
Structs§
- Descriptor
Source - One descriptor source: its layer, a display path for error messages and provenance, and the raw TOML text.
- Harness
File Error - A
--harness-filepath that could not be read. Unlike discovered layer files (skipped with a warning), the explicitly named file is a hard error.
Enums§
- Layer
- The layer a descriptor source belongs to, in precedence order (later layers override earlier ones field-by-field).
Functions§
- check_
user_ layer_ restrictions - Reject descriptor content user-supplied files may not declare: the write guard fails open (an unrenderable or mistyped guard block silently allows everything), so guard data stays restricted to the embedded built-ins until user guards get an explicit trust story. The check runs on each file’s own content, so a user overlay of a guarded built-in still inherits the embedded guard cleanly.
- config_
root_ from - Resolve the user-global config root from explicit/env inputs:
$EVAL_MAGIC_CONFIG_DIRverbatim (empty disables the layer), else$XDG_CONFIG_HOME/eval-magic, else<home>/.config/eval-magic. - default_
config_ root config_root_fromover the live environment.- discover_
sources - Discover every descriptor source in precedence order: embedded →
user-global → project-local →
--harness-file. Missing layer directories are fine (empty layer); unreadable files inside a layer directory are skipped and reported in the returned warnings. Only the explicit--harness-filefails hard. - embedded_
sources - The bundled built-in descriptors as the registry’s base layer.