dsh-baton-mcp 0.6.13 → 0.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,15 +18,17 @@
18
18
 
19
19
  <p align="center"><a href="#quick-start"><b>Quick start</b></a> &nbsp;·&nbsp; <a href="#see-it-run"><b>See it run</b></a> &nbsp;·&nbsp; <a href="#how-it-compares"><b>How it compares</b></a> &nbsp;·&nbsp; <a href="#token-usage"><b>Token usage</b></a> &nbsp;·&nbsp; <a href="#how-it-works"><b>How it works</b></a> &nbsp;·&nbsp; <a href="#tools"><b>Tools</b></a> &nbsp;·&nbsp; <a href="#security-and-limits"><b>Security</b></a></p>
20
20
 
21
+ <p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/en/clients-dark.svg"><img src="./assets/readme/en/clients.svg" width="100%" alt="Works with Claude Code, Codex and Antigravity. In Harness their messages are labelled Sent by Claude, Sent by ChatGPT and Sent by Antigravity from another chat."></picture></p>
22
+
21
23
  <br>
22
24
 
23
- Hand coding tasks from Claude Code or Codex to DeepSeek Harness on your machine: the task runs live in the Harness window, the main agent hears back once when it ends, and it gets back the files that changed, the project's own test results and a requirement-by-requirement checklist.
25
+ Hand coding tasks from Claude Code, Codex or Antigravity to DeepSeek Harness on your machine: the task runs live in the Harness window, the main agent hears back once when it ends, and it gets back the files that changed, the project's own test results and a requirement-by-requirement checklist.
24
26
 
25
- - **Watch it and step in:** the task runs live in the Harness window and you can type into it at any time. Every message is labelled "Sent by ChatGPT / Claude from another chat". When Harness stops to ask a question, the main agent answers it if you told it to decide, or brings it to you with its own recommendation.
27
+ - **Watch it and step in:** the task runs live in the Harness window and you can type into it at any time. Every message is labelled "Sent by Claude / ChatGPT / Antigravity from another chat". When Harness stops to ask a question, the main agent answers it if you told it to decide, or brings it to you with its own recommendation.
26
28
  - **Less of the 5-hour window:** a long Codex job takes 16% of a ChatGPT Plus 5-hour window instead of 86% (GPT-6 Astra, the kanban task). The rest of the numbers are under [Token usage](#token-usage).
27
29
  - **Nothing to watch or poll:** the main agent waits without polling and gets the result when the run ends. With several runs going at once, each one comes back within a second of finishing.
28
30
 
29
- Needs DeepSeek Harness ≥ 0.2.1-rc.2 (signed in) and Claude Code or Codex. [Quick start →](#quick-start)
31
+ Needs DeepSeek Harness ≥ 0.2.1-rc.2 (signed in) and Claude Code, Codex or Antigravity. [Quick start →](#quick-start)
30
32
 
31
33
  ## What it is
32
34
 
@@ -62,16 +64,16 @@ Beyond the savings, the split itself helps:
62
64
  **Install in one step, check in two.**
63
65
 
64
66
  <p align="center">
65
- <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/en/install-dark.svg"><img src="./assets/readme/en/install.svg" width="100%" alt="Install: in Harness open Plugins, Add plugin, enter dsh-baton-host, Install, Enable now; it registers dsh-baton for Claude Code and Codex. Then check that it works: open a new conversation in Claude Code or Codex (Codex asks once to approve the dsh-baton tools), and ask it to call dsh_list_workspaces; it lists your Harness workspaces."></picture>
67
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/en/install-dark.svg"><img src="./assets/readme/en/install.svg" width="100%" alt="Install: in Harness open Plugins, Add plugin, enter dsh-baton-host, Install, Enable now; it registers dsh-baton for Claude Code, Codex and Antigravity. Then check that it works: open a new conversation in Claude Code, Codex or Antigravity (restart Antigravity once; Codex asks once to approve the dsh-baton tools), and ask it to call dsh_list_workspaces; it lists your Harness workspaces."></picture>
66
68
  </p>
67
69
 
68
70
  Nothing else to install: no Node.js, no terminal. It is the same on macOS and Windows.
69
71
 
70
- **Install:** in Harness, **Plugins** (插件) → **Add plugin** (添加插件) → type `dsh-baton-host` → **Install** (安装) → **Enable now** (立即启用). Switched on, the plugin registers dsh-baton for Claude Code and Codex, for every folder, and Harness says so.
72
+ **Install:** in Harness, **Plugins** (插件) → **Add plugin** (添加插件) → type `dsh-baton-host` → **Install** (安装) → **Enable now** (立即启用). Switched on, the plugin registers dsh-baton for Claude Code, Codex and Antigravity, for every folder, and Harness says so.
71
73
 
72
74
  **Check that it works:**
73
75
 
74
- ① **Open a new chat:** in Claude Code or Codex, start a **new** conversation; one that was already open does not see dsh-baton yet. It is the same in both. Codex asks you to approve MCP tool calls: approve the `dsh-baton` tools (for unattended `codex exec` runs, add `--approve-for-me`).
76
+ ① **Open a new chat:** in Claude Code or Codex, start a **new** conversation; one that was already open does not see dsh-baton yet. It is the same in both. Antigravity starts its MCP servers only when it starts: restart it once after the plugin is switched on. Codex asks you to approve MCP tool calls: approve the `dsh-baton` tools (for unattended `codex exec` runs, add `--approve-for-me`).
75
77
 
76
78
  ② **Ask for the workspaces:** ask it to call `dsh_list_workspaces`. It lists your Harness workspaces.
77
79
 
@@ -219,7 +221,7 @@ You don't have to take DeepSeek's word for it. Before the run, dsh-baton notes w
219
221
  ## Tools
220
222
 
221
223
  <p align="center">
222
- <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/en/tools-dark.svg"><img src="./assets/readme/en/tools.svg" width="100%" alt="Ten tools in the tool list: list workspaces, list sessions, read session, list models, send, status, wait, answer, cancel, call. Six less used tools are reached through dsh_call: create and rename workspace, session activity, rename session, update queued, list runs"></picture>
224
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/en/tools-dark.svg"><img src="./assets/readme/en/tools.svg" width="100%" alt="Ten tools in the tool list: list workspaces, list sessions, read session, list models, send, status, wait, answer, cancel, call. Six less used tools, listed in Claude Code and Antigravity, reached through dsh_call in Codex: create and rename workspace, session activity, rename session, update queued, list runs"></picture>
223
225
  </p>
224
226
 
225
227
  <p align="center">
@@ -236,7 +238,7 @@ The server's MCP instructions are a single sentence; how to hand over, wait and
236
238
  | Tool | What it does |
237
239
  |---|---|
238
240
  | `dsh_list_workspaces` | Workspaces in the Harness sidebar |
239
- | `dsh_create_workspace` | Through `dsh_call`. Register a folder as a workspace (creates the folder if missing); returns the existing one if already registered |
241
+ | `dsh_create_workspace` | Codex: through `dsh_call`. Register a folder as a workspace (creates the folder if missing); returns the existing one if already registered |
240
242
  | `dsh_list_sessions` | Sessions newest first, with title, folder, running state and `model` (what its next request uses); filter by folder or text. Archived sessions are left out |
241
243
  | `dsh_list_models` | The models Harness can run (provider, id, name, reasoning efforts) and its default model |
242
244
  | `dsh_read_session` | Recent prompts and replies of one session (with tool names); `archived: true` for an archived session |
@@ -244,12 +246,12 @@ The server's MCP instructions are a single sentence; how to hand over, wait and
244
246
  | `dsh_status` | Run progress: state, recent text and tool calls, final reply; `waiting_on` when the turn is over but sub-agents or jobs still run; `human_interjections` when someone typed in the Harness UI mid-run; state `interrupted` for a run cut short by a Harness restart; `model` the run was sent with. With `session_id` instead of `run_id`: what the session is doing, its Harness goal and its last turn's reply |
245
247
  | `dsh_wait` | Wait for the run to end; a finished run carries `evidence` (files changed, check results) when the message was sent with `checks` (or until it stops to ask a person, see `dsh_answer`): up to 3540 s per call for Codex (its tool timeout for dsh-baton less 60 s; 270 s when that is not set), 50 s for other clients. Still going: returns `timed_out` with just the state; call it again. Clients that can wait in the background use `dsh_send`'s `wait_command` instead. `dsh_status` is a one-off look, not a way to wait. A run in a session with a Harness goal is waited for until the goal stops (`until` `turn` and `every_minutes` for progress reports). With `session_id` instead of `run_id` it follows the session's Harness goal without sending anything (`until`, `cursor`, `every_minutes`; see How each client waits). With `run_ids` it waits for several runs and returns as soon as any ends or asks (`ended`, `still_running`) |
246
248
  | `dsh_answer` | Answer the questions a run stopped to ask (Harness's ask_user_question): per question, an option number or label, free text, or skip; on a single choice, free text replaces the option. `dsh_wait` and `wait_command` return as soon as a run asks, with the questions (`needs_input`, `question`; the option Harness's model would pick is in `harness_suggested`) and a layout for passing them on (`relay`, `question_tool`). When you let the main agent decide, it takes an option only if it fits as written, and otherwise answers in its own words; before it picks an option for you, the first call is held back and it writes the answer you would want without the options, sending the option only if the two agree. Otherwise it brings you the questions with its recommendation first, which may be an answer outside the options; pick that and only the answer itself is sent. You can also answer in the Harness window: whoever answers first wins |
247
- | `dsh_session_activity` | Through `dsh_call`. What a session is doing now: running turn, sub-agents (any depth), background jobs; `archived: true` for an archived session |
248
- | `dsh_update_queued` | Through `dsh_call`. Change a message still waiting in the queue of a busy session, by its `run_id`: `edit` its text, `remove` it, or `steer` it into the running turn now. Once it has reached the conversation it can no longer be changed |
249
+ | `dsh_session_activity` | Codex: through `dsh_call`. What a session is doing now: running turn, sub-agents (any depth), background jobs; `archived: true` for an archived session |
250
+ | `dsh_update_queued` | Codex: through `dsh_call`. Change a message still waiting in the queue of a busy session, by its `run_id`: `edit` its text, `remove` it, or `steer` it into the running turn now. Once it has reached the conversation it can no longer be changed |
249
251
  | `dsh_cancel` | Stop everything a session is doing, by `run_id` or `session_id`: turn, sub-agents, jobs. Harness also drops the messages waiting in its queue; their runs end as `cancelled` |
250
- | `dsh_rename_session` | Through `dsh_call`. Rename a session |
251
- | `dsh_rename_workspace` | Through `dsh_call`. Rename a workspace (sidebar title only; the folder is not moved) |
252
- | `dsh_list_runs` | Through `dsh_call`. Recent runs, optionally of one session |
252
+ | `dsh_rename_session` | Codex: through `dsh_call`. Rename a session |
253
+ | `dsh_rename_workspace` | Codex: through `dsh_call`. Rename a workspace (sidebar title only; the folder is not moved) |
254
+ | `dsh_list_runs` | Codex: through `dsh_call`. Recent runs, optionally of one session |
253
255
  | `dsh_call` | Calls any `dsh_*` tool by name: the less used tools (create and rename workspace, rename session, session activity, update queued, list runs) are not in the tool list, to keep every request short, and are reached this way; also for a conversation whose tool list predates an update. An unknown name lists the tools |
254
256
 
255
257
  </details>
@@ -325,7 +327,7 @@ Version history is on [GitHub Releases](https://github.com/JialaoLiu/dsh-baton/r
325
327
 
326
328
  **Codex's cwd for dsh-baton.** Codex starts an MCP server in the conversation's folder unless its table sets `cwd`; when that folder is gone (a project on an external drive that is not connected) the server cannot start and the conversation has no `dsh_*` tools. The plugin writes `cwd` (your home folder) into `[mcp_servers.dsh-baton]` and adds it to an existing table that has none; a `cwd` you set yourself is kept.
327
329
 
328
- **Updates need no restart.** When a newer version lands in `~/.dsh-baton/app` (a plugin update, `setup`, or a copy by hand), or the same version with changed files, conversations already open in Claude Code and Codex use it from their next `dsh_*` call: the server checks the folder before each call, starts the new version, and says once in that call's result that it was updated. A `dsh_wait` that is already running finishes on the old version first. If the new version cannot start, the old one keeps working and the result says why. A tool added in the new version shows up in Claude Code at once (the server tells the client its tool list changed); Codex keeps the tool list a conversation started with, so it does not show a new tool until the next conversation; it can still use one at once through `dsh_call`, which the update note points to, and the tools it already has run the new code right away.
330
+ **Updates need no restart.** When a newer version lands in `~/.dsh-baton/app` (a plugin update, `setup`, or a copy by hand), or the same version with changed files, conversations already open in Claude Code, Codex and Antigravity use it from their next `dsh_*` call: the server checks the folder before each call, starts the new version, and says once in that call's result that it was updated. A `dsh_wait` that is already running finishes on the old version first. If the new version cannot start, the old one keeps working and the result says why. A tool added in the new version shows up in Claude Code at once (the server tells the client its tool list changed); Codex keeps the tool list a conversation started with, so it does not show a new tool until the next conversation; it can still use one at once through `dsh_call`, which the update note points to, and the tools it already has run the new code right away.
329
331
 
330
332
  **`npx -y dsh-baton-mcp setup`** does the same registration from a terminal: for a plugin that could not register, or when you come from an MCP directory. With the plugin already registered it changes nothing, then points you to the plugin if it is missing.
331
333
 
package/README.zh-CN.md CHANGED
@@ -18,15 +18,17 @@
18
18
 
19
19
  <p align="center"><a href="#快速上手"><b>快速上手</b></a> &nbsp;·&nbsp; <a href="#看它跑"><b>看它跑</b></a> &nbsp;·&nbsp; <a href="#和其他做法的区别"><b>和其他做法的区别</b></a> &nbsp;·&nbsp; <a href="#token-用量实测"><b>Token 用量</b></a> &nbsp;·&nbsp; <a href="#工作原理"><b>工作原理</b></a> &nbsp;·&nbsp; <a href="#工具"><b>工具</b></a> &nbsp;·&nbsp; <a href="#安全与限制"><b>安全</b></a></p>
20
20
 
21
+ <p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/zh/clients-dark.svg"><img src="./assets/readme/zh/clients.svg" width="100%" alt="已支持 Claude Code、Codex 和 Antigravity。它们发到 Harness 的消息分别标着由 Claude、由 ChatGPT、由 Antigravity 从另一个聊天发送。"></picture></p>
22
+
21
23
  <br>
22
24
 
23
- 把 Claude Code 或 Codex 的编码任务交给本机的 DeepSeek Harness:任务在 Harness 界面里实时跑,跑完主 Agent 收到一次结果,带回改了哪些文件、项目自己的测试结果,以及逐条需求对照表。
25
+ 把 Claude Code、Codex 或 Antigravity 的编码任务交给本机的 DeepSeek Harness:任务在 Harness 界面里实时跑,跑完主 Agent 收到一次结果,带回改了哪些文件、项目自己的测试结果,以及逐条需求对照表。
24
26
 
25
- - **看得见、能插话**:任务在 Harness 界面里实时跑,你随时能插话;每条消息都标着“由 ChatGPT / Claude 从另一个聊天发送”。Harness 中途提问时,你让主 Agent 自己决定的,它直接回答;否则它带着自己的建议把问题转给你。
27
+ - **看得见、能插话**:任务在 Harness 界面里实时跑,你随时能插话;每条消息都标着“由 Claude / ChatGPT / Antigravity 从另一个聊天发送”。Harness 中途提问时,你让主 Agent 自己决定的,它直接回答;否则它带着自己的建议把问题转给你。
26
28
  - **省额度**:Codex 长任务占 ChatGPT Plus 5 小时额度,从 86% 降到 16%(GPT-6 Astra,看板案例)。其他数字在 [Token 用量实测](#token-用量实测)。
27
29
  - **不用盯**:主 Agent 等着结果、不轮询,做完就交回;几个任务同时跑时,每个做完 1 秒内就拿到。
28
30
 
29
- 需要 DeepSeek Harness ≥ 0.2.1-rc.2(已登录)和 Claude Code 或 Codex。[快速上手 →](#快速上手)
31
+ 需要 DeepSeek Harness ≥ 0.2.1-rc.2(已登录),以及 Claude Code、Codex 或 Antigravity。[快速上手 →](#快速上手)
30
32
 
31
33
  ## 这是什么
32
34
 
@@ -62,16 +64,16 @@ dsh-baton 是一个 MCP 服务器加一个 Harness 小插件。主 Agent 用一
62
64
  **一步装好,两步验证。**
63
65
 
64
66
  <p align="center">
65
- <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/zh/install-dark.svg"><img src="./assets/readme/zh/install.svg" width="100%" alt="安装:Harness → 插件 → 添加插件 → 输入 dsh-baton-host → 安装 → 立即启用,它会为 Claude Code 和 Codex 注册 dsh-baton。然后验证能用:在 Claude Code 或 Codex 里新开一个对话(Codex 第一次会请你批准 dsh-baton 的工具),让它调用 dsh_list_workspaces,会列出你的 Harness 工作区。"></picture>
67
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/zh/install-dark.svg"><img src="./assets/readme/zh/install.svg" width="100%" alt="安装:Harness → 插件 → 添加插件 → 输入 dsh-baton-host → 安装 → 立即启用,它会为 Claude Code、Codex 和 Antigravity 注册 dsh-baton。然后验证能用:在 Claude Code、Codex 或 Antigravity 里新开一个对话(Antigravity 先重启一次;Codex 第一次会请你批准 dsh-baton 的工具),让它调用 dsh_list_workspaces,会列出你的 Harness 工作区。"></picture>
66
68
  </p>
67
69
 
68
70
  别的都不用装:不用 Node.js,也不用开终端。macOS 和 Windows 完全一样。
69
71
 
70
- **安装**:在 Harness 里 **插件** → **添加插件** → 输入 `dsh-baton-host` → **安装** → **立即启用**。插件启用后会为 Claude Code 和 Codex 注册 dsh-baton(对所有文件夹生效),Harness 里会弹出提示。
72
+ **安装**:在 Harness 里 **插件** → **添加插件** → 输入 `dsh-baton-host` → **安装** → **立即启用**。插件启用后会为 Claude Code、Codex 和 Antigravity 注册 dsh-baton(对所有文件夹生效),Harness 里会弹出提示。
71
73
 
72
74
  **验证**:
73
75
 
74
- ① **新开对话**:在 Claude Code 或 Codex 里**新开**一个对话,之前开着的对话还看不到 dsh-baton。两边一样。Codex 调用 MCP 工具时会请你批准,批准 `dsh-baton` 的工具即可(无人值守的 `codex exec` 加上 `--approve-for-me`)。
76
+ ① **新开对话**:在 Claude Code 或 Codex 里**新开**一个对话,之前开着的对话还看不到 dsh-baton。两边一样。Antigravity 只在启动时加载 MCP,插件启用后要重启它一次。Codex 调用 MCP 工具时会请你批准,批准 `dsh-baton` 的工具即可(无人值守的 `codex exec` 加上 `--approve-for-me`)。
75
77
 
76
78
  ② **检查**:让它调用 `dsh_list_workspaces`,会列出你的 Harness 工作区。
77
79
 
@@ -219,7 +221,7 @@ Codex 占 ChatGPT Plus 5 小时额度的比例,以及主 Agent 自己的花费
219
221
  ## 工具
220
222
 
221
223
  <p align="center">
222
- <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/zh/tools-dark.svg"><img src="./assets/readme/zh/tools.svg" width="100%" alt="工具列表里有 10 个:列出工作区、列出对话、读取对话、列出模型、发送、状态、等待、回答、取消、dsh_call。另外 6 个不常用的经 dsh_call 调用:新建和改名工作区、对话动态、给对话改名、修改排队消息、列出运行"></picture>
224
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./assets/readme/zh/tools-dark.svg"><img src="./assets/readme/zh/tools.svg" width="100%" alt="工具列表里有 10 个:列出工作区、列出对话、读取对话、列出模型、发送、状态、等待、回答、取消、dsh_call。另外 6 个不常用的,Claude Code 和 Antigravity 直接列出,Codex 里经 dsh_call 调用:新建和改名工作区、对话动态、给对话改名、修改排队消息、列出运行"></picture>
223
225
  </p>
224
226
 
225
227
  <p align="center">
@@ -236,7 +238,7 @@ Codex 占 ChatGPT Plus 5 小时额度的比例,以及主 Agent 自己的花费
236
238
  | 工具 | 作用 |
237
239
  |---|---|
238
240
  | `dsh_list_workspaces` | 列出 Harness 侧边栏里的工作区 |
239
- | `dsh_create_workspace` | 经 `dsh_call` 调用。把一个文件夹登记为工作区(文件夹不存在会先创建);已登记的直接返回原来那个 |
241
+ | `dsh_create_workspace` | Codex 里经 `dsh_call` 调用。把一个文件夹登记为工作区(文件夹不存在会先创建);已登记的直接返回原来那个 |
240
242
  | `dsh_list_sessions` | 列出对话(最新在前),带标题、目录、是否在跑和 `model`(下一次请求用的模型);可按目录或关键字过滤。已归档的对话不会列出 |
241
243
  | `dsh_list_models` | 列出 Harness 能用的模型(provider、id、名称、推理强度)和它的默认模型 |
242
244
  | `dsh_read_session` | 读某个对话最近的消息和回复(含用到的工具名);已归档的对话会带 `archived: true` |
@@ -244,12 +246,12 @@ Codex 占 ChatGPT Plus 5 小时额度的比例,以及主 Agent 自己的花费
244
246
  | `dsh_status` | 查看运行进度:状态、最近的文字和工具调用、最终回复;回合结束但子智能体/后台任务还在跑时给出 `waiting_on`;中途有人在 Harness 界面里发消息时给出 `human_interjections`;被 Harness 重启打断的任务状态为 `interrupted`;以及这次运行发送时用的 `model`。用 `session_id` 代替 `run_id` 时:会话正在做什么、它的 Harness 目标,以及上一回合的回复 |
245
247
  | `dsh_wait` | 等运行结束;发消息时带了 `checks` 的,结束后会附上 `evidence`(改了哪些文件、测试结果)(或者等到它停下来问人,见 `dsh_answer`):Codex 每次最多等 3540 秒(它对 dsh-baton 的工具超时减 60 秒;没设时 270 秒),其他客户端 50 秒。没做完会带 `timed_out`,只返回状态,再调用一次即可。能在后台等待的客户端改用 `dsh_send` 返回的 `wait_command`。`dsh_status` 只用来看一眼,不用来等待。发到带 Harness 目标的会话的任务会一直等到目标停下(要汇报进度时用 `until` 为 `turn` 和 `every_minutes`)。用 `session_id` 代替 `run_id` 时,不发任何消息,跟进这个会话的 Harness 目标(`until`、`cursor`、`every_minutes`;见“各客户端怎么等待”)。用 `run_ids` 时同时等多个任务,任何一个做完或提问就返回(`ended`、`still_running`) |
246
248
  | `dsh_answer` | 回答运行中途提出的问题(Harness 的 ask_user_question):每道题可以填选项编号或选项文字、自由填写,或者跳过;单选题填了文字就以文字为准。运行一提问,`dsh_wait` 和 `wait_command` 就立刻返回,带上题目(`needs_input`、`question`;Harness 模型推荐的选项在 `harness_suggested`)和转给你时用的排版(`relay`、`question_tool`)。你让主 Agent 自己决定时,选项照原文正好合适它才选,否则用自己的话回答;要替你选某个选项时,第一次调用不会发出,它得先不看选项写出你想要的答案,两者一致才发。没让它决定时,它把题目转给你,开头先写它的建议,建议可以不在选项里;你选了这条建议,就只发这条答案。你也可以直接在 Harness 窗口里回答,谁先答就算谁的 |
247
- | `dsh_session_activity` | 经 `dsh_call` 调用。对话此刻在做什么:正在跑的回合、子智能体(任意层级)、后台任务;已归档的对话会带 `archived: true` |
248
- | `dsh_update_queued` | 经 `dsh_call` 调用。按 `run_id` 修改还在忙碌对话队列里等待的消息:`edit` 改文字,`remove` 撤回,`steer` 立刻插进正在跑的回合。消息一旦进入对话就改不了了 |
249
+ | `dsh_session_activity` | Codex 里经 `dsh_call` 调用。对话此刻在做什么:正在跑的回合、子智能体(任意层级)、后台任务;已归档的对话会带 `archived: true` |
250
+ | `dsh_update_queued` | Codex 里经 `dsh_call` 调用。按 `run_id` 修改还在忙碌对话队列里等待的消息:`edit` 改文字,`remove` 撤回,`steer` 立刻插进正在跑的回合。消息一旦进入对话就改不了了 |
249
251
  | `dsh_cancel` | 按 `run_id` 或 `session_id` 停掉整个对话的工作:当前回合、子智能体、后台任务。Harness 会同时清掉队列里等待的消息,这些运行记为 `cancelled` |
250
- | `dsh_rename_session` | 经 `dsh_call` 调用。给对话改名 |
251
- | `dsh_rename_workspace` | 经 `dsh_call` 调用。给工作区改名(只改侧边栏标题,不动文件夹) |
252
- | `dsh_list_runs` | 经 `dsh_call` 调用。列出最近的运行,可按会话筛选 |
252
+ | `dsh_rename_session` | Codex 里经 `dsh_call` 调用。给对话改名 |
253
+ | `dsh_rename_workspace` | Codex 里经 `dsh_call` 调用。给工作区改名(只改侧边栏标题,不动文件夹) |
254
+ | `dsh_list_runs` | Codex 里经 `dsh_call` 调用。列出最近的运行,可按会话筛选 |
253
255
  | `dsh_call` | 按名字调用任意 `dsh_*` 工具:不常用的工具(新建和重命名工作区、重命名对话、对话动态、修改排队消息、运行列表)不再出现在工具列表里,好让每次请求更短,改由这里调用;对话的工具列表还是更新前的旧版时也用它。名字不存在时会列出所有可用工具 |
254
256
 
255
257
  </details>
@@ -325,7 +327,7 @@ Harness 插件连不上时:
325
327
 
326
328
  **Codex 里 dsh-baton 的 cwd**。除非那张表里设了 `cwd`,Codex 会在对话所在的文件夹里启动 MCP 服务器;那个文件夹不在了(比如项目在没接上的移动硬盘上),服务器就启动不了,这个对话里也就没有 `dsh_*` 工具。插件会在 `[mcp_servers.dsh-baton]` 里写入 `cwd`(你的主文件夹),已有的表没有这一项时也会补上;你自己设过的 `cwd` 会保留。
327
329
 
328
- **更新不用重启**。新版本装进 `~/.dsh-baton/app` 后(插件更新、`setup` 或手动复制),或者同一版本但文件有改动时,Claude Code 和 Codex 里已经开着的对话,下一次调用 `dsh_*` 工具时就会用上:服务器每次调用前检查这个文件夹,启动新版本,并在这次调用的结果里提示一次已经更新。正在进行的 `dsh_wait` 会先在旧版本里跑完。新版本启动失败时,旧版本继续工作,结果里会说明原因。新版本新增的工具,Claude Code 里马上就能用(服务器会通知客户端工具列表变了);Codex 一直用对话开始时的工具列表,新工具要到下一个新对话才会显示;不过旧对话里也能通过 `dsh_call` 马上用上新功能(更新提示里会写明),已有的工具也会立刻用上新代码。
330
+ **更新不用重启**。新版本装进 `~/.dsh-baton/app` 后(插件更新、`setup` 或手动复制),或者同一版本但文件有改动时,Claude Code、Codex 和 Antigravity 里已经开着的对话,下一次调用 `dsh_*` 工具时就会用上:服务器每次调用前检查这个文件夹,启动新版本,并在这次调用的结果里提示一次已经更新。正在进行的 `dsh_wait` 会先在旧版本里跑完。新版本启动失败时,旧版本继续工作,结果里会说明原因。新版本新增的工具,Claude Code 里马上就能用(服务器会通知客户端工具列表变了);Codex 一直用对话开始时的工具列表,新工具要到下一个新对话才会显示;不过旧对话里也能通过 `dsh_call` 马上用上新功能(更新提示里会写明),已有的工具也会立刻用上新代码。
329
331
 
330
332
  **`npx -y dsh-baton-mcp setup`** 在终端里做同样的注册:用于插件没能注册的情况,或者从 MCP 目录过来的用户。插件已经注册过时它什么都不改;插件没装的话,它会提示去添加。
331
333
 
package/host/README.md CHANGED
@@ -6,10 +6,10 @@ Hand coding tasks from Claude Code or Codex to DeepSeek Harness: they run live i
6
6
 
7
7
  ## Install / 安装
8
8
 
9
- **Install / 安装**: Plugins / 插件 → Add plugin / 添加插件 → `dsh-baton-host` → Install / 安装 → Enable now / 立即启用. That registers dsh-baton for Claude Code and Codex. / 启用后会为 Claude Code 和 Codex 注册 dsh-baton。
9
+ **Install / 安装**: Plugins / 插件 → Add plugin / 添加插件 → `dsh-baton-host` → Install / 安装 → Enable now / 立即启用. That registers dsh-baton for Claude Code, Codex and Antigravity. / 启用后会为 Claude Code、Codex 和 Antigravity 注册 dsh-baton。
10
10
 
11
11
  **Check / 验证**:
12
- 1. Open a new chat in Claude Code or Codex; Codex asks once to approve the dsh-baton tools. / 在 Claude Code 或 Codex 里新开对话,Codex 第一次会请你批准 dsh-baton 的工具。
12
+ 1. Open a new chat in Claude Code or Codex (restart Antigravity once); Codex asks once to approve the dsh-baton tools. / 在 Claude Code 或 Codex 里新开对话(Antigravity 要重启一次),Codex 第一次会请你批准 dsh-baton 的工具。
13
13
  2. Ask it to call `dsh_list_workspaces`; it lists your Harness workspaces. / 让它调用 `dsh_list_workspaces`,会列出你的 Harness 工作区。
14
14
 
15
15
  Not registered? / 没能注册?Run `npx -y dsh-baton-mcp setup`.
@@ -1,6 +1,6 @@
1
1
  // dsh-baton-host, browser half. Two jobs:
2
2
  // - On the Plugins page: right after the plugin is switched on, and on its detail page,
3
- // say whether the host half registered the MCP server for Claude Code and Codex
3
+ // say whether the host half registered the MCP server for Claude Code, Codex and Antigravity
4
4
  // (it serves the outcome at /dsh-baton/status).
5
5
  // - In the chat: label messages sent through dsh-baton with their sender ("Sent by
6
6
  // Claude from another chat"). The host half puts the sender
@@ -30,7 +30,7 @@ window.__ModuleLoader__.load({
30
30
  // dsh-bridge: messages sent before the project was renamed.
31
31
  const RPC_RE = /^dsh-(?:baton|bridge)\.([a-z0-9-]{1,32})\./
32
32
  // Codex shows as ChatGPT, the way the ChatGPT app labels its own cross-chat messages.
33
- const NAMES = { claude: 'Claude', codex: 'ChatGPT' }
33
+ const NAMES = { claude: 'Claude', codex: 'ChatGPT', antigravity: 'Antigravity' }
34
34
 
35
35
  const PACKAGE = 'dsh-baton-host'
36
36
  const SETUP = 'npx -y dsh-baton-mcp setup'
@@ -39,11 +39,13 @@ window.__ModuleLoader__.load({
39
39
  sentFrom: '由 {name} 从另一个聊天发送',
40
40
  readyTitle: 'dsh-baton 已就绪',
41
41
  failTitle: 'dsh-baton 还差一步',
42
- pending: '正在为 Claude Code 和 Codex 注册 dsh-baton…',
43
- ready: '已为 {clients} 注册 dsh-baton。在 Claude Code 或 Codex 里新开一个对话,就能用 dsh_* 工具。',
42
+ pending: '正在为 Claude Code、Codex 和 Antigravity 注册 dsh-baton…',
43
+ ready: '已为 {clients} 注册 dsh-baton。在里面新开一个对话,就能用 dsh_* 工具。',
44
+ restartAg: '在 Antigravity 里要先重启一次它。',
44
45
  partial: '{clients} 没能注册:',
46
+ badJson: '{file} 不是有效的 JSON,改好后重启 Harness。',
45
47
  noNode: '没找到 Node.js 22.15 或更新版本。装好 Node.js 后,',
46
- noClients: '没找到 Claude Code 或 Codex。装好之后,',
48
+ noClients: '没找到 Claude Code、Codex 或 Antigravity。装好其中一个之后,',
47
49
  failed: '没能自动注册 MCP。',
48
50
  runSetup: '请在终端运行 {cmd}。',
49
51
  unknown: '如果新对话里没有 dsh_* 工具,请在终端运行 {cmd}。',
@@ -54,16 +56,19 @@ window.__ModuleLoader__.load({
54
56
  notInstalled: '未安装',
55
57
  notRegistered: '未注册',
56
58
  and: '和',
59
+ comma: '、',
57
60
  }
58
61
  const en = {
59
62
  sentFrom: 'Sent by {name} from another chat',
60
63
  readyTitle: 'dsh-baton is ready',
61
64
  failTitle: 'dsh-baton needs one more step',
62
- pending: 'Registering dsh-baton for Claude Code and Codex…',
63
- ready: 'dsh-baton is registered for {clients}. Start a new conversation in Claude Code or Codex to use the dsh_* tools.',
65
+ pending: 'Registering dsh-baton for Claude Code, Codex and Antigravity…',
66
+ ready: 'dsh-baton is registered for {clients}. Start a new conversation there to use the dsh_* tools.',
67
+ restartAg: 'Restart Antigravity first.',
64
68
  partial: 'Could not register for {clients}: ',
69
+ badJson: '{file} is not valid JSON: fix it, then restart Harness.',
65
70
  noNode: 'Node.js 22.15 or later was not found. Once it is installed, ',
66
- noClients: 'Neither Claude Code nor Codex was found. Once one is installed, ',
71
+ noClients: 'None of Claude Code, Codex or Antigravity was found. Once one is installed, ',
67
72
  failed: 'The MCP server could not be registered automatically. ',
68
73
  runSetup: 'run {cmd} in a terminal.',
69
74
  unknown: 'If new conversations have no dsh_* tools, run {cmd} in a terminal.',
@@ -74,6 +79,7 @@ window.__ModuleLoader__.load({
74
79
  notInstalled: 'not installed',
75
80
  notRegistered: 'not registered',
76
81
  and: 'and',
82
+ comma: ', ',
77
83
  }
78
84
 
79
85
  // --- Plugins page ------------------------------------------------------------
@@ -112,10 +118,17 @@ window.__ModuleLoader__.load({
112
118
  const clients = reg.clients ?? []
113
119
  const done = clients.filter((c) => REGISTERED.includes(c.state)).map((c) => c.label)
114
120
  const failed = clients.filter((c) => c.state === 'failed').map((c) => c.label)
115
- const list = (names) => names.join(` ${t('and')} `)
116
- const fix = (reg.error === 'no-node' ? t('noNode') : reg.error === 'no-clients' ? t('noClients') : '') + t('runSetup', { cmd: SETUP })
117
- if (reg.ok) return [t('readyTitle'), t('ready', { clients: list(done) })]
118
- if (done.length) return [t('failTitle'), `${t('ready', { clients: list(done) })} ${t('partial', { clients: list(failed) })}${fix}`]
121
+ const list = (names) => (names.length > 2 ? `${names.slice(0, -1).join(t('comma'))} ${t('and')} ${names.at(-1)}` : names.join(` ${t('and')} `))
122
+ // A config file that does not parse: setup would fail the same way, so the file is named.
123
+ const broken = clients.filter((c) => c.state === 'failed' && c.error === 'bad-json')
124
+ const fix = broken.length
125
+ ? broken.map((c) => t('badJson', { file: c.file })).join(' ')
126
+ : (reg.error === 'no-node' ? t('noNode') : reg.error === 'no-clients' ? t('noClients') : '') + t('runSetup', { cmd: SETUP })
127
+ // Antigravity starts its MCP servers only when it starts: a new entry needs a restart.
128
+ const fresh = clients.some((c) => c.id === 'antigravity' && c.state === 'registered')
129
+ const ready = t('ready', { clients: list(done) }) + (fresh ? ` ${t('restartAg')}` : '')
130
+ if (reg.ok) return [t('readyTitle'), ready]
131
+ if (done.length) return [t('failTitle'), `${ready} ${t('partial', { clients: list(failed) })}${fix}`]
119
132
  return [t('failTitle'), (reg.error === 'no-node' || reg.error === 'no-clients' ? '' : t('failed')) + fix]
120
133
  }
121
134
 
@@ -161,7 +174,9 @@ window.__ModuleLoader__.load({
161
174
  const nameOf = (sender) => NAMES[sender] ?? sender.charAt(0).toUpperCase() + sender.slice(1)
162
175
 
163
176
  // Sender marks, drawn in the label's text colour like ChatGPT's own "sent from another chat" line.
177
+ // Codex's and Antigravity's are the monochrome marks of lobe-icons (MIT).
164
178
  const MARKS = {
179
+ antigravity: { viewBox: '0 0 24 24', d: 'M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z' },
165
180
  claude: { viewBox: '0 0 248 248', d: 'M52.4285 162.873L98.7844 136.879L99.5485 134.602L98.7844 133.334H96.4921L88.7237 132.862L62.2346 132.153L39.3113 131.207L17.0249 130.026L11.4214 128.844L6.2 121.873L6.7094 118.447L11.4214 115.257L18.171 115.847L33.0711 116.911L55.485 118.447L71.6586 119.392L95.728 121.873H99.5485L100.058 120.337L98.7844 119.392L97.7656 118.447L74.5877 102.732L49.4995 86.1905L36.3823 76.62L29.3779 71.7757L25.8121 67.2858L24.2839 57.3608L30.6515 50.2716L39.3113 50.8623L41.4763 51.4531L50.2636 58.1879L68.9842 72.7209L93.4357 90.6804L97.0015 93.6343L98.4374 92.6652L98.6571 91.9801L97.0015 89.2625L83.757 65.2772L69.621 40.8192L63.2534 30.6579L61.5978 24.632C60.9565 22.1032 60.579 20.0111 60.579 17.4246L67.8381 7.49965L71.9133 6.19995L81.7193 7.49965L85.7946 11.0443L91.9074 24.9865L101.714 46.8451L116.996 76.62L121.453 85.4816L123.873 93.6343L124.764 96.1155H126.292V94.6976L127.566 77.9197L129.858 57.3608L132.15 30.8942L132.915 23.4505L136.608 14.4708L143.994 9.62643L149.725 12.344L154.437 19.0788L153.8 23.4505L150.998 41.6463L145.522 70.1215L141.957 89.2625H143.994L146.414 86.7813L156.093 74.0206L172.266 53.698L179.398 45.6635L187.803 36.802L193.152 32.5484H203.34L210.726 43.6549L207.415 55.1159L196.972 68.3492L188.312 79.5739L175.896 96.2095L168.191 109.585L168.882 110.689L170.738 110.53L198.755 104.504L213.91 101.787L231.994 98.7149L240.144 102.496L241.036 106.395L237.852 114.311L218.495 119.037L195.826 123.645L162.07 131.592L161.696 131.893L162.137 132.547L177.36 133.925L183.855 134.279H199.774L229.447 136.524L237.215 141.605L241.8 147.867L241.036 152.711L229.065 158.737L213.019 154.956L175.45 145.977L162.587 142.787H160.805V143.85L171.502 154.366L191.242 172.089L215.82 195.011L217.094 200.682L213.91 205.172L210.599 204.699L188.949 188.394L180.544 181.069L161.696 165.118H160.422V166.772L164.752 173.152L187.803 207.771L188.949 218.405L187.294 221.832L181.308 223.959L174.813 222.777L161.187 203.754L147.305 182.486L136.098 163.345L134.745 164.2L128.075 235.42L125.019 239.082L117.887 241.8L111.902 237.31L108.718 229.984L111.902 215.452L115.722 196.547L118.779 181.541L121.58 162.873L123.291 156.636L123.14 156.219L121.773 156.449L107.699 175.752L86.304 204.699L69.3663 222.777L65.291 224.431L58.2867 220.768L58.9235 214.27L62.8713 208.48L86.304 178.705L100.44 160.155L109.551 149.507L109.462 147.967L108.959 147.924L46.6977 188.512L35.6182 189.93L30.7788 185.44L31.4156 178.115L33.7079 175.752L52.4285 162.873Z' },
166
181
  codex: { viewBox: '0 0 24 24', d: 'M9.20509 8.76514V6.50548C9.20509 6.31517 9.27649 6.17237 9.44293 6.07733L13.9861 3.46091C14.6046 3.10416 15.342 2.93772 16.103 2.93772C18.9573 2.93772 20.7651 5.14986 20.7651 7.50457C20.7651 7.67101 20.7651 7.86132 20.7412 8.05164L16.0316 5.29243C15.7462 5.12599 15.4607 5.12599 15.1753 5.29243L9.20509 8.76514ZM19.8136 17.566V12.1665C19.8136 11.8334 19.6708 11.5955 19.3854 11.4291L13.4152 7.95637L15.3656 6.83836C15.5321 6.74332 15.6749 6.74332 15.8413 6.83836L20.3845 9.45477C21.6928 10.216 22.5728 11.8334 22.5728 13.4032C22.5728 15.2108 21.5025 16.8759 19.8136 17.5657V17.566ZM7.80173 12.8088L5.8513 11.6671C5.68486 11.5721 5.61346 11.4293 5.61346 11.239V6.00616C5.61346 3.46114 7.56389 1.53436 10.2042 1.53436C11.2033 1.53436 12.1307 1.86746 12.9159 2.46205L8.2301 5.17374C7.94475 5.34018 7.80196 5.57801 7.80196 5.91112V12.809L7.80173 12.8088ZM12 15.2349L9.20509 13.6651V10.3352L12 8.76537L14.7947 10.3352V13.6651L12 15.2349ZM13.7958 22.4659C12.7967 22.4659 11.8693 22.1328 11.0841 21.5382L15.7699 18.8265C16.0553 18.6601 16.198 18.4223 16.198 18.0892V11.1912L18.1723 12.3329C18.3388 12.4279 18.4102 12.5707 18.4102 12.7611V17.9939C18.4102 20.5389 16.4359 22.4657 13.7958 22.4657V22.4659ZM8.15848 17.1617L3.61528 14.5453C2.30696 13.784 1.42701 12.1667 1.42701 10.5969C1.42701 8.76537 2.52115 7.12417 4.20987 6.43431V11.8575C4.20987 12.1906 4.35266 12.4284 4.63802 12.5948L10.5846 16.0437L8.63415 17.1617C8.46771 17.2567 8.32492 17.2567 8.15848 17.1617ZM7.897 21.0626C5.20919 21.0626 3.23488 19.0407 3.23488 16.5432C3.23488 16.3529 3.25875 16.1626 3.2824 15.9723L7.96817 18.684C8.25352 18.8504 8.53911 18.8504 8.82447 18.684L14.7947 15.2351V17.4948C14.7947 17.6851 14.7233 17.8279 14.5568 17.9229L10.0136 20.5394C9.39518 20.8961 8.6578 21.0626 7.89677 21.0626H7.897ZM13.7958 23.8929C16.6739 23.8929 19.0762 21.8475 19.6235 19.1358C22.2874 18.4459 24 15.9484 24 13.4034C24 11.7383 23.2865 10.121 22.002 8.95546C22.121 8.45591 22.1924 7.95637 22.1924 7.45705C22.1924 4.05573 19.4331 1.51048 16.2458 1.51048C15.6037 1.51048 14.9852 1.60553 14.3668 1.81971C13.2963 0.773101 11.8215 0.107117 10.2042 0.107117C7.32606 0.107117 4.92383 2.15259 4.37653 4.86428C1.7126 5.55414 0 8.05164 0 10.5967C0 12.2617 0.713506 13.8791 1.99795 15.0446C1.87904 15.5441 1.80764 16.0437 1.80764 16.543C1.80764 19.9443 4.56685 22.4896 7.75421 22.4896C8.39632 22.4896 9.01478 22.3945 9.63324 22.1803C10.7035 23.2269 12.1783 23.8929 13.7958 23.8929Z' },
167
182
  }
package/host/lib/index.js CHANGED
@@ -258,17 +258,27 @@ export function apply(ctx) {
258
258
  fs.renameSync(tmp, file)
259
259
  }
260
260
 
261
+ // A write refused for a moment (Windows: an antivirus holding the file) is tried again a few
262
+ // times: a record left saying "running" would come back as interrupted after a restart.
263
+ const writeTries = new Map()
261
264
  function flushRuns() {
262
265
  clearTimeout(store.timer)
263
266
  store.timer = null
267
+ const again = new Set()
264
268
  for (const id of store.dirty) {
265
269
  const run = runs.get(id)
266
270
  try {
267
271
  if (run) writeRunFile(run)
268
272
  else fs.rmSync(path.join(store.dir, `${id}.json`), { force: true })
269
- } catch (error) { logError('persist run', error) }
273
+ writeTries.delete(id)
274
+ } catch (error) {
275
+ logError('persist run', error)
276
+ const tries = (writeTries.get(id) ?? 0) + 1
277
+ if (['EPERM', 'EBUSY', 'EACCES'].includes(error?.code) && tries < 5) { writeTries.set(id, tries); again.add(id) } else writeTries.delete(id)
278
+ }
270
279
  }
271
- store.dirty.clear()
280
+ store.dirty = again
281
+ if (again.size) store.timer = setTimeout(guard('persist runs', flushRuns), PERSIST_DELAY_MS)
272
282
  }
273
283
 
274
284
  // Load earlier records. A run that was active when Harness went away cannot
@@ -1222,6 +1232,12 @@ export function apply(ctx) {
1222
1232
  throw new Error(`The folder ${dir}${workspace_id ? ` (workspace ${workspace_id})` : ''} does not exist, so no session was started and nothing was sent. Check the path (a project on an external drive needs that drive connected), or create the folder first.`)
1223
1233
  }
1224
1234
  }
1235
+ // Agent Teams belong to the whole session: changed while a turn runs (for a message that
1236
+ // waits behind it, or one steered into it), they would change that turn too.
1237
+ if (team != null && sessionId) {
1238
+ const busy = activeRunsFor(sessionId).length > 0 || (await sessionActivity(sessionId).catch(() => [])).length > 0
1239
+ if (busy) throw new Error(`No message was sent: the session is busy, and Agent Teams apply to the whole session, so turning them ${team ? 'on' : 'off'} now would change the running turn too. Send it again once the session is idle, or without team.`)
1240
+ }
1225
1241
  const plan = await planModel(sessionId, { model, reasoning_effort })
1226
1242
  const isNew = !sessionId
1227
1243
  if (isNew) {
@@ -1233,12 +1249,6 @@ export function apply(ctx) {
1233
1249
  const chosen = await applyModel(sessionId, plan, isNew).catch((error) => {
1234
1250
  throw new Error(`${isNew ? `Session ${sessionId} was created, but no message was sent: ` : 'No message was sent: '}the model could not be set (${error?.message ?? error})`)
1235
1251
  })
1236
- // Team mode goes on (or off) before the prompt, so the first step already has the Team tools.
1237
- if (team != null) {
1238
- await setTeam(sessionId, team).catch((error) => {
1239
- throw new Error(`${isNew ? `Session ${sessionId} was created, but no message was sent: ` : 'No message was sent: '}Agent Teams could not be turned ${team ? 'on' : 'off'} (${error?.message ?? error})`)
1240
- })
1241
- }
1242
1252
  // A session that never picked a model runs on Harness's default.
1243
1253
  let provider = chosen.model?.provider
1244
1254
  if (!provider) try { provider = defaultModel()?.currentSelection?.()?.provider } catch { /* unknown: no check */ }
@@ -1246,7 +1256,17 @@ export function apply(ctx) {
1246
1256
  const empty = await emptyBalance()
1247
1257
  if (empty) throw new Error(`${isNew ? `Session ${sessionId} was created, but no message was sent` : 'No message was sent'}: the DeepSeek account has no balance left (${empty}), so the run would fail at once. Do not send again until the user has topped up (Harness → Settings → Account, or platform.deepseek.com).`)
1248
1258
  }
1259
+ // Team mode goes on (or off) before the prompt, so the first step already has the Team tools,
1260
+ // and after the checks that can refuse the send, so a refused send leaves it as it was.
1261
+ if (team != null) {
1262
+ await setTeam(sessionId, team).catch((error) => {
1263
+ throw new Error(`${isNew ? `Session ${sessionId} was created, but no message was sent: ` : 'No message was sent: '}Agent Teams could not be turned ${team ? 'on' : 'off'} (${error?.message ?? error})`)
1264
+ })
1265
+ }
1249
1266
  const ahead = activeRunsFor(sessionId).map((r) => r.id)
1267
+ // A followup into a busy session waits in its queue, behind our runs or a turn the user
1268
+ // typed in Harness: said back, so the client knows it can still change it.
1269
+ const queuedBehind = !isNew && mode === 'followup' && (ahead.length > 0 || (await sessionActivity(sessionId).catch(() => [])).length > 0)
1250
1270
  const run = {
1251
1271
  id: `hrun-${Date.now().toString(36)}-${crypto.randomBytes(3).toString('hex')}`,
1252
1272
  sessionId, requestId: requestIdFor(sender), ...(sender ? { sender } : {}), mode, state: 'queued', sawPrompt: false,
@@ -1269,6 +1289,7 @@ export function apply(ctx) {
1269
1289
  model_source: chosen.source,
1270
1290
  ...(team != null ? { team } : {}),
1271
1291
  ...(ahead.length ? { other_active_runs: ahead } : {}),
1292
+ ...(queuedBehind ? { queued_behind: true } : {}),
1272
1293
  ...(workspace ? { workspace } : {}),
1273
1294
  }
1274
1295
  }
@@ -1459,7 +1480,7 @@ export function apply(ctx) {
1459
1480
 
1460
1481
 
1461
1482
  // --- MCP registration -----------------------------------------------------
1462
- // Switching the plugin on registers the dsh-baton MCP server for Claude Code and Codex,
1483
+ // Switching the plugin on registers the dsh-baton MCP server for Claude Code, Codex and Antigravity,
1463
1484
  // the same entries `dsh-baton setup` writes, so adding the plugin is the whole install.
1464
1485
  // It runs again on every Harness start: a plugin update brings the server along, and an
1465
1486
  // entry that is already right is left untouched. The Plugins page reads the outcome from
@@ -1512,7 +1533,7 @@ export function apply(ctx) {
1512
1533
  handler: (request, response) => {
1513
1534
  const { state, ok, error, version, runtime, clients = [] } = registration
1514
1535
  response.writeHead(200, { 'content-type': 'application/json', 'cache-control': 'no-store' })
1515
- response.end(JSON.stringify({ version: VERSION, registration: { state, ok, error, version, runtime, clients: clients.map(({ id, label, state }) => ({ id, label, state })) } }))
1536
+ response.end(JSON.stringify({ version: VERSION, registration: { state, ok, error, version, runtime, clients: clients.map(({ id, label, state, error, file }) => ({ id, label, state, ...(error === 'bad-json' ? { error, file } : {}) })) } }))
1516
1537
  },
1517
1538
  }), 'dsh-baton-host status route')
1518
1539
  })
package/host/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-baton-host",
3
- "version": "0.6.13",
4
- "description": "Hand coding tasks from Claude Code or Codex to DeepSeek Harness: they run live in the Harness window and come back with the changed files and test results.",
3
+ "version": "0.6.14",
4
+ "description": "Hand coding tasks from Claude Code, Codex or Antigravity to DeepSeek Harness: they run live in the Harness window and come back with the changed files and test results.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "LICENSE"
21
21
  ],
22
22
  "dependencies": {
23
- "dsh-baton-mcp": "0.6.13"
23
+ "dsh-baton-mcp": "0.6.14"
24
24
  },
25
25
  "license": "MIT",
26
26
  "dsh": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-baton-mcp",
3
- "version": "0.6.13",
3
+ "version": "0.6.14",
4
4
  "mcpName": "io.github.JialaoLiu/dsh-baton",
5
5
  "description": "Pass the baton from Claude Code, Codex or any MCP client to a local DeepSeek Harness: an MCP server that hands off tasks, continues a specific session, shows the run live in Harness and hands the result back when it is done.",
6
6
  "type": "module",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/JialaoLiu/dsh-baton",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.6.13",
10
+ "version": "0.6.14",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "dsh-baton-mcp",
15
- "version": "0.6.13",
15
+ "version": "0.6.14",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }
package/src/cli.mjs CHANGED
@@ -8,7 +8,7 @@ import { runHook, parseHookInput } from './codex-hook.mjs'
8
8
 
9
9
  const USAGE = `Usage: dsh-baton <command> [args]
10
10
 
11
- setup [--remove] register the MCP server for Claude Code and Codex (user-wide)
11
+ setup [--remove] register the MCP server for Claude Code, Codex and Antigravity
12
12
  codex-stop-hook the Codex Stop hook of plugins 0.6.0–0.6.3, for conversations opened before 0.6.4
13
13
  workspaces list Harness sidebar workspaces (host plugin)
14
14
  new-workspace <dir> [--title <t>] register (and create) a folder as a workspace
package/src/core.mjs CHANGED
@@ -146,7 +146,12 @@ function hostCallAt(endpoint, method, params = {}, { timeoutMs = 15000 } = {}) {
146
146
  if (msg === null || typeof msg !== 'object' || Array.isArray(msg)) return finish(new Error(`dsh-baton-host sent an unreadable reply to ${method}`))
147
147
  msg.error ? finish(new Error(String(msg.error))) : finish(null, msg.result)
148
148
  })
149
- conn.on('error', (e) => finish(Object.assign(e, { hostDown: true })))
149
+ // Refused rather than absent: Harness is running but this process may not open its pipe or
150
+ // socket (Antigravity's sandboxed terminal on Windows). Waiting for Harness to come back
151
+ // would never end, so it fails at once and says what to use instead.
152
+ conn.on('error', (e) => finish(['EPERM', 'EACCES'].includes(e.code)
153
+ ? Object.assign(new Error(`dsh-baton may not connect to Harness from here (${e.code} on ${endpoint}): this process is not allowed to, as in a sandboxed terminal. Use the dsh_* tools instead (dsh_wait, dsh_status).`), { code: e.code })
154
+ : Object.assign(e, { hostDown: true })))
150
155
  // Harness quitting closes the connection mid-call: marked so a wait can wait for it to come back.
151
156
  conn.on('close', () => finish(Object.assign(new Error(`dsh-baton-host closed the connection before answering ${method}`), { hostClosed: true })))
152
157
  })
@@ -187,9 +192,11 @@ export function versionWarning(plugin = hostVersion, server = VERSION) {
187
192
  }
188
193
 
189
194
  // Who a relayed message is from, shown on it in the Harness chat: DSH_BATON_SENDER if set,
190
- // else the MCP client's name (claude-code, claude-ai → claude; codex-mcp-client → codex).
195
+ // else the MCP client's name (claude-code, claude-ai → claude; codex-mcp-client → codex;
196
+ // antigravity-client → antigravity, whichever model the Antigravity conversation runs).
191
197
  export function senderOf(clientName = setting('SENDER')) {
192
198
  const n = String(clientName ?? '').toLowerCase()
199
+ if (n.includes('antigravity')) return 'antigravity'
193
200
  if (n.includes('claude')) return 'claude'
194
201
  if (n.includes('codex')) return 'codex'
195
202
  const slug = n.replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 32)
@@ -607,7 +614,7 @@ export function followResult(st) {
607
614
  case 'following': return { ...st, hint: `No report is due yet: ${AGAIN}, with no progress note in between. ${QUIET}` }
608
615
  case 'goal_ended': return { ...st, hint: `The goal stopped (${st.ended_because}${st.goal?.blocked_reason ? `: ${st.goal.blocked_reason.message}` : ''}), so following is over. ${report}${st.ended_because === 'blocked' || st.ended_because === 'paused' ? ' It needs the user before it goes on: say so.' : ''}` }
609
616
  case 'needs_input': return st.question
610
- ? asking(st, askHint(st.question.count, `dsh_answer and session_id ${st.session_id} (no run_id)`, AGAIN))
617
+ ? asking(st, askHint(st.question.count ?? st.question.questions?.length ?? 1, `dsh_answer and session_id ${st.session_id} (no run_id)`, AGAIN))
611
618
  : { ...st, hint: `Harness waits for something only a person can do in its window (an approval, for example). Tell the user, then ${AGAIN}.` }
612
619
  case 'needs_resume': return { ...st, hint: 'The goal is still active, but Harness will not go on with it by itself (for example after a Harness restart). Tell the user to press Continue in Harness, and stop following until they have.' }
613
620
  case 'goal_stalled': return { ...st, hint: 'The goal is active, yet no new round has started for 5 minutes: Harness may have stopped going on with it (for example after a restart). Tell the user; they can press Continue in Harness. Stop following until they have.' }
@@ -636,7 +643,7 @@ export const DECIDED_HINT = 'Required in your reply: you answered for the user d
636
643
  // more reliably than they follow rules.
637
644
  export const askHint = (n, answerWith, then) => `Harness asks the user ${n} question(s). If the user let you decide such questions, answer as the task's owner: an option only if it fits as is, else your own words (text; ${OWN_WORDS.toLowerCase().replace(/\.$/, '')}). An option that needs a note, a fix or an explanation to work for this task does not fit: write the answer it should have been instead. Answer with ${answerWith} and a one-sentence reason, then tell the user what you answered and why. Otherwise ask the user, your own recommendation first: fill the first line of relay (in a message) or the first option of question_tool (in a question tool such as request_user_input) with the answer that best fits this task, checked against its file names and requirements (an option, or your own answer when none fits), and why. Never "your choice", nor the asker's pick (harness_suggested) unchecked. If they pick your recommendation, submit the answer alone, without "Recommended" or the reason. Submit their answer with ${answerWith}, then ${then}.`
638
645
  const NEEDS_INPUT_HINT = (st) => st.question
639
- ? askHint(st.question.count, 'dsh_answer', 'wait for the run again')
646
+ ? askHint(st.question.count ?? st.question.questions?.length ?? 1, 'dsh_answer', 'wait for the run again')
640
647
  : 'The run waits for something only a person can do in the Harness UI (an approval, for example). Tell the user, then wait for the run again.'
641
648
  // The hint first, then the question laid out two ways, then the rest of the status.
642
649
  export function asking(st, hint) {
@@ -744,13 +751,17 @@ const readReasons = () => { try { return JSON.parse(fs.readFileSync(reasonsFile(
744
751
  // (text) go through at once, as do answers the user gave (no reason).
745
752
  export const OPTION_CHECK_HINT = 'Not sent yet, because you chose an option for the user. First, without looking at the options, write down the answer this user would want for this task, as if Harness had asked with no options at all. Send the option (dsh_answer again with the same answers) only if it says the same as that answer. If it does not, answer with text: your answer. An option you can argue for, or make work with a note or an explanation, is not the answer this user would want.'
746
753
  const checked = new Map()
747
- export function optionCheck(a, reason) {
754
+ // questionId: the question being answered, so a check left over from an earlier question
755
+ // (answered another way, or in the Harness window) never lets a later one through.
756
+ export function optionCheck(a, reason, questionId = null) {
748
757
  if (!(typeof reason === 'string' && reason.trim())) return null
749
758
  const picks = (a.answers ?? []).filter((x) => x.choose?.length && !(typeof x.text === 'string' && x.text.trim()))
750
759
  if (!picks.length) return null
751
- const key = JSON.stringify([a.run_id ?? a.session_id, picks.map((x) => [x.id ?? null, x.choose.map(String)])])
760
+ const key = JSON.stringify([a.run_id ?? a.session_id, questionId, picks.map((x) => [x.id ?? null, x.choose.map(String)])])
752
761
  for (const [k, at] of checked) if (Date.now() - at > 30 * 60_000) checked.delete(k)
753
- if (checked.delete(key)) return null
762
+ // Once looked at, the same answers go through each time: a send that then fails (the user
763
+ // answered in the window meanwhile) is retried and shows its real error.
764
+ if (checked.has(key)) return null
754
765
  checked.set(key, Date.now())
755
766
  return { submitted: false, check: picks.map((x) => ({ ...(x.id ? { id: x.id } : {}), choose: x.choose })), hint: OPTION_CHECK_HINT }
756
767
  }
@@ -957,7 +968,12 @@ export const api = {
957
968
  // user, not for Harness.
958
969
  async answer({ reason, ...a }) {
959
970
  if (!(await useHost())) throw new Error('Answering a question needs the dsh-baton-host plugin running inside DeepSeek Harness.')
960
- const check = optionCheck(a, reason)
971
+ let questionId = null
972
+ if (typeof reason === 'string' && reason.trim()) {
973
+ const st = await hostCall('status', a.run_id ? { run_id: a.run_id } : { session_id: a.session_id }).catch(() => null)
974
+ questionId = st?.question?.question_id ?? null
975
+ }
976
+ const check = optionCheck(a, reason, questionId)
961
977
  if (check) return check
962
978
  try {
963
979
  const result = shaped(await hostCall('answer', a))
package/src/folder.mjs CHANGED
@@ -3,10 +3,14 @@
3
3
  // ~/.codex). Codex sends its thread id with every tool call; that thread's rollout file starts
4
4
  // with a session_meta line that records the thread's cwd. The MCP server's own folder is not
5
5
  // enough there: dsh-baton registers it to start in the home folder (register.mjs), which is
6
- // never taken for a project. Other clients (Claude Code) start the server in the project folder.
6
+ // never taken for a project. Antigravity starts one server for all its conversations, in /,
7
+ // and sends the conversation id with every tool call; its conversation_summaries.db records
8
+ // each conversation's project folder. Other clients (Claude Code) start the server in the
9
+ // project folder.
7
10
  import fs from 'node:fs'
8
11
  import os from 'node:os'
9
12
  import path from 'node:path'
13
+ import { fileURLToPath } from 'node:url'
10
14
 
11
15
  const codexHome = () => process.env.CODEX_HOME || path.join(os.homedir(), '.codex')
12
16
  const DAYS_SEARCHED = 120
@@ -50,12 +54,74 @@ function serverCwd() {
50
54
  return cwd
51
55
  }
52
56
 
53
- export function conversationFolder(meta, isCodex) {
54
- if (isCodex) {
57
+ const AG = 'antigravity.google/'
58
+ // The Antigravity data folder: the parent of brain/ in the artifacts folder Antigravity sends
59
+ // (it differs per profile), else ~/.gemini/antigravity.
60
+ function antigravityDataDir(meta) {
61
+ const artifacts = meta?.[`${AG}artifacts_dir`]
62
+ if (typeof artifacts === 'string' && path.basename(path.dirname(artifacts)) === 'brain') return path.dirname(path.dirname(artifacts))
63
+ return path.join(os.homedir(), '.gemini', 'antigravity')
64
+ }
65
+
66
+ // The project folder of an Antigravity conversation (or of its root conversation, for a
67
+ // sub-agent's): a path, null when the conversation has no project ("outside-of-project"),
68
+ // or undefined when it cannot be told. Antigravity keeps the database open in WAL mode, so
69
+ // it is read from a copy, never in place, and on every send: a conversation can move to
70
+ // another project.
71
+ export function antigravityConversationCwd(meta, dataDir = antigravityDataDir(meta)) {
72
+ const ids = [meta?.[`${AG}conversation_id`], meta?.[`${AG}root_conversation_id`]].filter((id) => /^[\w-]+$/.test(id ?? ''))
73
+ if (!ids.length) return undefined
74
+ const db = path.join(dataDir, 'conversation_summaries.db')
75
+ if (!fs.existsSync(db)) return undefined
76
+ const sqlite = loadSqlite()
77
+ if (!sqlite?.DatabaseSync) return undefined
78
+ let tmp
79
+ try {
80
+ tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'dsh-baton-ag-'))
81
+ // Not -shm: SQLite rebuilds it from -wal, and on Windows it is the file Antigravity keeps locked.
82
+ for (const ext of ['', '-wal']) if (fs.existsSync(db + ext)) fs.copyFileSync(db + ext, path.join(tmp, 'c.db' + ext))
83
+ const conn = new sqlite.DatabaseSync(path.join(tmp, 'c.db'))
84
+ try {
85
+ const row = (id) => conn.prepare('SELECT workspace_uris, project_id FROM conversation_summaries WHERE conversation_id = ?').get(id)
86
+ for (const id of ids) {
87
+ const r = row(id)
88
+ if (!r) continue
89
+ let uris = []
90
+ try { uris = JSON.parse(r.workspace_uris || '[]') } catch { /* not JSON */ }
91
+ const uri = Array.isArray(uris) ? uris.find((u) => typeof u === 'string' && u.startsWith('file:')) : undefined
92
+ if (uri) return fileURLToPath(uri)
93
+ if (r.project_id === 'outside-of-project') return null
94
+ }
95
+ return undefined
96
+ } finally { conn.close() }
97
+ } catch {
98
+ return undefined
99
+ } finally {
100
+ // A copy an antivirus is still scanning (Windows) is left for the system to clear, not
101
+ // allowed to fail a send whose folder was found.
102
+ if (tmp) try { fs.rmSync(tmp, { recursive: true, force: true, maxRetries: 3 }) } catch { /* left behind */ }
103
+ }
104
+ }
105
+
106
+ // node:sqlite, without the "SQLite is an experimental feature" warning it prints on load
107
+ // (Node 22-24), which clients show in their MCP server log.
108
+ let sqliteModule
109
+ function loadSqlite() {
110
+ if (sqliteModule !== undefined) return sqliteModule
111
+ const emit = process.emitWarning
112
+ process.emitWarning = (w, ...rest) => { if (!/SQLite/i.test(String(w?.message ?? w))) emit.call(process, w, ...rest) }
113
+ try { sqliteModule = process.getBuiltinModule?.('node:sqlite') ?? null } catch { sqliteModule = null } finally { process.emitWarning = emit }
114
+ return sqliteModule
115
+ }
116
+
117
+ // client: 'codex', 'antigravity' or another client's name.
118
+ export function conversationFolder(meta, client) {
119
+ if (client === 'codex' || client === true) {
55
120
  const threadId = meta?.['x-codex-turn-metadata']?.thread_id ?? meta?.threadId
56
121
  const cwd = codexThreadCwd(threadId)
57
122
  if (cwd) return cwd
58
123
  }
124
+ if (client === 'antigravity') return antigravityConversationCwd(meta) ?? undefined
59
125
  return serverCwd()
60
126
  }
61
127
 
package/src/mcp.mjs CHANGED
@@ -24,6 +24,14 @@ const int = (description, d) => ({ type: 'integer', description, default: d })
24
24
  const MAX_WAIT_S = 24 * 3600
25
25
  const envWait = Math.floor(Number(core.setting('WAIT_S')))
26
26
  const isCodex = () => core.senderOf(clientName) === 'codex'
27
+ // Clients that list the six rarely used tools: Claude Code loads tools on demand and
28
+ // Antigravity keeps one file per tool, so a model searching its tools finds them. Others
29
+ // (Codex, with its catalog limit, and any client not known) reach them through dsh_call.
30
+ const listsHidden = () => ['claude', 'antigravity'].includes(core.senderOf(clientName))
31
+ // Whether the client may wait with a background command that wakes it when it exits. Not
32
+ // Codex (no wake-on-exit), and not Antigravity on Windows: its terminal is sandboxed there and
33
+ // may not open Harness's named pipe (EPERM), while this server, started outside it, can.
34
+ const backgroundWaits = () => !isCodex() && !(process.platform === 'win32' && core.senderOf(clientName) === 'antigravity')
27
35
  let codexTimeout = { mtime: null, value: null }
28
36
  function codexToolTimeout() {
29
37
  try {
@@ -95,6 +103,13 @@ const followCommand = (sid, until = 'goal', cursor, everyMin) => (/^[\w.-]+$/.te
95
103
  ? cliCommand(`follow ${sid} --until ${until}${/^\d+:\d+$/.test(cursor ?? '') ? ` --cursor ${cursor}` : ''}${everyMin ? ` --every ${everyMin}m` : ''}`)
96
104
  : undefined)
97
105
  // A run in a session with a Harness goal is waited for until the goal stops.
106
+ // A model that wants to change a queued message has to know dsh_update_queued is there: hidden
107
+ // from tools/list, Claude Code searched its tools, found nothing and gave up (2026-11-16: it
108
+ // steered a "merge the two" note instead). Now only Codex's list leaves it out (its catalog
109
+ // limit), and the results of queued runs say how to change them.
110
+ const QUEUE_HINT = () => !listsHidden()
111
+ ? 'While this message waits in the session\'s queue behind a running turn, you can change it: dsh_call {name: "dsh_update_queued", arguments: {run_id, action: "edit" (with message) | "remove" | "steer"}}. It is not in your tool list; dsh_call reaches it.'
112
+ : 'While this message waits in the session\'s queue behind a running turn, you can change it with dsh_update_queued {run_id, action: "edit" (with message) | "remove" | "steer"}.'
98
113
  const GOAL_WAIT_HINT = (how) => `In a session with a Harness goal (a message starting with /goal sets one) the wait goes on until the goal stops; add ${how} only when the user asked for progress reports.`
99
114
  const FOLLOW_COMMAND_HINT = ' Your client wakes you when a background command exits, so run follow_command that way instead of calling dsh_wait with session_id: it ends at the next report, with no polling.'
100
115
  // Several runs in parallel: one dsh_wait for all of them, so whichever ends first is dealt with
@@ -253,7 +268,7 @@ const TOOLS = [
253
268
  },
254
269
  {
255
270
  name: 'dsh_create_workspace',
256
- hidden: true, // not in tools/list; reachable directly or through dsh_call
271
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
257
272
  annotations: annotations('Create workspace', EDIT),
258
273
  description: 'Register a folder as a Harness workspace without starting a session (dsh_send with cwd does this too). Creates the folder unless create_dir is false; an already registered folder returns its workspace. Returns id, path, title and created. Needs the dsh-baton-host plugin.',
259
274
  inputSchema: { type: 'object', required: ['path'], properties: { path: str('Absolute folder path (~ allowed)'), title: str('Sidebar title; defaults to the folder name'), create_dir: { type: 'boolean', description: 'Create the folder if missing', default: true } } },
@@ -288,22 +303,44 @@ const TOOLS = [
288
303
  run: async (a, { meta } = {}) => {
289
304
  // A new session goes to this conversation's folder unless the call names another one;
290
305
  // a different folder is allowed but said back, so a wrong guess does not go unnoticed.
291
- const here = a.session_id ? undefined : conversationFolder(meta, isCodex())
292
- // Codex starts the server in the home folder (register.mjs), so its conversation folder
293
- // comes from the thread's rollout only; when that is not found, ask rather than guess.
294
- if (!here && !a.session_id && !a.cwd && !a.workspace_id && isCodex()) {
295
- throw new Error('Could not tell which folder this Codex conversation works in, so nothing was sent. Call dsh_send again with cwd set to the project folder (or workspace_id from dsh_list_workspaces).')
306
+ const client = core.senderOf(clientName)
307
+ // Looked up with cwd too, to say so when cwd is outside this conversation's folder.
308
+ const here = a.session_id || a.workspace_id ? undefined : conversationFolder(meta, client)
309
+ // Codex starts the server in the home folder (register.mjs) and Antigravity in /, so their
310
+ // conversation folder comes from the client's own records only; when that is not found
311
+ // (or an Antigravity conversation has no project), ask rather than guess.
312
+ if (!here && !a.session_id && !a.cwd && !a.workspace_id && (client === 'codex' || client === 'antigravity')) {
313
+ const who = client === 'codex' ? 'Codex' : 'Antigravity'
314
+ throw new Error(`Could not tell which folder this ${who} conversation works in, so nothing was sent. Call dsh_send again with cwd set to the project folder (or workspace_id from dsh_list_workspaces).`)
296
315
  }
297
316
  const args = here && !a.cwd && !a.workspace_id ? { ...a, cwd: here } : a
298
317
  const folder = here && a.cwd && !within(a.cwd, here)
299
318
  ? { folder_note: `This conversation works in ${here}; the new session was started in ${a.cwd} as asked. If that was not intended, cancel it and send again without cwd.` }
300
319
  : args !== a ? { cwd: here } : {}
301
- const st = { ...(await core.api.send({ ...args, sender: core.senderOf(core.setting('SENDER') || clientName) })), ...folder }
320
+ const sent = await core.api.send({ ...args, sender: core.senderOf(core.setting('SENDER') || clientName) })
321
+ // Only when it waits behind a turn (queued_behind; a plugin before 0.6.14 says only
322
+ // other_active_runs): every run starts out queued until Harness takes its prompt.
323
+ const behind = a.session_id && sent.state === 'queued' && sent.mode === 'followup' && (sent.queued_behind || sent.other_active_runs?.length)
324
+ const st = { ...sent, ...folder, ...(behind ? { queue_hint: QUEUE_HINT() } : {}) }
302
325
  // Codex has no wake-on-exit for shell commands: offered wait_command, it runs it in a
303
326
  // terminal and polls that, so it gets dsh_wait only.
304
327
  if (isCodex()) {
305
328
  return { ...st, hint: `Run started. Call dsh_wait with this run_id; it returns when the run ends or stops to ask the user something. ${PARALLEL_HINT} ${GOAL_WAIT_HINT('until turn and every_minutes')} ${NO_POLL} ${codeModeYield()}` }
306
329
  }
330
+ // Antigravity on Windows: its terminal may not open Harness's pipe, so it waits with dsh_wait.
331
+ if (client === 'antigravity' && !backgroundWaits()) {
332
+ return { ...st, hint: `Run started. Call dsh_wait with this run_id; it returns when the run ends or stops to ask the user something (a wait command in Antigravity's terminal cannot reach Harness on Windows). ${PARALLEL_HINT} ${GOAL_WAIT_HINT('until turn and every_minutes')} ${NO_POLL}` }
333
+ }
334
+ // Antigravity runs a terminal command in the background and wakes the model when it
335
+ // exits, but left to judge that, some models (Sonnet 5.5, Gemini 3.8 Flash) waited with
336
+ // dsh_wait inside the turn instead: so it is told plainly.
337
+ if (client === 'antigravity') {
338
+ return {
339
+ ...st,
340
+ wait_command: waitCommand(st.run_id),
341
+ hint: `Run started. Run wait_command now as a background terminal command and end your turn: Antigravity wakes you when it exits, which is when the run ends or stops to ask the user something; it prints the reply or the questions, with no polling and no turns spent meanwhile. Do not call dsh_wait for it. Several runs: one background wait_command each, so whichever ends first wakes you. ${GOAL_WAIT_HINT('--until turn --every 10m on wait_command')}`,
342
+ }
343
+ }
307
344
  return {
308
345
  ...st,
309
346
  wait_command: waitCommand(st.run_id),
@@ -316,12 +353,15 @@ const TOOLS = [
316
353
  annotations: annotations('Run status'),
317
354
  description: 'Look once at a run or a session without waiting. A run (run_id): state, recent events, final reply, waiting_on (sub-agents or jobs still working) and human_interjections. A session (session_id): busy, activity, its Harness goal (phase, rounds, whether Harness goes on with it), needs_input, and its last turn\'s reply. Never a way to wait: use dsh_wait.',
318
355
  inputSchema: { type: 'object', properties: { run_id: str('Run id from dsh_send'), session_id: str('Session id, when you have no run_id (for example to look at a session whose goal you follow)'), tail: int('How many recent events of a run', 5) } },
319
- run: async (a) => clip(await core.api.status({ tail: 5, ...a })),
356
+ run: async (a) => {
357
+ const st = clip(await core.api.status({ tail: 5, ...a }))
358
+ return a.run_id && st?.state === 'queued' ? { ...st, queue_hint: QUEUE_HINT() } : st
359
+ },
320
360
  },
321
361
  {
322
362
  name: 'dsh_wait',
323
363
  annotations: annotations('Wait for run'),
324
- description: () => `Wait for a run sent with dsh_send to end and return its state and final reply.${!isCodex() ? ' Prefer the background wait_command from dsh_send if your client wakes you when a background command exits: it costs no turns.' : ''} It also returns at once when the run stops to ask a person: needs_input answer (reply with dsh_answer) or harness-ui (an approval in the Harness window). Each call waits up to ${waitSeconds()} s${isCodex() && waitSeconds() > 270 ? ' (270 s in a conversation that was already open when dsh-baton set Codex\'s tool timeout)' : ''}; if it returns timed_out: true, call dsh_wait again with the same run_id, without a progress note. Parallel runs: all ids in run_ids, never one by one; returns once any ends or asks (ended; the rest in still_running); then wait again with the rest plus your fixes. A run in a session with a Harness goal is followed on until the goal stops, with every round since the run began. With session_id instead of run_id it follows that session's Harness goal (see until) without sending anything; it also returns when Harness needs a person or will not go on by itself. Pass back the cursor each result gives.${isCodex() ? ` ${NO_POLL} ${codeModeYield()}` : ''}`,
364
+ description: () => `Wait for a run sent with dsh_send to end and return its state and final reply.${backgroundWaits() ? ' Prefer the background wait_command from dsh_send if your client wakes you when a background command exits: it costs no turns.' : ''} It also returns at once when the run stops to ask a person: needs_input answer (reply with dsh_answer) or harness-ui (an approval in the Harness window). Each call waits up to ${waitSeconds()} s${isCodex() && waitSeconds() > 270 ? ' (270 s in a conversation that was already open when dsh-baton set Codex\'s tool timeout)' : ''}; if it returns timed_out: true, call dsh_wait again with the same run_id, without a progress note. Parallel runs: all ids in run_ids, never one by one; returns once any ends or asks (ended; the rest in still_running); then wait again with the rest plus your fixes. A run in a session with a Harness goal is followed on until the goal stops, with every round since the run began. With session_id instead of run_id it follows that session's Harness goal (see until) without sending anything; it also returns when Harness needs a person or will not go on by itself. Pass back the cursor each result gives.${isCodex() ? ` ${NO_POLL} ${codeModeYield()}` : ''}`,
325
365
  inputSchema: {
326
366
  type: 'object', properties: {
327
367
  run_id: str('Run id from dsh_send'),
@@ -341,7 +381,7 @@ const TOOLS = [
341
381
  if (ids.length === 1) a = { ...a, run_id: ids[0] }
342
382
  if (!a.run_id && a.session_id) {
343
383
  const st = await followInChunks(a, progress, signal, meta)
344
- if (isCodex() || st.cancelled || !['report', 'following', 'needs_input'].includes(st.state)) return st
384
+ if (!backgroundWaits() || st.cancelled || !['report', 'following', 'needs_input'].includes(st.state)) return st
345
385
  return { ...st, follow_command: followCommand(a.session_id, a.until, st.cursor, a.until === 'turn' ? (a.every_minutes ?? 10) : undefined), hint: `${st.hint}${FOLLOW_COMMAND_HINT}` }
346
386
  }
347
387
  if (!a.run_id) throw new Error('run_id is required (or session_id, to follow a session\'s goal)')
@@ -359,10 +399,10 @@ const TOOLS = [
359
399
  const f = await followInChunks({ session_id: result.session_id, until: a.until, every_minutes: a.every_minutes, ...(a.cursor ? { cursor: a.cursor } : { since_ms: Date.parse(result.started_at) || callStarted }), max_s: left - forChecks }, progress, signal, meta)
360
400
  const budget_ms = (waitSeconds(meta ?? null) - Math.round((Date.now() - callStarted) / 1000) - 5) * 1000
361
401
  const st = f.cancelled ? f : core.throughGoal(result, f, { budget_ms })
362
- if (isCodex() || st.cancelled || !['report', 'following', 'needs_input'].includes(st.state)) return st
402
+ if (!backgroundWaits() || st.cancelled || !['report', 'following', 'needs_input'].includes(st.state)) return st
363
403
  return { ...st, follow_command: waitOnCommand(a.run_id, st.until, st.cursor, st.until === 'turn' ? (a.every_minutes ?? 10) : undefined), hint: `${st.hint}${FOLLOW_COMMAND_HINT}` }
364
404
  }
365
- if (result.goal && !isCodex() && result.goal.phase === 'active') return { ...result, follow_command: followCommand(result.session_id), hint: `${result.hint}${FOLLOW_COMMAND_HINT}` }
405
+ if (result.goal && backgroundWaits() && result.goal.phase === 'active') return { ...result, follow_command: followCommand(result.session_id), hint: `${result.hint}${FOLLOW_COMMAND_HINT}` }
366
406
  return result
367
407
  },
368
408
  },
@@ -402,7 +442,7 @@ const TOOLS = [
402
442
  },
403
443
  {
404
444
  name: 'dsh_rename_session',
405
- hidden: true, // not in tools/list; reachable directly or through dsh_call
445
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
406
446
  annotations: annotations('Rename session', EDIT),
407
447
  description: 'Set the title of a Harness session; nothing else changes. Returns session_id and title.',
408
448
  inputSchema: { type: 'object', required: ['session_id', 'title'], properties: { session_id: str('Session id from dsh_list_sessions'), title: str('New title; surrounding spaces are trimmed and it must not be empty') } },
@@ -410,7 +450,7 @@ const TOOLS = [
410
450
  },
411
451
  {
412
452
  name: 'dsh_rename_workspace',
413
- hidden: true, // not in tools/list; reachable directly or through dsh_call
453
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
414
454
  annotations: annotations('Rename workspace', EDIT),
415
455
  description: 'Set the sidebar title of a workspace, by workspace_id or path; the folder is not renamed. Returns id, path and title.',
416
456
  inputSchema: { type: 'object', required: ['title'], properties: { workspace_id: str('Workspace id from dsh_list_workspaces'), path: str('Workspace folder, used when workspace_id is not given'), title: str('New title; surrounding spaces are trimmed and it must not be empty') } },
@@ -418,7 +458,7 @@ const TOOLS = [
418
458
  },
419
459
  {
420
460
  name: 'dsh_session_activity',
421
- hidden: true, // not in tools/list; reachable directly or through dsh_call
461
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
422
462
  annotations: annotations('Session activity'),
423
463
  description: 'What a session is doing now: busy, activity (running turn, sub-agents, background jobs, reminders) and bridge_runs. Read-only. Check it before dsh_send to a busy session or before dsh_cancel.',
424
464
  inputSchema: { type: 'object', required: ['session_id'], properties: { session_id: str('Session id from dsh_list_sessions') } },
@@ -427,13 +467,13 @@ const TOOLS = [
427
467
  {
428
468
  name: 'dsh_cancel',
429
469
  annotations: annotations('Cancel session work', hints(false, true, true)),
430
- description: 'Stop everything a session is doing (turn, sub-agents, background jobs, reminders), by run_id or session_id; the session is kept. Messages queued in it are dropped too (removed_from_queue); to drop one queued message use dsh_update_queued. Safe to repeat. Returns still_busy, activity and removed_from_queue.',
470
+ description: () => `Stop everything a session is doing (turn, sub-agents, background jobs, reminders), by run_id or session_id; the session is kept. Messages queued in it are dropped too (removed_from_queue); to drop one queued message use dsh_update_queued${listsHidden() ? '' : ' (via dsh_call)'}. Safe to repeat. Returns still_busy, activity and removed_from_queue.`,
431
471
  inputSchema: { type: 'object', properties: { run_id: str('Run id from dsh_send; stops the session that run belongs to'), session_id: str('Session id, to stop work dsh-baton did not start') } },
432
472
  run: (a) => core.api.cancel(a),
433
473
  },
434
474
  {
435
475
  name: 'dsh_update_queued',
436
- hidden: true, // not in tools/list; reachable directly or through dsh_call
476
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
437
477
  annotations: annotations('Change queued message', hints(false, true, false)),
438
478
  description: 'Change a dsh_send message still queued behind a running turn: edit replaces its text, remove deletes it, steer sends it into the running turn now. Only while its run is queued.',
439
479
  inputSchema: { type: 'object', required: ['run_id', 'action'], properties: { run_id: str('Run id from dsh_send of the queued message'), action: { type: 'string', enum: ['edit', 'remove', 'steer'], description: 'edit replaces the text, remove deletes the message, steer sends it into the running turn now' }, message: str('New text for action edit (plain text, not empty)') } },
@@ -441,7 +481,7 @@ const TOOLS = [
441
481
  },
442
482
  {
443
483
  name: 'dsh_list_runs',
444
- hidden: true, // not in tools/list; reachable directly or through dsh_call
484
+ hidden: true, // not in Codex's tools/list; reachable directly or through dsh_call
445
485
  annotations: annotations('List runs'),
446
486
  description: 'List the runs sent with dsh_send, newest first (the last 100 are kept), to recover a run_id: run_id, session_id, state, times, message_preview, final_text and error. Read-only.',
447
487
  inputSchema: { type: 'object', properties: { session_id: str('Only runs sent to this session'), limit: int('Max runs returned', 10) } },
@@ -461,10 +501,10 @@ const catalog = () => TOOLS.filter((t) => t.name !== 'dsh_call').map((t) => ({
461
501
  TOOLS.push({
462
502
  name: 'dsh_call',
463
503
  annotations: annotations('Call dsh-baton tool by name', hints(false, true, false)),
464
- description: 'Call a dsh-baton tool by name, for a tool this conversation does not list (dsh-baton was updated without a restart; the update note names it). Runs the same code as a direct call, so it can do whatever that tool does. An unknown name changes nothing and returns the tools with their input schemas.',
504
+ description: 'Call a dsh-baton tool this conversation does not list, by name: dsh_update_queued (change a queued message), dsh_list_runs, dsh_session_activity, dsh_create_workspace, dsh_rename_session, dsh_rename_workspace, or one an update added. Same code as a direct call. An unknown name changes nothing and lists every tool with its schema.',
465
505
  inputSchema: {
466
506
  type: 'object', required: ['name'], properties: {
467
- name: str('Tool name, e.g. dsh_send or a tool added by an update'),
507
+ name: str('Tool name'),
468
508
  arguments: { type: 'object', description: 'Arguments for that tool, as its input schema describes them (see the list returned for an unknown name)', default: {} },
469
509
  },
470
510
  },
@@ -501,7 +541,7 @@ async function handle(req) {
501
541
  case 'ping':
502
542
  return {}
503
543
  case 'tools/list':
504
- return { tools: TOOLS.filter((t) => !t.hidden).map(({ run, hidden, ...t }) => ({ ...t, description: typeof t.description === 'function' ? t.description() : t.description })) }
544
+ return { tools: TOOLS.filter((t) => !t.hidden || listsHidden()).map(({ run, hidden, ...t }) => ({ ...t, description: typeof t.description === 'function' ? t.description() : t.description })) }
505
545
  case 'tools/call': {
506
546
  const tool = TOOLS.find((t) => t.name === req.params?.name)
507
547
  if (!tool) throw Object.assign(new Error(`Unknown tool: ${req.params?.name}`), { code: -32602 })
package/src/register.mjs CHANGED
@@ -1,4 +1,4 @@
1
- // Registering the dsh-baton MCP server for Claude Code and Codex, user-wide, by writing
1
+ // Registering the dsh-baton MCP server for Claude Code, Codex and Antigravity, user-wide, by writing
2
2
  // their config files directly. This needs no `claude` or `codex` on PATH (desktop-only
3
3
  // installs have neither) and no hand-editing of TOML.
4
4
  //
@@ -20,6 +20,12 @@ export const claudeConfigPath = (env = process.env, home = os.homedir()) =>
20
20
  path.join(env.CLAUDE_CONFIG_DIR || home, '.claude.json')
21
21
  export const codexConfigPath = (env = process.env, home = os.homedir()) =>
22
22
  path.join(env.CODEX_HOME || path.join(home, '.codex'), 'config.toml')
23
+ // Antigravity 2.x reads its MCP servers from ~/.gemini/config/mcp_config.json (1.x used
24
+ // ~/.gemini/antigravity/mcp_config.json, which 2.x no longer reads). ~/.gemini/antigravity
25
+ // is its own data folder, so it tells Antigravity from the Gemini CLI, which also uses ~/.gemini.
26
+ export const antigravityConfigPath = (env = process.env, home = os.homedir()) =>
27
+ path.join(home, '.gemini', 'config', 'mcp_config.json')
28
+ const antigravityPresent = (home) => fs.existsSync(path.join(home, '.gemini', 'antigravity'))
23
29
 
24
30
  // ~/.claude.json: the top-level "mcpServers" map is Claude Code's user scope.
25
31
  export function editClaudeConfig(text, entry) {
@@ -31,8 +37,27 @@ export function editClaudeConfig(text, entry) {
31
37
  return JSON.stringify({ ...cfg, mcpServers: servers }, null, 2) + '\n'
32
38
  }
33
39
 
40
+ // Antigravity's mcp_config.json: the same "mcpServers" map, without Claude Code's "type".
41
+ // It starts the server once, when Antigravity starts, so a new entry needs a restart of it.
42
+ // Antigravity never had the old dsh-bridge entry, so only our own is touched; a file with
43
+ // nothing of ours to remove stays as it is (or absent).
44
+ export function editAntigravityConfig(text, entry) {
45
+ // A file saved by an editor that writes a byte order mark is still JSON.
46
+ const json = text.replace(/^\uFEFF/, '')
47
+ const cfg = json.trim() ? JSON.parse(json) : {}
48
+ const servers = { ...(cfg.mcpServers ?? {}) }
49
+ if (!entry && !(NAME in servers)) return text
50
+ if (entry) {
51
+ // Keys of the user's own (such as "disabled") stay; ours are set afresh.
52
+ const { env: _env, ...kept } = servers[NAME] ?? {}
53
+ servers[NAME] = { ...kept, command: entry.command, args: entry.args, ...(entry.env && Object.keys(entry.env).length ? { env: entry.env } : {}) }
54
+ } else delete servers[NAME]
55
+ return JSON.stringify({ ...cfg, mcpServers: servers }, null, 2) + '\n'
56
+ }
57
+
34
58
  export function readClaudeEntry(text) {
35
- const e = text.trim() ? JSON.parse(text).mcpServers?.[NAME] : null
59
+ const json = text.replace(/^\uFEFF/, '')
60
+ const e = json.trim() ? JSON.parse(json).mcpServers?.[NAME] : null
36
61
  if (!e?.command) return null
37
62
  return { command: e.command, args: e.args ?? [], ...(e.env && Object.keys(e.env).length ? { env: e.env } : {}) }
38
63
  }
@@ -418,6 +443,8 @@ export function clients(env = process.env, home = os.homedir()) {
418
443
  return [
419
444
  { id: 'claude', label: 'Claude Code', file: claude, present: fs.existsSync(claude) || fs.existsSync(path.join(home, '.claude')), edit: editClaudeConfig, read: readClaudeEntry },
420
445
  { id: 'codex', label: 'Codex', file: codex, present: fs.existsSync(path.dirname(codex)), edit: (t, e) => editCodexConfig(t, e, home), read: readCodexEntry },
446
+ // Same "mcpServers" shape as ~/.claude.json, so Claude Code's reader fits.
447
+ { id: 'antigravity', label: 'Antigravity', file: antigravityConfigPath(env, home), present: antigravityPresent(home), edit: editAntigravityConfig, read: readClaudeEntry },
421
448
  ]
422
449
  }
423
450
 
@@ -590,7 +617,9 @@ export function autoRegister({ root, home = os.homedir(), env = process.env, nod
590
617
  rewrite(c.file, (t) => c.edit(t, { ...launch, args: [script] }))
591
618
  result.clients.push({ id: c.id, label: c.label, state: 'registered' })
592
619
  } catch (e) {
593
- result.clients.push({ id: c.id, label: c.label, state: 'failed', error: e.message })
620
+ // A config the user broke by hand (a comment, a trailing comma) is left alone and named,
621
+ // since running setup would fail the same way.
622
+ result.clients.push({ id: c.id, label: c.label, state: 'failed', ...(e instanceof SyntaxError ? { error: 'bad-json', file: c.file } : { error: e.message }) })
594
623
  }
595
624
  }
596
625
  const codex = list.find((c) => c.id === 'codex')
package/src/setup.mjs CHANGED
@@ -1,11 +1,11 @@
1
- // `dsh-baton setup`: register the dsh-baton MCP server for Claude Code and Codex, user-wide
1
+ // `dsh-baton setup`: register the dsh-baton MCP server for Claude Code, Codex and Antigravity, user-wide
2
2
  // (see register.mjs, which the Harness plugin also uses), and say what is left to do in Harness.
3
3
  import fs from 'node:fs'
4
4
  import os from 'node:os'
5
5
  import path from 'node:path'
6
6
  import { execFileSync } from 'node:child_process'
7
7
  import { ROOT, VERSION, config, hostAvailable, hostVersionSeen as versionOfHost, versionWarning } from './core.mjs'
8
- import { appDir, installApp, rewrite, stableNodePath, claudeConfigPath, codexConfigPath, editClaudeConfig, editCodexConfig, removeCodexHookBlock, noteCodexToolTimeout, readCodexToolTimeout } from './register.mjs'
8
+ import { appDir, installApp, rewrite, stableNodePath, claudeConfigPath, codexConfigPath, antigravityConfigPath, editClaudeConfig, editCodexConfig, editAntigravityConfig, removeCodexHookBlock, noteCodexToolTimeout, readCodexToolTimeout } from './register.mjs'
9
9
 
10
10
  export { appDir, installApp, stableNodePath, claudeConfigPath, codexConfigPath, editClaudeConfig, editCodexConfig }
11
11
 
@@ -71,13 +71,14 @@ export function pluginSteps({ current, old }, running, hostDir, fromSource = fs.
71
71
  if (old) steps.push(' The plugin is installed under its old name: first Plugins (插件) → dsh-bridge-host → Uninstall (卸载).')
72
72
  if (current && !ok) {
73
73
  steps.push(isLink(current)
74
- ? ` The plugin installed now comes from a local folder (${current.replace(/^(link|file):/, '')}): first Plugins (插件) → dsh-baton-host → Uninstall (卸载).`
74
+ ? ` The plugin installed now comes from a local folder (${current.replace(/^(link|file):/, '')}): first Plugins (插件) → dsh-baton-host → Uninstall (卸载). Harness deletes the files of a folder plugin it uninstalls: commit or copy that folder first.`
75
75
  : ' The plugin installed now comes from npm, not this checkout: first Plugins (插件) → dsh-baton-host → Uninstall (卸载).')
76
76
  }
77
77
  if (ok && !old) return ['Harness plugin: installed but not answering. Open Harness and check that dsh-baton-host is switched on in Plugins (插件).']
78
78
  if (fromSource) {
79
79
  const copied = copyToClipboard(hostDir)
80
80
  steps.push(` Plugins (插件) → Add plugin (添加插件) → paste ${copied ? 'the path (already copied)' : 'this path'}: ${hostDir}`)
81
+ steps.push(' (Uninstalling a plugin added from a folder deletes that folder\'s files: commit your changes first, or add a copy of the folder.)')
81
82
  } else {
82
83
  const copied = copyToClipboard(PLUGIN)
83
84
  steps.push(` Plugins (插件) → Add plugin (添加插件) → registry: Official npm registry → package: ${PLUGIN}${copied ? ' (already copied)' : ''}`)
@@ -128,6 +129,8 @@ export async function setup({ remove = false } = {}) {
128
129
  const hadTimeout = fs.existsSync(codexFile) && readCodexToolTimeout(fs.readFileSync(codexFile, 'utf8')) !== null
129
130
  register('Codex', codexFile, fs.existsSync(path.dirname(codexFile)), editCodexConfig)
130
131
  if (!remove && fs.existsSync(codexFile)) noteCodexToolTimeout(codexFile, undefined, undefined, !hadTimeout)
132
+ const antigravityFile = antigravityConfigPath()
133
+ register('Antigravity', antigravityFile, fs.existsSync(path.join(os.homedir(), '.gemini', 'antigravity')), editAntigravityConfig)
131
134
  // The Codex Stop hook plugins 0.6.0–0.6.3 added goes too, as the plugin takes it out.
132
135
  if (fs.existsSync(codexFile)) {
133
136
  try {
@@ -160,7 +163,8 @@ export async function setup({ remove = false } = {}) {
160
163
  }
161
164
  return lines.join('\n')
162
165
  }
163
- lines.push('', 'MCP server registered user-wide: new conversations in Claude Code and Codex have the dsh_* tools.')
166
+ const agNote = fs.existsSync(path.join(os.homedir(), '.gemini', 'antigravity')) ? '; Antigravity has them after a restart' : ''
167
+ lines.push('', `MCP server registered user-wide: new conversations in Claude Code and Codex have the dsh_* tools${agNote}.`)
164
168
 
165
169
  lines.push('', ...pluginSteps(installedPlugins(), await hostAvailable() ? versionOfHost() : null, path.join(root, 'host')))
166
170
  return lines.join('\n')