Run explicit !commands locally in the coding console - #251
Conversation
Route typed shell input before history, prompt rewriting and queueing. Preserve cancellation, typed queues and explicit bounded result sharing. Report unavailable PC interface metrics without crashing diagnostics.
AetherAI3
left a comment
There was a problem hiding this comment.
Implementation self-review against #244 completed at a15eed2 (not an independent approval).
Checked both submit surfaces, routing before history/rewrite, typed busy queue serialization, explicit user origin/cwd/status/output/exit, shell cancellation and draft restoration, escaped literal history recall, multiline refusal, absence of implicit shell-output sharing, bounded explicit /shell-result, history opt-out and unchanged model validation/permission gates. No blocking source finding remains from this review.
Final local npm test: 2,900 total; 2,889 passed; 11 skipped; zero failed. Typecheck, generated-doc validation, packed CLI install, ATS source inventory and 29 Python launcher tests also passed. GitHub tree d5b4e073bb5e3d5b843d1251ce2bbdba5a296800 matches the locally tested source exactly.
CI and CodeQL were rejected before their first step with: 'The job was not started because your account is locked due to a billing issue.' Hosted Windows and CodeQL proof is unavailable. This PR does not weaken workflow policy or branch protections.
#245 retains persistent cwd/environment; #246 retains interactive PTY work; #247 retains capture-tail/UTF-8 improvements. Those are separate work and should remain open.
Why
Typing
!pwdpreviously sent a model prompt. This change runs explicit user shell submissions locally and returns to ordinary chat without spending model UVT.Closes #244.
What changed
\!for literal chat, empty-command guidance and explicit multiline-paste behavior./shell-resultas an explicit, session-only sharing action with an 8 KiB result limit; preserve the original escaped input in saved chat history.Verification
npm test: 2,900 tests, 2,889 passed, 11 skipped, 0 failed (146.9 seconds). Includes packed-CLI install verification.Hosted run evidence: CI and CodeQL. These are infrastructure failures, not passing test evidence; Windows-hosted verification remains unavailable.
The GitHub source tree is identical to the locally tested tree:
d5b4e073bb5e3d5b843d1251ce2bbdba5a296800.Scope and risk
Explicit user shell commands have the operator's local authority. They do not grant later model execution permission. Each command uses a fresh noninteractive
/bin/sh(POSIX) orcmd.exe(Windows) in the selected checkout. Online managed-agent DMs are unchanged.Persistent cwd/environment remains tracked by #245; interactive PTY handoff remains tracked by #246. Large captured-output tail/UTF-8 improvements remain tracked by #247. No new duplicate follow-up issues were opened. Cross-repository ATS execution parity requires a separate ATSv2 checkout and is outside this console change.