pub enum Node {
Show 17 variants
Literal(Value),
Env {
name: String,
default: Option<NodeId>,
},
Secret {
locator: NodeId,
},
Ref(NodeId),
Ident(String),
Interpolate {
parts: Vec<InterpPart>,
},
Binary {
op: BinOp,
lhs: NodeId,
rhs: NodeId,
},
Unary {
op: UnOp,
expr: NodeId,
},
Array {
elements: Vec<NodeId>,
},
Table {
fields: IndexMap<String, NodeId>,
},
Quantity {
value: NodeId,
unit: Unit,
},
ApplyConstraint {
target: NodeId,
constraint: Constraint,
},
PatchDirective {
op: PatchOp,
},
SchemaField {
field: SchemaField,
},
SchemaTable {
fields: IndexMap<String, NodeId>,
closed: bool,
},
SchemaArray {
element: NodeId,
},
Semantic {
tag: SemanticTag,
inner: NodeId,
},
}Variants§
Literal(Value)
Env
Secret
Ref(NodeId)
Ident(String)
Interpolate
Fields
parts: Vec<InterpPart>Binary
Unary
Array
Table
Quantity
ApplyConstraint
PatchDirective
A structural patch directive (spec §2.9, C-028): one operation applied to the evaluated value tree after evaluation (and after profile merge), before schema validation. The value expressions are ordinary graph nodes, so patches are dependency-aware.
SchemaField
One field’s schema (spec §2.10, C-030). The constraint arguments are expression nodes evaluated with the document; C-031 reads their values during validation. Edges run argument → field.
Fields
field: SchemaFieldSchemaTable
A table of named schemas (spec §2.10). Fields hold SchemaField or nested SchemaTable nodes. Extracted from value fields at parse, so schema tables never export as data.
SchemaArray
An array element schema (spec §2.10): element is a SchemaField
node carrying the full element constraints.
Semantic
A multi-line string carrying a semantic tag (@prompt, @policy,
@template). The tag is tool treatment only — evaluation is
transparent to the inner string value (spec §1.4.1).