Expand description
RunContext detection.
clap owns flag parsing, so detect_run_context takes already-parsed
values (a DetectInput) and performs the filesystem validation,
sibling-skill enumeration, and path defaulting that produce a
RunContext.
Structs§
- Detect
Input - Already-parsed flag values handed to
detect_run_context.clapowns the actual argv parsing, and--harnessis resolved against the registry before this struct is built (unknown names are rejected there); it carries the raw values through to filesystem validation and defaulting. - Harness
- The agent harness an eval runs against: a validated handle to an entry in
the descriptor registry. Constructible only through registry resolution, so
a held
Harnessalways names a registered harness and adapter lookup never fails. The registry-dependent behavior lives next to the registry incrate::adapters::harness:Harness::resolve(the string-to-handle gateway, resolving--harnessafter parsing),Harness::known(every registered harness),Default(the registry’s default harness), andDeserialize(resolves artifact values, rejecting unknown names). - RunContext
- The resolved environment for a run: validated skill location, sibling skills,
workspace/stage roots, optional bootstrap file, and the target harness. Built
by
detect_run_context; held in memory and never (de)serialized.
Enums§
- Context
Error - A user-facing failure while detecting the run context. Display strings carry
the offending flag/path so the
error: <msg>boundary inmain.rsis actionable.
Functions§
- detect_
run_ context - Validate the parsed flags against the filesystem and assemble a
RunContext: resolves either a seeded--skill-direnvironment or a direct single skill selected from--skill <path-or-name>/ the current directory, validatesSKILL.md, an optional existing--bootstrap, and defaults the workspace/stage roots from the current directory.