dsh-computer-use-ng 0.0.0-stage → 0.4.0
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/LICENSE +21 -0
- package/NOTICE +38 -0
- package/PERMISSIONS.md +43 -0
- package/README.md +703 -2
- package/VERIFICATION.md +171 -0
- package/assets/demo-verified.png +0 -0
- package/cordis.patch.yml +10 -0
- package/docs/store-evidence.md +53 -0
- package/index.js +361 -0
- package/lib/actions.js +315 -0
- package/lib/cua.js +128 -0
- package/lib/guard.js +102 -0
- package/lib/human.js +115 -0
- package/lib/observe.js +457 -0
- package/lib/snapshot.js +77 -0
- package/lib/vision.js +243 -0
- package/package.json +70 -4
- package/tools/make_theme.py +175 -0
- package/verify-runtime.mjs +244 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-computer-use contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# NOTICE
|
|
2
|
+
|
|
3
|
+
创建于 2026-10-17
|
|
4
|
+
|
|
5
|
+
`dsh-computer-use-ng` 是 `dsh-computer-use` 的社区维护分支。
|
|
6
|
+
|
|
7
|
+
- 原始项目:https://github.com/988hj7tczd-oss/dsh-computer-use
|
|
8
|
+
- 原作者:Wei Jerry 及原始项目贡献者
|
|
9
|
+
- 导入基线:`3cf9bd8ae60271512f263bfa75485cb242ca0892`
|
|
10
|
+
- 许可证:MIT,见 [LICENSE](LICENSE)
|
|
11
|
+
|
|
12
|
+
本仓库从新的 Git 历史开始,不包含原始仓库的提交历史或内部项目文档。
|
|
13
|
+
|
|
14
|
+
本项目与原作者、DeepSeek 官方均无隶属关系。原始项目的版权声明与 MIT 许可以下条款继续适用:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
MIT License
|
|
18
|
+
|
|
19
|
+
Copyright (c) 2026 dsh-computer-use contributors
|
|
20
|
+
|
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
in the Software without restriction, including without limitation the rights
|
|
24
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
furnished to do so, subject to the following conditions:
|
|
27
|
+
|
|
28
|
+
The above copyright notice and this permission notice shall be included in all
|
|
29
|
+
copies or substantial portions of the Software.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
37
|
+
SOFTWARE.
|
|
38
|
+
```
|
package/PERMISSIONS.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# PERMISSIONS — dsh-computer-use-ng
|
|
2
|
+
|
|
3
|
+
本文件声明 `dsh-computer-use-ng` 插件在运行时实际使用的权限面(DSH STORE 审查依据)。
|
|
4
|
+
|
|
5
|
+
## 总览(运行时行为)
|
|
6
|
+
|
|
7
|
+
- 通过**宿主 `child_process.spawn` 以非 shell 固定 argv** 调用 `cua-driver` 原生驱动(跨平台:macOS / Windows / Linux),驱动本地桌面:
|
|
8
|
+
- 屏幕观测:`screen_observe` / `screen_zoom`(读取被观测应用的 Accessibility/AX 树与窗口快照)
|
|
9
|
+
- 虚拟鼠标键盘模拟:`computer_click` / `computer_double_click` / `computer_right_click` / `computer_type` / `computer_key` / `computer_scroll` / `computer_drag` / `computer_wait`
|
|
10
|
+
- 应用枚举与启动:`app_list` / `app_launch`
|
|
11
|
+
- `cua-driver` 可执行文件来源:环境变量 `CUA_DRIVER_BIN` 显式指定,或 `PATH` 查找;缺失时返回结构化错误(含自救指引),不静默。
|
|
12
|
+
- 内置安全护栏(所有工具统一走 `guard()` 包装):**危险词审批**(敏感目标操作先请求用户确认)、**密码框保护**(检测到密码输入目标时拒绝)、**过期状态拒绝**(观测快照过期后拒绝执行)、**作用域权限**(仅授权应用/窗口内操作)。
|
|
13
|
+
- 键盘/文本动作优先使用后台投递;仅当驱动明确拒绝后台投递并建议前台模式,且当前工具/平台支持该模式时,才通过宿主 `approval` 服务请求本次授权。未获 `allowed-once` 时不切换焦点、不重试。
|
|
14
|
+
|
|
15
|
+
## 明确不做
|
|
16
|
+
|
|
17
|
+
- ⚠️ 不读取业务用户文件 / 项目文件;仅在用户主动配置 GLM fallback 时读取 `ZHIPU_API_KEY` / `GLM_API_KEY` 或指定的 key 文件(`ZHIPU_KEY_FILE`、`~/.zhipu-key`、`~/.config/zhipu-key`),用于本次视觉请求,不写入、不输出 key
|
|
18
|
+
- ⚠️ 默认不发起网络请求;仅在 GLM fallback 被选中且已配置 key 时,通过 HTTPS 请求 Z.AI GLM 视觉 API
|
|
19
|
+
- ❌ 不访问 DSH/Hermes 凭据或任意业务凭据(`CUA_DRIVER_BIN` 只用于定位可执行文件;上述 GLM key 是可选的用户显式配置)
|
|
20
|
+
- ❌ 不在宿主写入任何文件
|
|
21
|
+
- ❌ 无 npm 生命周期脚本(install / postinstall 等一律没有;安装包内的 `install.sh` / `uninstall.sh` 是给用户手动执行的安装辅助脚本,非 npm lifecycle)
|
|
22
|
+
- ⚠️ 点击使用独立虚拟光标,不移动用户真实鼠标;但经用户逐次批准的前台键盘/文本重试可能将目标窗口置于前台。未获批准时不进行前台重试。
|
|
23
|
+
|
|
24
|
+
## 宿主依赖(仅两个,均为官方/DSH 生态)
|
|
25
|
+
|
|
26
|
+
这两个包只声明为 `peerDependencies`,由 DSH 宿主提供并解析;插件不会把它们作为独立 runtime 副本打包进 profile。开发测试所需版本仅放在 `devDependencies` 中。
|
|
27
|
+
|
|
28
|
+
| 宿主依赖 | 用途 |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `@deepseek-ai/dsh-tools` | 注册 dsh 原生工具(`ctx.tools.register(defineTool(...))`) |
|
|
31
|
+
| `@deepseek-ai/schemastery` | 工具参数 schema 定义 |
|
|
32
|
+
|
|
33
|
+
## 权限信号对照(STORE 五信号)
|
|
34
|
+
|
|
35
|
+
| 信号 | 状态 | 说明 |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| 文件权限 | ⚠️ 命中 | `spawn` 子进程(cua-driver)是核心能力,属真实插件必备,提交人工审查 |
|
|
38
|
+
| 命令权限 | ⚠️ 命中 | `spawn` 仅限固定 argv 调用 `cua-driver`,非 shell(`shell: false`),无 `exec` / `eval` |
|
|
39
|
+
| 网络权限 | ⚠️ 条件命中 | 仅配置并触发 GLM fallback 时向 Z.AI GLM 视觉 API 发 HTTPS 请求 |
|
|
40
|
+
| 凭据权限 | ⚠️ 条件命中 | 仅读取用户显式配置的 GLM key 来源;不读取 DSH/Hermes 凭据,不写入或输出 key |
|
|
41
|
+
| 生命周期脚本 | ✅ 无 | npm 元数据中无 install/postinstall/prepare |
|
|
42
|
+
|
|
43
|
+
完整安装/启动/卸载证据见 `docs/store-evidence.md`。
|