* fix(terminal): handle Ctrl+Insert copy without clearing selection or leaking Win32 input (#4351)
* fix(terminal): suppress paired Ctrl+Insert keyup in native Kitty mode and set Windows UA in test
* test(terminal): override navigator.userAgent via Object.defineProperty in JSDOM fixture
* feat(ui): inline compose directory picker and streamline AI session history UX
* fix(ai): exclude workspace members and hidden terminals from active-elsewhere jump targets
* fix(ai): clear non-AI magnification overlay when jumping to an active chat tab
* feat(capabilities): add terminal_execute_bulk to run one command on many sessions
Add a terminal_execute_bulk MCP tool that runs the same short command on
2-20 open terminal sessions and groups identical results.
- All-or-nothing preflight: scope, closing, busy, connected, transport
and the per-shell command safety policy are checked for every target
before anything is sent. Any bad target cancels the whole call and all
bad targets are reported at once.
- One approval listing every host. Remembered grants and external-client
session approval never satisfy it (policy.requiresFreshApproval), and a
pending fan-out is not swept up by another request's session approval.
- Targets are claimed before the prompt and re-checked after it; all
targets then start in the same synchronous turn under a single per-chat
exec lock, each with its own wall-clock timeout.
- Results are grouped only when status, exit code, stdout, stderr and
error are identical on the full output, then truncated (tailLines and
size caps). JSON output matches the other tools.
- Loaded on demand through the terminal_bulk toolset.
* fix(capabilities): harden terminal_execute_bulk after review
- Only trust the metadata "connected" flag for worker-hosted sessions; a
live main-process session with a stale snapshot is no longer refused.
- Keep targets protected from idle auto-close from the claim through the
approval wait to completion, and release on every path.
- Classify blocklist refusals before status keywords so a pattern such as
"cancel-job" is reported as not_sent, not cancelled.
- List the terminal_bulk toolset in the MCP server instructions and the
netcatty-mcp skill so clients can discover it.
- Test that the bulk RPC gets the same timeout budget as terminal_execute.
* fix(capabilities): validate worker sessions up front and cancel them at the deadline
An independent review found that the default (terminal worker) sessions
could receive a partial send, and that the backstop deadline never
reached the worker.
- Add a no-send precheck mode to the worker exec handler. The bulk
preflight now runs every deterministic check for worker sessions
(transport, shell kind, shell-specific safety patterns, unsupported
local shell, busy job) so a refusal cancels the whole call before any
host receives the command.
- Add netcatty:ai:exec:cancel and call it at the deadline, so a stuck
worker command is cancelled before the per-chat lock is released
instead of overlapping the next command. Background jobs are left
alone.
- Make the deadline grace 3s and give the bulk RPC extra timeout budget
for its preflight, so the backstop fires before the client gives up.
- Do not group hosts whose exec layer already dropped different amounts
of output, and share one size budget between stdout and stderr.
- Restrict the capability to the sidebar agent; the global agent runs
delegated, which bulk refuses.
- Document that live terminal readiness is a send-time state.
* test(capabilities): cover terminal_execute_bulk over the real MCP wire and close mutation gaps
- Drive the tool through the real stdio MCP server: hidden until the
terminal_bulk toolset is loaded, schema shape, JSON result, Error text
with isError, schema rejection of a native array, and privacy masking
of the grouped result with token restoration in the command.
- Mutation testing (18 deliberate breakages of the safety-critical
lines) left three survivors; add tests that kill two of them: hosts
differing only in exit code, status, stderr or error never share a
group, and a session-scoped answer to a fan-out approval does not
approve later writes from that client.
- Assert that delegated agents cannot reach the fan-out at the gate.
* fix(capabilities): address review findings on terminal_execute_bulk
- Keep the tool MCP-only for now. The in-app agent has no completed-write
replay for it after a context-compaction retry, and its SDK approval
gate would stack a second prompt on the bridge's fresh approval. Both
can follow in a separate change.
- Re-run the transport preflight for every claimed target after the
approval and before the synchronous start, so a worker session that
changed while the user was deciding cancels the whole call instead of
being refused after other hosts have started.
- Never group hosts whose exec layer already dropped part of the output:
equal retained tails do not prove equal full results.
* fix(capabilities): only report not_sent on explicit evidence and flag capped output
- Classify a host as not_sent only when the exec layer says so (a known
pre-send code or refusal text). An error with no output and no exit
code, such as a terminal worker exiting after it typed the command,
is now reported as error, so a mutating command is never presented as
safe to retry blindly. SHELL_NOT_READY and EXECUTION_NOT_AUTHORIZED
are now recognised, so a call where every host refuses fails as
not sent instead of returning ok.
- Have execViaRawPty and execViaChannel set outputTruncated when they
stop collecting at their size cap, so hosts that differ only in the
discarded output are never grouped.
* test(capabilities): run terminal_execute_bulk against the real worker exec handler
Wire the bridge to the production terminal-worker exec handler with fake
shells that speak the wrapper protocol, and cover the grouped result,
Stop while every host is running, and real per-host timeouts.
* fix(capabilities): do not probe hosts before the bulk approval
In confirm mode the preflight ran the shell-kind probe, which opens an
SSH exec channel and runs a remote command, before the approval prompt.
Denying the call (or another target failing) still executed something on
the host, and on an account with a forced command that could trigger it.
- The preflight before the prompt is now read-only: no channel is opened,
and the safety check uses the shell kind only if it is already known,
otherwise the shell-independent patterns.
- The full check, including the probe and the shell-aware patterns, runs
right after approval and before any command is sent, so the call is
still all-or-nothing. Without a prompt the full check runs first.
- The worker precheck honours the same distinction.
* fix(capabilities): recheck local guards before probing hosts after approval
After the approval the bulk call ran the probing transport pass first and
rechecked cancellation, scope and the privacy policy afterwards. A call
that was no longer authorized (Stop pressed, session out of scope,
privacy settings changed while the prompt was open) was rejected only
after the hosts had already been probed.
Run the local, read-only guards first, then the probing pass, then the
guards again because the pass awaits, and only then take the chat lock
and start. A refusal by the privacy hook now happens before the lock is
taken.
* fix(capabilities): re-read the permission mode and classify exec refusals precisely
- Re-evaluate the live permission mode with the other local guards, both
before the probing pass and again before the start. Switching to
observer while a prompt is open (or while hosts are being checked) now
refuses the call, and a call that needed no approval is refused if the
mode turns into confirm before it starts.
- Keep the code of an error the exec layer throws, so SHELL_PROMPT_PENDING
(thrown before anything is written) is reported as not_sent and an
all-refused call fails as not sent.
- Recognise the executors' real closed-stream messages ("Stream closed
unexpectedly", "Serial port closed unexpectedly") as connection_lost.
* feat(sftp): insert file path or cd into paired terminal from SFTP context menu
* fix(sftp): guard terminal path insertion against unclosed quote contexts
* fix(sftp): reject trailing dollar fusion and after-cursor command text
* fix(terminal): detect standard root-directory shell prompts (user@host:/$) for SFTP path injection
* fix(sftp): reject arithmetic insertion contexts and continuation-prompt cd
* fix(terminal): ignore right-aligned prompt decorations in after-cursor readiness check
* fix(sftp): resolve remote shell dialect from prompt/OS and use portable Unix quoting
* fix(terminal): require unwritten xterm gap cells before ignoring right-prompt decorations
* feat(tabs): focus adjacent terminal tab on close instead of jumping to Vaults or SFTP
* test(tabs): reset activeTabStore before tearing down JSDOM globals
* feat(ai): tint user message bubbles with theme accent for clearer turn separation
* fix(css): wrap global border-color reset in @layer base so user bubble border-primary utilities apply
* feat(local-terminal): support optional startup command on local terminal hosts
* fix(local-terminal): validate saved local launch target before overlaying startup command
Fixes#4346
Prefill the saved host password in the SSH credential retry dialog after a target authentication failure, instead of clearing the field.
Linux Electron smoke PASS on 20b0ad946b:
/workspace/netcatty-smoke-shots/pr-4350-20b0ad946-20261125-095752
GitHub Codex CLEAN; CI 45524469003 green.
Fixes#4344
Preserve occupied host groups (and their saved defaults) after Smart Merge when a null baseline meets remote tombstones for a moved group.
Linux Electron smoke PASS on 184c783d19:
/workspace/netcatty-smoke-shots/pr-4349-184c783d-20261124-194948
GitHub Codex CLEAN; CI 45386915778 green.
* feat(sftp): stream packed downloads and restore selected folders locally
* fix(sftp): address packed download lifecycle and cleanup review
* fix(sftp): preserve live packed state across window reload and fall back on POSIX special child names
* fix(sftp): guard active-packed snapshot replay race and fall back on selected root symlinks
* fix(sftp): fall back before nested-link containment check for selected root symlinks
---------
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
* feat(tabs): move a tab to its own window without reconnecting (#4201)
Adds "Move Tab to New Window" to the tab context menu. Instead of opening
a new connection like "Copy Tab to New Window", the tab is hidden from the
tab bar and an attach popup takes over the same live PTY, so bastion
sessions are not re-authenticated and no extra seat is used. Closing the
popup returns the tab (with its screen state) to the window it came from.
- popup lifecycle notifies the home window via terminal-popup:attach-closed
- new runtime poppedOut flag; popped-out tabs still persist for restore and
are not labelled as AI silent sessions in the tray
* fix(tabs): keep moved tabs alive when their source window closes
- A moved-tab popup registers as the lifetime heir of its session. If the
source window is destroyed, ownership passes to the popup instead of the
session being closed (worker and in-process paths). AI observe popups are
unchanged.
- If the source window is gone when the popup closes, skip the hand-back so
the popup's ownership closes the session.
- Only offer/allow Move Tab to New Window for connected sessions; attach
mode cannot connect or reconnect a backend.
* fix(tabs): expose Move Tab to New Window through TerminalHost
The handler was registered but not passed into the terminal domain bag,
so AppView received undefined and the menu item never rendered.
* fix(tabs): address move-to-window focus, crash ownership, live count, history, and AI context review findings
* fix(tabs): activate moved-tab lifetime heir only after output rebind succeeds
* fix(tabs): wait for popup attachment before hiding tab and exclude plugin sessions
* fix(tabs): confirm renderer reattach before resolving move and await output restore before unhiding tab
* fix(tabs): preserve detached output across popup crashes and avoid focusing main window from tray
* fix(tabs): deliver attach snapshots and output restore directly to peer session windows
* fix(tabs): schedule automatic output restore retries when popup recovery fails
* fix(tabs): handle reopen replay preservation, stale restore cancellation, startup workspace move, and shutdown log capture
* fix(tabs): reassert popped-out state after tray reopen
* test(terminal): provide log finalizer stubs in popup snapshot harness
---------
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
* fix(ai): refresh stale runtime model catalogs on use
* fix(ai): check model catalog freshness on picker open
* fix(ai): preserve saved rows on current-only stale catalog revalidation
* fix(ai): skip Cursor CLI probes on cacheOnly and warm model catalog checks
* fix(ai): keep cacheOnly model hydration non-blocking and restart-safe
* fix(ai): persist exact alias keys for cacheOnly hydration and reconcile warnings
* fix(ai): add backward-compatible pre-alias v1 catalog resolution for cacheOnly
* fix(ai): track alias migration per entry and consult Cursor alias before probing
* fix(ai): resolve pre-alias catalogs asynchronously by exact binary and allow missing CLI on cacheOnly
* fix(ai): preserve saved models for missing CLI and persist joined aliases after load
* fix(ai): reuse saved alias when bare CLI disappears from PATH
* fix(ai): alias env-configured CLI paths and adopt valid model on picker revalidation
* fix(ai): reprobe moved Cursor CLI on stale revalidation instead of pinning stale alias
* fix(ai): preserve PATH fallback when env-configured CLI path is invalid
---------
Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
* fix(settings): draw a border on frameless settings windows
* chore: retrigger CI after unrelated compressUploadBridge flake
---------
Co-authored-by: Codex <codex@openai.com>