Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
pyry
command
Command pyry is the Pyrycode daemon — a process supervisor for Claude Code.
|
Command pyry is the Pyrycode daemon — a process supervisor for Claude Code. |
|
substrate-guard
command
Command substrate-guard fails the build if any claude-TUI substrate literal appears in pyrycode .go source outside an explicit allowlist.
|
Command substrate-guard fails the build if any claude-TUI substrate literal appears in pyrycode .go source outside an explicit allowlist. |
|
internal
|
|
|
agentrun
Package agentrun owns ResolveWorkdir, the filesystem-path canonicaliser used by internal/agentrun/trust to key into ~/.claude.json's projects map.
|
Package agentrun owns ResolveWorkdir, the filesystem-path canonicaliser used by internal/agentrun/trust to key into ~/.claude.json's projects map. |
|
agentrun/budget
Package budget enforces the pyry-side --max-turns cap for agent-run by counting assistant JSONL entries and signalling the claude child when the budget is reached.
|
Package budget enforces the pyry-side --max-turns cap for agent-run by counting assistant JSONL entries and signalling the claude child when the budget is reached. |
|
agentrun/jsonl
Package jsonl parses claude session JSONL output into structured events, surfacing every line (assistant, user, tool_use, tool_result, system, attachment, or unrecognised) with its verbatim bytes, alongside a deterministic end-of-turn signal on assistant entries.
|
Package jsonl parses claude session JSONL output into structured events, surfacing every line (assistant, user, tool_use, tool_result, system, attachment, or unrecognised) with its verbatim bytes, alongside a deterministic end-of-turn signal on assistant entries. |
|
agentrun/ptyrunner
Package ptyrunner spawns claude as an interactive TUI under a PTY (via github.com/pyrycode/tui-driver), waits for the TUI to reach idle, submits one user prompt through a bracketed-paste sequence, tails the per-session JSONL output, re-emits each event as stream-json on cfg.Stdout, and tears the session down cleanly after the deterministic end-of-turn fires.
|
Package ptyrunner spawns claude as an interactive TUI under a PTY (via github.com/pyrycode/tui-driver), waits for the TUI to reach idle, submits one user prompt through a bracketed-paste sequence, tails the per-session JSONL output, re-emits each event as stream-json on cfg.Stdout, and tears the session down cleanly after the deterministic end-of-turn fires. |
|
agentrun/selfcheck
Package selfcheck implements the boot-time verification that the per-agent tool-allowlist enforcement contract still refuses tools NOT in permissions.allow when claude is spawned as an interactive-TUI process under a PTY with a per-spawn deny-default settings file.
|
Package selfcheck implements the boot-time verification that the per-agent tool-allowlist enforcement contract still refuses tools NOT in permissions.allow when claude is spawned as an interactive-TUI process under a PTY with a per-spawn deny-default settings file. |
|
agentrun/settings
Package settings writes per-spawn deny-default permission JSON files for interactive claude spawned via PTY drive.
|
Package settings writes per-spawn deny-default permission JSON files for interactive claude spawned via PTY drive. |
|
agentrun/streamjson
Package streamjson re-emits the parsed claude session-JSONL entry stream onto a writer (typically pyry's stdout) and composes a single `type:"result"` trailer line when the run terminates.
|
Package streamjson re-emits the parsed claude session-JSONL entry stream onto a writer (typically pyry's stdout) and composes a single `type:"result"` trailer line when the run terminates. |
|
agentrun/streamrunner
Package streamrunner spawns claude with the stream-json input/output formats as a plain subprocess (no PTY), writes one user-turn JSON envelope to its stdin, forwards stdout/stderr to caller-supplied writers, and waits for the child to exit.
|
Package streamrunner spawns claude with the stream-json input/output formats as a plain subprocess (no PTY), writes one user-turn JSON envelope to its stdin, forwards stdout/stderr to caller-supplied writers, and waits for the child to exit. |
|
agentrun/trust
Package trust pre-marks a workdir as trusted in ~/.claude.json so interactive claude (spawned via PTY drive) skips the workspace-trust modal.
|
Package trust pre-marks a workdir as trusted in ~/.claude.json so interactive claude (spawned via PTY drive) skips the workspace-trust modal. |
|
audit
Package audit is the forensic sink for remote-permission decisions: it writes exactly one structured record per decision the modal control loop (#703) resolves — which device, which modal, what outcome, from where.
|
Package audit is the forensic sink for remote-permission decisions: it writes exactly one structured record per decision the modal control loop (#703) resolves — which device, which modal, what outcome, from where. |
|
brokenpyry
command
Package main is a deliberately-broken pyry stand-in for the TestUpdate_BrokenNewBinary_E2E test.
|
Package main is a deliberately-broken pyry stand-in for the TestUpdate_BrokenNewBinary_E2E test. |
|
config
Package config loads the on-disk Pyrycode configuration file.
|
Package config loads the on-disk Pyrycode configuration file. |
|
control
Package control implements pyry's local control plane: a Unix domain socket that lets clients (such as `pyry status`) query the running daemon.
|
Package control implements pyry's local control plane: a Unix domain socket that lets clients (such as `pyry status`) query the running daemon. |
|
conversations
Package conversations defines the Phase 3 Conversation entity: a long-lived thread that owns a sequence of underlying claude sessions and carries presentation metadata (name, promoted/unpromoted state).
|
Package conversations defines the Phase 3 Conversation entity: a long-lived thread that owns a sequence of underlying claude sessions and carries presentation metadata (name, promoted/unpromoted state). |
|
devices
Package devices defines the on-disk Device type and the token hashing/verification primitives used by `pyry pair` and the mobile auth path.
|
Package devices defines the on-disk Device type and the token hashing/verification primitives used by `pyry pair` and the mobile auth path. |
|
dispatch
Package dispatch demultiplexes inbound binary↔relay frames by RoutingEnvelope.ConnID and routes each frame through a handler table.
|
Package dispatch demultiplexes inbound binary↔relay frames by RoutingEnvelope.ConnID and routes each frame through a handler table. |
|
e2e/internal/fakeclaude
command
Command fakeclaude is a test-only stand-in for the real `claude` CLI used by Pyrycode's e2e harness.
|
Command fakeclaude is a test-only stand-in for the real `claude` CLI used by Pyrycode's e2e harness. |
|
e2e/internal/fakephone
Package fakephone is an in-process WebSocket client that speaks the phone half of the mobile↔relay protocol (docs/protocol-mobile.md § Authentication, § Message envelope).
|
Package fakephone is an in-process WebSocket client that speaks the phone half of the mobile↔relay protocol (docs/protocol-mobile.md § Authentication, § Message envelope). |
|
e2e/internal/fakerelay
Package fakerelay is an in-process WebSocket server that speaks the routing half of the mobile↔relay protocol (docs/protocol-mobile.md § Authentication, § Routing envelope).
|
Package fakerelay is an in-process WebSocket server that speaks the routing half of the mobile↔relay protocol (docs/protocol-mobile.md § Authentication, § Routing envelope). |
|
eventring
Package eventring is the in-memory, daemon-resident store of recent structured turn events that the mid-turn-reconnect replay path (#647) reads to catch a returning phone up without a gap.
|
Package eventring is the in-memory, daemon-resident store of recent structured turn events that the mid-turn-reconnect replay path (#647) reads to catch a returning phone up without a gap. |
|
identity
Package identity owns typed identifiers that span subsystems — server-id today; potential future device-id, paired-device-id — and the bootstrap of those identifiers from disk.
|
Package identity owns typed identifiers that span subsystems — server-id today; potential future device-id, paired-device-id — and the bootstrap of those identifiers from disk. |
|
install
Package install writes service-manager unit files (systemd, launchd) for pyry.
|
Package install writes service-manager unit files (systemd, launchd) for pyry. |
|
keys
Package keys owns the binary's persistent X25519 static keypair used by Mobile Protocol v2 (Noise_IK).
|
Package keys owns the binary's persistent X25519 static keypair used by Mobile Protocol v2 (Noise_IK). |
|
modalbridge
Package modalbridge turns a detected tui-driver permission/trust modal into a typed, phone-facing protocol.ModalShownPayload and records it in an outstanding-modal registry keyed by a one-time modal_id nonce.
|
Package modalbridge turns a detected tui-driver permission/trust modal into a typed, phone-facing protocol.ModalShownPayload and records it in an outstanding-modal registry keyed by a one-time modal_id nonce. |
|
msgqueue
Package msgqueue is the in-memory, daemon-resident inbound backlog for phone-originated send_message turns.
|
Package msgqueue is the in-memory, daemon-resident inbound backlog for phone-originated send_message turns. |
|
noise
Package noise wraps github.com/flynn/noise to expose a narrow, opinionated surface for the Noise_IK_25519_ChaChaPoly_BLAKE2s cipher suite used by Mobile Protocol v2 (see docs/protocol-mobile.md § End-to-end encryption and docs/knowledge/decisions/024-noise-ik-mobile-e2e.md).
|
Package noise wraps github.com/flynn/noise to expose a narrow, opinionated surface for the Noise_IK_25519_ChaChaPoly_BLAKE2s cipher suite used by Mobile Protocol v2 (see docs/protocol-mobile.md § End-to-end encryption and docs/knowledge/decisions/024-noise-ik-mobile-e2e.md). |
|
pair
Package pair encodes the {server, relay, token, server_static_pubkey} tuple a paired mobile device needs to connect through the relay back to this binary, and decodes strings produced by the same encoder.
|
Package pair encodes the {server, relay, token, server_static_pubkey} tuple a paired mobile device needs to connect through the relay back to this binary, and decodes strings produced by the same encoder. |
|
protocol
Package protocol declares the wire-format types for pyrycode's mobile WebSocket protocol v1.
|
Package protocol declares the wire-format types for pyrycode's mobile WebSocket protocol v1. |
|
relay
Package relay drives the binary's outbound long-lived connection to the relay: opens the WSS via internal/transport and exposes inbound frames as protocol.RoutingEnvelope values via Frames().
|
Package relay drives the binary's outbound long-lived connection to the relay: opens the WSS via internal/transport and exposes inbound frames as protocol.RoutingEnvelope values via Frames(). |
|
sessions
Package sessions owns the set of supervised claude instances managed by one pyry process.
|
Package sessions owns the set of supervised claude instances managed by one pyry process. |
|
sessions/rotation
Package rotation watches claude's session directory for /clear-style UUID rotations and notifies its host (internal/sessions) so the registry can follow claude to the new <uuid>.jsonl in real time.
|
Package rotation watches claude's session directory for /clear-style UUID rotations and notifies its host (internal/sessions) so the registry can follow claude to the new <uuid>.jsonl in real time. |
|
supervisor
Package supervisor runs Claude Code under process supervision: spawn in a PTY, stream I/O transparently to the controlling terminal, and restart the child with exponential backoff when it exits.
|
Package supervisor runs Claude Code under process supervision: spawn in a PTY, stream I/O transparently to the controlling terminal, and restart the child with exponential backoff when it exits. |
|
transport
Package transport provides a long-lived WSS client with automatic reconnect, exponential backoff with jitter, and native ping/pong heartbeat.
|
Package transport provides a long-lived WSS client with automatic reconnect, exponential backoff with jitter, and native ping/pong heartbeat. |
|
turnbridge
Package turnbridge drains the supervised claude session's unified tui-driver Events() stream and maps each event into the neutral internal turn-event model (internal/turnevent, #606).
|
Package turnbridge drains the supervised claude session's unified tui-driver Events() stream and maps each event into the neutral internal turn-event model (internal/turnevent, #606). |
|
turnevent
Package turnevent defines the neutral, daemon-owned outbound turn-event model for Phase 2 structured streaming (EPIC #596).
|
Package turnevent defines the neutral, daemon-owned outbound turn-event model for Phase 2 structured streaming (EPIC #596). |
|
update
Package update implements pyrycode's self-update logic: release manifest parsing, version comparison, fetch, and replace.
|
Package update implements pyrycode's self-update logic: release manifest parsing, version comparison, fetch, and replace. |
Click to show internal directories.
Click to hide internal directories.