Expand description
Typed view of the Warble IR (warble_ir_version: 0.6) that this back-end consumes.
Mirrors ir-schema.md field-for-field. The IR JSON is the language-neutral seam
between the front-end compiler and any back-end: this module depends on the schema doc, not on
the front-end’s Rust types. Enum arms cover every schema-valid value; arms this target does not
yet realize are rejected at emit time (a “wall-hit”), not at deserialization.
Structs§
- Component
Node - Context
Binding - Effect
- Eval
Spec - An authored evaluation spec: which eval template to run and which metrics it scores.
- Guardrail
- IrConfig
- The IR’s profile-level
configblock. Empty since IR0.6removedtier_policy(an inert field no back-end read); kept as a struct so future profile-level config is an additive change. - LlmCall
- Outcome
- Param
- A component parameter, either bound at dispatch time (
bind, with an optionaldefault) or sourced from context (source). Exactly one ofbind/sourceis expected to be present per the schema, but both are optional here since this is a Deserialize-only view. - Precondition
- A context precondition a component requires to hold before it runs (e.g.
has_metric). - Precondition
Check - One evaluated
context_preconditionand its outcome (passin emitted IR — a failing predicate loud-fails the compile before any IR is emitted). - Precondition
Result - Render
Block - A typed render block: a block type plus its field-name → field-type schema. The field-type
strings are echoed into the agent’s render contract verbatim; the back-end never interprets
them.
BTreeMapkeeps field order stable (deterministic output). - Trigger
- Warble
Ir - When
Guard - A closed-vocabulary guard on a conditional
llm_call:guardis one ofon_failure/on_flag/on_missing,targetis the guard-specific argument. Seeir-schema.md.
Enums§
- Component
Type - Outcome
Kind - Realization
Kind - A step’s tier is an open string, not a fixed enum. Warble ships a standard core vocabulary
(
strong,cheap) that keeps components portable, but a component may name a custom tier; the dispatch-time model config (seeModelConfig) maps each tier name to a concrete model, and a tier with no mapping is a loud-fail. Kept asStringso the seam never constrains the vocabulary. - Trigger
Kind
Constants§
- SUPPORTED_
IR_ VERSION - IR version this back-end understands. Copied (not shared via a
coredependency — dispatchers never depend onwarble) from the same source of truth asdocs/spec/ir-schema.md’s title and the TS back-end’sSUPPORTED_IR_VERSIONSindispatcher/claude-agent-sdk/src/ir.ts. The sole cross-target lockstep owner iscore/tests/ir_version_lockstep_tests.rs; this target’sir_version_tests.rscovers only its own rejection behavior. An unrecognizedwarble_ir_versionis a loud-fail — seevalidate_ir_version— never a silent best-effort read.
Functions§
- validate_
ir_ version - The one version gate every IR-consuming entry point in this crate (and the
clibinary, at IR parse time) must call before doing anything else withir:emit_claude_code_with_realizationcalls this as its first statement, andcli::load_ircalls it right after deserializing, so every subcommand that reads anir.json—dispatchandmanifestalike — is covered by the same check instead of each reimplementing (and potentially forgetting) it.