mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:40:49 +00:00
fix: align apply_patch deny policy docs (#76795)
This commit is contained in:
@@ -54,6 +54,14 @@ Global tool allow/deny policy (deny wins). Case-insensitive, supports `*` wildca
|
||||
}
|
||||
```
|
||||
|
||||
`write` and `apply_patch` are separate tool ids. `allow: ["write"]` also enables `apply_patch` for compatible models, but `deny: ["write"]` does not deny `apply_patch`. To block all file mutation, deny `group:fs` or list each mutating tool explicitly:
|
||||
|
||||
```json5
|
||||
{
|
||||
tools: { deny: ["write", "edit", "apply_patch"] },
|
||||
}
|
||||
```
|
||||
|
||||
### `tools.byProvider`
|
||||
|
||||
Further restrict tools for specific providers or models. Order: base profile → provider profile → allow/deny.
|
||||
|
||||
@@ -264,6 +264,7 @@ Notes:
|
||||
|
||||
- Only available for OpenAI/OpenAI Codex models.
|
||||
- Tool policy still applies; `allow: ["write"]` implicitly allows `apply_patch`.
|
||||
- `deny: ["write"]` does not deny `apply_patch`; deny `apply_patch` explicitly or use `deny: ["group:fs"]` when patch writes should also be blocked.
|
||||
- Config lives under `tools.exec.applyPatch`.
|
||||
- `tools.exec.applyPatch.enabled` defaults to `true`; set it to `false` to disable the tool for OpenAI models.
|
||||
- `tools.exec.applyPatch.workspaceOnly` defaults to `true` (workspace-contained). Set it to `false` only if you intentionally want `apply_patch` to write/delete outside the workspace directory.
|
||||
|
||||
Reference in New Issue
Block a user