dsh-browser-cdp 0.17.5 → 0.17.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/dsh-plugin.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
3
3
  "id": "dsh-browser-cdp",
4
4
  "name": "dsh-browser-cdp",
5
- "version": "0.17.5",
5
+ "version": "0.17.6",
6
6
  "manifestVersion": "0.15",
7
7
  "facets": {
8
8
  "host": {
package/lib/client.js CHANGED
@@ -164,6 +164,8 @@ const zh = {
164
164
  "linksCliRemoteWarn": "cdpMode=remote 时激活 ego CLI 会报 mode-kind-mismatch",
165
165
  "linksCliSdk": "使用内置 harness",
166
166
  "linksDisabledHint": "已停用——先勾选启用才能激活",
167
+ "linksLocalRow": "本机 Chrome(受管启动)",
168
+ "linksLocalEnableHint": "勾选 = 允许 auto 模式在激活目标不可达时回落本机启动",
167
169
  "linksActivate": "激活"
168
170
  };
169
171
  /** English dictionary, checked complete against the zh key set. */
@@ -310,6 +312,8 @@ const en = {
310
312
  "linksCliRemoteWarn": "Activating an ego CLI link under cdpMode=remote fails with mode-kind-mismatch",
311
313
  "linksCliSdk": "Use bundled harness",
312
314
  "linksDisabledHint": "Disabled — enable it before activating",
315
+ "linksLocalRow": "Local Chrome (managed)",
316
+ "linksLocalEnableHint": "Checked = auto mode may fall back to the managed local browser when the activated target is unreachable",
313
317
  "linksActivate": "activate"
314
318
  };
315
319
  /** Japanese dictionary, checked complete against the zh key set. */
@@ -456,6 +460,8 @@ const ja = {
456
460
  "linksCliRemoteWarn": "cdpMode=remote で ego CLI をアクティブ化すると mode-kind-mismatch になります",
457
461
  "linksCliSdk": "同梱ハーネスを使う",
458
462
  "linksDisabledHint": "無効 — アクティブ化する前に有効化してください",
463
+ "linksLocalRow": "ローカル Chrome(管理起動)",
464
+ "linksLocalEnableHint": "チェック = アクティブなターゲットに到達できない場合、auto モードはローカル起動にフォールバックします",
459
465
  "linksActivate": "アクティブ化"
460
466
  };
461
467
  /** Korean dictionary, checked complete against the zh key set. */
@@ -602,6 +608,8 @@ const ko = {
602
608
  "linksCliRemoteWarn": "cdpMode=remote에서 ego CLI를 활성화하면 mode-kind-mismatch가 발생합니다",
603
609
  "linksCliSdk": "내장 하네스 사용",
604
610
  "linksDisabledHint": "비활성 — 활성화하기 전에 사용으로 설정하세요",
611
+ "linksLocalRow": "로컬 Chrome(관리 시작)",
612
+ "linksLocalEnableHint": "체크 = 활성 대상에 도달할 수 없을 때 auto 모드가 로컬 시작으로 대체됩니다",
605
613
  "linksActivate": "활성화"
606
614
  };
607
615
  /** French dictionary, checked complete against the zh key set. */
@@ -748,6 +756,8 @@ const fr = {
748
756
  "linksCliRemoteWarn": "Activer un lien ego CLI avec cdpMode=remote échoue avec mode-kind-mismatch",
749
757
  "linksCliSdk": "Utiliser le harnais intégré",
750
758
  "linksDisabledHint": "Désactivé — activez-le avant de le rendre actif",
759
+ "linksLocalRow": "Chrome local (gestionné)",
760
+ "linksLocalEnableHint": "Coché = le mode auto peut basculer vers le navigateur local si la cible activée est injoignable",
751
761
  "linksActivate": "activer"
752
762
  };
753
763
  /** German dictionary, checked complete against the zh key set. */
@@ -894,6 +904,8 @@ const de = {
894
904
  "linksCliRemoteWarn": "Aktivieren eines ego-CLI-Links bei cdpMode=remote schlägt mit mode-kind-mismatch fehl",
895
905
  "linksCliSdk": "Mitgeliefertes Harness verwenden",
896
906
  "linksDisabledHint": "Deaktiviert — erst aktivieren, dann aktiv schalten",
907
+ "linksLocalRow": "Lokales Chrome (verwaltet)",
908
+ "linksLocalEnableHint": "Aktiviert = der Auto-Modus darf auf den verwalteten lokalen Browser ausweichen, wenn das aktivierte Ziel nicht erreichbar ist",
897
909
  "linksActivate": "aktivieren"
898
910
  };
899
911
  /** Italian dictionary, checked complete against the zh key set. */
@@ -1040,6 +1052,8 @@ const it = {
1040
1052
  "linksCliRemoteWarn": "Attivare un link ego CLI con cdpMode=remote fallisce con mode-kind-mismatch",
1041
1053
  "linksCliSdk": "Usa harness integrato",
1042
1054
  "linksDisabledHint": "Disabilitato — abilitalo prima di attivarlo",
1055
+ "linksLocalRow": "Chrome locale (gestito)",
1056
+ "linksLocalEnableHint": "Selezionato = la modalità auto può ripiegare sul browser locale gestito se la destinazione attiva è irraggiungibile",
1043
1057
  "linksActivate": "attiva"
1044
1058
  };
1045
1059
  /** Russian dictionary, checked complete against the zh key set. */
@@ -1186,6 +1200,8 @@ const ru = {
1186
1200
  "linksCliRemoteWarn": "Активация ego CLI при cdpMode=remote завершится ошибкой mode-kind-mismatch",
1187
1201
  "linksCliSdk": "Использовать встроенный harness",
1188
1202
  "linksDisabledHint": "Отключено — сначала включите, затем активируйте",
1203
+ "linksLocalRow": "Локальный Chrome (управляемый)",
1204
+ "linksLocalEnableHint": "Отмечено = режим auto может откатиться на управляемый локальный браузер, если активная цель недоступна",
1189
1205
  "linksActivate": "активировать"
1190
1206
  };
1191
1207
  /** Spanish dictionary, checked complete against the zh key set. */
@@ -1332,6 +1348,8 @@ const es = {
1332
1348
  "linksCliRemoteWarn": "Activar un enlace ego CLI con cdpMode=remote falla con mode-kind-mismatch",
1333
1349
  "linksCliSdk": "Usar harness integrado",
1334
1350
  "linksDisabledHint": "Desactivado — actívalo antes de activarlo",
1351
+ "linksLocalRow": "Chrome local (gestionado)",
1352
+ "linksLocalEnableHint": "Marcado = el modo auto puede replegarse al navegador local gestionado si el destino activo no responde",
1335
1353
  "linksActivate": "activar"
1336
1354
  };
1337
1355
  /** All nine dictionaries, handed to the locale service in ONE register call. */
@@ -2711,6 +2729,7 @@ function FamLinks(props) {
2711
2729
  return;
2712
2730
  }
2713
2731
  writeLinks(res.links);
2732
+ if (activeId === "") scope.set("activeTargetId", res.links[res.links.length - 1].id);
2714
2733
  setAddLabel("");
2715
2734
  setAddEndpoint("");
2716
2735
  setErrText("");
@@ -2725,6 +2744,7 @@ function FamLinks(props) {
2725
2744
  return;
2726
2745
  }
2727
2746
  writeLinks(res.links);
2747
+ if (activeId === "") scope.set("activeTargetId", res.links[res.links.length - 1].id);
2728
2748
  setAddCliPath("");
2729
2749
  setErrText("");
2730
2750
  }
@@ -2754,6 +2774,47 @@ function FamLinks(props) {
2754
2774
  setProbingId("");
2755
2775
  });
2756
2776
  }
2777
+ var localActive = cdpMode === "local";
2778
+ var localRow = h("div", {
2779
+ key: "fam-links-local",
2780
+ style: {
2781
+ borderTop: "1px dashed var(--dsw-alias-border-l2, rgba(127,127,127,.18))",
2782
+ padding: "6px 0",
2783
+ display: "grid",
2784
+ gap: "4px"
2785
+ }
2786
+ }, h("div", { style: {
2787
+ display: "flex",
2788
+ alignItems: "center",
2789
+ gap: "8px",
2790
+ flexWrap: "wrap"
2791
+ } }, h("input", {
2792
+ type: "checkbox",
2793
+ checked: value.allowLocalFallback === true,
2794
+ disabled: !writable,
2795
+ title: wt("linksLocalEnableHint"),
2796
+ onChange: function(e) {
2797
+ scope.set("allowLocalFallback", e.target.checked);
2798
+ }
2799
+ }), h("span", { style: badgeStyle }, "LOCAL"), h("span", { style: {
2800
+ fontSize: "13px",
2801
+ color: "var(--dsw-alias-label-primary, inherit)",
2802
+ flex: "1 1 120px",
2803
+ overflow: "hidden",
2804
+ textOverflow: "ellipsis",
2805
+ whiteSpace: "nowrap"
2806
+ } }, wt("linksLocalRow")), localActive ? h("span", { style: {
2807
+ fontSize: "11px",
2808
+ color: "#30d158",
2809
+ flex: "0 0 auto"
2810
+ } }, wt("linksActive")) : h("button", {
2811
+ type: "button",
2812
+ disabled: !writable,
2813
+ style: btnStyle,
2814
+ onClick: function() {
2815
+ scope.set("cdpMode", "local");
2816
+ }
2817
+ }, wt("linksActivate"))));
2757
2818
  return h("div", { style: {
2758
2819
  borderTop: "1px solid var(--dsw-alias-border-l2, rgba(127,127,127,.25))",
2759
2820
  paddingTop: "6px",
@@ -2819,6 +2880,7 @@ function FamLinks(props) {
2819
2880
  style: btnStyle,
2820
2881
  onClick: function() {
2821
2882
  scope.set("activeTargetId", row.id);
2883
+ if (cdpMode === "local") scope.set("cdpMode", "auto");
2822
2884
  }
2823
2885
  }, wt("linksActivate"))), h("div", { style: {
2824
2886
  display: "flex",
@@ -2891,7 +2953,7 @@ function FamLinks(props) {
2891
2953
  color: "#ff9f0a",
2892
2954
  flex: "1 1 100%"
2893
2955
  } }, wt("linksCliRemoteWarn")) : null));
2894
- }), h("div", { style: {
2956
+ }), localRow, h("div", { style: {
2895
2957
  display: "grid",
2896
2958
  gap: "6px",
2897
2959
  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.17.5",
3
+ "version": "0.17.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+ line: declarative settings via Config .volatile() fields; for DSH 0.1.2-rc.1 ~ 0.1.6 use the 0.16.x line]",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",