internal/

directory
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT

Directories

Path Synopsis
Package agentrun provides workdir-encoding helpers used by the JSONL session-file watcher (#349) to locate claude's per-session output under ~/.claude/projects/<encoded-cwd>/.
Package agentrun provides workdir-encoding helpers used by the JSONL session-file watcher (#349) to locate claude's per-session output under ~/.claude/projects/<encoded-cwd>/.
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.
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.
jsonl/tail
Package tail watches ~/.claude/projects/<encoded-cwd>/<sid>.jsonl for claude's per-session JSONL output, opens the file as it appears, and feeds appended bytes into a jsonl.Reader until the deterministic end-of-turn signal fires or the caller cancels.
Package tail watches ~/.claude/projects/<encoded-cwd>/<sid>.jsonl for claude's per-session JSONL output, opens the file as it appears, and feeds appended bytes into a jsonl.Reader until the deterministic end-of-turn signal fires or the caller cancels.
selfcheck
Package selfcheck implements the boot-time verification that the per-agent tool-allowlist enforcement contract still refuses Bash when claude is spawned with `--allowed-tools "Read" --dangerously-skip-permissions` in stream-json mode and asked for Bash.
Package selfcheck implements the boot-time verification that the per-agent tool-allowlist enforcement contract still refuses Bash when claude is spawned with `--allowed-tools "Read" --dangerously-skip-permissions` in stream-json mode and asked for Bash.
streamjson
Package streamjson re-emits the parsed claude session-JSONL Event 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 Event stream onto a writer (typically pyry's stdout) and composes a single `type:"result"` trailer line when the run terminates.
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.
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.
Package config loads the on-disk Pyrycode configuration file.
Package config loads the on-disk Pyrycode configuration file.
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.
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).
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.
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.
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).
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).
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.
Package install writes service-manager unit files (systemd, launchd) for pyry.
Package install writes service-manager unit files (systemd, launchd) for pyry.
Package pair encodes the {server, relay, token} 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} tuple a paired mobile device needs to connect through the relay back to this binary, and decodes strings produced by the same encoder.
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.
Package relay drives the binary's outbound long-lived connection to the relay: opens the WSS via internal/transport, runs the one-shot hello/hello_ack handshake on every fresh conn, 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, runs the one-shot hello/hello_ack handshake on every fresh conn, and exposes inbound frames as protocol.RoutingEnvelope values via Frames().
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.
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.
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.
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.
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.

Jump to

Keyboard shortcuts

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