@deepseek-ai/dsh-cua-mcp 0.2.3-alpha.2 → 0.2.3-alpha.3

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.i18n.yaml CHANGED
@@ -21,17 +21,17 @@
21
21
  en: ce44d68f2ede2c0f
22
22
  zh: 1d7bbd8a9aabc7f5
23
23
  /deepseek-ai-dsh-cua-mcp/use-this-package/connect-a-client:
24
- en: 67ead744db140e08
25
- zh: eac0c52840b65922
24
+ en: bdb381acc1ed6339
25
+ zh: 54fc0dade8a40c7b
26
26
  /deepseek-ai-dsh-cua-mcp/use-this-package/what-you-get:
27
- en: 44044e39f455e46f
28
- zh: 657393ce56a7a3b5
27
+ en: c263504d27bff382
28
+ zh: dd468ec9da26b7cf
29
29
  /deepseek-ai-dsh-cua-mcp/configuration:
30
30
  en: 3fc42ffbb107d5ac
31
31
  zh: 1fda41e53d3b4c9f
32
32
  /deepseek-ai-dsh-cua-mcp/understand-the-implementation:
33
- en: 7e685c1041391819
34
- zh: 5a80112fd5f3d82f
33
+ en: 76df7326c8157329
34
+ zh: 03e6bf161d07ab09
35
35
  /deepseek-ai-dsh-cua-mcp/further-exploration:
36
36
  en: 5b8bd3e71ebbb316
37
37
  zh: f1c8b9ae63ce3aac
@@ -51,8 +51,8 @@
51
51
  en: 0b0c63281111993b
52
52
  zh: 45716a56b5a5ad12
53
53
  /deepseek-ai-dsh-cua-mcp/known-limitations-and-deferred-work:
54
- en: b1ce029c37a771af
55
- zh: 42390a45e6c440e4
54
+ en: ff13c4ee1f8df64e
55
+ zh: 7067dce9e1a1ba06
56
56
  /deepseek-ai-dsh-cua-mcp/known-limitations-and-deferred-work/dev-note:
57
57
  en: e67f633dc6fe7773
58
58
  zh: 8ec3e73528ddb1a6
package/README.md CHANGED
@@ -90,7 +90,7 @@ On native Windows the profile mounts the [Windows provider](../cua-windows/READM
90
90
  helperPath: 'C:\absolute\path\to\dsh-cua-windows.exe'
91
91
  ```
92
92
 
93
- That provider does not launch applications and offers no `Always allow` grant: open the application before a program selects it, and under `elicit` every connection asks for consent again. The profile does not mount it under WSL.
93
+ In `elicit` mode, choosing `Always allow` for a Windows application lets subsequent connections in this profile reuse the grant. Choosing `Allow for this session` covers the current connection.
94
94
 
95
95
  On other Hosts the profile starts without a provider: the listing carries `cua_get_api_reference` and `cua_reset`, each of which returns an error naming the missing provider, and a `cua_run_code` call fails as `unknown tool`. A provider row that fails to activate, such as the Windows row without a helper, leaves the same listing, and the launcher names the failure on stderr.
96
96
 
@@ -98,7 +98,7 @@ On other Hosts the profile starts without a provider: the listing carries `cua_g
98
98
 
99
99
  `cua_get_api_reference` returns the `cua` API reference: the guidance the provider registers for the connection's Agent, with every method signature and operating rule, which a DSH model receives in its system prompt. It takes no arguments, runs no program, and touches neither the desktop nor the program environment, so it also answers while a program is running. The server instructions ask the model to call it at the start of every conversation, and its description asks for another call when the reference has left the model's context or a program fails on an unknown `cua` method.
100
100
 
101
- `cua_run_code` is the Agent's DSH registration served as an MCP tool: every `tools/list` reads its name, description, and parameter schema from the tool registry, so the provider's definition is the only source, `description` is required as that definition declares, and `timeoutMs` bounds one program. The projection omits the registration's sandbox-escalation fields, `sandbox_permissions` and `justification`, and a call naming them is refused before execution; every other argument passes to the DSH tool executor unchanged, which validates them and answers unknown names, so an invalid call returns DSH's error result. The program runs as TypeScript REPL statements against the global `cua` object in the provider's retained Node environment. The result carries what the program passes to `inspect(...)`: text as text blocks and each inspected screenshot as an inline image in the exact version the program observed, so pixel coordinates in the text match the image; a program that inspects nothing returns a completion notice. The tool description carries the execution rules. Programs start in the workspace and run one at a time per connection in arrival order; a cancelled call cancels its program. A failed call returns DSH's failure message with `isError` set and without DSH's `Error:` prefix.
101
+ `cua_run_code` is the Agent's DSH registration served as an MCP tool: every `tools/list` reads its name, description, and parameter schema from the tool registry, so the provider's definition is the only source, `description` is required as that definition declares, and `timeoutMs` bounds one program. The projection omits the registration's sandbox-escalation fields, `sandbox_permissions` and `justification`, and a call naming them is refused before execution; every other argument passes unchanged to DSH tool execution through `ctx.tools.execute()`, which validates them and answers unknown names, so an invalid call returns DSH's error result. The program runs as TypeScript REPL statements against the global `cua` object in the provider's retained Node environment. The result carries what the program passes to `inspect(...)`: text as text blocks and each inspected screenshot as an inline image in the exact version the program observed, so pixel coordinates in the text match the image; a program that inspects nothing returns a completion notice. The tool description carries the execution rules. Programs start in the workspace and run one at a time per connection in arrival order; a cancelled call cancels its program. A failed call returns DSH's failure message with `isError` set and without DSH's `Error:` prefix.
102
102
 
103
103
  `cua_reset` discards the program environment and nothing else. The program process ends, so its variables, imports, and application and window objects are gone; a `cua_run_code` program that is still running is cancelled, and the reset answers after that program has. The connection's Agent stays with its native connection and its consent decisions: an application granted for the session is not asked again, a refused one stays refused, and saved grants and the helper's system permissions are untouched. The next program starts a fresh process with a new `cua` object and selects applications again with `cua.getApp`; a program that arrives during a reset runs after it. A reset whose process cleanup fails returns an error, and programs fail until a later `cua_reset` succeeds. Use it after an unusable environment, or to keep retained state out of the next task.
104
104
 
@@ -126,9 +126,9 @@ The patch also mounts the Host's native provider, row `cua-mcp-provider` on macO
126
126
  <details>
127
127
  <summary>Implementation internals — click to expand</summary>
128
128
 
129
- The [patch](cordis.patch.yml) composes the whole profile over the empty root: sessions with JSONL persistence and projections, attachments, storage for application grants, the subprocess, sandbox, approval, and filesystem seams program processes run under, tools with the native executor, the system prompt, user questions, the llm hub without an adapter, the Agent registry with the agent-loop factory, the preset registry with the empty default preset, the `computer-use` registry, one native provider row per Host, macOS on Darwin and Windows on native Windows, and this frontend. A profile manifest that lists this bundle alone selects the composition; the launcher loads it from the installation without a template. The frontend parses the invocation with `parseCmdline`, binds stdin EOF to the launcher's bounded shutdown, and after the launcher commits readiness creates the workspace and connects the official MCP server to a stdio transport. `cua-mcp` is not a required startup entry: the launcher reports an inactive row on stderr instead of stopping the profile.
129
+ The [patch](cordis.patch.yml) composes the whole profile over the empty root: sessions with JSONL persistence and projections, attachments, storage for application grants, the subprocess, sandbox, approval, and filesystem seams program processes run under, tools with the native root registry, the system prompt, user questions, the llm hub without an adapter, the Agent registry with the agent-loop factory, the preset registry with the empty default preset, the `computer-use` registry, one native provider row per Host, macOS on Darwin and Windows on native Windows, and this frontend. A profile manifest that lists this bundle alone selects the composition; the launcher loads it from the installation without a template. The frontend parses the invocation with `parseCmdline`, binds stdin EOF to the launcher's bounded shutdown, and after the launcher commits readiness creates the workspace and connects the official MCP server to a stdio transport. `cua-mcp` is not a required startup entry: the launcher reports an inactive row on stderr instead of stopping the profile.
130
130
 
131
- [`server.ts`](src/server.ts) serves the three tools through the protocol server's low-level `tools/list` and `tools/call` handlers: the listing projects the Agent's `cua_run_code` registration, checked against the protocol's tool type, between the two tools that file defines. The connection's Agent mounts the registry's default preset and records the workspace as its working directory, which the sandbox policy resolves as the `workspace-write` root of its programs. `cua_get_api_reference` reads the provider's prompt section for that Agent through `ctx.systemPrompt.assemble` and keeps no state. A `cua_run_code` call runs through `ctx.tools.execute` inside `ctx.agents.withInitiator` with the Agent and the request signal and no model step, so the Session log carries nested `tool/ptc-dispatch` events but no root `tool/call`; [`projection.ts`](src/projection.ts) renders the result and its deferred screenshot contexts, reading each image through `ctx.cuaPrograms.screenshotRequestTarget`. `cua_reset` cancels the Agent's running program with `agent.cancel`, calls `ctx.cuaPrograms.release`, with which the provider's program runtime releases the environment of that state owner, and answers once the Agent is idle; one release runs at a time, and program calls wait for it because the runtime rejects a program while the previous process is exiting. [`consent.ts`](src/consent.ts) is the `user-questions/request` answerer for that Agent. A `cua_run_code` call runs as the Agent's maintenance activity, so an Agent disposed while a call is in flight cancels the call and waits for it and its nested calls to settle before it releases its native connection and closes its Session.
131
+ [`server.ts`](src/server.ts) serves the three tools through the protocol server's low-level `tools/list` and `tools/call` handlers: the listing projects the Agent's `cua_run_code` registration, checked against the protocol's tool type, between the two tools that file defines. The server resolves the default preset before creating the connection's Agent, records and mounts that ID, and records the workspace as its working directory, which the sandbox policy resolves as the `workspace-write` root of its programs. `cua_get_api_reference` reads the provider's prompt section for that Agent through `ctx.systemPrompt.assemble` and keeps no state. A `cua_run_code` call runs through `ctx.tools.execute` inside `ctx.agents.withInitiator` with the Agent and the request signal and no model step, so the Session log carries nested `tool/ptc-dispatch` events but no root `tool/call`; [`projection.ts`](src/projection.ts) renders the result and its deferred screenshot contexts, reading each image through `ctx.cuaPrograms.screenshotRequestTarget`. `cua_reset` cancels the Agent's running program with `agent.cancel`, calls `ctx.cuaPrograms.release`, with which the provider's program runtime releases the environment of that state owner, and answers once the Agent is idle; one release runs at a time, and program calls wait for it because the runtime rejects a program while the previous process is exiting. [`consent.ts`](src/consent.ts) is the `user-questions/request` answerer for that Agent. A `cua_run_code` call runs as the Agent's maintenance activity, so an Agent disposed while a call is in flight cancels the call and waits for it and its nested calls to settle before it releases its native connection and closes its Session.
132
132
 
133
133
  </details>
134
134
 
@@ -169,7 +169,6 @@ The tool catalog and instructions are stable for one installation. The reference
169
169
 
170
170
  - Successful programs retain held keys and mouse buttons across calls and report them in a system reminder. Program failure, a received cancellation of an active cua_run_code request, reset and connection closure release owned input. If a call sends down and returns, and the client pauses while its model is thinking, this server receives no cancellation: that input can remain pressed until explicit up or later cleanup.
171
171
  - macOS and native Windows Hosts have a provider. Other Hosts, WSL included, list `cua_get_api_reference` and `cua_reset`, which both name the missing provider; a `cua_run_code` call fails as `unknown tool`.
172
- - On Windows the [provider's limits](../cua-windows/README.md#known-limitations-and-deferred-work) apply through MCP: it does not launch applications, grants no `Always allow`, and an npm installation needs `helperPath`.
173
172
  - Elicitation uses the 2025 MCP request model; a client that negotiates the 2026-07-28 revision receives an error for consent requests and should use `DSH_CUA_CONSENT=allow`.
174
173
  - Program sandbox escalation and the raw `cua` tool are not exposed; `DSH_PERMISSION_MODE` selects the launch-time file sandbox of program processes, and the workspace is its `workspace-write` root.
175
174
  - The `cua` API reference reaches a model only when it calls `cua_get_api_reference`. The server cannot observe a new conversation on an existing connection or a compacted context, so the instructions and the tool description carry that request; a client that withholds the tool leaves its model with the execution rules alone.
package/README.zh.md CHANGED
@@ -90,7 +90,7 @@ claude mcp add-json dsh_cua '{"type":"stdio","command":"/absolute/path/to/dsh","
90
90
  helperPath: 'C:\absolute\path\to\dsh-cua-windows.exe'
91
91
  ```
92
92
 
93
- 该提供方不启动应用,也不提供 `Always allow` 授权:程序选中应用之前要先打开它,在 `elicit` 模式下每个连接都会重新询问授权。profile 不在 WSL 下挂载它。
93
+ 在 `elicit` 模式下,为 Windows 应用选择 `Always allow` 后,同一 profile 的后续连接可以沿用授权。选择 `Allow for this session` 只允许当前连接访问该应用。
94
94
 
95
95
  在其他 Host 上 profile 没有提供方也能启动:列表有 `cua_get_api_reference` 与 `cua_reset`,二者都返回指出缺少提供方的错误,调用 `cua_run_code` 以 `unknown tool` 失败。提供方行无法激活时(例如 Windows 行缺少 helper)列表相同,启动器会在 stderr 上指出失败原因。
96
96
 
@@ -98,7 +98,7 @@ claude mcp add-json dsh_cua '{"type":"stdio","command":"/absolute/path/to/dsh","
98
98
 
99
99
  `cua_get_api_reference` 返回 `cua` API 参考:提供方为连接的 Agent 注册的指引,包含每个方法的签名与操作规则,也就是 DSH 模型在系统提示中收到的那段文本。它不带参数,不运行程序,也不触碰桌面和程序环境,因此程序运行期间同样可以应答。服务器说明要求模型在每次对话开始时调用它;它的描述要求在参考已不在模型上下文中、或程序因未知的 `cua` 方法失败时再调用一次。
100
100
 
101
- `cua_run_code` 就是该 Agent 的 DSH 注册项以 MCP 工具的形式提供:每次 `tools/list` 都从工具注册表读取它的名称、描述和参数 schema,因此提供方的定义是唯一来源,`description` 按该定义必填,`timeoutMs` 限制单个程序。投影省略注册项中的沙箱提权字段 `sandbox_permissions` 与 `justification`,指定它们的调用在执行前被拒绝;其余参数原样交给 DSH 工具执行器,由它校验参数并回答未知名称,因此非法调用返回 DSH 的错误结果。程序作为 TypeScript REPL 语句在提供方保留的 Node 环境中对全局 `cua` 对象运行。结果携带程序传给 `inspect(...)` 的内容:文本成为文本块,每张被 inspect 的截图成为内联图片,且图片正是程序观察到的那一版,因此文本中的像素坐标与图片一致;没有 inspect 任何值的程序返回一条完成提示。执行规则在工具描述里。程序在工作区中启动,同一连接的程序按到达顺序逐个运行;取消调用会取消其程序。失败的调用返回 DSH 的失败信息并设置 `isError`,不带 DSH 的 `Error:` 前缀。
101
+ `cua_run_code` 就是该 Agent 的 DSH 注册项以 MCP 工具的形式提供:每次 `tools/list` 都从工具注册表读取它的名称、描述和参数 schema,因此提供方的定义是唯一来源,`description` 按该定义必填,`timeoutMs` 限制单个程序。投影省略注册项中的沙箱提权字段 `sandbox_permissions` 与 `justification`,指定它们的调用在执行前被拒绝;其余参数经 `ctx.tools.execute()` 原样交给 DSH 工具执行,由它校验参数并回答未知名称,因此非法调用返回 DSH 的错误结果。程序作为 TypeScript REPL 语句在提供方保留的 Node 环境中对全局 `cua` 对象运行。结果携带程序传给 `inspect(...)` 的内容:文本成为文本块,每张被 inspect 的截图成为内联图片,且图片正是程序观察到的那一版,因此文本中的像素坐标与图片一致;没有 inspect 任何值的程序返回一条完成提示。执行规则在工具描述里。程序在工作区中启动,同一连接的程序按到达顺序逐个运行;取消调用会取消其程序。失败的调用返回 DSH 的失败信息并设置 `isError`,不带 DSH 的 `Error:` 前缀。
102
102
 
103
103
  `cua_reset` 只丢弃程序环境。程序进程结束,因此其中的变量、导入以及应用和窗口对象都不复存在;仍在运行的 `cua_run_code` 程序被取消,reset 在该程序返回之后才返回。连接的 Agent 连同其本机连接和授权决定都保留:本会话已放行的应用不会再次询问,已拒绝的应用保持拒绝,已保存的授权和 helper 的系统权限不受影响。下一个程序在新进程中启动,拥有新的 `cua` 对象,并通过 `cua.getApp` 重新选择应用;reset 期间到达的程序在它之后运行。进程清理失败的 reset 返回错误,此后程序会失败,直到后续的 `cua_reset` 成功。在环境不可用之后,或不希望保留的状态带入下一个任务时使用它。
104
104
 
@@ -126,9 +126,9 @@ patch 还以 `screenshotTarget: { longEdge: 2048, maxBytes: 2097152 }` 挂载该
126
126
  <details>
127
127
  <summary>实现细节 — 点击展开</summary>
128
128
 
129
- [patch](cordis.patch.yml) 在空根上组成整个 profile:带 JSONL 持久化与投影的会话、附件、保存应用授权的存储、程序进程所依赖的子进程、沙箱、审批与文件系统 seam、带原生执行器的工具、系统提示、用户提问、不挂适配器的 llm hub、带 agent-loop 工厂的 Agent 注册表、带空默认 preset 的 preset 注册表、`computer-use` 注册表、每种 Host 一行的原生提供方(Darwin 上是 macOS,原生 Windows 上是 Windows),以及本前端。只列出本组合包的 profile manifest 选中这套组合;启动器不经模板直接从安装中加载它。前端用 `parseCmdline` 解析调用,把 stdin EOF 绑定到启动器的有界关闭,并在启动器提交就绪后创建工作区、把官方 MCP 服务器连接到 stdio 传输。`cua-mcp` 不是启动必需条目:行无法激活时启动器在 stderr 上报告,而不是停止 profile。
129
+ [patch](cordis.patch.yml) 在空根上组成整个 profile:带 JSONL 持久化与投影的会话、附件、保存应用授权的存储、程序进程所依赖的子进程、沙箱、审批与文件系统 seam、带原生根注册表的工具、系统提示、用户提问、不挂适配器的 llm hub、带 agent-loop 工厂的 Agent 注册表、带空默认 preset 的 preset 注册表、`computer-use` 注册表、每种 Host 一行的原生提供方(Darwin 上是 macOS,原生 Windows 上是 Windows),以及本前端。只列出本组合包的 profile manifest 选中这套组合;启动器不经模板直接从安装中加载它。前端用 `parseCmdline` 解析调用,把 stdin EOF 绑定到启动器的有界关闭,并在启动器提交就绪后创建工作区、把官方 MCP 服务器连接到 stdio 传输。`cua-mcp` 不是启动必需条目:行无法激活时启动器在 stderr 上报告,而不是停止 profile。
130
130
 
131
- [`server.ts`](src/server.ts) 通过协议服务器的低层 `tools/list` 与 `tools/call` handler 提供三个工具:列表把该 Agent 的 `cua_run_code` 注册项按协议的工具类型校验后投影出来,排在该文件定义的两个工具之间。连接的 Agent 挂载注册表的默认 preset,并把工作区记录为自己的工作目录,沙箱策略据此解析其程序的 `workspace-write` 根。`cua_get_api_reference` 通过 `ctx.systemPrompt.assemble` 读取提供方为该 Agent 注册的提示段,不保存任何状态。`cua_run_code` 调用在 `ctx.agents.withInitiator` 内带着 Agent 和请求 signal、不经模型步骤地通过 `ctx.tools.execute` 运行,因此 Session 日志只有嵌套的 `tool/ptc-dispatch` 事件而没有根 `tool/call`;[`projection.ts`](src/projection.ts) 渲染结果及其延后的截图上下文,并通过 `ctx.cuaPrograms.screenshotRequestTarget` 读取每张图片。`cua_reset` 用 `agent.cancel` 取消该 Agent 正在运行的程序,调用 `ctx.cuaPrograms.release`,由提供方的程序运行时释放该 state owner 的环境,并在 Agent 空闲后返回;同一时刻只进行一次释放,程序调用会等待它,因为前一个进程尚在退出时运行时会拒绝程序。[`consent.ts`](src/consent.ts) 是该 Agent 的 `user-questions/request` 应答者。`cua_run_code` 调用作为该 Agent 的维护活动运行,因此 Agent 在调用进行中被销毁时会取消该调用,等它及其嵌套调用结算之后才释放本机连接并关闭 Session。
131
+ [`server.ts`](src/server.ts) 通过协议服务器的低层 `tools/list` 与 `tools/call` handler 提供三个工具:列表把该 Agent 的 `cua_run_code` 注册项按协议的工具类型校验后投影出来,排在该文件定义的两个工具之间。服务器在创建连接的 Agent 前解析默认 preset,记录并挂载同一个 ID,再把工作区记录为 Agent 的工作目录,沙箱策略据此解析其程序的 `workspace-write` 根。`cua_get_api_reference` 通过 `ctx.systemPrompt.assemble` 读取提供方为该 Agent 注册的提示段,不保存任何状态。`cua_run_code` 调用在 `ctx.agents.withInitiator` 内带着 Agent 和请求 signal、不经模型步骤地通过 `ctx.tools.execute` 运行,因此 Session 日志只有嵌套的 `tool/ptc-dispatch` 事件而没有根 `tool/call`;[`projection.ts`](src/projection.ts) 渲染结果及其延后的截图上下文,并通过 `ctx.cuaPrograms.screenshotRequestTarget` 读取每张图片。`cua_reset` 用 `agent.cancel` 取消该 Agent 正在运行的程序,调用 `ctx.cuaPrograms.release`,由提供方的程序运行时释放该 state owner 的环境,并在 Agent 空闲后返回;同一时刻只进行一次释放,程序调用会等待它,因为前一个进程尚在退出时运行时会拒绝程序。[`consent.ts`](src/consent.ts) 是该 Agent 的 `user-questions/request` 应答者。`cua_run_code` 调用作为该 Agent 的维护活动运行,因此 Agent 在调用进行中被销毁时会取消该调用,等它及其嵌套调用结算之后才释放本机连接并关闭 Session。
132
132
 
133
133
  </details>
134
134
 
@@ -169,7 +169,6 @@ patch 还以 `screenshotTarget: { longEdge: 2048, maxBytes: 2097152 }` 挂载该
169
169
 
170
170
  - 成功结束的程序跨调用保持键盘键和鼠标按钮,并通过 system reminder 报告。程序失败、执行中的 cua_run_code 请求收到取消、重置和断连会释放所属输入。如果一次调用发送 down 后返回,客户端随后在模型思考期间暂停,服务端收不到取消:该输入可能持续按住,直到显式 up 或后续清理。
171
171
  - macOS 与原生 Windows Host 有提供方。其他 Host(包括 WSL)列出 `cua_get_api_reference` 与 `cua_reset`,二者都指出缺少提供方;调用 `cua_run_code` 以 `unknown tool` 失败。
172
- - 在 Windows 上,[提供方的限制](../cua-windows/README.zh.md#known-limitations-and-deferred-work)经 MCP 同样适用:它不启动应用,不提供 `Always allow` 授权,npm 安装需要配置 `helperPath`。
173
172
  - Elicitation 使用 2025 版 MCP 请求模型;协商到 2026-07-28 修订版的客户端在授权请求时收到错误,应改用 `DSH_CUA_CONSENT=allow`。
174
173
  - 不暴露程序沙箱提权和原始 `cua` 工具;`DSH_PERMISSION_MODE` 选择程序进程启动时的文件沙箱,工作区是它的 `workspace-write` 根。
175
174
  - `cua` API 参考只有在模型调用 `cua_get_api_reference` 时才到达模型。服务器观察不到既有连接上的新对话,也观察不到上下文压缩,因此由服务器说明和工具描述提出这一要求;不放行该工具的客户端,其模型只有执行规则可用。
package/cordis.patch.yml CHANGED
@@ -71,8 +71,8 @@
71
71
  - id: tools
72
72
  name: '@deepseek-ai/dsh-tools'
73
73
 
74
- - id: tool-executor-native
75
- name: '@deepseek-ai/dsh-tool-executor-native'
74
+ - id: tool-registry-native
75
+ name: '@deepseek-ai/dsh-tool-registry-native'
76
76
 
77
77
  - id: system-prompt
78
78
  name: '@deepseek-ai/dsh-system-prompt'
package/lib/index.js CHANGED
@@ -237,15 +237,15 @@ function projectProgramTool(definition) {
237
237
  * Create the MCP server for one stdio connection. The connection's Agent is created first, mounts the profile's
238
238
  * default preset, and lives until disposal; the provider registers `cua_run_code` for it, and each `tools/list`
239
239
  * re-reads that registration beside the two tools defined here. A call names a listed tool or fails as an unknown
240
- * tool before it reaches the executor, so a tool another row registers for the Agent is never callable without
240
+ * tool before it reaches the root registry, so a tool another row registers for the Agent is never callable without
241
241
  * being listed. `cua_get_api_reference` returns the provider's `cua` guidance for the Agent and keeps no state.
242
- * `cua_run_code` calls pass their arguments to the ordinary tool executor unchanged, one at a time in arrival
242
+ * `cua_run_code` calls pass their arguments to the Agent's root registry unchanged, one at a time in arrival
243
243
  * order, each as the Agent's maintenance activity: argument validation is answered by DSH, and disposing the Agent
244
244
  * cancels the running call and waits for it to settle. `cua_reset` bypasses the queue: it cancels the running program,
245
245
  * releases the Agent's program environment through `ctx.cuaPrograms`, answers after the cancelled program has settled,
246
246
  * and holds back programs that arrive meanwhile; the Agent, its native connection, and its application grants stay,
247
247
  * and the next program starts a fresh process. Concurrent resets share one release.
248
- * Consent questions of that Agent are answered by the configured mode. A call the executor cannot settle,
248
+ * Consent questions of that Agent are answered by the configured mode. A call the root registry cannot settle,
249
249
  * including a cancelled one, fails as a protocol error.
250
250
  * @param ctx - Profile context with Agents, presets, tools, the system prompt, and the attachment store.
251
251
  * @param options - Consent mode, working directory, and lifetime.
@@ -254,14 +254,15 @@ function projectProgramTool(definition) {
254
254
  */
255
255
  async function createCuaMcpServer(ctx, options) {
256
256
  const manifest = createRequire(import.meta.url)("../package.json");
257
+ const { id: agentPreset } = await ctx.agentPresets.resolve();
257
258
  const handle = await ctx.agents.create({
258
259
  sessionId: brandString(`cua-mcp-${randomUUID()}`),
259
260
  meta: {
260
261
  cwd: options.cwd,
261
- agentPreset: ctx.agentPresets.defaultId
262
+ agentPreset
262
263
  },
263
264
  setup: async (agentCtx) => {
264
- await ctx.agentPresets.mount(agentCtx);
265
+ await ctx.agentPresets.mount(agentCtx, agentPreset);
265
266
  }
266
267
  });
267
268
  const { agent } = handle;
@@ -328,7 +329,7 @@ async function createCuaMcpServer(ctx, options) {
328
329
  signal: operation
329
330
  }));
330
331
  const outcome = batch.results[0];
331
- if (outcome === void 0) throw new Error(`The tool executor settled without a ${PROGRAM_TOOL} result`);
332
+ if (outcome === void 0) throw new Error(`The root tool registry settled without a ${PROGRAM_TOOL} result`);
332
333
  const result = await projectToolResult(outcome.result, batch.additionalContexts, {
333
334
  attachments: ctx.attachments,
334
335
  target: (image) => programs?.screenshotRequestTarget(image)
@@ -29,15 +29,15 @@ export interface CuaMcpServer {
29
29
  * Create the MCP server for one stdio connection. The connection's Agent is created first, mounts the profile's
30
30
  * default preset, and lives until disposal; the provider registers `cua_run_code` for it, and each `tools/list`
31
31
  * re-reads that registration beside the two tools defined here. A call names a listed tool or fails as an unknown
32
- * tool before it reaches the executor, so a tool another row registers for the Agent is never callable without
32
+ * tool before it reaches the root registry, so a tool another row registers for the Agent is never callable without
33
33
  * being listed. `cua_get_api_reference` returns the provider's `cua` guidance for the Agent and keeps no state.
34
- * `cua_run_code` calls pass their arguments to the ordinary tool executor unchanged, one at a time in arrival
34
+ * `cua_run_code` calls pass their arguments to the Agent's root registry unchanged, one at a time in arrival
35
35
  * order, each as the Agent's maintenance activity: argument validation is answered by DSH, and disposing the Agent
36
36
  * cancels the running call and waits for it to settle. `cua_reset` bypasses the queue: it cancels the running program,
37
37
  * releases the Agent's program environment through `ctx.cuaPrograms`, answers after the cancelled program has settled,
38
38
  * and holds back programs that arrive meanwhile; the Agent, its native connection, and its application grants stay,
39
39
  * and the next program starts a fresh process. Concurrent resets share one release.
40
- * Consent questions of that Agent are answered by the configured mode. A call the executor cannot settle,
40
+ * Consent questions of that Agent are answered by the configured mode. A call the root registry cannot settle,
41
41
  * including a cancelled one, fails as a protocol error.
42
42
  * @param ctx - Profile context with Agents, presets, tools, the system prompt, and the attachment store.
43
43
  * @param options - Consent mode, working directory, and lifetime.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAUnD,OAAO,EAAE,MAAM,EAAmD,MAAM,8BAA8B,CAAA;AACtG,OAAO,EAAyB,KAAK,WAAW,EAA0B,MAAM,cAAc,CAAA;AAG9F,sCAAsC;AACtC,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAA;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B;AAED,qFAAqF;AACrF,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IAEnE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,uGAAuG;IACvG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB;;;;;OAKG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AA4FD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgJ1G"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAUnD,OAAO,EAAE,MAAM,EAAmD,MAAM,8BAA8B,CAAA;AACtG,OAAO,EAAyB,KAAK,WAAW,EAA0B,M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C,CAAA;IAC/F,CAAC,CAAC,CAAA;IAEF,OAAO;QACL,MAAM;QACN,KAAK;QACL,KAAK,CAAC,OAAO;YACX,kBAAkB,EAAE,CAAA;YACpB,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;YACtB,CAAC;oBAAS,CAAC;gBACT,MAAM,SAAS,CAAA;gBACf,MAAM,KAAK,CAAA;gBACX,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;YACxB,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
- "title": "Computer Use MCP 服务器",
4
- "description": "通过 cua-mcp profile 向 Codex、Claude Code 等 MCP 客户端提供 Computer Use:cua_run_code 对桌面应用运行持久程序,cua_reset 清空程序环境。"
3
+ "title": "自动电脑操作 MCP 服务器",
4
+ "description": "通过 cua-mcp profile 向 Codex、Claude Code 等 MCP 客户端提供自动电脑操作能力:cua_run_code 对桌面应用运行持久程序,cua_reset 清空程序环境。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-cua-mcp",
3
3
  "description": "Computer Use as an MCP stdio server: a dsh profile bundle that exposes cua_run_code to external agent harnesses",
4
- "version": "0.2.3-alpha.2",
4
+ "version": "0.2.3-alpha.3",
5
5
  "icon": "./icon.svg",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,53 +41,53 @@
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
44
- "@deepseek-ai/cordis": "~4.2.0-alpha.1",
45
- "@deepseek-ai/dsh-attachment": "0.2.3-alpha.2",
46
- "@deepseek-ai/dsh-app-boot": "0.2.3-alpha.2"
44
+ "@deepseek-ai/cordis": "~4.2.0-alpha.2",
45
+ "@deepseek-ai/dsh-attachment": "0.2.3-alpha.3",
46
+ "@deepseek-ai/dsh-app-boot": "0.2.3-alpha.3"
47
47
  },
48
48
  "dependencies": {
49
- "@deepseek-ai/dsh-agent": "0.2.3-alpha.2",
50
- "@deepseek-ai/dsh-agent-loop": "0.2.3-alpha.2",
51
- "@deepseek-ai/dsh-agent-preset": "0.2.3-alpha.2",
52
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.2",
53
- "@deepseek-ai/dsh-attachment-local": "0.2.3-alpha.2",
54
- "@deepseek-ai/dsh-brand": "0.2.3-alpha.2",
55
- "@deepseek-ai/dsh-cmdline": "0.2.3-alpha.2",
56
- "@deepseek-ai/dsh-computer-use": "0.2.3-alpha.2",
57
- "@deepseek-ai/dsh-cua": "0.2.3-alpha.2",
58
- "@deepseek-ai/dsh-fs-sandbox": "0.2.3-alpha.2",
59
- "@deepseek-ai/dsh-llm": "0.2.3-alpha.2",
60
- "@deepseek-ai/dsh-sandbox-local": "0.2.3-alpha.2",
61
- "@deepseek-ai/dsh-sandbox-policy": "0.2.3-alpha.2",
62
- "@deepseek-ai/dsh-session": "0.2.3-alpha.2",
63
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.2",
64
- "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.2",
65
- "@deepseek-ai/dsh-storage": "0.2.3-alpha.2",
66
- "@deepseek-ai/dsh-storage-domain": "0.2.3-alpha.2",
67
- "@deepseek-ai/dsh-storage-json": "0.2.3-alpha.2",
68
- "@deepseek-ai/dsh-subprocess-local": "0.2.3-alpha.2",
69
- "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.2",
70
- "@deepseek-ai/dsh-tool-executor-native": "0.2.3-alpha.2",
71
- "@deepseek-ai/dsh-tools": "0.2.3-alpha.2",
72
- "@deepseek-ai/dsh-user-approval": "0.2.3-alpha.2",
73
- "@deepseek-ai/dsh-user-questions": "0.2.3-alpha.2",
74
- "@deepseek-ai/dsh-working-directory": "0.2.3-alpha.2",
75
- "@deepseek-ai/schemastery": "~3.20.0-alpha.1",
49
+ "@deepseek-ai/dsh-agent": "0.2.3-alpha.3",
50
+ "@deepseek-ai/dsh-agent-loop": "0.2.3-alpha.3",
51
+ "@deepseek-ai/dsh-agent-preset": "0.2.3-alpha.3",
52
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.3",
53
+ "@deepseek-ai/dsh-attachment-local": "0.2.3-alpha.3",
54
+ "@deepseek-ai/dsh-brand": "0.2.3-alpha.3",
55
+ "@deepseek-ai/dsh-cmdline": "0.2.3-alpha.3",
56
+ "@deepseek-ai/dsh-computer-use": "0.2.3-alpha.3",
57
+ "@deepseek-ai/dsh-cua": "0.2.3-alpha.3",
58
+ "@deepseek-ai/dsh-fs-sandbox": "0.2.3-alpha.3",
59
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.3",
60
+ "@deepseek-ai/dsh-sandbox-local": "0.2.3-alpha.3",
61
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.3-alpha.3",
62
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.3",
63
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.3",
64
+ "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.3",
65
+ "@deepseek-ai/dsh-storage": "0.2.3-alpha.3",
66
+ "@deepseek-ai/dsh-storage-domain": "0.2.3-alpha.3",
67
+ "@deepseek-ai/dsh-storage-json": "0.2.3-alpha.3",
68
+ "@deepseek-ai/dsh-subprocess-local": "0.2.3-alpha.3",
69
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.3",
70
+ "@deepseek-ai/dsh-tool-registry-native": "0.2.3-alpha.3",
71
+ "@deepseek-ai/dsh-tools": "0.2.3-alpha.3",
72
+ "@deepseek-ai/dsh-user-approval": "0.2.3-alpha.3",
73
+ "@deepseek-ai/dsh-user-questions": "0.2.3-alpha.3",
74
+ "@deepseek-ai/dsh-working-directory": "0.2.3-alpha.3",
75
+ "@deepseek-ai/schemastery": "~3.20.0-alpha.2",
76
76
  "@modelcontextprotocol/server": "2.2.0",
77
77
  "commander": "^15.0.0"
78
78
  },
79
79
  "optionalDependencies": {
80
- "@deepseek-ai/dsh-cua-macos": "0.2.3-alpha.2",
81
- "@deepseek-ai/dsh-cua-windows": "0.2.3-alpha.2"
80
+ "@deepseek-ai/dsh-cua-macos": "0.2.3-alpha.3",
81
+ "@deepseek-ai/dsh-cua-windows": "0.2.3-alpha.3"
82
82
  },
83
83
  "devDependencies": {
84
- "@deepseek-ai/cordis": "~4.2.0-alpha.1",
85
- "@deepseek-ai/cordis-plugin-include": "~1.2.0-alpha.1",
86
- "@deepseek-ai/cordis-plugin-loader": "~1.2.0-alpha.1",
87
- "@deepseek-ai/dsh-app-boot": "0.2.3-alpha.2",
88
- "@deepseek-ai/dsh-attachment": "0.2.3-alpha.2",
89
- "@deepseek-ai/dsh-fs-local": "0.2.3-alpha.2",
90
- "@deepseek-ai/dsh-ptc-runtime-node": "0.2.3-alpha.2",
84
+ "@deepseek-ai/cordis": "~4.2.0-alpha.2",
85
+ "@deepseek-ai/cordis-plugin-include": "~1.2.0-alpha.2",
86
+ "@deepseek-ai/cordis-plugin-loader": "~1.2.0-alpha.2",
87
+ "@deepseek-ai/dsh-app-boot": "0.2.3-alpha.3",
88
+ "@deepseek-ai/dsh-attachment": "0.2.3-alpha.3",
89
+ "@deepseek-ai/dsh-fs-local": "0.2.3-alpha.3",
90
+ "@deepseek-ai/dsh-ptc-runtime-node": "0.2.3-alpha.3",
91
91
  "@modelcontextprotocol/client": "2.2.0"
92
92
  }
93
93
  }
package/src/server.ts CHANGED
@@ -136,15 +136,15 @@ function projectProgramTool(definition: ToolDefinition): Tool {
136
136
  * Create the MCP server for one stdio connection. The connection's Agent is created first, mounts the profile's
137
137
  * default preset, and lives until disposal; the provider registers `cua_run_code` for it, and each `tools/list`
138
138
  * re-reads that registration beside the two tools defined here. A call names a listed tool or fails as an unknown
139
- * tool before it reaches the executor, so a tool another row registers for the Agent is never callable without
139
+ * tool before it reaches the root registry, so a tool another row registers for the Agent is never callable without
140
140
  * being listed. `cua_get_api_reference` returns the provider's `cua` guidance for the Agent and keeps no state.
141
- * `cua_run_code` calls pass their arguments to the ordinary tool executor unchanged, one at a time in arrival
141
+ * `cua_run_code` calls pass their arguments to the Agent's root registry unchanged, one at a time in arrival
142
142
  * order, each as the Agent's maintenance activity: argument validation is answered by DSH, and disposing the Agent
143
143
  * cancels the running call and waits for it to settle. `cua_reset` bypasses the queue: it cancels the running program,
144
144
  * releases the Agent's program environment through `ctx.cuaPrograms`, answers after the cancelled program has settled,
145
145
  * and holds back programs that arrive meanwhile; the Agent, its native connection, and its application grants stay,
146
146
  * and the next program starts a fresh process. Concurrent resets share one release.
147
- * Consent questions of that Agent are answered by the configured mode. A call the executor cannot settle,
147
+ * Consent questions of that Agent are answered by the configured mode. A call the root registry cannot settle,
148
148
  * including a cancelled one, fails as a protocol error.
149
149
  * @param ctx - Profile context with Agents, presets, tools, the system prompt, and the attachment store.
150
150
  * @param options - Consent mode, working directory, and lifetime.
@@ -153,10 +153,11 @@ function projectProgramTool(definition: ToolDefinition): Tool {
153
153
  */
154
154
  export async function createCuaMcpServer(ctx: Context, options: CuaMcpServerOptions): Promise<CuaMcpServer> {
155
155
  const manifest = createRequire(import.meta.url)('../package.json') as { version: string }
156
+ const { id: agentPreset } = await ctx.agentPresets.resolve()
156
157
  const handle = await ctx.agents.create({
157
158
  sessionId: brandString<SessionId>(`cua-mcp-${randomUUID()}`),
158
- meta: { cwd: options.cwd, agentPreset: ctx.agentPresets.defaultId },
159
- setup: async (agentCtx) => { await ctx.agentPresets.mount(agentCtx) },
159
+ meta: { cwd: options.cwd, agentPreset },
160
+ setup: async (agentCtx) => { await ctx.agentPresets.mount(agentCtx, agentPreset) },
160
161
  })
161
162
  const { agent } = handle
162
163
  // The listing is projected from the registry at each request; McpServer owns tools/list and tools/call once a tool
@@ -223,7 +224,7 @@ export async function createCuaMcpServer(ctx: Context, options: CuaMcpServerOpti
223
224
  agent, signal: operation,
224
225
  }))
225
226
  const outcome = batch.results[0]
226
- if (outcome === undefined) throw new Error(`The tool executor settled without a ${PROGRAM_TOOL} result`)
227
+ if (outcome === undefined) throw new Error(`The root tool registry settled without a ${PROGRAM_TOOL} result`)
227
228
  const result = await projectToolResult(outcome.result, batch.additionalContexts, {
228
229
  attachments: ctx.attachments, target: image => programs?.screenshotRequestTarget(image),
229
230
  }, operation)
@@ -276,7 +277,7 @@ export async function createCuaMcpServer(ctx: Context, options: CuaMcpServerOpti
276
277
  const { name, arguments: args = {} } = request.params
277
278
  if (name === REFERENCE_TOOL.name) return apiReference()
278
279
  if (name === RESET_TOOL.name) return resetEnvironment()
279
- // The same judgement as tools/list: only the listed registration reaches the executor.
280
+ // The same judgement as tools/list: only the listed registration reaches the root registry.
280
281
  if (name !== PROGRAM_TOOL || ctx.tools.get(PROGRAM_TOOL, agent) === undefined) return failure(`unknown tool ${JSON.stringify(name)}`)
281
282
  return serialize(() => runTool(args, AbortSignal.any([options.signal, extra.mcpReq.signal])))
282
283
  })