Skip to main content

Module declared_body

Module declared_body 

Source
Expand description

Server-side execution of declared action bodies (no worker required). Server-side execution of declared action bodies.

An action whose deployed contract carries an [ActionBodyContract] is executed BY THE SERVER, with no connected worker: the dispatch is intercepted at the ActivityDispatcher seam before task-queue routing, the declared command runs through the worker SDK’s own executor (aion_worker::shell::ShellAction — argv-element substitution, no shell, process-group containment), and the result flows back through the engine’s normal completion path. The engine still schedules, records, and replays the activity exactly as if a worker had served it.

Actions with no declared body are delegated to the wrapped production dispatcher unchanged, so remote workers keep working exactly as before.

§The command is readable while it runs

The executing activity carries a live transcript seam (ActivityContext::with_transcript), so every line the command writes to stdout or stderr is published onto the server’s transcript sequencer AS IT ARRIVES — the same stream, envelope, and cursor reads an agent step’s transcript uses (see [super::declared_body_transcript]). The activity’s recorded result is untouched by this: it still carries the command’s complete output.

Structs§

DeclaredBodySource
Shared, install-once handle the dispatcher holds from construction and the boot path fills in once the engine exists.
DeclaredCommandDispatcher
The dispatcher decorator that executes declared bodies at the server.
DispatchingRun
Which run a declared-body lookup is being made for.
EngineDeclaredBodies
Reads declared bodies out of the engine’s live workflow catalog.

Enums§

DeclaredBodyLookup
What a declared-body lookup found for one (task_queue, action) address.

Traits§

DeclaredBodies
A reader over the deployed contracts’ declared action bodies.