Commit Graph
29 Commits
Author SHA1 Message Date
Yichen Jiang 454a3f7a88 fix(terminal-controller): delete confined Agent shell history and stop pointing read-only shells at it
read-only confinement cannot write /tmp, so the per-terminal history path
did nothing there; read-only shells now get an empty HISTFILE, which also
keeps them from loading the person's history. workspace-write shells keep
their per-terminal history file, and the controller now deletes it
through the same execution environment after the shell ends, including a
failed allocation; a failed deletion is logged.
2026-11-04 15:48:30 +08:00
Yichen Jiang b105a29412 fix(ui-sidebar-terminal): close the tab of a terminal that ends under Agent control
The sidebar only opened tabs for Agent terminals that appeared in the
roster, so a terminal the Agent closed left a "Terminal closed." tab
behind. Each window now remembers which listed terminals the Agent
controls and closes the tabs bound to one that leaves the roster; a
terminal the person took over keeps its tab. The client terminal list
also adopts each whole roster instead of only merging it, so terminals
the Host no longer retains leave the cached list. ClientTerminals gains
boundTerminal to read a tab's terminal binding.
2026-11-04 15:38:52 +08:00
Yichen Jiang 5659e20c45 fix(ui-sidebar-terminal): keep focus reports and scrolling from taking over Agent terminals
A click that focuses a program with focus reporting (DECSET 1004), such as
vim or neovim, made xterm send ESC [ I within the gesture window, so the
click took the terminal over. Scrolling a pager on the alternate screen
did the same through wheel-generated arrow keys. Focus reports are never
typed, and the wheel no longer opens the typed-input window.
2026-11-04 15:34:43 +08:00
Yichen Jiang 6be8e43bcd fix(terminal-controller): reopen a failed roster stream for its remaining watchers
A roster stream that failed while watched used to drop its watchers, so
Agent terminals stopped opening tabs until the Session header remounted.
The stream now reopens in place on the next watch of that Session or when
the connection resets.
2026-11-04 14:23:31 +08:00
Yichen Jiang f1e90e5845 fix(terminal-controller): bound Agent terminals precisely and report closed screens uniformly
maxAgentTerminals now counts only running Agent-controlled terminals and
pending Agent allocations, each id once; exited terminals and failed
allocations awaiting cleanup still count toward maxTerminals. openForAgent
applies rename's 1-120 character title rule and trims the title.
readScreen reports a terminal closed while its read drains as
RemoteError terminal/unavailable, like a missing terminal.
2026-11-04 14:23:21 +08:00
Yichen Jiang c8cf0693ac docs(terminal-controller): state Agent terminal history and close ordering precisely
Only workspace-write can write the confined history file, so read-only
shells do not save history; unconfined shells keep the inherited HISTFILE
unless env sets one. AgentTerminal.close checks control once when called,
and a takeover during cleanup does not stop the close. The sidebar README
now says only a confined terminal's badge names its sandbox mode on hover.
2026-11-04 14:08:52 +08:00
Yichen Jiang 6b7a1712e3 feat(terminal-controller): mark logical lines and expose the Agent terminal process id 2026-10-20 15:06:50 +08:00
Yichen Jiang 8ade0f7c9b feat(terminal-controller): let callers add environment variables to Agent terminals 2026-10-20 15:04:09 +08:00
Yichen Jiang 336ee0d7fd feat(terminal-controller): read Agent terminal screens synchronously with an explicit drain 2026-10-20 15:02:36 +08:00
Yichen Jiang eaf6df53e2 docs(terminal-controller): document Agent terminals, roster watch and sidebar takeover 2026-10-20 14:51:32 +08:00
Yichen Jiang 0ae278b935 fix(web): share terminal discovery per session 2026-10-15 20:12:52 +08:00
Yichen Jiang 5538b790c6 fix(web): bound terminal uplink and preserve final output 2026-10-12 13:54:11 +08:00
Yichen Jiang c6f3639b5e docs(web): align terminal duplex documentation 2026-10-12 12:44:06 +08:00
Yichen Jiang 5379996fcb feat(web): carry terminal input over duplex streams 2026-10-12 11:18:43 +08:00
Tianyi Cui b446e2e290 fix(web): start sidebar terminals in the session directory 2026-10-06 01:27:55 +08:00
Turtle f028f25667 refactor: remove runtime invariant plugins
Delete @deepseek-ai/dsh-invariants, every package's ./invariant companion
and its tests, the invariant gates and Vitest setup, the scoped-event
resolver generator, and the INVARIANT-coded listener rethrow paths.
Update docs, READMEs, Agent Notes, and add an upgrade guide.
2026-09-30 12:52:18 +08:00
Yichen Jiang 41021fc803 fix(web): list each shell once in the new-terminal menu
Shell discovery keyed entries by resolved path. On merged-/usr hosts the
login shell /bin/bash from $SHELL and the PATH hit /usr/bin/bash for the
`bash` candidate are one file with two spellings, so the menu showed
"bash" twice. Key discovered shells by executable name, compared without
letter case or `.exe`, and keep the earliest entry so the default shell
stays first.
2026-09-29 10:40:27 +08:00
Yichen Jiang ab695ef4cf feat(web): give user terminals system-user permissions 2026-09-16 13:52:23 +08:00
Yichen Jiang 281723bed8 fix(web): isolate terminal bindings and validate saved layouts 2026-09-15 12:07:01 +08:00
Yichen Jiang b25c5ad82e feat(web): restore sidebar layouts and reclaim unattended terminals 2026-09-15 10:27:44 +08:00
Yichen Jiang 4012092d24 feat(web): launch terminals from provider guide menus 2026-09-14 19:22:22 +08:00
Yichen Jiang 1ddd7e08c3 fix(web): keep Windows PowerShell in terminal choices 2026-09-14 14:31:41 +08:00
Yichen Jiang 249c8d1565 feat(web): show common shells by default 2026-09-14 14:20:25 +08:00
Yichen Jiang 37e5d8c4aa fix(web): remember shell choices before terminal startup 2026-09-14 11:02:53 +08:00
Yichen Jiang 33d89aee77 feat(web): choose and remember terminal shells 2026-09-14 10:59:46 +08:00
Yichen Jiang d28625c6d5 fix(web): restore terminal snapshots across host and sidebar lifecycles 2026-09-09 19:52:55 +08:00
Yichen Jiang 0a525601a7 fix(web): harden sidebar terminal lifecycle and recovery 2026-09-09 18:17:47 +08:00
Yichen Jiang 00b16cb63a fix(web): align terminal preview, styles, and snapshots 2026-09-09 17:29:00 +08:00
Yichen Jiang e15a9b1bec feat(web): add interactive sidebar terminals 2026-09-09 16:40:58 +08:00