internal/

directory
v0.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT

Directories

Path Synopsis
Package accountcheck owns short-lived, private native checks in a dedicated re-exec process.
Package accountcheck owns short-lived, private native checks in a dedicated re-exec process.
Package accountconfig preserves the characterized subset of native launch configuration across account changes.
Package accountconfig preserves the characterized subset of native launch configuration across account changes.
Package accounts owns private native account profiles and their nonsecret registry.
Package accounts owns private native account profiles and their nonsecret registry.
Package accountusage reads subscription usage without starting a native CLI, refreshing OAuth credentials or making a model request.
Package accountusage reads subscription usage without starting a native CLI, refreshing OAuth credentials or making a model request.
Package adapter is the FROZEN anti-corruption boundary (Epic 9, T-1/T-5/T-6) between swarm's core (daemon/shim/wire/TUI) and the concrete agent CLIs it drives.
Package adapter is the FROZEN anti-corruption boundary (Epic 9, T-1/T-5/T-6) between swarm's core (daemon/shim/wire/TUI) and the concrete agent CLIs it drives.
agy
Package agy is the Antigravity CLI (agy) adapter (v1.1 CLI duo, issue agents-tracker-5gv, plan .claude/tmp/cli-duo-implementation-plan.md Phase D): a stateless, goroutine-safe strategy object over the `agy` CLI.
Package agy is the Antigravity CLI (agy) adapter (v1.1 CLI duo, issue agents-tracker-5gv, plan .claude/tmp/cli-duo-implementation-plan.md Phase D): a stateless, goroutine-safe strategy object over the `agy` CLI.
claude
Package claude is the Claude Code adapter (Epic 11, E11.2/E11.6/E11.8): a stateless, goroutine-safe strategy object over the `claude` CLI.
Package claude is the Claude Code adapter (Epic 11, E11.2/E11.6/E11.8): a stateless, goroutine-safe strategy object over the `claude` CLI.
codex
Package codex is the Codex adapter (Epic 11, E11.4/E11.6/E11.8): a stateless, goroutine-safe strategy object over the `codex` CLI.
Package codex is the Codex adapter (Epic 11, E11.4/E11.6/E11.8): a stateless, goroutine-safe strategy object over the `codex` CLI.
detect
Package detect is the host-I/O side of adapter detection (E9.1 / E9.2).
Package detect is the host-I/O side of adapter detection (E9.1 / E9.2).
fixtureio
Package fixtureio is the DISK side of the fixture corpus (E9.2 / E9.4).
Package fixtureio is the DISK side of the fixture corpus (E9.2 / E9.4).
hermes
Package hermes implements Swarm's pure adapter strategy for the NousResearch Hermes Agent classic CLI.
Package hermes implements Swarm's pure adapter strategy for the NousResearch Hermes Agent classic CLI.
opencode
Package opencode is the opencode adapter (Phase E, R-E1..R-E8): a stateless, goroutine-safe strategy object over the `opencode` CLI.
Package opencode is the opencode adapter (Phase E, R-E1..R-E8): a stateless, goroutine-safe strategy object over the `opencode` CLI.
refadapter
Package refadapter is the fixture-only REFERENCE ADAPTER (E9.5 / T-5).
Package refadapter is the fixture-only REFERENCE ADAPTER (E9.5 / T-5).
registry
Package registry is the Epic 11 adapter registry: the single table mapping a stable agent name ("agy" / "claude" / "codex" / "hermes" / "opencode" / "reference") to the constructor that builds that adapter.Adapter.
Package registry is the Epic 11 adapter registry: the single table mapping a stable agent name ("agy" / "claude" / "codex" / "hermes" / "opencode" / "reference") to the constructor that builds that adapter.Adapter.
Package appserver is the DAEMON-OWNED JSON-RPC client for `codex app-server --listen unix://PATH` (Wave R7, Mirror M4.2/M4.3; ADR-013 §R7.2d).
Package appserver is the DAEMON-OWNED JSON-RPC client for `codex app-server --listen unix://PATH` (Wave R7, Mirror M4.2/M4.3; ADR-013 §R7.2d).
Package attach is the Epic 8 PART A raw attach passthrough (E8.1-E8.5): the client-side loop that puts the controlling terminal in raw mode, paints the one snapshot (S10), then streams live frames straight to the terminal while forwarding keystrokes and resizes to the session — and ALWAYS gives the terminal back (on detach, session end, panic, and SIGINT/SIGTERM/SIGHUP).
Package attach is the Epic 8 PART A raw attach passthrough (E8.1-E8.5): the client-side loop that puts the controlling terminal in raw mode, paints the one snapshot (S10), then streams live frames straight to the terminal while forwarding keystrokes and resizes to the session — and ALWAYS gives the terminal back (on detach, session end, panic, and SIGINT/SIGTERM/SIGHUP).
Package codexstock recognizes only the pinned native-generated Codex skills tree.
Package codexstock recognizes only the pinned native-generated Codex skills tree.
Package contextguard contains the provider-independent, side-effect-free policy for ContextGuard auto-compaction.
Package contextguard contains the provider-independent, side-effect-free policy for ContextGuard auto-compaction.
Package converge decides, and then performs, `swarm daemon restart --unattended`: the nightly step that moves the RUNNING daemon and gateway onto the binary Homebrew has already installed (docs/specifications/auto-upgrade-plan.md revision 5, section 3, layer L2).
Package converge decides, and then performs, `swarm daemon restart --unattended`: the nightly step that moves the RUNNING daemon and gateway onto the binary Homebrew has already installed (docs/specifications/auto-upgrade-plan.md revision 5, section 3, layer L2).
Package daemon is the Epic 5 daemon core: the lifecycle authority that can die (kill -9) and come back without losing any agent (S1).
Package daemon is the Epic 5 daemon core: the lifecycle authority that can die (kill -9) and come back without losing any agent (S1).
PB-TOK-7: the colours this product COMPUTES rather than declares.
PB-TOK-7: the colours this product COMPUTES rather than declares.
Package engine is the Epic 10 status-detection engine: the single, CLI-agnostic authority that turns raw session signals into a session's authenticated, fresh, never-confidently-wrong status.
Package engine is the Epic 10 status-detection engine: the single, CLI-agnostic authority that turns raw session signals into a session's authenticated, fresh, never-confidently-wrong status.
Package enrollment owns detached, owner-local native login workers.
Package enrollment owns detached, owner-local native login workers.
Package hookclient is the Epic 10 hook transport (E10.1, G4): the thin poster that `swarm hook <event>` uses to send an authenticated status callback to the daemon socket, plus the daemon-side Decode that reverses it.
Package hookclient is the Epic 10 hook transport (E10.1, G4): the thin poster that `swarm hook <event>` uses to send an authenticated status callback to the daemon socket, plus the daemon-side Decode that reverses it.
Package idempotency is the daemon's two-phase durable idempotency store (ADR-007 D6, plan R-IDP, amendment D.0-A3): a crash-safe `prepared -> executing -> completed/failed` request record keyed by operation_id, fsync'd BEFORE the side effect, so a duplicate request replays the cached outcome and executes nothing, and a crash between the side effect and the commit never double-executes.
Package idempotency is the daemon's two-phase durable idempotency store (ADR-007 D6, plan R-IDP, amendment D.0-A3): a crash-safe `prepared -> executing -> completed/failed` request record keyed by operation_id, fsync'd BEFORE the side effect, so a duplicate request replays the cached outcome and executes nothing, and a crash between the side effect and the commit never double-executes.
Package journal is the daemon-owned durable event journal (ADR-007 D6, plan R-JRN): a single daemon-wide append-only log of versioned records (schema_version, monotonic cursor, ts, session_id, type, payload) under <stateDir>/journal/, written at the daemon's saveMetaLocked choke point (A7).
Package journal is the daemon-owned durable event journal (ADR-007 D6, plan R-JRN): a single daemon-wide append-only log of versioned records (schema_version, monotonic cursor, ts, session_id, type, payload) under <stateDir>/journal/, written at the daemon's saveMetaLocked choke point (A7).
Package persist is the durable source of truth for session state (ADR-003): one meta.json per session under <root>/<id>/, written atomically so a crash mid-write is observed as old-or-new and never torn, and so a single corrupt session file never prevents scanning the rest.
Package persist is the durable source of truth for session state (ADR-003): one meta.json per session under <root>/<id>/, written atomically so a crash mid-write is observed as old-or-new and never torn, and so a single corrupt session file never prevents scanning the rest.
Package phonecore is the gomobile-ready phone-side client logic for remote control (R-PHC): pairing, transport, command signing, and consuming the daemon journal -- all in Go, tested against itself on the build machine (ADR-007 D12).
Package phonecore is the gomobile-ready phone-side client logic for remote control (R-PHC): pairing, transport, command signing, and consuming the daemon journal -- all in Go, tested against itself on the build machine (ADR-007 D12).
Package phonesim is a simulated phone that drives the REAL phonecore over a REAL relay, with no mobile app in the loop.
Package phonesim is a simulated phone that drives the REAL phonecore over a REAL relay, with no mobile app in the loop.
Package play uploads an Android App Bundle to Google Play through the Publishing API v3 (edits -> upload -> track -> commit), using only the standard library.
Package play uploads an Android App Bundle to Google Play through the Publishing API v3 (edits -> upload -> track -> commit), using only the standard library.
Package processcontain contains only the descendants of a dedicated owner process.
Package processcontain contains only the descendants of a dedicated owner process.
Package procstart is the process-creation-time identity token shared by the daemon (which matches a shim by (pid, start-time), S3/D-4) and the shim (which records the same pair for its backend so a RESTARTED daemon can tell a live app-server from an unrelated process that inherited a recycled pid, ADR-013 §R7.2c).
Package procstart is the process-creation-time identity token shared by the daemon (which matches a shim by (pid, start-time), S3/D-4) and the shim (which records the same pair for its backend so a RESTARTED daemon can tell a live app-server from an unrelated process that inherited a recycled pid, ADR-013 §R7.2c).
Package protocol is the Epic 6 client<->daemon control surface (ADR-002): a versioned, capability-negotiated RPC (JSON control ops in wire.TControl frames) plus a data plane (wire.TDataIn/TDataOut/TSnapshot binary frames), layered over the shared G1 frame envelope (internal/wire).
Package protocol is the Epic 6 client<->daemon control surface (ADR-002): a versioned, capability-negotiated RPC (JSON control ops in wire.TControl frames) plus a data plane (wire.TDataIn/TDataOut/TSnapshot binary frames), layered over the shared G1 frame envelope (internal/wire).
schema
Package schema holds the daemon-free wire message types of the client<->daemon control surface: the Control envelope, its payload types, and the canonical remote-command tuple a phone signs (remote.go).
Package schema holds the daemon-free wire message types of the client<->daemon control surface: the Control envelope, its payload types, and the canonical remote-command tuple a phone signs (remote.go).
Package pushgw implements the Swarm push gateway HTTP service specified by docs/specifications/push-gateway-api.md ("the spec") and ADR-015 (WakeV1, the capability model): registration, token rotation, address allocation, wake submission and revocation, each behind the auth, quota, retention and error-vocabulary rules the spec sections cited throughout this package's files require.
Package pushgw implements the Swarm push gateway HTTP service specified by docs/specifications/push-gateway-api.md ("the spec") and ADR-015 (WakeV1, the capability model): registration, token rotation, address allocation, wake submission and revocation, each behind the auth, quota, retention and error-vocabulary rules the spec sections cited throughout this package's files require.
Package pushreg owns the registration transcripts shared by the phone and push gateway.
Package pushreg owns the registration transcripts shared by the phone and push gateway.
remote
crypto
Package crypto is the remote-control cryptographic foundation (ADR-007 D2/D3/D4; implementation-plan R-CRY.1-.16, R-PAIR.4).
Package crypto is the remote-control cryptographic foundation (ADR-007 D2/D3/D4; implementation-plan R-CRY.1-.16, R-PAIR.4).
device
Package device is the daemon-side durable registry of paired remote-control devices (R-DEV.1).
Package device is the daemon-side durable registry of paired remote-control devices (R-DEV.1).
enroll
Package enroll is the machine-side enrollment keystone: it turns an affirmatively-confirmed pairing outcome (internal/remote/pairing) into the two durable artifacts the runnable remote stack needs.
Package enroll is the machine-side enrollment keystone: it turns an affirmatively-confirmed pairing outcome (internal/remote/pairing) into the two durable artifacts the runnable remote stack needs.
grant
Package grant persists and transports the initial sealed EpochGrant that bootstraps a freshly paired device's E2EE session (ADR-007 amendment 2026-07-24, decision C5).
Package grant persists and transports the initial sealed EpochGrant that bootstraps a freshly paired device's E2EE session (ADR-007 amendment 2026-07-24, decision C5).
grantwire
Package grantwire is the WIRE half of the epoch-grant bootstrap: the tagged plaintext frame the gateway appends to a device mailbox, and its parser.
Package grantwire is the WIRE half of the epoch-grant bootstrap: the tagged plaintext frame the gateway appends to a device mailbox, and its parser.
machineid
Package machineid implements the machine's pairing identity bundle (A4-1a): the Noise-static/recipient X25519 keys, the grant-signing and relay-auth Ed25519 keypairs, epoch keys, epoch id, grant seq, hostname, and routing id that `swarm remote init` persists and internal/skeleton's pairingConfig consumes.
Package machineid implements the machine's pairing identity bundle (A4-1a): the Noise-static/recipient X25519 keys, the grant-signing and relay-auth Ed25519 keypairs, epoch keys, epoch id, grant seq, hostname, and routing id that `swarm remote init` persists and internal/skeleton's pairingConfig consumes.
pairing
Package pairing orchestrates the swarm remote-control device<->machine pairing slice (R-PAIR.1-.9).
Package pairing orchestrates the swarm remote-control device<->machine pairing slice (R-PAIR.1-.9).
push
Package push implements the FCM v1 sender (PB-PUSH-2): it turns a generic alert plus an opaque ciphertext envelope into an HTTP/2 request Google's messaging API accepts, and turns Google's answers back into the two verdicts the relay acts on — retry, or prune this token.
Package push implements the FCM v1 sender (PB-PUSH-2): it turns a generic alert plus an opaque ciphertext envelope into an HTTP/2 request Google's messaging API accepts, and turns Google's answers back into the two verdicts the relay acts on — retry, or prune this token.
qrterm
Package qrterm renders a payload string as a scannable QR symbol for a terminal (PB-PAIR-1).
Package qrterm renders a payload string as a scannable QR symbol for a terminal (PB-PAIR-1).
relay
Package relay owns transport security, relay error identities, and reconnect policy shared by the current relay-v2 clients.
Package relay owns transport security, relay error identities, and reconnect policy shared by the current relay-v2 clients.
relaycfg
Package relaycfg owns <stateDir>/remote/relay.json: the relay a machine is provisioned against, and the optional certificate pin it verifies that relay with.
Package relaycfg owns <stateDir>/remote/relay.json: the relay a machine is provisioned against, and the optional certificate pin it verifies that relay with.
relayhome
Package relayhome owns the canonical inputs to a relay-v2 machine home.
Package relayhome owns the canonical inputs to a relay-v2 machine home.
relaypurge
Package relaypurge is the durable half of ADR-007 D9's deferred relay purge: "an offline-at-revoke machine defers the purge to reconnect".
Package relaypurge is the durable half of ADR-007 D9's deferred relay purge: "an offline-at-revoke machine defers the purge to reconnect".
relayv2
Package relayv2 is the native websocket client for the bounded relay-v2 Worker.
Package relayv2 is the native websocket client for the bounded relay-v2 Worker.
supervise
Package supervise generates the swarm-remote gateway's supervision unit and installs it through the owner-invoked CLI.
Package supervise generates the swarm-remote gateway's supervision unit and installs it through the owner-invoked CLI.
transport
Package transport owns the relay-v2 inbound ACK batcher.
Package transport owns the relay-v2 inbound ACK batcher.
Package remotegw is the supervised gateway sidecar (R-GW): a standalone process that dials the daemon's dedicated remote-tier socket (R-GW.8) and, later, the untrusted relay, bridging the daemon's journal/events and the phone's commands.
Package remotegw is the supervised gateway sidecar (R-GW): a standalone process that dials the daemon's dedicated remote-tier socket (R-GW.8) and, later, the untrusted relay, bridging the daemon's journal/events and the phone's commands.
Package shim is the Epic 4 shim engine: the per-session process that owns the PTY, execs the agent in its own process group from an argv array + captured env, serves the per-session UDS (G2 message set), pipes PTY bytes into the VT emulator + transcript, and — surviving the daemon indefinitely — always drains the PTY, then on agent exit writes the final snapshot + exit side-file (G3).
Package shim is the Epic 4 shim engine: the per-session process that owns the PTY, execs the agent in its own process group from an argv array + captured env, serves the per-session UDS (G2 message set), pipes PTY bytes into the VT emulator + transcript, and — surviving the daemon indefinitely — always drains the PTY, then on agent exit writes the final snapshot + exit side-file (G3).
Package shimwire is the G2 daemon<->shim message set (build-plan.md gap resolution G2): the JSON control payloads carried inside wire.TControl frames on the per-session shim socket.
Package shimwire is the G2 daemon<->shim message set (build-plan.md gap resolution G2): the JSON control payloads carried inside wire.TControl frames on the per-session shim socket.
Package skeleton is the Epic 8 daemon ASSEMBLY: the wiring that turns the three independently-built layers into the running walking skeleton (GG-1).
Package skeleton is the Epic 8 daemon ASSEMBLY: the wiring that turns the three independently-built layers into the running walking skeleton (GG-1).
Package smoke holds the Epic 14 real-CLI smoke / characterization harness (Epic 11 deferrals D1/D2, bead agents-tracker-54z VERIFY list).
Package smoke holds the Epic 14 real-CLI smoke / characterization harness (Epic 11 deferrals D1/D2, bead agents-tracker-54z VERIFY list).
Package status defines the session status model shared by every package that observes or reports on agent sessions: three orthogonal dimensions (process, turn, interaction) and the derivation of a single display Group from them.
Package status defines the session status model shared by every package that observes or reports on agent sessions: three orthogonal dimensions (process, turn, interaction) and the derivation of a single display Group from them.
Package submitframe is the shared submit-boundary framing rule (bead agents-tracker-abyz, ADR-010 Amendment 1 A2): how input bytes are cut into PTY writes so a CLI reads a submit as a submit, and how far a submit is held off the text before it.
Package submitframe is the shared submit-boundary framing rule (bead agents-tracker-abyz, ADR-010 Amendment 1 A2): how input bytes are cut into PTY writes so a CLI reads a submit as a submit, and how far a submit is held off the text before it.
Package testbin builds the swarm and swarm-fake-agent binaries once per test binary run, shared by the skeleton, protocol, and e2e integration suites that each need a real subprocess to shim/agent against.
Package testbin builds the swarm and swarm-fake-agent binaries once per test binary run, shared by the skeleton, protocol, and e2e integration suites that each need a real subprocess to shim/agent against.
Package transcript provides nonblocking output writers (S9).
Package transcript provides nonblocking output writers (S9).
Package tui is the Epic 7 client-side terminal UI: a screen router that hosts the general view (grouped session board), the launch, handoff and options forms, and an attach placeholder (attach passthrough is Epic 8).
Package tui is the Epic 7 client-side terminal UI: a screen router that hosts the general view (grouped session board), the launch, handoff and options forms, and an attach placeholder (attach passthrough is Epic 8).
Package upgrade is the update transaction (lifecycle plan R2): resolve the latest release, decide whether this install may act, download, verify, and STAGE -- never activate.
Package upgrade is the update transaction (lifecycle plan R2): resolve the latest release, decide whether this install may act, download, verify, and STAGE -- never activate.
Package version holds the build-time version identity stamped into the swarm binary.
Package version holds the build-time version identity stamped into the swarm binary.
Package vt is the Epic 2 in-shim terminal emulator: a thin wrapper around github.com/charmbracelet/x/vt (ADR-005) that feeds raw PTY bytes into a grid and serializes the visible screen to a versioned, hostile-escape-free snapshot.
Package vt is the Epic 2 in-shim terminal emulator: a thin wrapper around github.com/charmbracelet/x/vt (ADR-005) that feeds raw PTY bytes into a grid and serializes the visible screen to a versioned, hostile-escape-free snapshot.
Package wire is the shared G1 frame envelope (build-plan.md gap resolution G1): one length-prefixed, type-tagged frame carries every message on both the client<->daemon and daemon<->shim sockets.
Package wire is the shared G1 frame envelope (build-plan.md gap resolution G1): one length-prefixed, type-tagged frame carries every message on both the client<->daemon and daemon<->shim sockets.
Package worktree implements Epic 12's launch-time isolation (S-3/R-3): Create prepares an isolated git worktree + branch for a session and Remove tears it down.
Package worktree implements Epic 12's launch-time isolation (S-3/R-3): Create prepares an isolated git worktree + branch for a session and Remove tears it down.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL