Commit Graph

556 Commits

Author SHA1 Message Date
陈大猫 0c8370477c Unify AI permission auto mode (#1688) 2026-06-26 00:26:30 +08:00
陈大猫 9aed2c41d4 feat(ai): unify capability registry, harness tools, and agent runtime (#1685)
* feat(ai): unify capability registry, harness tools, and agent runtime

Centralize MCP/CLI/Catty tool surfaces in the capability catalog with codegen,
move Catty-only harness tools into catalog with local execution, converge
mcpServerBridge builtin dispatch via registry, and wire AgentRuntime with
vault bridge, permission grants, and Round 2 catalog parity.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(ai): vault host tools, artifact cards, and external agent vault guidance

Unify vault host create/import with capability RPC routing, add chat artifact cards with Vault navigation, and align external MCP agents with Catty rules so host creation never falls back to Vault Notes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): address Bugbot findings for streaming, vault bridge, and grants

Clear Catty streaming by chat sessionId, read latest vault state via getters on agent mutations, and stack grant persisters so unmounting one AI panel does not break others.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(vault): clear pending openNoteId after chat navigation focus

NotesManager notifies VaultView once the one-shot openNoteId request is applied so the id does not stick for the rest of the session.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(vault): serialize vault agent IPC mutations to prevent lost writes

Queue vault agent bridge handlers so concurrent hosts.create or note.create tool calls cannot overwrite each other via stale read-modify-write snapshots.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(vault): keep synchronous vault snapshot for agent IPC reads

Mirror hosts, notes, and groups in a ref updated immediately on agent writes so serialized mutations see the latest state before React re-renders.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): sync Catty MCP sessions and defer runtime cleanup on delete

Register terminal sessions with the main process before Catty tool calls, and clear ToolOutputStore only after stopping an active turn when deleting a chat session.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): avoid deleting a newer abort controller on late stop

Only remove the session abort-controller entry when stop finishes if it still refers to the controller that was stopped.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): sync vault snapshot on render and await active turn on stop

Refresh vault agent reads when React props change without clobbering in-flight agent writes, and wait for runTurn to finish before clearing ToolOutputStore on session delete.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): reload permission grants from storage before auto-approve

Re-read persisted grant rules on each approval check so revocations in Settings take effect without requiring a chat hook remount.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ai): sync permission grants to main process immediately on write

Push MCP permissionGrantsSnapshot as soon as Always allow persists a rule so the next tool call in the same agent turn sees the grant without waiting for useEffect.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 00:08:39 +08:00
bincxz 766dd36d76 Merge remote-tracking branch 'origin/main' into codex/issue-1653-port-forward-known-hosts
# Conflicts:
#	components/terminal/runtime/createTerminalSessionStarters.ts
2026-06-25 16:52:03 +08:00
bincxz 7a62acb828 Add tray host key trust prompt 2026-06-25 15:44:59 +08:00
bincxz 55ab3cc3f2 address port forward host key review 2026-06-25 15:04:00 +08:00
bincxz f0d8b51c44 handle port forward host key prompts 2026-06-25 14:49:20 +08:00
陈大猫 0d8d68d954 fix(telnet): handle NVT newlines and echo mode (#1649)
* fix(telnet): normalize NVT newlines

* fix(telnet): handle echo negotiation

* fix(telnet): align echo negotiation
2026-06-25 14:47:17 +08:00
bincxz 1b965ac6ad fix port forwarding jump host verification 2026-06-25 14:23:10 +08:00
陈大猫 7b474f6b9e Merge pull request #1646 from mam15mon/feature/manual-session-log-button
Add manual session log toolbar button
2026-06-25 13:58:30 +08:00
陈大猫 033b904982 fix(terminal): platform-aware default font + remeasure on webfont load (#1647)
Fix #1647: on Windows/Linux the macOS-only `menlo` default left terminal ASCII garbled on cold start until a manual resize, because the primary glyphs fell through to a bundled `font-display: swap` webfont (JetBrains Mono) that swapped in after xterm measured the cell grid.

- Store the terminal font default as a platform-neutral `auto` sentinel, resolved to a locally-installed font per OS at render (win32→consolas, linux→dejavu-sans-mono, darwin→menlo). Safe to persist/sync; never leaks one OS's font to another.
- Explicitly preload the bundled webfonts the terminal actually renders with and remeasure on every `document.fonts` `loadingdone`, so any late webfont swap (incl. user-chosen) recovers without a manual resize.

Reviewed by local Codex (3 adversarial passes); findings on default persistence/sync and side-panel no-op writes addressed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-25 13:32:12 +08:00
mam15mon d8304f3eec Add manual session log toolbar button 2026-06-25 10:15:39 +08:00
bincxz bf723e7348 fix: remove terminal background mirror 2026-06-25 09:42:19 +08:00
bincxz 53328ca50d feat(terminal): optimize hibernate wake for large buffers
Add chunked replay, deferred WebGL during restore, alt-screen hibernate
policies, soft-hide LRU, two-phase viewport/scrollback snapshots, and a
main-process headless xterm mirror for faster wake serialization.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 23:52:03 +08:00
bincxz 8083aece66 fix(ui): defer terminal layout suppress notifications to avoid render warnings
Schedule layout suppress store updates on the next animation frame so tab
switches and resize drags no longer trigger React setState-during-render
warnings in TerminalComponent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 23:36:32 +08:00
陈大猫 6fad3f0b76 fix(sftp): reconnect terminal side panel after SSH session loss (#1608) (#1621)
* fix(sftp): reconnect terminal side panel after SSH session loss

When SSH disconnects while the terminal SFTP side panel is browsing a stale
path, auto-connect reused a dead tab and left the pane stuck on loading.
Rebind SFTP when the terminal session changes and skip reuse unless the
backend session is healthy; also stop follow-terminal-cwd retry loops to
missing directories.

Fixes #1608

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(sftp): address review findings for side panel reconnect

Harden auto-connect after bugbot review: skip tab reuse on SSH session
change, move follow-cwd backoff ref into the interactive body, and make
navigateTo return reached/failed/aborted so follow mode only backs off on
real path failures.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 14:31:23 +08:00
陈大猫 bd3491a3e4 revert(terminal): remove auto-run snippet stty protection (#1594) (#1599)
* fix(terminal): narrow snippet terminal restore to RHEL-family hosts

Limit auto-run snippet stty protection to distros affected by #1498 and
suppress wrapper echo so Ubuntu, Rocky, and macOS users see their raw
commands again.

Fixes #1594

Co-authored-by: Cursor <cursoragent@cursor.com>

* revert(terminal): remove auto-run snippet stty protection (#1594)

The wrapper added in #1498 caused visible preamble noise for all snippet
executions. Revert to inserting the original command directly; the underlying
CentOS 7 terminal issue reproduces when running the script manually too.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 20:25:16 +08:00
bincxz 5cd6149981 fix(ui): render flag emoji in host labels on Windows
Windows was showing regional-indicator letters instead of composed flag
emoji in host labels because bundled UI fonts win font matching. Prepend
Segoe UI Emoji to the UI sans stack on Windows, including when settings
apply a custom UI font at runtime (#1589).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 19:39:21 +08:00
bincxz 4b874410f9 fix(opencode): harden SDK streaming, model list, and Windows shim path
Route Netcatty context through body.system, filter echoed user parts,
keep OpenCode env/shim alive for server lifetime, and cap model preset dropdown height.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:56:46 +08:00
bincxz c79f485270 Merge remote-tracking branch 'origin/main' into codex/fix-script-log-readability
# Conflicts:
#	components/terminal/runtime/createTerminalSessionStarters.types.ts
2026-06-23 14:45:00 +08:00
陈大猫 c6bdcffb89 feat: dynamic terminal tab titles (fixes #1572) (#1576)
* feat: add dynamic terminal tab titles for shell-reported session names

Follow OSC 0/2 window titles on session tabs so tools like Claude Code can show live session state, with a per-host opt-out to keep connection names instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: address dynamic tab title review findings

Restore the missing cn import, clear dynamic titles when the shell sends an empty OSC title, and drop stored dynamic titles when a host disables the feature.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: preserve renamed session labels and align focus sidebar titles

Prefer user-assigned customName over shell titles, skip no-op dynamic title updates, and use resolveSessionTabTitle in the workspace focus sidebar.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: show coding agent icons on session tabs

Detect Claude Code, Codex, OpenCode, Droid, and other CLIs from OSC titles and launch commands, reusing shared agent icon assets inspired by freshell pane icons.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: harden coding CLI detection across SSH and startup paths

Wire output scanning through attachSessionToTerminal, seed providers from
auto startup commands, prevent title signals from overriding command
detection, clear sticky state on shell titles, and release output scanners
on session close.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: reset CLI output scanner when provider state clears

Prevent exited-agent banners from immediately re-sticking the tab icon
after the shell title returns to a normal shell name.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: update sticky CLI provider when title signals a different agent

Allow agent switches in the same terminal while still resetting the output
scanner whenever the provider identity changes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: avoid clearing CLI provider on blank titles and cap output scan

Ignore transient empty OSC titles and stop banner scanning after 16KB of
unmatched output so regular SSH sessions do not pay perpetual scan cost.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: prefer runtime CLI provider over host startup command on tabs

Runtime detection from commands, output, and titles should win over static
host startup commands when resolving the session tab icon.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: satisfy eslint for terminal escape stripping regexes

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 14:20:05 +08:00
bincxz 65c3df2ff4 Improve snippet command log readability 2026-06-23 14:11:03 +08:00
bincxz e4c7484181 Improve notes markdown editing 2026-06-23 03:35:44 +08:00
bincxz 8741d683ba Address smoothness review findings 2026-06-23 01:49:57 +08:00
bincxz affe197f26 Improve Netcatty responsiveness 2026-06-23 01:26:12 +08:00
bincxz 475e896cf0 Fix vault theme flash 2026-06-22 23:59:32 +08:00
bincxz 541e627702 Polish notes and terminal UI 2026-06-22 23:06:05 +08:00
陈大猫 96f0a9e559 Fix tooltip theme contrast
Share accent foreground contrast logic across app and active terminal theme paths.
2026-06-22 22:26:36 +08:00
陈大猫 dea182c38a Polish vault UI state and contrast
Keep Vault notes state while switching sections, improve accent button text contrast, and adjust host tree top spacing.
2026-06-22 22:19:20 +08:00
陈大猫 b74b5a442a [codex] Add vault notes markdown workspace (#1558)
* Add vault notes markdown workspace

* Improve notes tree drag interactions

* Harden notes tree move behavior

* Refine vault notes interactions

* Address vault notes review feedback

* Tighten notes tree review fixes
2026-06-22 18:23:58 +08:00
陈大猫 e897a3a30a Merge pull request #1554 from binaricat/codex/issue-1498-stty-restore
[codex] Restore terminal mode after auto-run snippets
2026-06-22 14:20:57 +08:00
bincxz a238a5ac2f Restore terminal mode after auto-run snippets 2026-06-22 14:10:50 +08:00
陈大猫 b2c02559f1 Merge pull request #1551 from binaricat/codex/ssh-deep-link-1512
[codex] Support ssh deep links
2026-06-22 14:10:26 +08:00
bincxz f95cf73ca4 Fix ssh deep link edge cases 2026-06-22 14:08:53 +08:00
bincxz eb1a39dbc2 Add ssh deep link setting 2026-06-22 12:09:52 +08:00
陈大猫 982569532c Sync AI API keys across devices
Sync AI API keys through cloud sync while keeping device-local external tool paths local. Also preserves local AI keys in backups and stops sync if a local encrypted key cannot be read.
2026-06-22 11:45:07 +08:00
bincxz fe297dbc55 Preserve SFTP filter edits on failed refresh 2026-06-22 11:16:33 +08:00
bincxz 39f8bf194a Clear SFTP filter on directory navigation 2026-06-22 09:51:02 +08:00
陈大猫 36295e63ed [codex] Fix Agent history persistence (#1534)
* fix agent history persistence

* Keep mismatched terminal history scoped out
2026-06-20 11:27:00 +08:00
陈大猫 257cda56e3 [codex] Reduce SFTP transfer pressure (#1533)
* reduce sftp transfer pressure

* reduce sftp transfer pressure
2026-06-20 11:26:56 +08:00
bincxz d1de0d39e8 fix: keep peer windows out of settings sync 2026-06-19 16:08:18 +08:00
Zheng Liu 43063e1744 fix: isolate peer auth and settings effects 2026-06-18 12:10:02 +08:00
Zheng Liu a815e7d2e5 fix: guard hidden restore windows 2026-06-18 11:50:19 +08:00
Zheng Liu 9674cd8ae6 fix: protect peer restore windows 2026-06-18 11:39:18 +08:00
Zheng Liu d9334a8e73 fix: harden session restore isolation 2026-06-18 11:26:26 +08:00
Zheng Liu ba9d9c1e58 fix: isolate session restore side effects 2026-06-18 11:04:41 +08:00
Zheng Liu 73e615cb64 fix: isolate restored peer session windows 2026-06-18 10:52:15 +08:00
Zheng Liu 93079bb576 fix: prevent session restore snapshot loss 2026-06-17 23:41:29 +08:00
Zheng Liu 04906a80ff fix: tighten session restore edge cases 2026-06-17 22:39:10 +08:00
Zheng Liu 193b2b73c9 fix: harden session restore reconnect and sanitization 2026-06-17 22:07:32 +08:00
Zheng Liu 5a27dbe955 feat: polish restored terminal sessions 2026-06-17 21:37:50 +08:00