Skip to content

Commit 96c8efb

Browse files
committed
refactor(agent): remove legacy command tools
Remove Bash, Git, and TerminalControl from tool registration, agent defaults, deferred catalogs, prompts, and capability projections. - Route shell and local Git operations through ExecCommand - Keep terminal lifecycle control in ControlHub - Remove dedicated FlowChat cards and migrate shared process styles - Update ACP normalization, usage classification, skills, docs, and tests - Preserve legacy transcript sanitization for upgrade compatibility - Remove the obsolete computer-use refactor plan BREAKING CHANGE: Bash, Git, and TerminalControl are no longer registered Agent tools. Use ExecCommand and ControlHub terminal actions instead.
1 parent 3092045 commit 96c8efb

111 files changed

Lines changed: 638 additions & 7026 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/architecture/agent-sdk-product-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ await using client = await AgentClient.start({ cwd });
341341
// 常见的一次 Query;返回可迭代、可取消、可关闭的句柄。
342342
await using query = await client.query({
343343
prompt: "Find and fix the failing test",
344-
allowedTools: ["Read", "Edit", "Bash"],
344+
allowedTools: ["Read", "Edit", "ExecCommand"],
345345
});
346346
for await (const message of query) {
347347
// Message / Event / Result

docs/development/ui-testids-CN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@
209209
| Chat shell 命令文本 | `chat-shell-command-text` | Shell 命令文本节点。 |
210210
| Chat shell 命令输出 | `chat-shell-command-output` | Shell 命令 stdout/stderr 或实时输出区域。 |
211211
| Chat shell 命令退出码 | `chat-shell-command-exit-code` | 退出码节点。包含 `data-exit-code``data-status`|
212-
| Chat shell 工具卡片 | `chat-shell-tool-card` | Bash 的外层 FlowToolCard wrapper。包含 `data-tool-name``data-tool-card-id`|
213-
| Chat shell 工具打开面板按钮 | `chat-shell-tool-open-panel` | 存在 terminal session 时,从 Bash ToolCard 打开关联终端面板|
212+
| Chat shell 工具卡片 | `chat-shell-tool-card` | ExecCommand 的外层 FlowToolCard wrapper。包含 `data-tool-name``data-tool-card-id`|
213+
| Chat shell 工具打开面板按钮 | `chat-shell-tool-open-panel` | 存在 terminal session 时,从 ExecCommand 卡片打开关联终端面板|
214214
| Chat browser 工具卡片 | `chat-browser-tool-card` | WebFetch 的外层 FlowToolCard wrapper。包含 `data-tool-name``data-tool-card-id`|
215215
| Chat 文件变更卡片 | `chat-file-change-card` | 文件操作卡片根节点。包含 `data-status``data-action``data-path``data-expanded`|
216216
| Chat 文件变更展开按钮 | `chat-file-change-toggle` | 文件操作卡片的展开/收起点击目标。 |
@@ -299,7 +299,7 @@
299299

300300
说明:
301301

302-
- 独立 xterm 终端没有结构化的逐命令历史 DOM。测试应使用 `shell-command-output` 断言终端渲染输出,使用 `chat-shell-command-*` 断言结构化 Bash ToolCard
302+
- 独立 xterm 终端没有结构化的逐命令历史 DOM。测试应使用 `shell-command-output` 断言终端渲染输出,使用 `chat-shell-command-*` 断言结构化 ExecCommand 卡片
303303
- `shell-command-copy` 当前未暴露,因为活动终端复制能力基于选择/右键上下文菜单,并不是稳定可见按钮。
304304

305305
## Browser Panel

docs/development/ui-testids.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Avoid adding IDs to these surfaces unless there is a clear automated workflow.
208208
| Chat shell command text | `chat-shell-command-text` | Shell command text node. |
209209
| Chat shell command output | `chat-shell-command-output` | Shell command stdout/stderr or live output area. |
210210
| Chat shell command exit code | `chat-shell-command-exit-code` | Exit code node. Includes `data-exit-code` and `data-status`. |
211-
| Chat shell tool card | `chat-shell-tool-card` | Outer FlowToolCard wrapper for Bash. Includes `data-tool-name` and `data-tool-card-id`. |
211+
| Chat shell tool card | `chat-shell-tool-card` | Outer FlowToolCard wrapper for ExecCommand. Includes `data-tool-name` and `data-tool-card-id`. |
212212
| Chat shell tool open panel | `chat-shell-tool-open-panel` | Opens the associated terminal panel when a terminal session is available. |
213213
| Chat browser tool card | `chat-browser-tool-card` | Outer FlowToolCard wrapper for WebFetch. Includes `data-tool-name` and `data-tool-card-id`. |
214214
| Chat file change card | `chat-file-change-card` | File operation card root. Includes `data-status`, `data-action`, `data-path`, and `data-expanded`. |
@@ -299,7 +299,7 @@ Avoid adding IDs to these surfaces unless there is a clear automated workflow.
299299

300300
Notes:
301301

302-
- The standalone xterm terminal does not expose a structured per-command history DOM. Tests should use `shell-command-output` for rendered terminal output and `chat-shell-command-*` for structured Bash ToolCard assertions.
302+
- The standalone xterm terminal does not expose a structured per-command history DOM. Tests should use `shell-command-output` for rendered terminal output and `chat-shell-command-*` for structured ExecCommand card assertions.
303303
- `shell-command-copy` is not currently exposed because the active terminal copy action is context-menu/selection driven rather than a stable visible button.
304304

305305
## Browser Panel

docs/features/session-runtime-usage-report-design.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ Models
107107
gpt-5.4: 8 req, 183,420 input, 21,908 output
108108
109109
Tools
110-
Bash: 14 calls, 2m 31s, 2 errors
111-
Git: 5 calls, 42s
110+
ExecCommand: 19 calls, 3m 13s, 2 errors
112111
Write/Edit: 7 calls, 1m 08s
113112
```
114113

@@ -151,9 +150,9 @@ Current implemented Markdown shape:
151150
| gpt-5.4 | 8 | 183,420 | 21,908 | 205,328 |
152151

153152
### Slowest Work
154-
1. Bash `pnpm run build:web` - 1m 42s
153+
1. ExecCommand `pnpm run build:web` - 1m 42s
155154
2. Context compression - 28s
156-
3. Git `fetch origin main` - 19s
155+
3. ExecCommand `git fetch origin main` - 19s
157156
```
158157

159158
The detailed visual report exists alongside the Markdown snapshot. It uses the structured DTO when present and falls back to the Markdown snapshot for historical/local-only reports.
@@ -316,7 +315,7 @@ Required change:
316315

317316
Missing:
318317

319-
- Git can happen through the dedicated Git tool or through Bash/terminal commands.
318+
- Git now runs through ExecCommand; persisted legacy sessions may still contain dedicated Git or Bash calls.
320319

321320
Required change:
322321

@@ -1384,8 +1383,8 @@ Steps:
13841383
1. Persist or emit queue wait, preflight, confirmation wait, execution, and total duration for completed tools.
13851384
2. Include best-effort total duration for failed and cancelled tools.
13861385
3. Add a report-only classifier for tool categories.
1387-
4. Classify dedicated Git tool calls as `git`.
1388-
5. Classify terminal calls as `git` only when the normalized command clearly invokes Git.
1386+
4. Classify legacy dedicated Git tool calls as `git`.
1387+
5. Classify ExecCommand and legacy terminal calls as `git` only when the normalized command clearly invokes Git.
13891388
6. Classify file operations by tool name and snapshot operation metadata.
13901389
7. When SubagentScheduler or budget governance events exist, consume their queued/running/retry/backoff summaries as runtime facts instead of inferring them from tool names.
13911390

@@ -1407,8 +1406,8 @@ Risks and mitigations:
14071406

14081407
Verification:
14091408

1410-
- Unit tests for Git tool classification.
1411-
- Unit tests for Bash Git command classification and false positives.
1409+
- Unit tests for legacy Git tool classification.
1410+
- Unit tests for ExecCommand Git command classification and false positives.
14121411
- Existing tool lifecycle tests still pass.
14131412

14141413
### Task 10: File-change report integration

0 commit comments

Comments
 (0)