dsh-browser-cdp 0.18.1 → 0.18.2
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/dsh-plugin.json +1 -1
- package/lib/client.js +53 -3
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/dsh-plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -281,7 +281,10 @@ var watchEn = {
|
|
|
281
281
|
linksWriteFailed: "Save failed — the settings layer rejected this write",
|
|
282
282
|
linksCliRemoteWarn: "Activating an ego CLI link under cdpMode=remote fails with mode-kind-mismatch",
|
|
283
283
|
linksCliSdk: "Use bundled harness",
|
|
284
|
-
linksDisabledHint: "Disabled — enable it before activating"
|
|
284
|
+
linksDisabledHint: "Disabled — enable it before activating",
|
|
285
|
+
linksActivate: "activate",
|
|
286
|
+
linksLocalRow: "Local Chrome (managed)",
|
|
287
|
+
linksLocalEnableHint: "Checked = auto mode may fall back to the managed local browser when the activated target is unreachable"
|
|
285
288
|
};
|
|
286
289
|
var watchDict = {
|
|
287
290
|
en: watchEn,
|
|
@@ -364,7 +367,10 @@ var watchDict = {
|
|
|
364
367
|
linksWriteFailed: "保存失败——设置层拒绝了这次写入",
|
|
365
368
|
linksCliRemoteWarn: "cdpMode=remote 时激活 ego CLI 会报 mode-kind-mismatch",
|
|
366
369
|
linksCliSdk: "使用内置 harness",
|
|
367
|
-
linksDisabledHint: "已停用——先勾选启用才能激活"
|
|
370
|
+
linksDisabledHint: "已停用——先勾选启用才能激活",
|
|
371
|
+
linksActivate: "激活",
|
|
372
|
+
linksLocalRow: "本机 Chrome(受管启动)",
|
|
373
|
+
linksLocalEnableHint: "勾选 = 允许 auto 模式在激活目标不可达时回落本机启动"
|
|
368
374
|
}
|
|
369
375
|
};
|
|
370
376
|
function wt(key, params = void 0) {
|
|
@@ -1545,6 +1551,7 @@ function FamLinks(props) {
|
|
|
1545
1551
|
return;
|
|
1546
1552
|
}
|
|
1547
1553
|
writeLinks(res.links);
|
|
1554
|
+
if (activeId === "") scope.set("activeTargetId", res.links[res.links.length - 1].id);
|
|
1548
1555
|
setAddLabel("");
|
|
1549
1556
|
setAddEndpoint("");
|
|
1550
1557
|
setErrText("");
|
|
@@ -1559,6 +1566,7 @@ function FamLinks(props) {
|
|
|
1559
1566
|
return;
|
|
1560
1567
|
}
|
|
1561
1568
|
writeLinks(res.links);
|
|
1569
|
+
if (activeId === "") scope.set("activeTargetId", res.links[res.links.length - 1].id);
|
|
1562
1570
|
setAddCliPath("");
|
|
1563
1571
|
setErrText("");
|
|
1564
1572
|
}
|
|
@@ -1588,6 +1596,47 @@ function FamLinks(props) {
|
|
|
1588
1596
|
setProbingId("");
|
|
1589
1597
|
});
|
|
1590
1598
|
}
|
|
1599
|
+
var localActive = cdpMode === "local";
|
|
1600
|
+
var localRow = h("div", {
|
|
1601
|
+
key: "fam-links-local",
|
|
1602
|
+
style: {
|
|
1603
|
+
borderTop: "1px dashed var(--dsw-alias-border-l2, rgba(127,127,127,.18))",
|
|
1604
|
+
padding: "6px 0",
|
|
1605
|
+
display: "grid",
|
|
1606
|
+
gap: "4px"
|
|
1607
|
+
}
|
|
1608
|
+
}, h("div", { style: {
|
|
1609
|
+
display: "flex",
|
|
1610
|
+
alignItems: "center",
|
|
1611
|
+
gap: "8px",
|
|
1612
|
+
flexWrap: "wrap"
|
|
1613
|
+
} }, h("input", {
|
|
1614
|
+
type: "checkbox",
|
|
1615
|
+
checked: value.allowLocalFallback === true,
|
|
1616
|
+
disabled: !writable,
|
|
1617
|
+
title: wt("linksLocalEnableHint"),
|
|
1618
|
+
onChange: function(e) {
|
|
1619
|
+
scope.set("allowLocalFallback", e.target.checked);
|
|
1620
|
+
}
|
|
1621
|
+
}), h("span", { style: badgeStyle }, "LOCAL"), h("span", { style: {
|
|
1622
|
+
fontSize: "13px",
|
|
1623
|
+
color: "var(--dsw-alias-label-primary, inherit)",
|
|
1624
|
+
flex: "1 1 120px",
|
|
1625
|
+
overflow: "hidden",
|
|
1626
|
+
textOverflow: "ellipsis",
|
|
1627
|
+
whiteSpace: "nowrap"
|
|
1628
|
+
} }, wt("linksLocalRow")), localActive ? h("span", { style: {
|
|
1629
|
+
fontSize: "11px",
|
|
1630
|
+
color: "#30d158",
|
|
1631
|
+
flex: "0 0 auto"
|
|
1632
|
+
} }, wt("linksActive")) : h("button", {
|
|
1633
|
+
type: "button",
|
|
1634
|
+
disabled: !writable,
|
|
1635
|
+
style: btnStyle,
|
|
1636
|
+
onClick: function() {
|
|
1637
|
+
scope.set("cdpMode", "local");
|
|
1638
|
+
}
|
|
1639
|
+
}, wt("linksActivate"))));
|
|
1591
1640
|
return h("div", { style: {
|
|
1592
1641
|
borderTop: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.25))",
|
|
1593
1642
|
paddingTop: "6px",
|
|
@@ -1653,6 +1702,7 @@ function FamLinks(props) {
|
|
|
1653
1702
|
style: btnStyle,
|
|
1654
1703
|
onClick: function() {
|
|
1655
1704
|
scope.set("activeTargetId", row.id);
|
|
1705
|
+
if (cdpMode === "local") scope.set("cdpMode", "auto");
|
|
1656
1706
|
}
|
|
1657
1707
|
}, wt("linksActivate"))), h("div", { style: {
|
|
1658
1708
|
display: "flex",
|
|
@@ -1725,7 +1775,7 @@ function FamLinks(props) {
|
|
|
1725
1775
|
color: "#ff9f0a",
|
|
1726
1776
|
flex: "1 1 100%"
|
|
1727
1777
|
} }, wt("linksCliRemoteWarn")) : null));
|
|
1728
|
-
}), h("div", { style: {
|
|
1778
|
+
}), localRow, h("div", { style: {
|
|
1729
1779
|
display: "grid",
|
|
1730
1780
|
gap: "6px",
|
|
1731
1781
|
paddingTop: "4px"
|
package/lib/index.js
CHANGED
|
@@ -2437,7 +2437,7 @@ const Config$1 = z.object({
|
|
|
2437
2437
|
cdpProbeTimeoutMs: z.number().min(200).max(3e4).step(100).description("Timeout for one CDP endpoint probe (http endpoints answer /json/version)."),
|
|
2438
2438
|
cursorHud: z.boolean().description("Draw the agent cursor HUD into screenshots."),
|
|
2439
2439
|
cursorName: z.string().description("Name label shown in the cursor HUD."),
|
|
2440
|
-
allowLocalFallback: z.boolean().description("auto mode may fall back to launching a local browser when the activated target is unreachable. Off by default: the fallback must be explicit."),
|
|
2440
|
+
allowLocalFallback: z.boolean().description("auto mode may fall back to launching a local browser when the activated target is unreachable. Off by default: the fallback must be explicit.").volatile(),
|
|
2441
2441
|
legacyEgoToolNames: z.boolean().description("ALSO register the tools under their old ego_* names for scripts written before the bcdp_* rename. Off by default; mutually exclusive with installing the upstream ego-browser plugin (same tool names)."),
|
|
2442
2442
|
localHeadless: z.boolean().description("Run the locally launched browser headless."),
|
|
2443
2443
|
remoteEnabled: z.boolean().description("Master switch for REMOTE attach. Off = the configured target sequence is preserved but inert (nothing probes or connects remotely); flip back on any time. Does not affect cdpMode=local.").volatile(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-browser-cdp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
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.2.0-rc.1+ line: declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.7 use the 0.17.x line]",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|