deepseek-computer-use 0.2.2 → 0.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # 更新记录
2
2
 
3
+ ## 0.2.4 (2026-10-29)
4
+
5
+ - 同步仓库与 npm 的简明介绍、中英文 README 和反馈入口;本次为文档与包元数据更新。
6
+ - Sync npm descriptions and both README guides with the repository, including issue and pull-request links.
7
+ - Include the English guide in the npm package.
8
+
9
+ ## 0.2.3 (2026-10-27)
10
+
11
+ - 修复分批更新时的新旧更新控件混用:保留原页面、草稿与安装保护,空闲后接管旧控制器,兼容旧入口。
12
+
3
13
  ## 0.2.2 (2026-10-27)
4
14
 
5
15
  - 更新控件移至原有工作台或原生插件详情页底部;更新记录与选项原地展开,移除独立更新菜单与页面。
package/README.en.md ADDED
@@ -0,0 +1,37 @@
1
+ # deepseek-computer-use
2
+
3
+ [中文](README.md)
4
+
5
+ Let DeepSeek Harness operate Windows desktop apps: discover windows, inspect screenshots and UI controls, then use mouse and keyboard actions. Designed for GUI tasks without a suitable API, with per-session app consent, sensitive-action confirmation and audit records.
6
+
7
+ Community plugin, not an official DeepSeek product.
8
+
9
+ ## Install
10
+
11
+ Requires Windows 10/11, Node.js 22.19+ (22.x) or 24+, and DSH 0.2.1-rc.3 or newer. In Desktop, install the package below from the native Plugins panel. For Web:
12
+
13
+ ```bash
14
+ dsh plugin --profile web add deepseek-computer-use
15
+ ```
16
+
17
+ Restart the host after installation. This package operates the Windows computer running DSH; a remote browser does not move execution to the viewer's computer.
18
+
19
+ ## Use
20
+
21
+ Start a task that needs a desktop app. Observe the window and controls before acting, and grant access to the intended app for the session. The 16 tools cover window discovery, screenshots, mouse and keyboard, UI Automation controls and optional system audio recording.
22
+
23
+ The native helper uses Windows UI Automation, SendInput and Windows.Graphics.Capture. Cancellation or the end of a turn stops its helper; failed actions require a fresh observation before retrying. Approval-required operations refuse when the host cannot ask. This is not an operating-system sandbox for untrusted applications.
24
+
25
+ ## Updates
26
+
27
+ Version controls are at the bottom of native plugin details. Automatic checks are on; automatic installation is off by default. Installation, deferral and update preferences remain user choices. The plugin does not force a DSH restart.
28
+
29
+ ## Documentation and feedback
30
+
31
+ See the [Chinese guide](README.md) for the complete tool list, configuration, native payload requirements and platform limitations, and the [changelog](CHANGELOG.md) for releases.
32
+
33
+ Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/deepseek-computer-use/issues) or submit [pull requests](https://github.com/STARDUSTLC666/deepseek-computer-use/pulls). Include versions, expected and actual behavior, and redact private screenshots or credentials.
34
+
35
+ ## License
36
+
37
+ [MIT](LICENSE).
package/README.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # deepseek-computer-use
2
2
 
3
+ [English](README.en.md)
4
+
3
5
  ![deepseek-computer-use 大肥鱼桌面控制封面](https://raw.githubusercontent.com/STARDUSTLC666/deepseek-computer-use/main/assets/cover-whale-girl.png)
4
6
 
5
7
  [![npm](https://img.shields.io/npm/v/deepseek-computer-use.svg)](https://www.npmjs.com/package/deepseek-computer-use)
6
8
  [![Windows 10/11](https://img.shields.io/badge/platform-Windows%2010%2F11-0078D4.svg)](#安装)
7
- [![Node.js ≥18.17](https://img.shields.io/badge/node-%3E%3D18.17-339933.svg)](package.json)
9
+ [![Node.js 22.19+ / 24+](https://img.shields.io/badge/node-22.19%2B%20%2F%2024%2B-339933.svg)](package.json)
8
10
  [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
9
11
 
10
12
  > 社区插件,**非 DeepSeek 官方出品**。官方包在 `@deepseek-ai/*` scope 下。
11
13
 
12
- 让 **DeepSeek Harness 操作 Windows 桌面软件**:查看窗口截图、读取界面控件、
13
- 点击按钮、填写表单。适用于没有可用 API、需要直接操作图形界面的任务。
14
+ 让 DeepSeek Harness 操作 Windows 桌面软件:发现窗口、查看截图和界面控件,再执行鼠标键盘操作。适合没有可用 API 的图形界面任务;提供会话应用授权、敏感操作确认与审计。
14
15
 
15
16
  提供 16 个工具,覆盖窗口发现、截图观测、鼠标键盘、控件操作和可选的系统音频录制。
16
17
  支持会话独立授权、敏感操作审批与审计;取消或回合结束时停止原生助手,
@@ -308,7 +309,6 @@ node test/integration.mjs
308
309
 
309
310
  MIT。第三方商用前请自行做安全评审:这个插件能让模型操作你的桌面。
310
311
 
311
-
312
312
  ## 原生载荷(native/bin)
313
313
 
314
314
  | 文件 | 用途 | 大小 |
@@ -338,7 +338,6 @@ MIT。第三方商用前请自行做安全评审:这个插件能让模型操
338
338
 
339
339
  marker 文件按 **会话 + turn** 命名,避免旧会话的 Esc 标记误伤新会话。
340
340
 
341
-
342
341
  ## 配置示例
343
342
 
344
343
  ```yaml
@@ -176,7 +176,7 @@ function __stardustUpdatesGuard(React, name, { dirty = false, busy = false, reta
176
176
  function __StardustPluginUpdatesFooter({ React, name }) {
177
177
  const [, render] = React.useState(0), pool = __stardustUpdatesGuards();
178
178
  React.useEffect(() => { const fn = () => render(value => value + 1); pool.viewListeners.add(fn); return () => pool.viewListeners.delete(fn); }, []);
179
- const client = [...pool.clients].find(client => client.has(name));
179
+ const client = [...pool.clients].find(client => typeof client.Footer === 'function' && client.has(name));
180
180
  if (!client) return null;
181
181
  return React.createElement(client.Footer, { name });
182
182
  }
@@ -238,14 +238,22 @@ function __stardustUpdatesJoin(host, React, require, participant) {
238
238
  if (typeof root.plugin !== 'function') return;
239
239
  let record = pools.get(root);
240
240
  if (!record) {
241
- record = { refs: new Map(), timer: null, version: participant.version, alive: true, hold: false };
241
+ record = { refs: new Map(), timer: null, version: participant.version, alive: true, hold: false, uiRevision: 2 };
242
242
  pools.set(root, record);
243
+ __stardustUpdatesActivate(record, pools, root, React, require);
244
+ } else if (record.uiRevision !== 2 && !record.migration) {
245
+ // The first loaded participant may still own a pre-footer client. Keep
246
+ // its references and draft guards, wait for any admitted install, then
247
+ // replace that one client fiber instead of running two window heartbeats.
243
248
  const shared = record;
244
- record.fiber = root.plugin({ name: 'stardustlc-plugin-updates-client', inject: ['slots', 'locale', 'remote', 'remote.pluginManager'], apply(ctx) {
245
- const client = __stardustUpdatesClient(ctx, React, require, shared);
246
- ctx.effect(() => () => { shared.alive = false; client.dispose(); if (pools.get(root) === shared) pools.delete(root); });
247
- } });
248
- Promise.resolve(record.fiber).catch(() => { shared.alive = false; if (pools.get(root) === shared) pools.delete(root); });
249
+ record.migration = Promise.resolve().then(async () => {
250
+ while (shared.alive && shared.hold) await new Promise(resolve => setTimeout(resolve, 500));
251
+ if (!shared.alive || !shared.refs.size) return;
252
+ await shared.fiber?.dispose?.();
253
+ if (!shared.refs.size) return;
254
+ shared.alive = true; shared.uiRevision = 2; pools.set(root, shared);
255
+ __stardustUpdatesActivate(shared, pools, root, React, require);
256
+ }).catch(() => { /* The original page remains usable if host disposal fails. */ });
249
257
  }
250
258
  clearTimeout(record.timer);
251
259
  const ref = {}; record.refs.set(ref, participant);
@@ -259,10 +267,17 @@ function __stardustUpdatesJoin(host, React, require, participant) {
259
267
  if (!record.refs.size) record.timer = setTimeout(stop, 1000);
260
268
  });
261
269
  }
270
+ function __stardustUpdatesActivate(shared, pools, root, React, require) {
271
+ shared.fiber = root.plugin({ name: 'stardustlc-plugin-updates-client', inject: ['slots', 'locale', 'remote', 'remote.pluginManager'], apply(ctx) {
272
+ const client = __stardustUpdatesClient(ctx, React, require, shared);
273
+ ctx.effect(() => () => { shared.alive = false; client.dispose(); if (pools.get(root) === shared) pools.delete(root); });
274
+ } });
275
+ Promise.resolve(shared.fiber).catch(() => { shared.alive = false; if (pools.get(root) === shared) pools.delete(root); });
276
+ }
262
277
  function __stardustUpdatesClient(ctx, React, require, shared) {
263
278
  const h = React.createElement, W = createWorkbenchUI(React), route = new URL('api/stardustlc/plugin-updates', document.baseURI);
264
279
  const { useState, useEffect } = React, id = crypto.randomUUID(), listeners = new Set(), pool = __stardustUpdatesGuards(), requests = new Set(), notified = new Set(), knownRows = new Map();
265
- let alive = true, registered = false, state = null, lastInteraction = Date.now(), inPoll = false, manualOperation = false;
280
+ let alive = true, registered = false, state = null, lastInteraction = Date.now(), inPoll = false, manualOperation = false, legacyHint = null;
266
281
  const language = () => String(ctx.locale?.getSnapshot?.().active || '').startsWith('en') ? 'en' : 'zh';
267
282
  const t = (zh, en) => language() === 'en' ? en : zh;
268
283
  const preferences = name => state?.preferences.packages[name] || { checkEnabled: true, autoInstall: false, deferredUntil: 0, ignoredVersion: null };
@@ -387,11 +402,11 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
387
402
  function Reminder() {
388
403
  useSnapshot();
389
404
  const row = state?.rows.find(row => { const prefs = preferences(row.name); return row.available && !row.updating && !row.bundledBy && prefs.checkEnabled && prefs.deferredUntil <= Date.now() && prefs.ignoredVersion !== row.release.version && !notified.has(row.name + '@' + row.release.version); });
390
- if (!row) return null;
405
+ if (!row && !legacyHint) return null;
391
406
  let Toast; try { Toast = require('@deepseek-ai/dsh-client-ui-primitives').Toast; } catch { return null; }
392
407
  if (!Toast) return null;
393
- const key = row.name + '@' + row.release.version;
394
- return h(Toast, { key, text: (language() === 'en' ? row.labelEn : row.label) + t('有新版本,可在页面底部查看。', ' has an update. Review it at the bottom of its page.'), icon: h(W.Icon, { name: 'refresh', size: 18 }), holdMs: 7000, onDone: () => { notified.add(key); notify(); } });
408
+ const hint = legacyHint, key = hint ? 'legacy-' + hint : row.name + '@' + row.release.version;
409
+ return h(Toast, { key, text: hint ? hint + t(':请打开「插件」中的此插件详情页,在底部管理更新。', ': open its details in Plugins to manage updates at the bottom.') : (language() === 'en' ? row.labelEn : row.label) + t('有新版本,可在页面底部查看。', ' has an update. Review it at the bottom of its page.'), icon: h(W.Icon, { name: 'refresh', size: 18 }), holdMs: 7000, onDone: () => { if (hint) legacyHint = null; else notified.add(key); notify(); } });
395
410
  }
396
411
  function register() {
397
412
  if (!alive) return;
@@ -410,7 +425,7 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
410
425
  finally { inPoll = false; }
411
426
  }
412
427
  const timer = setInterval(() => { void poll(); }, 15000), first = setTimeout(() => { void poll(); }, 100);
413
- const client = { t, Footer: Panel, has: name => registered && !!originalRow(name), row: rowFor, dispose() {
428
+ const client = { t, Footer: Panel, Button: W.Button, open(name) { const footer = [...document.querySelectorAll('[data-plugin-update-footer]')].find(node => node.getAttribute('data-plugin-update-footer') === name); if (footer) footer.scrollIntoView({ block: 'end', behavior: 'smooth' }); else { legacyHint = name; notify(); } }, has: name => registered && !!originalRow(name), row: rowFor, dispose() {
414
429
  close(); alive = false; clearTimeout(first); clearInterval(timer); pool.clients.delete(client);
415
430
  pool.listeners.delete(guardChanged); listeners.clear();
416
431
  for (const event of ['pointerdown', 'keydown', 'input']) document.removeEventListener(event, interaction, true);
@@ -422,7 +437,7 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
422
437
  }
423
438
 
424
439
  /* STARDUSTLC_UPDATE_CLIENT_BODY_START */
425
- window.__ModuleLoader__.load(__stardustUpdatesWrap({id:"deepseek-computer-use",factory:require=>({apply(){}})},{"name":"deepseek-computer-use","version":"0.1.0","hasWorkbench":false,"packageVersion":"0.2.2","label":"电脑操作","labelEn":"Computer Use","suiteComponent":false}));
440
+ window.__ModuleLoader__.load(__stardustUpdatesWrap({id:"deepseek-computer-use",factory:require=>({apply(){}})},{"name":"deepseek-computer-use","version":"0.1.0","hasWorkbench":false,"packageVersion":"0.2.4","label":"电脑操作","labelEn":"Computer Use","suiteComponent":false}));
426
441
 
427
442
  /* STARDUSTLC_UPDATE_CLIENT_BODY_END */
428
443
  })();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "deepseek-computer-use",
3
- "version": "0.2.2",
4
- "description": "在 DSH 中查看和操作 Windows 桌面软件,支持窗口截图、鼠标键盘与控件操作。 欢迎提交 issues 和 PR。",
3
+ "version": "0.2.4",
4
+ "description": "DSH 社区 Windows 桌面插件:窗口截图、界面控件、鼠标键盘、会话授权与操作审计。欢迎提交 issues 和 PR。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -25,7 +25,8 @@
25
25
  "cordis.patch.yml",
26
26
  "README.md",
27
27
  "CHANGELOG.md",
28
- "LICENSE"
28
+ "LICENSE",
29
+ "README.en.md"
29
30
  ],
30
31
  "scripts": {
31
32
  "build": "node lib/build.mjs && node scripts/build-updates.mjs",
@@ -80,7 +81,7 @@
80
81
  "access": "public"
81
82
  },
82
83
  "dependencies": {
83
- "@stardustlc/dsh-updates": "0.1.2"
84
+ "@stardustlc/dsh-updates": "0.1.3"
84
85
  },
85
86
  "packageManager": "pnpm@11.7.0"
86
87
  }