Documentation
¶
Overview ¶
Package config loads a project's `.orchestrator/config.yaml` into a typed struct with defaults filled in.
The file format is a compatibility contract: an existing project must keep working when its owner swaps the Python orch for the Go one. Two rules follow from that, and they pull in opposite directions:
- Keys the Go tree no longer implements are IGNORED, with one warning each, once. Failing on `findings.publish_repo` would break a project whose config was written by a version that had findings.
- `state.backend: file` is the single exception. The file backend is gone (ADR-G4), so silently treating it as sqlite would point orch at an empty database and report a project with no history. That is an error with the migration command in it.
Every key, its default and the ignored-key list are documented in docs/CONFIG.md — keep the two in step.
Defaults come from three places that must agree, and did not: `orchestrator/config.yaml`, `config_loader._apply_defaults`, and the four templates. Where they disagreed the packaged file won, and the disagreement was fixed in Python first (PR #102). `testdata/*.effective.yaml` holds what Python actually produces for eight inputs; `TestMatchesPythonGoldens` is the check that the two loaders still agree.
Index ¶
- Constants
- Variables
- func DefaultProjectID(root string) string
- func IsSecret(key string) bool
- func Set(path, projectRoot string, values map[string]string) error
- func Show(w io.Writer, res Result) error
- func Unset(path, projectRoot string, keys []string) error
- type Branding
- type Budget
- type Concurrency
- type Config
- type Dashboard
- type Dispatch
- type Evidence
- type EvidencePublish
- type Gate
- type GitHub
- type Guard
- type Knowledge
- type MergeQueue
- type Notifications
- type Paths
- type Portal
- type Presentation
- type Publish
- type ReportFindings
- type Result
- type Retry
- type RetryRule
- type State
- type StateLayout
- type Sync
- type Telemetry
- type Tunnel
- type Update
- type VCS
- type Verify
- type VerifyApp
- type VerifyProbe
- type Watch
Constants ¶
const DefaultSyncIssuesLabel = "orch:task"
DefaultSyncIssuesLabel is the label `orch sync issues` reads when neither --label nor `sync.issues_label` says otherwise.
Namespaced on purpose: `orch:task` is a label a human adds to say "this issue is work for orch", and the prefix keeps it from colliding with the `bug` / `enhancement` labels a repo already uses for its own triage.
const VCSProviderLocal = "local"
VCSProviderLocal is vcs.provider's value for a repository with no forge: each finished task is squash-merged into the base branch locally, nothing is pushed and no PR is opened (#455).
Variables ¶
var DefaultPortalDocuments = []string{"docs/prd/*.md", "docs/arch/*.md", "specs/f*.md"}
DefaultPortalDocuments is what `portal.documents` lists when a project says nothing: the PRDs, architectures and specs the planning pipeline writes. `specs/f*.md` rather than `specs/*.md`: orch-spec names specs fN-slug.md, and the folder's README is about the folder, not the project.
var ErrFileBackend = errors.New(
"state.backend: file is no longer supported — the JSONL backend was " +
"removed. Import the existing state with `orch migrate`, then set " +
"state.backend: sqlite (or drop the key: sqlite is the default)")
ErrFileBackend is returned when a config still asks for the JSONL file backend. It is the one key whose removal is an error rather than a warning: the file backend is gone (ADR-G4), and quietly treating it as sqlite would open an empty database and report a project with no history.
Functions ¶
func DefaultProjectID ¶
DefaultProjectID derives an id from the root's basename, skipping the generic names. Returns "unknown" at the filesystem root, because something has to be loggable.
func IsSecret ¶
IsSecret reports a key whose value is a credential: the stakeholder token and the notification webhooks (a webhook URL is enough to post). Whatever prints config says whether they are set, never what they are.
func Set ¶
Set writes each dotted key's value into the config file at path — the one function behind `orch config set` and the dashboard's Settings page. Values arrive as text and are typed by the Config field the key names, so `tunnel.enabled true` is a bool and `concurrency.global_max 3` an int.
It is all or nothing: an unknown key, a value of the wrong type, or a result that config.Load refuses (a stakeholder profile with no token, say) leaves the file untouched. The file is edited as a YAML tree, so comments, key order and every key it does not touch survive.
func Show ¶
Show writes the effective config — defaults, file, and any override merged — to w as YAML, followed by the sources it came from and any warnings.
Exported as a plain function rather than a cobra command so the wiring can land separately from the logic; `orch config show` is a three-line command on top of this.
The point of the command is answering "why is orch doing that?" when a value is surprising, so it prints the SOURCES as well as the values. A config dump that does not say where a value came from sends you looking in the wrong file.
Types ¶
type Branding ¶
type Branding struct {
// Name replaces the project name in a client-facing header. The project's
// own `meta.project` stays what it is; this is what the client reads.
Name string `yaml:"name"`
// Logo is a path to a local image file, or a `data:` URI already. A path
// is read and embedded at build time — the document must stand alone, so
// nothing in it may point at a file the viewer cannot reach.
Logo string `yaml:"logo"`
// AccentColor is `#rgb` or `#rrggbb`. Anything else is a config error
// rather than a silently ignored value: a colour that does not apply is
// invisible, and the operator would go looking in the wrong place.
AccentColor string `yaml:"accent_color"`
// confidentiality note.
Footer string `yaml:"footer"`
}
Branding is the white-label block (F3.5): what an agency puts on the snapshot, the stakeholder bundle and the PDF so a client sees their own name rather than ours.
Every field is optional and the zero value changes nothing — a project without this block produces the same bytes it produced before the block existed, which is the property that makes it safe to add to a document with a frozen schema.
func (Branding) Configured ¶
Configured reports whether anything was set. The zero block is the "no branding" case every caller has to distinguish, so it has a name rather than four comparisons repeated at each site.
type Budget ¶
type Budget struct {
PerDispatchUSD float64 `yaml:"per_dispatch_usd"`
// PerDispatchExplicit reports whether config.yaml (or dashboard.yaml)
// wrote `budget.per_dispatch_usd` itself, read from the parsed YAML
// mapping rather than inferred from the value. Only an explicit value is
// sent to claude as --max-budget-usd; the default only limits escalation.
PerDispatchExplicit bool `yaml:"-"`
}
Budget is the per-dispatch cap handed to the provider CLI. The rolling window guardrail lives in budgets.yaml, not here.
type Concurrency ¶
type Concurrency struct {
GlobalMax int `yaml:"global_max"`
PerProvider map[string]int `yaml:"per_provider"`
PerFile int `yaml:"per_file"`
}
Concurrency caps in-flight dispatches. `global_max` is the hard ceiling across every backend; `per_provider` is a second gate per backend name.
type Config ¶
type Config struct {
Concurrency Concurrency `yaml:"concurrency"`
StrictFilesPhases []int `yaml:"strict_files_phases"`
DefaultTimeoutMult float64 `yaml:"default_timeout_multiplier"`
Budget Budget `yaml:"budget"`
Retry Retry `yaml:"retry"`
SpecRoot string `yaml:"spec_root"`
State State `yaml:"state"`
BudgetsConfig string `yaml:"budgets_config"`
BudgetsPreset string `yaml:"budgets_preset"`
TypicalDispatchToken int `yaml:"typical_dispatch_tokens"`
Dashboard Dashboard `yaml:"dashboard"`
Dispatch Dispatch `yaml:"dispatch"`
VCS VCS `yaml:"vcs"`
GitHub GitHub `yaml:"github"`
Notifications Notifications `yaml:"notifications"`
Presentation Presentation `yaml:"presentation"`
Publish Publish `yaml:"publish"`
Tunnel Tunnel `yaml:"tunnel"`
Telemetry Telemetry `yaml:"telemetry"`
Sync Sync `yaml:"sync"`
ReportFindings ReportFindings `yaml:"report_findings"`
Portal Portal `yaml:"portal"`
Verify Verify `yaml:"verify"`
Evidence Evidence `yaml:"evidence"`
Update Update `yaml:"update"`
Knowledge Knowledge `yaml:"knowledge"`
Guard Guard `yaml:"guard"`
Gate Gate `yaml:"gate"`
Watch Watch `yaml:"watch"`
// Radar is the conflict radar (#482): what orch does when a task about to
// dispatch declares files a running task also declares — warn records a
// files_overlap event and dispatches, serialize holds the task until the
// other finishes, off does neither — and whether a new PR is checked for
// conflicts with the other open ones (any value but off).
Radar string `yaml:"radar"`
// SemanticChecks are the semantic collision rules (#522): identities a
// branch adds that the base or another open branch already claims —
// two migrations numbered 005 — which git merges without a conflict.
// Checked when a PR opens (always a warning), before an auto-merge and
// before a local land (each rule's mode). Empty by default.
SemanticChecks []collide.Rule `yaml:"semantic_checks"`
// MergeQueue merges green task PRs one at a time, in order, each brought
// up to date with the base and re-verified first (#522).
MergeQueue MergeQueue `yaml:"merge_queue"`
}
Config is the whole of `config.yaml` after defaults are applied.
Every field carries a yaml tag even when it matches the field name, so the wire format is legible from the struct alone rather than from Go's lowercasing rules.
func Defaults ¶
func Defaults() Config
Defaults returns the config a project gets with an empty `config.yaml`.
These mirror `config_loader._apply_defaults` in the Python tree, with three deliberate differences, each of which has a reason:
- state.backend is "sqlite". Python has no default at all for it, and every read site falls back to "file". Go has one backend.
- findings.* is absent. The feature is dropped.
- publish.* is new, and nothing reads it yet.
type Dashboard ¶
type Dashboard struct {
Profile string `yaml:"profile"`
Token string `yaml:"token"`
ShowSpendToStakeholder bool `yaml:"show_spend_to_stakeholder"`
SummaryLanguage string `yaml:"summary_language"`
// Language is the client-facing language (en, es or pt): the executive
// summary, the portal and the PDF report. summary_language is its older
// name; validate resolves both into the same value.
Language string `yaml:"language"`
}
Dashboard is the subset of the Python dashboard config the Go tree keeps. Kanban defaults are dropped; a config carrying them loads fine and they are ignored. The legacy nested `dashboard.tunnel` block is dropped too (see droppedKeys in load.go) — it moved to the top-level Tunnel type below (G5.6).
type Dispatch ¶
type Dispatch struct {
WorktreeMode bool `yaml:"worktree_mode"`
BaseBranch string `yaml:"base_branch"`
// WorktreeSetup is a shell command run inside each fresh worktree before
// the agent starts, e.g. `pnpm install --frozen-lockfile` (#324). Go only.
WorktreeSetup string `yaml:"worktree_setup"`
// IsolateCompose gives each dispatched task its own docker compose
// project (COMPOSE_PROJECT_NAME), so parallel worktrees do not recreate
// or remove each other's containers (#343). On by default. Go only.
IsolateCompose bool `yaml:"isolate_compose"`
// TDD tells every dispatched agent to work test-first (the orch-tdd
// skill), and has the local verify send back a change that touches no
// test file. Off by default. Go only.
TDD bool `yaml:"tdd"`
// Sandbox confines every dispatched agent with Landlock to its worktree,
// the project's database, its CLI's own config and read-only toolchains
// (#481). Linux only; `orch run` refuses to start when it is on and the
// kernel cannot enforce it. Off by default. Go only.
Sandbox bool `yaml:"sandbox"`
// MinFreeDiskMB holds back a new dispatch in worktree mode while the
// project's disk has less free space than this (#497). 0, the default
// for a config without the key, never holds one. Go only.
MinFreeDiskMB int `yaml:"min_free_disk_mb"`
// UnestimatedTimeoutM is the timeout, in minutes, of a task with no
// estimateHours — every task `orch sync issues` creates (#529). 0, the
// default for a config without the key, means 60. Go only.
UnestimatedTimeoutM int `yaml:"unestimated_timeout_m"`
// SandboxAllow are extra paths a sandboxed agent may read and write, `~/`
// meaning $HOME: what a hook or tool of the operator's own needs.
SandboxAllow []string `yaml:"sandbox_allow"`
}
Dispatch controls per-task git isolation.
type Evidence ¶ added in v0.31.0
type Evidence struct {
// PRComment posts the evidence on the task's PR as one comment, edited
// on every push. On in a new project (orch init writes true); absent =
// off, so an upgrade never starts writing to a project's PRs.
PRComment *bool `yaml:"pr_comment"`
// KeepAttempts is how many verified attempts a task keeps, the pushed
// one included and never pruned; 0 means 3. Pruned when `orch run`
// ends.
KeepAttempts int `yaml:"keep_attempts"`
// MaxBytesPerTask caps a task's kept E2E files, oldest attempts going
// first; 0 means 200 MiB, below 0 no cap.
MaxBytesPerTask int64 `yaml:"max_bytes_per_task"`
// Video is ORCH_E2E_VIDEO for the E2E commands — Playwright's video
// mode (on, retain-on-failure, on-first-retry, off) for a config that
// reads it; "" means retain-on-failure. orch never edits the project's
// Playwright config.
Video string `yaml:"video"`
// Publish is what of the evidence reaches the client page.
Publish EvidencePublish `yaml:"publish"`
}
Evidence is the per-task evidence bundle the local verify leaves (#520): <state>/evidence/<task>/evidence.json and what is shown from it.
func (Evidence) CommentsOnPRs ¶ added in v0.31.0
CommentsOnPRs reports whether evidence.pr_comment is on.
type EvidencePublish ¶ added in v0.31.0
type EvidencePublish struct {
// Video shows the @evidence walk-through's video and screenshot on the
// client page. Off by default: a video cannot be scanned for what it
// shows, so publishing it is the operator's decision.
Video bool `yaml:"video"`
// MaxVideoBytes leaves a bigger video out (its screenshot still
// shows); 0 means 4 MiB.
MaxVideoBytes int64 `yaml:"max_video_bytes"`
}
EvidencePublish is what `orch publish` and the dashboard's client page show of the evidence (#520 §3.4).
func (EvidencePublish) MaxVideo ¶ added in v0.31.0
func (p EvidencePublish) MaxVideo() int64
MaxVideo is evidence.publish.max_video_bytes with its default.
type Gate ¶
type Gate struct {
// CriticalPaths make a task that declares a file they name critical,
// in place of the built-in Supabase layout. Empty keeps the built-in one.
CriticalPaths []string `yaml:"critical_paths"`
}
Gate is the semi-mode gate's own configuration (#503).
type Guard ¶
type Guard struct {
// Secrets: known token formats, private keys, .env files.
Secrets string `yaml:"secrets"`
// Debug: console.log, debugger, breakpoint() and the like.
Debug string `yaml:"debug"`
// Protected: any change to a file ProtectedPaths names (#504), for
// credentials no token format can match.
Protected string `yaml:"protected"`
ProtectedPaths []string `yaml:"protected_paths"`
}
Guard checks a task's diff after its agent exits cleanly and before orch pushes it (#484). Each rule is block (the task is blocked, nothing is pushed), warn (the PR body lists it) or off. Worktree mode only.
type Knowledge ¶
type Knowledge struct {
Enabled bool `yaml:"enabled"`
// MaxInPrompt is how many lessons a prompt carries; 0 means 5.
MaxInPrompt int `yaml:"max_in_prompt"`
// AutoCapture lets orch write draft lessons from what it saw: a verify
// rejection the next attempt fixed, a conflict the agent resolved. Nil
// (absent) means on.
AutoCapture *bool `yaml:"auto_capture"`
// CurateEvery runs `orch knowledge curate` at the end of an `orch run`
// once this many lessons were added since the last curation (#452); 0
// (absent) never does.
CurateEvery int `yaml:"curate_every"`
}
Knowledge is the project memory (#451): lessons under .orch/knowledge/ that later tasks get in their prompt. Off when the key is absent; orch init and orch start write it on.
type MergeQueue ¶ added in v0.31.0
type MergeQueue struct {
Enabled bool `yaml:"enabled"`
// Reverify is when_base_moved (the default: a PR whose base moved since
// it was verified gets the base merged in and the local verify run again,
// without the LLM review) or never (the base is merged in and CI alone
// judges the result).
Reverify string `yaml:"reverify"`
}
MergeQueue is the merge_queue section (#522). Off by default: orch merges each green PR as its CI passes, as before. On, it needs github.auto_merge.
type Notifications ¶
type Notifications struct {
SlackWebhook string `yaml:"slack_webhook"`
DiscordWebhook string `yaml:"discord_webhook"`
TimeoutS int `yaml:"timeout_s"`
// BudgetAlerts announces a provider's budget window at BudgetAlertPct of
// its cap and again when it reaches the cap. On by default, which costs
// nothing without a webhook. Go only.
BudgetAlerts bool `yaml:"budget_alerts"`
BudgetAlertPct float64 `yaml:"budget_alert_pct"`
}
Notifications are fire-and-forget webhooks. An empty URL disables that channel; a failing webhook never surfaces into the dispatch loop.
type Paths ¶
type Paths struct {
// Root is the project directory: the one holding tasks.json, scripts/
// and .orchestrator/.
Root string
// ID identifies the project in the database and in logs. Several
// projects can share one orch.db, keyed by this.
ID string
// ConfigYAML is the config file, normally .orchestrator/config.yaml.
ConfigYAML string
// Layout decides the shape of StateDir. See ResolvePaths.
Layout StateLayout
}
Paths is where one project keeps its files. Ported from `orchestrator/paths.py`, which every Python entry point routes through, so the two implementations look in the same places.
func ResolvePaths ¶
ResolvePaths works out where everything is, mirroring `paths.resolve_project_paths`.
Precedence for the root: the argument, then ORCH_PROJECT_ROOT, then the working directory. Same for the id via ORCH_PROJECT_ID, falling back to the root's basename.
Whether the root was given EXPLICITLY (by argument or env) is not just bookkeeping: it selects the state layout. Running orch from inside a project keeps the legacy flat layout; pointing orch at a project from elsewhere gets a namespaced one. State is never migrated between the two — a project that started flat stays flat, because moving it would strand the run files an interrupted run needs to resume.
func (Paths) DivergentDatabases ¶
DivergentDatabases reports a legacy and a namespaced orch.db coexisting under one project. Issue #84: the CLI wrote one and the dashboard read the other, so the operator saw two different truths with no error anywhere. Returns the two paths, or empty strings when there is no divergence.
func (Paths) SQLitePath ¶
SQLitePath resolves `state.sqlite_path` against the state dir, as Python's `_resolve_sqlite_path` does: absolute wins, relative hangs off the state dir, empty means `<state dir>/orch.db`.
type Portal ¶
type Portal struct {
// Documents are globs, relative to the project root, of the markdown
// files a client may read — by default what the orch-plan pipeline
// writes. An empty list publishes no documents.
Documents []string `yaml:"documents"`
}
Portal configures what the client portal (`orch publish`) shows beyond the project's status.
type Presentation ¶
type Presentation struct {
StatusLabels map[string]string `yaml:"status_labels"`
Branding Branding `yaml:"branding"`
}
Presentation renames statuses for display. Internal status values never change — this is the label the client reads.
type Publish ¶
type Publish struct {
// IntervalS is how often `orch publish --watch` re-exports while a run
// is in flight.
IntervalS int `yaml:"interval_s"`
// To is the destination: "dir", "git" or "cloud".
To string `yaml:"to"`
// Dir is the output directory for `to: dir`.
Dir string `yaml:"dir"`
// GitBranch is the branch pushed for `to: git` — typically gh-pages.
GitBranch string `yaml:"git_branch"`
}
Publish is new in Go (blueprint F2). Nothing reads it yet; it ships now so a project's config does not need rewriting when `orch publish` lands, and so the key is reserved against a name collision.
type ReportFindings ¶
type ReportFindings struct {
Enabled bool `yaml:"enabled"`
}
ReportFindings lets agents report bugs in orch itself through the MCP tool orch_report_finding. A report is queued, redacted, for the operator, who previews it and sends it as a Guria-Studio/orch issue with their own `gh` (`orch findings`, or the dashboard's Findings page); nothing is public before that (#536).
On in new projects: `orch init` and `orch start` ask once, yes by default, and write the answer (#399, #536). Off when the key is absent, so a project from before never starts reporting on an upgrade. Go only, no Python source.
type Result ¶
type Result struct {
Config Config
// Warnings are one line per ignored key, already de-duplicated and
// sorted. The caller prints them once at startup; they are never fatal.
Warnings []string
// Sources lists the files that contributed, in the order they were
// merged. Useful in `orch config show` and when a value is surprising.
Sources []string
}
Result is a loaded config plus everything worth telling the operator once.
func Load ¶
Load reads `path`, deep-merges a project-root `dashboard.yaml` over it when one exists (the H-2 compatibility path), applies defaults, and validates.
projectRoot may be empty, in which case the directory containing `path` is used — matching `config_loader.load_config`.
A missing file is not an error: a project with no config gets the defaults, which is what `orch init` without a template produces anyway.
type Retry ¶
type Retry struct {
// Legacy scalars. Kept for compatibility, not deprecated: they are the
// concise way to say "the same everywhere".
MaxAttempts int `yaml:"max_attempts"`
BackoffSeconds float64 `yaml:"backoff_seconds"`
RateLimitBackoffSeconds float64 `yaml:"rate_limit_backoff_seconds"`
Transient RetryRule `yaml:"transient"`
Timeout RetryRule `yaml:"timeout"`
RateLimit RetryRule `yaml:"rate_limit"`
VersionDrift RetryRule `yaml:"version_drift"`
CIFailed RetryRule `yaml:"ci_failed"`
// Conflict caps the agent dispatches that resolve a PR conflicting with
// its base (#438); only max_attempts is read. Absent is off; init and
// start write 1.
Conflict RetryRule `yaml:"conflict"`
}
Retry is the declarative policy F4.6 asks for: one rule per failure class, replacing the reaper's hardcoded numbers.
The two scalars Python ships (`backoff_seconds`, `rate_limit_backoff_seconds`) are still read, and seed the per-class defaults — an existing config keeps behaving the same way without being rewritten. A per-class block always wins over the scalar that seeded it.
Class names match `FailureClass` in dispatcher.py, lowercased. `ci_failed` has no enum member there because CI failure is decided by the VCS poller, not by classifying a subprocess; it is a retry class all the same.
type RetryRule ¶
type RetryRule struct {
MaxAttempts *int `yaml:"max_attempts,omitempty"`
BackoffSeconds *float64 `yaml:"backoff_seconds,omitempty"`
// EscalateModel re-dispatches on the next tier up instead of the same
// model. Meaningful for version_drift, where retrying the same CLI with
// the same model reproduces the same failure.
EscalateModel *bool `yaml:"escalate_model,omitempty"`
}
RetryRule is one failure class's policy. Pointers because "absent" and "explicitly zero" mean different things: `max_attempts: 0` is "never retry this class", which is not the same as "inherit the default".
func (RetryRule) Attempts ¶
Attempts returns the rule's max attempts, falling back to the policy-wide scalar.
type State ¶
State points at the SQLite database. `backend` is accepted only as "sqlite" or absent — see the package comment.
type StateLayout ¶
type StateLayout string
StateLayout is where state lives under `.orchestrator/state/`.
const ( // LayoutLegacy puts state directly in `.orchestrator/state/`. This is // what a project gets when orch is run from inside it with no explicit // root — the historical shape, and the common one. LayoutLegacy StateLayout = "legacy" // LayoutNamespaced puts it in `.orchestrator/state/<project-id>/`. // Chosen when the root was given explicitly, which is the multi-project // case: without the namespace, two projects would collide on run files, // event logs and the lock. LayoutNamespaced StateLayout = "namespaced" )
type Sync ¶
type Sync struct {
// IssuesLabel is the GitHub issue label `orch sync issues` ingests
// when --label is not passed.
IssuesLabel string `yaml:"issues_label"`
}
Sync configures `orch sync`, which brings work in from a tracker.
New in Go: Python has no `sync` verb, so this key is not a port and no Python config file has ever contained it.
type Telemetry ¶
type Telemetry struct {
Enabled bool `yaml:"enabled"`
// Endpoint overrides internal/telemetry's own default (empty until a
// real collector exists — see that package's defaultEndpoint). Most
// projects never set this; it exists for a self-hosted collector or a
// future default once one is chosen.
Endpoint string `yaml:"endpoint"`
}
Telemetry controls the anonymous, opt-in usage ping G8.6 (F4.9) adds — see internal/telemetry's own package doc for exactly what one event carries (never a path, a prompt, a task id, or a project id/name) and docs/TELEMETRY.md for the field list as shipped documentation.
Off by default (Enabled's zero value). The standard `DO_NOT_TRACK` environment variable always overrides Enabled — see internal/telemetry.DoNotTrack — so there is no config knob for it: an environment variable a project's own config.yaml cannot see is the point.
type Tunnel ¶
type Tunnel struct {
Enabled bool `yaml:"enabled"`
// URLParseTimeoutS is how long to wait for cloudflared's URL line before
// reporting url_parse_timeout; 0 means 30.
URLParseTimeoutS int `yaml:"url_parse_timeout_s"`
}
Tunnel configures the dashboard's optional public URL, a Cloudflare quick tunnel (internal/tunnel). There is nothing to choose: `enabled: true` is the whole configuration, and the removed provider keys are refused at load (removedTunnelKeys in load.go).
type Update ¶
type Update struct {
CheckCLIs bool `yaml:"check_clis"`
}
Update is about the agent CLIs orch dispatches to (#448): whether `orch doctor`, `orch run` and the dashboard's Tools page compare each one with its latest release on the npm registry (once a day, cached in ~/.orch) and say how to update it. orch never updates a CLI itself.
type VCS ¶
type VCS struct {
Provider string `yaml:"provider"`
Host string `yaml:"host"`
AutoPR bool `yaml:"auto_pr"`
CIMaxRetries int `yaml:"ci_max_retries"`
CIPollIntervalS int `yaml:"ci_poll_interval_s"`
}
VCS drives PR creation and CI polling through the `gh` / `glab` CLIs, or, with Provider "local", merges finished tasks into the base here.
type Verify ¶
type Verify struct {
Enabled bool `yaml:"enabled"`
// Commands run in order at the worktree root, each through `sh -c`.
// Empty means what `orch ci setup` detects: install, lint, typecheck,
// test and build, per package, where the repository has them.
Commands []string `yaml:"commands"`
// Review runs the LLM review after the commands pass.
Review bool `yaml:"review"`
// Reviewer is the backend that reviews. Empty means the first installed
// one of claude, gemini, codex, opencode that is not the task's own; a
// Reviewer that wrote the task gives way to another (#539).
Reviewer string `yaml:"reviewer"`
ReviewModel string `yaml:"review_model"`
// Checklist is the review's markdown checklist, relative to the project
// root. Empty means .orch/review.md, then .github/orch-review.md, then
// the built-in one.
Checklist string `yaml:"checklist"`
// App starts the task's app for E2E, and E2E are the commands that test
// it while it runs, with ORCH_APP_URL set.
App VerifyApp `yaml:"app"`
E2E []string `yaml:"e2e"`
// E2EReport is the Playwright JSON report the E2E commands write,
// relative to the worktree. Set, verify keeps the results and what the
// tests left (screenshots, videos, traces) under the state directory.
E2EReport string `yaml:"e2e_report"`
// MaxAttempts is how many times a task is sent back before it is blocked.
MaxAttempts int `yaml:"max_attempts"`
// TimeoutS bounds each command, and the review.
TimeoutS int `yaml:"timeout_s"`
}
Verify checks an agent's work in its worktree after it exits cleanly and before orch pushes it: the repository's own checks, then a read-only review by another provider. A failure sends the task back to its agent with what failed; only work that passes is pushed. Worktree mode only. Off when the block is absent.
type VerifyApp ¶
type VerifyApp struct {
// Start brings the app up and returns, e.g. `docker compose up -d`.
Start string `yaml:"start"`
// URL is where the app answers once it is up, expanded by the shell with
// the task's environment: `http://localhost:$((3000 + ORCH_TASK_SLOT))`.
URL string `yaml:"url"`
// Stop takes it down again, always, e.g. `docker compose down -v`.
Stop string `yaml:"stop"`
// ReadyTimeoutS is how long the app has to answer at URL.
ReadyTimeoutS int `yaml:"ready_timeout_s"`
// Probes check what the app serves once it answers, before verify.e2e
// (#520): a page that answers 200 with "not built" is not ready.
Probes []VerifyProbe `yaml:"probes"`
}
VerifyApp is how the local verify runs the task's app: each command through `sh -c` in the worktree, with the task's environment, so ports and compose projects follow ORCH_TASK_SLOT and COMPOSE_PROJECT_NAME.
type VerifyProbe ¶ added in v0.31.0
type VerifyProbe struct {
// Path is appended to verify.app.url, e.g. /dashboard.
Path string `yaml:"path"`
// Status is the status the answer must have; 0 accepts anything below
// 400.
Status int `yaml:"status"`
// Contains must all appear in the body; NotContains must not.
Contains []string `yaml:"contains"`
NotContains []string `yaml:"not_contains"`
}
VerifyProbe is one GET against the task's app and what its answer must hold.
type Watch ¶
type Watch struct {
Enabled bool `yaml:"enabled"`
// StallAfterS is how long a silent log takes to count as stalled; 0
// leaves stalls unreported.
StallAfterS int `yaml:"stall_after_s"`
// Liveness looks past a silent log before calling an agent stalled
// (#524): its process group using CPU or doing I/O, or files growing in
// its worktree and DataDirs, make it waiting (agent_waiting), not stuck.
Liveness bool `yaml:"liveness"`
// DataDirs are more directories whose growth counts as the agent's work,
// relative to the project root or absolute (a download cache, say).
DataDirs []string `yaml:"data_dirs"`
// MinCPUPct is the share of one core, over a 30 s watch, that counts as
// the agent's processes working; an idle CLI uses less.
MinCPUPct float64 `yaml:"min_cpu_pct"`
}
Watch is the agent watch (#487): while an attempt runs, orch reads its log and records agent_stalled and agent_looping events. It never stops one.