pub struct EphemeralPollerProxy { /* private fields */ }Expand description
Phase 96.E — daemon-side Poller impl that spawns a fresh
subprocess per tick, drives the tick over stdio JSON-RPC, kills
the child on reply. Used when the plugin manifest declares
lifecycle = "ephemeral".
Wire shape (one JSON line each):
daemon → subprocess.stdin: {"method":"poll_tick","params":{...TickRequest}}
subprocess → daemon.stdout: {"result":{...TickReply}} | {"error":{code,message}}Limitations of V1 ephemeral:
- No reverse-RPC during tick. The subprocess receives one input
(TickRequest) + writes one output (TickReply). For credential
resolution or LLM invocation, use
lifecycle = "long_lived". - The subprocess inherits the daemon’s
NEXO_BROKER_URLenv so it can publish outbound directly if needed (Phase 92 pattern).
Implementations§
Source§impl EphemeralPollerProxy
impl EphemeralPollerProxy
Sourcepub fn new(kind: &'static str, handle: Arc<PluginPollerHandle>) -> Self
pub fn new(kind: &'static str, handle: Arc<PluginPollerHandle>) -> Self
Wrap a (handle, kind) pair for spawn-per-tick dispatch.
handle.entrypoint_command MUST be Some — the proxy uses
it as the binary path.
Trait Implementations§
Source§impl Poller for EphemeralPollerProxy
impl Poller for EphemeralPollerProxy
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human label for
agent pollers list. Defaults to empty.Source§fn tick<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 PollContext,
) -> Pin<Box<dyn Future<Output = Result<TickAck, PollerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn tick<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 PollContext,
) -> Pin<Box<dyn Future<Output = Result<TickAck, PollerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run one tick. The runner persists the returned cursor and
honors the interval hint; anything the poller wants to send
outbound (broker publish, LLM call, credential lookup) goes
through
ctx.host.Source§fn validate(&self, _config: &Value) -> Result<(), PollerError>
fn validate(&self, _config: &Value) -> Result<(), PollerError>
Validate the per-job
config JSON at boot. Errors fail loading
of that job only; siblings keep going. Default: accept anything.Source§fn custom_tools(&self) -> Vec<CustomToolSpec>
fn custom_tools(&self) -> Vec<CustomToolSpec>
Optional per-kind LLM tools registered alongside the generic
pollers_* tools. Pollers without custom tools leave this
empty (default).Auto Trait Implementations§
impl Freeze for EphemeralPollerProxy
impl RefUnwindSafe for EphemeralPollerProxy
impl Send for EphemeralPollerProxy
impl Sync for EphemeralPollerProxy
impl Unpin for EphemeralPollerProxy
impl UnsafeUnpin for EphemeralPollerProxy
impl UnwindSafe for EphemeralPollerProxy
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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more