Repository navigation
v0.3.0
[0.3.0] - 2026-11-01
0.3.0 replaces how the plugin decides anything. It used to parse the command
string to find sudo, then parse the output to guess whether authentication
failed; both are gone. The plugin now only prepends a directory of shims to
PATH, letting the shell's own name resolution pick them, and reads the
outcome from exit status alone. Everything that existed to support guessing —
the lexical scanner, the output matchers, the denial cache, the translations —
is deleted with it. The plugin no longer changes the command the agent wrote.
Added
src/shims.ts:sudo,doas,sudoeditandvisudoscripts written to a
private0700temporary directory at setup and removed when the plugin is
disposed.sudoanddoasforward topkexec;sudoeditandvisudo
refuse, because polkit has no equivalent flow.- Deterministic option contract in the shims:
-u USER,-uUSER,--user USER
and--user=USERbecomepkexec --user USER,--ends option parsing, and
every other option is refused with exit status64and a message naming the
alternative (-n→ polkit decides,-i/-s→pkexec bash,-E/-H/-P
→ pkexec sanitizes the environment,-b→ append&).pkexecwould
otherwise reject them withCannot run program, which says nothing about what
to do next. - A one-line explanation on exit status
126: it is the only pkexec failure
path that prints nothing of its own, so the shim says the dialog was
dismissed. Every127path already prints its reason. SHIM_USAGE_EXIT(64) documents that the refusal status is the shim's own and
cannot be confused with pkexec's126/127.
Changed
- Breaking: commands are no longer rewritten. The
shelltool's
execute.before/execute.afterhooks are replaced by a single
shell.create.beforehook that only setsevent.env.PATH, so the agent's
command reaches the shell exactly as written, andsudoinside quotes,
comments or heredocs needs no special case. - Breaking: authentication failures are reported from exit status
(126dismissed,127not authorized,64refused invocation), never from
output. The locale-dependent matchers forNot authorized,
Error executing command as another userand
Error creating textual authentication agentare gone. - Breaking: messages are English only. The
Messagestable, the ten
translations anddetectLocaleare removed; the consumer is the coding agent. - Breaking: a refused command is no longer remembered. Retrying after a
dismissed dialog prompts again instead of being rejected by the plugin. - PATH interception is idempotent: prepending happens once, so stacked hooks do
not growPATH.
Removed
scanPrivileged(the quote-, escape- and heredoc-aware lexical scanner) and
findBadOption.- The
deniedCommandsandoriginalCommandsmaps, along with the
execute.afterresult rewriting they supported. - The
translationstable for en, zh, ja, ko, de, fr, es, pt, ru, tr and uk. - The i18n section of the README, which now documents the exit-status contract
and the PATH shim's limits instead.