Skip to main content

Module bridge

Module bridge 

Source
Expand description

Engine bridge (v1.4 §4.5; annex …-engine §4). Projects a resolved capability profile back to a legacy Verdict so the existing ceiling gate (main::run_cli) keeps working unchanged. The engine is authoritative for every command it can resolve (resolve::resolveSome); the legacy classifier handles the rest. There is no opt-out — cst::check::leaf_verdict calls engine_verdict(tokens).unwrap_or(legacy).

Structs§

EvalLevelGuard

Functions§

engine_verdict
The engine’s verdict for a command whose resolver exists, or None if it has none (the caller keeps the legacy verdict).
enter_eval_level
Evaluate the enclosed classification against level (an upper-band level). Restores the previous context on drop. Mirrors pathctx::enter.
project
Project a resolved profile to a legacy Verdict: the lowest authored level that admits it, mapped back to its legacy SafetyLevel; Denied if no legacy-mapped level admits it (above the auto-approve band → worst-case, §0). default_levels() builds the ascending chain (paranoid ⊂ reader ⊂ editor ⊂ developer), so the first match among the mapped levels is the minimum.