deepseek-computer-use 0.2.0 → 0.2.1

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,10 @@
1
1
  # 更新记录
2
2
 
3
+ ## 0.2.1 (2026-10-27)
4
+
5
+ - Refresh shared update controls for independent and Suite installations, with explicit whole-bundle scope.
6
+ - Keep automatic installation off by default and preserve independent installation behavior.
7
+
3
8
  ## 0.2.0 (2026-10-26)
4
9
 
5
10
  - Add this plugin’s own update controls and independent preferences. Automatic installation stays off until explicitly enabled.
@@ -191,6 +191,19 @@ function __stardustUpdatesDisplayRows(next, known) {
191
191
  for (const row of known.values()) if ((row.name === next.job.name || row.bundledBy === next.job.name) && !rows.some(item => item.name === row.name)) rows.push({ ...row, updating: true });
192
192
  return { ...next, rows };
193
193
  }
194
+ function __stardustUpdatesSuiteRows(next, participants) {
195
+ // The official manager lists top-level dependencies, not Suite's transitive
196
+ // components. Project active, build-identified clients for display only.
197
+ // Installation and preferences still use the real Suite row from the host.
198
+ const suite = next.rows.find(row => row.name === '@stardustlc/dsh-suite' && row.enabled);
199
+ if (!suite) return next;
200
+ const rows = [...next.rows], names = new Set(rows.map(row => row.name));
201
+ for (const item of participants) if (item.suiteComponent && item.packageVersion && item.label && !names.has(item.name)) {
202
+ names.add(item.name);
203
+ rows.push({ name: item.name, version: item.packageVersion, enabled: true, sourceKind: 'suite', loadError: false, label: item.label, labelEn: item.labelEn, bundledBy: suite.name });
204
+ }
205
+ return { ...next, rows };
206
+ }
194
207
  function __stardustUpdatesWrap(definition, participant) {
195
208
  return { ...definition, factory(require) {
196
209
  const original = definition.factory(require);
@@ -263,7 +276,7 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
263
276
  pool.listeners.add(guardChanged);
264
277
  const close = () => { void fetch(route, { method: 'POST', credentials: 'same-origin', keepalive: true, headers: { 'content-type': 'application/json', 'x-stardustlc-updates': '1' }, body: JSON.stringify({ action: 'client-close', id }) }).catch(() => {}); };
265
278
  window.addEventListener('pagehide', close);
266
- async function refresh() { const next = await api(); if (alive) { state = __stardustUpdatesDisplayRows(next, knownRows); notify(); } return next; }
279
+ async function refresh() { const next = await api(); if (alive) { state = __stardustUpdatesDisplayRows(__stardustUpdatesSuiteRows(next, shared.refs.values()), knownRows); notify(); } return next; }
267
280
  function useSnapshot() {
268
281
  const [, render] = useState(0);
269
282
  useEffect(() => { const fn = () => render(value => value + 1); listeners.add(fn); const stop = ctx.locale?.subscribe?.(fn); return () => { listeners.delete(fn); stop?.(); }; }, []);
@@ -317,11 +330,15 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
317
330
  }
318
331
  if (!snapshot || !row) return h(W.Status, null, t('此插件尚未安装或已从当前 profile 移除。', 'This plugin is not installed in the current profile.'));
319
332
  const title = language() === 'en' ? original.labelEn : original.label;
333
+ if (original.bundledBy) return h(W.Page, { title: title + t(' · 更新', ' · Updates'), subtitle: t('此组件随 Suite 安装。', 'This component is installed through Suite.'), className: 'plugin-updates-page' },
334
+ h('p', { className: 'updates-version' }, original.name + ' · ' + original.version),
335
+ h(W.Status, null, t('请更新 Suite 整包,组件版本会一起同步。不会单独再安装一份组件;自动安装默认关闭。', 'Update the whole Suite to synchronize component versions. No duplicate component will be installed. Automatic installation is off by default.')),
336
+ h(W.Button, { icon: 'refresh', onClick: () => { activeName = original.bundledBy; notify(); } }, t('查看 Suite 更新设置', 'Open Suite update settings')));
320
337
  if (compact) return h('div', { className: 'dshw', style: { padding: 16 } }, h('style', null, W.styles), h('div', { className: 'w-stack' }, h('h3', null, title), h('p', { className: 'w-muted' }, original.name + ' · ' + original.version), h('p', null, t('这个插件的更新设置与安装入口。自动安装默认关闭。', 'Update settings and installation for this plugin. Automatic installation is off by default.')), h(W.Button, { icon: 'refresh', onClick: () => { activeName = name; notify(); } }, row.available ? t('查看可用更新', 'Review available update') : t('检查与更新', 'Check and update'))));
321
338
  const unconfirmed = ['unknown', 'restore-failed'].includes(snapshot.job?.state), pageBusy = pageState(true).busy || (snapshot.pages.clients || []).some(client => client.id !== id && client.busy), installLocked = working || activeJob() || unconfirmed || snapshot.updaterRestart || snapshot.preferenceError || !snapshot.activity.known || snapshot.activity.busy || snapshot.pages.dirty || pageBusy || !snapshot.pages.known;
322
339
  const checkingThis = checking || snapshot.checkingNames?.includes(target);
323
340
  const status = row.sourceKind !== 'registry' ? t('本地 / 外部来源,保留原安装方式', 'Local / external source; keep original install method') : row.loadError ? t('加载异常,请先检查官方插件管理', 'Loading error; check native plugin management') : row.error ? t('检查失败,可以重试', 'Check failed; retry available') : row.release && !row.release.compatible ? t('新版本暂不兼容当前环境', 'Latest release is incompatible with this environment') : row.available ? (prefs.ignoredVersion === row.release.version ? t('已忽略提醒,仍可手动更新', 'Reminder ignored; manual update available') : t('有新版本', 'Update available')) : row.checkedAt ? t('当前已是最新稳定版', 'Latest stable version') : t('尚未检查', 'Not checked yet');
324
- return h(W.Page, { title: title + t(' · 更新', ' · Updates'), subtitle: t('只管理这个插件。检查不会安装,也不会重启 DSH。', 'Manage this plugin. Checking does not install anything or restart DSH.'), className: 'plugin-updates-page', actions: h(W.Button, { icon: 'refresh', disabled: checkingThis || row.sourceKind !== 'registry', onClick: check }, checkingThis ? t('正在检查…', 'Checking…') : t('检查更新', 'Check for updates')) },
341
+ return h(W.Page, { title: title + t(' · 更新', ' · Updates'), subtitle: target === '@stardustlc/dsh-suite' ? t('管理 Suite 整包及其 18 个组件。检查不会安装,也不会重启 DSH。', 'Manage the whole Suite and its 18 components. Checking does not install anything or restart DSH.') : t('只管理这个插件。检查不会安装,也不会重启 DSH。', 'Manage this plugin. Checking does not install anything or restart DSH.'), className: 'plugin-updates-page', actions: h(W.Button, { icon: 'refresh', disabled: checkingThis || row.sourceKind !== 'registry', onClick: check }, checkingThis ? t('正在检查…', 'Checking…') : t('检查更新', 'Check for updates')) },
325
342
  h('style', null, '.plugin-updates-page{min-height:0;padding:4px}.plugin-updates-page .updates-settings{display:grid;gap:24px;padding:20px 0}.plugin-updates-page .updates-note{margin-top:8px}.plugin-updates-page .updates-version{font:13px/1.7 ui-monospace,monospace;overflow-wrap:anywhere}.plugin-updates-page .w-overlay{z-index:1002}.plugin-updates-page .w-switch-label{max-width:100%}.plugin-updates-page .w-switch-track{flex-shrink:0}@media(max-width:700px){[data-shortcut-modal="settings"]:has(.plugin-updates-page){flex-direction:column!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}[data-shortcut-modal="settings"]:has(.plugin-updates-page)>nav{width:100%!important;flex-basis:auto!important;flex-shrink:0;max-height:180px;overflow:auto;border-right:0!important}[data-shortcut-modal="settings"]:has(.plugin-updates-page)>nav>div:has(>button){display:flex;flex-wrap:wrap;gap:4px}[data-shortcut-modal="settings"]:has(.plugin-updates-page)>div{min-width:0!important;width:100%!important}.plugin-updates-page .w-switch-label{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.plugin-updates-page .w-switch-label>span:first-child{min-width:0}.plugin-updates-page .w-switch-label>input{inset-inline-end:0}}'),
326
343
  original.bundledBy && h(W.Status, null, t('此插件随 Suite 安装。以下设置与安装作用于 Suite 整包,以保持组件版本一致。单独安装的插件可以独立更新。', 'This plugin was installed through Suite. These controls update Suite as a package so its components stay consistent. Independently installed plugins update individually.')),
327
344
  h('section', { className: 'w-section' }, h('p', { className: 'updates-version' }, target + ' · ' + row.version, row.release?.version && row.release.version !== row.version ? ' → ' + row.release.version : ''), h('p', { className: 'w-muted updates-note' }, status), !row.enabled && h('p', { className: 'w-muted' }, t('当前已停用,更新后仍保持停用。', 'Currently disabled; it will remain disabled after updating.')), row.checkedAt && h('p', { className: 'w-muted' }, t('上次检查:', 'Last checked: ') + new Date(row.checkedAt).toLocaleString(language() === 'en' ? 'en-US' : 'zh-CN')),
@@ -338,6 +355,7 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
338
355
  unconfirmed && h(W.Status, { tone: 'error' }, message('operation-unconfirmed')),
339
356
  job && h('section', { className: 'w-section', 'aria-label': t('这个插件的更新进度', 'Update progress for this plugin') }, h('h3', null, jobLabel(job)), h('p', { className: 'w-muted' }, job.from + ' → ' + job.to + (job.mode === 'automatic' ? t(' · 自动补丁更新', ' · Automatic patch') : '')), (job.reason || job.outcome?.result?.error?.code) && h(W.Status, { tone: 'error' }, message(job.reason || job.outcome.result.error.code)), activeJob() && h(W.Button, { disabled: job.state === 'cancelling', onClick: () => perform(() => api({ action: 'cancel', id: job.id })) }, t('取消更新', 'Cancel update')), h('p', { className: 'w-muted updates-note' }, t('安装开始后,取消由官方包管理器处理;已落盘的写入以实际结果或恢复状态为准。', 'After installation starts, the native package manager handles cancellation. Completed writes and recovery are reported as they occur.'))),
340
357
  dialog && h(W.Dialog, { title: dialog === 'windows' ? t('断开的窗口都已关闭?', 'Are the disconnected windows closed?') : dialog === 'automatic' ? t('允许这个插件自动安装补丁?', 'Allow automatic patches for this plugin?') : dialog === 'notes' ? t('更新记录', 'Release notes') : t('确认更新此插件', 'Confirm this plugin update'), closeLabel: t('关闭', 'Close'), onClose: () => setDialog(null) },
358
+ target === '@stardustlc/dsh-suite' && dialog !== 'notes' && h('p', null, t('此处操作的是 Suite 整包,包含 18 个组件。独立安装的其他插件不受影响。', 'This action applies to the whole Suite, including its 18 components. Other independently installed plugins are unaffected.')),
341
359
  dialog === 'windows' ? h('div', { className: 'w-stack' }, h('p', null, t('只清除超过 45 秒未回应的其他窗口记录。请先确认它们已经关闭;仍在使用的窗口请保存修改并刷新。当前或仍在回应的窗口保护会保留。', 'Only other windows silent for over 45 seconds are cleared. Confirm that they are closed; save and refresh windows still in use. Current and responsive windows remain protected.')), h('div', { className: 'w-toolbar' }, h(W.Button, { onClick: () => setDialog(null) }, t('取消', 'Cancel')), h(W.Button, { onClick: () => { setDialog(null); void perform(() => api({ ...pageState(true), action: 'reconfirm-windows', confirmation: 'other-stale-windows-are-closed' })); } }, t('已关闭,重新确认状态', 'They are closed; reconfirm')))) :
342
360
  dialog === 'automatic' ? h('div', { className: 'w-stack' }, h('p', null, (language() === 'en' ? row.labelEn : row.label) + ' · ' + target), h('p', null, t('你正在主动启用这个插件的自动安装。只处理兼容的稳定补丁;有任务、未保存修改、未知窗口或等待重启时暂停。', 'You are explicitly enabling automatic installation for this plugin. Only compatible stable patches qualify; running tasks, unsaved changes, unknown windows or a pending restart pause it.')), h('p', null, t('不会自动重启 DSH,其他插件不会跟着开启。可随时关闭。', 'DSH will not restart automatically, and other plugins will not be enabled for automatic updates. Turn it off anytime.')), h('div', { className: 'w-toolbar' }, h(W.Button, { onClick: () => setDialog(null) }, t('保持关闭', 'Keep off')), h(W.Button, { variant: 'primary', onClick: () => { setDialog(null); void perform(() => save({ checkEnabled: true, autoInstall: true }, 'enable-idle-patch-updates')); } }, t('允许此插件自动安装补丁', 'Allow patches for this plugin')))) :
343
361
  dialog === 'notes' ? h('div', { className: 'w-stack' }, h('p', null, target + ' · ' + row.release.version), loadingNotes ? h('p', null, t('正在读取…', 'Loading…')) : notes?.text ? h('pre', null, notes.text) : h('p', null, t('未找到此版本的独立更新记录。', 'No separate notes were found for this version.')), notes?.url && h('a', { href: notes.url, target: '_blank', rel: 'noreferrer noopener' }, t('查看仓库更新记录', 'View repository changelog'))) :
@@ -402,7 +420,7 @@ function __stardustUpdatesClient(ctx, React, require, shared) {
402
420
  }
403
421
 
404
422
  /* STARDUSTLC_UPDATE_CLIENT_BODY_START */
405
- window.__ModuleLoader__.load(__stardustUpdatesWrap({id:"deepseek-computer-use",factory:require=>({apply(){}})},{"name":"deepseek-computer-use","version":"0.1.0","hasWorkbench":false}));
423
+ window.__ModuleLoader__.load(__stardustUpdatesWrap({id:"deepseek-computer-use",factory:require=>({apply(){}})},{"name":"deepseek-computer-use","version":"0.1.0","hasWorkbench":false,"packageVersion":"0.2.1","label":"电脑操作","labelEn":"Computer Use","suiteComponent":false}));
406
424
 
407
425
  /* STARDUSTLC_UPDATE_CLIENT_BODY_END */
408
426
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepseek-computer-use",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "在 DSH 中查看和操作 Windows 桌面软件,支持窗口截图、鼠标键盘与控件操作。 欢迎提交 issues 和 PR。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -80,7 +80,7 @@
80
80
  "access": "public"
81
81
  },
82
82
  "dependencies": {
83
- "@stardustlc/dsh-updates": "0.1.0"
83
+ "@stardustlc/dsh-updates": "0.1.1"
84
84
  },
85
85
  "packageManager": "pnpm@11.7.0"
86
86
  }