Skip to content

Commit 12acb9a

Browse files
authored
docs(v2): update permission rule naming (#31167)
1 parent 807c804 commit 12acb9a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

specs/v2/config.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ Do not port legacy provider model `reasoning`, `temperature`, or `interleaved` f
238238

239239
Agent behavior and tool-access policy. Review together because agent configuration can contain permissions and model choices.
240240

241-
| Field | Current Purpose | Status | Notes |
242-
| --------------- | --------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
243-
| `default_agent` | Choose default primary agent | remove | Do not retain a separate top-level selector; default choice should be designed with the v2 agent configuration model. |
244-
| `mode` | Legacy agent configuration alias | remove | Do not port deprecated alias; configure agents through the v2 agent surface only. |
245-
| `agent` | Configure primary, subagent, and specialized agents | redesign | Rename to plural `agents`; retain a named map of built-in overrides and custom agent definitions. |
246-
| `permission` | Tool permission rules | redesign | Rename to plural `permissions`; replace legacy map shorthand with an ordered array of `{ permission, pattern, action }` rules. |
247-
| `tools` | Legacy tool enable/disable map | remove | Do not port boolean enable/disable alias; express tool access through permissions. |
241+
| Field | Current Purpose | Status | Notes |
242+
| --------------- | --------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
243+
| `default_agent` | Choose default primary agent | remove | Do not retain a separate top-level selector; default choice should be designed with the v2 agent configuration model. |
244+
| `mode` | Legacy agent configuration alias | remove | Do not port deprecated alias; configure agents through the v2 agent surface only. |
245+
| `agent` | Configure primary, subagent, and specialized agents | redesign | Rename to plural `agents`; retain a named map of built-in overrides and custom agent definitions. |
246+
| `permission` | Tool permission rules | redesign | Rename to plural `permissions`; replace legacy map shorthand with an ordered array of `{ action, resource, effect }` rules. |
247+
| `tools` | Legacy tool enable/disable map | remove | Do not port boolean enable/disable alias; express tool access through permissions. |
248248

249249
Do not port `default_agent` ahead of the v2 agent design. The legacy runtime uses it to choose a visible, non-subagent fallback instead of `build`, but exposing that selection as an isolated top-level field would pre-commit v2 to the legacy agent model before agents and their policy surface are defined together.
250250

@@ -281,21 +281,21 @@ Retain `description`, `hidden`, and `steps`; they define an agent's discoverabil
281281
"color": "warning",
282282
"steps": 12,
283283
"disabled": false,
284-
"permissions": [{ "permission": "edit", "pattern": "*", "action": "deny" }],
284+
"permissions": [{ "action": "edit", "resource": "*", "effect": "deny" }],
285285
},
286286
},
287287
}
288288
```
289289

290290
Do not port `tools`, either as a top-level setting or as an agent-entry alias. The legacy loader already converts tool booleans into permission rules, including collapsing write-adjacent tool names into `edit`; v2 should avoid carrying that lossy compatibility input forward.
291291

292-
Rename legacy `permission` to `permissions` and expose the normalized ordered ruleset already modeled by `PermissionV2.Ruleset`. Rules retain the interactive `"ask"` action in addition to `"allow"` and `"deny"`; this is distinct from `experimental.policies`, whose provider enforcement currently needs only allow/deny decisions. The same `permissions` ruleset shape should be used inside future `agents` entries.
292+
Rename legacy `permission` to `permissions` and expose the normalized ordered ruleset already modeled by `PermissionV2.Ruleset`. Rules retain the interactive `"ask"` effect in addition to `"allow"` and `"deny"`; this is distinct from `experimental.policies`, whose provider enforcement currently needs only allow/deny decisions. The same `permissions` ruleset shape should be used inside future `agents` entries.
293293

294294
```jsonc
295295
{
296296
"permissions": [
297-
{ "permission": "bash", "pattern": "*", "action": "ask" },
298-
{ "permission": "bash", "pattern": "git status", "action": "allow" },
297+
{ "action": "bash", "resource": "*", "effect": "ask" },
298+
{ "action": "bash", "resource": "git status", "effect": "allow" },
299299
],
300300
}
301301
```

0 commit comments

Comments
 (0)