Core Concepts
The shape of SNA's runtime. Server, session manager, runtimes, history.
SNA is a Hono HTTP/WebSocket server that owns a long-lived process per
session. The server is runtime-agnostic. Claude Code, Codex, and
OpenCode each implement a common AgentProvider interface, so a
single session can swap runtimes without losing context.
SnaClient
│ HTTP (request/response, ordering)
│ WS (live events, fanout)
▼
Hono server ──► SessionManager
│
├─ Session (per session id)
│ ├─ AgentProcess ◄── spawn(provider, cwd, ...)
│ ├─ Event buffer (in-memory, cursor-keyed)
│ └─ RuntimeSession chain (config history)
│
└─ Canonical history (SQLite)Read order
Philosophy
Design principles that guide SNA's runtime-neutral architecture.
Sessions
Lifecycle, RuntimeSession chain, PATCH semantics.
Canonical history
Flat blocks, runtime-native rebuild.
Runtimes
Runtime adapters, AgentProvider internals, and runtime pool.
Permissions
Unified permission flow across runtimes.
For the on-the-wire protocol details (HTTP routes, WebSocket ops, event types), see API Spec.