pub fn compile_with_provenance(
program: &Program,
origin: Origin,
) -> Result<Vec<Blueprint>>Expand description
Compiles a parsed Program into one Blueprint per graph, attaching
source BlueprintProvenance tagged with origin.
This runs the same semantic validation and lowering as compile, then
records the source Span of every node,
channel, and edge plus the blueprint’s Origin so a UI, test, or review
tool can trace each compiled piece back to the source it came from. Surface
the result through Blueprint::provenance.
Provenance is the difference from compile: pass Origin::file for
file-backed source and Origin::generated / Origin::generated_by for a
model-authored plan. Both still flow through the same gate.
§Errors
Returns TinyAgentsError::Compile for the same semantic failures as
compile.