fix(mods): jev-auto-mode shows the whole action in the Allow / Deny dialog (dialogMaxChars option)
What
The mod's Allow / Deny dialog cut the action to 80 characters, the same as the log lines (describeAction() in hooks/rules.ts). A long command reached the user as Bash(cd /path && git push --dry-run origin some-bra…), so the user approved text they could not read in full.
judge.ts already says why this matters for the judge (stateText(): "a judge shown half a command could approve what it never saw") and sends it the whole input. This change gives the user the same.
describeAction(a, max = 80): the cut is now a parameter. Logs, the status line and/jev-auto-mode logkeep 80.- New option
dialogMaxChars(number, default0= the whole action). The dialog uses it; a positive value cuts there instead. - README Options list and
plugin.jsonuserConfigdocument it. tests/rules.test.ts:describeActioncuts at 80 by default and shows everything withInfinity.
Behaviour change
The default dialog now shows the whole action instead of 80 characters. Inputs over 20,000 characters are already sent to ask before any rule, so the dialog has an upper bound. Set dialogMaxChars: 80 to get the old dialog.
Checks
cd cli-tool/components/mods && npx -y -p typescript@5 tsc -p tsconfig.json: clean.claude plugin test security/jev-auto-modeon Claude Code 2.1.312: 26 pass, 4 fail. The same 4 fail onmainwithout this change (25 pass, 4 fail), all intests/jev-auto-mode.test.tsand all on the engine's permission answer, not the dialog text:rules deny, allow past the engine prompt, and split compound commands:tool.checkgivesask, expectedallowthe judge decides what no rule covers; headless asks deny,askWith engine hands the ask to the permission mode,audit mode logs what it would do and lets everything run:Permission to use Read/Bash has been denied
- Live: a ~150-character
git push --dry-run …under agit push*ask rule; the dialog showed it to the end.
🤖 Generated with Claude Code
Summary by cubic
Fixes the jev-auto-mode mod's Allow / Deny dialog so it shows the whole action instead of cutting it to 80 characters like the log lines; long commands previously reached the user truncated, so an approval could be given to text the user had never seen in full.
describeAction()now takes a max length; logs, the status line, and/jev-auto-mode logkeep 80.- New
dialogMaxCharsoption (default0= whole action) controls the dialog; set it to80for the old behavior. - Affects
cli-tool/components/mods/security/jev-auto-modeonly; no new components, so nodocs/components.jsonregeneration, and no new environment variables or secrets.