Skip to main content

rlmesh_runtime/
lib.rs

1//! RLMesh single-session runtime driver.
2//!
3//! Shared `reset -> predict -> step` semantics for one ready model/environment
4//! session. Scheduling, endpoint pools, route fan-out, and cluster lifecycle
5//! live elsewhere.
6
7mod driver;
8pub mod hooks;
9pub mod spec;
10pub mod telemetry;
11
12mod episodes;
13mod state;
14
15pub use driver::{
16    EagerScheduler, PredictScheduler, RuntimeDriver, RuntimeEnv, RuntimeEnvReset, RuntimeEnvStep,
17    RuntimeError, RuntimeModel, RuntimeModelPrediction,
18};
19pub use hooks::{
20    ActionReceivedEvent, EnvConnectedEvent, EpisodeCompletedEvent, EpisodeStartedEvent, HookError,
21    Leg, LogEvent, LogLevel, ModelConnectedEvent, NoopRuntimeHooks, ObservationEmittedEvent,
22    PayloadFacts, RefusingRelayPolicy, RelayAdvisoryEvent, RelayDecision, RelayPolicy,
23    RuntimeEnvContext, RuntimeHooks, SessionEndedEvent, SessionFailedEvent, SessionStartedEvent,
24    StepCompletedEvent, TelemetrySnapshotEvent,
25};
26pub use rlmesh_proto::EndpointPhases;
27pub use rlmesh_spaces::{Advisory, AdvisorySeverity, DType};
28pub use spec::{
29    ENV_RESET_OPTIONS_KEY, PeerCeiling, RuntimeLimits, RuntimeReport, RuntimeSessionSpec,
30    TRIAL_INDEX_OPTION, declares_reset_option, reset_options_for,
31};
32
33/// Protocol types used by the runtime public API.
34///
35/// Runtime traits and hooks name generated `rlmesh_proto::*::v1` types directly.
36/// Re-exporting the crate gives implementors the version-correct path. Protocol
37/// regeneration or a major `prost`/`tonic` bump is therefore a runtime breaking
38/// change.
39pub use rlmesh_proto;