Repository navigation
Expand file tree
/
Copy pathopencode.jsonc
More file actions
791 lines (773 loc) · 49 KB
/
Copy pathopencode.jsonc
File metadata and controls
791 lines (773 loc) · 49 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
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
{
"$schema": "https://opencode.ai/config.json",
// =========================================================================
// NATIVE OPENCODE v2 CONFIG (https://opencode.ai/docs/migrate-v1/).
// Native v2 keys: providers / agents / permissions[] / mcp.servers / update.
// This file is NOT readable by opencode v1 (v1 and v2 share the same config
// locations — do not point a v1 install at it).
//
// >>> bare:begin (`install.sh --bare` copies everything down to `bare:end`: keep these markers)
// PROVIDER: self-hosted models exposed by the Onyxia platform.
// The gateway is Open WebUI (https://llm.lab.sspcloud.fr): OpenAI-compatible
// layer on /api. The base URL and key come from the environment (never
// hard-coded):
// export OPENAI_BASE_URL=https://llm.lab.sspcloud.fr/api
// export OPENAI_API_KEY=sk-...
// -> OpenCode calls {baseURL}/chat/completions
//
// The "models" KEYS below are confirmed (curl .../api/models):
// gemma4-26b-moe, qwen3-8-27b, qwen3-6-35b-moe, qwen3-vl, qwen3-cursor,
// qwen3-embedding-8b, qwen-36. The gateway does not publish
// context/output limits; see the note in INSTALL.md if generation truncates.
//
// SAMPLING + THINKING MODE (v2 change): the gateway serves qwen3-8-27b with
// thinking ON by default (the response carries a "reasoning_content" field).
// We do not rely on that default. ⚠ In v2, an agent's `request.body` is
// accepted but NEVER SENT to the model, so per-agent temperature / top_p /
// chat_template_kwargs no longer work. They live in model VARIANTS instead
// (`body` is forwarded verbatim into the request; variant values win over
// model values, nested objects are merged), and an agent selects one with
// `provider/model#variant`.
// =========================================================================
"providers": {
"onyxia": {
"name": "SSPCloud LLM (self-hosted)",
"package": "aisdk:@ai-sdk/openai-compatible",
// Verified against the gateway: thinking output comes back in `reasoning_content`
// (so opencode keeps it out of the visible answer and the next request's content).
"compatibility": { "reasoningField": "reasoning_content" },
"settings": {
"baseURL": "{env:OPENAI_BASE_URL}",
"apiKey": "{env:OPENAI_API_KEY}"
},
"models": {
"qwen3-8-27b": {
"name": "Qwen3 27B MoE — code & reasoning",
"capabilities": { "tools": true },
// Thinking OFF by default: the code-writing agents stay fast and
// spend their output budget on code, not on a reasoning trace.
// The `plan` variant below re-enables it.
"body": {
"chat_template_kwargs": { "enable_thinking": false }
},
"variants": [
{
// build / python-ds / r-ds / mlops
"id": "build",
"body": { "temperature": 0.2 }
},
{
// Qwen3 thinking mode: near-greedy decoding sends the reasoning
// trace into repetition loops — use the sampling Qwen recommends
// (temperature 0.6, top_p 0.95, top_k 20, min_p 0).
"id": "plan",
"body": {
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"min_p": 0,
"chat_template_kwargs": { "enable_thinking": true }
}
},
{
// Same sampling, selectable on ANY agent from the variant switcher
// (e.g. `build` + thinking for a hard debugging session) without
// changing agent: `onyxia/qwen3-8-27b#think`.
"id": "think",
"body": {
"temperature": 0.6,
"top_p": 0.95,
"top_k": 20,
"min_p": 0,
"chat_template_kwargs": { "enable_thinking": true }
}
}
],
"limit": { "context": 131072, "output": 32768 }
},
"gemma4-26b-moe": {
"name": "Gemma 4 26B MoE — fast / review",
"capabilities": { "tools": true },
"variants": [
{
// Grading should be reproducible, not creative.
"id": "review",
"body": { "temperature": 0 }
}
],
"limit": { "context": 131072, "output": 16384 }
},
"qwen3-vl": {
"name": "Qwen3 VL — vision (charts, diagrams, screenshots)",
"capabilities": {
"tools": true,
"input": ["text", "image"],
"output": ["text"]
},
"variants": [
{
"id": "vision",
"body": { "temperature": 0.3 }
}
],
"limit": { "context": 65536, "output": 16384 }
}
}
}
},
// ---- Default model ----
// The platform injects OPENAI_DEFAULT_MODEL=qwen3-6-35b-moe, and the gateway also serves
// `qwen-36` ("Coder"); this repo deliberately defaults to qwen3-8-27b (see git history).
// To try another model, declare it under providers.onyxia.models and select it with /models.
"model": "onyxia/qwen3-8-27b",
// <<< bare:end
// ---- Default agent at startup ----
"default_agent": "plan",
// ---- Update policy: notify only (v1 "autoupdate": "notify") ----
"update": "notify",
// =========================================================================
// CONTEXT BUDGET — 131k window, data science tool output.
// A single duckdb SUMMARIZE, a verbose pytest run or a kubectl logs easily
// exceeds the defaults (2000 lines / 50 KB) and burns >10k tokens per call.
// Truncated output is NOT lost: OpenCode writes the full text under
// ~/.local/share/opencode/tool-output/ and gives the model the path.
// CAVEAT: truncation keeps the HEAD, so prompts must bound output at the
// source (`| tail -n 30`) — pytest puts its verdict at the END.
// =========================================================================
"tool_output": {
"max_lines": 200,
"max_bytes": 20000
},
// qwen3-vl has a 64k window: bound the image size (v2 default is 2000 px per side).
"media": {
"image": { "max_width": 1280, "max_height": 1280 }
},
// Runaway-delegation guard for local models: subagents cannot spawn subagents.
"experimental": {
"subagent_depth": 1
},
"compaction": {
"auto": true,
// v2 has no `prune` / `tail_turns` (v1 kept the last 4 user turns). Recent
// context is retained by token budget instead: ~4 turns of capped tool
// output (200 lines / 20 KB each) fits in 16k tokens. Tune if needed.
"keep": { "tokens": 16000 },
// Token headroom reserved for the compaction summary (~15% of the 131k window).
// Integer on purpose: opencode 2.1.2 silently ignores the documented percentage
// form ("15%"), checked with `opencode debug config`.
"buffer": 20000
},
// =========================================================================
// PERMISSIONS — OpenCode is NOT sandboxed: every `shell` runs on the pod.
// Three layers, from loosest to strictest (see README "Permissions"):
//
// 1. BASELINE `shell * allow`: routine data science work never prompts.
// (v1-style allowlists prompt on every unlisted harmless command —
// tail, wc, rg, jq, mkdir, cp... — and miss option forms such as
// `aws --endpoint-url ... s3 rm` or `git -C d push`.)
// 2. ASK a short list of dangerous-but-legitimate actions below.
// 3. POLICIES `policies` further down: catastrophic actions are blocked
// without a prompt, and neither a project's own opencode.json nor an
// "Allow always" can lift them (policies outrank project config).
//
// ⚠ ORDER IS SEMANTIC. The LAST matching rule wins: the "*" rule first, then
// the narrower rules after it. Rule order across sources: lower-priority
// config first, then these global rules, then each agent's own `permissions`
// appended LAST (an agent's rules override these), then `policies`.
// A shell pattern ending in "*" also matches the bare command; `?` matches
// exactly one character.
//
// ⚠ WHAT THE SCANNER SEES (verified in a live session): pipelines, lists,
// subshells, `if ...; then ...` and `$(...)` are split and each subcommand is
// checked — but only its raw text. `env sudo x`, `timeout 5 sudo x`,
// `nohup sudo x`, `/usr/bin/sudo x`, `xargs sudo` and `bash -c "sudo x"`
// are NOT recognised by a `sudo *` pattern. Hence dangerous multi-word
// phrases are SUBSTRING patterns (`*aws s3 rm*`), single words come in
// boundary-safe forms (`sudo *`, `* sudo *`, `*/sudo *`, `*"sudo *`), and a shell given a
// command string (`bash -c "..."`) asks so a human reads the string.
//
// NOTE: "edit" is deliberately NOT granted globally; it is granted per
// agent (build / python-ds / r-ds / mlops below) so read-only agents stay
// read-only. Actions renamed in v2: bash -> shell, task -> subagent.
// `opencode --auto` auto-approves every `ask` (never a `deny` or a policy):
// do not use it on a config whose ask list matters (git push, S3 publishing).
// =========================================================================
"permissions": [
// ---- web: public docs are free, anything else asks ----
{ "action": "webfetch", "resource": "*", "effect": "ask" },
{ "action": "webfetch", "resource": "https://docs.sspcloud.fr/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://docs.onyxia.sh/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://book.utilitr.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://pythonds.linogaliana.fr/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://inseefrlab.github.io/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://ensae-reproductibilite.github.io/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://duckdb.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://mlflow.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://pypi.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://cran.r-project.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://quarto.org/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://docs.astral.sh/*", "effect": "allow" },
{ "action": "webfetch", "resource": "https://opencode.ai/*", "effect": "allow" },
// ---- paths outside the project: ask, except a short safe set ----
// (v2 allows them by default; global skills' references/scripts, /tmp and caches are routine reads)
{ "action": "external_directory", "resource": "*", "effect": "ask" },
{ "action": "external_directory", "resource": "~/.config/opencode/*", "effect": "allow" },
{ "action": "external_directory", "resource": "~/.claude/skills/*", "effect": "allow" },
{ "action": "external_directory", "resource": "~/.agents/skills/*", "effect": "allow" },
{ "action": "external_directory", "resource": "/tmp/*", "effect": "allow" },
{ "action": "external_directory", "resource": "~/.cache/*", "effect": "allow" },
{ "action": "external_directory", "resource": "~/.local/share/opencode/*", "effect": "allow" },
// Delegation: allow the purpose-built subagents, refuse the generic "general" one — it has full write
// permission and no Onyxia context, so it is never the right delegate here.
{ "action": "subagent", "resource": "*", "effect": "allow" },
{ "action": "subagent", "resource": "general", "effect": "deny" },
// ---- shell: routine work is silent, a SHORT list of dangerous-but-legitimate actions asks ----
{ "action": "shell", "resource": "*", "effect": "allow" },
// Wrappers hide the real command from first-word matching (`env`, `timeout`, `nohup`, `bash -c "..."`):
// the patterns below are substring/boundary patterns, and a shell given a command STRING asks, so a human sees it.
{ "action": "shell", "resource": "bash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "* bash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "*/bash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "sh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "* sh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "*/sh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "zsh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "* zsh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "*/zsh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "dash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "* dash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "*/dash -*c *", "effect": "ask" },
{ "action": "shell", "resource": "ksh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "* ksh -*c *", "effect": "ask" },
{ "action": "shell", "resource": "*/ksh -*c *", "effect": "ask" },
// git: leaving the pod, or destroying local history/state
{ "action": "shell", "resource": "*git push*", "effect": "ask" },
{ "action": "shell", "resource": "*git -* push*", "effect": "ask" },
{ "action": "shell", "resource": "*git reset --hard*", "effect": "ask" },
{ "action": "shell", "resource": "*git -* reset --hard*", "effect": "ask" },
{ "action": "shell", "resource": "*git clean*", "effect": "ask" },
{ "action": "shell", "resource": "*git -* clean*", "effect": "ask" },
{ "action": "shell", "resource": "*git branch -D*", "effect": "ask" },
{ "action": "shell", "resource": "*git -* branch -D*", "effect": "ask" },
// local deletion always confirms (regenerate outputs via the pipeline instead of deleting data)
{ "action": "shell", "resource": "rm *", "effect": "ask" },
{ "action": "shell", "resource": "* rm *", "effect": "ask" },
{ "action": "shell", "resource": "*/rm *", "effect": "ask" },
{ "action": "shell", "resource": "shred *", "effect": "ask" },
{ "action": "shell", "resource": "* shred *", "effect": "ask" },
{ "action": "shell", "resource": "*/shred *", "effect": "ask" },
{ "action": "shell", "resource": "*find * -delete*", "effect": "ask" },
{ "action": "shell", "resource": "*find * -exec rm*", "effect": "ask" },
// S3/MinIO: publishing (diffusion/ is readable by EVERY Onyxia user) and bulk overwrite
{ "action": "shell", "resource": "*aws s3 cp * s3://*/diffusion/*", "effect": "ask" },
{ "action": "shell", "resource": "*aws -* s3 cp * s3://*/diffusion/*", "effect": "ask" },
{ "action": "shell", "resource": "*aws s3 mv*", "effect": "ask" },
{ "action": "shell", "resource": "*aws -* s3 mv*", "effect": "ask" },
{ "action": "shell", "resource": "*aws s3 sync*", "effect": "ask" },
{ "action": "shell", "resource": "*aws -* s3 sync*", "effect": "ask" },
{ "action": "shell", "resource": "*aws s3 presign*", "effect": "ask" },
{ "action": "shell", "resource": "*aws -* s3 presign*", "effect": "ask" },
{ "action": "shell", "resource": "*aws s3api put-*", "effect": "ask" },
{ "action": "shell", "resource": "*aws -* s3api put-*", "effect": "ask" },
{ "action": "shell", "resource": "*mc cp *diffusion*", "effect": "ask" },
{ "action": "shell", "resource": "*mc mv*", "effect": "ask" },
{ "action": "shell", "resource": "*mc mirror*", "effect": "ask" },
{ "action": "shell", "resource": "*mc share*", "effect": "ask" },
{ "action": "shell", "resource": "*mc anonymous*", "effect": "ask" },
{ "action": "shell", "resource": "*mc policy*", "effect": "ask" },
// cluster / GitOps / vault CLIs: anything unknown asks, read-only verbs are free (deletes: see `policies`)
{ "action": "shell", "resource": "kubectl *", "effect": "ask" },
{ "action": "shell", "resource": "* kubectl *", "effect": "ask" },
{ "action": "shell", "resource": "*/kubectl *", "effect": "ask" },
{ "action": "shell", "resource": "kubectl get*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl -* get*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl describe*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl -* describe*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl logs*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl -* logs*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl top*", "effect": "allow" },
{ "action": "shell", "resource": "kubectl -* top*", "effect": "allow" },
{ "action": "shell", "resource": "helm *", "effect": "ask" },
{ "action": "shell", "resource": "* helm *", "effect": "ask" },
{ "action": "shell", "resource": "*/helm *", "effect": "ask" },
{ "action": "shell", "resource": "helm list*", "effect": "allow" },
{ "action": "shell", "resource": "helm -* list*", "effect": "allow" },
{ "action": "shell", "resource": "helm status*", "effect": "allow" },
{ "action": "shell", "resource": "helm -* status*", "effect": "allow" },
{ "action": "shell", "resource": "helm show*", "effect": "allow" },
{ "action": "shell", "resource": "helm -* show*", "effect": "allow" },
{ "action": "shell", "resource": "argo *", "effect": "ask" },
{ "action": "shell", "resource": "* argo *", "effect": "ask" },
{ "action": "shell", "resource": "*/argo *", "effect": "ask" },
{ "action": "shell", "resource": "argo list*", "effect": "allow" },
{ "action": "shell", "resource": "argo -* list*", "effect": "allow" },
{ "action": "shell", "resource": "argo get*", "effect": "allow" },
{ "action": "shell", "resource": "argo -* get*", "effect": "allow" },
{ "action": "shell", "resource": "argo logs*", "effect": "allow" },
{ "action": "shell", "resource": "argo -* logs*", "effect": "allow" },
{ "action": "shell", "resource": "argo watch*", "effect": "allow" },
{ "action": "shell", "resource": "argo -* watch*", "effect": "allow" },
{ "action": "shell", "resource": "argocd *", "effect": "ask" },
{ "action": "shell", "resource": "* argocd *", "effect": "ask" },
{ "action": "shell", "resource": "*/argocd *", "effect": "ask" },
{ "action": "shell", "resource": "argocd app list*", "effect": "allow" },
{ "action": "shell", "resource": "argocd -* app list*", "effect": "allow" },
{ "action": "shell", "resource": "argocd app get*", "effect": "allow" },
{ "action": "shell", "resource": "argocd -* app get*", "effect": "allow" },
{ "action": "shell", "resource": "vault *", "effect": "ask" },
{ "action": "shell", "resource": "* vault *", "effect": "ask" },
{ "action": "shell", "resource": "*/vault *", "effect": "ask" },
{ "action": "shell", "resource": "vault kv get*", "effect": "allow" },
{ "action": "shell", "resource": "vault -* kv get*", "effect": "allow" },
{ "action": "shell", "resource": "vault kv list*", "effect": "allow" },
{ "action": "shell", "resource": "vault -* kv list*", "effect": "allow" },
{ "action": "shell", "resource": "docker *", "effect": "ask" },
{ "action": "shell", "resource": "* docker *", "effect": "ask" },
{ "action": "shell", "resource": "*/docker *", "effect": "ask" },
// outbound payloads: plain downloads are free; uploads / POST / remote shells ask
{ "action": "shell", "resource": "*curl *-d *", "effect": "ask" },
{ "action": "shell", "resource": "*curl *--data*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-F *", "effect": "ask" },
{ "action": "shell", "resource": "*curl *--form*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-T *", "effect": "ask" },
{ "action": "shell", "resource": "*curl *--upload-file*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-X POST*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-X PUT*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-X PATCH*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *-X DELETE*", "effect": "ask" },
{ "action": "shell", "resource": "*curl *--request*", "effect": "ask" },
{ "action": "shell", "resource": "*wget *--post-*", "effect": "ask" },
{ "action": "shell", "resource": "*wget *--method*", "effect": "ask" },
{ "action": "shell", "resource": "*wget *--body-*", "effect": "ask" },
{ "action": "shell", "resource": "ssh *", "effect": "ask" },
{ "action": "shell", "resource": "* ssh *", "effect": "ask" },
{ "action": "shell", "resource": "*/ssh *", "effect": "ask" },
{ "action": "shell", "resource": "scp *", "effect": "ask" },
{ "action": "shell", "resource": "* scp *", "effect": "ask" },
{ "action": "shell", "resource": "*/scp *", "effect": "ask" },
{ "action": "shell", "resource": "sftp *", "effect": "ask" },
{ "action": "shell", "resource": "* sftp *", "effect": "ask" },
{ "action": "shell", "resource": "*/sftp *", "effect": "ask" },
{ "action": "shell", "resource": "*rsync * *:*", "effect": "ask" },
// secrets exposure: dumping the whole environment, or reading dotenv files through the shell
// (mirrors the base `read` policy for *.env; the order matters: example files last)
{ "action": "shell", "resource": "env", "effect": "ask" },
{ "action": "shell", "resource": "printenv", "effect": "ask" },
{ "action": "shell", "resource": "* *.env", "effect": "ask" },
{ "action": "shell", "resource": "* *.env.*", "effect": "ask" },
{ "action": "shell", "resource": "* *.env.example", "effect": "allow" },
// processes, ownership, and the agent's own config (so it cannot quietly rewrite its rules)
{ "action": "shell", "resource": "kill *", "effect": "ask" },
{ "action": "shell", "resource": "* kill *", "effect": "ask" },
{ "action": "shell", "resource": "*/kill *", "effect": "ask" },
{ "action": "shell", "resource": "pkill *", "effect": "ask" },
{ "action": "shell", "resource": "* pkill *", "effect": "ask" },
{ "action": "shell", "resource": "*/pkill *", "effect": "ask" },
{ "action": "shell", "resource": "killall *", "effect": "ask" },
{ "action": "shell", "resource": "* killall *", "effect": "ask" },
{ "action": "shell", "resource": "*/killall *", "effect": "ask" },
{ "action": "shell", "resource": "chown *", "effect": "ask" },
{ "action": "shell", "resource": "* chown *", "effect": "ask" },
{ "action": "shell", "resource": "*/chown *", "effect": "ask" },
{ "action": "shell", "resource": "*chmod -R*", "effect": "ask" },
{ "action": "shell", "resource": "* */.config/opencode/*", "effect": "ask" },
{ "action": "skill", "resource": "*", "effect": "allow" }
],
// =========================================================================
// POLICIES — hard denies (`tool.use`, resource `<action>:<value>`). They never
// prompt, apply after agent rules and saved approvals, and only ever tighten.
// This file is the GLOBAL config: it outranks a repository's opencode.json.
// Platform admins can ship the same list in /etc/opencode/opencode.json (the
// highest-authority file) so users cannot edit it either.
// Matching is on the raw command text (no regex, no path normalisation):
// this reduces risk, it is NOT a sandbox (`python -c`, scripts, aliases and
// obfuscation such as `r''m` still get through).
// =========================================================================
"policies": [
// LLM endpoints: only the self-hosted gateway ("onyxia") may be used. Data sent to the agents must stay
// inside the SSP Cloud perimeter, so a repository (or a user) cannot redirect traffic to another provider:
// a denied provider disappears from the catalog and model selection even with valid credentials.
// To allow another provider on purpose, add `{ "action": "provider.use", "resource": "<id>", "effect": "allow" }`
// right after the "onyxia" line below, in this global file.
{ "action": "provider.use", "resource": "*", "effect": "deny" },
{ "action": "provider.use", "resource": "onyxia", "effect": "allow" },
// privilege escalation (also behind wrappers: env/timeout/nohup/xargs/absolute path/bash -c — verified live)
{ "action": "tool.use", "resource": "shell:sudo *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* sudo *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/sudo *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"sudo *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'sudo *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:su *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* su *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/su *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"su *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'su *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:doas *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* doas *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/doas *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"doas *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'doas *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:pkexec *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* pkexec *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/pkexec *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"pkexec *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'pkexec *", "effect": "deny" },
// system damage
{ "action": "tool.use", "resource": "shell:mkfs*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/mkfs*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:dd * of=/dev/*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/dd * of=/dev/*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:shutdown*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/shutdown*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:reboot*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/reboot*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:poweroff*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/poweroff*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:halt*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/halt*", "effect": "deny" },
// catastrophic local deletion (`?` = exactly one char: `/?` is the literal `/*`; a plain `/*` would also block /tmp/x)
{ "action": "tool.use", "resource": "shell:*rm -*r* /", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* /?", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* / *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* ~", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* ~/?", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* $HOME", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm -*r* $HOME/?", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*rm *--no-preserve-root*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*chmod -R * /", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*chown -R * /", "effect": "deny" },
// remote code from a pipe, and dynamic evaluation (bare interpreters are only ever a pipe target)
{ "action": "tool.use", "resource": "shell:sh", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:bash", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:zsh", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:dash", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:python", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:python3", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:perl", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:sh -s*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:bash -s*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:python -", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:python3 -", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:eval *", "effect": "deny" },
// remote deletion: the agent never deletes S3 objects, buckets, cluster resources or secrets (do it yourself)
{ "action": "tool.use", "resource": "shell:*aws s3 rm*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws -* s3 rm*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws s3 rb*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws -* s3 rb*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws s3api delete-*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws -* s3api delete-*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws s3 sync *--delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*aws -* s3 sync *--delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*kubectl delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*kubectl -* delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*helm uninstall*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*helm -* uninstall*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*mc rm*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*mc rb*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*mc admin*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*argo delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*argocd app delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault kv delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault kv destroy*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault kv metadata delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault delete*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault secrets disable*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*vault auth disable*", "effect": "deny" },
// network backdoors
{ "action": "tool.use", "resource": "shell:nc *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* nc *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/nc *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"nc *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'nc *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:ncat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* ncat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/ncat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"ncat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'ncat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:socat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* socat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/socat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"socat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'socat *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:telnet *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* telnet *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*/telnet *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*\"telnet *", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:*'telnet *", "effect": "deny" },
// credential files: the read/edit tools and the shell
{ "action": "tool.use", "resource": "read:*/.ssh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "edit:*/.ssh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* */.ssh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "read:*/.gnupg/*", "effect": "deny" },
{ "action": "tool.use", "resource": "edit:*/.gnupg/*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* */.gnupg/*", "effect": "deny" },
{ "action": "tool.use", "resource": "read:*/.config/gh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "edit:*/.config/gh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* */.config/gh/*", "effect": "deny" },
{ "action": "tool.use", "resource": "read:*/.netrc", "effect": "deny" },
{ "action": "tool.use", "resource": "edit:*/.netrc", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* */.netrc*", "effect": "deny" },
{ "action": "tool.use", "resource": "read:*/.git-credentials", "effect": "deny" },
{ "action": "tool.use", "resource": "edit:*/.git-credentials", "effect": "deny" },
{ "action": "tool.use", "resource": "shell:* */.git-credentials*", "effect": "deny" },
{ "action": "tool.use", "resource": "read:*/.local/share/opencode/auth*", "effect": "deny" },
// self-protection: this file holds these policies (the global config outranks any project config)
{ "action": "tool.use", "resource": "edit:*/.config/opencode/*", "effect": "deny" }
],
// =========================================================================
// AGENTS — 2 primary agents (Tab to switch) + 5 subagents, delegated
// automatically based on their "description" or invoked via @name.
// Each agent's system prompt lives in ./prompts/<agent>.md
//
// `plan` is the only agent running in thinking mode (Qwen3, `#plan`
// variant): planning is where an explicit reasoning trace pays off.
// `reviewer` stays on Gemma 4 on purpose — a second model gives a genuinely
// different point of view.
//
// ⚠ "system" is inline prompt TEXT, not a path (v1 called it "prompt"). A
// bare "./prompts/x.md" is sent to the model verbatim as a 19-character
// system prompt. Use {file:...}: it resolves relative to THIS file's
// directory (so the same string works in the repo and in
// ~/.config/opencode) and OpenCode refuses to start if the target is
// missing. Every agent starts from ./prompts/shared/base.md.
//
// ./prompts/shared/completion-contract.md goes ONLY to the agents that
// change files. `reviewer` grades against that contract — it must not be
// told when it may declare itself done.
//
// python-ds / r-ds / mlops deliberately have NO tool restriction:
// they must execute and verify code; the global ask list and `policies`
// above (rm, git push, S3 publishing, cluster mutations, uploads on "ask";
// remote deletes and sudo denied) keep them in check.
//
// Agent `permissions` are appended AFTER the global ones (last match wins).
// =========================================================================
"agents": {
// >>> bare-title:begin (copied by `install.sh --bare`: keep these markers)
// Session titles: cheap model (v1 "small_model").
"title": {
"model": "onyxia/gemma4-26b-moe"
},
// <<< bare-title:end
"build": {
"mode": "primary",
"model": "onyxia/qwen3-8-27b#build",
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/build.md}\n\n{file:./prompts/shared/completion-contract.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "allow" }
]
},
"plan": {
"mode": "primary",
"model": "onyxia/qwen3-8-27b#plan",
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/plan.md}",
"permissions": [
// Read-only EXCEPT its own plan files: that is where the acceptance
// list and the evidence log live, and `build` reads them from there.
// Order matters: deny-all first, then the narrow allow.
{ "action": "edit", "resource": "*", "effect": "deny" },
{ "action": "edit", "resource": ".opencode/plans/*.md", "effect": "allow" },
// Planning is read-only: inspection commands are free, anything else asks.
// (Agent rules are appended after the global ones, so the dotenv/config
// guards of the global block are repeated at the end.)
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "ls *", "effect": "allow" },
{ "action": "shell", "resource": "cat *", "effect": "allow" },
{ "action": "shell", "resource": "head *", "effect": "allow" },
{ "action": "shell", "resource": "tail *", "effect": "allow" },
{ "action": "shell", "resource": "wc *", "effect": "allow" },
{ "action": "shell", "resource": "grep *", "effect": "allow" },
{ "action": "shell", "resource": "rg *", "effect": "allow" },
{ "action": "shell", "resource": "find *", "effect": "allow" },
{ "action": "shell", "resource": "tree*", "effect": "allow" },
{ "action": "shell", "resource": "pwd", "effect": "allow" },
{ "action": "shell", "resource": "which *", "effect": "allow" },
{ "action": "shell", "resource": "jq *", "effect": "allow" },
{ "action": "shell", "resource": "sort *", "effect": "allow" },
{ "action": "shell", "resource": "uniq*", "effect": "allow" },
{ "action": "shell", "resource": "cut *", "effect": "allow" },
{ "action": "shell", "resource": "diff *", "effect": "allow" },
{ "action": "shell", "resource": "date", "effect": "allow" },
{ "action": "shell", "resource": "git status*", "effect": "allow" },
{ "action": "shell", "resource": "git log*", "effect": "allow" },
{ "action": "shell", "resource": "git diff*", "effect": "allow" },
{ "action": "shell", "resource": "git show*", "effect": "allow" },
{ "action": "shell", "resource": "git branch", "effect": "allow" },
{ "action": "shell", "resource": "git branch --list*", "effect": "allow" },
{ "action": "shell", "resource": "git -* status*", "effect": "allow" },
{ "action": "shell", "resource": "git -* log*", "effect": "allow" },
{ "action": "shell", "resource": "git -* diff*", "effect": "allow" },
{ "action": "shell", "resource": "git -* show*", "effect": "allow" },
{ "action": "shell", "resource": "duckdb *", "effect": "allow" },
{ "action": "shell", "resource": "aws s3 ls*", "effect": "allow" },
{ "action": "shell", "resource": "aws -* s3 ls*", "effect": "allow" },
{ "action": "shell", "resource": "mc ls*", "effect": "allow" },
{ "action": "shell", "resource": "find * -delete*", "effect": "ask" },
{ "action": "shell", "resource": "find * -exec*", "effect": "ask" },
{ "action": "shell", "resource": "* *.env", "effect": "ask" },
{ "action": "shell", "resource": "* *.env.*", "effect": "ask" },
{ "action": "shell", "resource": "* *.env.example", "effect": "allow" },
{ "action": "shell", "resource": "* */.config/opencode/*", "effect": "ask" }
]
},
"python-ds": {
"mode": "subagent",
"description": "Python data science / ML specialist on Onyxia (uv, ruff, polars, pandas, scikit-learn, pyarrow, s3fs). Use to write or refactor Python code for analysis, modelling, or pipelines.",
"model": "onyxia/qwen3-8-27b#build",
"steps": 60,
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/python-ds.md}\n\n{file:./prompts/shared/completion-contract.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "allow" }
]
},
"r-ds": {
"mode": "subagent",
"description": "R data science specialist (tidyverse, data.table, targets, renv, testthat, aws.s3, arrow). Use for any R code for analysis, modelling, or reproducible pipelines.",
"model": "onyxia/qwen3-8-27b#build",
"steps": 60,
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/r-ds.md}\n\n{file:./prompts/shared/completion-contract.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "allow" }
]
},
"mlops": {
"mode": "subagent",
"description": "Onyxia MLOps engineer: MLflow experiment tracking, parallel training via Argo Workflows (argo submit, CronWorkflow), GitOps deployment via ArgoCD, model packaging and productionization. Use to industrialize/deploy a model or schedule recurring jobs.",
"model": "onyxia/qwen3-8-27b#build",
"steps": 60,
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/mlops.md}\n\n{file:./prompts/shared/completion-contract.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "allow" }
]
},
"reviewer": {
"mode": "subagent",
"description": "Fresh-context grader AND code reviewer (read-only). Give it the path to an acceptance file (usually .opencode/plans/<slug>.md) plus `git diff --stat`: it re-runs every check itself and returns PASS/FAIL per acceptance item (blocking), followed by quality/reproducibility/security findings (advisory). Invoke at the END of any task that changed a file, before telling the user it is done. Never edits, never commits, never deploys.",
"model": "onyxia/gemma4-26b-moe#review",
"steps": 40,
"system": "{file:./prompts/shared/base.md}\n\n{file:./prompts/reviewer.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "deny" },
{ "action": "webfetch", "resource": "*", "effect": "deny" },
{ "action": "websearch", "resource": "*", "effect": "deny" },
{ "action": "subagent", "resource": "*", "effect": "deny" },
// GenAI MLflow skills are about building LLM apps, not reviewing a diff.
{ "action": "skill", "resource": "mlflow-trace-*", "effect": "deny" },
{ "action": "skill", "resource": "mlflow-evaluation", "effect": "deny" },
// Catch-all is "deny", not "ask": a subagent has no user to ask, so an
// "ask" here would stall. Same ordering rule as the global block —
// broad first, narrow last.
{ "action": "shell", "resource": "*", "effect": "deny" },
// -- inspect
{ "action": "shell", "resource": "ls *", "effect": "allow" },
{ "action": "shell", "resource": "cat *", "effect": "allow" },
{ "action": "shell", "resource": "head *", "effect": "allow" },
{ "action": "shell", "resource": "tail *", "effect": "allow" },
{ "action": "shell", "resource": "wc *", "effect": "allow" },
{ "action": "shell", "resource": "grep *", "effect": "allow" },
{ "action": "shell", "resource": "rg *", "effect": "allow" },
{ "action": "shell", "resource": "find *", "effect": "allow" },
{ "action": "shell", "resource": "jq *", "effect": "allow" },
{ "action": "shell", "resource": "tree*", "effect": "allow" },
{ "action": "shell", "resource": "diff *", "effect": "allow" },
{ "action": "shell", "resource": "sort *", "effect": "allow" },
{ "action": "shell", "resource": "uniq*", "effect": "allow" },
{ "action": "shell", "resource": "cut *", "effect": "allow" },
{ "action": "shell", "resource": "pwd", "effect": "allow" },
{ "action": "shell", "resource": "which *", "effect": "allow" },
{ "action": "shell", "resource": "date", "effect": "allow" },
{ "action": "shell", "resource": "git status", "effect": "allow" },
{ "action": "shell", "resource": "git status*", "effect": "allow" },
{ "action": "shell", "resource": "git diff*", "effect": "allow" },
{ "action": "shell", "resource": "git log*", "effect": "allow" },
{ "action": "shell", "resource": "git show*", "effect": "allow" },
// -- actually re-run the checks (this is the point of the agent)
{ "action": "shell", "resource": "uv run *", "effect": "allow" },
{ "action": "shell", "resource": "uv sync*", "effect": "allow" },
{ "action": "shell", "resource": "uv tree*", "effect": "allow" },
{ "action": "shell", "resource": "python *", "effect": "allow" },
{ "action": "shell", "resource": "python3 *", "effect": "allow" },
{ "action": "shell", "resource": "pytest*", "effect": "allow" },
{ "action": "shell", "resource": "ruff *", "effect": "allow" },
{ "action": "shell", "resource": "mypy *", "effect": "allow" },
{ "action": "shell", "resource": "Rscript *", "effect": "allow" },
{ "action": "shell", "resource": "R -e *", "effect": "allow" },
{ "action": "shell", "resource": "quarto render*", "effect": "allow" },
{ "action": "shell", "resource": "quarto check*", "effect": "allow" },
{ "action": "shell", "resource": "duckdb *", "effect": "allow" },
{ "action": "shell", "resource": "mlflow *", "effect": "allow" },
{ "action": "shell", "resource": "aws s3 ls*", "effect": "allow" },
{ "action": "shell", "resource": "mc ls*", "effect": "allow" },
{ "action": "shell", "resource": "make *", "effect": "allow" },
{ "action": "shell", "resource": "just *", "effect": "allow" },
// -- narrow denies AFTER the allows: nothing mutating, nothing
// outbound, no dependency changes. `uv run *` still lets it
// execute project code — irreducible, since re-running the tests
// IS the job; this list blocks the categorically wrong actions
// rather than pretending to sandbox.
{ "action": "shell", "resource": "git commit*", "effect": "deny" },
{ "action": "shell", "resource": "git push*", "effect": "deny" },
{ "action": "shell", "resource": "git checkout*", "effect": "deny" },
{ "action": "shell", "resource": "git reset*", "effect": "deny" },
{ "action": "shell", "resource": "git clean*", "effect": "deny" },
{ "action": "shell", "resource": "rm *", "effect": "deny" },
{ "action": "shell", "resource": "mv *", "effect": "deny" },
{ "action": "shell", "resource": "aws s3 cp*", "effect": "deny" },
{ "action": "shell", "resource": "aws s3 rm*", "effect": "deny" },
{ "action": "shell", "resource": "aws s3 sync*", "effect": "deny" },
{ "action": "shell", "resource": "mc cp*", "effect": "deny" },
{ "action": "shell", "resource": "mc rm*", "effect": "deny" },
{ "action": "shell", "resource": "argo submit*", "effect": "deny" },
{ "action": "shell", "resource": "kubectl apply*", "effect": "deny" },
{ "action": "shell", "resource": "kubectl delete*", "effect": "deny" },
{ "action": "shell", "resource": "docker *", "effect": "deny" },
{ "action": "shell", "resource": "pip install*", "effect": "deny" },
{ "action": "shell", "resource": "uv add*", "effect": "deny" },
{ "action": "shell", "resource": "find * -delete*", "effect": "deny" },
{ "action": "shell", "resource": "find * -exec*", "effect": "deny" },
// dotenv files hold tokens: the reviewer cannot ask, so it simply never reads them
{ "action": "shell", "resource": "* *.env", "effect": "deny" },
{ "action": "shell", "resource": "* *.env.*", "effect": "deny" },
{ "action": "shell", "resource": "* *.env.example", "effect": "allow" }
]
},
"dataviz-vision": {
"mode": "subagent",
"description": "Visual analysis (vision model): reads screenshots, matplotlib/ggplot charts, architecture diagrams, or dashboards to interpret them or suggest improvements. Use whenever an image is provided.",
"model": "onyxia/qwen3-vl#vision",
"system": "{file:./prompts/dataviz-vision.md}",
"permissions": [
{ "action": "edit", "resource": "*", "effect": "deny" },
{ "action": "shell", "resource": "*", "effect": "deny" },
{ "action": "subagent", "resource": "*", "effect": "deny" },
{ "action": "webfetch", "resource": "*", "effect": "deny" },
// Vision model: it only looks at images, no skills (smaller prompt).
{ "action": "skill", "resource": "*", "effect": "deny" }
]
}
},
// =========================================================================
// MCP (optional) — disabled by default.
// Careful: a "local" MCP server executes a command on the pod;
// a "remote" one sends context outside the platform.
// Enable only knowingly (confidentiality of Insee data).
// v2 shape: servers live under `mcp.servers`; `enabled:false` -> `disabled:true`.
// =========================================================================
"mcp": {
"servers": {
"excalidraw": {
"type": "remote",
"url": "https://api.excalidraw.com/api/v1/mcp",
"disabled": true,
"headers": {
"Authorization": "Bearer {env:EXCALIDRAW_API_KEY}"
}
},
"datagouv": {
"type": "remote",
"url": "https://mcp.data.gouv.fr/mcp",
"disabled": true
}
}
}
}