Skip to main content

Module models

Module models 

Source
Expand description

Typed response shapes mirrored from the engine’s FastAPI surface.

Each type is narrow on purpose. We deserialize only the fields the CLI actually renders; extra fields are tolerated via #[serde(flatten)] extra, so the engine can evolve without breaking us, and missing fields surface as Option::None.

Structs§

Approaching
A coin approaching an entry gate.
ApproachingFeed
GET /approaching envelope.
AutoToggleRequest
Request body for POST /auto/toggle. enabled = true asks the engine to enter Auto-mode (Plan-mode auto-accept); false asks it to fall back to operator-confirm. The engine may refuse; read the reply’s state to see what actually landed.
AutoToggleResponse
Response body for POST /auto/toggle.
Brief
GET /brief — the engine’s situational readout. Shape matches the real wire payload (see tests/fixtures/brief.json): a timestamp, a fear-greed reading, open positions + their snapshots, recent signals, coins approaching a gate, and the last macro cycle summary. The CLI renders a concise header line and optionally expands into the lists.
ComponentCounts
ComponentHealth
Evaluation
GET /evaluate/{coin} — the gate-level verdict for a single coin. The real engine returns a flat object with per-layer decisions (see tests/fixtures/evaluate_sol.json); this struct mirrors that exactly.
EvaluationLayer
One layer in an /evaluate/{coin} response. The engine emits a numbered list; each entry includes whether the layer passed, an arbitrary value payload (scalar or nested object), and a human-readable detail string that already summarizes the layer’s decision.
ExecuteRequest
Request body for POST /execute.
ExecuteResponse
Response body for POST /execute.
Health
Response shape of GET /health — unauthenticated.
HlRate
Hyperliquid API rate snapshot, optionally reported by the engine on /v2/status.
HyperliquidAccount
HyperliquidAccountPosition
HyperliquidReconciliation
HyperliquidReconciliationDrift
HyperliquidStatus
ImmuneBreaker
ImmuneReport
LiveCanaryPolicy
LiveCanaryPolicyPhase
LiveCanaryPolicySummary
LiveCanaryRecommendation
LiveCertification
LiveCertificationDrill
LiveCockpit
LiveCockpitCertification
LiveCockpitHeartbeat
LiveCockpitImmune
LiveCockpitPreflight
LiveCockpitReconciliation
LiveCockpitRecords
LiveControlResponse
Response body for live risk-reduction controls.
LiveEvidence
LiveEvidenceArtifact
LiveExecutionReceipt
LiveExecutionReceipts
LivePreflight
LivePreflightCheck
MarketQuote
OperatorContext
OperatorEventsAccepted
Response shape for POST /operator/events (ADR-016).
Position
A single open position.
Positions
GET /positions envelope. Engine returns a list, optionally wrapped in {positions: [...]} depending on handler version; we accept both.
Pulse
GET /pulse envelope.
PulseEvent
One entry in the engine’s pulse stream. Events are semi-free-form; the client only consumes kind, coin, message, ts.
RecoveryStatus
Runtime recovery state emitted by the paper engine after journal replay.
Regime
GET /regime — either per-coin or whole-market depending on query. The engine returns a loose shape with regime, confidence, and auxiliary fields; we capture the core and flatten the rest.
Rejection
A single rejection record.
RejectionsFeed
GET /rejections envelope.
Risk
GET /risk summary. Field names mirror the engine’s real wire shape (see engine/zero/api.py::get_risk and the risk.json fixture captured under tests/fixtures/).
RiskSummary
Root
Response shape of GET / — unauthenticated version probe.
RuntimeParity
RuntimeParityFeedback
RuntimeParityLiveShadow
RuntimeParityPaper
V2Confidence
Engine confidence sub-object on /v2/status.
V2Market
Market sub-object on /v2/status.
V2Positions
Positions sub-object on /v2/status.
V2Status
GET /v2/status — the condensed engine summary used by the status bar. Shape mirrors the live wire format (see tests/fixtures/v2_status.json): a nested object with confidence/market/positions/today sub-objects, plus two list fields the engine uses for signals and blind spots.
V2Today
Today-summary sub-object on /v2/status.

Enums§

AutoState
Wire representation of the engine’s Auto-mode state, mirrored from zero_commands::AutoState but narrow on purpose: the engine client speaks in its own vocabulary so a dispatcher refactor on the CLI side does not reshape the HTTP surface.
ExecuteSide
Direction of an /execute request. Wire format is the lowercase variant name via serde(rename_all = "lowercase"); see Self::as_wire for a stable string helper used by the doctor row + the (paper) suffix renderer.