pub struct DeclaredCommandDispatcher { /* private fields */ }Expand description
The dispatcher decorator that executes declared bodies at the server.
Wraps the production dispatcher. Consults the declared-body source before every dispatch; delegates untouched whenever the action carries no body.
Implementations§
Source§impl DeclaredCommandDispatcher
impl DeclaredCommandDispatcher
Sourcepub fn new(
inner: Arc<dyn ActivityDispatcher>,
bodies: DeclaredBodySource,
attempts: DeclaredCommandAttempts,
tokio: Handle,
workspace_root: WorkspaceRoot,
transcript: ActivityEventPublisher,
) -> Self
pub fn new( inner: Arc<dyn ActivityDispatcher>, bodies: DeclaredBodySource, attempts: DeclaredCommandAttempts, tokio: Handle, workspace_root: WorkspaceRoot, transcript: ActivityEventPublisher, ) -> Self
Wrap inner, consulting bodies before every dispatch, registering
every attempt it executes in attempts so the run’s cancel can reach
it, expanding {workspace_root} in declared commands with the
server-resolved workspace_root, and streaming each executed command’s
output onto transcript — the deployment’s one transcript sequencer,
shared with every agent step.
attempts is required rather than optional because a dispatcher without
one would execute commands nothing could stop, which is precisely the
state this argument exists to end.
Trait Implementations§
Source§impl ActivityDispatcher for DeclaredCommandDispatcher
impl ActivityDispatcher for DeclaredCommandDispatcher
Auto Trait Implementations§
impl !RefUnwindSafe for DeclaredCommandDispatcher
impl !UnwindSafe for DeclaredCommandDispatcher
impl Freeze for DeclaredCommandDispatcher
impl Send for DeclaredCommandDispatcher
impl Sync for DeclaredCommandDispatcher
impl Unpin for DeclaredCommandDispatcher
impl UnsafeUnpin for DeclaredCommandDispatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request