AbortSignal a handler can observe for cooperative cancellation.
Materialize schema autofills into empty input nodes before a handler runs.
Bind the application implementation invoked by a local run.
Replace the registry used by subsequent nested actions.
Move lifetime/routing ownership to a session, retaining active tracking.
Bind remote dispatch and reattach all already stream-bound port nodes.
Set whether opened inputs attach to the action transport by default.
Set whether opened outputs attach to the action transport by default.
Queue this action for remote dispatch;
use waitForDispatch for acceptance.
Set whether terminal cleanup removes input nodes from the node map.
Set whether terminal cleanup removes output nodes from the node map.
Whether the schema maps an input or output with this name.
Snapshot the call id, name, port mappings, and headers for dispatch.
Remote acknowledgement status, or null before it arrives.
Local implementation, or null for a remote-only action.
Return a copy of one header, or null when absent.
Copy all action-scoped binary headers.
Stable id shared by action messages and port node ids.
Return the log port's node, claiming it for this consumer.
Claiming suppresses the process sink for this action, so a consumer that presents the logs itself does not also have them reported twice. Claim before the action runs: logs written earlier have already gone to the sink.
The stream is not bound: on the calling side, binding an output would echo received fragments back to the peer.
Node namespace that owns this action's port ids.
Registry used to resolve nested actions.
Callable contract for this action.
Session responsible for routing and lifetime tracking.
Copy the current port binding and retention policy.
Completion status; OK is provisional until isDone() becomes true.
Direct transport, or null when a session routes the action.
Whether remote dispatch has started.
Whether local execution has started.
Whether a local implementation is bound.
Whether a valid header name is present.
Whether cancellation was requested or became the terminal status.
Whether terminal status and cleanup have completed.
Log value on the reserved ACTION_LOG_OUTPUT port.
The value becomes a chunk the way node.put(value) would make one -- a
string is text/plain, a
Uint8Array is application/octet-stream -- and
the chunk always carries a timestamp.
Only a running handler may log: logging before run, or on the calling
side of a call, is a failed precondition, because the port would have
nowhere to go and no reader to close it. Nothing else about logging fails
the action -- once the chunk is built, a transport or lifecycle problem is
reported through the sink rather than returned.
Where it goes: always to the process's action log sink, and additionally onto the log port when something could read it -- a peer is attached, or a local consumer claimed the port with getLogNode. Nobody has to drain it and nobody has to close it.
Log a formatted line: %s is replaced by each argument in turn.
Uses positional %s replacements and %% for literal percent signs across
language runtimes.
Log a formatted line with explicit options.
A second name rather than an overload, so it matches the C++ surface, where
a leading-options overload of Logf is ambiguous against the format spec.
Create a child action from a schema or registered name.
With propagateIo, the child shares the parent's node map, stream, and
session, while retaining its own id, derived port ids, and AbortSignal.
The registry is shared in either mode, and framework headers are forwarded
when forwardHeaders is true. A shared session supplies nested concurrency
limits and session-wide abort. Parent cancellation reaches the child even
when propagateIo is false.
Adopt validated caller-supplied port node ids before local execution.
Replace the call id and remap default port ids before starting.
Add a synchronous hook invoked on the first cancellation request.
Replace the callable contract and remap ports before starting.
Replace the port binding and post-run retention policy.
Await the remote dispatch acknowledgement, not handler completion.
OptionaltimeoutMs: numberStaticcreateValidate a schema/options bundle and create a configurable action.
StaticmakeDerive the stable action-id#port-name id for one action port node.
One schema-described unit of local work or remote agent work.
An action binds an ActionSchema to input/output AsyncNodes and, for a local run, an application handler. It is a one-shot state machine: configure the id, schema, collaborators, headers, and port mappings; then choose run for local execution or call for remote dispatch. Configuration that changes identity or port shape is frozen after start.
Remote calls have two milestones. waitForDispatch reports whether the peer accepted the action, while wait follows its eventual status after handler and output-writer cleanup. Local handlers can create children with makeNested; a shared session applies nested limits and includes tracked children in session-wide abort. Cancelling a parent recursively cancels every active child.
Example: Run a local action and read its unary result.