internal/

directory
v1.2.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 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 ~/.config/golder/config.toml (honoring $XDG_CONFIG_HOME when set) plus the provider-agnostic base-url env-var name derivation.
Package config implements golder's optional user config file at ~/.config/golder/config.toml (honoring $XDG_CONFIG_HOME when set) 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).
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 provides the single convergence entry point every driver calls to wire hooks into its run (#425, FR-16).
This file provides the single convergence entry point every driver calls to wire hooks into its run (#425, FR-16).
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).
Package clipboard writes text to the system clipboard by shelling out to the platform's clipboard utility (US-009, #125).
Package clipboard writes text to the system clipboard by shelling out to the platform's clipboard utility (US-009, #125).
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 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 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 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).
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.
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