Repository navigation
The user policy can now replace what an agent is told when a built-in rule blocks, and the local policy GUI gets an inline editor with a live preview of that message.
Added
- Added
destructive_command_protection.messagesandsecret_protection.messagesto the user policy. Each maps a built-in rule id to{ "reason": "...", "intent": "..." }to replace what the agent is told when that rule blocks, for example to name a safe alternative. The rule still blocks, one message covers every command that rule blocks, and a match found inside a script keeps itsfile:lineprefix. (#370, #371) - Added
reasonandintentvalidation for those maps:reasonis required and at most 256 characters, and the optionalintentselects the closing instruction (hard_stop,use_alternative,scope_down,manual_only, orstop_and_explain). Only ids in that section's rule set qualify; a structural denial such asguard.*,analysis.*,cwd.*,tool-call.*, orsecret.deny-pathcannot carry a message. - Added a block-message editor to every rule row in the Protections tab of the policy GUI, with the built-in wording to start from where it can be resolved, a preview rendered by the real block formatter with the custom parts marked, and a per-section count of custom messages. A rule with a message shows its wording at rest, counts under "Changed from default", and matches search; a reason over the limit shows how much to cut and disables Save. (#371)
- Added links from a blocked tester result and a blocked Activity entry straight to that rule's message editor.
- Added rule messages to the
policy check --globaldiff, so a user-scope proposal that sets or changes one shows it as a diff row.
Changed
- Changed rule messages to user scope only: a project policy that sets them is ignored with a config warning, and both
policy checkand the GUI refuse a project proposal that carries them. - Improved the error for an object under
destructive_command_protection.overridesorsecret_protection.overrides, which now points at that section'smessagesmap instead of only repeating that the value must be"on"or"off".