internal/

directory
v0.33.0 Latest Latest
Warning

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

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

Directories

Path Synopsis
Package acp is the inbound transport floor for the Agent Client Protocol (ACP, Zed-stewarded): line-delimited JSON-RPC 2.0 over an io.Reader (inbound) and io.Writer (outbound), plus a method dispatch table.
Package acp is the inbound transport floor for the Agent Client Protocol (ACP, Zed-stewarded): line-delimited JSON-RPC 2.0 over an io.Reader (inbound) and io.Writer (outbound), plus a method dispatch table.
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.
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.
selfcheck
Package selfcheck implements the verification that the per-agent tool-allowlist enforcement contract still refuses tools NOT in permissions.allow when claude is spawned headlessly on the stream-json surface with a per-spawn deny-default settings file.
Package selfcheck implements the verification that the per-agent tool-allowlist enforcement contract still refuses tools NOT in permissions.allow when claude is spawned headlessly on the stream-json surface with a per-spawn deny-default settings file.
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.
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.
trust
Package trust pre-answers, in ~/.claude.json, the startup gates a headless claude child cannot answer for itself: the workspace-trust gate, which interactive claude renders as a modal, and the approval that lets a CLAUDE.md `@` import resolving outside the session's working directory expand.
Package trust pre-answers, in ~/.claude.json, the startup gates a headless claude child cannot answer for itself: the workspace-trust gate, which interactive claude renders as a modal, and the approval that lets a CLAUDE.md `@` import resolving outside the session's working directory expand.
Package attachments holds one inbound attachment upload's chunks in memory while its attachment_chunk frames arrive, refuses a stream whose framing contradicts what the transfer declared, and yields the assembled bytes only once they match the size and the digest the transfer declared.
Package attachments holds one inbound attachment upload's chunks in memory while its attachment_chunk frames arrive, refuses a stream whose framing contradicts what the transfer declared, and yields the assembled bytes only once they match the size and the digest the transfer declared.
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.
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 codexsup drives `codex app-server` (target: Codex 0.156.1) over its stdio JSON-RPC connection: it starts the process, performs the handshake, and starts, resumes and interrupts turns on one Codex thread.
Package codexsup drives `codex app-server` (target: Codex 0.156.1) over its stdio JSON-RPC connection: it starts the process, performs the handshake, and starts, resumes and interrupts turns on one Codex thread.
Package config loads the on-disk Pyrycode configuration file.
Package config loads the on-disk Pyrycode configuration file.
Package contextwindow reports the active claude session's context-window occupancy from its resolved transcript, so a consumer (the screen_snapshot handler, and any future push path) can surface a "context window used" gauge without each consumer re-parsing the JSONL.
Package contextwindow reports the active claude session's context-window occupancy from its resolved transcript, so a consumer (the screen_snapshot handler, and any future push path) can surface a "context window used" gauge without each consumer re-parsing the JSONL.
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 debugbundle assembles a session's debug evidence — the most-recent terminal recording (when session capture was on) plus the recent daemon log ring — into a single in-memory tar+gzip archive with a content-free manifest.
Package debugbundle assembles a session's debug evidence — the most-recent terminal recording (when session capture was on) plus the recent daemon log ring — into a single in-memory tar+gzip archive with a content-free manifest.
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 routes a single inbound relay frame through a handler table.
Package dispatch routes a single inbound relay 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/fakecodex command
Command fakecodex is a test-only stand-in for `codex app-server` at Codex 0.156.1, the version pyrycode targets.
Command fakecodex is a test-only stand-in for `codex app-server` at Codex 0.156.1, the version pyrycode targets.
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).
internal/paireddevice
Package paireddevice seeds a valid phone credential in an isolated test home before an e2e daemon starts.
Package paireddevice seeds a valid phone credential in an isolated test home before an e2e daemon starts.
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.
Package history is the durable, append-only, per-conversation message log the daemon writes as it fans envelopes out, and the backward reader that serves a connecting client the messages that happened before it arrived.
Package history is the durable, append-only, per-conversation message log the daemon writes as it fans envelopes out, and the backward reader that serves a connecting client the messages that happened before it arrived.
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 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).
Package memorysearch reports search access for one selected agent and workspace.
Package memorysearch reports search access for one selected agent and workspace.
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.
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.
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).
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.
Package permbridge is an in-memory registry of pending tool-approval requests for the Streamrunner interactive permission bridge.
Package permbridge is an in-memory registry of pending tool-approval requests for the Streamrunner interactive permission bridge.
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 questionbridge recognises claude's clarifying-question tool call, parses its batch into the outbound wire payload, and records the surfaced batch under a one-time nonce it mints (Registry).
Package questionbridge recognises claude's clarifying-question tool call, parses its batch into the outbound wire payload, and records the surfaced batch under a one-time nonce it mints (Registry).
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().
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.
Package streamsup supervises a long-lived headless claude child in stream-json mode: it spawns claude with --input-format stream-json --output-format stream-json --verbose, holds the child's stdin open across many turns, restarts the child on crash with an exponential-backoff-with-stability-reset ladder, resumes with --resume <id> (reusing the same on-disk session id, no fork), and shuts down cleanly (SIGTERM → SIGKILL grace plus a reap of claude's detached descendant Bash process groups).
Package streamsup supervises a long-lived headless claude child in stream-json mode: it spawns claude with --input-format stream-json --output-format stream-json --verbose, holds the child's stdin open across many turns, restarts the child on crash with an exponential-backoff-with-stability-reset ladder, resumes with --resume <id> (reusing the same on-disk session id, no fork), and shuts down cleanly (SIGTERM → SIGKILL grace plus a reap of claude's detached descendant Bash process groups).
Package transcript owns probe-preferred resolution of claude's session transcripts (<uuid>.jsonl under ~/.claude/projects/<encoded-cwd>/) and the canonical UUID-stem / .jsonl constants.
Package transcript owns probe-preferred resolution of claude's session transcripts (<uuid>.jsonl under ~/.claude/projects/<encoded-cwd>/) and the canonical UUID-stem / .jsonl constants.
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 turnbridge adapts the neutral internal turn-event model (internal/turnevent, #606) OUT to the v2 interactive wire payloads (#607): MapEvent shapes one turnevent.Event into a typed payload, and BuildTurnState shapes the turn_state payload the lifecycle machine drives.
Package turnbridge adapts the neutral internal turn-event model (internal/turnevent, #606) OUT to the v2 interactive wire payloads (#607): MapEvent shapes one turnevent.Event into a typed payload, and BuildTurnState shapes the turn_state payload the lifecycle machine drives.
Package turncommit carries a "commit gate" alongside a delivery context.
Package turncommit carries a "commit gate" alongside a delivery context.
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).
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