dsh-browser-cdp 1.10.0 → 1.12.0
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 +16 -0
- package/dsh-plugin.json +1 -1
- package/lib/client.js +121 -244
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 1.12.0 (2026-11-15)
|
|
2
|
+
|
|
3
|
+
**设置分节排版:连接目标置顶,评审(JEV / Laya)组可抽屉折叠。**
|
|
4
|
+
|
|
5
|
+
- **连接目标置顶**:`FamilySettingsCard` 把 `FamLinks` 移到 `FAM_FIELD_GROUPS` 之前并传 `first: true`——顺序即优先级,它决定每一次 `bcdp_*` 打谁,是分节的第一性配置;置顶后块顶分隔线按 `first` 条件去掉,分节最上方不再出现无意义横线。
|
|
6
|
+
- **评审组抽屉折叠**:`gJudge` 组加 `foldable: true`,组标题改为 `<button aria-expanded>` + `▸/▾`,收起时标题右侧显示实际字段数「14 项」;收起态字段行**整段不渲染**(不是 CSS 隐藏,避免隐藏输入框仍可 Tab 聚焦)。
|
|
7
|
+
- **折叠态只存 localStorage**(`bcdp.settings.fold.<gk>`,读写全程 try/catch):折叠是纯 UI 偏好,**绝不写宿主配置**——每次配置写都是一次 patch 落盘。契约测试强制断言 `FamGroup` 内无 `commitField` / `scope.set`。
|
|
8
|
+
- 新增 3 条契约用例(`tests/fam-links.contract.test.ts`):连接目标必须先于所有分组、首个块不带顶部分隔线、只有评审组可折叠且折叠不落配置。
|
|
9
|
+
|
|
10
|
+
## 1.11.0
|
|
11
|
+
|
|
12
|
+
**设置入口改为独立顶层分节 + 齿轮挂载崩溃修复。**
|
|
13
|
+
|
|
14
|
+
- **独立设置分节**:从家族 tab 迁出,新增 `mountOwnSettingsSection`(`settings.section`)与 `mountSettingsSectionIcon`(图标),低版本回退齿轮浮窗。
|
|
15
|
+
- **gen-1 齿轮崩溃修复**:`mountGen1SettingsGear` 裸 `ctx.get('remote')` 与 `remote.settings` 属性访问在 strict-resolver 宿主上抛 `cannot get property "remote.settings" without inject`,导致整个 mount 崩溃;改为将 `openSettingsDocument` 探测整体置于 try/catch,不可达时降级为 `hasOpenDoc=false`,由可达的 `configForms` 决定门控(0.1.7+/0.2.x 仍正确隐藏齿轮)。
|
|
16
|
+
|
|
1
17
|
## 1.10.0 (2026-11-14)
|
|
2
18
|
|
|
3
19
|
**入口从 `bcdp_status` 换成 `bcdp_help`,流程说明搬进随包 skill `bcdp-browser`。**
|
package/dsh-plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({ id: "dsh-browser-cdp", factory: (require) => {
|
|
2
2
|
var module = { exports: {} }; var exports = module.exports;
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
21
|
-
value: mod,
|
|
22
|
-
enumerable: true
|
|
23
|
-
}) : target, mod));
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
|
-
let react = require("react");
|
|
27
|
-
react = __toESM(react);
|
|
28
3
|
|
|
29
4
|
//#region src/client/fam-links.ts
|
|
30
5
|
/**
|
|
@@ -250,157 +225,6 @@ function applyProbe(links, id, outcome, at) {
|
|
|
250
225
|
});
|
|
251
226
|
}
|
|
252
227
|
|
|
253
|
-
//#endregion
|
|
254
|
-
//#region src/client/family-host.ts
|
|
255
|
-
/** 家族节固定 id 与子席位 key(与 thinking-levels 的声明严格一致)。 */
|
|
256
|
-
const FAMILY_SECTION_ID = "dsh-family";
|
|
257
|
-
const FAMILY_CHILD_KEY = "dsh-family.tab";
|
|
258
|
-
/**
|
|
259
|
-
* 接管分级——唯一真源是 `mine-dsh-plugins/_tools/family-rank.mjs`(离线实测 GitHub
|
|
260
|
-
* star + npm 周下载量加权)。延迟 = BASE + RANK * STEP;rank 越大越靠后兜底。
|
|
261
|
-
*/
|
|
262
|
-
const FAMILY_CLAIM_RANK = 5;
|
|
263
|
-
const FAMILY_CLAIM_BASE_MS = 200;
|
|
264
|
-
const FAMILY_CLAIM_STEP_MS = 900;
|
|
265
|
-
/** 派生而非硬编码:改 rank 表就自动改时刻。 */
|
|
266
|
-
const FAMILY_CLAIM_DELAY_MS = FAMILY_CLAIM_BASE_MS + FAMILY_CLAIM_RANK * FAMILY_CLAIM_STEP_MS;
|
|
267
|
-
/** 接管行的遮蔽优先级:必须大于任何正牌 owner(TL 无=0、guard=10),
|
|
268
|
-
* 这样 owner 一旦上位就自然遮蔽本兜底行(宿主规则:同 cell 最低者渲染)。 */
|
|
269
|
-
const FAMILY_HOST_PRIORITY = 50;
|
|
270
|
-
const NO_TABS = [];
|
|
271
|
-
/**
|
|
272
|
-
* uSES 浅比较(issue #2 的 C 案加固):引用不同但行内容一致时视为未变。
|
|
273
|
-
* 主修法是按 getVersion 缓存快照(引用稳定),这里只兑底宿主绑定语义再变的情形。
|
|
274
|
-
*/
|
|
275
|
-
function eqRows(a, b) {
|
|
276
|
-
if (a === b) return true;
|
|
277
|
-
if (a.length !== b.length) return false;
|
|
278
|
-
return a.every((row, i) => {
|
|
279
|
-
const other = b[i];
|
|
280
|
-
return other !== void 0 && row.id === other.id && row.order === other.order && row.label === other.label;
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
/** 通用容器渲染:按 order 依次画出账本里每张贡献卡,不含任何"本插件特例"。 */
|
|
284
|
-
function FamilyHostSection(props) {
|
|
285
|
-
const raw = props.hooks?.tabs;
|
|
286
|
-
const [polled, setPolled] = (0, react.useState)(() => raw?.getSnapshot() ?? NO_TABS);
|
|
287
|
-
(0, react.useEffect)(() => {
|
|
288
|
-
if (props.useTabs !== void 0 || raw === void 0) return;
|
|
289
|
-
return raw.subscribe(() => setPolled(raw.getSnapshot()));
|
|
290
|
-
});
|
|
291
|
-
const tabs = props.useTabs !== void 0 ? props.useTabs((value) => value, eqRows) : polled;
|
|
292
|
-
const ownId = props.ownId ?? "__own__";
|
|
293
|
-
return (0, react.createElement)("div", { style: {
|
|
294
|
-
display: "grid",
|
|
295
|
-
gap: "12px"
|
|
296
|
-
} }, (props.renderOwn ? [{
|
|
297
|
-
id: ownId,
|
|
298
|
-
order: Number.NEGATIVE_INFINITY,
|
|
299
|
-
label: ownId
|
|
300
|
-
}, ...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, {}, {
|
|
301
|
-
only: row.id,
|
|
302
|
-
fallback: null
|
|
303
|
-
}) : props.renderContributor?.(row.id) ?? null)));
|
|
304
|
-
}
|
|
305
|
-
/** 取条目上的具名面(宿主条目是结构化对象,这里只做安全读取)。 */
|
|
306
|
-
function face(entry, key) {
|
|
307
|
-
if (entry === null || typeof entry !== "object") return void 0;
|
|
308
|
-
return entry[key];
|
|
309
|
-
}
|
|
310
|
-
/** 条目的 options 收窄(宿主侧是结构化对象,缺失时当空对象读)。 */
|
|
311
|
-
function optionsOf(entry) {
|
|
312
|
-
const raw = face(entry, "options");
|
|
313
|
-
return raw !== null && typeof raw === "object" ? raw : {};
|
|
314
|
-
}
|
|
315
|
-
/** 把账本条目投影成标题行:label 可能是函数,抛错退化成 id,绝不带崩整节。 */
|
|
316
|
-
function projectLedger(slots) {
|
|
317
|
-
return slots.entries(FAMILY_CHILD_KEY).map((rawEntry) => {
|
|
318
|
-
const options = rawEntry.options ?? {};
|
|
319
|
-
const id = String(options["id"] ?? "");
|
|
320
|
-
const rawLabel = options["label"];
|
|
321
|
-
let label = id;
|
|
322
|
-
if (typeof rawLabel === "function") try {
|
|
323
|
-
label = String(rawLabel() ?? id);
|
|
324
|
-
} catch {
|
|
325
|
-
label = id;
|
|
326
|
-
}
|
|
327
|
-
else if (typeof rawLabel === "string") label = rawLabel;
|
|
328
|
-
return {
|
|
329
|
-
id,
|
|
330
|
-
order: Number(options["order"] ?? 0),
|
|
331
|
-
label
|
|
332
|
-
};
|
|
333
|
-
}).sort((a, b) => a.order - b.order);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* 若到点仍无人声明子席位,则自己接管容器。
|
|
337
|
-
* @param slots - 客户端槽门面。
|
|
338
|
-
* @param isHeld - 探针:本插件的 tab 工厂是否已被执行(= 有人声明了子席位)。
|
|
339
|
-
* @param label - 导航标题;家族共享节的标题,不是本插件名。
|
|
340
|
-
* @param log - console 前缀(带插件名)。
|
|
341
|
-
* @returns 取消定时器与撤销接管注册的 disposer。
|
|
342
|
-
*/
|
|
343
|
-
function claimFamilyHostIfOrphaned(slots, isHeld, label, log, ownTab) {
|
|
344
|
-
let disposeClaim;
|
|
345
|
-
let claimed = false;
|
|
346
|
-
const timer = setTimeout(() => {
|
|
347
|
-
if (isHeld()) return;
|
|
348
|
-
let cachedVersion = -1;
|
|
349
|
-
let cachedRows = NO_TABS;
|
|
350
|
-
const ledger = {
|
|
351
|
-
getSnapshot: () => {
|
|
352
|
-
const v = typeof slots.getVersion === "function" ? slots.getVersion(FAMILY_CHILD_KEY) : NaN;
|
|
353
|
-
if (v !== cachedVersion || Number.isNaN(v)) {
|
|
354
|
-
cachedRows = projectLedger(slots);
|
|
355
|
-
cachedVersion = v;
|
|
356
|
-
}
|
|
357
|
-
return cachedRows;
|
|
358
|
-
},
|
|
359
|
-
subscribe: (listener) => slots.subscribe ? slots.subscribe(FAMILY_CHILD_KEY, listener) : () => void 0
|
|
360
|
-
};
|
|
361
|
-
/** ≤0.1.5 壳没有 renderSlot:从账本条目现挂组件,失败一律 null。 */
|
|
362
|
-
const renderContributor = (id) => {
|
|
363
|
-
try {
|
|
364
|
-
const entry = slots.entries(FAMILY_CHILD_KEY).find((candidate) => String(optionsOf(candidate)["id"] ?? "") === id);
|
|
365
|
-
const component = entry ? face(entry, "component") : void 0;
|
|
366
|
-
const inject$1 = entry ? face(entry, "inject") : void 0;
|
|
367
|
-
if (typeof component !== "function") return null;
|
|
368
|
-
return (0, react.createElement)(component, (typeof inject$1 === "function" ? inject$1() : {}) ?? {});
|
|
369
|
-
} catch {
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
try {
|
|
374
|
-
const dispose = slots.register({
|
|
375
|
-
name: "settings.section",
|
|
376
|
-
id: FAMILY_SECTION_ID,
|
|
377
|
-
order: 40,
|
|
378
|
-
priority: FAMILY_HOST_PRIORITY,
|
|
379
|
-
label,
|
|
380
|
-
inject: () => ({
|
|
381
|
-
hooks: { tabs: ledger },
|
|
382
|
-
renderContributor,
|
|
383
|
-
ownId: ownTab?.id,
|
|
384
|
-
renderOwn: ownTab === void 0 ? void 0 : () => (0, react.createElement)(ownTab.component, ownTab.inject ? ownTab.inject() : {})
|
|
385
|
-
}),
|
|
386
|
-
children: { [FAMILY_CHILD_KEY]: {
|
|
387
|
-
kind: "list",
|
|
388
|
-
scope: "root"
|
|
389
|
-
} }
|
|
390
|
-
}, FamilyHostSection);
|
|
391
|
-
if (typeof dispose === "function") disposeClaim = dispose;
|
|
392
|
-
claimed = true;
|
|
393
|
-
console.warn(`${log} family container unclaimed — took it over (children declared)`);
|
|
394
|
-
} catch (error) {
|
|
395
|
-
console.warn(`${log} family claim lost — withdrawing (${error instanceof Error ? error.message : String(error)})`);
|
|
396
|
-
}
|
|
397
|
-
}, FAMILY_CLAIM_DELAY_MS);
|
|
398
|
-
return () => {
|
|
399
|
-
clearTimeout(timer);
|
|
400
|
-
if (claimed) disposeClaim?.();
|
|
401
|
-
};
|
|
402
|
-
}
|
|
403
|
-
|
|
404
228
|
//#endregion
|
|
405
229
|
//#region src/client/fab-pos.ts
|
|
406
230
|
const clamp01 = (v) => Math.max(0, Math.min(1, v));
|
|
@@ -502,7 +326,7 @@ function shouldShowGen1SettingsGear(hasConfigForms, hasOpenSettingsDocument) {
|
|
|
502
326
|
*
|
|
503
327
|
* Keep in sync with package.json — `node scripts/bump.mjs <version>` writes both.
|
|
504
328
|
*/
|
|
505
|
-
const CLIENT_BUILD = "1.
|
|
329
|
+
const CLIENT_BUILD = "1.12.0";
|
|
506
330
|
|
|
507
331
|
//#endregion
|
|
508
332
|
//#region src/client/index.ts
|
|
@@ -1585,15 +1409,17 @@ function makeBridgeScope() {
|
|
|
1585
1409
|
}
|
|
1586
1410
|
};
|
|
1587
1411
|
}
|
|
1588
|
-
function
|
|
1412
|
+
function ownSettingsScope(ctx) {
|
|
1589
1413
|
var forms = typeof ctx.get === "function" ? ctx.get("configForms") : void 0;
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1414
|
+
return (forms && typeof forms.get === "function" ? forms.get("dsh-browser-cdp") : void 0) || makeBridgeScope();
|
|
1415
|
+
}
|
|
1416
|
+
function mountOwnSettingsSection(ctx) {
|
|
1417
|
+
var scope = ownSettingsScope(ctx);
|
|
1418
|
+
ctx.slots.inject("settings.section", function() {
|
|
1593
1419
|
return ctx.slots.register({
|
|
1594
|
-
name: "
|
|
1420
|
+
name: "settings.section",
|
|
1595
1421
|
id: "dsh-browser-cdp",
|
|
1596
|
-
order:
|
|
1422
|
+
order: 210,
|
|
1597
1423
|
label: function() {
|
|
1598
1424
|
return wt("famTitle");
|
|
1599
1425
|
},
|
|
@@ -1601,61 +1427,44 @@ function mountFamilySettingsCard(ctx) {
|
|
|
1601
1427
|
return { scope };
|
|
1602
1428
|
}
|
|
1603
1429
|
}, FamilySettingsCard);
|
|
1604
|
-
}, "dsh-browser-cdp:
|
|
1605
|
-
var claim = claimFamilyHostIfOrphaned(ctx.slots, function() {
|
|
1606
|
-
try {
|
|
1607
|
-
return ctx.slots.entries("settings.section").some(function(e) {
|
|
1608
|
-
return String(e && e.options && e.options.id || "") === "dsh-family";
|
|
1609
|
-
});
|
|
1610
|
-
} catch {
|
|
1611
|
-
return false;
|
|
1612
|
-
}
|
|
1613
|
-
}, function() {
|
|
1614
|
-
return "起子插件设置";
|
|
1615
|
-
}, "[dsh-browser-cdp]", {
|
|
1616
|
-
id: "dsh-browser-cdp",
|
|
1617
|
-
component: FamilySettingsCard,
|
|
1618
|
-
inject: function() {
|
|
1619
|
-
return { scope };
|
|
1620
|
-
}
|
|
1621
|
-
});
|
|
1622
|
-
if (typeof ctx.effect === "function") ctx.effect(function() {
|
|
1623
|
-
return claim;
|
|
1624
|
-
}, "dsh-browser-cdp: family host backstop");
|
|
1430
|
+
}, "dsh-browser-cdp: own settings section");
|
|
1625
1431
|
}
|
|
1626
|
-
function
|
|
1627
|
-
|
|
1628
|
-
var scope = forms && typeof forms.get === "function" ? forms.get("dsh-browser-cdp") : void 0;
|
|
1629
|
-
if (!scope) scope = makeBridgeScope();
|
|
1630
|
-
ctx.slots.inject("plugins.bundle.config", function() {
|
|
1432
|
+
function mountSettingsSectionIcon(ctx) {
|
|
1433
|
+
ctx.slots.inject("settings.section.icon", function() {
|
|
1631
1434
|
return ctx.slots.register({
|
|
1632
|
-
name: "
|
|
1633
|
-
|
|
1435
|
+
name: "settings.section.icon",
|
|
1436
|
+
id: "dsh-browser-cdp",
|
|
1437
|
+
order: 210,
|
|
1634
1438
|
inject: function() {
|
|
1635
|
-
return {
|
|
1439
|
+
return {};
|
|
1636
1440
|
}
|
|
1637
|
-
},
|
|
1638
|
-
}, "dsh-browser-cdp:
|
|
1441
|
+
}, SettingsSectionIcon);
|
|
1442
|
+
}, "dsh-browser-cdp: settings section icon");
|
|
1639
1443
|
}
|
|
1640
|
-
function
|
|
1641
|
-
var
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}, "dsh-browser-cdp: legacy gen-2 settings card");
|
|
1444
|
+
function SettingsSectionIcon(props) {
|
|
1445
|
+
var size = typeof props.size === "number" && props.size > 0 ? props.size : 16;
|
|
1446
|
+
return React.createElement("span", {
|
|
1447
|
+
style: {
|
|
1448
|
+
display: "inline-flex",
|
|
1449
|
+
width: size + "px",
|
|
1450
|
+
height: size + "px",
|
|
1451
|
+
alignItems: "center",
|
|
1452
|
+
justifyContent: "center"
|
|
1453
|
+
},
|
|
1454
|
+
dangerouslySetInnerHTML: { __html: ICON_GLOBE }
|
|
1455
|
+
});
|
|
1653
1456
|
}
|
|
1654
1457
|
function mountGen1SettingsGear(ctx) {
|
|
1655
1458
|
var forms = typeof ctx.get === "function" ? ctx.get("configForms") : void 0;
|
|
1656
1459
|
var hasConfigForms = !!(forms && typeof forms.get === "function");
|
|
1657
|
-
var
|
|
1658
|
-
|
|
1460
|
+
var hasOpenDoc = false;
|
|
1461
|
+
try {
|
|
1462
|
+
var remote = (typeof ctx.get === "function" ? ctx.get("remote") : void 0) || ctx.remote;
|
|
1463
|
+
hasOpenDoc = !!(remote && remote.settings && typeof remote.settings.openSettingsDocument === "function");
|
|
1464
|
+
} catch (e) {
|
|
1465
|
+
hasOpenDoc = false;
|
|
1466
|
+
}
|
|
1467
|
+
if (!shouldShowGen1SettingsGear(hasConfigForms, hasOpenDoc)) return;
|
|
1659
1468
|
var scope = makeBridgeScope();
|
|
1660
1469
|
ctx.slots.inject("shell.overlay", function() {
|
|
1661
1470
|
return ctx.slots.register({
|
|
@@ -1760,9 +1569,25 @@ function SettingsGearOverlay(props) {
|
|
|
1760
1569
|
}
|
|
1761
1570
|
}, "×")), h(FamilySettingsCard, { scope }))) : null);
|
|
1762
1571
|
}
|
|
1572
|
+
function foldKey(gk) {
|
|
1573
|
+
return "bcdp.settings.fold." + gk;
|
|
1574
|
+
}
|
|
1575
|
+
function readFold(gk) {
|
|
1576
|
+
try {
|
|
1577
|
+
return window.localStorage.getItem(foldKey(gk)) === "1";
|
|
1578
|
+
} catch (e) {
|
|
1579
|
+
return false;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
function writeFold(gk, open) {
|
|
1583
|
+
try {
|
|
1584
|
+
window.localStorage.setItem(foldKey(gk), open ? "1" : "0");
|
|
1585
|
+
} catch (e) {}
|
|
1586
|
+
}
|
|
1763
1587
|
var FAM_FIELD_GROUPS = [
|
|
1764
1588
|
{
|
|
1765
1589
|
gk: "gTools",
|
|
1590
|
+
foldable: true,
|
|
1766
1591
|
en: "Tool sealing",
|
|
1767
1592
|
zh: "工具封印",
|
|
1768
1593
|
fields: [
|
|
@@ -1807,6 +1632,7 @@ var FAM_FIELD_GROUPS = [
|
|
|
1807
1632
|
},
|
|
1808
1633
|
{
|
|
1809
1634
|
gk: "gBasic",
|
|
1635
|
+
foldable: true,
|
|
1810
1636
|
en: "Basics",
|
|
1811
1637
|
zh: "基础",
|
|
1812
1638
|
fields: [
|
|
@@ -1882,6 +1708,7 @@ var FAM_FIELD_GROUPS = [
|
|
|
1882
1708
|
},
|
|
1883
1709
|
{
|
|
1884
1710
|
gk: "gCapture",
|
|
1711
|
+
foldable: true,
|
|
1885
1712
|
en: "Capture & streaming",
|
|
1886
1713
|
zh: "截图与推流",
|
|
1887
1714
|
fields: [
|
|
@@ -2039,6 +1866,7 @@ var FAM_FIELD_GROUPS = [
|
|
|
2039
1866
|
},
|
|
2040
1867
|
{
|
|
2041
1868
|
gk: "gJudge",
|
|
1869
|
+
foldable: true,
|
|
2042
1870
|
en: "Judgement (JEV / Laya)",
|
|
2043
1871
|
zh: "评审(JEV / Laya)",
|
|
2044
1872
|
fields: [
|
|
@@ -2161,7 +1989,13 @@ function FamilySettingsCard(props) {
|
|
|
2161
1989
|
return h("div", { style: {
|
|
2162
1990
|
display: "grid",
|
|
2163
1991
|
gap: "8px"
|
|
2164
|
-
} },
|
|
1992
|
+
} }, h(FamLinks, {
|
|
1993
|
+
key: "links",
|
|
1994
|
+
first: true,
|
|
1995
|
+
value,
|
|
1996
|
+
writable,
|
|
1997
|
+
scope
|
|
1998
|
+
}), FAM_FIELD_GROUPS.map(function(group) {
|
|
2165
1999
|
return h(FamGroup, {
|
|
2166
2000
|
key: group.gk,
|
|
2167
2001
|
group,
|
|
@@ -2169,25 +2003,65 @@ function FamilySettingsCard(props) {
|
|
|
2169
2003
|
writable,
|
|
2170
2004
|
scope
|
|
2171
2005
|
});
|
|
2172
|
-
}), h(FamLinks, {
|
|
2173
|
-
key: "links",
|
|
2174
|
-
value,
|
|
2175
|
-
writable,
|
|
2176
|
-
scope
|
|
2177
2006
|
}));
|
|
2178
2007
|
}
|
|
2179
2008
|
function FamGroup(props) {
|
|
2180
2009
|
var group = props.group;
|
|
2181
2010
|
var h = React.createElement;
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2011
|
+
var title = _egoLocale === "zh" ? group.zh : group.en;
|
|
2012
|
+
var foldable = group.foldable === true;
|
|
2013
|
+
var foldState = React.useState(function() {
|
|
2014
|
+
return foldable ? readFold(group.gk) : true;
|
|
2015
|
+
});
|
|
2016
|
+
var open = foldState[0], setOpen = foldState[1];
|
|
2017
|
+
var headStyle = {
|
|
2186
2018
|
fontSize: "12px",
|
|
2187
2019
|
fontWeight: 600,
|
|
2188
2020
|
color: "var(--dsw-alias-label-secondary, rgba(127,127,127,.9))",
|
|
2189
2021
|
padding: "2px 0 4px"
|
|
2190
|
-
}
|
|
2022
|
+
};
|
|
2023
|
+
var chevronStyle = {
|
|
2024
|
+
fontSize: "10px",
|
|
2025
|
+
lineHeight: "16px",
|
|
2026
|
+
flex: "0 0 auto",
|
|
2027
|
+
color: "var(--dsw-alias-label-tertiary, rgba(127,127,127,.8))"
|
|
2028
|
+
};
|
|
2029
|
+
function toggle() {
|
|
2030
|
+
var next = !open;
|
|
2031
|
+
setOpen(next);
|
|
2032
|
+
writeFold(group.gk, next);
|
|
2033
|
+
}
|
|
2034
|
+
return h("div", { style: {
|
|
2035
|
+
borderTop: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.25))",
|
|
2036
|
+
paddingTop: "6px"
|
|
2037
|
+
} }, foldable ? h("button", {
|
|
2038
|
+
type: "button",
|
|
2039
|
+
onClick: toggle,
|
|
2040
|
+
"aria-expanded": open,
|
|
2041
|
+
"aria-label": title,
|
|
2042
|
+
style: {
|
|
2043
|
+
display: "flex",
|
|
2044
|
+
alignItems: "center",
|
|
2045
|
+
gap: "6px",
|
|
2046
|
+
width: "100%",
|
|
2047
|
+
background: "none",
|
|
2048
|
+
border: "none",
|
|
2049
|
+
padding: 0,
|
|
2050
|
+
margin: 0,
|
|
2051
|
+
cursor: "pointer",
|
|
2052
|
+
font: "inherit",
|
|
2053
|
+
textAlign: "left",
|
|
2054
|
+
color: "inherit"
|
|
2055
|
+
}
|
|
2056
|
+
}, h("span", { style: chevronStyle }, open ? "▾" : "▸"), h("span", { style: {
|
|
2057
|
+
...headStyle,
|
|
2058
|
+
flex: "1 1 auto",
|
|
2059
|
+
minWidth: 0
|
|
2060
|
+
} }, title), h("span", { style: {
|
|
2061
|
+
fontSize: "10px",
|
|
2062
|
+
flex: "0 0 auto",
|
|
2063
|
+
color: "var(--dsw-alias-label-tertiary, rgba(127,127,127,.7))"
|
|
2064
|
+
} }, open ? "" : String(group.fields.length) + (_egoLocale === "zh" ? " 项" : " items"))) : h("div", { style: headStyle }, title), foldable && !open ? null : group.fields.map(function(f) {
|
|
2191
2065
|
return h(FamField, {
|
|
2192
2066
|
key: f.k,
|
|
2193
2067
|
f,
|
|
@@ -2666,7 +2540,11 @@ function FamLinks(props) {
|
|
|
2666
2540
|
commitField(scope, "cdpMode", "local");
|
|
2667
2541
|
}
|
|
2668
2542
|
}, wt("linksActivate"))));
|
|
2669
|
-
return h("div", { style: {
|
|
2543
|
+
return h("div", { style: props.first === true ? {
|
|
2544
|
+
paddingTop: "0",
|
|
2545
|
+
display: "grid",
|
|
2546
|
+
gap: "4px"
|
|
2547
|
+
} : {
|
|
2670
2548
|
borderTop: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.25))",
|
|
2671
2549
|
paddingTop: "6px",
|
|
2672
2550
|
display: "grid",
|
|
@@ -2922,9 +2800,8 @@ function FamLinks(props) {
|
|
|
2922
2800
|
}
|
|
2923
2801
|
function apply(ctx) {
|
|
2924
2802
|
var mounts = [
|
|
2925
|
-
["
|
|
2926
|
-
["
|
|
2927
|
-
["legacy gen-2 settings card", mountLegacySettingsCard],
|
|
2803
|
+
["own settings section", mountOwnSettingsSection],
|
|
2804
|
+
["settings section icon", mountSettingsSectionIcon],
|
|
2928
2805
|
["gen-1 settings gear", mountGen1SettingsGear],
|
|
2929
2806
|
["picks dock", mountPicksDockCard],
|
|
2930
2807
|
["picks badge", mountPicksBadge]
|
package/lib/index.js
CHANGED
|
@@ -2169,7 +2169,7 @@ function focusIdFrom(value) {
|
|
|
2169
2169
|
*
|
|
2170
2170
|
* Keep in sync with package.json — `node scripts/bump.mjs <version>` writes both.
|
|
2171
2171
|
*/
|
|
2172
|
-
const CLIENT_BUILD = "1.
|
|
2172
|
+
const CLIENT_BUILD = "1.12.0";
|
|
2173
2173
|
|
|
2174
2174
|
//#endregion
|
|
2175
2175
|
//#region src/cast-server.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "dsh-browser-cdp: visible agent browser for DSH — drives the vendored ego-compatible Chromium over CDP, and can also attach to a running Chrome/Edge/Brave or route through egolite, Tabbit and Lightpanda backends. 35 structured bcdp_* tools; only bcdp_status stays resident by default (lazy injection, −91.9% schema per turn for non-browser sessions). Realtime watch panel with direct click/scroll/IME input, element picks quoted into the composer, human-verification notices; non-CDP channels sync frames by 3s polling. Web shell: floating watch ball without dsh-better-sidebar, sidebar tab with it. Headless/TUI hosts: tools-only. [DSH 0.1.0-rc.2 ~ 0.2.2-rc.1: declarative settings via Config .volatile() fields on 0.1.7+; imperative installSection / module-level registration + describe/mutate bridge on 0.1.0 ~ 0.1.5 (experimental, pending farm). Client peers stay optional so gen-1 hosts without dsh-client-store still load; for a production install on the current line use the 0.17.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@deepseek-ai/dsh-session": "^0.2.1-rc.3",
|
|
125
125
|
"@deepseek-ai/dsh-skill": "^0.2.1-rc.3",
|
|
126
126
|
"@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.3",
|
|
127
|
-
"@deepseek-ai/dsh-tools": ">=0.1
|
|
127
|
+
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.1 <0.2.2-0",
|
|
128
128
|
"@deepseek-ai/dsh-user-approval": "^0.2.1-rc.3",
|
|
129
129
|
"@deepseek-ai/dsh-working-directory": "^0.2.1-rc.3",
|
|
130
130
|
"@types/node": "^22.20.1",
|