Commit Graph

772 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
陈大猫 f191a9b449 fix terminal dynamic tab title settings
Add a global dynamic tab title mode, default to agent-only titles, remove the per-host disable control, and keep terminal UI refresh paths in sync with the setting.
2026-06-25 14:34:40 +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
mam15mon b709417e23 Improve network device vendor detection (#1624)
* restore h3c network device detection

* ignore release build artifacts in lint

* restore h3c mpssh banner detection

* detect network device vendor banners

* Map mpSSH banners to HPE iLO

---------

Co-authored-by: mam15mon <mam15mon@gmail.com>
2026-06-24 19:37:55 +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
bincxz 12a513606b feat(terminal): hibernate hidden tabs to reduce renderer memory
Dispose xterm for off-screen tabs while keeping SSH connected, with configurable delay, file-transfer exemptions, and wake replay for alternate-screen apps.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 00:40:16 +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
陈大猫 3beb909a09 Add OpenCode SDK integration (#1596)
Add OpenCode SDK integration
2026-06-23 18:59:28 +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 f237cfb4ab Merge branch 'main' into codex/opencode-sdk-integration
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 18:56:30 +08:00
陈大猫 aa37b353f7 Add snippet import and export workflow
Adds snippet import/export interactions, multi-file import, array-format support, and downloadable sample files.
2026-06-23 17:22:55 +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
bincxz d184819b61 Merge remote-tracking branch 'origin/main' into codex/opencode-sdk-integration 2026-06-23 14:25:30 +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 44a84b5046 Add OpenCode agent integration 2026-06-23 14:09:42 +08:00
bincxz 8deb52842b Address review findings for notes import and code block copy.
Reset import input on all paths, log failures, report skipped files, improve copy button a11y with MutationObserver, scope code block select CSS, and add readTextFile tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 11:49:36 +08:00
bincxz 28762b3a73 Fix note import race conditions and title parsing edge cases.
Skip fenced code blocks when deriving import titles, guard concurrent imports with a ref, and tighten the file picker accept list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 09:55:01 +08:00
bincxz a493fbfea8 Add Markdown import and code block copy to vault notes.
Support bulk .md/.txt import into the current notebook folder and add hover copy buttons on note code blocks in edit and preview modes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 09:51:32 +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
bincxz cff74b6e49 polish terminal and settings UI 2026-06-22 22:04:33 +08:00
陈大猫 94464da004 [codex] Fix follow-app terminal theme selection (#1562)
* Fix follow-app terminal theme selection

* Fix custom follow theme selection
2026-06-22 20:48:16 +08:00
陈大猫 d8ac9b081b Add explicit clipboard image upload action
Closes #1536
2026-06-22 18:57:47 +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
陈大猫 d1cb3e100b Allow editing managed agent CLI paths (#1559) 2026-06-22 17:35:28 +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
陈大猫 018067032e [codex] Add OSC 7 directory tracking setup (#1553)
* Add OSC 7 directory tracking setup

* Address OSC 7 setup review feedback

* Harden OSC 7 setup command

* Cover OSC 7 shell and locale edge cases
2026-06-22 13:30:23 +08:00
bincxz eb1a39dbc2 Add ssh deep link setting 2026-06-22 12:09:52 +08:00