pub struct NodeTask {
pub protocol_version: u32,
pub node: String,
pub state: State,
pub config: NodeConfig,
pub task_id: Option<String>,
}Expand description
A node invocation sent to a worker (POST {base_url}/execute).
The same envelope can be embedded as the payload of a durable task
(Durable Work R0.6, rusty_agent_runtime::durable::TaskEnvelope) — in
that flow NodeTask::task_id carries the leased task’s identity.
Direct /execute invocations built by RemoteNode always leave it
None, so previously written tasks keep deserializing unchanged
(additive-only evolution within v1).
Fields§
§protocol_version: u32Protocol version of the sender. See PROTOCOL_VERSION.
node: StringThe handler name the worker should dispatch to. This is the remote
identity of the node (the name registered in the worker’s registry),
which by RemoteNode convention equals the graph node name.
state: StateThe immutable super-step state snapshot (same visibility rules as a local node: this is the state as of the start of the super-step).
config: NodeConfigThe per-run, per-node configuration (thread id, step, resume value,
extensions). Carried verbatim so resume round-trips across the wire.
task_id: Option<String>The durable task identity assigned by the server’s task queue,
present only when this invocation rides the durable-task flow (R0.6)
rather than a direct /execute call. It lets a remote node handler
correlate external side effects with the durable task (idempotency
keys, receipts) when a run dispatches node work through the queue.