Skip to main content

aion_server/dev_ui/
mod.rs

1//! Local dev-server surface with production parity.
2//!
3//! The dev surface gives an author a faithful local UI over the REAL engine,
4//! store, and event stream — never a mock-only engine and never an execution
5//! path whose semantics diverge from production (CN4). It is dark by default,
6//! gated on `[dev].enabled`, exactly like the deploy and authoring surfaces.
7//!
8//! The surface is four operations, each built on existing infrastructure:
9//!
10//! * trigger a run — the same start path `/workflows/start` drives;
11//! * stream that run's events — the existing `/events/stream` WebSocket
12//!   firehose, reused (no second stream is built); the trigger response carries
13//!   the exact per-workflow subscription frame;
14//! * mock a named activity per-run — a shared [`ActivityMockRegistry`] the
15//!   engine's dispatcher already consults via [`DevMockingDispatcher`], so the
16//!   engine is untouched;
17//! * replay a failed run — re-drive it through the real engine and store.
18
19/// Transport-agnostic dev-server handlers.
20pub mod handlers;
21/// Opt-in per-run activity mocking layered over the production dispatcher.
22pub mod mock;
23
24pub use handlers::{
25    MockOutcome, RegisterMockRequest, RegisterMockResponse, ReplayRunRequest, ReplayRunResponse,
26    StreamSubscription, TriggerRunRequest, TriggerRunResponse, register_mock, replay_run,
27    trigger_run,
28};
29pub use mock::{ActivityMockRegistry, DevMockingDispatcher, MockedActivity};