dsh-browser-cdp 1.7.4 → 1.7.6
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/README.md +3 -3
- package/dsh-plugin.json +1 -1
- package/lib/client.js +25 -7
- package/package.json +14 -10
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[简体中文](README.md) | [Français](README.fr.md) | [Deutsch](README.de.md) | [Italiano](README.it.md) | [Русский](README.ru.md) | [Español](README.es.md)
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<img src="https://img.shields.io/badge/DSH-0.1.7--rc.1~0.2.1--rc.
|
|
6
|
+
<img src="https://img.shields.io/badge/DSH-0.1.7--rc.1~0.2.1--rc.5-blue" alt="DSH 0.1.7-rc.1 ~ 0.2.1-rc.5">
|
|
7
7
|
<img src="https://img.shields.io/badge/DSH--better--sidebar-%3E%3D0.12.2(optional)-red" alt="dsh-better-sidebar >= 0.12.2 (optional)">
|
|
8
8
|
<img src="https://img.shields.io/badge/Node-%3E%3D22-brightgreen?logo=node.js&logoColor=white" alt="Node >= 22">
|
|
9
9
|
</p>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
| 依赖 | 最低版本 | 推荐版本 | 说明 |
|
|
16
16
|
|---|---|---|---|
|
|
17
|
-
| **DSH** (DeepSeek Harness) | `0.1.7-rc.1` | `0.1.7-rc.1 ~ 0.2.1-rc.4`(精确枚举) | 精确枚举 8 个 rc 版本,engines 与全部 dsh peer 同串(无区间/caret):`0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4`;宿主对插件 API 向后兼容(0.2.0 的 composer/`forkSession` 为签名扩展,插件仅作调用方,免改)。声明式设置面自 0.1.7 引入(Config `.volatile()` 字段自动生成设置表单),0.2.0/0.2.1 延续该形态。DSH `0.1.2-rc.1` ~ `0.1.5-rc.3` 请使用 **0.17.x** 版本线,0.1.0-rc.x / 0.1.1-rc.x 请使用 v0.8.0 及更早版本 |
|
|
17
|
+
| **DSH** (DeepSeek Harness) | `0.1.7-rc.1` | `0.1.7-rc.1 ~ 0.2.1-rc.4`(精确枚举) | 精确枚举 8 个 rc 版本,engines 与全部 dsh peer 同串(无区间/caret):`0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5`;宿主对插件 API 向后兼容(0.2.0 的 composer/`forkSession` 为签名扩展,插件仅作调用方,免改)。声明式设置面自 0.1.7 引入(Config `.volatile()` 字段自动生成设置表单),0.2.0/0.2.1 延续该形态。DSH `0.1.2-rc.1` ~ `0.1.5-rc.3` 请使用 **0.17.x** 版本线,0.1.0-rc.x / 0.1.1-rc.x 请使用 v0.8.0 及更早版本 |
|
|
18
18
|
| **dsh-better-sidebar** | `0.12.2`(可选) | `≥ 0.17.1` | 未安装时自动回退浮动观察球;`< 0.12.2` 可运行但外部链接拦截(`urlTarget`)静默降级 |
|
|
19
19
|
| **Node.js** | `22` | — | harness 环境自带 |
|
|
20
20
|
|
|
21
|
-
**DSH 全版本适配说明**:本版本(**1.2.1 起**;1.2.2 起追加 0.2.1-rc.2)面向 DSH `0.1.7-rc.1 ~ 0.2.1-rc.
|
|
21
|
+
**DSH 全版本适配说明**:本版本(**1.2.1 起**;1.2.2 起追加 0.2.1-rc.2)面向 DSH `0.1.7-rc.1 ~ 0.2.1-rc.5`(精确枚举 9 个 rc):相对 0.1.7 线(v0.17.x)**零代码改动**,纯依赖/元数据换代——0.2.0 宿主对插件 API 向后兼容,本插件经 `ctx.get('conversation').input` 门面投递选区(不调 `submit()`、不 override),不在 0.2.0 变更影响面内。声明式设置面自 0.1.7 引入:插件不再注册任何设置节(`ctx.settings` 注册类 API 已被宿主删除),改为在 Config schema 上以 `.volatile()` 标记可配置字段,由宿主设置页自动生成表单;volatile 字段变更通过 `loader/volatile-update` 事件热生效,无需重载插件。核心宿主 API(`defineTool`、`ctx.tools.register`、`ctx.subprocess.spawn`、`ctx.webServer.register`、`ctx.inject`、`ModuleLoader` CJS factory、`cordis.patch.yml`)沿用 0.1.2 以来形态。DSH `0.1.2-rc.1` ~ `0.1.5-rc.3` 请使用 **0.17.x** 版本线。
|
|
22
22
|
|
|
23
23
|
**dsh-better-sidebar 适配说明**:本插件通过 `ctx.betterSidebar` 服务(try-catch 防御性获取)注册侧边栏 Tab 并监听外部链接。关键 API 引入版本:
|
|
24
24
|
|
package/dsh-plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -259,10 +259,16 @@ function FamilyHostSection(props) {
|
|
|
259
259
|
if (props.useTabs !== void 0 || raw === void 0) return;
|
|
260
260
|
return raw.subscribe(() => setPolled(raw.getSnapshot()));
|
|
261
261
|
});
|
|
262
|
+
const tabs = props.useTabs !== void 0 ? props.useTabs((value) => value, eqRows) : polled;
|
|
263
|
+
const ownId = props.ownId ?? "__own__";
|
|
262
264
|
return (0, react.createElement)("div", { style: {
|
|
263
265
|
display: "grid",
|
|
264
266
|
gap: "12px"
|
|
265
|
-
} }, (props.
|
|
267
|
+
} }, (props.renderOwn ? [{
|
|
268
|
+
id: ownId,
|
|
269
|
+
order: Number.NEGATIVE_INFINITY,
|
|
270
|
+
label: ownId
|
|
271
|
+
}, ...tabs.filter((tab) => tab.id !== ownId)] : tabs).map((row) => (0, react.createElement)("div", { key: row.id }, props.renderOwn && row.id === ownId ? props.renderOwn() : props.renderSlot ? props.renderSlot(FAMILY_CHILD_KEY, {}, {
|
|
266
272
|
only: row.id,
|
|
267
273
|
fallback: null
|
|
268
274
|
}) : props.renderContributor?.(row.id) ?? null)));
|
|
@@ -305,7 +311,7 @@ function projectLedger(slots) {
|
|
|
305
311
|
* @param log - console 前缀(带插件名)。
|
|
306
312
|
* @returns 取消定时器与撤销接管注册的 disposer。
|
|
307
313
|
*/
|
|
308
|
-
function claimFamilyHostIfOrphaned(slots, isHeld, label, log) {
|
|
314
|
+
function claimFamilyHostIfOrphaned(slots, isHeld, label, log, ownTab) {
|
|
309
315
|
let disposeClaim;
|
|
310
316
|
let claimed = false;
|
|
311
317
|
const timer = setTimeout(() => {
|
|
@@ -344,7 +350,9 @@ function claimFamilyHostIfOrphaned(slots, isHeld, label, log) {
|
|
|
344
350
|
label,
|
|
345
351
|
inject: () => ({
|
|
346
352
|
hooks: { tabs: ledger },
|
|
347
|
-
renderContributor
|
|
353
|
+
renderContributor,
|
|
354
|
+
ownId: ownTab?.id,
|
|
355
|
+
renderOwn: ownTab === void 0 ? void 0 : () => (0, react.createElement)(ownTab.component, ownTab.inject ? ownTab.inject() : {})
|
|
348
356
|
}),
|
|
349
357
|
children: { [FAMILY_CHILD_KEY]: {
|
|
350
358
|
kind: "list",
|
|
@@ -1363,9 +1371,7 @@ function mountFamilySettingsCard(ctx) {
|
|
|
1363
1371
|
var forms = typeof ctx.get === "function" ? ctx.get("configForms") : void 0;
|
|
1364
1372
|
var scope = forms && typeof forms.get === "function" ? forms.get("dsh-browser-cdp") : void 0;
|
|
1365
1373
|
if (!scope) scope = makeBridgeScope();
|
|
1366
|
-
var familyTabHeld = false;
|
|
1367
1374
|
ctx.slots.inject("dsh-family.tab", function() {
|
|
1368
|
-
familyTabHeld = true;
|
|
1369
1375
|
return ctx.slots.register({
|
|
1370
1376
|
name: "dsh-family.tab",
|
|
1371
1377
|
id: "dsh-browser-cdp",
|
|
@@ -1379,10 +1385,22 @@ function mountFamilySettingsCard(ctx) {
|
|
|
1379
1385
|
}, FamilySettingsCard);
|
|
1380
1386
|
}, "dsh-browser-cdp: family settings tab");
|
|
1381
1387
|
var claim = claimFamilyHostIfOrphaned(ctx.slots, function() {
|
|
1382
|
-
|
|
1388
|
+
try {
|
|
1389
|
+
return ctx.slots.entries("settings.section").some(function(e) {
|
|
1390
|
+
return String(e && e.options && e.options.id || "") === "dsh-family";
|
|
1391
|
+
});
|
|
1392
|
+
} catch {
|
|
1393
|
+
return false;
|
|
1394
|
+
}
|
|
1383
1395
|
}, function() {
|
|
1384
1396
|
return "起子插件设置";
|
|
1385
|
-
}, "[dsh-browser-cdp]"
|
|
1397
|
+
}, "[dsh-browser-cdp]", {
|
|
1398
|
+
id: "dsh-browser-cdp",
|
|
1399
|
+
component: FamilySettingsCard,
|
|
1400
|
+
inject: function() {
|
|
1401
|
+
return { scope };
|
|
1402
|
+
}
|
|
1403
|
+
});
|
|
1386
1404
|
if (typeof ctx.effect === "function") ctx.effect(function() {
|
|
1387
1405
|
return claim;
|
|
1388
1406
|
}, "dsh-browser-cdp: family host backstop");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "dsh-browser-cdp: DSH browser plugin — attach to a running Chrome/Edge over CDP (no bundled browser needed); structured browser-automation tools (30+ bcdp_*) that drive the vendored ego runtime through ctx.subprocess, plus a realtime watch panel (live SSE screencast + direct mouse interaction + download capture + human-verification notice). Web shell: floating watch panel without dsh-better-sidebar, sidebar tab with it. Headless/TUI hosts: tools-only. [DSH 0.1.7-rc.1 ~ 0.2.1-rc.1 line (exact rc enumeration): declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.5-rc.3 use the 0.17.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dsh": {
|
|
23
23
|
"engines": {
|
|
24
|
-
"dsh": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4"
|
|
24
|
+
"dsh": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
25
25
|
},
|
|
26
26
|
"bundle": {
|
|
27
27
|
"patch": "./cordis.patch.yml"
|
|
@@ -38,7 +38,11 @@
|
|
|
38
38
|
"0.1.7-rc.2": "compatible",
|
|
39
39
|
"0.2.0-rc.1": "compatible",
|
|
40
40
|
"0.2.0-rc.2": "compatible",
|
|
41
|
-
"0.2.1-rc.1": "compatible"
|
|
41
|
+
"0.2.1-rc.1": "compatible",
|
|
42
|
+
"0.2.1-rc.2": "compatible",
|
|
43
|
+
"0.2.1-rc.3": "compatible",
|
|
44
|
+
"0.2.1-rc.4": "compatible",
|
|
45
|
+
"0.2.1-rc.5": "compatible"
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
},
|
|
@@ -52,12 +56,12 @@
|
|
|
52
56
|
"@deepseek-ai/schemastery": "^3.18.4"
|
|
53
57
|
},
|
|
54
58
|
"peerDependencies": {
|
|
55
|
-
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
56
|
-
"@deepseek-ai/dsh-client-store": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
59
|
-
"@deepseek-ai/dsh-settings": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
60
|
-
"@deepseek-ai/dsh-tools": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4",
|
|
59
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
60
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
63
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
64
|
+
"@deepseek-ai/dsh-tools": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5",
|
|
61
65
|
"react": "^18.2.0"
|
|
62
66
|
},
|
|
63
67
|
"peerDependenciesMeta": {
|
|
@@ -95,7 +99,7 @@
|
|
|
95
99
|
},
|
|
96
100
|
"engines": {
|
|
97
101
|
"node": ">=22",
|
|
98
|
-
"dsh": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4"
|
|
102
|
+
"dsh": "0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5"
|
|
99
103
|
},
|
|
100
104
|
"license": "MIT",
|
|
101
105
|
"repository": {
|