Skip to content

Commit 1770162

Browse files
chore: generate
1 parent 0efc616 commit 1770162

3 files changed

Lines changed: 39 additions & 26 deletions

File tree

packages/opencode/src/cli/cmd/agent.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@ type AgentMode = "all" | "primary" | "subagent"
1818
// Permission keys (not raw tool names). Multiple tools can map to a single
1919
// permission — e.g. write/edit/apply_patch all gate on `edit` — so we configure
2020
// agents at the permission level to match how the runtime actually enforces it.
21-
const AVAILABLE_PERMISSIONS = ["bash", "read", "edit", "glob", "grep", "webfetch", "task", "todowrite", "websearch", "codesearch", "lsp", "skill"]
21+
const AVAILABLE_PERMISSIONS = [
22+
"bash",
23+
"read",
24+
"edit",
25+
"glob",
26+
"grep",
27+
"webfetch",
28+
"task",
29+
"todowrite",
30+
"websearch",
31+
"codesearch",
32+
"lsp",
33+
"skill",
34+
]
2235

2336
const AgentCreateCommand = cmd({
2437
command: "create",

packages/web/src/content/docs/agents.mdx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -421,24 +421,24 @@ You can configure permissions to manage what actions an agent can take. Each per
421421

422422
The available permission keys are:
423423

424-
| Key | Tools it gates |
425-
| -------------------- | ----------------------------------------------------------------------------- |
426-
| `read` | `read` |
427-
| `edit` | `write`, `edit`, `apply_patch` |
428-
| `glob` | `glob` |
429-
| `grep` | `grep` |
430-
| `list` | `list` |
431-
| `bash` | `bash` |
432-
| `task` | `task` |
433-
| `external_directory` | Any tool that reads or writes files outside the project worktree |
434-
| `todowrite` | `todowrite`, `todoread` |
435-
| `webfetch` | `webfetch` |
436-
| `websearch` | `websearch` |
437-
| `codesearch` | `codesearch` |
438-
| `lsp` | `lsp` |
439-
| `skill` | `skill` |
440-
| `question` | `question` |
441-
| `doom_loop` | Recovery prompts when an agent appears stuck |
424+
| Key | Tools it gates |
425+
| -------------------- | ---------------------------------------------------------------- |
426+
| `read` | `read` |
427+
| `edit` | `write`, `edit`, `apply_patch` |
428+
| `glob` | `glob` |
429+
| `grep` | `grep` |
430+
| `list` | `list` |
431+
| `bash` | `bash` |
432+
| `task` | `task` |
433+
| `external_directory` | Any tool that reads or writes files outside the project worktree |
434+
| `todowrite` | `todowrite`, `todoread` |
435+
| `webfetch` | `webfetch` |
436+
| `websearch` | `websearch` |
437+
| `codesearch` | `codesearch` |
438+
| `lsp` | `lsp` |
439+
| `skill` | `skill` |
440+
| `question` | `question` |
441+
| `doom_loop` | Recovery prompts when an agent appears stuck |
442442

443443
`read`, `edit`, `glob`, `grep`, `list`, `bash`, `task`, `external_directory`, `lsp`, and `skill` accept either a shorthand action (`"allow" | "ask" | "deny"`) or an object of glob/pattern → action for fine-grained control. The remaining keys accept the shorthand action only.
444444

packages/web/src/content/docs/cli.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ This command will guide you through creating a new agent with a custom system pr
9797

9898
#### Flags
9999

100-
| Flag | Description |
101-
| ---------------- | ---------------------------------------------------------------------------------------------------------- |
102-
| `--path` | Directory to write the agent file to (defaults to global or `.opencode/agent` based on the prompt) |
103-
| `--description` | What the agent should do |
104-
| `--mode` | Agent mode: `all`, `primary`, or `subagent` |
105-
| `--permissions` | Comma-separated list of permissions to allow (default: all). Available: `bash`, `read`, `edit`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, `websearch`, `codesearch`, `lsp`, `skill`. Anything omitted is denied. Alias: `--tools` |
106-
| `--model`, `-m` | Model to use, in `provider/model` format |
100+
| Flag | Description |
101+
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
102+
| `--path` | Directory to write the agent file to (defaults to global or `.opencode/agent` based on the prompt) |
103+
| `--description` | What the agent should do |
104+
| `--mode` | Agent mode: `all`, `primary`, or `subagent` |
105+
| `--permissions` | Comma-separated list of permissions to allow (default: all). Available: `bash`, `read`, `edit`, `glob`, `grep`, `webfetch`, `task`, `todowrite`, `websearch`, `codesearch`, `lsp`, `skill`. Anything omitted is denied. Alias: `--tools` |
106+
| `--model`, `-m` | Model to use, in `provider/model` format |
107107

108108
Passing all of `--path`, `--description`, `--mode`, and `--permissions` runs the command non-interactively.
109109

0 commit comments

Comments
 (0)