Skip to main content

Module binding

Module binding 

Expand description

Argument bindings for planned tool calls. A string value inside a planned call’s args may embed {{steps.N.path}} (data captured from a prior step) or {{calls.K.path}} (an earlier call in the same step, zero-based). Extraction feeds strict-save validation; resolution substitutes live or pinned run data at execution/preview time.

Structs§

BindingContext
Data a resolution pass draws from: per-step values keyed by step number and the ordered values of calls already executed in the current step.
BindingRef
One parsed {{...}} reference.

Enums§

BindingScope
Scope a binding draws from.
ExtractedBinding
Extraction result: valid reference or a malformed body with a reason.

Functions§

extract_bindings
Walk a JSON value and extract every {{...}} binding found in string leaves, in document order.
extract_bindings_with_paths
Like extract_bindings but pairs each binding with the dotted arg-field path it sits under (empty for a top-level string, field.sub for nested objects, field.N for array elements). Authoring surfaces use the path to name the consumer input pin a binding wires into.
remap_step_refs
Rewrite steps.N references inside string leaves after a step renumber. Dangling references are left as-is for strict validation to surface.
resolve_args
Resolve every binding in args, returning a new value. A string that is exactly one binding resolves to the referenced JSON value (any type); bindings embedded in longer strings interpolate as text. Unresolvable references error rather than passing template text to a tool.