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, once wired, the harnessValueEnumrejection); this struct carries the raw values through to filesystem validation and defaulting. - 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. - Harness
- The agent harness an eval runs against. Single source of truth, shared with
the CLI layer (it derives
clap::ValueEnumso flags can parse it directly).
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.