Expand description
The behavior interpreter as a module: the well-known ids and call
conventions under which the runtime exposes its one
BehaviorInterpreter on the engine.
The runtime assembles a function module under ID (the engine’s generic
module builder) with two functions attached to the interpreter’s entry
points:
LOAD→BehaviorInterpreter::load: replace the running behavior with a wholeGraph;EDIT→BehaviorInterpreter::apply: apply aGraphDiffto it.
Both payloads travel as one structured [Value] argument, converted
generically through arora_types::value_serde — any serde type flows,
no bespoke encoding. A Call{module_id: ID, id: LOAD|EDIT} — a remote’s
BridgeOp::Call, or a behavior’s own call bridge — reaches the
interpreter through the engine’s normal dispatch, like any module
function.
Constants§
- EDIT
- Function id of edit: apply a
GraphDiffto the running behavior. - EDIT_
ARG - Argument id of
EDIT’s one argument: theGraphDiff, as a structuredValue. - ID
- Module id under which the runtime registers the behavior interpreter on the engine. Self-identifying like the vizij type ids: the ASCII bytes of “arora” lead the UUID, a small offset tails it.
- LOAD
- Function id of load: replace the running behavior with a
Graph. - LOAD_
ARG - Argument id of
LOAD’s one argument: theGraph, as a structuredValue.
Functions§
- decode_
edit - Read the
GraphDiffout of anEDITcall. - decode_
load - Read the
Graphout of aLOADcall. - encode_
edit - Build the
Callthat appliesdiffto the running behavior. - encode_
load - Build the
Callthat loadsgraphas the running behavior.