Repository navigation
Expand file tree
/
Copy pathopencode.jsonc
More file actions
590 lines (568 loc) · 19.9 KB
/
Copy pathopencode.jsonc
File metadata and controls
590 lines (568 loc) · 19.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
{
"$schema": "https://opencode.ai/config.json",
"snapshot": true,
"default_agent": "plan",
"model": "amazon-bedrock/us.openai.gpt-6.1-sol",
"autoupdate": false,
"share": "disabled",
"enabled_providers": [
"google-vertex",
"amazon-bedrock",
"ollama"
],
"providers": {
"google-vertex": {
"models": {
"xai/grok-4.6": {
"package": "@opencode/ai/providers/google-vertex/chat",
"settings": {
"baseURL": "https://aiplatform.googleapis.com/v1/projects/genai-saas-tools-593219/locations/global/endpoints/openapi"
}
}
}
},
"ollama": {
"package": "@opencode/ai/providers/openai-compatible",
"name": "Ollama (local)",
"settings": {
"baseURL": "http://localhost:11434/v1"
},
"models": {
"qwen3.8:27b": {
"name": "Qwen3.8 27B (local)",
"compatibility": {
"reasoningField": "reasoning"
},
"capabilities": {
"tools": true,
"input": [
"text",
"image"
]
},
"limit": {
"context": 65536,
"output": 32768
},
"cost": {
"input": 0,
"output": 0
}
}
}
},
"amazon-bedrock": {
"settings": {
"profile": "genai-bedrock",
"region": "us-east-1"
},
"models": {
"us.openai.gpt-5.6-luna": {},
"us.openai.gpt-6-luna": {},
"us.openai.gpt-6-sol": {},
"us.openai.gpt-6.1-sol": {},
"us.openai.gpt-6-astra": {}
}
}
},
"skills": {
"paths": []
},
"permission": {
"tmux-mcp_*": "ask",
// Slack MCP is toggled on manually per-session (Ctrl+P -> MCPs dialog), not enabled
// in config. These gate the write-capable tools behind approval whenever it's
// connected, in any session/subagent; read/search tools are left untouched.
"slack_slack_send_message": "ask",
"slack_slack_send_message_draft": "ask",
"slack_slack_schedule_message": "ask",
"slack_slack_add_reaction": "ask",
"slack_slack_create_canvas": "ask",
"slack_slack_update_canvas": "ask",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow",
"secret.auto.tfvars": "deny",
"secret.auto.tfvars.example": "allow",
"secrets.py": "deny",
// .git is internal plumbing, not source. bash-guard handles .git for bash; these
// cover the Read tool. The Read tool evaluates a WORKTREE-RELATIVE path (read.ts:257),
// so the current repo's own .git is matched WITHOUT a leading "/": the "**/.git[/**]"
// forms need a "/" before ".git" and only catch NESTED repos, so the bare ".git"/
// ".git/**" forms are required for the worktree-root .git. All four are needed.
".git": "deny",
".git/**": "deny",
"**/.git": "deny",
"**/.git/**": "deny",
},
"edit": {
"~/.config/opencode/*": "ask",
// scratch dirs (AGENTS.md-designated). The edit/write tool matches a WORKTREE-RELATIVE
// path (write.ts:56), so these are the relative `../…/T/opencode/…` forms.
"**/T/opencode/**": "allow",
"**/tmp/opencode/**": "allow",
},
"external_directory": {
"*": "ask",
"~/.opencode/plan/*": "allow",
"~/.config/opencode/*": "allow",
"~/signifyd_github/*": "allow",
"~/softwarefromsource/*": "allow",
"~/org/*": "allow",
// AGENTS.md-designated scratch dirs (bash-guard already write-allowlists these). The `*`
// glob is dotall, so one rule per root covers all nested depths.
"/tmp/opencode/*": "allow",
"/var/folders/*/T/opencode/*": "allow", // macOS $TMPDIR/opencode
"/private/var/folders/*/T/opencode/*": "allow",
"/private/tmp/opencode/*": "allow",
},
"bash": {
"*": "ask",
// --- Dangerous commands ---
"sudo *": "deny",
"terraform apply *": "deny",
// --- Git (read-only allowed, destructive actions denied/ask) ---
"git log *": "allow",
"git status *": "allow",
"git show *": "allow",
"git blame *": "allow",
"git diff *": "allow",
"git branch *": "allow",
"git branch -d *": "ask",
"git branch -D *": "ask",
"git branch -m *": "ask",
"git branch --delete *": "ask",
"git branch --move *": "ask",
"git tag *": "allow",
"git tag -d *": "ask",
"git tag --delete *": "ask",
"git remote *": "allow",
"git remote add *": "ask",
"git remote remove *": "ask",
"git remote set-url *": "ask",
"git worktree list *": "allow",
"git stash list *": "allow",
"git rev-parse *": "allow",
"git ls-files *": "allow",
// More read-only git verbs (no standalone write/exec side-channel; bash-guard backstops;
// chained clauses still re-checked per-command). `git grep` is intentionally NOT here
// (-O/--open-files-in-pager is a CLI exec the guard can't see).
"git rev-list *": "allow",
"git merge-base *": "allow",
"git check-ignore *": "allow",
"git cherry *": "allow",
"git for-each-ref *": "allow",
"git describe *": "allow",
"git ls-tree *": "allow",
"git range-diff *": "allow",
"git shortlog *": "allow",
"git --version": "allow",
// git config READS only (writes stay ask); `git config -f/--file <path>` is secret-scoped by bash-guard.
"git config --get*": "allow",
"git config --list*": "allow",
"git config -l*": "allow",
"git config --show-origin *": "allow",
"git config --local --list*": "allow",
"git config --global --list*": "allow",
"git add -A *": "deny",
"git add --all *": "deny",
"git add . *": "deny",
"git fetch *": "allow",
"git push *": "deny",
// --- Yadm (dotfiles, same as git) ---
"yadm log *": "allow",
"yadm status *": "allow",
"yadm show *": "allow",
"yadm blame *": "allow",
"yadm diff *": "allow",
"yadm branch *": "allow",
"yadm branch -d *": "ask",
"yadm branch -D *": "ask",
"yadm branch -m *": "ask",
"yadm branch --delete *": "ask",
"yadm branch --move *": "ask",
"yadm tag *": "allow",
"yadm tag -d *": "ask",
"yadm tag --delete *": "ask",
"yadm remote *": "allow",
"yadm remote add *": "ask",
"yadm remote remove *": "ask",
"yadm remote set-url *": "ask",
"yadm stash list *": "allow",
"yadm rev-parse *": "allow",
"yadm ls-files *": "allow",
// yadm mirror of the read-only git verbs (see git block above).
"yadm rev-list *": "allow",
"yadm merge-base *": "allow",
"yadm check-ignore *": "allow",
"yadm cherry *": "allow",
"yadm for-each-ref *": "allow",
"yadm describe *": "allow",
"yadm ls-tree *": "allow",
"yadm range-diff *": "allow",
"yadm shortlog *": "allow",
"yadm --version": "allow",
"yadm config --get*": "allow",
"yadm config --list*": "allow",
"yadm config -l*": "allow",
"yadm config --show-origin *": "allow",
"yadm config --local --list*": "allow",
"yadm config --global --list*": "allow",
"yadm add -A *": "deny",
"yadm add --all *": "deny",
"yadm add . *": "deny",
"yadm fetch *": "allow",
"yadm push *": "deny",
// --- Common CLI tools (read-only/safe) ---
"ls *": "allow",
"wc *": "allow",
"head *": "allow",
"tail *": "allow",
"sort *": "allow",
"uniq *": "allow",
"awk *": "allow", // backstopped by bash-guard (system()/getline/print>/-i inplace)
"sed *": "allow", // backstopped by bash-guard (-i / w,W,r,R / s///w blocked)
"which *": "allow",
"jq *": "allow",
"jaq *": "allow",
"fd *": "allow",
"ug *": "allow",
"rg *": "allow",
"grep *": "allow",
"find *": "allow", // backstopped by bash-guard (-exec/-delete/-fls/-ok + path scoping)
"tree *": "allow",
"echo *": "allow", // safe; only writes via redirect, which bash-guard blocks
"tee *": "allow", // backstopped by bash-guard (tee targets must be tmp)
"diff *": "allow",
// cd/cat are in opencode's FILES set → external_directory still asks for paths
// outside the allow-list; bash-guard scopes reads + blocks secrets/.git.
"cd": "allow",
"cd *": "allow",
"cat *": "allow",
"pwd": "allow",
"pwd *": "allow",
// Inert/read-only tools (guard backstops redirects/exec).
"cut *": "allow",
"printf *": "allow",
"whoami": "allow",
"id": "allow",
"id *": "allow",
"sleep *": "allow",
"ps": "allow",
"ps *": "allow",
"wait": "allow",
"wait *": "allow",
"test *": "allow", // POSIX condition check ([ -f x ], string/number compare); no side effects
"command -v *": "allow", // resolves a command's path (like `which`); NOT bare `command *` (runs a program)
"TMPFILE=$(mktemp)": "allow",
// --- Jira CLI (read-only) ---
"jira issue list *": "allow",
"jira epic list *": "allow",
"jira issue view *": "allow",
"jira --version *": "allow",
// --- Pants build system ---
"pants lint *": "allow",
"pants fmt *": "allow",
"pants test *": "allow",
"pants check *": "allow",
"pants typecheck *": "allow",
"PANTS_CONCURRENT=True pants tecton-plan *": "allow", // read-only plan; apply stays gated
"PANTS_CONCURRENT=True pants test *": "allow",
// --- Rust toolchain (checkers only; cargo build/test/run excluded — those compile/execute) ---
"cargo check *": "allow",
"cargo clippy *": "allow",
"cargo clippy --fix *": "ask", // auto-fixes/mutates files in place; keep human-gated
"cargo fmt --check *": "allow",
"cargo fmt -- --check *": "allow",
"cargo --version": "allow",
"rustc --version": "allow",
// --- Taskagent ---
"taskagent *": "allow",
// Defense-in-depth: block hook-bypassing subcommands when they appear as the
// FIRST argument (covers "taskagent undo" and abbreviations like "taskagent und").
// Filter-before-subcommand ("taskagent +agent undo") is caught by the wrapper,
// which scans ALL args. The multi-token "taskagent * undo*" form was removed
// because it false-positives on task descriptions (e.g. "taskagent add undo this").
"taskagent undo*": "deny",
"taskagent config*": "deny",
"taskagent execute*": "deny",
// Block rc overrides (rc: or rc. as a standalone first arg or anywhere literal)
"taskagent rc:*": "deny",
"taskagent rc.*": "deny",
// --- Taskwarrior ---
"task *": "deny",
"task list *": "allow",
// --- tuicr (review CLI) ---
"tuicr review list *": "allow",
"tuicr review comments *": "allow",
// --- opencode-session (read-only introspection/pricing commands) ---
"opencode-session search *": "allow",
"opencode-session show *": "allow",
"opencode-session cost *": "allow",
"opencode-session --help*": "allow",
"opencode-session -h": "allow",
"~/bin/opencode-session search *": "allow",
"~/bin/opencode-session show *": "allow",
"~/bin/opencode-session cost *": "allow",
"~/bin/opencode-session --help*": "allow",
"~/bin/opencode-session -h": "allow",
// --- gcli (allow by default, ask for destructive actions) ---
// NOTE: these patterns only hold while nothing precedes the subcommand.
// Any global flag (--no-markdown, -q, -t github) shifts the string and
// misses every rule below, falling through to the "*": "ask" default.
// That is why GCLI_RENDER_MARKDOWN is set in plugins/gcli-env.ts instead
// of passing --no-markdown.
"gcli api *": "allow",
"gcli status -l *": "allow",
"gcli status -n *": "allow",
"gcli ci *": "allow",
"gcli issues *": "allow",
"gcli issues -i * close *": "ask",
"gcli issues -i * reopen *": "ask",
"gcli issues -i * assign *": "ask",
"gcli issues -i * labels *": "ask",
"gcli issues -i * milestone *": "ask",
"gcli issues -i * title *": "ask",
"gcli issues -i * edit *": "ask",
"gcli issues create *": "ask",
"gcli pulls *": "allow",
"gcli pulls -i * merge *": "ask",
"gcli pulls -i * close *": "ask",
"gcli pulls -i * reopen *": "ask",
"gcli pulls -i * labels *": "ask",
"gcli pulls -i * milestone *": "ask",
"gcli pulls -i * title *": "ask",
"gcli pulls -i * request-review *": "ask",
"gcli pulls -i * assign *": "ask",
"gcli pulls -i * checkout *": "ask",
"gcli pulls -i * review *": "ask",
"gcli pulls -i * approve *": "ask",
"gcli pulls -i * unapprove *": "ask",
"gcli pulls create *": "ask",
"gcli comment *": "ask",
// --- gh CLI (read-only commands) ---
"gh status *": "allow",
"gh issue list *": "allow",
"gh issue status *": "allow",
"gh issue view *": "allow",
"gh pr list *": "allow",
"gh pr status *": "allow",
"gh pr view *": "allow",
"gh pr checks *": "allow",
"gh pr diff *": "allow",
"gh repo list *": "allow",
"gh repo view *": "allow",
"gh repo gitignore list *": "allow",
"gh repo gitignore view *": "allow",
"gh repo license list *": "allow",
"gh repo license view *": "allow",
"gh run list *": "allow",
"gh run view *": "allow",
"gh workflow list *": "allow",
"gh workflow view *": "allow",
},
},
"mcp": {
"atlassian": {
"type": "remote",
"url": "https://mcp.atlassian.com/v1/mcp/authv2",
"enabled": false,
},
"slack": {
"type": "remote",
"url": "https://mcp.slack.com/mcp",
"oauth": {
"clientId": "1601185624273.8899143856786",
"redirectUri": "http://localhost:3118/callback",
},
"enabled": true,
},
"zoom-mcp": {
"type": "remote",
"url": "https://mcp.zoom.us/mcp/zoom/streamable",
"oauth": {},
"enabled": false,
},
"tmux-mcp": {
"type": "local",
"command": ["tmux-mcp"],
"enabled": false,
},
"mcp-neovim-server": {
"type": "local",
"command": ["mcp-neovim-server"],
"environment": {
"ALLOW_SHELL_COMMANDS": "false",
"NVIM_SOCKET_PATH": "./.nvim.sock",
},
"enabled": false,
},
},
"plugins": [
"@dietrichgebert/[email protected]",
],
"agent": {
"build": {
"model": "amazon-bedrock/us.openai.gpt-6.1-sol",
"variant": "medium",
"color": "#ff79c6",
},
"plan": {
"model": "amazon-bedrock/us.openai.gpt-6.1-sol",
"variant": "high",
"color": "#8be9fd",
},
"explore": {
"model": "amazon-bedrock/us.openai.gpt-6-luna",
"variant": "medium",
"permission": {
"skill": "allow",
"bash": {
// --- Git (read-only) ---
"git log*": "allow",
"git status*": "allow",
"git show*": "allow",
"git blame *": "allow",
"git diff*": "allow",
"git branch*": "allow",
"git tag*": "allow",
"git remote*": "allow",
"git worktree list *": "allow",
"git stash list*": "allow",
"git rev-parse *": "allow",
"git fetch*": "allow",
"git ls-files*": "allow",
// --- Yadm (read-only) ---
"yadm log*": "allow",
"yadm status*": "allow",
"yadm show*": "allow",
"yadm blame *": "allow",
"yadm diff*": "allow",
"yadm branch*": "allow",
"yadm tag*": "allow",
"yadm remote*": "allow",
"yadm stash list*": "allow",
"yadm rev-parse *": "allow",
"yadm fetch*": "allow",
"yadm ls-files*": "allow",
// --- Common CLI tools (read-only/safe) ---
"ls*": "allow",
"wc*": "allow",
"head*": "allow",
"tail*": "allow",
"sort*": "allow",
"uniq*": "allow",
"awk*": "allow",
"sed *": "allow",
"grep *": "allow",
"rg *": "allow",
"which *": "allow",
"jq *": "allow",
"jaq *": "allow",
"fd *": "allow",
"ug *": "allow",
"find *": "allow",
"tree *": "allow",
"echo *": "allow",
"tee *": "allow",
"diff *": "allow",
"TMPFILE=$(mktemp)": "allow",
// --- Jira CLI (read-only) ---
"jira issue list *": "allow",
"jira epic list *": "allow",
"jira issue view *": "allow",
// --- Pants build system ---
"pants lint *": "allow",
"pants fmt *": "allow",
"pants test *": "allow",
// --- Taskagent ---
"taskagent *": "allow",
// --- Taskwarrior (read-only) ---
"task list *": "allow",
// --- opencode-session (read-only) ---
"opencode-session search *": "allow",
"opencode-session show *": "allow",
"opencode-session cost *": "allow",
"opencode-session --help*": "allow",
"opencode-session -h": "allow",
"~/bin/opencode-session search *": "allow",
"~/bin/opencode-session show *": "allow",
"~/bin/opencode-session cost *": "allow",
"~/bin/opencode-session --help*": "allow",
"~/bin/opencode-session -h": "allow",
// --- gcli (read-only) ---
"gcli api *": "allow",
"gcli status -l *": "allow",
"gcli status -n *": "allow",
"gcli ci *": "allow",
"gcli issues *": "allow",
"gcli pulls *": "allow",
// --- gh CLI (read-only) ---
"gh status *": "allow",
"gh issue list *": "allow",
"gh issue status *": "allow",
"gh issue view *": "allow",
"gh pr list *": "allow",
"gh pr status *": "allow",
"gh pr view *": "allow",
"gh pr checks *": "allow",
"gh pr diff *": "allow",
"gh repo list *": "allow",
"gh repo view *": "allow",
"gh repo gitignore list *": "allow",
"gh repo gitignore view *": "allow",
"gh repo license list *": "allow",
"gh repo license view *": "allow",
"gh run list *": "allow",
"gh run view *": "allow",
"gh workflow list *": "allow",
"gh workflow view *": "allow",
},
},
},
"test-runner": {
"model": "google-vertex/gemini-3.5-flash-lite",
"variant": "low",
},
"taskagent-reader": {
"model": "google-vertex/gemini-3.5-flash-lite",
"variant": "low",
},
// Backend agent for the "99" (kilenc) nvim plugin (headless `opencode run`).
"kilenc": {
"mode": "primary",
"hidden": true,
"model": "google-vertex/gemini-3.5-flash-lite",
"variant": "low",
"permission": {
"task": "deny",
"bash": "deny",
"webfetch": "deny",
"todowrite": "deny",
"edit": {
"*": "deny",
"**/T/opencode/**": "allow",
"**/tmp/opencode/**": "allow",
},
},
},
"cli-prompt": {
"mode": "primary",
"hidden": true,
"model": "google-vertex/gemini-3.5-flash-lite",
"variant": "low",
"prompt": "You are a non-interactive CLI assistant, invoked with a single prompt (often piped via stdin) and captured as plain text. Answer directly and concisely. Obey the requested output format exactly: if asked to reply with a single word or specific value, output only that and nothing else — no greeting, no preamble, no explanation, no markdown, no trailing commentary.",
"permission": {
"task": "deny",
"bash": "deny",
"webfetch": "deny",
"todowrite": "deny",
"edit": {
"*": "deny",
},
},
},
},
}