Expand description
The node contract.
A node is an immutable, pre-validated object built once from its
NodeDoc by a factory in the Registry. At run time the engine calls
Node::run with an owned NodeContext; the node reads inputs from the
context’s pool snapshot and returns a NodeOutcome. Nodes never mutate
shared state directly: outputs and variable writes are returned and
committed by the engine.
Structs§
- Config
Error - Error raised when a node’s configuration is invalid (at graph build time).
- NoTimer
Clock - A clock without timers: sleeps complete immediately and timeouts are not enforced. Useful for tests and for executors without a timer facility.
- Node
Context - Everything a node may use while running. Cheap to clone.
- Node
Error - Error produced by a node.
- Node
Output - Successful node result.
- Pause
Request - A request from a node to pause the run (e.g. waiting for a human).
- Registry
- Maps node kinds (
llm,if-else, …) to factories. - Resume
- Data given to a node that previously paused.
- Services
- Type-indexed registry of host services (LLM providers, HTTP clients, tool runtimes, file resolvers…). Nodes look services up at run time, so node factories stay pure and graphs can be built without any integration.
- Subgraph
Request - Request to execute a container’s body once.
- Tokio
Clock - Tokio-backed clock.
Enums§
- Node
Outcome - What a node run produced.
- Node
Role - How the scheduler treats a node.
- Subgraph
Result - Outcome of a container body run.
Traits§
- Clock
- Time source used by the engine and nodes (retries, timeouts, elapsed time).
- Node
- An executable node.
- Subgraph
- Executes a container’s child scope. Provided to container nodes by the engine.
Functions§
- default_
clock - The default clock for this build:
TokioClockwith thetokiofeature, elseNoTimerClock. - merge_
writes - Append
newwrites toacc, keeping only the latest write per exact selector. - parse_
config - Helper for factories: parse the node config into
T, mapping errors toConfigError.
Type Aliases§
- Descriptor
Fn - Builds a node kind’s catalog descriptor.
- Event
Sink - Callback receiving events from nodes.
- Node
Factory - Builds a node from its document.
- Node
Result - Result type of
Node::run.