fix(novel): make the pack headless-capable — bash allowed, destructive commands denied
Some checks are pending
Create Release / Check if Version Bump PR Merged (push) Waiting to run
Create Release / Create Git Tag and GitHub Release (push) Blocked by required conditions
Post-Merge Version Bump / Check if Version Bump Needed (push) Waiting to run
Post-Merge Version Bump / Create Version Bump PR (push) Blocked by required conditions

OpenNovelAgent and Importer had bash "*": "ask", which opencode cannot prompt for
in `opencode run` — every tool call was auto-rejected, so the pack only worked in
the interactive TUI or with --dangerously-skip-permissions.

Both now allow bash by default and deny the dangerous commands explicitly
(rm -rf, sudo, mkfs, diskutil, shutdown, reboot). The other eight agents keep
bash: "deny" on purpose: they are note-editing subagents that read and write
through opencode's file tools and never need a shell.

Approval is now expressed as denies for the irreversible commands rather than a
gate on every command.
This commit is contained in:
Claus Lohmar 2026-10-16 23:34:28 +01:00
parent 1ff88fd372
commit 84d259edda
2 changed files with 13 additions and 2 deletions

View file

@ -5,7 +5,14 @@ mode: subagent
temperature: 0.2
permission:
bash:
"*": "ask"
"*": "allow"
"rm -rf *": "deny"
"rm -rf /*": "deny"
"sudo *": "deny"
"mkfs*": "deny"
"diskutil *": "deny"
"shutdown *": "deny"
"reboot*": "deny"
edit:
"**/*.md": "allow"
"**/DATA/**": "allow"

View file

@ -6,10 +6,14 @@ temperature: 0.8
permission:
question: "allow"
bash:
"*": "ask"
"*": "allow"
"rm -rf *": "deny"
"rm -rf /*": "deny"
"sudo *": "deny"
"mkfs*": "deny"
"diskutil *": "deny"
"shutdown *": "deny"
"reboot*": "deny"
edit:
"**/*.env*": "deny"
"**/*.key": "deny"