repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

docs(system): remote frontends and fleet specs

e706e171b735570351e77684ac6d81a39087886c

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (2)

+95 / −0 text lines

Diff layout

.system/specs/SMH-SPEC-FLET0001-fleet/index.md

Added
new file mode 100644

+46 / −0 text lines

1---
2id: SMH-SPEC-FLET0001
3type: spec
4title: "Fleet"
5---
6
7# Fleet
8
9## Intent
11Many smith hosts form one fleet: a frontend attaches to any peer and works, with machines, tools, and plugin instances multiplexed across hosts.
13## Membership and trust
15Fleet membership is signed node admission; a peer trust tier sits beside project trust and plugin grants.
16Secure transport is node-key based; relays are infrastructure, self-hostable, never a required third party.
18## Session ownership
20Every session has a home daemon.
21The home owns the write path; single-writer law is preserved.
22Other peers replicate read-only or stream.
23Clients roam; ownership routes writes.
24Distributed merge is explicitly not attempted.
26## Sync scope
28Sessions and plugin sets sync across the fleet.
29Filesystems and environments are out of core scope; plugins handle them.
30Plugin generations are content-hashed and fleet-coherent: the same generation identity is valid on every peer.
32## Remote effects
34Effect records carry executor and target attribution as additive fields.
35Remote effects keep durable intent, completion, three-state evidence, and causal chains.
36Cancellation reaches remote effects; a destroyed remote instance records `unknown`, never silently drops.
37Provider requests route only to hosts holding the needed credentials; secrets never cross the wire.
39## Acceptance criteria
41- A session opened on one peer completes its turns on that peer regardless of where clients attach.
42- Read-only replication on any peer reconstructs the full transcript.
43- A remote effect's record names executor and target with complete evidence.
44- A peer without credentials for a model is skipped by routing, not failed into.
45- Removing a peer from the fleet invalidates its admission without rekeying others.
46- Fleet operation requires no third-party service.

.system/specs/SMH-SPEC-RMTF0001-remote-frontends/index.md

Added
new file mode 100644

+49 / −0 text lines

1---
2id: SMH-SPEC-RMTF0001
3type: spec
4title: "Remote Frontends"
5---
6
7# Remote Frontends
8
9## Intent
11A detached smith serves any frontend — browser, attached TUI, editor, programmatic client — over one protocol.
12Remote access is safe by default; unauthenticated remote control of an agent is remote code execution and is treated as such.
14## Protocol
16One frontend protocol: `smith-ui` semantic intents plus a control channel (submit, abort, subscribe, queue).
17Transports are pluggable carriers — websocket, p2p stream, stdio — and never change the vocabulary.
18Degradation law applies per intent across every transport.
20Frontends are clients; the daemon owns sessions, credentials, and the agent loop.
22## Daemon
24The daemon is a detached smith embedding the same core crates as every interface mode.
25It binds loopback by default.
26Off-loopback binding requires a pairing token: one bearer secret per daemon, presented by every connection, revoked by restart.
27Smith core contains no user management; richer authentication is plugin-contributed, gated by grants.
29## Topologies
31- Hub: many clients attach to one daemon; viewers and drivers share one running agent.
32- Roaming: one client switches between running daemons.
33- Fleet: many clients and many daemons act as one smith through session-home ownership (specified in the fleet spec).
35## Connection model
37- Connections authenticate with the pairing token before any control command.
38- Permissions are per connection: a connection is viewer or driver.
39- Every session event stream carries sequence numbers; reconnecting clients resume from last seen.
40- Per-connection backpressure follows the degradation law: progress drops, transcript persists.
42## Acceptance criteria
44- A daemon started with defaults is unreachable off-loopback.
45- Off-loopback daemons reject unauthenticated connections before any protocol processing.
46- A reconnecting client resumes a live turn from its last seen sequence without losing transcript entries.
47- Two attached clients see one coherent event stream; only a driver can submit or abort.
48- No credential material crosses any transport.
49- The same frontend works unchanged against websocket and p2p transports.