internal/

directory
v0.194.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0, MIT

Directories

Path Synopsis
Package acp implements an agent (server) for the Agent Client Protocol v1 (https://agentclientprotocol.com): newline-delimited JSON-RPC 2.0 over stdio, the agent-event-to-update view translator, the control-channel policy for a headless client, the session/request_permission bridge for tool approvals with the four permission option kinds (allow/reject × once/always, remembered per session), and the elicitation/create bridge for question-tool prompts.
Package acp implements an agent (server) for the Agent Client Protocol v1 (https://agentclientprotocol.com): newline-delimited JSON-RPC 2.0 over stdio, the agent-event-to-update view translator, the control-channel policy for a headless client, the session/request_permission bridge for tool approvals with the four permission option kinds (allow/reject × once/always, remembered per session), and the elicitation/create bridge for question-tool prompts.
Package agent provides the core agent loop for yaah.
Package agent provides the core agent loop for yaah.
budget
Package budget resolves the loop budget a sub-agent runs with.
Package budget resolves the loop budget a sub-agent runs with.
context
Package context provides pure helper functions for agent context-window management: token estimation, payload sizing, turn splitting, pruning, chunked compaction, and tool-result truncation.
Package context provides pure helper functions for agent context-window management: token estimation, payload sizing, turn splitting, pruning, chunked compaction, and tool-result truncation.
errorclassify
Package errorclassify provides structured error classification for LLM provider failures.
Package errorclassify provides structured error classification for LLM provider failures.
events
Package events defines the typed event system for the agent loop.
Package events defines the typed event system for the agent loop.
llm
pipeline
Package pipeline — soft-prune core.
Package pipeline — soft-prune core.
recovery
Package recovery rebuilds the shepherd scope registry from the durable trace at startup (adoption plan R1, decision D5): the trace is the registry — scope lifecycle events, checkpoint blobs, and settlement records are durably recorded, so a restarted process recovers its supervision state instead of forgetting it.
Package recovery rebuilds the shepherd scope registry from the durable trace at startup (adoption plan R1, decision D5): the trace is the registry — scope lifecycle events, checkpoint blobs, and settlement records are durably recorded, so a restarted process recovers its supervision state instead of forgetting it.
runner
Package runner wires sub-agent execution: it builds the per-role tool registries, resolves provider/model/timeout/iteration budgets, assembles the sub-agent system prompt, and constructs the top-level DelegateTool that the planner uses to spawn sub-agents.
Package runner wires sub-agent execution: it builds the per-role tool registries, resolves provider/model/timeout/iteration budgets, assembles the sub-agent system prompt, and constructs the top-level DelegateTool that the planner uses to spawn sub-agents.
subagent
Package subagent owns the dispatch-world ladder (yaah-ihfh.3): which substrate a dispatch runs in, and whether stepping down is legal.
Package subagent owns the dispatch-world ladder (yaah-ihfh.3): which substrate a dispatch runs in, and whether stepping down is legal.
supervision
Package supervision bridges shepherd scopes to the loops that run under them (shepherd-adoption plan D2): a scope's interventions must reach execution, not just the trace.
Package supervision bridges shepherd scopes to the loops that run under them (shepherd-adoption plan D2): a scope's interventions must reach execution, not just the trace.
Package atomicfile replaces a file atomically, with one behaviour on every platform: the caller writes a temp file beside the target, and this package moves it into place.
Package atomicfile replaces a file atomically, with one behaviour on every platform: the caller writes a temp file beside the target, and this package moves it into place.
Package banner provides the figlet + lolcat startup banner shared between the CLI REPL and the TUI.
Package banner provides the figlet + lolcat startup banner shared between the CLI REPL and the TUI.
Package config loads and manages the yaah configuration file at ~/.yaah/config.yaml (or $YAAH_HOME/config.yaml if the env var is set).
Package config loads and manages the yaah configuration file at ~/.yaah/config.yaml (or $YAAH_HOME/config.yaml if the env var is set).
bridge.go carries the control-plane delivery policy every UI surface and the ACP server share: how long a prompt may take to be accepted, how long the user may take to answer it, and what happens when either bound is hit.
bridge.go carries the control-plane delivery policy every UI surface and the ACP server share: how long a prompt may take to be accepted, how long the user may take to answer it, and what happens when either bound is hit.
Package cwdpath canonicalizes working directories so that every surface which writes or filters on a session cwd spells the same path the same way: the ACP session intake, the persisted session store, the engine-level session registry (internal/sessions), the `yaah sessions` CLI, and the web session picker.
Package cwdpath canonicalizes working directories so that every surface which writes or filters on a session cwd spells the same path the same way: the ACP session intake, the persisted session store, the engine-level session registry (internal/sessions), the `yaah sessions` CLI, and the web session picker.
Package envelopecheck implements the result-envelope/doc parity gate (yaah-c3z3.4) shared by every package that emits model-facing envelopes.
Package envelopecheck implements the result-envelope/doc parity gate (yaah-c3z3.4) shared by every package that emits model-facing envelopes.
Package instructions discovers and loads project instruction files (AGENTS.md, CLAUDE.md, CONTEXT.md) by walking up from the current working directory to the worktree root.
Package instructions discovers and loads project instruction files (AGENTS.md, CLAUDE.md, CONTEXT.md) by walking up from the current working directory to the worktree root.
Package jail selects yaah's per-platform containment backend.
Package jail selects yaah's per-platform containment backend.
context.go defines the context-key contract between the task tool, the sub-agent runner, and the agent loop: model writeback, start notification, usage accumulation, and stuck-child heartbeats.
context.go defines the context-key contract between the task tool, the sub-agent runner, and the agent loop: model writeback, start notification, usage accumulation, and stuck-child heartbeats.
Package mcp implements the Model Context Protocol (MCP) client for yaah.
Package mcp implements the Model Context Protocol (MCP) client for yaah.
Package memory provides the SQLite-backed persistence layer for yaah.
Package memory provides the SQLite-backed persistence layer for yaah.
Package observability provides OpenTelemetry tracing and metrics for the yaah agent harness.
Package observability provides OpenTelemetry tracing and metrics for the yaah agent harness.
Package parity owns the Shepherd parity ledger's drift guard: the pinned upstream inputs and the dispatch-world vocabulary are asserted against the code and docs, so "parity" stays a checked claim instead of a document that quietly ages.
Package parity owns the Shepherd parity ledger's drift guard: the pinned upstream inputs and the dispatch-world vocabulary are asserted against the code and docs, so "parity" stays a checked claim instead of a document that quietly ages.
Package permissions is the ruleset engine behind role-file and global `permissions:` configuration (parity W5): ordered per-tool rules with an allow/deny/ask effect and a glob resource, evaluated last-match-wins.
Package permissions is the ruleset engine behind role-file and global `permissions:` configuration (parity W5): ordered per-tool rules with an allow/deny/ask effect and a glob resource, evaluated last-match-wins.
Package plans discovers and parses PLAN.md files from the standard locations: project (.agents/plans/) and user-level (~/.agents/plans/).
Package plans discovers and parses PLAN.md files from the standard locations: project (.agents/plans/) and user-level (~/.agents/plans/).
Package prompts provides the embedded system prompt identity and assembly functions for constructing the full system prompt from multiple layers: embedded identity, user context, project context, memory, and skills.
Package prompts provides the embedded system prompt identity and assembly functions for constructing the full system prompt from multiple layers: embedded identity, user context, project context, memory, and skills.
apierror.go defines the structured error type for non-2xx provider responses.
apierror.go defines the structured error type for non-2xx provider responses.
catalog
Package catalog serves a pinned, build-time snapshot of the models.dev catalog (https://models.dev/api.json).
Package catalog serves a pinned, build-time snapshot of the models.dev catalog (https://models.dev/api.json).
Package repl implements the interactive read-eval-print loop for yaah.
Package repl implements the interactive read-eval-print loop for yaah.
Package retention implements the caller's half of the owner-scoped eviction design for session deletion: the kernel-first ordering (docs/retention-gc.md §5) and the coalesced garbage-collection sweep (§6, decision 6).
Package retention implements the caller's half of the owner-scoped eviction design for session deletion: the kernel-first ordering (docs/retention-gc.md §5) and the coalesced garbage-collection sweep (§6, decision 6).
Package rolefile is the single parser/marshaler for sub-agent role files (markdown with YAML frontmatter).
Package rolefile is the single parser/marshaler for sub-agent role files (markdown with YAML frontmatter).
Package runs defines the protocol-neutral run record behind yaah's task-style surfaces: a unit of work a caller starts and can poll until it settles.
Package runs defines the protocol-neutral run record behind yaah's task-style surfaces: a unit of work a caller starts and can poll until it settles.
Package sandboxfake provides an in-memory goatherdsandbox.Sandbox test double.
Package sandboxfake provides an in-memory goatherdsandbox.Sandbox test double.
Package sessions is the engine-level session registry: one read-and-delete seam over the persisted conversation store that every consumer shares — the ACP session/list and session/delete callbacks, the web session picker endpoint, the `yaah sessions` CLI, and the interactive resume picker.
Package sessions is the engine-level session registry: one read-and-delete seam over the persisted conversation store that every consumer shares — the ACP session/list and session/delete callbacks, the web session picker endpoint, the `yaah sessions` CLI, and the interactive resume picker.
Package skills discovers and parses SKILL.md files from the standard locations: project (.agents/skills/), yaah (~/.yaah/skills/), and user-level cross-tool (~/.agents/skills/).
Package skills discovers and parses SKILL.md files from the standard locations: project (.agents/skills/), yaah (~/.yaah/skills/), and user-level cross-tool (~/.agents/skills/).
Package spinner provides a simple terminal spinner for indicating background processing.
Package spinner provides a simple terminal spinner for indicating background processing.
Package toolfmt provides shared tool result formatting helpers used by the ACP view, the REPL terminal view, and the web view.
Package toolfmt provides shared tool result formatting helpers used by the ACP view, the REPL terminal view, and the web view.
subagent_aliases.go re-exports the sub-agent I/O contract and context-key helpers from internal/jobs so existing consumers keep compiling while the implementation lives in the jobs package.
subagent_aliases.go re-exports the sub-agent I/O contract and context-key helpers from internal/jobs so existing consumers keep compiling while the implementation lives in the jobs package.
substrate
Package substrate holds the tool substrate: the policy and authority types the leaf tools are written against, with no dependency on any tool implementation.
Package substrate holds the tool substrate: the policy and authority types the leaf tools are written against, with no dependency on any tool implementation.
tui
state.go — focus state and query helpers.
state.go — focus state and query helpers.
colors
Package colors provides shared tview color tokens and helpers used by all TUI component packages.
Package colors provides shared tview color tokens and helpers used by all TUI component packages.
components/activity
Package activity renders the dedicated activity line for the TUI: a tvxwidgets.Spinner (or ActivityModeGauge during compaction) plus a state label, all in a single reserved Flex row that is never removed from the layout.
Package activity renders the dedicated activity line for the TUI: a tvxwidgets.Spinner (or ActivityModeGauge during compaction) plus a state label, all in a single reserved Flex row that is never removed from the layout.
components/agentpicker
Package agentpicker implements the persona picker modal for the TUI (yaah-21uk.10): one entry per primary-capable persona, its description as the secondary line.
Package agentpicker implements the persona picker modal for the TUI (yaah-21uk.10): one entry per primary-capable persona, its description as the secondary line.
components/approval
Package approval renders interactive approval modals for tool calls.
Package approval renders interactive approval modals for tool calls.
components/backgroundjobs
Package backgroundjobs renders running background sub-agents in a compact side-pane format.
Package backgroundjobs renders running background sub-agents in a compact side-pane format.
components/command
Package command implements the colon command parser and command palette for the TUI.
Package command implements the colon command parser and command palette for the TUI.
components/contextinfo
Package contextinfo formats the context-window / token usage section.
Package contextinfo formats the context-window / token usage section.
components/errdialog
Package errdialog displays error messages using tvxwidgets.MessageDialog.
Package errdialog displays error messages using tvxwidgets.MessageDialog.
components/help
Package help renders the help overlay showing keybindings and commands.
Package help renders the help overlay showing keybindings and commands.
components/mcpinfo
Package mcpinfo formats the MCP server status section.
Package mcpinfo formats the MCP server status section.
components/messages
Package messages builds and renders the conversation message area.
Package messages builds and renders the conversation message area.
components/modal
Package modal provides a common modal wrapper for consistent sizing and centering across all TUI overlays.
Package modal provides a common modal wrapper for consistent sizing and centering across all TUI overlays.
components/question
Package question renders interactive question modals in the TUI.
Package question renders interactive question modals in the TUI.
components/sessioninfo
Package sessioninfo formats the agent info section.
Package sessioninfo formats the agent info section.
components/todo
Package todo renders the TODO list in the infopane right side panel.
Package todo renders the TODO list in the infopane right side panel.
components/worldinfo
Package worldinfo formats the workspace / dispatch-world rows of the info pane.
Package worldinfo formats the workspace / dispatch-world rows of the info pane.
lolcat
Package lolcat provides tview-compatible rainbow coloring for the TUI.
Package lolcat provides tview-compatible rainbow coloring for the TUI.
Package types defines the core data structures for yaah's provider communication layer: chat messages, tool definitions, and provider request/response shapes.
Package types defines the core data structures for yaah's provider communication layer: chat messages, tool definitions, and provider request/response shapes.
selfupdate.go downloads a release asset and replaces the running binary.
selfupdate.go downloads a release asset and replaces the running binary.
Package wake implements yaah's event-driven waiting: one predicate engine with two faces —
Package wake implements yaah's event-driven waiting: one predicate engine with two faces —
workflow
assert
Package assert is the fixed registry of named deterministic checks a `gate` node may name (yaah-0u0v.21).
Package assert is the fixed registry of named deterministic checks a `gate` node may name (yaah-0u0v.21).
host
Package host runs a resolved workflow graph on this machine.
Package host runs a resolved workflow graph on this machine.
ir
Package ir resolves a decoded workflow spec into the immutable graph the validators and executor consume: defaults folded into dispatch nodes, fan-out/loop bodies expanded into stable node paths, templates compiled into segment lists, and structured selectors compiled into a small AST.
Package ir resolves a decoded workflow spec into the immutable graph the validators and executor consume: defaults folded into dispatch nodes, fan-out/loop bodies expanded into stable node paths, templates compiled into segment lists, and structured selectors compiled into a small AST.
registry
Package registry resolves a call node's `workflow` name to a validated, resolved subworkflow document (yaah-0u0v.23).
Package registry resolves a call node's `workflow` name to a validated, resolved subworkflow document (yaah-0u0v.23).
replay
Package replay is the `--replay` door (yaah-0u0v.25): a workflow run's recorded trace, replayed through the same scheduler with zero model calls.
Package replay is the `--replay` door (yaah-0u0v.25): a workflow run's recorded trace, replayed through the same scheduler with zero model calls.
spec
Package spec defines the typed v1 workflow document over dispatch and proposal settlement: strict YAML and JSON decoding with path-bearing errors, canonical JSON encoding, the stable spec hash, and the generated JSON Schema.
Package spec defines the typed v1 workflow document over dispatch and proposal settlement: strict YAML and JSON decoding with path-bearing errors, canonical JSON encoding, the stable spec hash, and the generated JSON Schema.
store
Package store is the SQLite adapter for durable workflow run state (yaah-0u0v.16).
Package store is the SQLite adapter for durable workflow run state (yaah-0u0v.16).
trace
Package trace defines the typed record a workflow run's trace surface reads (yaah-0u0v.17).
Package trace defines the typed record a workflow run's trace surface reads (yaah-0u0v.17).
validate
Package validate holds the workflow DSL validators.
Package validate holds the workflow DSL validators.
Package worldinfo derives the session's workspace and dispatch-world posture for display: what substrate the session runs on, what bounds a sub-agent dispatch, and which world the configured request resolves to on this host.
Package worldinfo derives the session's workspace and dispatch-world posture for display: what substrate the session runs on, what bounds a sub-agent dispatch, and which world the configured request resolves to on this host.

Jump to

Keyboard shortcuts

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