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