dsh-plugin-computer-use 2.5.0 → 2.5.2

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.
Files changed (2) hide show
  1. package/README.md +45 -8
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  让模型**看见窗口和桌面并操作鼠标键盘**——v2 起整个后端换装 [Cua Driver](https://cua.ai) 的**进程内 SDK**(`@trycua/cua-driver`,Rust 原生运行时随 npm 包按平台分发,直接加载进 dsh 宿主进程):**无守护进程、无 MCP、无 PowerShell**,装上即用,跨 Windows / macOS / Linux。
4
4
 
5
+ > 兼容性:`engines.dsh` = `>=0.2.0-rc.2 <0.3.0-0`,已在 dsh 0.2.1-rc.3 上实测运行。
6
+
5
7
  ## v2.5:Ubuntu 26.04 / GNOME Wayland
6
8
 
7
9
  旧版没有开启驱动的原生 Wayland 开关,即使 `DISPLAY=:0` 存在,它也可能只是 XWayland,无法代表整个桌面。v2.5 在加载原生库前检测 `XDG_SESSION_TYPE` / `WAYLAND_DISPLAY`,自动设置 `CUA_DRIVER_RS_ENABLE_WAYLAND=1`;驱动依赖最低升到 npm 已发布的 0.28.3。环境中显式设置的 `0` / `false` 会保留,行配置 `wayland: on` / `off` 可覆盖。
@@ -11,13 +13,48 @@ GNOME/Mutter 还需要 **WinRects Shell 扩展**提供窗口几何、截图和
11
13
  **从 npm 安装/更新**(在 Ubuntu 的图形桌面终端运行,替换自己的 profile):
12
14
 
13
15
  ```sh
14
- dsh plugin --profile web add dsh-plugin-computer-use@2.5.0
15
- npx --yes --package=dsh-plugin-computer-use@2.5.0 dsh-computer-use-wayland install
16
+ dsh plugin --profile web add dsh-plugin-computer-use@2.5.2 --ignore-scripts
17
+ npx --yes --package=dsh-plugin-computer-use@2.5.2 dsh-computer-use-wayland install
16
18
  # 注销并重新登录一次后:
17
- npx --yes --package=dsh-plugin-computer-use@2.5.0 dsh-computer-use-wayland status
19
+ npx --yes --package=dsh-plugin-computer-use@2.5.2 dsh-computer-use-wayland status
18
20
  ```
19
21
 
20
- 如果已经使用 `tofu-box`,通过 `dsh plugin --profile web update tofu-box` 更新依赖,再执行上面的扩展安装/检查命令。伞包现有 `^2.4.1` 范围覆盖 2.5.0;无需另外添加单独的 computer-use 插件行。更新与安装扩展后重启 dsh。
22
+ > `--ignore-scripts` 见下方「安装报 `ERR_PNPM_IGNORED_BUILDS`」,本插件依赖树里没有别的包需要跑构建脚本。
23
+
24
+ 如果已经使用 `tofu-box`,通过 `dsh plugin --profile web update tofu-box` 更新依赖,再执行上面的扩展安装/检查命令。伞包现有 `^2.5.2` 范围覆盖 2.5.2;无需另外添加单独的 computer-use 插件行。更新与安装扩展后重启 dsh。
25
+
26
+ ### 安装报 `ERR_PNPM_IGNORED_BUILDS` 时
27
+
28
+ pnpm 10/11 默认不执行依赖的 postinstall 脚本,而本插件依赖的 `koffi` 带一个 `install` 脚本,
29
+ 于是首次安装可能直接中断:
30
+
31
+ ```
32
+ [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: koffi@3.3.3
33
+ Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.
34
+ ```
35
+
36
+ `koffi` 的原生二进制由**预编译包** `@koromix/koffi-<平台>` 提供(win32 / darwin / linux 的 x64、
37
+ arm64 等常见平台都有),不需要本地编译器,所以下面三种做法都能装好,任选其一:
38
+
39
+ ```sh
40
+ # 1) 最简单:这次安装跳过全部 postinstall,koffi 直接用预编译二进制(推荐)
41
+ dsh plugin --profile web add dsh-plugin-computer-use@2.5.2 --ignore-scripts
42
+
43
+ # 2) 只批准 koffi 这一个脚本:会执行 cnoke --prebuild,需要网络或本地编译环境
44
+ dsh plugin --profile web add dsh-plugin-computer-use@2.5.2 --allow-build=koffi
45
+ ```
46
+
47
+ ```yaml
48
+ # 3) 把这个决定写进该 profile 的 pnpm-workspace.yaml(持久,之后重跑原命令即可)
49
+ allowBuilds:
50
+ koffi: false # false = 不跑脚本,用预编译二进制;true = 允许执行构建脚本
51
+ ```
52
+
53
+ 桌面端插件管理页的安装框没有附加参数的入口;在那里遇到该错误时,按第 3 条改一次 profile 的
54
+ `pnpm-workspace.yaml`,再点安装。
55
+
56
+ `koffi` 只用于 **Windows 的 Per-Monitor-V2 DPI 感知**;即使它最终不可用,插件其余功能照常,
57
+ 只是高 DPI 屏上的截图与坐标可能按缩放前处理(插件的状态输出会标注 DPI 情况)。
21
58
 
22
59
  **从本仓库试用:在 Ubuntu 的图形桌面终端运行**(把路径和 profile 换成自己的):
23
60
 
@@ -36,13 +73,13 @@ dsh plugin --profile web add "link:$(pwd)/dsh-plugin-computer-use"
36
73
 
37
74
  重启 dsh,然后先试 `computer_windows` 和 `computer_screenshot`。第一次需要前台输入时,允许系统弹出的远程桌面/键鼠控制授权。此授权属于驱动运行时,重启后可能再次询问。插件安装不会自动授予它。
38
75
 
39
- **用本地 tgz 安装**:下载/复制 `dsh-plugin-computer-use-2.5.0.tgz` 到 Ubuntu 后运行:
76
+ **用本地 tgz 安装**:下载/复制 `dsh-plugin-computer-use-2.5.2.tgz` 到 Ubuntu 后运行:
40
77
 
41
78
  ```sh
42
- dsh plugin --profile web add ./dsh-plugin-computer-use-2.5.0.tgz
43
- npx --yes --package=./dsh-plugin-computer-use-2.5.0.tgz dsh-computer-use-wayland install
79
+ dsh plugin --profile web add ./dsh-plugin-computer-use-2.5.2.tgz --ignore-scripts
80
+ npx --yes --package=./dsh-plugin-computer-use-2.5.2.tgz dsh-computer-use-wayland install
44
81
  # 注销并重新登录后:
45
- npx --yes --package=./dsh-plugin-computer-use-2.5.0.tgz dsh-computer-use-wayland status
82
+ npx --yes --package=./dsh-plugin-computer-use-2.5.2.tgz dsh-computer-use-wayland status
46
83
  ```
47
84
 
48
85
  如果通过 `tofu-box` 安装,应更新伞包中的依赖;不要叠装单独的 computer-use 行。也可直接对该 profile 下已安装包的 `scripts/wayland.mjs` 运行 `install` / `status`。
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "dsh-plugin-computer-use",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
+ "engines": { "dsh": ">=0.2.0-rc.2 <0.3.0-0" },
4
5
  "license": "MIT",
5
6
  "keywords": ["dsh-plugin", "deepseek-harness", "dsh", "computer-use", "desktop", "automation", "screenshot", "input"],
6
7
  "publishConfig": { "registry": "https://registry.npmjs.org" },