Skip to main content

Module unbundle

Module unbundle 

Source
Expand description

composite.Unbundle - decompose a CompositeValue into N per-child outputs.

Reads two attributes the DSL recorder stamps:

  • ai.bytesandbrains.composite.child_count (INT) - declared number of child slots, validated against the incoming envelope’s length.
  • ai.bytesandbrains.composite.child_types (STRING) - comma-separated TypeNode denotations naming each child’s declared output type. The compiler’s TypeSolver narrows downstream consumer inputs through these denotations regardless of the in-process carrier shape.

Each output port is named child_{i} to match the Bundle input convention. The op emits each child as its original concrete SlotValue carrier (clone_boxed of the stored child) - downstream consumers downcast directly to T instead of bincode-decoding a BytesValue against the declared denotation.

Constants§

ATTR_CHILD_COUNT
Attribute name (INT) declaring the expected child count.
ATTR_CHILD_TYPES
Attribute name (STRING) carrying the comma-separated TypeNode denotations per child.
DOMAIN
(domain, op_type) registration key.
OP_TYPE
Op type name.
PORT_BUNDLE
Input port carrying the CompositeValue.

Functions§

invoke
Invoke fn - validate the incoming CompositeValue against the declared child count, emit each typed child on child_{i} via SlotValue::clone_boxed. Downstream consumers downcast directly to the concrete type the graph contract guarantees at each child site.