docs(system): remote frontends and fleet specs
e706e171b735570351e77684ac6d81a39087886c
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 8e1120d22c90
There are many coding harnesses - but this one is fast
e706e171b735570351e77684ac6d81a39087886c
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+95 / −0 text lines
new file mode 100644+46 / −0 text lines
---id: SMH-SPEC-FLET0001type: spectitle: "Fleet"---# Fleet## IntentMany smith hosts form one fleet: a frontend attaches to any peer and works, with machines, tools, and plugin instances multiplexed across hosts.## Membership and trustFleet membership is signed node admission; a peer trust tier sits beside project trust and plugin grants.Secure transport is node-key based; relays are infrastructure, self-hostable, never a required third party.## Session ownershipEvery session has a home daemon.The home owns the write path; single-writer law is preserved.Other peers replicate read-only or stream.Clients roam; ownership routes writes.Distributed merge is explicitly not attempted.## Sync scopeSessions and plugin sets sync across the fleet.Filesystems and environments are out of core scope; plugins handle them.Plugin generations are content-hashed and fleet-coherent: the same generation identity is valid on every peer.## Remote effectsEffect records carry executor and target attribution as additive fields.Remote effects keep durable intent, completion, three-state evidence, and causal chains.Cancellation reaches remote effects; a destroyed remote instance records `unknown`, never silently drops.Provider requests route only to hosts holding the needed credentials; secrets never cross the wire.## Acceptance criteria- A session opened on one peer completes its turns on that peer regardless of where clients attach.- Read-only replication on any peer reconstructs the full transcript.- A remote effect's record names executor and target with complete evidence.- A peer without credentials for a model is skipped by routing, not failed into.- Removing a peer from the fleet invalidates its admission without rekeying others.- Fleet operation requires no third-party service.new file mode 100644+49 / −0 text lines
---id: SMH-SPEC-RMTF0001type: spectitle: "Remote Frontends"---# Remote Frontends## IntentA detached smith serves any frontend — browser, attached TUI, editor, programmatic client — over one protocol.Remote access is safe by default; unauthenticated remote control of an agent is remote code execution and is treated as such.## ProtocolOne frontend protocol: `smith-ui` semantic intents plus a control channel (submit, abort, subscribe, queue).Transports are pluggable carriers — websocket, p2p stream, stdio — and never change the vocabulary.Degradation law applies per intent across every transport.Frontends are clients; the daemon owns sessions, credentials, and the agent loop.## DaemonThe daemon is a detached smith embedding the same core crates as every interface mode.It binds loopback by default.Off-loopback binding requires a pairing token: one bearer secret per daemon, presented by every connection, revoked by restart.Smith core contains no user management; richer authentication is plugin-contributed, gated by grants.## Topologies- Hub: many clients attach to one daemon; viewers and drivers share one running agent.- Roaming: one client switches between running daemons.- Fleet: many clients and many daemons act as one smith through session-home ownership (specified in the fleet spec).## Connection model- Connections authenticate with the pairing token before any control command.- Permissions are per connection: a connection is viewer or driver.- Every session event stream carries sequence numbers; reconnecting clients resume from last seen.- Per-connection backpressure follows the degradation law: progress drops, transcript persists.## Acceptance criteria- A daemon started with defaults is unreachable off-loopback.- Off-loopback daemons reject unauthenticated connections before any protocol processing.- A reconnecting client resumes a live turn from its last seen sequence without losing transcript entries.- Two attached clients see one coherent event stream; only a driver can submit or abort.- No credential material crosses any transport.- The same frontend works unchanged against websocket and p2p transports.