Skip to main content

load

Function load 

Source
pub fn load(path: &Utf8Path) -> Result<(Policy, Vec<String>)>
Expand description

Load, validate, and normalize an agent-policy.yaml from a file path.

This is the main entry point for the entire load pipeline.

Returns the normalized policy and any diagnostic warnings. Warnings are non-fatal and should be printed to stderr so the user can clean up their configuration.

ยงErrors

Returns an Error if the file cannot be read, the YAML is invalid, the document fails schema validation, or normalization encounters invalid values.