You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49434c9
Browse filesBrowse the repository at this point in the historyBrowse files
|[docs/architecture.md](docs/architecture.md)| Component responsibilities, a short issue-to-PR overview, configuration ownership, scheduler ownership, and shared state. | Start here to understand how the system is divided before locating implementation code. |
29
29
|[docs/bot-workflow.md](docs/bot-workflow.md)| Eight Mermaid diagrams and detailed implementation notes: startup and polling; discovery and routing; task phases; sessions and questions; media helpers; verification and publication; feedback, merging, and tab closure; status, retries, and recovery. Includes links to the source for each area. | Use for exact execution order, state transitions, checkpoint behavior, failure paths, and tracing a bot task from issue to merged PR. |
30
-
|[docs/configuration.md](docs/configuration.md)| The standard `.opencode/automation.json` format, defaults, setup flags, configuration tracking across Git branches, authors, triggers, checks, base branches, model capabilities, media helpers, custom prompts, signatures, and auto-merge settings. | Use when adding or changing user-facing configuration, defaults, or setup examples. |
30
+
|[docs/configuration.md](docs/configuration.md)| The standard `.opencode/automation.json` format, defaults, setup flags, configuration tracking across Git branches, repository file approvals, authors, triggers, checks, base branches, model capabilities, media helpers, custom prompts, signatures, and auto-merge settings. | Use when adding or changing user-facing configuration, defaults, or setup examples. |
31
31
|[docs/runtime.md](docs/runtime.md)| User-visible behavior while the bot runs: GitHub questions and permission replies, branch selection, media inputs, prompt loading, follow-up comments, session tabs, runtime sidebar/status freshness, host repository inventory and discovery, local task closure, cancelling rounds while retaining tracking, and routine management commands. | Use when changing issue conversations, session continuation, runtime tools, or TUI behavior. |
32
32
|[docs/advanced.md](docs/advanced.md)| Separate scheduler/dispatcher setup, multiple repositories, custom RPC jobs, full options, timeouts, management and retry commands, persistence, reconciliation, locks, and known limits. | Use for low-level configuration, operational troubleshooting, recovery, or ownership/concurrency changes. |
33
33
|[docs/installation.md](docs/installation.md)| Loader registration, config-directory precedence, prerequisites, source installation, project-local installation, upgrade conflicts, testing on another machine, and migration limits. | Use when working on packaging, installers, registration, upgrades, or deployment troubleshooting. |
@@ -72,6 +72,8 @@ the installation block without making remote writes. Keep its markers intact.
72
72
-`src/runtime.ts`, `src/worker.ts`, and `src/bridge.ts` implement worker hooks,
73
73
runtime installation, and communication with the owner. `src/prompt.ts` loads
74
74
instructions; `prompts/bot.md` contains the bundled bot instructions.
75
+
`src/repository-permissions.ts` checks canonical path boundaries for opt-in
76
+
repository file approvals; `src/runtime.ts` applies them only to bot sessions.
75
77
-`src/tui.ts`, `src/ui.ts`, and `src/activity.ts` implement terminal integration
76
78
and task activity. `src/sidebar.ts` renders the runtime panel;
77
79
`src/runtime-panel.ts` owns polling, freshness and presentation;
Copy file name to clipboardExpand all lines: docs/advanced.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ OpenCode service must be running for polling to work.
29
29
|`ownerDirectory`| Absolute path of the checkout that owns automation. Worker worktrees do not activate another scheduler. |
30
30
|`stateDirectory`| Shared location for queues, locks, and worktrees. Keep it consistent across components and restarts. |
31
31
|`repositories`| Repositories with existing local checkouts, default base branches, allowed authors, and checks. A natural-language request can override the base before work starts. |
32
+
|`repositories[].autoApproveRepositoryFiles`| Opt-in file-access approval for that repository and the assigned task worktree, including worktrees outside the checkout. Defaults off; does not approve shell commands. |
32
33
|`allowedAuthors`| GitHub users authorized to request work and approve merging. Merging also requires repository write access. |
33
34
|`checks`| Arrays of executable arguments, e.g. `[["npm", "test"]]`. `[]` skips dispatcher test commands; the PR distinguishes this from agent-reported tests. No implicit shell. |
34
35
|`routes`| Maps full mentions to agents and models available in OpenCode. |
@@ -47,8 +48,9 @@ OpenCode service must be running for polling to work.
47
48
Other plugins can expose idempotent RPC methods for custom scheduler jobs. A
48
49
transport timeout does not prove the server never executed a request.
49
50
50
-
The executor uses the configured OpenCode permissions. Interactive permission
51
-
requests are posted to the issue and suspend the task. An authorized author must
51
+
The executor uses the configured OpenCode permissions. The optional repository
52
+
file policy handles eligible `ask` decisions first; see
53
+
[repository file approvals](configuration.md#repository-file-approvals). Remaining requests are posted to the issue and suspend the task. An authorized author must
52
54
reply with the exact `/allow QUESTION_ID` or `/deny QUESTION_ID` command. Explicit
53
55
OpenCode deny rules remain. Install project dependencies before running it or
Copy file name to clipboardExpand all lines: docs/configuration.md
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ Use a model available in your own OpenCode 2 installation. Optional fields:
53
53
54
54
| Field | Purpose |
55
55
| --- | --- |
56
+
|`autoApproveRepositoryFiles`| Opt-in automatic `external_directory`, `read`, and `edit` approval within this repository and its assigned task worktree; omitted/`false` keeps existing permission behavior. Shell rules are unchanged. |
56
57
|`baseBranch`| Base for new worktrees and PRs; defaults to the GitHub default branch. |
57
58
|`capabilities`| Main model support: `text`, `vision`, `audio`; defaults to `["text"]`. |
58
59
|`mediaModel`| Separate helper model and its capabilities; example below. |
@@ -80,11 +81,53 @@ cd /absolute/path/to/your-project
0 commit comments