Skip to main content

Crate aion_server

Crate aion_server 

Source
Expand description

Deployable HTTP, gRPC, WebSocket, and worker endpoint for Aion workflows.

This crate wraps the transport-agnostic engine with API handlers, namespace isolation, observability, shutdown handling, ops-console assets, and remote-worker task dispatch.

§Example

use aion_server::ServerConfig;

let config = ServerConfig::default();
println!("serving gRPC on {}", config.server.grpc_address);

Re-exports§

pub use build_identity::BuildIdentity;
pub use config::ServerConfig;
pub use deploy::DeployGuard;
pub use dev_ui::ActivityMockRegistry;
pub use dev_ui::DevMockingDispatcher;
pub use dev_ui::MockedActivity;
pub use error::ServerError;
pub use error::StreamFailure;
pub use mcp::AionToolService;
pub use mcp::McpRuntime;
pub use namespace::CallerIdentity;
pub use namespace::NAMESPACE_ATTRIBUTE;
pub use namespace::NamespaceGuard;
pub use namespace::NamespaceMinter;
pub use namespace::NamespaceOperation;
pub use namespace::NamespaceResolver;
pub use namespace::ScheduleNamespaceSource;
pub use namespace::ScheduleTarget;
pub use namespace::ScopedEngine;
pub use namespace::StaticScheduleNamespaces;
pub use namespace::StaticWorkflowNamespaces;
pub use namespace::SubscriptionScope;
pub use namespace::TASK_QUEUE_ATTRIBUTE;
pub use namespace::WorkflowAttribution;
pub use namespace::WorkflowNamespaceSource;
pub use namespace::WorkflowTarget;
pub use run::run;
pub use state::ServerState;
pub use worker::HeartbeatSweeper;
pub use worker::HeartbeatTracker;
pub use worker::HeartbeatUpdate;
pub use worker::InFlightActivity;
pub use worker::LostWorkerReport;
pub use worker::TaskLiveness;

Modules§

activity_publisher
NOI-5 transcript sequencer + live fan-out — commit-allocated store_seq over the durable O keyspace, plus the resumable transcript broadcast. NOI-5 transcript sequencer + fan-out — the durability-critical server bridge.
api
Module declarations.
assistant
The built-in assistant: the embedded AWL document, its boot install, and the description the server serves of it. The built-in assistant: the aion authoring assistant ships INSIDE the server binary, present the moment aion server runs.
authoring
Server-side Gleam authoring surface (compile, type-check, package, hot-load). Server-side Gleam authoring surface: compile, type-check, package, and hot-load submitted workflow source.
build_identity
What code this server is: the revision stamped into the binary at build time, so a running server can be asked rather than guessed about (#123). What code is this server (#123).
cluster
SS-5b automatic multi-node failover detection (cluster supervisor). Only meaningful for a distributed haematite boot, so gated behind the backend. SS-5b: automatic multi-node failover detection.
cluster_publisher
WS3 cluster topology/ownership broadcast publisher (not backend-gated: the ops console’s cluster channel is served on every boot, showing calm state with no peers on a single-node server). WS3 cluster topology/ownership broadcast publisher.
config
Runtime configuration loading and validation. Runtime configuration loading and validation for aion-server.
deploy
Operator deploy surface authorization. Operator deploy surface: authorization guard for the deploy API.
dev_ui
Local dev-server surface: trigger a run, stream it over the existing firehose, mock a named activity per-run, and replay a failed run — all over the real engine, store, and event stream. Local dev-server surface with production parity.
error
Server error and stream-failure types. ServerError taxonomy for server library modules.
mcp
The Model Context Protocol surface (2026-07-28 stateless revision): the tool catalog, the tool implementations, and the /mcp mount. Module declarations.
namespace
Namespace resolution and authorization guard types. Namespace authorization and routing support.
observability
Health, metrics, and tracing support. Server-level observability surfaces.
ops_console
Ops-console asset serving helpers. Embedded ops-console asset serving support.
routing
Distributed request routing: the gRPC-edge availability layer over the fence. Distributed request routing — the gRPC-edge availability layer over the epoch fence (DISTRIBUTED-ROUTING-DESIGN §2).
run
Server run loop: configuration load, transports, and graceful shutdown. Run loop for the Aion workflow server: tracing initialization, configuration load, transport startup, and signal-driven graceful shutdown.
shutdown
Cooperative shutdown and drain handling. Graceful shutdown and single-node activity drain coordination.
state
Shared server state construction and access. Shared server state constructed once at startup.
stream
WebSocket event-streaming support. Event subscription streaming surfaces.
worker
Remote-worker registry, heartbeat, and dispatch support. Module declarations.