internal/

directory
v1.4.7 Latest Latest
Warning

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

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

Directories

Path Synopsis
Package agentcore defines the core "leaf" data types and control flow for the golder agent harness, a Go reimplementation of the pi agent loop.
Package agentcore defines the core "leaf" data types and control flow for the golder agent harness, a Go reimplementation of the pi agent loop.
This file implements the apply_patch tool: one call carries a whole patch (add / update / move / delete, any number of files) in the codex apply_patch format.
This file implements the apply_patch tool: one call carries a whole patch (add / update / move / delete, any number of files) in the codex apply_patch format.
cli
Package cli is the contract and shared-type layer for golder's command-line surface.
Package cli is the contract and shared-type layer for golder's command-line surface.
btw
This file implements the /btw command (mirrors Claude Code's /btw and the pi agent extension @narumitw/pi-btw): a throwaway "side thread" for asking the model a quick side question that must NOT pollute the main conversation.
This file implements the /btw command (mirrors Claude Code's /btw and the pi agent extension @narumitw/pi-btw): a throwaway "side thread" for asking the model a quick side question that must NOT pollute the main conversation.
config
Package config implements golder's optional user config file at $GOLDER_HOME/config.toml (~/.golder/config.toml by default) plus the provider-agnostic base-url env-var name derivation.
Package config implements golder's optional user config file at $GOLDER_HOME/config.toml (~/.golder/config.toml by default) plus the provider-agnostic base-url env-var name derivation.
dreamcmd
Package dreamcmd holds the CLI-side plumbing shared by the REPL and the TUI for the /dream memory-consolidation command: spawning the process-isolated `golder --dream` child, detecting a live consolidation lock, parsing the dry-run flag, and rendering the returned Report.
Package dreamcmd holds the CLI-side plumbing shared by the REPL and the TUI for the /dream memory-consolidation command: spawning the process-isolated `golder --dream` child, detecting a live consolidation lock, parsing the dry-run flag, and rendering the returned Report.
goal
This file implements the /goal command (mirrors pi-goal / Claude Code's goal mode): given a high-level objective, golder runs the agent autonomously — re-prompting it turn after turn from the loop's follow-up seam — until the model declares the goal done (goal_complete), reports a true impasse (goal_blocked), or a safety guard (max turns / no-progress) or the token budget stops it.
This file implements the /goal command (mirrors pi-goal / Claude Code's goal mode): given a high-level objective, golder runs the agent autonomously — re-prompting it turn after turn from the loop's follow-up seam — until the model declares the goal done (goal_complete), reports a true impasse (goal_blocked), or a safety guard (max turns / no-progress) or the token budget stops it.
headless
This file is the headless run driver: the print / stream-json run path (US-020) extracted from the CLI dispatch seam (#363).
This file is the headless run driver: the print / stream-json run path (US-020) extracted from the CLI dispatch seam (#363).
hostcmd
Package hostcmd implements the `golder host-compat` subcommand family: what the terminal multiplexer around this process sees, and the one file that makes tuios recognise a golder pane at all.
Package hostcmd implements the `golder host-compat` subcommand family: what the terminal multiplexer around this process sees, and the one file that makes tuios recognise a golder pane at all.
memstatus
This file implements the /memory slash command (US-011, FR-20, #484) that prints a colored report describing the persistent memory store and the infinite-context state: entry counts by scope, the current context window and auto-compaction trigger point, current context usage, and checkpoint status.
This file implements the /memory slash command (US-011, FR-20, #484) that prints a colored report describing the persistent memory store and the infinite-context state: entry counts by scope, the current context window and auto-compaction trigger point, current context usage, and checkpoint status.
prompts
Package prompts holds the slash-command registry assembly shared by the REPL (internal/cli/repl) and the forthcoming TUI (internal/cli/tui).
Package prompts holds the slash-command registry assembly shared by the REPL (internal/cli/repl) and the forthcoming TUI (internal/cli/tui).
repl
This file implements the manual `/dream` REPL command (SPEC §4.1, US-007): it spawns the process-isolated memory-consolidation subprocess (`golder --dream [--dream-dry-run] -C <projectDir>`) and renders the returned Report as a full-table change report.
This file implements the manual `/dream` REPL command (SPEC §4.1, US-007): it spawns the process-isolated memory-consolidation subprocess (`golder --dream [--dream-dry-run] -C <projectDir>`) and renders the returned Report as a full-table change report.
run
This file is the single assembly point for a session's tool gates: the trust gate, the workspace-boundary gate and the permission gate, composed once and installed on every run of the session — the main run, a /goal or /btw side run, and any sub-agent they dispatch.
This file is the single assembly point for a session's tool gates: the trust gate, the workspace-boundary gate and the permission gate, composed once and installed on every run of the session — the main run, a /goal or /btw side run, and any sub-agent they dispatch.
sessioncmd
Package sessioncmd implements the `golder session` subcommand family (issue #570): sharing persisted sessions from the command line, without entering the REPL.
Package sessioncmd implements the `golder session` subcommand family (issue #570): sharing persisted sessions from the command line, without entering the REPL.
status
This file implements the /status slash command (US-002, #292) that prints a colored multi-section status report with runtime config, context usage, and more.
This file implements the /status slash command (US-002, #292) that prints a colored multi-section status report with runtime config, context usage, and more.
testutil
Package testutil holds test helpers shared across the internal/cli subpackages.
Package testutil holds test helpers shared across the internal/cli subpackages.
tui
Package tui hosts the full-screen terminal UI for golder's interactive mode (US-001).
Package tui hosts the full-screen terminal UI for golder's interactive mode (US-001).
ui
Package ui holds the leaf terminal-UI helpers shared across the cmd/golder and internal/cli subpackages: ANSI color gating (color.go), turn-end Markdown rendering (markdown.go), and prompt image-reference parsing (imageref.go).
Package ui holds the leaf terminal-UI helpers shared across the cmd/golder and internal/cli subpackages: ANSI color gating (color.go), turn-end Markdown rendering (markdown.go), and prompt image-reference parsing (imageref.go).
This file (US-003) ties the compaction pieces together: given a message list and settings, it finds the cut point, extracts file operations from the summarized range, generates the structured summary, and returns a CompactionResult ready to be persisted as a session compaction entry and used to rebuild the agent context.
This file (US-003) ties the compaction pieces together: given a message list and settings, it finds the cut point, extracts file operations from the summarized range, generates the structured summary, and returns a CompactionResult ready to be persisted as a session compaction entry and used to rebuild the agent context.
Package contextbudget is a leaf package (standard library only) holding the live context-window budget of one run: how many tokens the conversation has used against the model's window, whether a low-budget reminder has been delivered, and whether the model has asked to continue in a fresh window.
Package contextbudget is a leaf package (standard library only) holding the live context-window budget of one run: how many tokens the conversation has used against the model's window, whether a low-budget reminder has been delivered, and whether the model has asked to continue in a fresh window.
Package dream implements the /dream memory-consolidation feature's foundation layer: the resolved dream configuration, on-disk run state, and the deterministic due-check that decides whether an auto-trigger is warranted.
Package dream implements the /dream memory-consolidation feature's foundation layer: the resolved dream configuration, on-disk run state, and the deterministic due-check that decides whether an auto-trigger is warranted.
Package execsess manages shell sessions: OS processes that outlive a single tool call so their output can be polled and their process group controlled (interrupt / kill).
Package execsess manages shell sessions: OS processes that outlive a single tool call so their output can be polled and their process group controlled (interrupt / kill).
Package golderhome resolves golder's state root, in one place.
Package golderhome resolves golder's state root, in one place.
Package grants is the single authorization table: which paths golder may read, write, and run side-effect tools in — and for how long.
Package grants is the single authorization table: which paths golder may read, write, and run side-effect tools in — and for how long.
grantstest
Package grantstest installs an empty authorization table for a test.
Package grantstest installs an empty authorization table for a test.
Package history persists the global, append-only prompt history shared by golder's interactive front-ends (the TUI for now).
Package history persists the global, append-only prompt history shared by golder's interactive front-ends (the TUI for now).
Package hooks implements golder's user-extensible lifecycle hook system: a config-driven way to run shell commands at agent lifecycle points (tool calls, prompt submission, session start/end, etc.) without writing Go or compiling a plugin.
Package hooks implements golder's user-extensible lifecycle hook system: a config-driven way to run shell commands at agent lifecycle points (tool calls, prompt submission, session start/end, etc.) without writing Go or compiling a plugin.
Package hostcompat reports golder's state to a terminal multiplexer that tracks coding agents — tuios and herdr — so golder shows up beside claude, codex and the rest without either project shipping an integration for it.
Package hostcompat reports golder's state to a terminal multiplexer that tracks coding agents — tuios and herdr — so golder shows up beside claude, codex and the rest without either project shipping an integration for it.
Package jev calls TypeSafe's System One model — a decision model that answers typed questions with calibrated probabilities instead of generating text.
Package jev calls TypeSafe's System One model — a decision model that answers typed questions with calibrated probabilities instead of generating text.
Package jsonrpc implements a minimal JSON-RPC 2.0 client over a subprocess's stdio (US-014/#116).
Package jsonrpc implements a minimal JSON-RPC 2.0 client over a subprocess's stdio (US-014/#116).
Package memory implements the persistent memory storage layer for golder.
Package memory implements the persistent memory storage layer for golder.
Package patch implements the apply_patch DSL: a stripped-down, file-oriented diff format carried by one tool call, so a single invocation can add, update, move, and delete files.
Package patch implements the apply_patch DSL: a stripped-down, file-oriented diff format carried by one tool call, so a single invocation can add, update, move, and delete files.
Package permissions defines golder's approval modes and the live, mutable state that tracks the active one.
Package permissions defines golder's approval modes and the live, mutable state that tracks the active one.
This file bridges the agent's event stream to subscribed plugins (US-017, #133).
This file bridges the agent's event stream to subscribed plugins (US-017, #133).
This file implements the Anthropic Messages API streaming decoder (US-008).
This file implements the Anthropic Messages API streaming decoder (US-008).
Package redact implements golder's embedded data-loss-prevention layer: it finds credential-shaped values in text that is about to enter the model's context (tool output, prompts, compaction summaries, memory) and replaces them with stable placeholders before the provider ever sees them.
Package redact implements golder's embedded data-loss-prevention layer: it finds credential-shaped values in text that is about to enter the model's context (tool output, prompts, compaction summaries, memory) and replaces them with stable placeholders before the provider ever sees them.
Package remotecontrol implements the /remote-control feature: an in-process web server that lets a phone on the same LAN mirror the CLI session, inject prompts, and approve risky tool calls (see tasks/spec-remote-control.md).
Package remotecontrol implements the /remote-control feature: an in-process web server that lets a phone on the same LAN mirror the CLI session, inject prompts, and approve risky tool calls (see tasks/spec-remote-control.md).
Package reviewpolicy decides HOW a tool call is reviewed, not whether it is safe.
Package reviewpolicy decides HOW a tool call is reviewed, not whether it is safe.
This file implements shell-style argument tokenization for prompt templates (US-001, #331).
This file implements shell-style argument tokenization for prompt templates (US-001, #331).
Package seatbelt confines bash execution with the OS sandbox: macOS sandbox-exec, Linux bubblewrap (bwrap); platforms without a runner compile to an unavailable stub.
Package seatbelt confines bash execution with the OS sandbox: macOS sandbox-exec, Linux bubblewrap (bwrap); platforms without a runner compile to an unavailable stub.
This file caches the latest-release check so golder's startup banner can show "update available" without a network call on every launch (US-004, FR-10).
This file caches the latest-release check so golder's startup banner can show "update available" without a network call on every launch (US-004, FR-10).
This file implements session export/import (US-008, #124): a session can be exported to a self-contained JSONL or HTML file, and a JSONL export can be imported back as a fresh, resumable session.
This file implements session export/import (US-008, #124): a session can be exported to a self-contained JSONL or HTML file, and a JSONL export can be imported back as a fresh, resumable session.
Package shellfacts describes what a shell command will do, parsed rather than guessed at.
Package shellfacts describes what a shell command will do, parsed rather than guessed at.
Package toolworker runs file tools in a fresh, per-call OS sandbox.
Package toolworker runs file tools in a fresh, per-call OS sandbox.
This file holds the interactive pieces of project trust (US-018, #134).
This file holds the interactive pieces of project trust (US-018, #134).
This file implements the GitHub ready-for-review webhook (issue #567, ported from dsh's GitHub review sessions): an opt-in, isolated HTTP endpoint that turns a PR's draft→ready transition into a read-only review session.
This file implements the GitHub ready-for-review webhook (issue #567, ported from dsh's GitHub review sessions): an opt-in, isolated HTTP endpoint that turns a PR's draft→ready transition into a read-only review session.

Jump to

Keyboard shortcuts

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