Skip to content

Commit 974d291

Browse files
Wrap the text under TOML rule for easier readability in policy-engine.md… (#23076)
Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com>
1 parent 3382e04 commit 974d291

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

docs/reference/policy-engine.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ Here is a breakdown of the fields available in a TOML policy rule:
262262
# A unique name for the tool, or an array of names.
263263
toolName = "run_shell_command"
264264
265-
# (Optional) The name of a subagent. If provided, the rule only applies to tool calls
266-
# made by this specific subagent.
265+
# (Optional) The name of a subagent. If provided, the rule only applies to tool
266+
# calls made by this specific subagent.
267267
subagent = "generalist"
268268
269269
# (Optional) The name of an MCP server. Can be combined with toolName
@@ -278,14 +278,17 @@ toolAnnotations = { readOnlyHint = true }
278278
argsPattern = '"command":"(git|npm)'
279279

280280
# (Optional) A string or array of strings that a shell command must start with.
281-
# This is syntactic sugar for `toolName = "run_shell_command"` and an `argsPattern`.
281+
# This is syntactic sugar for `toolName = "run_shell_command"` and an
282+
# `argsPattern`.
282283
commandPrefix = "git"
283284

284285
# (Optional) A regex to match against the entire shell command.
285286
# This is also syntactic sugar for `toolName = "run_shell_command"`.
286-
# Note: This pattern is tested against the JSON representation of the arguments (e.g., `{"command":"<your_command>"}`).
287-
# Because it prepends `"command":"`, it effectively matches from the start of the command.
288-
# Anchors like `^` or `$` apply to the full JSON string, so `^` should usually be avoided here.
287+
# Note: This pattern is tested against the JSON representation of the arguments
288+
# (e.g., `{"command":"<your_command>"}`). Because it prepends `"command":"`,
289+
# it effectively matches from the start of the command.
290+
# Anchors like `^` or `$` apply to the full JSON string,
291+
# so `^` should usually be avoided here.
289292
# You cannot use commandPrefix and commandRegex in the same rule.
290293
commandRegex = "git (commit|push)"
291294

@@ -295,14 +298,16 @@ decision = "ask_user"
295298
# The priority of the rule, from 0 to 999.
296299
priority = 10
297300

298-
# (Optional) A custom message to display when a tool call is denied by this rule.
299-
# This message is returned to the model and user, useful for explaining *why* it was denied.
301+
# (Optional) A custom message to display when a tool call is denied by this
302+
# rule. This message is returned to the model and user,
303+
# useful for explaining *why* it was denied.
300304
deny_message = "Deletion is permanent"
301305

302306
# (Optional) An array of approval modes where this rule is active.
303307
modes = ["autoEdit"]
304308

305-
# (Optional) A boolean to restrict the rule to interactive (true) or non-interactive (false) environments.
309+
# (Optional) A boolean to restrict the rule to interactive (true) or
310+
# non-interactive (false) environments.
306311
# If omitted, the rule applies to both.
307312
interactive = true
308313
```

0 commit comments

Comments
 (0)