dsh-mcviseron-plugin 0.7.2 → 0.7.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/CHANGELOG.md CHANGED
@@ -6,6 +6,20 @@
6
6
  - 设置行支持「立即测试」预览按钮。
7
7
  - Restart 组件支持 macOS/Linux(当前仅 Windows 桌面版)。
8
8
 
9
+ ## [0.7.3] - 2026-11-15
10
+
11
+ ### Compatibility
12
+
13
+ - **预适配 DSH `0.2.2-rc.3`(nightly next)**:开发依赖升级到 0.2.2-rc.3;peer 范围加入 `^0.2.2-rc.3`。当前桌面仍为 `0.2.2-rc.1`,rc.3 待升级后做真实运行时验证。
14
+
15
+ ### Fixed
16
+
17
+ - **自动化任务列表返回形状**:DSH 0.2.2 的 `ctx.schedule.list()` 返回 `{ items: [...] }`,而组件仍按数组调用 `.find`,导致 `automation_task_update` 报 `(intermediate value).find is not a function`。现在同时兼容数组和 `{ items }`,并补回归测试。
18
+
19
+ ### Tests
20
+
21
+ - 合计 **120 项测试**;typecheck、build 全绿。
22
+
9
23
  ## [0.7.2] - 2026-11-08
10
24
 
11
25
  ### Compatibility
package/README.en.md CHANGED
@@ -152,10 +152,11 @@ Defaults: appearance off / `08:00–23:00`; auto-review both guards on, 6 s, 400
152
152
 
153
153
  | DSH version | Status |
154
154
  | --- | --- |
155
- | `0.2.2-rc.1` | ✅ pre-adapted (0.2.2-rc.1 types/deps + 119 tests; desktop runtime pending) |
156
- | `0.2.1-rc.5` | ✅ compatible (rc.5 types/deps + 119 tests) |
157
- | `0.2.1-rc.3` | ✅ compatible (rc.3 types/deps + 119 tests) |
158
- | `0.2.1-rc.2` | ✅ current desktop runtime (119 tests + real Cordis contexts) |
155
+ | `0.2.2-rc.3` | ✅ pre-adapted (0.2.2-rc.3 types/deps + 120 tests; desktop runtime pending) |
156
+ | `0.2.2-rc.1` | ✅ compatible (0.2.2-rc.1 types/deps + 120 tests) |
157
+ | `0.2.1-rc.5` | ✅ compatible (rc.5 types/deps + 120 tests) |
158
+ | `0.2.1-rc.3` | ✅ compatible (rc.3 types/deps + 120 tests) |
159
+ | `0.2.1-rc.2` | ✅ current desktop runtime (120 tests + real Cordis contexts) |
159
160
  | `0.2.0-rc.x` | ✅ covered by the peer range |
160
161
  | `0.1.x` | ❌ unsupported (different settings-namespace model) |
161
162
 
package/README.md CHANGED
@@ -247,10 +247,11 @@ DSH 0.2 的官方设置 apiproxy 不向浏览器暴露第三方命名空间,
247
247
 
248
248
  | DSH 版本 | 状态 |
249
249
  | --- | --- |
250
- | `0.2.2-rc.1` | ✅ 预适配(0.2.2-rc.1 类型/依赖 + 119 项测试;桌面运行时待升级验证) |
251
- | `0.2.1-rc.5` | ✅ 兼容(rc.5 类型/依赖 + 119 项测试) |
252
- | `0.2.1-rc.3` | ✅ 兼容(rc.3 类型/依赖 + 119 项测试) |
253
- | `0.2.1-rc.2` | ✅ 当前桌面运行版本(119 项测试 + 真实 Cordis 上下文) |
250
+ | `0.2.2-rc.3` | ✅ 预适配(0.2.2-rc.3 类型/依赖 + 120 项测试;桌面运行时待升级验证) |
251
+ | `0.2.2-rc.1` | ✅ 兼容(0.2.2-rc.1 类型/依赖 + 120 项测试) |
252
+ | `0.2.1-rc.5` | ✅ 兼容(rc.5 类型/依赖 + 120 项测试) |
253
+ | `0.2.1-rc.3` | ✅ 兼容(rc.3 类型/依赖 + 120 项测试) |
254
+ | `0.2.1-rc.2` | ✅ 当前桌面运行版本(120 项测试 + 真实 Cordis 上下文) |
254
255
  | `0.2.0-rc.x` | ✅ peer 范围覆盖(同一套设置、审批与 hook 接缝) |
255
256
  | `0.1.x` | ❌ 不支持:0.1 的插件自行注册设置命名空间,与本插件的条目 id 命名空间模型不同 |
256
257
 
@@ -316,7 +317,7 @@ test/
316
317
 
317
318
  ```bash
318
319
  pnpm install
319
- pnpm check # typecheck + 119 项测试 + 构建
320
+ pnpm check # typecheck + 120 项测试 + 构建
320
321
  ```
321
322
 
322
323
  构建产物:`lib/index.js`(master ESM)、`lib/appearance.js`、`lib/auto-review-fix.js`、`lib/task-guard.js`、`lib/restart.js` 与 `lib/client.js`(浏览器模块)。`lib/` 不入库。
@@ -38,7 +38,7 @@
38
38
  3. 若发布了新版本:
39
39
  a. 执行 pnpm install,把 @deepseek-ai/dsh-client-connection、dsh-client-locale、dsh-client-ui-settings、dsh-client-ui-slots、dsh-client-ui-renderer、dsh-host-webserver、dsh-settings、@deepseek-ai/cordis 的开发依赖升级到与最新 DSH 相同版本,并更新 peerDependencies 范围。
40
40
  b. 对照最新包的类型声明与 lib 实现,按组件逐层修复不兼容处(先 Host 设置桥,再 autoReview、taskGuard,最后浏览器外观行)。
41
- c. 执行 pnpm check(tsc --noEmit + 119 项 node 测试 + esbuild 构建),补齐或修正测试;必要时更新 test/plugin.test.ts 的装配断言。
41
+ c. 执行 pnpm check(tsc --noEmit + 120 项 node 测试 + esbuild 构建),补齐或修正测试;必要时更新 test/plugin.test.ts 的装配断言。
42
42
  d. 更新 CHANGELOG.md(新版本段落记录兼容版本与修复)、README.md / README.en.md 的兼容性表;提交并推送到 main。
43
43
  4. 不要执行 npm publish;不要重启或关闭正在运行的 DSH;不要修改 D:\Program\DSH-Plugin-Class 下的其他插件仓库。
44
44
 
package/docs/release.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 当前状态(2026-10-23)
4
4
 
5
- - 包名 **`dsh-mcviseron-plugin` 当前发布 0.7.2**;v0.6.3 的 host bundle 导入缺陷由 v0.6.4 修复,v0.6.5 修复会话后动作工具注册与 turn/end 监听。
5
+ - 包名 **`dsh-mcviseron-plugin` 当前发布 0.7.3**;v0.6.3 的 host bundle 导入缺陷由 v0.6.4 修复,v0.6.5 修复会话后动作工具注册与 turn/end 监听。
6
6
  - npm 账号 `mcviseron` 已恢复正常,可执行首次手动发布。
7
7
  - 本机全局 registry 指向 npmmirror,发布时必须显式指定 `--registry=https://registry.npmjs.org/`。
8
8
  - 首次发布 **v0.6.1 已手动完成**;从 **v0.6.2** 起由 `.github/workflows/publish.yml` 通过 OIDC Trusted Publishing 发布,tag 推送即发布。
@@ -49,7 +49,7 @@
49
49
 
50
50
  ```powershell
51
51
  npm view dsh-mcviseron-plugin version dist-tags.latest --registry=https://registry.npmjs.org/
52
- curl.exe -sI https://registry.npmjs.org/dsh-mcviseron-plugin/-/dsh-mcviseron-plugin-0.7.2.tgz | Select-Object -First 1
52
+ curl.exe -sI https://registry.npmjs.org/dsh-mcviseron-plugin/-/dsh-mcviseron-plugin-0.7.3.tgz | Select-Object -First 1
53
53
  curl.exe -X PUT "https://registry.npmmirror.com/-/package/dsh-mcviseron-plugin/syncs"
54
54
  ```
55
55
 
package/lib/index.js CHANGED
@@ -11738,6 +11738,9 @@ function log(message) {
11738
11738
  } catch {
11739
11739
  }
11740
11740
  }
11741
+ function listRecords(result) {
11742
+ return Array.isArray(result) ? result : result.items;
11743
+ }
11741
11744
  function sessionIdOf(exec) {
11742
11745
  const id = exec.agent?.session?.id;
11743
11746
  return typeof id === "string" ? id : "";
@@ -11857,7 +11860,7 @@ function makeAutomationTaskTools(schedule) {
11857
11860
  const sessionId = sessionIdOf(exec);
11858
11861
  if (sessionId === "") return { ok: false, code: "no_session", error: "no current session" };
11859
11862
  try {
11860
- return { ok: true, tasks: await schedule.list({ sessionId }) };
11863
+ return { ok: true, tasks: listRecords(await schedule.list({ sessionId })) };
11861
11864
  } catch (error) {
11862
11865
  return serviceFailure(error);
11863
11866
  }
@@ -11897,7 +11900,7 @@ function makeAutomationTaskTools(schedule) {
11897
11900
  if (invalidInput !== void 0) return invalid(invalidInput);
11898
11901
  try {
11899
11902
  const id = String(args.id);
11900
- const expected = (await schedule.list({ sessionId })).find((record2) => record2.id === id);
11903
+ const expected = listRecords(await schedule.list({ sessionId })).find((record2) => record2.id === id);
11901
11904
  if (expected === void 0) return { ok: false, code: "schedule_not_found", error: "automation task not found in this session: " + id };
11902
11905
  const change = timingChange(args);
11903
11906
  const result = await schedule.update({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mcviseron-plugin",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "DeepSeek Harness (DSH) master plugin — one package hosting MCviseron's DSH components as separate bundle entries: a time-based light/dark Appearance schedule, an Auto-review fix (shutdown preset guard + Chinese approval-reason translation), and a todo plan guard that keeps multi-stage work advancing, one-shot after-session restart/close actions with task-aware waiting, and automatic auth-cookie hygiene for repeated desktop restarts, and model-editable official automation tasks.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -86,12 +86,12 @@
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@deepseek-ai/cordis": "^4.0.1",
89
- "@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
90
- "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
91
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
92
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
93
- "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
94
- "@deepseek-ai/dsh-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1",
89
+ "@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
90
+ "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
91
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
92
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
93
+ "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
94
+ "@deepseek-ai/dsh-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5 || ^0.2.2-rc.1 || ^0.2.2-rc.3",
95
95
  "react": "^18.2.0",
96
96
  "react-dom": "^18.2.0"
97
97
  },
@@ -129,21 +129,21 @@
129
129
  "@deepseek-ai/cordis-plugin-group": "^1.1.0",
130
130
  "@deepseek-ai/cordis-plugin-include": "^1.1.0",
131
131
  "@deepseek-ai/cordis-plugin-loader": "^1.1.0",
132
- "@deepseek-ai/dsh-app-boot": "^0.2.2-rc.1",
133
- "@deepseek-ai/dsh-brand": "^0.2.2-rc.1",
134
- "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.1",
135
- "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.1",
136
- "@deepseek-ai/dsh-client-store": "^0.2.2-rc.1",
137
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.1",
138
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.1",
139
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.1",
140
- "@deepseek-ai/dsh-config-editor": "^0.2.2-rc.1",
141
- "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
142
- "@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.1",
143
- "@deepseek-ai/dsh-launch-environment": "^0.2.2-rc.1",
144
- "@deepseek-ai/dsh-scope": "^0.2.2-rc.1",
145
- "@deepseek-ai/dsh-session": "^0.2.2-rc.1",
146
- "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
132
+ "@deepseek-ai/dsh-app-boot": "^0.2.2-rc.3",
133
+ "@deepseek-ai/dsh-brand": "^0.2.2-rc.3",
134
+ "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.3",
135
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.3",
136
+ "@deepseek-ai/dsh-client-store": "^0.2.2-rc.3",
137
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.3",
138
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.3",
139
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.3",
140
+ "@deepseek-ai/dsh-config-editor": "^0.2.2-rc.3",
141
+ "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.3",
142
+ "@deepseek-ai/dsh-host-webserver": "^0.2.2-rc.3",
143
+ "@deepseek-ai/dsh-launch-environment": "^0.2.2-rc.3",
144
+ "@deepseek-ai/dsh-scope": "^0.2.2-rc.3",
145
+ "@deepseek-ai/dsh-session": "^0.2.2-rc.3",
146
+ "@deepseek-ai/dsh-settings": "^0.2.2-rc.3",
147
147
  "@deepseek-ai/schemastery": "^3.19.0",
148
148
  "@types/node": "^22.20.0",
149
149
  "@types/nodemailer": "^6.4.15",
@@ -21,7 +21,7 @@ interface ScheduleRecord {
21
21
  }
22
22
 
23
23
  interface ScheduleService {
24
- list(filter: { sessionId: string }): Promise<ScheduleRecord[]>
24
+ list(filter: { sessionId: string }): Promise<ScheduleRecord[] | { items: ScheduleRecord[] }>
25
25
  create(sessionId: string, input: Record<string, unknown>, signal?: AbortSignal): Promise<ScheduleRecord>
26
26
  update(input: Record<string, unknown>, signal?: AbortSignal): Promise<Record<string, unknown>>
27
27
  delete(input: Record<string, unknown>, signal?: AbortSignal): Promise<Record<string, unknown>>
@@ -61,6 +61,10 @@ function log(message: string): void {
61
61
  }
62
62
  }
63
63
 
64
+ function listRecords(result: ScheduleRecord[] | { items: ScheduleRecord[] }): ScheduleRecord[] {
65
+ return Array.isArray(result) ? result : result.items
66
+ }
67
+
64
68
  function sessionIdOf(exec: ToolExecution): string {
65
69
  const id = exec.agent?.session?.id
66
70
  return typeof id === 'string' ? id : ''
@@ -189,7 +193,7 @@ export function makeAutomationTaskTools(schedule: ScheduleService): ToolDefiniti
189
193
  const sessionId = sessionIdOf(exec)
190
194
  if (sessionId === '') return { ok: false, code: 'no_session', error: 'no current session' }
191
195
  try {
192
- return { ok: true, tasks: await schedule.list({ sessionId }) }
196
+ return { ok: true, tasks: listRecords(await schedule.list({ sessionId })) }
193
197
  } catch (error) {
194
198
  return serviceFailure(error)
195
199
  }
@@ -229,7 +233,7 @@ export function makeAutomationTaskTools(schedule: ScheduleService): ToolDefiniti
229
233
  if (invalidInput !== undefined) return invalid(invalidInput)
230
234
  try {
231
235
  const id = String(args.id)
232
- const expected = (await schedule.list({ sessionId })).find(record => record.id === id)
236
+ const expected = listRecords(await schedule.list({ sessionId })).find(record => record.id === id)
233
237
  if (expected === undefined) return { ok: false, code: 'schedule_not_found', error: 'automation task not found in this session: ' + id }
234
238
  const change = timingChange(args)
235
239
  const result = await schedule.update({