Skip to main content

Module keys

Module keys 

Source
Expand description

Single source of truth for metadata-key string constants shared across DSL → Compiler → Runtime. Reference these constants rather than re-typing "ai.bytesandbrains.*" literals.

Constants§

ATTR_PEER
PeerId-typed value name. Used by backoff + peer-health gates.
BACKEND_SUBGRAPH_BODY_ATTR
Attribute key for the embedded GraphProto body inside a BackendSubgraph carrier. Stamped by collapse_backend_subgraphs.
BACKEND_SUBGRAPH_OP
op_type for a carrier NodeProto wrapping a GraphProto body. Engine forwards these to Backend::dispatch for native-graph specialization.
BATCH_GROUP_KEY
Per-edge batch grouping id stamped by analyze_wire_edges.
BINDING_KEY_PREFIX
Prefix for per-target per-slot binding entries: binding.<target>.<slot> = "<role>|<TYPE_NAME>|<slot_id|-1>".
CHAIN_DEPTH_KEY
Static chain depth from this Send. Runtime multiplies by per_hop_budget_ns to size deadlines against the full round-trip.
CHAIN_TARGETS_KEY
Comma-separated targets participating in the chain (originating target excluded). Used for per-hop budget renegotiation.
COMPILED_CURRENT_VERSION
Current compilation passport value. Bumps on IR-breaking changes.
COMPILED_KEY
Compilation passport key. Missing → InstallError::NotCompiled; mismatched value → InstallError::IncompatibleCompiledVersion.
CONCRETE_TYPE_KEY
Concrete-component type. Paired with INSTANCE_KEY.
DEDUP_SLOT
Attribute key carrying the dedup slot identifier on a DedupGateRx op. Together with the inbound peer this seeds the (peer, slot) dedup key.
DEFAULT_CLASS
Default-class tag used by infer_peer_classes when a peer expression has no explicit class denotation.
DEP_SLOT_KEY_PREFIX
Prefix for per-dependency entries: dep.<role> = "<slot>". Stamped by resolve_component_dependencies.
DEST_SITE_NAME_PREFIX
Prefix for per-fill destination site names stamped on Send nodes. Used by the lower-network-io pass to derive the partition name on the receive side.
DEST_SUFFIX_ATTR_PREFIX
Prefix for per-fill multiaddr suffixes stamped on Send nodes. Suffixes are keyed dest_suffix.<i> for fill index i.
FRAMEWORK_IR_VERSION_KEY
Canonical metadata-props key under which FRAMEWORK_IR_VERSION is stamped on each ModelProto.
INSTANCE_KEY
Per-instance disambiguator paired with CONCRETE_TYPE_KEY.
MODULE_PHASE_BODY
Body-phase value of MODULE_PHASE_KEY.
MODULE_PHASE_BOOTSTRAP
Bootstrap-phase value of MODULE_PHASE_KEY. Fired once on first poll; body parks until descendants drain.
MODULE_PHASE_KEY
Distinguishes a Module’s body recording from its bootstrap. Drives Engine::bootstrap_function_key seeding on first poll.
RECV_SLOT_ID_KEY
Stamped on wire.Recv whose payload feeds a role NodeProto’s slot_id input. Drives decode_typed_fill’s backend-mediated branch. Absent on framework-carrier Recv nodes.
REQUIRED_TRAIT_KEY
Required-trait identifier for a generic slot. Paired with SLOT_ID_KEY.
SLOT_ID_KEY
Per-slot disambiguator paired with REQUIRED_TRAIT_KEY.
TRIGGER_DENOTATION
Trigger type denotation; matches <Trigger as WireType>::DENOTATION.
WIRE_ID_KEY
Per-edge wire-pairing token minted by Graph::wire and read by the compiler’s discover_wire_edges pass.
WIRE_TRANSPORT_DATA
Value of WIRE_TRANSPORT_KEY for full-payload edges.
WIRE_TRANSPORT_KEY
Per-edge classification stamped by analyze_wire_edges. Value is WIRE_TRANSPORT_DATA or WIRE_TRANSPORT_TRIGGER_ONLY.
WIRE_TRANSPORT_TRIGGER_ONLY
Value of WIRE_TRANSPORT_KEY for trigger-only edges.

Functions§

binding_key
Build the binding key for (target, slot). Splits at the FIRST dot after the prefix when parsing — slot names may contain dots.
dep_slot_key
Build the metadata key for a dependency on the canonical role string (PascalCase - e.g. "Backend", "Index").
dest_suffix_attribute
Per-input dest_suffix.<name> AttributeProto carrying the resolved destination multiaddr suffix.
encode_binding_value
Encode a binding’s (role, TYPE_NAME, slot_id_or_neg1) triple into the pipe-delimited value "<role>|<TYPE_NAME>|<slot_id_or_-1>". Reads inversely via parse_binding_value.
parse_binding_key
Parse a binding key into (target, slot). None for non-binding.
parse_binding_value
Decompose a binding value into (role, TYPE_NAME, slot_id_or_-1). None when the format doesn’t match (the caller surfaces this as InstallError::InvalidBindingTable).
read_dependency_metadata
Read dep.<role> = "<slot>" entries as borrowed (role, slot).
read_function_module_phase
Read MODULE_PHASE_KEY off a FunctionProto. None when the key is absent.
read_model_metadata
Read a ModelProto.metadata_props entry by key. Returns the borrowed value string; None when the key isn’t present.
role_from_dep_slot_key
If key is a DEP_SLOT_KEY_PREFIX-namespaced dependency entry, return the bare role string. Otherwise None.
stamp_dependency_metadata
Stamp deps onto node.metadata_props as dep.<role> = "<slot>". Idempotent on duplicates.
stamp_function_module_phase
Stamp MODULE_PHASE_KEY onto a FunctionProto. Replaces existing.
stamp_model_metadata
Stamp (key, value) onto model.metadata_props, replacing any existing entry with the same key. Idempotent on re-runs.