internal/

directory
v0.154.1 Latest Latest
Warning

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

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

Directories

Path Synopsis
acp
Package acp implements a minimal Agent Client Protocol (ACP) client: gofer spawns an ACP agent as a child process and drives one prompt turn over its stdio (JSON-RPC 2.0, one message per line).
Package acp implements a minimal Agent Client Protocol (ACP) client: gofer spawns an ACP agent as a child process and drives one prompt turn over its stdio (JSON-RPC 2.0, one message per line).
acptest
Package acptest provides an in-repo fake ACP agent: a scripted JSON-RPC 2.0 stdio server used as a test double for internal/acp and internal/runner/acp.
Package acptest provides an in-repo fake ACP agent: a scripted JSON-RPC 2.0 stdio server used as a test double for internal/acp and internal/runner/acp.
Package agent provides the agent registry, command-template rendering, the adapter that turns a job request into an executable argv, and a detect probe.
Package agent provides the agent registry, command-template rendering, the adapter that turns a job request into an executable argv, and a detect probe.
Package answerguard is the派生作答白名单闸 (监督分层升级路由 P3.1, design §8.5/§10).
Package answerguard is the派生作答白名单闸 (监督分层升级路由 P3.1, design §8.5/§10).
Package bdmigrate moves a repository from bd (beads) to the gofer tracker: issues and memories, the managed instruction blocks, the agent hooks and core.hooksPath.
Package bdmigrate moves a repository from bd (beads) to the gofer tracker: issues and memories, the managed instruction blocks, the agent hooks and core.hooksPath.
Package brief assembles the handoff brief (接手包, design 2026-10-10-handoff-brief-and-knowledge-loop §一): everything a fresh agent session needs to take over an issue or a plan, in one bounded text.
Package brief assembles the handoff brief (接手包, design 2026-10-10-handoff-brief-and-knowledge-loop §一): everything a fresh agent session needs to take over an issue or a plan, in one bounded text.
Package castrec records a pty relay's output stream as an asciinema v2 "cast" file, optionally wrapped in a framed AES-256-GCM envelope (D-P3-4).
Package castrec records a pty relay's output stream as an asciinema v2 "cast" file, optionally wrapped in a framed AES-256-GCM envelope (D-P3-4).
Package certutil creates the local CA and server certificate used by gofer's optional HTTPS listener.
Package certutil creates the local CA and server certificate used by gofer's optional HTTPS listener.
Package client is a thin HTTP client for the gofer control plane.
Package client is a thin HTTP client for the gofer control plane.
Package config defines the gofer configuration model and the loader/writer that resolve, decode, default and persist it.
Package config defines the gofer configuration model and the loader/writer that resolve, decode, default and persist it.
Package configlint finds config keys that can be deleted without changing what gofer actually runs with (`gofer config lint`, gofer-arsj).
Package configlint finds config keys that can be deleted without changing what gofer actually runs with (`gofer config lint`, gofer-arsj).
Package daemon turns a foreground gofer process (serve / worker) into a detached background process.
Package daemon turns a foreground gofer process (serve / worker) into a detached background process.
Package delivery hands a worktree job's branch over (GIT-02, design 2026-10-12-delivery-and-cost-estimate-design.md): merge it into the base branch, push it to a remote, or push it and open a pull / merge request on GitHub, GitLab or Gitea / Forgejo.
Package delivery hands a worktree job's branch over (GIT-02, design 2026-10-12-delivery-and-cost-estimate-design.md): merge it into the base branch, push it to a remote, or push it and open a pull / merge request on GitHub, GitLab or Gitea / Forgejo.
Package focusremote gathers the server-side part of the tracker prime 「当前重点」 section (the server version, the workers serving this project and its open plans).
Package focusremote gathers the server-side part of the tracker prime 「当前重点」 section (the server version, the workers serving this project and its open plans).
Package hookrelay is the agent-CLI hook executor behind `gofer hook <agent>` (session relay, SESS-01 D1/D5).
Package hookrelay is the agent-CLI hook executor behind `gofer hook <agent>` (session relay, SESS-01 D1/D5).
Package httpapi exposes the gofer control plane over HTTP using github.com/gookit/rux/v2.
Package httpapi exposes the gofer control plane over HTTP using github.com/gookit/rux/v2.
job
Package job is the async job state machine: it accepts a JobRequest, resolves the agent+cwd, runs it on a runner in a background goroutine, streams logs to the store and tracks status/timeout/cancel.
Package job is the async job state machine: it accepts a JobRequest, resolves the agent+cwd, runs it on a runner in a background goroutine, streams logs to the store and tracks status/timeout/cancel.
Package jobstore is the SQLite-backed metadata/index store for gofer jobs.
Package jobstore is the SQLite-backed metadata/index store for gofer jobs.
Package logx configures the process-wide structured logger (slog) for gofer.
Package logx configures the process-wide structured logger (slog) for gofer.
Package mcpprobe checks that a registry MCP server (MCP-06) can be reached from this machine: it starts (stdio) or connects to (http) the server with the declaration's environment and headers, performs the MCP handshake and lists the tools.
Package mcpprobe checks that a registry MCP server (MCP-06) can be reached from this machine: it starts (stdio) or connects to (http) the server with the declaration's environment and headers, performs the MCP handshake and lists the tools.
Package mcpserver exposes the gofer control plane as a stdio MCP server (plan P8).
Package mcpserver exposes the gofer control plane as a stdio MCP server (plan P8).
Package messenger owns the stream-json process bridge used to deliver a message to an agent session.
Package messenger owns the stream-json process bridge used to deliver a message to an agent session.
Package metrics is the gofer Prometheus instrumentation (E16, design §6).
Package metrics is the gofer Prometheus instrumentation (E16, design §6).
Package notify implements the E14 webhook outbound side (design §5.5–5.7): it validates a webhook URL against the outbound allowlist + SSRF rules, signs and POSTs the delivery body, and matches an event to its subscribed webhooks.
Package notify implements the E14 webhook outbound side (design §5.5–5.7): it validates a webhook URL against the outbound allowlist + SSRF rules, signs and POSTs the delivery body, and matches an event to its subscribed webhooks.
Package overview builds the dashboard statistics wall (gofer-yelm, design docs/design/2026-10-09-dashboard-redesign-design.md): GET /v1/stats/overview folds the jobs that ENDED inside a range (plus their job_metrics rows), the reviews, the plans and the terminal-session usage into one payload, and caches it per (range, tz).
Package overview builds the dashboard statistics wall (gofer-yelm, design docs/design/2026-10-09-dashboard-redesign-design.md): GET /v1/stats/overview folds the jobs that ENDED inside a range (plus their job_metrics rows), the reviews, the plans and the terminal-session usage into one payload, and caches it per (range, tz).
Package presence is the business layer for E36 driver-agent identity/mailbox (design §6.2/§9).
Package presence is the business layer for E36 driver-agent identity/mailbox (design §6.2/§9).
Package procattr holds the one platform-specific tweak every NON-interactive child process needs: on Windows a process without a console (a `gofer worker -d` / `serve -d` daemon runs detached) that starts a console program (git, claude.cmd, npx ...) makes Windows open a fresh console window for EVERY such child.
Package procattr holds the one platform-specific tweak every NON-interactive child process needs: on Windows a process without a console (a `gofer worker -d` / `serve -d` daemon runs detached) that starts a console program (git, claude.cmd, npx ...) makes Windows open a fresh console window for EVERY such child.
Package proctree holds one spawned process and the descendants it spawns, so a caller can kill the WHOLE tree instead of only the direct child.
Package proctree holds one spawned process and the descendants it spawns, so a caller can kill the WHOLE tree instead of only the direct child.
pty
Package pty is the platform-neutral pty (pseudo terminal) backend for interactive jobs (WEB-03 design §6, §13).
Package pty is the platform-neutral pty (pseudo terminal) backend for interactive jobs (WEB-03 design §6, §13).
conpty
Package conpty is the vendored Windows ConPTY backend (see conpty.go, which carries the //go:build windows constraint).
Package conpty is the vendored Windows ConPTY backend (see conpty.go, which carries the //go:build windows constraint).
Package ptyrelay is the serve-side per-session pty relay (WEB-03 design §6, K2/K6): it consumes a PtySource (the raw byte stream from a worker's pty over the dedicated pty ws, or a serve-local ptmx) and drives TWO independent backpressure layers:
Package ptyrelay is the serve-side per-session pty relay (WEB-03 design §6, K2/K6): it consumes a PtySource (the raw byte stream from a worker's pty over the dedicated pty ws, or a serve-local ptmx) and drives TWO independent backpressure layers:
Package pushhub is the in-process fan-out behind the browser's single /v1/ws connection (Q2).
Package pushhub is the in-process fan-out behind the browser's single /v1/ws connection (Q2).
Package rule is the gofer RULE library (JOB-06①, design §一.1): a rule is a short, MANDATORY piece of discipline the server owns and injects at the TOP of every job prompt that binds it ("改文件只用 apply_patch", "测试先写先提交").
Package rule is the gofer RULE library (JOB-06①, design §一.1): a rule is a short, MANDATORY piece of discipline the server owns and injects at the TOP of every job prompt that binds it ("改文件只用 apply_patch", "测试先写先提交").
Package runner abstracts where a job's process executes.
Package runner abstracts where a job's process executes.
acp
Package acp runs an `acp-agent` job: it starts the agent's ACP server over stdio, drives exactly one prompt turn (initialize → session/new → session/prompt) and maps the protocol's events onto the job's outputs.
Package acp runs an `acp-agent` job: it starts the agent's ACP server over stdio, drives exactly one prompt turn (initialize → session/new → session/prompt) and maps the protocol's events onto the job's outputs.
local
Package local implements the in-process (local host) runner.
Package local implements the in-process (local host) runner.
ndjsonfilter
Package ndjsonfilter turns a structured (NDJSON / JSON-Lines) agent output stream into the two streams gofer captures (bd h-aii-rpky, bd h-aii-525u).
Package ndjsonfilter turns a structured (NDJSON / JSON-Lines) agent output stream into the two streams gofer captures (bd h-aii-rpky, bd h-aii-525u).
peerhttp
Package peerhttp implements a remote runner that forwards a job to a peer gofer over HTTP (plan §11.1, P7).
Package peerhttp implements a remote runner that forwards a job to a peer gofer over HTTP (plan §11.1, P7).
pty
Package ptyrunner is the worker-side runner variant for interactive (pty-attached) jobs (WEB-03 design §5/§6, D1).
Package ptyrunner is the worker-side runner variant for interactive (pty-attached) jobs (WEB-03 design §5/§6, D1).
worker
Package worker implements the ws-worker host-side runner (main plan §4, internal/runner/worker).
Package worker implements the ws-worker host-side runner (main plan §4, internal/runner/worker).
Package secret holds credential-redaction primitives shared by the workflow export path and the job request-redact path.
Package secret holds credential-redaction primitives shared by the workflow export path and the job request-redact path.
Package serve holds the serve process orchestration (BP2): it builds the runtime Core, starts the periodic sweepers / health probe / SIGHUP reload loops, wires the httpapi server and blocks until the server stops.
Package serve holds the serve process orchestration (BP2): it builds the runtime Core, starts the periodic sweepers / health probe / SIGHUP reload loops, wires the httpapi server and blocks until the server stops.
Package servicemgr owns the local metadata and coordination primitives used by the native Windows and Linux service backends.
Package servicemgr owns the local metadata and coordination primitives used by the native Windows and Linux service backends.
Package sessionrelay is the session-relay domain service (SESS-01): terminal agent-CLI sessions (Claude Code / Codex) register themselves through their hooks, the web observes them, and while a session's relay switch is on the Stop hook posts the agent's last message as a "turn" and blocks until a human answers it on the web — the answer is injected back into the SAME terminal session via the hook's `decision: block` continuation.
Package sessionrelay is the session-relay domain service (SESS-01): terminal agent-CLI sessions (Claude Code / Codex) register themselves through their hooks, the web observes them, and while a session's relay switch is on the Stop hook posts the agent's last message as a "turn" and blocks until a human answers it on the web — the answer is injected back into the SAME terminal session via the hook's `decision: block` continuation.
Package skill is the gofer-side skill library (JOB-10, design docs/design/2026-09-23-skills-binding-and-comment-routing-design.md §一): a skill is a directory of "working method" knowledge — a required SKILL.md plus attachments — that lives WITH THE SERVER, not in the project tree, so a job can be handed it without a concurrent job seeing it and without git ever tracking it.
Package skill is the gofer-side skill library (JOB-10, design docs/design/2026-09-23-skills-binding-and-comment-routing-design.md §一): a skill is a directory of "working method" knowledge — a required SKILL.md plus attachments — that lives WITH THE SERVER, not in the project tree, so a job can be handed it without a concurrent job seeing it and without git ever tracking it.
Package steward is the W2b steward (design 2026-10-05 §9 / §14.4): a resident ACP session that only schedules and tidies the work items — it reads, notes, reminds, suggests merges and asks sessions to report, but never decides (no done / dropped, no job submit, no config).
Package steward is the W2b steward (design 2026-10-05 §9 / §14.4): a resident ACP session that only schedules and tidies the work items — it reads, notes, reminds, suggests merges and asks sessions to report, but never decides (no done / dropped, no job submit, no config).
Package store persists per-job log artifacts under a single result directory (<result_dir>/<job_id>/): the live stdout/stderr logs streamed by the local runner.
Package store persists per-job log artifacts under a single result directory (<result_dir>/<job_id>/): the live stdout/stderr logs streamed by the local runner.
Package streaming holds the job log/event/interaction SSE streaming orchestration.
Package streaming holds the job log/event/interaction SSE streaming orchestration.
Package supervisor is the E25 layered answerer (design §8.3-8.4).
Package supervisor is the E25 layered answerer (design §8.3-8.4).
Package template implements gofer task-book templates (SUP-01 P5, design §六): a markdown file with an optional YAML frontmatter, living in <project>/.gofer/templates/ or <config-dir>/templates/, that a submit renders into a job prompt.
Package template implements gofer task-book templates (SUP-01 P5, design §六): a markdown file with an optional YAML frontmatter, living in <project>/.gofer/templates/ or <config-dir>/templates/, that a submit renders into a job prompt.
testutil
gitenv
Package gitenv quiets git for tests that create repositories in a TempDir.
Package gitenv quiets git for tests that create repositories in a TempDir.
testcmd/testcmd command
wait
Package wait gives tests load-tolerant waits (gofer-r7am, design docs/design/2026-10-10-flaky-tests-root-cause.md §2.4).
Package wait gives tests load-tolerant waits (gofer-r7am, design docs/design/2026-10-10-flaky-tests-root-cause.md §2.4).
Package today is the N3 「今天」 decision home (design docs/design/2026-10-09-n3-today-decision-home-design.md §1/§2): it folds every "a person must decide" signal — pending interactions, OPEN decisions, relay turns, needs_review jobs, jobs held for approval, work items that wait for the person, the status / goal tidy-up suggestions, merge suggestions and blocked plans — into one ordered card queue, plus the one-line digest and the status bar.
Package today is the N3 「今天」 decision home (design docs/design/2026-10-09-n3-today-decision-home-design.md §1/§2): it folds every "a person must decide" signal — pending interactions, OPEN decisions, relay turns, needs_review jobs, jobs held for approval, work items that wait for the person, the status / goal tidy-up suggestions, merge suggestions and blocked plans — into one ordered card queue, plus the one-line digest and the status bar.
Package tracker owns the repository-local issue and memory JSONL truth.
Package tracker owns the repository-local issue and memory JSONL truth.
Package tunnel is a leaf implementation of TCP tunnel protocols and data forwarding.
Package tunnel is a leaf implementation of TCP tunnel protocols and data forwarding.
Package updatecheck looks for a newer gofer release (gofer-6x2n, docs/design/2026-10-13-update-check-design.md): the latest GitHub release by default, or a mirror's latest.yaml.
Package updatecheck looks for a newer gofer release (gofer-6x2n, docs/design/2026-10-13-update-check-design.md): the latest GitHub release by default, or a mirror's latest.yaml.
Package util contains the file-only part of Gofer binary upgrades.
Package util contains the file-only part of Gofer binary upgrades.
Package webpush owns browser Web Push encryption, VAPID identity, subscriptions, one-time notification actions and asynchronous event dispatch.
Package webpush owns browser Web Push encryption, VAPID identity, subscriptions, one-time notification actions and asynchronous event dispatch.
Package webui embeds the gofer web console static assets into the binary so `serve` can mount the SPA without any external files.
Package webui embeds the gofer web console static assets into the binary so `serve` can mount the SPA without any external files.
Package work is the work-item domain service (W1, design 2026-10-05): the layer above terminal sessions that records "what the human is doing", derives its status from the sessions, tracks reminders and produces the daily digest.
Package work is the work-item domain service (W1, design 2026-10-05): the layer above terminal sessions that records "what the human is doing", derives its status from the sessions, tracks reminders and produces the daily digest.
transcript
Package transcript turns an agent CLI's own session file into a short list of conversation turns for the work-item summarizer (W2a, design §14.2).
Package transcript turns an agent CLI's own session file into a short list of conversation turns for the work-item summarizer (W2a, design §14.2).
Package workbench projects persisted jobs and relay sessions into the conversation-first WEB-11 model.
Package workbench projects persisted jobs and relay sessions into the conversation-first WEB-11 model.
Package worker is the ws-worker client (main plan §4, §6): a `gofer worker` process dials the central hub over a single WebSocket, registers, and then receives job dispatches which it runs LOCALLY with its own job.Service / local runner (review #8: the worker re-validates project/agent/exec with its own config).
Package worker is the ws-worker client (main plan §4, §6): a `gofer worker` process dials the central hub over a single WebSocket, registers, and then receives job dispatches which it runs LOCALLY with its own job.Service / local runner (review #8: the worker re-validates project/agent/exec with its own config).
Package workerupgrade is the server-side bookkeeping of remote worker binary upgrades (design 2026-10-03-worker-remote-upgrade, U1): it stages the binary a worker will download (one file per worker id under <run>/upgrade/) and records the outcome of the latest upgrade per worker.
Package workerupgrade is the server-side bookkeeping of remote worker binary upgrades (design 2026-10-03-worker-remote-upgrade, U1): it stages the binary a worker will download (one file per worker id under <run>/upgrade/) and records the outcome of the latest upgrade per worker.
Package wsproto defines the WebSocket message protocol shared by the hub (internal/wshub, serve-side) and the worker client (internal/worker).
Package wsproto defines the WebSocket message protocol shared by the hub (internal/wshub, serve-side) and the worker client (internal/worker).
Package xfer implements XFER-01's transfer staging area and journal: the on-disk staging directory a transfer's payload passes through (<root>/xfer/<id>/data) and the business operations recorded against it (stage a put/get, dispatch it to the executing machine, settle it done/failed, expire it).
Package xfer implements XFER-01's transfer staging area and journal: the on-disk staging directory a transfer's payload passes through (<root>/xfer/<id>/data) and the business operations recorded against it (stage a put/get, dispatch it to the executing machine, settle it done/failed, expire it).

Jump to

Keyboard shortcuts

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