@nhtio/adk/batteries/orchestration/encoding
Encoding battery for orchestration: the reference classes the IR is built from, their @nhtio/encoder registration, and the plan digest every approval binds to.
Remarks
This module owns three things:
NodeRefandParamRef— the two CLASSES the IR uses for references and template holes. They are classes, not records with a marker field, for a reason stated in their TSDoc: a plain record can wear{kind: 'nodeRef', …}— it is an ordinary encodable record — so a marker property cannot separate a reference from a literal that merely looks like one, and a resolver keying on it would silently rewrite the literal.instanceofis unforgeable.registerOrchestrationEncodables()— the one call that makesdecode()able to rebuild these classes. It MUST run before anydecode().planDigest()— the canonical, LOSSLESS digest of aRawPlanView. Every approval binds to this digest, so it must never collide across semantically-different plans.
Classes
| Class | Description |
|---|---|
| NodeRef | A serializable reference to another node's output — a CLASS, not a record. |
| ParamRef | A hole in a template's staged values, substituted at instantiation. A CLASS for the same reason NodeRef is: a look-alike record must not be mistaken for a hole. |
Functions
| Function | Description |
|---|---|
| planDigest | Compute the canonical, LOSSLESS digest of a RawPlanView. |
| registerOrchestrationEncodables | Register NodeRef and ParamRef with the @nhtio/encoder decoder. |