Help us shape the future of Go! Take the 2026 Go Developer Survey

donmai

module
v0.72.12 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT

README

donmai

Status: alpha. APIs and command flags are stabilising. See CHANGELOG.md for the change log and RELEASING.md for the release process.

donmai is the open-source CLI and terminal dashboard for local agent fleets. It is the single binary for every OSS operator task: running the three-process stack locally, managing agents and sessions, querying issue trackers, and inspecting fleet health.

Binary: donmai Module: github.com/RenseiAI/donmai


Contents


Install

brew install RenseiAI/homebrew-tap/donmai
go install (requires Go 1.26.6+)
go install github.com/RenseiAI/donmai/cmd/donmai@latest
GitHub release download

Pre-built binaries for macOS (arm64, amd64) and Linux (arm64, amd64) are attached to every release on the releases page.

Example for macOS arm64 (replace 0.9.4 with the version you want):

curl -fsSL https://github.com/RenseiAI/donmai/releases/download/v0.9.4/donmai_0.9.4_darwin_arm64.tar.gz \
  | tar -xz -C /usr/local/bin donmai
Build from source
git clone https://github.com/RenseiAI/donmai
cd donmai
make build        # produces bin/donmai

Quick start

# 1. Authenticate with Linear (set your API key)
export LINEAR_API_KEY=lin_api_...

# 2. Start the local daemon (persists across reboots via launchd / systemd)
donmai host install
donmai host status

# 3. Pick up Linear backlog issues and dispatch agents
donmai orchestrator --project MyProject

# 4. Watch fleet activity
donmai status
donmai agent list

# 5. Tail logs from the log analyzer
donmai logs analyze --input ~/.donmai/logs/agent.log

Credentials in standalone mode (no daemon, no platform)

When you run donmai standalone (OSS mode, outside any downstream embedder), agents inherit credentials from the donmai process. There are two sources, in this order:

  1. Existing environment variables in the donmai process
  2. .env.local at the root of the working directory

The first source that defines a variable wins. .env.local is read once at donmai startup and never copied into worktrees.

Some variables (the daemon's own auth tokens) are blocked from forwarding regardless of source; see internal/credentials/blocklist.go.

If you want secrets sourced from 1Password instead of a flat file, see the optional op CLI integration (run donmai creds setup for the walkthrough).


Three-process model

donmai manages three cooperating processes on your local machine. Each has a distinct role; together they form the complete OSS execution pipeline.

┌──────────────────────────────────────────────────────────────────┐
│                        your machine                              │
│                                                                  │
│  ┌─────────────────┐    ┌─────────────────┐   ┌──────────────┐  │
│  │   orchestrator  │───▶│    governor     │──▶│   worker(s)  │  │
│  │  (donmai orche- │    │  (donmai govr.) │   │ (donmai wkr) │  │
│  │   ator)         │    │                 │   │              │  │
│  └─────────────────┘    └─────────────────┘   └──────────────┘  │
│           │                      │                    │          │
│     Linear API             Redis queue         coordinator HTTP  │
└──────────────────────────────────────────────────────────────────┘
Orchestrator (donmai orchestrator)

Queries the Linear backlog, selects issues that satisfy the configured project/work-type filters, and dispatches agent tasks into the Redis work queue. It does not run agents itself — it schedules them. OSS users run the orchestrator on demand or via a cron job. SaaS users replace it with the platform's webhook- driven control plane.

Governor (donmai governor)

Long-running scan loop. Watches the Redis queue for pending work, enforces concurrency limits, and starts workers to consume each item. The governor is the process that keeps workers running; it is the OSS equivalent of the SaaS coordinator service.

Worker (donmai worker)

An agent process. Registers with the coordinator over HTTP, polls for work, executes the assigned session (calling the LLM runtime: Claude, Codex, etc.), and reports results back. Multiple workers can run in parallel; the governor controls the ceiling.

Daemon (donmai daemon)

The local daemon (rensei-daemon subprocess) is the persistent service that ties the three processes together. It installs as a system service (launchd on macOS, systemd on Linux), survives reboots, manages the workarea pool, and handles auto-updates with drain semantics. For the full daemon operations manual see 011-local-daemon-fleet.md.


Command catalog

All commands output JSON when --json is passed. Destructive commands require interactive confirmation unless --yes is provided.

donmai status

Print a fleet-wide status snapshot.

donmai status
donmai status --json
donmai agent

Inspect and control individual agent sessions.

donmai agent list [--all] [--json] [--sandbox <id>]
donmai agent status <session-id>
donmai agent stop <session-id>
donmai agent chat <session-id>          # forward a prompt to a running agent
donmai agent reconnect <session-id>     # re-attach to a detached session
donmai session

Low-level session management (lifecycle, streaming output).

donmai session list [--status <status>] [--limit <n>]
donmai session inspect <session-id>
donmai session stream <session-id>      # tail activity stream
donmai session restore-workarea <session-id> --to <dir>
donmai host

Manage this machine. host owns the local daemon's lifecycle, this machine's capacity envelope and workarea pool, the providers and kits installed on it, the projects it admits work for, and the live dashboard of sessions running on it. The daemon installs as a launchd agent (macOS) or systemd user unit (Linux) and manages the workarea pool, auto-updates, and session lifecycle.

donmai daemon … still works as a hidden deprecated alias of the lifecycle subcommands; it prints a notice on stderr and is removed in v0.58.0.

donmai host install [--user | --system]   # write and load the system service
donmai host uninstall                     # remove the system service
donmai host status                        # running / stopped / draining
donmai host stop
donmai host pause                         # stop accepting new work
donmai host resume
donmai host drain                         # wait for in-flight sessions, then stop
donmai host update                        # force-pull latest release
donmai host doctor                        # health check: config, credentials, disk
donmai host logs [--follow]               # tail daemon log (NDJSON / pretty)
donmai host stats [--pool]                # capacity, sessions, pool state
donmai host setup                         # first-run interactive wizard
donmai host set <key> <value>             # mutate a single config key
donmai host evict --repo <repo> [--older-than <duration>]
donmai host watch [--all]                 # live dashboard of this host's sessions
donmai host provider list                 # providers installed on this machine
donmai host kit list                      # kits installed on this machine
donmai host workarea list                 # this machine's workarea pool
donmai host project list                  # projects this machine admits work for

Supported capacity keys:

donmai host set capacity.maxConcurrentSessions <sessions>
donmai host set capacity.poolMaxDiskGb <gb>

Environment: DONMAI_DAEMON_TOKEN (optional — donmai host install provisions this automatically when ~/.config/rensei/config.json contains a platform key).

donmai governor

Start, stop, and query the governor scan loop.

donmai governor start [--max <n>] [--interval <seconds>]
donmai governor stop
donmai governor status
donmai worker and donmai fleet (deprecated)

Legacy local process-manager commands for standalone OSS debugging. donmai host is the primary lifecycle surface for normal operation (a persistent local daemon); worker/fleet remain available in the donmai binary — never in an embedding binary — for users who need the older foreground worker process or PID-file fleet flow. Both are marked deprecated and are removed in v0.59.0.

donmai worker start [--base-url <url>] [--provisioning-token <token>]
donmai fleet start --count <n>
donmai fleet status
donmai fleet stop

fleet scale has been removed outright (it only ever returned a not-yet-supported error): stop and restart the fleet with a new --count.

donmai orchestrator

Local orchestrator for OSS users. Queries the Linear backlog and dispatches agent tasks.

donmai orchestrator --project <name>            # dispatch from a Linear project
donmai orchestrator --single <issue-id>         # process one specific issue
donmai orchestrator --project <name> --dry-run  # preview without dispatching
donmai orchestrator --project <name> --max 5    # cap concurrent dispatches
donmai orchestrator --project <name> --repo github.com/org/repo
donmai orchestrator --project <name> --templates .donmai/templates

Environment: LINEAR_API_KEY required.

donmai logs

Agent log analysis — detect failure patterns and optionally file Linear issues.

donmai logs analyze --input /path/to/agent.log
cat agent.log | donmai logs analyze
donmai logs analyze --input agent.log --dry-run
donmai logs analyze --input agent.log --json
donmai logs analyze --input agent.log --team Engineering --project Agent
donmai logs analyze --input agent.log --config ~/.config/af/log-signatures.yaml

The built-in signature catalog covers: tool misuse, sandbox permission errors, approval-required blocks, rate-limit hits, and environment failures. Override or extend via a YAML catalog at ~/.config/af/log-signatures.yaml.

Environment: LINEAR_API_KEY required for issue creation (omit with --dry-run).

donmai linear

Linear issue-tracker operations (mirrors the legacy pnpm af-linear scripts). All subcommands output JSON.

donmai linear get-issue <id>
donmai linear create-issue --title "..." --team "..."
donmai linear update-issue <id> [--project "<name|slug|uuid>"] [--status "..."]
donmai linear list-issues [--project "..."] [--status "..."]
donmai linear create-comment <issue-id> --body "..."
donmai linear list-comments <issue-id>
donmai linear add-relation <issue-id> <related-id> --type <related|blocks|duplicate|similar>
donmai linear list-relations <issue-id>
donmai linear remove-relation <relation-id>
donmai linear list-sub-issues <parent-id>
donmai linear list-sub-issue-statuses <parent-id>
donmai linear update-sub-issue <id> [--state "..."] [--comment "..."]
donmai linear check-blocked <issue-id>
donmai linear list-backlog-issues --project "..."
donmai linear list-unblocked-backlog --project "..."
donmai linear create-blocker <source-issue-id> --title "..."

get-issue always includes parentId and parentIdentifier. Both are JSON strings for a child issue and explicit null values for a root issue.

Authentication: set LINEAR_API_KEY (or LINEAR_ACCESS_TOKEN).

donmai github

GitHub Issues operations. Mirrors the donmai linear surface adapted to GitHub Issues vocabulary. All subcommands output JSON.

donmai github get-issue     --repo owner/repo --number 42
donmai github create-issue  --repo owner/repo --title "Bug: ..." [--body "..."] [--labels "bug,enhancement"] [--assignees "alice"]
donmai github update-issue  --repo owner/repo --number 42 [--title "..."] [--state open|closed]
donmai github list-issues   --repo owner/repo [--state open|closed|all] [--labels "..."] [--assignee "alice"] [--limit 50]
donmai github list-comments --repo owner/repo --number 42
donmai github create-comment --repo owner/repo --number 42 --body "..." [--body-file /path]
donmai github add-labels    --repo owner/repo --number 42 --labels "bug,priority:high"
donmai github set-assignees --repo owner/repo --number 42 --assignees "alice,bob"
donmai github close-issue   --repo owner/repo --number 42 [--comment "Resolved in v2.0"]
donmai github reopen-issue  --repo owner/repo --number 42 [--comment "Reopening for follow-up"]
donmai github list-labels   --repo owner/repo
donmai github get-repo      --repo owner/repo

Owner/repo shorthand: --repo owner/repo sets both owner and repo. --owner and --repo also read GITHUB_OWNER / GITHUB_REPO env vars.

Authentication: set GITHUB_TOKEN (personal access token, fine-grained token, or GitHub App installation token). When running under a platform login session, GitHub calls are proxied through the platform's connected GitHub App installation credential instead.

donmai code

Code intelligence commands, implemented natively in Go — no external binary required by default:

donmai code get-repo-map [--max-files <n>] [--file-patterns "*.go,src/**"]
donmai code search-symbols <query> [--kinds function,method] [--file-pattern "*.go"]
donmai code search-code <query> [--language go] [--max-results <n>]
donmai code check-duplicate --content <text> | --content-file <path>
donmai code find-type-usages <TypeName> [--max-results <n>]
donmai code validate-cross-deps [path]
  • get-repo-map ranks files by PageRank over the file import/dependency graph.
  • search-code runs Okapi BM25 by default, upgrading to hybrid BM25+vector search when VOYAGE_AI_API_KEY is set, with COHERE_API_KEY enabling cross-encoder reranking.
  • check-duplicate detects exact (xxHash64) and near (SimHash) duplicates.
  • find-type-usages scans for switch/case, mapping-object, and import sites for a union type or enum.
  • validate-cross-deps checks cross-package imports have package.json dependency declarations (monorepo JS/TS).

Scoping: by default the index root is the enclosing git repository root (discovered by walking up from the current directory), not just the invocation cwd. Pass --repo-path <relative-path> (a persistent flag on the code command group) to scope indexing to a subtree under that root, e.g. a single package in a monorepo.

Override: set DONMAI_CODE_BIN to force the deprecated TypeScript exec-shim path for all subcommands instead (prints a one-time deprecation notice to stderr; will be removed once donmai-libraries is archived).

donmai arch

Architecture reference commands. Browse, show, and synthesize the donmai-architecture corpus.

donmai arch list
donmai arch show <doc-id>                    # e.g. donmai arch show 001
donmai arch browse                           # interactive TUI browser
donmai arch synthesize --topic <topic>
donmai arch assess --topic <topic>           # gap/consistency assessment
donmai admin

Operational admin commands for cleanup, queue inspection, and merge-queue management. All subcommands output JSON. Destructive operations require interactive confirmation unless --yes is passed.

Environment: REDIS_URL must be set for queue and merge-queue subcommands.


donmai admin cleanup

Prune orphaned git worktrees and stale local branches. Mirrors the TypeScript af-cleanup + af-cleanup-sub-issues scripts.

donmai admin cleanup [flags]

Flags:
  --dry-run          Show what would be cleaned without removing
  --force            Force removal (includes branches with gone remotes)
  --path <dir>       Custom worktrees directory (default: ../<repoName>.wt)
  --skip-worktrees   Skip worktree cleanup
  --skip-branches    Skip branch cleanup
  --yes              Skip confirmation prompt

Example output:

{
  "dryRun": false,
  "worktrees": {
    "scanned": 12,
    "orphaned": 3,
    "cleaned": 3,
    "skipped": 0,
    "errors": []
  },
  "branches": {
    "scanned": 5,
    "deleted": 5,
    "errors": []
  }
}

donmai admin queue

Inspect and mutate the Redis work queue.

donmai admin queue list
donmai admin queue peek
donmai admin queue requeue <session-id> [--yes]
donmai admin queue drop <session-id> [--yes]
  • list — returns all work items, sessions, and registered workers as JSON
  • peek — shows the next item in the queue without removing it
  • requeue — resets a session from running/claimed back to pending (destructive)
  • drop — permanently removes a session and its queue/claim entries (destructive)

Example: donmai admin queue list:

{
  "items": [
    {
      "sessionId": "sess-abc123",
      "issueIdentifier": "ENG-42",
      "workType": "development",
      "priority": 2,
      "queuedAt": 1714000000000
    }
  ],
  "sessions": [...],
  "workers": [...]
}

donmai admin merge-queue

Inspect and mutate the Redis merge queue.

donmai admin merge-queue list [--repo <repoId>]
donmai admin merge-queue dequeue <pr-number> [--repo <repoId>] [--yes]
donmai admin merge-queue force-merge <pr-number> [--repo <repoId>] [--yes]
  • list — returns all queued, failed, and blocked PRs for the repo
  • dequeue — permanently removes a PR from the merge queue (destructive)
  • force-merge — moves a failed/blocked PR back to the head of the queue (destructive)

The --repo flag defaults to "default".

Example: donmai admin merge-queue list --repo my-org/my-repo:

{
  "repoId": "my-org/my-repo",
  "depth": 2,
  "entries": [
    {
      "repoId": "my-org/my-repo",
      "prNumber": 42,
      "sourceBranch": "feature/foo",
      "priority": 1,
      "enqueuedAt": 1714000000000,
      "status": "queued"
    },
    {
      "repoId": "my-org/my-repo",
      "prNumber": 7,
      "sourceBranch": "feature/bar",
      "status": "failed",
      "failureReason": "merge conflict"
    }
  ]
}

Migration from the legacy TypeScript CLI

If you are moving from the previous TypeScript-based pnpm af-* scripts, see migration-from-legacy-cli.md (migration guide in flight).


Development

make build      # Build donmai binary  →  bin/donmai
make test       # go test -race ./...
make lint       # golangci-lint run
make fmt        # gofumpt -w .
make vuln       # govulncheck ./...
make coverage   # Test with coverage report
make run-mock        # Run TUI dashboard with mock data
make run-status-mock # Run status with mock data

Architecture

The public library surface (afclient, afcli, worker) is designed to be imported by downstream consumers. Embedders use afcli.RegisterCommands and extend the generic OSS command set with their own subcommands. The standalone donmai binary opts into legacy worker/fleet process-manager commands; embedders that want the daemon-only lifecycle surface can leave those commands disabled.

See AGENTS.md for the full package layout and contributor guide. The authoritative architecture corpus lives in donmai-architecture — particularly:

  • 001-layered-execution-model.md — layered execution model and OSS contracts
  • 011-local-daemon-fleet.md — local daemon operations manual
  • 013-orchestrator-and-governor.md — orchestrator, governor, worker, dispatch loop
  • 014-tui-operator-surfaces.md — TUI display primitives and dual-surface discipline

Contribution and license

Contributions welcome. Please open an issue or PR; follow the conventions in AGENTS.md. The project uses the MIT license — see LICENSE.

See CHANGELOG.md and RELEASING.md for the change history and release process.

Directories

Path Synopsis
Package a2a implements the A2A Protocol v1.0 JSON-RPC client binding.
Package a2a implements the A2A Protocol v1.0 JSON-RPC client binding.
Package afcli provides Cobra command factories for the Donmai CLI.
Package afcli provides Cobra command factories for the Donmai CLI.
credentials
Package credentials exposes the `creds` Cobra command surface.
Package credentials exposes the `creds` Cobra command surface.
internal/cli
Package cli holds small helpers shared across the afcli command families.
Package cli holds small helpers shared across the afcli command families.
linearcmd
Package linearcmd implements the `linear` command family (Linear issue-tracker operations).
Package linearcmd implements the `linear` command family (Linear issue-tracker operations).
Package afclient provides the donmai coordinator API client and types.
Package afclient provides the donmai coordinator API client and types.
codeintel
Package codeintel - native arch-intel diff/gate layer.
Package codeintel - native arch-intel diff/gate layer.
logsignatures
Package logsignatures implements the log-signature catalog and pattern-matching logic for the `donmai logs analyze` command.
Package logsignatures implements the log-signature catalog and pattern-matching logic for the `donmai logs analyze` command.
orchestrator
Package orchestrator implements the local orchestrator entrypoint for OSS users who do not run the daemon.
Package orchestrator implements the local orchestrator entrypoint for OSS users who do not run the daemon.
queue
Package queue provides Redis-backed admin clients for the donmai work queue and merge queue.
Package queue provides Redis-backed admin clients for the donmai work queue and merge queue.
repoconfig
Package repoconfig loads and validates the .donmai/config.yaml file (RepositoryConfig kind).
Package repoconfig loads and validates the .donmai/config.yaml file (RepositoryConfig kind).
Package afview hosts the canonical composed renderers for the af / rensei command surfaces sourced from the daemon's HTTP control API.
Package afview hosts the canonical composed renderers for the af / rensei command surfaces sourced from the daemon's HTTP control API.
kit
Package kit hosts the canonical renderers for the af / rensei `kit` command tree, sourced from afclient.Kit / KitManifest / KitRegistrySource wire types.
Package kit hosts the canonical renderers for the af / rensei `kit` command tree, sourced from afclient.Kit / KitManifest / KitRegistrySource wire types.
provider
Package provider hosts the canonical renderers for the af / rensei `provider` command tree, sourced from afclient.Provider wire types.
Package provider hosts the canonical renderers for the af / rensei `provider` command tree, sourced from afclient.Provider wire types.
routing
Package routing hosts the canonical renderers for the `routing` command tree, sourced from afclient.RoutingConfig and afclient.RoutingExplainResponse wire types, per ADR-2026-05-07-daemon-http-control-api.md §D3.
Package routing hosts the canonical renderers for the `routing` command tree, sourced from afclient.RoutingConfig and afclient.RoutingExplainResponse wire types, per ADR-2026-05-07-daemon-http-control-api.md §D3.
workarea
Package workarea hosts the canonical renderers for the af / rensei `workarea` command tree, sourced from afclient.Workarea wire types.
Package workarea hosts the canonical renderers for the af / rensei `workarea` command tree, sourced from afclient.Workarea wire types.
Package agent declares the provider-agnostic contract for the donmai multi-provider agent-runner subsystem.
Package agent declares the provider-agnostic contract for the donmai multi-provider agent-runner subsystem.
conformance
Package conformance is the cross-harness certification suite for the agent.Provider event contract (see agent/provider.go) and for the pre-spawn adaptation authority a harness is admitted under (agent/prepared_harness.go).
Package conformance is the cross-harness certification suite for the agent.Provider event contract (see agent/provider.go) and for the pre-spawn adaptation authority a harness is admitted under (agent/prepared_harness.go).
Package attachclient is the OSS generic outbound attach client for the interactive-attach-v1 wire protocol (donmai-architecture/protocol/ interactive-attach-v1.md, owning ADR ADR-2026-07-12-interactive-pty-session- host.md § 3).
Package attachclient is the OSS generic outbound attach client for the interactive-attach-v1 wire protocol (donmai-architecture/protocol/ interactive-attach-v1.md, owning ADR ADR-2026-07-12-interactive-pty-session- host.md § 3).
attachtest
Package attachtest is a deliberately-dumb, single-room, mechanism-only stub relay for exercising the attachclient host leg end to end.
Package attachtest is a deliberately-dumb, single-room, mechanism-only stub relay for exercising the attachclient host leg end to end.
viewertest
Package viewertest is an OSS, reusable viewer-side test harness for the D3 attach wire protocol: a headless screen-assert toolkit that decodes a received Snapshot into an attachwire.Screen and exposes ergonomic, deterministic assertions (cell text, cursor position, alt-screen state) plus a Driver that sends input, requests snapshots, and returns decoded screens with timeouts.
Package viewertest is an OSS, reusable viewer-side test harness for the D3 attach wire protocol: a headless screen-assert toolkit that decodes a received Snapshot into an attachwire.Screen and exposes ergonomic, deterministic assertions (cell text, cursor position, alt-screen state) plus a Driver that sends input, requests snapshots, and returns decoded screens with timeouts.
viewertest/fixturetui command
Command vtfixture is the named, deterministic fixture TUI for the viewer-side attach test harness.
Command vtfixture is the named, deterministic fixture TUI for the viewer-side attach test harness.
Package attachwire implements the framing and codec layer of the interactive-attach-v1 wire protocol — the binary frame format, the two sequence namespaces, the typed event payloads, the JSON control-plane message set, the snapFormat 0x01 screen serialization, the degraded-lane batch envelopes, and a token-bucket backpressure helper.
Package attachwire implements the framing and codec layer of the interactive-attach-v1 wire protocol — the binary frame format, the two sequence namespaces, the typed event payloads, the JSON control-plane message set, the snapFormat 0x01 screen serialization, the degraded-lane batch envelopes, and a token-bucket backpressure helper.
sanitize
Package sanitize implements the §9 terminal-escape sanitization allowlist of the interactive-attach-v1 wire protocol — the security-critical filter every host-produced terminal byte MUST pass before it reaches a viewer.
Package sanitize implements the §9 terminal-escape sanitization allowlist of the interactive-attach-v1 wire protocol — the security-critical filter every host-produced terminal byte MUST pass before it reaches a viewer.
v2
Package attachwirev2 implements the additive host-carrier successor to the frozen interactive-attach-v1 protocol.
Package attachwirev2 implements the additive host-carrier successor to the frozen interactive-attach-v1 protocol.
cmd
donmai command
Package main is the unified Donmai CLI/TUI entry point.
Package main is the unified Donmai CLI/TUI entry point.
operational-payload-provenance command
Command operational-payload-provenance regenerates and verifies the pinned v0.72.2 operational-payload provenance artifact.
Command operational-payload-provenance regenerates and verifies the pinned v0.72.2 operational-payload provenance artifact.
session-shim-acceptance-mutator command
Command session-shim-acceptance-mutator drives authenticated, target-owned fault stimuli for the installed session-shim acceptance.
Command session-shim-acceptance-mutator drives authenticated, target-owned fault stimuli for the installed session-shim acceptance.
Package codesurvival implements the donmai worker side of the code-survival scan work-type (RW3 + RW4).
Package codesurvival implements the donmai worker side of the code-survival scan work-type (RW3 + RW4).
Package credentials is the agent-side credential loader library.
Package credentials is the agent-side credential loader library.
Package daemon auto_update_verifier.go — sigstore bundle-mode binary-signature verifier for the auto-update flow.
Package daemon auto_update_verifier.go — sigstore bundle-mode binary-signature verifier for the auto-update flow.
eval
codeintel
Package codeintel implements the code-intelligence A/B eval harness: a benchmark-dataset loader, three grader classes, a two-arm (WITH / WITHOUT) execution driver, and a thin platform reporting bridge.
Package codeintel implements the code-intelligence A/B eval harness: a benchmark-dataset loader, three grader classes, a two-arm (WITH / WITHOUT) execution driver, and a thin platform reporting bridge.
experiment
Package experiment provides provider-neutral prompt-experiment orchestration.
Package experiment provides provider-neutral prompt-experiment orchestration.
Package executioncell defines the versioned, OSS execution-cell wire contract.
Package executioncell defines the versioned, OSS execution-cell wire contract.
gen command
Command gen records the digests of the canonical schema and fixture suite in compiled Go source.
Command gen records the digests of the canonical schema and fixture suite in compiled Go source.
Package gateway is the translating-gateway ModelEndpoint host: a loopback component, owned by the donmai daemon, that lets any harness consume any upstream through the wire protocol it natively drives.
Package gateway is the translating-gateway ModelEndpoint host: a loopback component, owned by the donmai daemon, that lets any harness consume any upstream through the wire protocol it natively drives.
costfeed
Package costfeed meters every gateway exchange into a cost record shaped for the platform cost_events ledger (08 §7), carrying the `harness` sibling column ADR-2026-06-06 D4 planned — the gateway is its first structurally- reliable producer, since it sees both the wire traffic and the session token that names the harness.
Package costfeed meters every gateway exchange into a cost record shaped for the platform cost_events ledger (08 §7), carrying the `harness` sibling column ADR-2026-06-06 D4 planned — the gateway is its first structurally- reliable producer, since it sees both the wire traffic and the session token that names the harness.
ir
Package ir is the gateway's canonical intermediate representation.
Package ir is the gateway's canonical intermediate representation.
pool
Package pool selects a credential for an upstream exchange with rotation, cooldown, and failover.
Package pool selects a credential for an upstream exchange with rotation, cooldown, and failover.
surface
Package surface holds the inbound wire surfaces the gateway presents to harnesses on loopback (the server side).
Package surface holds the inbound wire surfaces the gateway presents to harnesses on loopback (the server side).
token
Package token mints and compares the per-session bearer tokens that bind an inbound loopback request to its dispatch (08 §5).
Package token mints and compares the per-session bearer tokens that bind an inbound loopback request to its dispatch (08 §5).
translate
Package translate holds the surface-protocol ⇄ IR codecs.
Package translate holds the surface-protocol ⇄ IR codecs.
upstream
Package upstream holds the outbound backends the gateway dials.
Package upstream holds the outbound backends the gateway dials.
Package hostrelay defines the host-relay-v1 WebSocket wire contract.
Package hostrelay defines the host-relay-v1 WebSocket wire contract.
Package hostrelayclient runs one outbound host-relay-v1 tunnel for a local code-intelligence host.
Package hostrelayclient runs one outbound host-relay-v1 tunnel for a local code-intelligence host.
Package installer provides the OS-aware daemon-installer dispatcher.
Package installer provides the OS-aware daemon-installer dispatcher.
launchd
Package launchd implements the macOS launchd installer for the daemon.
Package launchd implements the macOS launchd installer for the daemon.
systemd
Package systemd implements the Linux systemd installer for the daemon.
Package systemd implements the Linux systemd installer for the daemon.
internal
anontoken
Package anontoken manages the donmai machine token (~/.donmai/token).
Package anontoken manages the donmai machine token (~/.donmai/token).
app
Package app implements the root Bubble Tea model and view routing.
Package app implements the root Bubble Tea model and view routing.
credentials
Package credentials owns the env-forwarding blocklist that prevents the daemon's own auth surface from leaking into agent subprocesses.
Package credentials owns the env-forwarding blocklist that prevents the daemon's own auth surface from leaking into agent subprocesses.
credentials/gen command
Command gen renders the canonical agent-env blocklist artifact (internal/credentials/blocklist.json) from the Go source of truth (internal/credentials/blocklist.go, var AgentEnvBlocklist).
Command gen renders the canonical agent-env blocklist artifact (internal/credentials/blocklist.json) from the Go source of truth (internal/credentials/blocklist.go, var AgentEnvBlocklist).
daemon
Package daemon (internal) provides substrate capability detection for the local donmai daemon.
Package daemon (internal) provides substrate capability detection for the local donmai daemon.
envcompat
Package envcompat provides one-release backward-compat shims for renamed environment variables.
Package envcompat provides one-release backward-compat shims for renamed environment variables.
gitexec
Package gitexec holds shared, brand-neutral helpers for invoking git from a headless daemon.
Package gitexec holds shared, brand-neutral helpers for invoking git from a headless daemon.
github
Package github is a minimal GitHub REST client used by `af github` commands.
Package github is a minimal GitHub REST client used by `af github` commands.
governor
Package governor implements the in-process scan/dispatch loop that backs the `af governor start` command.
Package governor implements the in-process scan/dispatch loop that backs the `af governor start` command.
inline
Package inline implements the non-TUI inline status reporter.
Package inline implements the non-TUI inline status reporter.
interview
Package interview holds the canonical wire-type constants for the Interactive Project Interviews feature.
Package interview holds the canonical wire-type constants for the Interactive Project Interviews feature.
kit
Package kit — compose.go: Kit toolchain-demand composition (K1.1 / K1.2).
Package kit — compose.go: Kit toolchain-demand composition (K1.1 / K1.2).
linear
Package linear provides a lightweight Linear GraphQL client using stdlib net/http.
Package linear provides a lightweight Linear GraphQL client using stdlib net/http.
process
Package process provides PID-file management, daemonize re-exec, and signal-handler installation primitives shared by the af governor start/stop/status subcommands.
Package process provides PID-file management, daemonize re-exec, and signal-handler installation primitives shared by the af governor start/stop/status subcommands.
queue
Package queue provides a Redis-backed work queue for the governor.
Package queue provides a Redis-backed work queue for the governor.
statepath
Package statepath provides helpers for resolving OSS state directory paths under the brand state directory (~/.donmai/ by default).
Package statepath provides helpers for resolving OSS state directory paths under the brand state directory (~/.donmai/ by default).
testregistration
Package testregistration guards against build-tag-gated test files that no target ever compiles.
Package testregistration guards against build-tag-gated test files that no target ever compiles.
views/dashboard
Package dashboard implements the fleet overview TUI view.
Package dashboard implements the fleet overview TUI view.
views/detail
Package detail implements the session detail TUI view.
Package detail implements the session detail TUI view.
views/hostwatch
Package hostwatch implements the local-stream fleet dashboard engine — a per-host, per-project live view of all agent work, sourced entirely from LOCAL data: the daemon's localhost control API (the live index of what is running) joined with each session's on-disk `.agent/events.jsonl` (the full-fidelity event stream) and `.agent/state.json` (the per-session header).
Package hostwatch implements the local-stream fleet dashboard engine — a per-host, per-project live view of all agent work, sourced entirely from LOCAL data: the daemon's localhost control API (the live index of what is running) joined with each session's on-disk `.agent/events.jsonl` (the full-fidelity event stream) and `.agent/state.json` (the per-session header).
views/palette
Package palette implements the fuzzy-search command palette overlay.
Package palette implements the fuzzy-search command palette overlay.
Package kgextract implements the donmai worker side of the kg-extraction work-type.
Package kgextract implements the donmai worker side of the kg-extraction work-type.
Package landing is the Go-native landing serializer (FD-4): it serializes the landing of proposed changes (pull requests / proposals) onto a trunk so concurrent landings never corrupt the target branch, while letting non-conflicting changes land in parallel.
Package landing is the Go-native landing serializer (FD-4): it serializes the landing of proposed changes (pull requests / proposals) onto a trunk so concurrent landings never corrupt the target branch, while letting non-conflicting changes land in parallel.
strategies
Package strategies provides pluggable landing strategies (rebase, merge, squash).
Package strategies provides pluggable landing strategies (rebase, merge, squash).
vcs
Package vcs defines the VersionControlProvider abstraction used by the landing serializer, plus the GitHub (git + gh CLI) and Atomic (atomic CLI) adapters.
Package vcs defines the VersionControlProvider abstraction used by the landing serializer, plus the GitHub (git + gh CLI) and Atomic (atomic CLI) adapters.
Package matrix is the single source of truth for the two-axis capability matrix: which (harness × model-endpoint × serving-host) cells are valid, which legacy ProviderName each maps to, and the generated artifacts that platform / rensei-tui consume.
Package matrix is the single source of truth for the two-axis capability matrix: which (harness × model-endpoint × serving-host) cells are valid, which legacy ProviderName each maps to, and the generated artifacts that platform / rensei-tui consume.
gen command
Command gen is the matrix code generator.
Command gen is the matrix code generator.
Package prompt renders work-type-specific agent prompts for the Go runner subsystem.
Package prompt renders work-type-specific agent prompts for the Go runner subsystem.
provider
endpoint/anthropic
Package anthropic declares the Anthropic model-endpoint family (Family B) for the two-axis provider model.
Package anthropic declares the Anthropic model-endpoint family (Family B) for the two-axis provider model.
endpoint/google
Package google declares the Google model-endpoint family (Family B) for the two-axis provider model.
Package google declares the Google model-endpoint family (Family B) for the two-axis provider model.
endpoint/internal/resolve
Package resolve holds the shared, pure (no-network) resolution helper used by every company model-endpoint package (provider/endpoint/<company>).
Package resolve holds the shared, pure (no-network) resolution helper used by every company model-endpoint package (provider/endpoint/<company>).
endpoint/local
Package local declares the Local (Ollama bare surface) model-endpoint family (Family B) for the two-axis provider model.
Package local declares the Local (Ollama bare surface) model-endpoint family (Family B) for the two-axis provider model.
endpoint/openai
Package openai declares the OpenAI model-endpoint family (Family B) for the two-axis provider model.
Package openai declares the OpenAI model-endpoint family (Family B) for the two-axis provider model.
endpoint/stub
Package stub declares a test-only model-endpoint family (Family B) for the two-axis provider model.
Package stub declares a test-only model-endpoint family (Family B) for the two-axis provider model.
harness/agycli
Package agycli implements an agent.Provider that shells out to Google Antigravity's `agy` CLI.
Package agycli implements an agent.Provider that shells out to Google Antigravity's `agy` CLI.
harness/amp
Package amp is a registration-only stub for Sourcegraph's Amp coding agent (https://ampcode.com/).
Package amp is a registration-only stub for Sourcegraph's Amp coding agent (https://ampcode.com/).
harness/claude
Package claude implements an agent.Provider that shells out to the Anthropic Claude Code CLI (`claude`).
Package claude implements an agent.Provider that shells out to the Anthropic Claude Code CLI (`claude`).
harness/clijsonl
Package clijsonl is the shared CLI-JSONL execution driver extracted from the Claude Code provider.
Package clijsonl is the shared CLI-JSONL execution driver extracted from the Claude Code provider.
harness/codex
Package codex implements the agent.Provider contract against the `codex app-server` JSON-RPC subprocess.
Package codex implements the agent.Provider contract against the `codex app-server` JSON-RPC subprocess.
harness/gemini
Package gemini is the agent.Provider implementation for Google's native Gemini API (https://ai.google.dev/api/generate-content#streamgeneratecontent).
Package gemini is the agent.Provider implementation for Google's native Gemini API (https://ai.google.dev/api/generate-content#streamgeneratecontent).
harness/ollama
Package ollama implements the agent.Provider interface against a locally running Ollama HTTP endpoint (default http://localhost:11434).
Package ollama implements the agent.Provider interface against a locally running Ollama HTTP endpoint (default http://localhost:11434).
harness/opencode
Package opencode implements the agent.Provider for the OpenCode local agent (https://opencode.ai/, github.com/sst/opencode).
Package opencode implements the agent.Provider for the OpenCode local agent (https://opencode.ai/, github.com/sst/opencode).
harness/pi
Package pi implements the agent.Provider contract against a `pi --mode rpc` JSONL-over-stdio subprocess.
Package pi implements the agent.Provider contract against a `pi --mode rpc` JSONL-over-stdio subprocess.
harness/ptycli
Package ptycli is the shared interactive PTY spawn-mode driver (W4; interactive-attach-v1 protocol, donmai-architecture/protocol/ interactive-attach-v1.md; owning ADR ADR-2026-07-12-interactive-pty-session-host.md).
Package ptycli is the shared interactive PTY spawn-mode driver (W4; interactive-attach-v1 protocol, donmai-architecture/protocol/ interactive-attach-v1.md; owning ADR ADR-2026-07-12-interactive-pty-session-host.md).
harness/shell
Package shell is the minimal, interactive-only harness (W4): it spawns the user's own login shell ($SHELL, falling back to DefaultShell) under a PTY via provider/harness/ptycli.
Package shell is the minimal, interactive-only harness (W4): it spawns the user's own login shell ($SHELL, falling back to DefaultShell) under a PTY via provider/harness/ptycli.
harness/stub
Package stub provides a deterministic, in-process implementation of agent.Provider for tests, the F.4 smoke harness, and any caller that needs a real Provider with no external runtime dependencies.
Package stub provides a deterministic, in-process implementation of agent.Provider for tests, the F.4 smoke harness, and any caller that needs a real Provider with no external runtime dependencies.
Package ptyhost is the OSS PTY session host for the interactive-attach-v1 wire protocol (donmai-architecture/protocol/interactive-attach-v1.md; owning ADR ADR-2026-07-12-interactive-pty-session-host.md).
Package ptyhost is the OSS PTY session host for the interactive-attach-v1 wire protocol (donmai-architecture/protocol/interactive-attach-v1.md; owning ADR ADR-2026-07-12-interactive-pty-session-host.md).
Package result posts an agent.Result back to the Rensei platform at the end of a session.
Package result posts an agent.Result back to the Rensei platform at the end of a session.
Package rulesetsnapshot claim_eval.go — projects a cached, verified Snapshot onto the two questions the daemon's claim path (executioncell.EvaluateClaim, via daemon.ClaimGateProvider) needs answered when a live control plane cannot answer them itself:
Package rulesetsnapshot claim_eval.go — projects a cached, verified Snapshot onto the two questions the daemon's claim path (executioncell.EvaluateClaim, via daemon.ClaimGateProvider) needs answered when a live control plane cannot answer them itself:
Package runner orchestrates one agent session end-to-end.
Package runner orchestrates one agent session end-to-end.
access
Package access is the pure, DB-free OSS enforcement mirror of the platform's narrow-only model-access semantics (platform/src/lib/billing/access-policy.ts).
Package access is the pure, DB-free OSS enforcement mirror of the platform's narrow-only model-access semantics (platform/src/lib/billing/access-policy.ts).
runtime
activity
Package activity pushes per-session agent.Event values to the platform's /api/sessions/<id>/activity endpoint asynchronously.
Package activity pushes per-session agent.Event values to the platform's /api/sessions/<id>/activity endpoint asynchronously.
codeintelhost
Package codeintelhost implements a repository-bearing warm host for the donmai native code-intelligence engine (afclient/codeintel).
Package codeintelhost implements a repository-bearing warm host for the donmai native code-intelligence engine (afclient/codeintel).
env
Package env composes process environments for agent provider subprocesses.
Package env composes process environments for agent provider subprocesses.
executionevent
Package executionevent is the journal-first normalized runtime execution event source.
Package executionevent is the journal-first normalized runtime execution event source.
harnessstate
Package harnessstate is the single source of truth for the directories a session materializes INSIDE the checkout it works in.
Package harnessstate is the single source of truth for the directories a session materializes INSIDE the checkout it works in.
heartbeat
Package heartbeat sends per-session ownership-refresh pings to the platform and emits a 3-strike LostOwnership event when the platform stops accepting them.
Package heartbeat sends per-session ownership-refresh pings to the platform and emits a 3-strike LostOwnership event when the platform stops accepting them.
mcp
Package mcp builds per-session MCP configuration tmpfiles and ships a minimal in-box MCP client.
Package mcp builds per-session MCP configuration tmpfiles and ships a minimal in-box MCP client.
mcp/server
Package server implements the stdio MCP (Model Context Protocol) server that exposes the donmai code-intelligence engine (afclient/codeintel) as six MCP tools over newline-delimited JSON-RPC 2.0.
Package server implements the stdio MCP (Model Context Protocol) server that exposes the donmai code-intelligence engine (afclient/codeintel) as six MCP tools over newline-delimited JSON-RPC 2.0.
span
Package span turns normalized agent events into the additive per-call span contract and forwards completed spans without blocking the agent runtime.
Package span turns normalized agent events into the additive per-call span contract and forwards completed spans without blocking the agent runtime.
state
Package state owns the per-worktree .agent/state.json file used for session persistence and crash recovery.
Package state owns the per-worktree .agent/state.json file used for session persistence and crash recovery.
statehome
Package statehome is the single host-identity seam for deriving the daemon's on-disk state and log directories from one brand token.
Package statehome is the single host-identity seam for deriving the daemon's on-disk state and log directories from one brand token.
stepheartbeat
Package stepheartbeat emits a decoupled per-session step-liveness signal to the platform.
Package stepheartbeat emits a decoupled per-session step-liveness signal to the platform.
tokendelta
Package tokendelta implements the batched token-delta forwarder used by the interactive interview run-mode.
Package tokendelta implements the batched token-delta forwarder used by the interactive interview run-mode.
workarea
Package workarea owns provider-neutral workarea lifecycle primitives.
Package workarea owns provider-neutral workarea lifecycle primitives.
worktree
Package worktree provisions and tears down per-session git worktrees for the agent runner.
Package worktree provisions and tears down per-session git worktrees for the agent runner.
Package sessionshim implements per-session shim ownership and daemon adoption (ADR-2026-08-17).
Package sessionshim implements per-session shim ownership and daemon adoption (ADR-2026-08-17).
Package shimwire is the codec and closed message vocabulary for `session-shim-v1`, the local adoption protocol spoken between a per-session shim (which owns the harness process group and the PTY) and whichever daemon process is currently its controller.
Package shimwire is the codec and closed message vocabulary for `session-shim-v1`, the local adoption protocol spoken between a per-session shim (which owns the harness process group and the PTY) and whichever daemon process is currently its controller.
Package templates provides Go scaffolding for loading the YAML-based workflow template system that mirrors the TS implementation in packages/core/src/templates/ of the legacy TS monorepo (now donmai-libraries).
Package templates provides Go scaffolding for loading the YAML-based workflow template system that mirrors the TS implementation in packages/core/src/templates/ of the legacy TS monorepo (now donmai-libraries).
Package worker implements the donmai worker protocol: registration with the platform, work polling, heartbeat reporting, and multi-worker fleet process management.
Package worker implements the donmai worker protocol: registration with the platform, work polling, heartbeat reporting, and multi-worker fleet process management.

Jump to

Keyboard shortcuts

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