dsh-yolo-mode 0.5.3 → 0.6.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 +49 -0
- package/lib/client/index.js +37 -24
- package/package.json +5 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
本项目遵循 [Semantic Versioning](https://semver.org/)。
|
|
4
4
|
|
|
5
|
+
## [0.6.1] - 2026-09-27
|
|
6
|
+
|
|
7
|
+
### 修复:配置位置改到插件详情页(0.6.0 放错了地方)
|
|
8
|
+
|
|
9
|
+
0.6.0 把配置放进了输入框旁的 `YOLO <预设>` 胶囊浮层(`shell.overlay`)——那是**状态与日志**
|
|
10
|
+
的位置,不是「插件的配置面板」。本次改用 DSH 插件管理页声明的专用槽位:
|
|
11
|
+
|
|
12
|
+
- **新增 `plugins.bundle.config` 注册**(key = npm 包名 `dsh-yolo-mode`):配置渲染在
|
|
13
|
+
「插件列表 → dsh-yolo-mode」页面的**描述与组件行之间**。该槽位是 keyed slot,页面仅在
|
|
14
|
+
有注册者(且 key 等于包名)时才渲染配置区块
|
|
15
|
+
(`dsh-client-ui-plugin-manager`:`configured = ledger.bundles.has(pkg.name)`)——
|
|
16
|
+
这正是此前该页面完全没有配置区的原因。
|
|
17
|
+
- bundle 页可容纳多个条目,因此页面**不传宿主 `form`**,由本插件自持草稿、校验与保存
|
|
18
|
+
(仍走 `/yolo-mode` 设置桥 + 乐观修订锁)。`view === 'summary'` 时不渲染
|
|
19
|
+
(bundle 页只请求 `page`)。
|
|
20
|
+
- **胶囊浮层回归纯状态/日志**:撤销 0.6.0 给 `shell.overlay` 加的「配置 / 状态与日志」双标签;
|
|
21
|
+
点胶囊仍是原来的统计卡 + 裁决表分页 + 打开日志 + 刷新。
|
|
22
|
+
- 文案 `tabConfig` / `tabStatus` 退役(不再有标签页);`settings.section` 保持退役。
|
|
23
|
+
|
|
24
|
+
## [0.6.0] - 2026-09-27
|
|
25
|
+
|
|
26
|
+
### 变更:全部配置移入插件自身 UI 面板(设置页退役)
|
|
27
|
+
|
|
28
|
+
- **移除 `settings.section` 注册**(原 id `yolo-mode`,order 25):不再向 DSH 设置面板
|
|
29
|
+
注册任何页面,全部配置项改由插件自身的 UI 面板承载 —— 点击输入框左侧的
|
|
30
|
+
`YOLO <预设>` 胶囊打开(slot `shell.overlay`)。
|
|
31
|
+
- 面板新增 **配置 / 状态与日志** 两个标签,默认打开「配置」:
|
|
32
|
+
- 「配置」渲染原设置页的完整表单(预设 / 模式 / 裁判供应商与模型 / 超时 / 最大令牌 /
|
|
33
|
+
并发 / 系统提示词 / 层级表),保存仍走 `settingsMutate` 路径操作 + 乐观锁;
|
|
34
|
+
- 「状态与日志」保留统计卡、裁决表分页、「打开日志」与「刷新」。
|
|
35
|
+
- `src/client/ui/SettingsSection.js` → `src/client/ui/ConfigForm.js`(导出名
|
|
36
|
+
`ConfigForm`);组件内部逻辑不变,仅宿主从设置页改为面板。
|
|
37
|
+
- 文案 `nav` 退役,新增 `tabConfig` / `tabStatus`(中英双语)。
|
|
38
|
+
|
|
39
|
+
### 修复:依赖解析与构建可复现
|
|
40
|
+
|
|
41
|
+
- `peerDependencies` 移除两个**已停更**的官方包:`@deepseek-ai/dsh-host-apiproxy`
|
|
42
|
+
与 `@deepseek-ai/dsh-client-runtime`(npm 上分别止于 `0.1.1-rc.2`)。二者此前仅为
|
|
43
|
+
`import type` 引用(`verbatimModuleSyntax` 下会被擦除),却会让全新克隆的 `npm ci`
|
|
44
|
+
因无法解析已停更 peer 而直接失败。
|
|
45
|
+
- `devDependencies` 的 `@deepseek-ai/dsh-llm` / `dsh-timeout` / `dsh-settings` 由
|
|
46
|
+
`^0.1.7-rc.1` 收紧为精确 `0.1.7-rc.2`:DSH 预发布包内部使用**精确 peer**,
|
|
47
|
+
rc.1 与 rc.2 混装会触发 `ERESOLVE` 冲突。现在可 `npm ci && npm test`(无需
|
|
48
|
+
`--legacy-peer-deps`)。
|
|
49
|
+
- `scripts/build-client.mjs` 移除硬编码开发机回退路径
|
|
50
|
+
(`E:/MyProjectCollection/Plugins/dsh-subagents-options/package.json`),改为在
|
|
51
|
+
缺少 `rolldown` 时抛出可操作的错误提示。
|
|
52
|
+
- `package-lock.json` 重新生成(`resolved` 全部指向 `registry.npmjs.org`)。
|
|
53
|
+
|
|
5
54
|
## [0.5.3] - 2026-09-25
|
|
6
55
|
|
|
7
56
|
### 兼容:适配 DSH 0.1.7-rc.2
|
package/lib/client/index.js
CHANGED
|
@@ -15,7 +15,6 @@ window.__ModuleLoader__.load({
|
|
|
15
15
|
const NS = "settings.yoloMode";
|
|
16
16
|
/** English dictionary. */
|
|
17
17
|
const en = {
|
|
18
|
-
nav: "YOLO Approval",
|
|
19
18
|
chip: "YOLO status",
|
|
20
19
|
sectionIntro: "Configure how YOLO mode auto-judges sandbox escalation approval requests.",
|
|
21
20
|
loadError: "Could not load YOLO mode settings.",
|
|
@@ -73,7 +72,6 @@ window.__ModuleLoader__.load({
|
|
|
73
72
|
};
|
|
74
73
|
/** Chinese dictionary. */
|
|
75
74
|
const zh = {
|
|
76
|
-
nav: "YOLO 审批",
|
|
77
75
|
chip: "YOLO 状态",
|
|
78
76
|
sectionIntro: "配置 YOLO 模式如何自动裁决沙箱升权审批申请。",
|
|
79
77
|
loadError: "无法加载 YOLO 模式设置。",
|
|
@@ -643,10 +641,14 @@ window.__ModuleLoader__.load({
|
|
|
643
641
|
return PRESETS_INFO.find((preset) => preset.id === id) || null;
|
|
644
642
|
}
|
|
645
643
|
//#endregion
|
|
646
|
-
//#region src/client/ui/
|
|
644
|
+
//#region src/client/ui/ConfigForm.js
|
|
647
645
|
/**
|
|
648
|
-
* YOLO mode
|
|
649
|
-
*
|
|
646
|
+
* YOLO mode configuration form. Rendered on this plugin's own page in the DSH
|
|
647
|
+
* plugin manager (插件列表 → dsh-yolo-mode), via the `plugins.bundle.config`
|
|
648
|
+
* slot keyed by the package name (see ../index.js) — between the package
|
|
649
|
+
* description and the component rows. The `settings.section` page was retired,
|
|
650
|
+
* so this form is the single configuration surface for the plugin. It renders
|
|
651
|
+
* the resolved configuration (view.value) and saves via path ops through
|
|
650
652
|
* store.mutate with an optimistic-revision lock. Everything is React.createElement
|
|
651
653
|
* + inline styles (no JSX, no CSS modules).
|
|
652
654
|
*
|
|
@@ -831,14 +833,21 @@ window.__ModuleLoader__.load({
|
|
|
831
833
|
}
|
|
832
834
|
};
|
|
833
835
|
/**
|
|
834
|
-
* The YOLO
|
|
836
|
+
* The YOLO configuration form.
|
|
835
837
|
*
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
+
* Hosted by this plugin's own page in the plugin manager: registered into
|
|
839
|
+
* `plugins.bundle.config` under the package name (see ../index.js). The page
|
|
840
|
+
* dispatches `view`; a bundle page only ever asks for `page`, and a bundle may
|
|
841
|
+
* hold several configuration entries, so the page passes NO host `form` — this
|
|
842
|
+
* component owns its draft, validation and save path (the /yolo-mode bridge).
|
|
843
|
+
*
|
|
844
|
+
* @param {object} props - slot props `{ view? }` merged with the inject face
|
|
845
|
+
* `{ store, useSnapshot, t }`; an optional `close()` adds a dismiss control.
|
|
838
846
|
*/
|
|
839
|
-
function
|
|
840
|
-
const { store, useSnapshot, t, close } = props;
|
|
847
|
+
function ConfigForm(props) {
|
|
848
|
+
const { view, store, useSnapshot, t, close } = props;
|
|
841
849
|
if (store === void 0 || useSnapshot === void 0 || t === void 0) return null;
|
|
850
|
+
if (view === "summary") return null;
|
|
842
851
|
return ReactSection({
|
|
843
852
|
store,
|
|
844
853
|
useSnapshot,
|
|
@@ -1157,7 +1166,7 @@ window.__ModuleLoader__.load({
|
|
|
1157
1166
|
* (paged, PAGE_SIZE per page, newest first), an "open audit log" button, and a
|
|
1158
1167
|
* refresh button.
|
|
1159
1168
|
*
|
|
1160
|
-
* Guard/hook split mirrors
|
|
1169
|
+
* Guard/hook split mirrors ConfigForm: the outer component validates the
|
|
1161
1170
|
* slot inject face, the inner component owns all hooks unconditionally.
|
|
1162
1171
|
*/
|
|
1163
1172
|
/** Rows per page of the recent-decisions table. */
|
|
@@ -1425,11 +1434,17 @@ window.__ModuleLoader__.load({
|
|
|
1425
1434
|
/**
|
|
1426
1435
|
* YOLO mode — browser half (DSH client plugin).
|
|
1427
1436
|
*
|
|
1428
|
-
* Registers
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1437
|
+
* Registers three slots:
|
|
1438
|
+
* - `plugins.bundle.config` (key `dsh-yolo-mode`): ALL configuration, rendered
|
|
1439
|
+
* on this plugin's own page in the plugin manager (插件列表 → dsh-yolo-mode),
|
|
1440
|
+
* between the package description and the component rows;
|
|
1441
|
+
* - `conversation.input.left`: the `YOLO <preset>` status chip;
|
|
1442
|
+
* - `shell.overlay`: the stats / recent-decisions panel that chip opens.
|
|
1443
|
+
*
|
|
1444
|
+
* The `settings.section` page stays retired: nothing is configured from the DSH
|
|
1445
|
+
* Settings surface any more. Data flows through the connection's generic RPC
|
|
1446
|
+
* channel (/yolo-mode) into a snapshot store; writes travel as path ops through
|
|
1447
|
+
* settingsMutate with an optimistic-revision lock.
|
|
1433
1448
|
*/
|
|
1434
1449
|
/**
|
|
1435
1450
|
* Services required by these slot registrations (dsh.client.inject is the same
|
|
@@ -1444,8 +1459,8 @@ window.__ModuleLoader__.load({
|
|
|
1444
1459
|
"remote.llm"
|
|
1445
1460
|
];
|
|
1446
1461
|
/**
|
|
1447
|
-
* Register the YOLO
|
|
1448
|
-
*
|
|
1462
|
+
* Register the YOLO chip/panel once the slot declarations are on the ledger,
|
|
1463
|
+
* wire the store to the connection, and keep it fresh on every pushed
|
|
1449
1464
|
* invalidation.
|
|
1450
1465
|
*
|
|
1451
1466
|
* @param {object} ctx - client cordis context.
|
|
@@ -1483,14 +1498,12 @@ window.__ModuleLoader__.load({
|
|
|
1483
1498
|
useSnapshot,
|
|
1484
1499
|
t
|
|
1485
1500
|
});
|
|
1486
|
-
ctx.slots.inject("
|
|
1487
|
-
name: "
|
|
1488
|
-
|
|
1489
|
-
order: 25,
|
|
1490
|
-
label: () => t("nav"),
|
|
1501
|
+
ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({
|
|
1502
|
+
name: "plugins.bundle.config",
|
|
1503
|
+
key: "dsh-yolo-mode",
|
|
1491
1504
|
locale: NS,
|
|
1492
1505
|
inject: injected
|
|
1493
|
-
},
|
|
1506
|
+
}, ConfigForm));
|
|
1494
1507
|
ctx.slots.inject("conversation.input.left", () => ctx.slots.register({
|
|
1495
1508
|
name: "conversation.input.left",
|
|
1496
1509
|
id: "yolo-mode-chip",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-yolo-mode",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "dsh-yolo-mode —— DeepSeek Harness 双面包插件:当会话处于可写沙箱模式且审批策略为 ask 时,用大模型自动裁决沙箱升权申请,支持内置预设与自定义权限层级,并提供宿主 settings + 自发布设置桥(/yolo-mode)与 Web 客户端 UI。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -44,8 +44,6 @@
|
|
|
44
44
|
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
|
|
45
45
|
"@deepseek-ai/dsh-timeout": "^0.1.7-rc.1",
|
|
46
46
|
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
47
|
-
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
48
|
-
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
49
47
|
"@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
|
|
50
48
|
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
|
|
51
49
|
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
|
|
@@ -54,9 +52,9 @@
|
|
|
54
52
|
"devDependencies": {
|
|
55
53
|
"rolldown": "^1.2.4",
|
|
56
54
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
57
|
-
"@deepseek-ai/dsh-llm": "
|
|
58
|
-
"@deepseek-ai/dsh-timeout": "
|
|
59
|
-
"@deepseek-ai/dsh-settings": "
|
|
55
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-timeout": "0.1.7-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
60
58
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
61
59
|
},
|
|
62
60
|
"scripts": {
|
|
@@ -89,4 +87,4 @@
|
|
|
89
87
|
"node": ">=20"
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
}
|
|
90
|
+
}
|