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/// Candidate-cycling redial driver for liminal worker reconnect-to-survivor
20/// (G-1, #112): the transport-free cursor + backoff + loop the liminal worker
21/// uses to migrate from a dead owner to a survivor's listener.
22#[cfg(feature = "liminal-transport")]
23pub mod liminal_redial;
24/// Reconnect-to-survivor serve entry point: wires the real liminal worker connect
25/// + serve into the redial driver (G-1, #112).
26#[cfg(feature = "liminal-transport")]
27pub mod liminal_serve;
28/// Activity polling loop and shutdown primitives.
29pub mod loop_;
30/// Dispatch-outcome reporting and runtime-channel draining.
31pub(crate) mod report;
32
33pub use agent::{
34 ActivityEventSender, ControlMessage, ControlReceiver, harness_error_to_outcome, spawn_agent,
35 spawn_dyn_agent,
36};
37pub use dispatch::{TypedActivityDispatcher, decode_payload, encode_payload};
38pub use intervention::{ControlRegistry, SessionGuard, SessionKey};
39#[cfg(feature = "liminal-transport")]
40pub use liminal::{
41 AgentHarnessConfig, DispatchRequest, DispatchResponse, InterventionReply, InterventionRequest,
42 LiminalActivityWorker,
43};
44#[cfg(feature = "liminal-transport")]
45pub use liminal_serve::{RedialTiming, serve_with_redial};
46pub use loop_::{
47 ActivityDispatcher, DispatchOutcome, NoShutdown, ServeEnd, SessionHealth, serve_activity_tasks,
48 serve_activity_tasks_until,
49};