Neutron design brief · draft for review

Orbit Server & the Steward Architecture

One resident daemon per machine, one control plane for all of them. Core authors everything — agents, policies, reflexes, credentials. The edge enforces and executes, and keeps working from a signed local cache when core is unreachable.

decided · cross-steward topology decided · one crate, two profiles decided · resident loop + synced cache open · see §8

1 · Principles

2 · Topology

Cross-steward: no machine is stewarded by an instance it hosts. The 2026-07-31 gondor outage took down the responder with the platform; this makes that impossible.

flowchart LR
  subgraph eda [machine · eda]
    OE[orbit-server]
    AE[(agenteda instance)]
  end
  subgraph gondor [machine · gondor]
    OG[orbit-server]
  end
  subgraph rentamac [machine · rentamac]
    OM[orbit-server · macOS headless]
  end
  NC[(neutroncore instance)]
  OE -- pair + link --> NC
  OG -- pair + link --> AE
  OM -- pair + link --> AE
  AE <-. constellation ask_peer .-> NC
  D[Discord · web · voice] --- AE
  D --- NC
  

Mac orbit-desktop and orbit-server share one crate: cargo features orbit-desktop (UI, voice, wake) and orbit-server (headless: exec, sentinels, reflexes). One pairing model, one link protocol, one release train — and orbit-server runs on any OS, including headless Macs.

3 · The daemon

flowchart TB
  subgraph daemon [orbit-server]
    LINK[link · outbound WebSocket]
    CACHE[signed artifact cache]
    LOOP[steward loop · minimal Rust agent loop]
    EXEC[exec · streaming, pty, async jobs]
    SEN[sentinels · local probes → events up]
    REF[reflexes · deterministic rules, no LLM]
    WAL[audit WAL · spools, ships up]
  end
  CORE[(steward instance)]
  CORE -- artifacts + leases --> CACHE
  CACHE --> LOOP & REF & SEN
  SEN -- events --> CORE
  LOOP --> EXEC
  REF --> EXEC
  EXEC --> WAL --> CORE
  LINK <--> CORE
  

The steward loop is a purpose-built minimal agent loop in Rust — not a port of the TS engine. It reads the cached persona and policy artifacts, calls the model through a leased credential, and drives local tools. Rich orchestration (teams, packs, controllers) stays core-side and reaches the machine through the same exec surface.

4 · Sync plane

DirectionArtifactNotes
core → edgeagent identity + personathe steward's system prompt, versioned
core → edgetool policy + command allowlistssame data core enforces; dual evaluators (TS + Rust)
core → edgereflex + sentinel rulesauthored and approved in core, pushed down
core → edgecredential leasesmodel API, git PAT — TTL-bound, auto-renewed
core → edgedevice token rotationthe pairing credential itself renews in-band
edge → coreaudit WALevery exec + reflex firing; survives partition
edge → coresentinel eventsstart agent turns via the existing headless-turn seam
edge → corehealth heartbeatsilence itself is an alert on the core side

Sync is push-on-change from core plus periodic pull from the edge; artifacts are signed so the daemon rejects anything not authored by its instance.

5 · Degraded-mode ladder

ConditionReasoningGated actionsReflexes
core reachablefull stewardapproval cards (Discord / web / voice)run
core down · internet upcached-policy loopdefer → queue, ping on reconnectrun
full partitionnone (model API unreachable)deferrun — the only thing that can

The ladder is the whole argument for this architecture: the July 31 outage sat in row three for thirty-five minutes with zero automated response. A reflex rule (nspawn unit failed + start-limit → clear stale registration, restart) closes that class in minute one.

6 · Governance

sequenceDiagram
  participant L as steward loop
  participant P as policy cache
  participant C as core (approvals)
  participant X as exec
  L->>P: evaluate(command)
  alt allowlisted
    P-->>L: allow
    L->>X: run
  else gated
    P-->>L: gate
    L->>C: approval card
    C-->>L: approve / deny / timeout=deny
    L->>X: run (if approved)
  end
  X->>C: audit record (via WAL)
  

7 · What the steward does all day

8 · Open questions

9 · Phasing — build order, no stopgaps

  1. Protocol + skeleton. orbit-server profile: pairing, link, signed artifact cache, exec frames, audit WAL. Core: device.exec action, artifact compiler, exec governance path. First stewarded machine: eda, paired to neutroncore.
  2. Steward loop + leases. Minimal Rust loop, model-credential leasing, degraded-mode rows one and two live. Generic webhook trigger in core; gondor's Alertmanager gains the neutron receiver alongside hermes.
  3. Sentinels + reflexes. Probe rules, event-triggered turns, the reflex engine with core-authored rules. Row three of the ladder closes.
  4. IR team pack + incident controller. Triage / diagnose / remediate / review as a controller (sibling of the coding-team controller), packaged like the dev-team pack. Hermes retires to a chat surface or is decommissioned.
  5. The doorway. Local-socket CLI onto the instance from any stewarded machine.