internal/

directory
v1.1.1 Latest Latest
Warning

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

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

Directories

Path Synopsis
Package adapter bridges brigada and each agent CLI.
Package adapter bridges brigada and each agent CLI.
claude
Package claude drives the Claude Code CLI headless (design §5.2): one run per job, `claude -p` with stream-json output, resumed by session id when the job carries one.
Package claude drives the Claude Code CLI headless (design §5.2): one run per job, `claude -p` with stream-json output, resumed by session id when the job carries one.
codex
Package codex drives the Codex CLI headless (design §5.2): one run per job, `codex exec --json`, resumed by thread id when the job carries one.
Package codex drives the Codex CLI headless (design §5.2): one run per job, `codex exec --json`, resumed by thread id when the job carries one.
dsh
Package dsh drives DeepSeek Harness (npm @deepseek-ai/dsh, verified on 0.2.1-rc.2) headless: one `dsh --profile headless --json` per worker job, the prompt on stdin, resumed by session id.
Package dsh drives DeepSeek Harness (npm @deepseek-ai/dsh, verified on 0.2.1-rc.2) headless: one `dsh --profile headless --json` per worker job, the prompt on stdin, resumed by session id.
fake
Package fake is a scripted CLI adapter for tests (design §5.2): it drives a fake worker — a shell script each test writes — instead of a real agent CLI, so the runner's tests exercise the lease loop, the workspace, the result contract and the check without any vendor CLI.
Package fake is a scripted CLI adapter for tests (design §5.2): it drives a fake worker — a shell script each test writes — instead of a real agent CLI, so the runner's tests exercise the lease loop, the workspace, the result contract and the check without any vendor CLI.
kimi
Package kimi drives the Kimi Code CLI headless (design §5.2): one run per job, `kimi -p` with stream-json output, resumed by session id when the job carries one.
Package kimi drives the Kimi Code CLI headless (design §5.2): one run per job, `kimi -p` with stream-json output, resumed by session id when the job carries one.
opencode
Package opencode drives OpenCode 1.19.5 headless: one `opencode run` per worker job, resumed by session id, and the bare TUI for an attached foreman chat.
Package opencode drives OpenCode 1.19.5 headless: one `opencode run` per worker job, resumed by session id, and the bare TUI for an attached foreman chat.
Package api exposes the engine over JSON HTTP, on a Unix socket.
Package api exposes the engine over JSON HTTP, on a Unix socket.
Package caps is the concurrency-caps model of design §8.1: which layers a job is counted against, what those layers hold now, and whether a job still fits.
Package caps is the concurrency-caps model of design §8.1: which layers a job is counted against, what those layers hold now, and whether a job still fits.
Package defaults contains the default instruction texts shipped with brigada.
Package defaults contains the default instruction texts shipped with brigada.
Package engine enforces the mechanics so the foreman can stick to judgment: it is the mailbox every message passes through, it turns ready tasks into jobs, applies the routine rules (fix rounds, capped retries, dependency readiness, account cooling), dispatches each job to the best eligible agent by measured outcomes, and wakes the foreman only for judgment events.
Package engine enforces the mechanics so the foreman can stick to judgment: it is the mailbox every message passes through, it turns ready tasks into jobs, applies the routine rules (fix rounds, capped retries, dependency readiness, account cooling), dispatches each job to the best eligible agent by measured outcomes, and wakes the foreman only for judgment events.
Package foreman holds the foreman's fixed, versioned text (design §4): the instructions its session runs under (§4.1) and the wake template a headless turn's prompt is composed from (§4.2 item 2).
Package foreman holds the foreman's fixed, versioned text (design §4): the instructions its session runs under (§4.1) and the wake template a headless turn's prompt is composed from (§4.2 item 2).
Package history keeps everything that happened and makes it readable: one timeline of conversation items per project (user and foreman turns, tool calls and their results, task specs and results, questions and answers, reviews, notifications), full session transcripts uploaded as artifacts after every job, and the append-only event log that messages and transcripts reference.
Package history keeps everything that happened and makes it readable: one timeline of conversation items per project (user and foreman turns, tool calls and their results, task specs and results, questions and answers, reviews, notifications), full session transcripts uploaded as artifacts after every job, and the append-only event log that messages and transcripts reference.
Package landing is the git side of landing an approved task (§7.1), shared by `brigada land` and a runner's land job: the squash commit message, the task's own diff base...branch, applying that diff as one commit, and the conflicts that stop it.
Package landing is the git side of landing an approved task (§7.1), shared by `brigada land` and a runner's land job: the squash commit message, the task's own diff base...branch, applying that diff as one commit, and the conflicts that stop it.
Package lifecycle is the engine's life as a process (design §13): one instance per state directory behind an exclusive lock, started on demand by any client command, and shut down again once it has been idle long enough.
Package lifecycle is the engine's life as a process (design §13): one instance per state directory behind an exclusive lock, started on demand by any client command, and shut down again once it has been idle long enough.
Package logo prints the brigada logo in a terminal: the banner (the Blackfire flame beside the pixel wordmark), the flame alone and the one-line form from docs/brand/cli, with the flame core in hi-vis orange where the terminal can show it, and the fallbacks docs/brand/README.md sets for no color, no UTF-8 and narrow terminals.
Package logo prints the brigada logo in a terminal: the banner (the Blackfire flame beside the pixel wordmark), the flame alone and the one-line form from docs/brand/cli, with the flame core in hi-vis orange where the terminal can show it, and the fallbacks docs/brand/README.md sets for no color, no UTF-8 and narrow terminals.
Package mcp is the `brigada mcp` bridge (design §12.2): a stdio MCP server the foreman's harness starts, which offers brigada's tools by calling the engine API with the lease-scoped foreman token (§12.1).
Package mcp is the `brigada mcp` bridge (design §12.2): a stdio MCP server the foreman's harness starts, which offers brigada's tools by calling the engine API with the lease-scoped foreman token (§12.1).
Package notify is §10's local notifications: the OS notifier, the mapping from engine event kinds to a short title and one-line body, the delivery loop that walks the event log once per event, and the optional webhook (notify.webhook) that POSTs the same moments as plain JSON.
Package notify is §10's local notifications: the OS notifier, the mapping from engine event kinds to a short title and one-line body, the delivery loop that walks the event log once per event, and the optional webhook (notify.webhook) that POSTs the same moments as plain JSON.
Package planfile is the plan file (§6.4): the mirror of a plan the engine keeps in the repo, as .brigada/plans/<plan-id>.yaml on a branch of the project's remote.
Package planfile is the plan file (§6.4): the mirror of a plan the engine keeps in the repo, as .brigada/plans/<plan-id>.yaml on a branch of the project's remote.
Package projecturl names repositories by the canonical identity of design §13.1.
Package projecturl names repositories by the canonical identity of design §13.1.
Package prompt holds the fixed, versioned templates worker prompts are composed from (design §5.3, §1.4): only the engine composes prompts — from these templates plus verbatim data — so the package sits below both the engine, which stamps prompts into the jobs it creates, and the CLI, and nothing below it but the standard library.
Package prompt holds the fixed, versioned templates worker prompts are composed from (design §5.3, §1.4): only the engine composes prompts — from these templates plus verbatim data — so the package sits below both the engine, which stamps prompts into the jobs it creates, and the CLI, and nothing below it but the standard library.
Package runner executes jobs on behalf of the engine.
Package runner executes jobs on behalf of the engine.
Package runnerstate holds the local single-runner protocol shared by the runner and its detached starter.
Package runnerstate holds the local single-runner protocol shared by the runner and its detached starter.
Package store persists the engine's authoritative state in one SQLite file: projects, plans and their task graphs, jobs with their leases and fencing tokens, sessions, runners, agents, outcomes, messages, hashed tokens and the append-only event log.
Package store persists the engine's authoritative state in one SQLite file: projects, plans and their task graphs, jobs with their leases and fencing tokens, sessions, runners, agents, outcomes, messages, hashed tokens and the append-only event log.
Package term styles terminal text using capabilities supplied by logo.Detect.
Package term styles terminal text using capabilities supplied by logo.Detect.
Package testsupport holds the helpers the repository's tests share.
Package testsupport holds the helpers the repository's tests share.
tools
brewformula command
Command brewformula prints the complete Homebrew formula for a release.
Command brewformula prints the complete Homebrew formula for a release.
guard command
Command guard scans a repository for material that must not be published: private and special IPv4 literals, private-network hostnames and issued credential shapes.
Command guard scans a repository for material that must not be published: private and special IPv4 literals, private-network hostnames and issued credential shapes.
relnotes command
Command relnotes prints the CHANGELOG.md section for a release tag.
Command relnotes prints the CHANGELOG.md section for a release tag.
Package version holds the version of the brigada binary.
Package version holds the version of the brigada binary.

Jump to

Keyboard shortcuts

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