pub fn compile(
profile: &ProfileFile,
components: &HashMap<String, ComponentFile>,
project_as_authored: &str,
context: &dyn ContextLoader,
step_contents: &HashMap<String, HashMap<String, String>>,
slot_contents: &SlotContents,
) -> Result<Value, CompileError>Expand description
Resolves a Warble project into its IR JSON document.
components maps a component id to its parsed component.yml. step_contents maps a
component id to a map of step name to the raw (untrimmed) markdown content of that step’s
prompt_ref file. slot_contents carries the same thing for slot variants (see
SlotContents) — both exist because core is sans-IO and never opens a file itself. project_as_authored is the as-authored path read from
context/binding.yml’s project: field. context is the host-injected ContextLoader —
the fine-grained successor to the old project_precondition_ok: bool — that the compiler
probes to evaluate each context_precondition against the bound semantic layer.