dsh-browser-cdp 1.14.7 → 1.14.9

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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 1.14.8 (2026-11-22)
2
+
3
+ **面板路由 base 化(上游 #100 同构,修法沿用):反向代理子路径部署下 `/api/bcdp/*` 不再打到代理根。**
4
+
5
+ 反向审计确认的第四个平行面。client 内 27 处根绝对路径 `/api/bcdp/...`(18 个路由常量 + 6 处散装 fetch + 3 处 EventSource)在 DSH 被挂在反向代理前缀(如 `/app/dsh/`)下时全部指向代理根——上游 #100 已实证并修复。
6
+
7
+ - **修复**:client 顶部加 `bcdpRouteBase`/`bcdpRoute`/`fetchBcdp`(沿用上游已验证形态):读部署页 `<base href>`,经 `new URL(href, document.baseURI)` 取 pathname 作前缀;**无 `<base>` 时回退 `''`**——桌面根路径部署行为逐字节不变,子路径部署自动生效。全部路由常量值包 `bcdpRoute(...)`,散装 fetch 改 `fetchBcdp(...)`,`EventSource('/api/bcdp/stream')` 改 `EventSource(bcdpRoute(...))`。
8
+ - **契约测试**:client-render-contract 套件新增 route base 用例——bcdpRouteBase 存在(base href + document.baseURI 回退)、**无裸 `fetch('/api/bcdp` / 裸 `= '/api/bcdp` 残留**、SSE 走 bcdpRoute。
9
+ - **实施注记**:批量替换在多行 fetch(URL 后跟 `, {init}`)处产生孤立括号——tsc 语法错 25 处当场暴露,两类定向修复(孤立 init、多余右括号)后归零;typecheck 是这类批量改形的真实门禁。
10
+
11
+ 门禁:`npm run typecheck` 干净(修复后);`npm test` **1344 passed / 13 skipped**(+1 route base 契约用例);`npm run build` 后 lib/client.js 含 bcdpRouteBase ×2。
12
+
1
13
  ## 1.14.7 (2026-11-22)
2
14
 
3
15
  **观察窗帧解码预换(上游 #82/#81 同构,预防性):`img.src` 直换的解码空白窗口收口。**
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": "1.14.7",
5
+ "version": "1.14.9",
6
6
  "manifestVersion": "0.15",
7
7
  "facets": {
8
8
  "host": {
package/lib/client.js CHANGED
@@ -330,6 +330,22 @@ const CLIENT_BUILD = "1.12.2";
330
330
 
331
331
  //#endregion
332
332
  //#region src/client/index.ts
333
+ const bcdpRouteBase = (function() {
334
+ try {
335
+ const base = document.querySelector("base[href]");
336
+ if (!base) return "";
337
+ const path = new URL(base.getAttribute("href") || "./", document.baseURI).pathname.replace(/\/+$/, "");
338
+ return path === "/" ? "" : path;
339
+ } catch (e) {
340
+ return "";
341
+ }
342
+ })();
343
+ const bcdpRoute = function(path) {
344
+ return bcdpRouteBase + path;
345
+ };
346
+ const fetchBcdp = function(path, init) {
347
+ return fetch(bcdpRoute(path), init);
348
+ };
333
349
  var React = require("react");
334
350
  var runtimeClient = null;
335
351
  var createSnapshotStore = null;
@@ -687,16 +703,16 @@ function linkFlushable(link) {
687
703
  var kind = link && link.kind || "";
688
704
  return kind !== "ego-cli" && kind !== "tabbit-cli" && kind !== "lightpanda";
689
705
  }
690
- const SPACES_ROUTE = "/api/bcdp/spaces";
691
- const TRACKING_ROUTE = "/api/bcdp/tracking";
692
- const SWITCH_TAB_ROUTE = "/api/bcdp/switch-tab";
693
- const EGO_CLOSE_ROUTE = "/api/bcdp/close";
694
- const WATCH_START_ROUTE = "/api/bcdp/watch/start";
695
- const WATCH_SWITCH_ROUTE = "/api/bcdp/watch/switch";
696
- const WATCH_STOP_ROUTE = "/api/bcdp/watch/stop";
697
- const WATCH_STATUS_ROUTE = "/api/bcdp/watch/status";
698
- const VIDEO_ROUTE = "/api/bcdp/video";
699
- const CLI_FRAME_ROUTE = "/api/bcdp/cli-frame";
706
+ const SPACES_ROUTE = bcdpRoute("/api/bcdp/spaces");
707
+ const TRACKING_ROUTE = bcdpRoute("/api/bcdp/tracking");
708
+ const SWITCH_TAB_ROUTE = bcdpRoute("/api/bcdp/switch-tab");
709
+ const EGO_CLOSE_ROUTE = bcdpRoute("/api/bcdp/close");
710
+ const WATCH_START_ROUTE = bcdpRoute("/api/bcdp/watch/start");
711
+ const WATCH_SWITCH_ROUTE = bcdpRoute("/api/bcdp/watch/switch");
712
+ const WATCH_STOP_ROUTE = bcdpRoute("/api/bcdp/watch/stop");
713
+ const WATCH_STATUS_ROUTE = bcdpRoute("/api/bcdp/watch/status");
714
+ const VIDEO_ROUTE = bcdpRoute("/api/bcdp/video");
715
+ const CLI_FRAME_ROUTE = bcdpRoute("/api/bcdp/cli-frame");
700
716
  const CLI_FRAME_TARGET_ID = "__cli_frame__";
701
717
  function postJson(path, body) {
702
718
  return fetch(path, {
@@ -2931,16 +2947,16 @@ function mountFloatingWatch(ctx) {
2931
2947
  const captchaEl = panel.querySelector("#dsh-ego-captcha");
2932
2948
  const captchaKindEl = panel.querySelector("#dsh-ego-captcha-kind");
2933
2949
  const captchaHintEl = panel.querySelector("#dsh-ego-captcha-hint");
2934
- const FLUSH_ROUTE$1 = "/api/bcdp/flush";
2935
- const SYNC_ROUTE = "/api/bcdp/sync";
2936
- const CAPTURE_ROUTE = "/api/bcdp/capture";
2950
+ const FLUSH_ROUTE$1 = bcdpRoute("/api/bcdp/flush");
2951
+ const SYNC_ROUTE = bcdpRoute("/api/bcdp/sync");
2952
+ const CAPTURE_ROUTE = bcdpRoute("/api/bcdp/capture");
2937
2953
  const captureTab = (targetId) => fetch(CAPTURE_ROUTE, {
2938
2954
  method: "POST",
2939
2955
  headers: { "content-type": "application/json" },
2940
2956
  cache: "no-store",
2941
2957
  body: JSON.stringify({ targetId })
2942
2958
  }).catch(() => null);
2943
- fetch("/api/bcdp/hello", {
2959
+ fetchBcdp("/api/bcdp/hello", {
2944
2960
  method: "POST",
2945
2961
  headers: { "content-type": "application/json" },
2946
2962
  cache: "no-store",
@@ -3163,7 +3179,7 @@ function mountFloatingWatch(ctx) {
3163
3179
  watchStopTimer = window.setTimeout(stop, 1500);
3164
3180
  }
3165
3181
  };
3166
- const INPUT_ROUTE$1 = "/api/bcdp/input";
3182
+ const INPUT_ROUTE$1 = bcdpRoute("/api/bcdp/input");
3167
3183
  let inputBusy = false;
3168
3184
  /**
3169
3185
  * Send a pointer/wheel intention to the agent browser. Coordinates
@@ -3661,7 +3677,7 @@ function mountFloatingWatch(ctx) {
3661
3677
  raiseBtn.title = wt("raiseWindowHint");
3662
3678
  raiseBtn.textContent = wt("raiseWindow");
3663
3679
  raiseBtn.addEventListener("click", () => {
3664
- fetch("/api/bcdp/raise", {
3680
+ fetchBcdp("/api/bcdp/raise", {
3665
3681
  method: "POST",
3666
3682
  headers: { "content-type": "application/json" },
3667
3683
  body: "{}"
@@ -3878,7 +3894,7 @@ function mountFloatingWatch(ctx) {
3878
3894
  if (sse) sse.close();
3879
3895
  } catch {}
3880
3896
  doConnected = false;
3881
- sse = new EventSource("/api/bcdp/stream");
3897
+ sse = new EventSource(bcdpRoute("/api/bcdp/stream"));
3882
3898
  sse.onopen = () => {
3883
3899
  doConnected = true;
3884
3900
  };
@@ -4186,10 +4202,10 @@ function mountFloatingWatch(ctx) {
4186
4202
  style.remove();
4187
4203
  };
4188
4204
  }
4189
- var INPUT_ROUTE = "/api/bcdp/input";
4190
- var FLUSH_ROUTE = "/api/bcdp/flush";
4191
- var WINDOW_SIZE_ROUTE = "/api/bcdp/window-size";
4192
- var PANEL_NAVIGATE_ROUTE = "/api/bcdp/navigate";
4205
+ var INPUT_ROUTE = bcdpRoute("/api/bcdp/input");
4206
+ var FLUSH_ROUTE = bcdpRoute("/api/bcdp/flush");
4207
+ var WINDOW_SIZE_ROUTE = bcdpRoute("/api/bcdp/window-size");
4208
+ var PANEL_NAVIGATE_ROUTE = bcdpRoute("/api/bcdp/navigate");
4193
4209
  var FRAME_FOLLOW_MIN_MS = 350;
4194
4210
  var SIZE_SYNC_KEY = "dsh-browser-cdp:size-sync";
4195
4211
  function sizeSyncStored() {
@@ -5190,7 +5206,7 @@ function createPickControl(onState, deliver) {
5190
5206
  function post(enabledNow, targetId) {
5191
5207
  var body = { enabled: enabledNow };
5192
5208
  if (targetId) body.targetId = targetId;
5193
- return fetch("/api/bcdp/pick", {
5209
+ return fetchBcdp("/api/bcdp/pick", {
5194
5210
  method: "POST",
5195
5211
  headers: { "content-type": "application/json" },
5196
5212
  body: JSON.stringify(body)
@@ -5225,7 +5241,7 @@ function createPickControl(onState, deliver) {
5225
5241
  }
5226
5242
  function pollOnce() {
5227
5243
  if (request) return;
5228
- request = fetch("/api/bcdp/pick").then(function(r) {
5244
+ request = fetchBcdp("/api/bcdp/pick").then(function(r) {
5229
5245
  return r.json().catch(function() {
5230
5246
  return null;
5231
5247
  });
@@ -5271,7 +5287,7 @@ function createPickControl(onState, deliver) {
5271
5287
  }
5272
5288
  function clickAt(x, y, targetId) {
5273
5289
  if (!enabled || !targetId) return;
5274
- fetch("/api/bcdp/pick/click", {
5290
+ fetchBcdp("/api/bcdp/pick/click", {
5275
5291
  method: "POST",
5276
5292
  headers: { "content-type": "application/json" },
5277
5293
  body: JSON.stringify({
@@ -5773,7 +5789,7 @@ LivePreviewController.prototype.openStream = function() {
5773
5789
  self._applyCaptureStatus(status);
5774
5790
  }).catch(function() {});
5775
5791
  try {
5776
- this.sse = new EventSource("/api/bcdp/stream");
5792
+ this.sse = new EventSource(bcdpRoute("/api/bcdp/stream"));
5777
5793
  } catch (e) {
5778
5794
  return;
5779
5795
  }
@@ -6566,7 +6582,7 @@ function EgoBrowserTab(props) {
6566
6582
  type: "button",
6567
6583
  title: wt("raiseWindowHint"),
6568
6584
  onClick: function() {
6569
- fetch("/api/bcdp/raise", {
6585
+ fetchBcdp("/api/bcdp/raise", {
6570
6586
  method: "POST",
6571
6587
  headers: { "content-type": "application/json" },
6572
6588
  body: "{}"
@@ -6727,7 +6743,7 @@ function mountSidebarTab(ctx, betterSidebar) {
6727
6743
  })();
6728
6744
  var probeSse = null;
6729
6745
  try {
6730
- probeSse = new EventSource("/api/bcdp/stream");
6746
+ probeSse = new EventSource(bcdpRoute("/api/bcdp/stream"));
6731
6747
  } catch (e) {}
6732
6748
  if (probeSse) probeSse.addEventListener("tool-call", function(ev) {
6733
6749
  if (probeDisposed) return;
package/lib/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { d as localBrowserInfo, f as stopLocalBrowser, l as launchLocalBrowser } from "./launcher-Vz8i9ylT.js";
1
+ import { d as localBrowserInfo, f as stopLocalBrowser, l as launchLocalBrowser, p as windowsEnvChromeCandidates } from "./launcher-DfE6ivh_.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { defineTool } from "@deepseek-ai/dsh-tools";
4
4
  import { appendFileSync, constants, createReadStream, createWriteStream, existsSync, mkdirSync, readFileSync, readdirSync } from "node:fs";
5
5
  import { homedir, tmpdir } from "node:os";
6
6
  import { basename, dirname, isAbsolute, join, normalize, resolve, sep } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
- import { access, chmod, copyFile, mkdir, open, readFile, readdir, rename, rm, symlink, writeFile } from "node:fs/promises";
9
8
  import { execFile, spawn } from "node:child_process";
9
+ import { isIP } from "node:net";
10
+ import { access, chmod, copyFile, mkdir, open, readFile, readdir, rename, rm, symlink, writeFile } from "node:fs/promises";
10
11
  import { promisify } from "node:util";
11
12
  import { request } from "node:http";
12
- import { isIP } from "node:net";
13
13
  import { createHash, randomUUID } from "node:crypto";
14
14
  import z from "@deepseek-ai/schemastery";
15
15
  import { pipeline } from "node:stream/promises";
@@ -11157,21 +11157,7 @@ const COMMON_CHROME_BINS = [
11157
11157
  ];
11158
11158
  /** Windows registry-free probe of the usual install dirs (no subprocess). */
11159
11159
  function windowsChromeCandidates() {
11160
- const pf = process.env.ProgramFiles;
11161
- const pfx86 = process.env["ProgramFiles(x86)"];
11162
- const local = process.env.LOCALAPPDATA;
11163
- local || `${process.env.USERPROFILE || process.env.HOME || ""}`;
11164
- const b = (p) => p ? p.replace(/\\+$/, "") : p;
11165
- return [
11166
- b(pf) + "\\Google\\Chrome\\Application\\chrome.exe",
11167
- b(pfx86) + "\\Google\\Chrome\\Application\\chrome.exe",
11168
- b(local) + "\\Google\\Chrome\\Application\\chrome.exe",
11169
- b(pf) + "\\Microsoft\\Edge\\Application\\msedge.exe",
11170
- b(pfx86) + "\\Microsoft\\Edge\\Application\\msedge.exe",
11171
- b(local) + "\\Microsoft\\Edge\\Application\\msedge.exe",
11172
- b(pfx86) + "\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
11173
- b(local) + "\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
11174
- ].filter(Boolean);
11160
+ return windowsEnvChromeCandidates(process.env);
11175
11161
  }
11176
11162
  /**
11177
11163
  * macOS registry-free probe of the usual `.app` bundles (no subprocess).
@@ -12672,7 +12658,7 @@ function friendlyTabbitScriptError(message) {
12672
12658
  }
12673
12659
  /** 受管本地浏览器是否已经起着(纯读,不 spawn)。 */
12674
12660
  async function managedBrowserIsUp() {
12675
- const { localBrowserInfo: localBrowserInfo$1 } = await import("./launcher-hmPXaWQa.js");
12661
+ const { localBrowserInfo: localBrowserInfo$1 } = await import("./launcher-YRO_KCPS.js");
12676
12662
  return localBrowserInfo$1() !== null;
12677
12663
  }
12678
12664
  /**
@@ -12716,7 +12702,7 @@ async function ensureManagedBrowser(ctx, cfg, options = {}) {
12716
12702
  ok: false,
12717
12703
  message: notStartedMessage(cfg.localLaunchPolicy, localBrowserPower)
12718
12704
  };
12719
- const { localBrowserInfo: localBrowserInfo$1 } = await import("./launcher-hmPXaWQa.js");
12705
+ const { localBrowserInfo: localBrowserInfo$1 } = await import("./launcher-YRO_KCPS.js");
12720
12706
  if (localBrowserInfo$1() !== null) return { ok: true };
12721
12707
  const attach = await refreshAttach({
12722
12708
  targets: cfg.links,
@@ -13249,7 +13235,7 @@ function apply(ctx, config = {}) {
13249
13235
  stop: async () => {
13250
13236
  localBrowserPower = "off";
13251
13237
  try {
13252
- const { localBrowserInfo: localBrowserInfo$1, stopLocalBrowser: stopLocalBrowser$1 } = await import("./launcher-hmPXaWQa.js");
13238
+ const { localBrowserInfo: localBrowserInfo$1, stopLocalBrowser: stopLocalBrowser$1 } = await import("./launcher-YRO_KCPS.js");
13253
13239
  if (localBrowserInfo$1() === null) return { ok: true };
13254
13240
  const out = await stopLocalBrowser$1();
13255
13241
  if (out.ok) {
@@ -14088,7 +14074,7 @@ function apply(ctx, config = {}) {
14088
14074
  return;
14089
14075
  }
14090
14076
  try {
14091
- const { localBrowserInfo: localBrowserInfo$1, stopLocalBrowser: stopLocalBrowser$1 } = await import("./launcher-hmPXaWQa.js");
14077
+ const { localBrowserInfo: localBrowserInfo$1, stopLocalBrowser: stopLocalBrowser$1 } = await import("./launcher-YRO_KCPS.js");
14092
14078
  if (localBrowserInfo$1()) {
14093
14079
  await stopLocalBrowser$1();
14094
14080
  ctx.logger?.info?.("dsh-browser-cdp: idle reaper stopped the locally launched browser");
@@ -73,11 +73,6 @@ const defaultIo = () => ({
73
73
  }
74
74
  });
75
75
  const PLATFORM_CANDIDATES = {
76
- win32: [
77
- "C:/Program Files/Google/Chrome/Application/chrome.exe",
78
- "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
79
- "C:/Program Files/Microsoft/Edge/Application/msedge.exe"
80
- ],
81
76
  darwin: ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"],
82
77
  linux: [
83
78
  "/usr/bin/google-chrome",
@@ -86,9 +81,43 @@ const PLATFORM_CANDIDATES = {
86
81
  "/usr/bin/chromium-browser"
87
82
  ]
88
83
  };
89
- function discoverChromeBinary(explicit, platform, exists) {
84
+ /**
85
+ * Env-var-driven probe of the usual Windows install dirs — the ONE canonical
86
+ * list, consumed by both the launcher (`discoverChromeBinary`) and the
87
+ * doctor's `windowsChromeCandidates()` in index.ts, so the two can never
88
+ * drift again. Issue #19: the launcher's hardcoded list only knew 64-bit
89
+ * Edge, so a machine with just the 32-bit Edge (`Program Files (x86)`) got
90
+ * "No Chrome/Chromium/Edge binary found" while `bcdp_doctor` happily
91
+ * reported the very same binary.
92
+ */
93
+ function windowsEnvChromeCandidates(env) {
94
+ const pf = env.ProgramFiles;
95
+ const pfx86 = env["ProgramFiles(x86)"];
96
+ const local = env.LOCALAPPDATA;
97
+ local || `${env.USERPROFILE || env.HOME || ""}`;
98
+ const b = (p) => p ? p.replace(/\\+$/, "") : p;
99
+ return [
100
+ b(pf) + "\\Google\\Chrome\\Application\\chrome.exe",
101
+ b(pfx86) + "\\Google\\Chrome\\Application\\chrome.exe",
102
+ b(local) + "\\Google\\Chrome\\Application\\chrome.exe",
103
+ b(pf) + "\\Microsoft\\Edge\\Application\\msedge.exe",
104
+ b(pfx86) + "\\Microsoft\\Edge\\Application\\msedge.exe",
105
+ b(local) + "\\Microsoft\\Edge\\Application\\msedge.exe",
106
+ b(pfx86) + "\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
107
+ b(local) + "\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
108
+ ].filter(Boolean);
109
+ }
110
+ /** Last-resort absolute paths for machines with a mangled environment. */
111
+ const WIN32_FALLBACK_CANDIDATES = [
112
+ "C:/Program Files/Google/Chrome/Application/chrome.exe",
113
+ "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
114
+ "C:/Program Files/Microsoft/Edge/Application/msedge.exe",
115
+ "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
116
+ ];
117
+ function discoverChromeBinary(explicit, platform, exists, env = process.env) {
90
118
  if (explicit !== "") return exists(explicit) ? explicit : "";
91
- for (const candidate of PLATFORM_CANDIDATES[platform] ?? []) if (exists(candidate)) return candidate;
119
+ const candidates = platform === "win32" ? [...windowsEnvChromeCandidates(env), ...WIN32_FALLBACK_CANDIDATES] : PLATFORM_CANDIDATES[platform] ?? [];
120
+ for (const candidate of candidates) if (exists(candidate)) return candidate;
92
121
  return "";
93
122
  }
94
123
  /** Flags the user must never smuggle into the managed launch. */
@@ -212,9 +241,10 @@ function readRecord(path, io) {
212
241
  }
213
242
  /**
214
243
  * Launch (or reuse) the managed local browser for ONE engine. The readiness
215
- * gate is the three-step check from T2.12: process alive → port responds →
216
- * `/json/version` returns 200. `timeoutMs` bounds the readiness wait
217
- * (default 20s).
244
+ * gate is the port-first check: `/json/version` returns 200 (a re-exec'ing
245
+ * browser whose spawn pid died still counts as ready), with the spawn pid's
246
+ * liveness only used to pick the failure code when the deadline expires.
247
+ * `timeoutMs` bounds the readiness wait (default 20s).
218
248
  *
219
249
  * Engine exclusivity: the registry holds ONE managed instance — a record for
220
250
  * the OTHER engine is stopped first, so Chrome and Lightpanda never fight
@@ -304,18 +334,20 @@ async function launchLocalBrowser(options, io) {
304
334
  const endpoint = `http://127.0.0.1:${port}`;
305
335
  const engineName = engine === "lightpanda" ? "lightpanda" : "chrome";
306
336
  const deadline = now() + (options.timeoutMs ?? 2e4);
337
+ let spawnPidGone = false;
307
338
  for (;;) {
308
- if (!ioImpl.isAlive(pid)) return {
309
- ok: false,
310
- code: "launch-exited",
311
- message: `${engineName} exited before opening the debugging port (pid ${pid})${engine === "lightpanda" && platform === "win32" ? " — is lightpanda installed inside WSL? (`wsl` then `curl -fsSL https://pkg.lightpanda.io/install.sh | bash`)" : ""}`
312
- };
313
339
  let versionOk = false;
314
340
  try {
315
341
  versionOk = (await ioImpl.fetchVersion(`${endpoint}/json/version`)).ok;
316
342
  } catch {}
317
343
  if (versionOk) break;
344
+ if (!ioImpl.isAlive(pid)) spawnPidGone = true;
318
345
  if (now() >= deadline) {
346
+ if (spawnPidGone) return {
347
+ ok: false,
348
+ code: "launch-exited",
349
+ message: `${engineName} exited before opening the debugging port (pid ${pid})${engine === "lightpanda" && platform === "win32" ? " — is lightpanda installed inside WSL? (`wsl` then `curl -fsSL https://pkg.lightpanda.io/install.sh | bash`)" : ""}`
350
+ };
319
351
  ioImpl.killTree(pid);
320
352
  ioImpl.removeFile(statePath);
321
353
  return {
@@ -398,4 +430,4 @@ function localBrowserInfo(statePath, io) {
398
430
  }
399
431
 
400
432
  //#endregion
401
- export { defaultLauncherStatePath as a, discoverLightpandaBinary as c, localBrowserInfo as d, stopLocalBrowser as f, buildServeArgs as i, launchLocalBrowser as l, buildEngineArgv as n, defaultManagedProfileDir as o, buildLaunchArgs as r, discoverChromeBinary as s, WSL_LAUNCH as t, lightpandaSpawnEnv as u };
433
+ export { defaultLauncherStatePath as a, discoverLightpandaBinary as c, localBrowserInfo as d, stopLocalBrowser as f, buildServeArgs as i, launchLocalBrowser as l, buildEngineArgv as n, defaultManagedProfileDir as o, windowsEnvChromeCandidates as p, buildLaunchArgs as r, discoverChromeBinary as s, WSL_LAUNCH as t, lightpandaSpawnEnv as u };
@@ -1,3 +1,3 @@
1
- import { a as defaultLauncherStatePath, c as discoverLightpandaBinary, d as localBrowserInfo, f as stopLocalBrowser, i as buildServeArgs, l as launchLocalBrowser, n as buildEngineArgv, o as defaultManagedProfileDir, r as buildLaunchArgs, s as discoverChromeBinary, t as WSL_LAUNCH, u as lightpandaSpawnEnv } from "./launcher-Vz8i9ylT.js";
1
+ import { a as defaultLauncherStatePath, c as discoverLightpandaBinary, d as localBrowserInfo, f as stopLocalBrowser, i as buildServeArgs, l as launchLocalBrowser, n as buildEngineArgv, o as defaultManagedProfileDir, p as windowsEnvChromeCandidates, r as buildLaunchArgs, s as discoverChromeBinary, t as WSL_LAUNCH, u as lightpandaSpawnEnv } from "./launcher-DfE6ivh_.js";
2
2
 
3
- export { WSL_LAUNCH, buildEngineArgv, buildLaunchArgs, buildServeArgs, defaultLauncherStatePath, defaultManagedProfileDir, discoverChromeBinary, discoverLightpandaBinary, launchLocalBrowser, lightpandaSpawnEnv, localBrowserInfo, stopLocalBrowser };
3
+ export { WSL_LAUNCH, buildEngineArgv, buildLaunchArgs, buildServeArgs, defaultLauncherStatePath, defaultManagedProfileDir, discoverChromeBinary, discoverLightpandaBinary, launchLocalBrowser, lightpandaSpawnEnv, localBrowserInfo, stopLocalBrowser, windowsEnvChromeCandidates };
package/package.json CHANGED
@@ -1,154 +1,154 @@
1
- {
2
- "name": "dsh-browser-cdp",
3
- "version": "1.14.7",
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
- "type": "module",
6
- "main": "./lib/index.js",
7
- "exports": {
8
- ".": "./lib/index.js",
9
- "./skill": "./lib/skill/index.js",
10
- "./client": "./lib/client.js",
11
- "./locale/*.json": "./locale/*.json",
12
- "./dsh-plugin.json": "./dsh-plugin.json",
13
- "./package.json": "./package.json"
14
- },
15
- "files": [
16
- "lib/",
17
- "bin/",
18
- "runtime/",
19
- "skills/",
20
- "locale/",
21
- "cordis.patch.yml",
22
- "dsh-plugin.json",
23
- "README.md",
24
- "README.de.md",
25
- "README.pt.md",
26
- "README.es.md",
27
- "README.fr.md",
28
- "README.it.md",
29
- "README.ru.md",
30
- "CHANGELOG.md",
31
- "CHANGELOG.de.md",
32
- "CHANGELOG.pt.md",
33
- "CHANGELOG.es.md",
34
- "CHANGELOG.fr.md",
35
- "CHANGELOG.it.md",
36
- "CHANGELOG.ru.md",
37
- "THIRD_PARTY_NOTICES.md",
38
- "!**/*.map"
39
- ],
40
- "dsh": {
41
- "engines": {
42
- "dsh": ">=0.1.0-rc.2 <0.3.0-0"
43
- },
44
- "bundle": {
45
- "patch": "./cordis.patch.yml"
46
- },
47
- "client": {
48
- "platform": "web",
49
- "inject": [
50
- "@deepseek-ai/dsh-client-locale"
51
- ]
52
- },
53
- "compatibility": {
54
- "dshReleases": {
55
- "0.1.0-rc.8": "experimental",
56
- "0.1.1-rc.2": "experimental",
57
- "0.1.2-rc.1": "experimental",
58
- "0.1.5-rc.3": "experimental",
59
- "0.1.7-rc.1": "compatible",
60
- "0.1.7-rc.2": "compatible",
61
- "0.2.0-rc.1": "compatible",
62
- "0.2.0-rc.2": "compatible",
63
- "0.2.1-rc.1": "compatible",
64
- "0.2.1-rc.2": "compatible",
65
- "0.2.1-rc.3": "compatible",
66
- "0.2.1-rc.4": "compatible",
67
- "0.2.1-rc.5 || 0.2.2-rc.1": "compatible"
68
- }
69
- }
70
- },
71
- "scripts": {
72
- "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
73
- "test": "vitest run",
74
- "build": "tsdown -c tsdown.config.ts",
75
- "prepack": "npm run build"
76
- },
77
- "dependencies": {
78
- "@deepseek-ai/schemastery": "^3.18.4"
79
- },
80
- "peerDependencies": {
81
- "@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.2 <0.3.0-0",
82
- "@deepseek-ai/dsh-client-store": ">=0.1.0-rc.2 <0.3.0-0",
83
- "@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.0-rc.2 <0.3.0-0",
84
- "@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.2 <0.3.0-0",
85
- "@deepseek-ai/dsh-settings": ">=0.1.0-rc.2 <0.3.0-0",
86
- "@deepseek-ai/dsh-skill": ">=0.1.0-rc.2 <0.3.0-0",
87
- "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.2 <0.3.0-0",
88
- "@deepseek-ai/dsh-tools": ">=0.1.0-rc.2 <0.3.0-0",
89
- "react": "^18.2.0"
90
- },
91
- "peerDependenciesMeta": {
92
- "@deepseek-ai/dsh-client-locale": {
93
- "optional": true
94
- },
95
- "@deepseek-ai/dsh-client-store": {
96
- "optional": true
97
- },
98
- "@deepseek-ai/dsh-client-ui-settings-plugins": {
99
- "optional": true
100
- },
101
- "@deepseek-ai/dsh-client-ui-slots": {
102
- "optional": true
103
- },
104
- "@deepseek-ai/dsh-settings": {
105
- "optional": true
106
- },
107
- "@deepseek-ai/dsh-skill": {
108
- "optional": true
109
- },
110
- "@deepseek-ai/dsh-system-prompt": {
111
- "optional": true
112
- },
113
- "@deepseek-ai/dsh-tools": {
114
- "optional": true
115
- }
116
- },
117
- "devDependencies": {
118
- "@deepseek-ai/cordis": "^4.1.0",
119
- "@deepseek-ai/cosmokit": "^1.8.5",
120
- "@deepseek-ai/dsh-agent": "^0.2.1-rc.3",
121
- "@deepseek-ai/dsh-llm": "^0.2.1-rc.3",
122
- "@deepseek-ai/dsh-ptc-runtime": "^0.2.1-rc.3",
123
- "@deepseek-ai/dsh-sandbox": "^0.2.1-rc.3",
124
- "@deepseek-ai/dsh-sandbox-policy": "^0.2.1-rc.3",
125
- "@deepseek-ai/dsh-scope": "^0.2.1-rc.3",
126
- "@deepseek-ai/dsh-session": "^0.2.1-rc.3",
127
- "@deepseek-ai/dsh-skill": "^0.2.1-rc.3",
128
- "@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.3",
129
- "@deepseek-ai/dsh-tools": ">=0.2.1-rc.1 <=0.2.2-rc.3",
130
- "@deepseek-ai/dsh-user-approval": "^0.2.1-rc.3",
131
- "@deepseek-ai/dsh-working-directory": "^0.2.1-rc.3",
132
- "@types/node": "^22.20.1",
133
- "@types/react": "~18.3.31",
134
- "@types/ws": "^8.5.10",
135
- "jsdom": "^26.0.0",
136
- "tsdown": "^0.15.0",
137
- "typescript": "^5.9.0",
138
- "vitest": "^3.2.0",
139
- "ws": "^8.18.0"
140
- },
141
- "engines": {
142
- "node": ">=22",
143
- "dsh": ">=0.1.0-rc.2 <0.3.0-0"
144
- },
145
- "license": "MIT",
146
- "repository": {
147
- "type": "git",
148
- "url": "git+https://github.com/drscrewdriver/dsh-browser-cdp.git"
149
- },
150
- "publishConfig": {
151
- "registry": "https://registry.npmjs.org",
152
- "tag": "latest"
153
- }
154
- }
1
+ {
2
+ "name": "dsh-browser-cdp",
3
+ "version": "1.14.9",
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
+ "type": "module",
6
+ "main": "./lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./skill": "./lib/skill/index.js",
10
+ "./client": "./lib/client.js",
11
+ "./locale/*.json": "./locale/*.json",
12
+ "./dsh-plugin.json": "./dsh-plugin.json",
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "lib/",
17
+ "bin/",
18
+ "runtime/",
19
+ "skills/",
20
+ "locale/",
21
+ "cordis.patch.yml",
22
+ "dsh-plugin.json",
23
+ "README.md",
24
+ "README.de.md",
25
+ "README.pt.md",
26
+ "README.es.md",
27
+ "README.fr.md",
28
+ "README.it.md",
29
+ "README.ru.md",
30
+ "CHANGELOG.md",
31
+ "CHANGELOG.de.md",
32
+ "CHANGELOG.pt.md",
33
+ "CHANGELOG.es.md",
34
+ "CHANGELOG.fr.md",
35
+ "CHANGELOG.it.md",
36
+ "CHANGELOG.ru.md",
37
+ "THIRD_PARTY_NOTICES.md",
38
+ "!**/*.map"
39
+ ],
40
+ "dsh": {
41
+ "engines": {
42
+ "dsh": ">=0.1.0-rc.2 <0.3.0-0"
43
+ },
44
+ "bundle": {
45
+ "patch": "./cordis.patch.yml"
46
+ },
47
+ "client": {
48
+ "platform": "web",
49
+ "inject": [
50
+ "@deepseek-ai/dsh-client-locale"
51
+ ]
52
+ },
53
+ "compatibility": {
54
+ "dshReleases": {
55
+ "0.1.0-rc.8": "experimental",
56
+ "0.1.1-rc.2": "experimental",
57
+ "0.1.2-rc.1": "experimental",
58
+ "0.1.5-rc.3": "experimental",
59
+ "0.1.7-rc.1": "compatible",
60
+ "0.1.7-rc.2": "compatible",
61
+ "0.2.0-rc.1": "compatible",
62
+ "0.2.0-rc.2": "compatible",
63
+ "0.2.1-rc.1": "compatible",
64
+ "0.2.1-rc.2": "compatible",
65
+ "0.2.1-rc.3": "compatible",
66
+ "0.2.1-rc.4": "compatible",
67
+ "0.2.1-rc.5 || 0.2.2-rc.1": "compatible"
68
+ }
69
+ }
70
+ },
71
+ "scripts": {
72
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
73
+ "test": "vitest run",
74
+ "build": "tsdown -c tsdown.config.ts",
75
+ "prepack": "npm run build"
76
+ },
77
+ "dependencies": {
78
+ "@deepseek-ai/schemastery": "^3.18.4"
79
+ },
80
+ "peerDependencies": {
81
+ "@deepseek-ai/dsh-client-locale": ">=0.1.0-rc.2 <0.3.0-0",
82
+ "@deepseek-ai/dsh-client-store": ">=0.1.0-rc.2 <0.3.0-0",
83
+ "@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.1.0-rc.2 <0.3.0-0",
84
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.0-rc.2 <0.3.0-0",
85
+ "@deepseek-ai/dsh-settings": ">=0.1.0-rc.2 <0.3.0-0",
86
+ "@deepseek-ai/dsh-skill": ">=0.1.0-rc.2 <0.3.0-0",
87
+ "@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.2 <0.3.0-0",
88
+ "@deepseek-ai/dsh-tools": ">=0.1.0-rc.2 <0.3.0-0",
89
+ "react": "^18.2.0"
90
+ },
91
+ "peerDependenciesMeta": {
92
+ "@deepseek-ai/dsh-client-locale": {
93
+ "optional": true
94
+ },
95
+ "@deepseek-ai/dsh-client-store": {
96
+ "optional": true
97
+ },
98
+ "@deepseek-ai/dsh-client-ui-settings-plugins": {
99
+ "optional": true
100
+ },
101
+ "@deepseek-ai/dsh-client-ui-slots": {
102
+ "optional": true
103
+ },
104
+ "@deepseek-ai/dsh-settings": {
105
+ "optional": true
106
+ },
107
+ "@deepseek-ai/dsh-skill": {
108
+ "optional": true
109
+ },
110
+ "@deepseek-ai/dsh-system-prompt": {
111
+ "optional": true
112
+ },
113
+ "@deepseek-ai/dsh-tools": {
114
+ "optional": true
115
+ }
116
+ },
117
+ "devDependencies": {
118
+ "@deepseek-ai/cordis": "^4.1.0",
119
+ "@deepseek-ai/cosmokit": "^1.8.5",
120
+ "@deepseek-ai/dsh-agent": "^0.2.1-rc.3",
121
+ "@deepseek-ai/dsh-llm": "^0.2.1-rc.3",
122
+ "@deepseek-ai/dsh-ptc-runtime": "^0.2.1-rc.3",
123
+ "@deepseek-ai/dsh-sandbox": "^0.2.1-rc.3",
124
+ "@deepseek-ai/dsh-sandbox-policy": "^0.2.1-rc.3",
125
+ "@deepseek-ai/dsh-scope": "^0.2.1-rc.3",
126
+ "@deepseek-ai/dsh-session": "^0.2.1-rc.3",
127
+ "@deepseek-ai/dsh-skill": "^0.2.1-rc.3",
128
+ "@deepseek-ai/dsh-system-prompt": "^0.2.1-rc.3",
129
+ "@deepseek-ai/dsh-tools": ">=0.2.1-rc.1 <=0.2.2-rc.3",
130
+ "@deepseek-ai/dsh-user-approval": "^0.2.1-rc.3",
131
+ "@deepseek-ai/dsh-working-directory": "^0.2.1-rc.3",
132
+ "@types/node": "^22.20.1",
133
+ "@types/react": "~18.3.31",
134
+ "@types/ws": "^8.5.10",
135
+ "jsdom": "^26.0.0",
136
+ "tsdown": "^0.15.0",
137
+ "typescript": "^5.9.0",
138
+ "vitest": "^3.2.0",
139
+ "ws": "^8.18.0"
140
+ },
141
+ "engines": {
142
+ "node": ">=22",
143
+ "dsh": ">=0.1.0-rc.2 <0.3.0-0"
144
+ },
145
+ "license": "MIT",
146
+ "repository": {
147
+ "type": "git",
148
+ "url": "git+https://github.com/drscrewdriver/dsh-browser-cdp.git"
149
+ },
150
+ "publishConfig": {
151
+ "registry": "https://registry.npmjs.org",
152
+ "tag": "latest"
153
+ }
154
+ }