spacedb-console
The operator's read-model.
The substance of an operations console is not pixels — it is the logic that turns raw fleet / access / audit / settlement observations into the four boards a SpaceDB business is actually run from. That logic lives here, native and fully testable; a Dioxus/WASM shell only binds it to a UI.
Part of SpaceDB. Dual-licensed MIT OR Apache-2.0.
[]
= "0.5"
The four boards
| Board | Type | Answers |
|---|---|---|
| Fleet Health | FleetHealth |
under-replicated / at-risk / lost shards, quorum loss, replica lag → one Green / Amber / Red rollup |
| Access & Audit | AccessOverview |
human vs AI-agent capabilities, upcoming expirations, revocations, per-agent activity, denials |
| Economics | Economics |
revenue, spend per customer, per-rail split, agent budget burn-down, unsettled claims |
| Alerts | Vec<Alert> |
the page-me surface, severity-sorted |
Usage
use ;
let observations = default; // fed from your live adapters
let now = 1_700_000_000;
let dash = assemble;
println!;
if dash.critical_count > 0
Each board also has a standalone entry point — assess_fleet, rollup_access,
rollup_economics, derive_alerts — so you can compute just the one you need.
AlertKind names exactly what went wrong: ShardLost, QuorumLost,
ShardAtRisk, ShardUnderReplicated, ShardOverReplicated, HomeOffline,
ReplicaLagHigh, AgentBudgetExhausted, AgentBudgetLow. AlertThresholds
and Config::expiry_window are operator-tunable.
Binding it to a UI
// in the Dioxus shell (compiles to wasm32; not part of the tested core):
let dash = assemble;
rsx!
Why observation DTOs
The console is fed Observations — plain HomeObs / ShardObs / StrongObs /
LagObs / CapabilityObs / AuditObs / SettledObs / AgentBudgetObs
structs — rather than reaching into live subsystems. That keeps the read-model
decoupled from every layer it reports on, and makes every board assertable from
a fixture. spacedb-sim emits the same DTOs, so you can
drive the dashboard from a simulated fleet.
Open-core boundary
Depends on spacedb-meter (for Resource) and serde.
No MATA crate.
Testing
The workspace defaults to wasm32; this crate is native. Test on your host
triple:
Suite: console.rs. The snapshot example prints a full assembled dashboard.
License
MIT OR Apache-2.0, at your option. See LICENSE-MIT and LICENSE-APACHE.