Skip to main content

zero_engine_client/
lib.rs

1//! Unified HTTP + WebSocket + MCP client to the ZERO engine.
2//!
3//! The CLI never reads bus files. All engine state flows through this
4//! crate. Every value carries freshness metadata (`Stat<T>`) and the
5//! TUI refuses to render without it.
6
7#![allow(clippy::module_name_repetitions)]
8
9pub mod http;
10pub mod models;
11pub mod poll;
12pub mod rate_budget;
13pub mod stat;
14pub mod state;
15pub mod ws;
16
17pub use http::{HttpClient, HttpError, Mode, OperatorRequestContext, RateLimitSource};
18pub use models::{
19    Approaching, ApproachingFeed, AutoState, AutoToggleRequest, AutoToggleResponse, Brief,
20    ComponentCounts, ComponentHealth, Evaluation, EvaluationLayer, ExecuteRequest, ExecuteResponse,
21    ExecuteSide, Health, HlRate, LiveCanaryPolicy, LiveCanaryPolicyPhase, LiveCanaryPolicySummary,
22    LiveCanaryRecommendation, LiveCockpit, LiveCockpitCertification, LiveCockpitHeartbeat,
23    LiveCockpitImmune, LiveCockpitPreflight, LiveCockpitReconciliation, LiveCockpitRecords,
24    LiveControlResponse, LiveEvidence, LiveEvidenceArtifact, LiveExecutionReceipt,
25    LiveExecutionReceipts, LivePreflight, LivePreflightCheck, OperatorContext, Position, Positions,
26    Pulse, PulseEvent, Regime, Rejection, RejectionsFeed, Risk, RiskSummary, Root, RuntimeParity,
27    RuntimeParityFeedback, RuntimeParityLiveShadow, RuntimeParityPaper, V2Confidence, V2Market,
28    V2Positions, V2Status, V2Today,
29};
30pub use poll::{BACKFILL_INTERVAL, EngineStatePoller, OperatorStatePoller, POLL_INTERVAL};
31pub use rate_budget::{
32    BudgetSnapshot, Clock, DEFAULT_CAPACITY, DEFAULT_REFILL_PER_SECOND, Exhausted, ManualClock,
33    RateBudget, SystemClock, cost_of,
34};
35pub use stat::{Source, Stat};
36pub use state::{ConnectionHealth, EngineState};
37pub use ws::{
38    EngineEvent, JitterMode, ReconnectConfig, WsError, WsSubscriber, apply_jitter, exp_backoff_cap,
39};