Skip to main content

aion_worker/runtime/
mod.rs

1//! Worker activity dispatch runtime support.
2
3/// Harness-blind trait driver (NOI-4): `spawn_agent` drives any `AgentHarness`.
4pub mod agent;
5/// Same-execution single-flight coordination for liminal agent redeliveries (#36).
6#[cfg(feature = "liminal-transport")]
7pub(crate) mod agent_flights;
8/// Typed activity dispatch and payload conversion helpers.
9pub mod dispatch;
10/// Worker-side mid-run intervention delivery (NOI-6): the attempt back-index that
11/// routes a pushed neutral command to the live session that owns its target.
12pub mod intervention;
13/// Liminal worker transport (LSUB-1): receive pushed dispatches, execute, reply.
14#[cfg(feature = "liminal-transport")]
15pub mod liminal;
16/// Reconnect-aware observability drain (#254): the shared live-writer slot and
17/// outage-coalescing drain the liminal worker streams a transcript through, so a
18/// server loss is survived by riding the dispatch path's redial instead of
19/// publishing to a dead socket forever.
20#[cfg(feature = "liminal-transport")]
21pub mod liminal_drain;
22/// Connection dead-man switch for the liminal worker transport: the server's
23/// liveness ping/pong wire pair and the armed silence monitor that turns a
24/// wedged half-open socket into a declared, logged link death plus a redial.
25#[cfg(feature = "liminal-transport")]
26pub mod liminal_liveness;
27/// Candidate-cycling redial driver for liminal worker reconnect-to-survivor
28/// (G-1, #112): the transport-free cursor + backoff + loop the liminal worker
29/// uses to migrate from a dead owner to a survivor's listener.
30#[cfg(feature = "liminal-transport")]
31pub mod liminal_redial;
32/// Reconnect-to-survivor serve entry point: wires the real liminal worker connect
33/// + serve into the redial driver (G-1, #112).
34#[cfg(feature = "liminal-transport")]
35pub mod liminal_serve;
36/// Activity polling loop and shutdown primitives.
37pub mod loop_;
38/// Dispatch-outcome reporting and runtime-channel draining.
39pub(crate) mod report;
40
41pub use agent::{
42    ActivityEventSender, ControlMessage, ControlReceiver, harness_error_to_outcome, spawn_agent,
43    spawn_dyn_agent,
44};
45pub use dispatch::{TypedActivityDispatcher, decode_payload, encode_payload};
46pub use intervention::{ControlRegistry, SessionGuard, SessionKey};
47#[cfg(feature = "liminal-transport")]
48pub use liminal::{
49    AgentHarnessConfig, DispatchRequest, DispatchResponse, InterventionReply, InterventionRequest,
50    LiminalActivityWorker,
51};
52#[cfg(feature = "liminal-transport")]
53pub use liminal_liveness::{LivenessPing, LivenessPong};
54#[cfg(feature = "liminal-transport")]
55pub use liminal_serve::{RedialTiming, serve_with_redial};
56pub use loop_::{
57    ActivityDispatcher, DispatchOutcome, NoShutdown, ServeEnd, SessionHealth, serve_activity_tasks,
58    serve_activity_tasks_until,
59};