dsh-mcviseron-plugin 0.7.1 → 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 +24 -0
- package/README.en.md +5 -2
- package/README.md +6 -3
- package/docs/automation-task.md +1 -1
- package/docs/release.md +2 -2
- package/lib/index.js +5 -2
- package/package.json +28 -27
- package/src/automation-tasks/index.ts +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@
|
|
|
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
|
+
|
|
23
|
+
## [0.7.2] - 2026-11-08
|
|
24
|
+
|
|
25
|
+
### Compatibility
|
|
26
|
+
|
|
27
|
+
- **预适配 DSH `0.2.2-rc.1`(nightly next)**:开发依赖升级到 0.2.2-rc.1;同步 `cordis@4.1.0`、`schemastery@3.19.0`、`cordis-plugin-group/loader/include@1.1.0`,补齐 `dsh-home-paths` / `dsh-launch-environment`。peer 范围加入 `^0.2.2-rc.1`。当前桌面仍为 `0.2.1-rc.5`,0.2.2-rc.1 待升级后做真实运行时验证。
|
|
28
|
+
|
|
29
|
+
### Tests
|
|
30
|
+
|
|
31
|
+
- 合计 **119 项测试**;typecheck、build 全绿。
|
|
32
|
+
|
|
9
33
|
## [0.7.1] - 2026-11-01
|
|
10
34
|
|
|
11
35
|
### Compatibility
|
package/README.en.md
CHANGED
|
@@ -152,8 +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.
|
|
156
|
-
| `0.2.
|
|
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) |
|
|
157
160
|
| `0.2.0-rc.x` | ✅ covered by the peer range |
|
|
158
161
|
| `0.1.x` | ❌ unsupported (different settings-namespace model) |
|
|
159
162
|
|
package/README.md
CHANGED
|
@@ -247,8 +247,11 @@ DSH 0.2 的官方设置 apiproxy 不向浏览器暴露第三方命名空间,
|
|
|
247
247
|
|
|
248
248
|
| DSH 版本 | 状态 |
|
|
249
249
|
| --- | --- |
|
|
250
|
-
| `0.2.
|
|
251
|
-
| `0.2.
|
|
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 上下文) |
|
|
252
255
|
| `0.2.0-rc.x` | ✅ peer 范围覆盖(同一套设置、审批与 hook 接缝) |
|
|
253
256
|
| `0.1.x` | ❌ 不支持:0.1 的插件自行注册设置命名空间,与本插件的条目 id 命名空间模型不同 |
|
|
254
257
|
|
|
@@ -314,7 +317,7 @@ test/
|
|
|
314
317
|
|
|
315
318
|
```bash
|
|
316
319
|
pnpm install
|
|
317
|
-
pnpm check # typecheck +
|
|
320
|
+
pnpm check # typecheck + 120 项测试 + 构建
|
|
318
321
|
```
|
|
319
322
|
|
|
320
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/` 不入库。
|
package/docs/automation-task.md
CHANGED
|
@@ -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 +
|
|
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.
|
|
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.
|
|
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.
|
|
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": {
|
|
@@ -84,17 +84,14 @@
|
|
|
84
84
|
"prepublishOnly": "pnpm check",
|
|
85
85
|
"repair-profile": "node scripts/repair-profile.mjs"
|
|
86
86
|
},
|
|
87
|
-
"dependencies": {
|
|
88
|
-
"@deepseek-ai/schemastery": "^3.18.5"
|
|
89
|
-
},
|
|
90
87
|
"peerDependencies": {
|
|
91
88
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
92
|
-
"@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",
|
|
93
|
-
"@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",
|
|
94
|
-
"@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",
|
|
95
|
-
"@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",
|
|
96
|
-
"@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",
|
|
97
|
-
"@deepseek-ai/dsh-settings": "^0.2.0-rc.2 || ^0.2.1-rc.2 || ^0.2.1-rc.3 || ^0.2.1-rc.5",
|
|
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",
|
|
98
95
|
"react": "^18.2.0",
|
|
99
96
|
"react-dom": "^18.2.0"
|
|
100
97
|
},
|
|
@@ -128,15 +125,26 @@
|
|
|
128
125
|
}
|
|
129
126
|
},
|
|
130
127
|
"devDependencies": {
|
|
131
|
-
"@deepseek-ai/cordis": "^4.0
|
|
132
|
-
"@deepseek-ai/
|
|
133
|
-
"@deepseek-ai/
|
|
134
|
-
"@deepseek-ai/
|
|
135
|
-
"@deepseek-ai/dsh-
|
|
136
|
-
"@deepseek-ai/dsh-
|
|
137
|
-
"@deepseek-ai/dsh-client-
|
|
138
|
-
"@deepseek-ai/dsh-
|
|
139
|
-
"@deepseek-ai/dsh-
|
|
128
|
+
"@deepseek-ai/cordis": "^4.1.0",
|
|
129
|
+
"@deepseek-ai/cordis-plugin-group": "^1.1.0",
|
|
130
|
+
"@deepseek-ai/cordis-plugin-include": "^1.1.0",
|
|
131
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.1.0",
|
|
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
|
+
"@deepseek-ai/schemastery": "^3.19.0",
|
|
140
148
|
"@types/node": "^22.20.0",
|
|
141
149
|
"@types/nodemailer": "^6.4.15",
|
|
142
150
|
"@types/react": "~18.3.1",
|
|
@@ -147,13 +155,6 @@
|
|
|
147
155
|
"react": "^18.3.1",
|
|
148
156
|
"react-dom": "^18.3.1",
|
|
149
157
|
"typescript": "~5.7.2",
|
|
150
|
-
"zustand": "4.4.7"
|
|
151
|
-
"@deepseek-ai/dsh-scope": "^0.2.1-rc.5",
|
|
152
|
-
"@deepseek-ai/dsh-brand": "^0.2.1-rc.5",
|
|
153
|
-
"@deepseek-ai/dsh-session": "^0.2.1-rc.5",
|
|
154
|
-
"@deepseek-ai/dsh-app-boot": "^0.2.1-rc.5",
|
|
155
|
-
"@deepseek-ai/dsh-config-editor": "^0.2.1-rc.5",
|
|
156
|
-
"@deepseek-ai/dsh-home-paths": "^0.2.1-rc.5",
|
|
157
|
-
"@deepseek-ai/dsh-launch-environment": "^0.2.1-rc.5"
|
|
158
|
+
"zustand": "4.4.7"
|
|
158
159
|
}
|
|
159
160
|
}
|
|
@@ -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({
|