fix(runtime): settle authority on unlisted shells and drop the SSH generation entry

The command-finished guard required a shell in SHELL_NAMES, so a user on
ksh/dash/tcsh/csh/ash/elvish/xonsh could never settle launched-agent hook
authority until the pty itself exited. Those are bare shells for every
consumer of the predicate, so widening the set is the correct scope.

The settle-generation Map also kept one entry per abnormally-exited SSH pty:
that branch preserves launch authority by design (unverifiable, not exited),
but the counter is bookkeeping for a check that can no longer land.
This commit is contained in:
Brennan Benson
2026-08-23 17:51:44 -07:00
parent 2ddfa13fe2
commit 0867358f37
3 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -2,7 +2,9 @@
// renderer (agent-ready-wait, new-workspace). A bare shell is the negative
// signal for "is an agent running" because it garbles injected preambles.
const SHELL_NAMES = new Set(
'|bash|zsh|sh|fish|cmd|cmd.exe|powershell|powershell.exe|pwsh|pwsh.exe|nu'.split('|')
'|bash|zsh|sh|fish|cmd|cmd.exe|powershell|powershell.exe|pwsh|pwsh.exe|nu|ksh|mksh|dash|ash|tcsh|csh|elvish|xonsh'.split(
'|'
)
)
const WINDOWS_PROCESS_EXTENSION_RE = /\.(?:exe|cmd|bat|ps1)$/i