Skip to main content

aion_server/worker/
mod.rs

1//! Module declarations.
2
3/// Whether a contract refusal is new information, and therefore worth saying.
4pub mod admission_audit;
5/// Reading one attempt's volatile worker progress note, with typed absence.
6pub mod attempt_progress;
7/// Per-tenant keyed backpressure at the outbox claim (Control-Plane Phase 2,
8/// P2-Q2).
9pub mod backpressure;
10/// Bridge from engine activity dispatch to connected workers.
11pub mod bridge;
12/// Worker contract admission shared by every registration transport.
13pub mod contracts;
14/// Server-side execution of declared action bodies (no worker required).
15pub mod declared_body;
16/// The refusal, and the followable remedy, for retained versions that declare
17/// different bodies for one action.
18pub mod declared_body_ambiguity;
19/// Which retained version's body a declared-command dispatch runs — the
20/// dispatching run's own, not the queue's.
21pub mod declared_body_selection;
22/// A server-run declared command's output, published onto the same transcript
23/// an agent step's is.
24pub(crate) mod declared_body_transcript;
25/// Activity completion handling and dispatch abstractions.
26pub mod dispatch;
27/// Task-envelope generation, idempotency keys, and completion fencing.
28pub mod envelope;
29/// gRPC half of the worker dead-man switch (#197): the transport liveness ping
30/// pushed down a worker's task stream, and the registry its answers correlate
31/// through.
32pub mod grpc_liveness;
33/// Worker heartbeat and liveness tracking.
34pub mod heartbeat;
35/// Server-side mid-run intervention routing (NOI-6): capability gate + attempt
36/// owner resolution + push to the owning worker over a pluggable transport.
37pub mod intervention;
38/// Server half of the liminal connection dead-man switch: the liveness ping/pong
39/// wire pair and the probe that keeps a healthy idle connection's lease alive
40/// while making a dead one loud on both sides.
41#[cfg(feature = "liminal-transport")]
42pub mod liminal_liveness;
43/// Cross-node outbox dispatch over the liminal bus (#13-0 spike, feature-gated).
44#[cfg(feature = "liminal-transport")]
45pub mod liminal_transport;
46/// The transport-neutral vocabulary the dead-man switch's transport halves
47/// share: why a ping failed, and which wire carried it.
48pub mod liveness;
49/// The outbox dead-letter path: retire the row, tell the workflow, record whether it was told.
50pub(crate) mod outbox_dead_letter;
51/// Server-side outbox completion delivery into live workflows.
52pub mod outbox_delivery;
53/// Non-replayed durable-outbox fan-out dispatcher (dormant unless commissioned).
54pub mod outbox_dispatcher;
55/// Live stale-claim outbox reconciler (dormant unless commissioned).
56pub mod outbox_reconciler;
57/// Operator-driven redrive of dead-lettered outbox rows, gated on workflow liveness and on
58/// whether the dead letter's failure was already judged.
59pub mod outbox_redrive;
60/// Terminal-workflow outbox settlement sweep for boot and shard adoption (#253).
61pub mod outbox_settle;
62/// Short-TTL per-namespace placement cache for the dispatcher (Control-Plane
63/// Phase 2, P2-P3).
64pub mod placement_cache;
65/// Unserved-queue honesty at the bridge seam (R1): the four-way taxonomy,
66/// service policies, the two service clocks, and the queryable queue state.
67pub mod queue_service;
68/// Throttled per-namespace quota-state broadcaster for the ops-console live badge
69/// (Control-Plane Phase 2, P2-Q3).
70pub mod quota_broadcast;
71/// Short-TTL per-namespace concurrency-quota cache for the dispatcher's keyed
72/// backpressure (Control-Plane Phase 2, P2-Q2).
73pub mod quota_cache;
74/// Connected-worker registry and handles.
75pub mod registry;
76/// Managed-worker supervision (W-1..W-4): desired state in, contained OS
77/// processes out, with a status surface that is a join of the two.
78pub mod supervisor;
79/// Transport-domain classification and re-dispatch budget for activities whose
80/// worker died before reporting a result.
81pub mod transport_loss;
82/// Server-side `{workspace_root}` expansion for declared action bodies (#139).
83pub mod workspace_root;
84
85pub use admission_audit::AdmissionAudit;
86pub use attempt_progress::{AttemptProgress, attempt_progress};
87pub use backpressure::{Backpressure, OwnedShardFraction};
88pub use bridge::{OutboxDeliveryCallback, PendingActivities, WorkerActivityDispatcher};
89pub use declared_body::{
90    DeclaredBodies, DeclaredBodyLookup, DeclaredBodySource, DeclaredCommandDispatcher,
91    DispatchingRun, EngineDeclaredBodies,
92};
93pub use declared_body_ambiguity::{DeclaringVersion, ambiguous_body_refusal};
94pub use declared_body_selection::select_declared_body;
95pub use dispatch::{
96    ActivityCompletion, ActivityCompletionOutcome, ActivityCompletionSink, ActivityDispatcher,
97    ScheduledActivity, handle_activity_result,
98};
99pub use envelope::{CompletionFences, CompletionToken, idempotency_key};
100pub use grpc_liveness::{GrpcLivenessTarget, GrpcLivenessWaiters};
101pub use heartbeat::{
102    HeartbeatSweeper, HeartbeatTracker, HeartbeatUpdate, InFlightActivity, LostWorkerReport,
103    TaskLiveness, sweep_interval,
104};
105pub use intervention::{AttemptKey, AttemptOwnerIndex, InterventionRouter, InterventionTransport};
106#[cfg(feature = "liminal-transport")]
107pub use liminal_liveness::{LivenessPing, LivenessPong, LivenessProbe, LivenessTarget};
108#[cfg(feature = "liminal-transport")]
109pub use liminal_transport::{
110    DispatchRequest, DispatchResponse, InterventionReply, InterventionRequest,
111    LiminalCompletionSource, LiminalConnectionNotifier, LiminalInterventionTransport,
112    LiminalWorkerDelivery, RegistryLiminalDispatch, channel_for_row, dispatch_channel_name,
113};
114pub use outbox_delivery::ServerOutboxDeliveryCallback;
115pub use outbox_dispatcher::{
116    DeliveryGate, OutboxDispatcher, OutboxDispatcherConfig, OutboxRowDispatch, WorkerOutboxDispatch,
117};
118pub use outbox_reconciler::{OutboxReconciler, OutboxReconcilerConfig};
119pub use outbox_redrive::{RedriveRefused, list_dead_letters, redrive_dead_lettered_row};
120pub use outbox_settle::settle_terminal_outbox_rows;
121pub use placement_cache::{
122    PlacementCache, WorkerSelection, preferred_node_order, worker_selection_for,
123};
124pub use queue_service::{
125    ActivityReachability, DeliveryRefusal, EngineQueueDeclarations, ExpiredClock, OpenActivity,
126    PoolCensus, QueueDeclaration, QueueDeclarationSource, QueueDeclarations, QueueServiceConfig,
127    QueueServiceOverride, QueueServicePolicy, QueueServiceReason, QueueServiceState,
128    ServiceAddress, UnavailableSummary, UnservedDispatch, UnservedKey, UnservedQueue,
129    WorkerUnavailable, open_activities_in_active_segment,
130};
131pub use quota_broadcast::QuotaBroadcaster;
132pub use quota_cache::QuotaCache;
133pub use registry::{
134    ConnectedWorkerRegistry, WorkerDelivery, WorkerHandle, WorkerId, WorkerRegistration,
135};
136pub use supervisor::{
137    ManagedExecutable, ManagedWorkerExit, ManagedWorkerReport, ManagedWorkerState,
138    ManagedWorkerStatus, SpawnedBinary, SupervisionError, SupervisionPolicy, WorkerSupervisor,
139};
140pub use transport_loss::{
141    TRANSPORT_EXHAUSTED_REASON_PREFIX, TRANSPORT_LOSS_BUDGET_WINDOWS, TransportLossLedger,
142    TransportLossVerdict, WORKER_LOST_REASON_PREFIX, is_transport_domain_reason,
143    worker_lost_detail,
144};
145pub use workspace_root::{
146    ExpandedCommand, WORKSPACE_ROOT_PLACEHOLDER, WorkspaceRoot, WorkspaceRootError,
147};