check_live

Function check_live 

Source
pub fn check_live(live: &Live) -> Vec<LiveViolation>
Expand description

Statically check a configured Live session.

Cross-references the parts that name each other by string — the flow’s tool names against the registered tools, phase transitions against defined phases, initial_phase against both — and reports what cannot line up. Call it in a test, before the session ever connects:

let session = Live::builder().instruction("Be helpful.");
assert!(check_live(&session).is_empty());

Connect enforces the tool-name half itself and will refuse a mismatched flow; this exists so the failure arrives in a unit test instead of at the first connection attempt. The phase checks have no runtime counterpart — forgetting initial_phase discards every phase in silence.