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::DISPLAY_NAME_ATTRIBUTE;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_seqover the durableOkeyspace, 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 serverruns. - 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).
- changelog
- The release changelog embedded in the binary, serving the console’s “What’s new” panel: what changed in the version this server RUNS, never a file read from disk. The release changelog, embedded so the installed binary carries it.
- cluster
- SS-5b automatic multi-node failover detection (cluster supervisor). Only
meaningful for a distributed (
[store.cluster]) boot; dormant otherwise. SS-5b: automatic multi-node failover detection. - cluster_
publisher - WS3 cluster topology/ownership broadcast publisher. 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. - control
- Server control from the operator’s desk: the pid file the server writes,
the incarnation checks that make it trustworthy, the shutdown outcome
record that crosses the process boundary, and the stop flow built on all
three.
aion server stop/aion server statusrender these; the logic and its types live here so the server crate owns one truth about its own lifecycle records. - death_
note - Durable record of what killed the server process on paths that never reach the graceful-shutdown log. The server’s death note: a durable record of what is killing the process on paths that never reach the graceful-shutdown log.
- 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.
ServerErrortaxonomy for server library modules. - mcp
- The Model Context Protocol surface (2026-07-28 stateless revision): the
tool catalog, the tool implementations, and the
/mcpmount. 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.
- update_
check - The built-in manual-only update check: embedded document, boot install,
completed-check recording, and the served last-check state.
The built-in update check: “does a newer
aion-cliexist?” — slice one, know and show. - worker
- Remote-worker registry, heartbeat, and dispatch support. Module declarations.