@opencode/browse 0.0.17-dev.178 → 0.0.17-dev.180

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.
Files changed (28) hide show
  1. package/dist/{cli-rkex22x1.mjs → cli-dbb5bjne.mjs} +36 -21
  2. package/dist/cli.mjs +12 -12
  3. package/dist/{helpers-qt4kax1s.mjs → helpers-mbetgbwv.mjs} +2 -2
  4. package/dist/{legacy-runtime-jhrevpwv.mjs → legacy-runtime-eky6yenx.mjs} +4 -4
  5. package/dist/{main-2vqd5qzt.mjs → main-44rp8pxg.mjs} +2 -2
  6. package/dist/{main-eb0f9214.mjs → main-46wtkfsd.mjs} +4 -4
  7. package/dist/main-amkq7v9m.mjs +4 -0
  8. package/dist/{main-3w39tt3k.mjs → main-awaqqre9.mjs} +3 -3
  9. package/dist/{main-4c9hwd11.mjs → main-fpn564ph.mjs} +1 -1
  10. package/dist/{main-wtks5b18.mjs → main-g1frnq76.mjs} +4 -4
  11. package/dist/{main-b3jrctcx.mjs → main-gg7f12gg.mjs} +1 -1
  12. package/dist/{main-6db334p7.mjs → main-jwss6gk9.mjs} +1 -1
  13. package/dist/{main-yd718w1x.mjs → main-q2d5bd1e.mjs} +1 -1
  14. package/dist/{main-gx827npm.mjs → main-r8g3xydm.mjs} +3 -3
  15. package/dist/{main-hf271qgj.mjs → main-v2a390e1.mjs} +2 -2
  16. package/dist/{main-ys021k3y.mjs → main-wfmad10p.mjs} +2 -2
  17. package/dist/{mcp-d0eew43s.mjs → mcp-amxrbrbd.mjs} +10 -10
  18. package/dist/{migrate-0fxn9ytf.mjs → migrate-07f3f3yp.mjs} +5 -5
  19. package/dist/{relay-ve6jgts4.mjs → relay-e7fx469h.mjs} +52 -15
  20. package/dist/{runtime-update-ch040q85.mjs → runtime-update-xt7x7j6c.mjs} +5 -5
  21. package/dist/{setup-xk4kk70j.mjs → setup-m85mamg6.mjs} +8 -8
  22. package/dist/{skill-text-anny5zdh.mjs → skill-text-7bqtc16a.mjs} +6 -3
  23. package/dist/{supervisor-ksb2edez.mjs → supervisor-6zbwkkpt.mjs} +3 -3
  24. package/dist/{update-mzmmrkv7.mjs → update-drswqt2m.mjs} +4 -4
  25. package/dist/{version-czqmpk2m.mjs → version-v3heqz8b.mjs} +1 -1
  26. package/package.json +1 -1
  27. package/skills/browse/SKILL.md +6 -3
  28. package/dist/main-1najktv4.mjs +0 -4
@@ -25,7 +25,7 @@ import"./main-pmfd055v.mjs";
25
25
  import {
26
26
  opencodeBrowserVersion2,
27
27
  opencodeBrowserBuildId2
28
- } from "./main-1najktv4.mjs";
28
+ } from "./main-amkq7v9m.mjs";
29
29
  import {
30
30
  configRoot2,
31
31
  dataRoot,
@@ -38,11 +38,11 @@ import {
38
38
  devExtension,
39
39
  installCommand,
40
40
  autoUpdateStatus
41
- } from "./main-3w39tt3k.mjs";
41
+ } from "./main-awaqqre9.mjs";
42
42
  import {
43
43
  extensionProtocolVersion,
44
44
  extensionProtocolAdvice
45
- } from "./main-b3jrctcx.mjs";
45
+ } from "./main-gg7f12gg.mjs";
46
46
  import {
47
47
  option,
48
48
  String2,
@@ -64,29 +64,29 @@ import {
64
64
  ensureExtensionConnected,
65
65
  stoppedRelayStatus,
66
66
  statusCollections
67
- } from "./main-eb0f9214.mjs";
67
+ } from "./main-46wtkfsd.mjs";
68
68
  import"./main-4h7rfhhr.mjs";
69
69
  import {
70
70
  updateJson2,
71
71
  formatUpdateNotice2,
72
72
  updateNotice2
73
- } from "./main-gx827npm.mjs";
73
+ } from "./main-r8g3xydm.mjs";
74
74
  import {
75
75
  settingKeys,
76
76
  formatSettings,
77
77
  ensureSessionExists
78
- } from "./main-ys021k3y.mjs";
78
+ } from "./main-wfmad10p.mjs";
79
79
  import {
80
80
  addSecret,
81
81
  listSecrets,
82
82
  removeSecret
83
- } from "./main-yd718w1x.mjs";
83
+ } from "./main-q2d5bd1e.mjs";
84
84
  import {
85
85
  defaultJournalBaseDir,
86
86
  readJournalEntries,
87
87
  formatJournalEntry
88
- } from "./main-hf271qgj.mjs";
89
- import"./main-6db334p7.mjs";
88
+ } from "./main-v2a390e1.mjs";
89
+ import"./main-jwss6gk9.mjs";
90
90
  import {
91
91
  taggedEnum,
92
92
  is2,
@@ -5188,6 +5188,7 @@ var createDoctorReport = fn("Doctor.createReport")(function* (options) {
5188
5188
  },
5189
5189
  extension: {
5190
5190
  connected: extensionResult.ok ? extensionResult.value.connected : null,
5191
+ unresponsive: extensionResult.ok ? extensionResult.value.browsers?.some((browser) => browser.unresponsive) ?? false : null,
5191
5192
  version: extensionVersion,
5192
5193
  expectedVersion,
5193
5194
  versionMatches: extensionVersionMatches,
@@ -5260,12 +5261,7 @@ function buildDoctorChecks(options) {
5260
5261
  message: options.relayResult.ok ? `reachable (${options.relayResult.value.version})` : options.relayResult.error
5261
5262
  },
5262
5263
  relayBuildCheck({ relayResult: options.relayResult, cliBuildId: opencodeBrowserBuildId2 }),
5263
- {
5264
- id: "extension-connected",
5265
- label: "extension connection",
5266
- status: options.extensionResult.ok && options.extensionResult.value.connected ? "ok" : "fail",
5267
- message: options.extensionResult.ok ? options.extensionResult.value.connected ? `connected${options.extensionResult.value.version ? ` (${options.extensionResult.value.version})` : ""}` : "disconnected" : options.extensionResult.error
5268
- },
5264
+ extensionConnectedCheck(options.extensionResult),
5269
5265
  extensionVersionCheck({
5270
5266
  extensionResult: options.extensionResult,
5271
5267
  expectedExtensionVersion: options.expectedExtensionVersion
@@ -5368,6 +5364,23 @@ function relayBuildCheck(options) {
5368
5364
  const matches = relayBuildId === options.cliBuildId;
5369
5365
  return check(matches ? "ok" : "warn", matches ? `matches CLI build (${options.cliBuildId})` : `runtime ${relayBuildId} does not match CLI ${options.cliBuildId}`);
5370
5366
  }
5367
+ function extensionConnectedCheck(extensionResult) {
5368
+ const check = makeDoctorCheck("extension-connected", "extension connection");
5369
+ if (!extensionResult.ok) {
5370
+ return check("fail", extensionResult.error);
5371
+ }
5372
+ const status = extensionResult.value;
5373
+ const unresponsive = (status.browsers ?? []).filter((browser) => browser.unresponsive);
5374
+ if (status.connected) {
5375
+ const connected = `connected${status.version ? ` (${status.version})` : ""}`;
5376
+ const others = unresponsive.map((browser) => `${browser.id} isn't answering (busy or asleep)`).join(", ");
5377
+ return others ? check("warn", `${connected}; ${others}`) : check("ok", connected);
5378
+ }
5379
+ if (unresponsive.length > 0) {
5380
+ return check("warn", "connected but not answering (busy or asleep)");
5381
+ }
5382
+ return check("fail", "disconnected");
5383
+ }
5371
5384
  function extensionVersionCheck(options) {
5372
5385
  const check = makeDoctorCheck("extension-version", "extension version");
5373
5386
  if (!options.extensionResult.ok) {
@@ -5490,7 +5503,8 @@ function formatExtensionSummary(report) {
5490
5503
  const version = report.extension.version ? ` (${report.extension.version})` : "";
5491
5504
  const protocol = report.extension.protocolVersion === null ? "" : `, protocol ${report.extension.protocolVersion} ${report.extension.protocolCompatible === false ? "incompatible" : "compatible"}`;
5492
5505
  const match = report.extension.versionMatches === null ? "" : report.extension.versionMatches ? ", matches the CLI's version" : ", differs from the CLI's version";
5493
- return `${report.extension.connected ? "connected" : "disconnected"}${version}${protocol}${match}`;
5506
+ const state = report.extension.connected ? "connected" : report.extension.unresponsive ? "not answering (busy or asleep)" : "disconnected";
5507
+ return `${state}${version}${protocol}${match}`;
5494
5508
  }
5495
5509
  function formatNullableNumber(value) {
5496
5510
  return value === null ? "unknown" : String(value);
@@ -5787,7 +5801,8 @@ var status = make("status", {
5787
5801
  if (buildProblem) {
5788
5802
  yield* log(`Warning: ${buildProblem}`);
5789
5803
  }
5790
- yield* log(`Extension: ${extensionStatus.connected ? "connected" : "disconnected"}${extensionStatus.version ? ` (${extensionStatus.version})` : ""}`);
5804
+ const notAnswering = extensionStatus.browsers?.some((browser) => browser.unresponsive) ?? false;
5805
+ yield* log(`Extension: ${extensionStatus.connected ? "connected" : notAnswering ? "not answering (busy or asleep)" : "disconnected"}${extensionStatus.version ? ` (${extensionStatus.version})` : ""}`);
5791
5806
  if ((extensionStatus.rejectedConnections ?? 0) > 0) {
5792
5807
  yield* log(`Warning: ${extensionStatus.rejectedConnections} competing browser/profile connection attempt(s) rejected; the active connection was preserved. The relay is an older browse that connects one browser at a time; update browse on the computer running the relay, or close the other browser.`);
5793
5808
  }
@@ -5844,7 +5859,7 @@ var status = make("status", {
5844
5859
  }
5845
5860
  })).pipe(withDescription4("Show relay, extension, and target status"));
5846
5861
  var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
5847
- const { runMcpServer } = yield* promise(() => import("./mcp-d0eew43s.mjs"));
5862
+ const { runMcpServer } = yield* promise(() => import("./mcp-amxrbrbd.mjs"));
5848
5863
  yield* runMcpServer;
5849
5864
  })).pipe(withDescription4("Run the browse MCP server over stdio"));
5850
5865
  registerCliCommand(400, () => tabs);
@@ -5865,7 +5880,7 @@ registerCliCommand(810, ({ packageRoot }) => make("doctor", {
5865
5880
  }
5866
5881
  })).pipe(withDescription4("Diagnose the local browse install and runtime")));
5867
5882
  registerCliCommand(820, () => make("skill", {}, fn("Cli.skill")(function* () {
5868
- const { skillText } = yield* promise(() => import("./skill-text-anny5zdh.mjs"));
5883
+ const { skillText } = yield* promise(() => import("./skill-text-7bqtc16a.mjs"));
5869
5884
  yield* log(skillText.trimEnd());
5870
5885
  })).pipe(withDescription4("Print the browse agent skill text")));
5871
5886
  registerCliCommand(900, () => mcp);
@@ -6292,12 +6307,12 @@ registerCliCommand(710, () => flightRecorder);
6292
6307
 
6293
6308
  // src/cli/relay.ts
6294
6309
  var serve = make("serve", {}, fn("Cli.serve")(function* () {
6295
- const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-ve6jgts4.mjs"), import("./helpers-qt4kax1s.mjs")]));
6310
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-e7fx469h.mjs"), import("./helpers-mbetgbwv.mjs")]));
6296
6311
  const port = yield* portConfig;
6297
6312
  const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
6298
6313
  yield* scoped(gen(function* () {
6299
6314
  const relay = yield* startRelay({ port, additionalExtensionOrigins });
6300
- yield* promise(() => import("./legacy-runtime-jhrevpwv.mjs").then((module) => module.commitLegacyTakeover()));
6315
+ yield* promise(() => import("./legacy-runtime-eky6yenx.mjs").then((module) => module.commitLegacyTakeover()));
6301
6316
  yield* log(`browse relay listening at ${relay.url}`);
6302
6317
  yield* log(`browse connects automatically while the browser runs. Run \`${cliCommand("status")}\` to check.`);
6303
6318
  yield* never;
package/dist/cli.mjs CHANGED
@@ -8,7 +8,7 @@ import {
8
8
 
9
9
  // src/main.ts
10
10
  import path from "node:path";
11
- var embeddedVersion = "0.0.17-dev.178";
11
+ var embeddedVersion = "0.0.17-dev.180";
12
12
  var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
13
13
  var command = process.argv[2];
14
14
  var args = process.argv.slice(3);
@@ -18,26 +18,26 @@ var options = separator === -1 ? args : args.slice(0, separator);
18
18
  var askedForHelp = command === "--help" || command === "-h" || options.some((arg) => arg === "--help" || arg === "-h");
19
19
  var preCliHelp = askedForHelp && (command === "update" || command !== undefined && setupCommands.has(command));
20
20
  var oldRuntime = legacyRuntime();
21
- var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-jhrevpwv.mjs").then((module) => module.prepareLegacyTakeover(oldRuntime)).catch(() => false);
21
+ var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-eky6yenx.mjs").then((module) => module.prepareLegacyTakeover(oldRuntime)).catch(() => false);
22
22
  if (!takingOver)
23
23
  settleLegacyHome(process.env, oldRuntime);
24
24
  if (command !== "--version" && command !== "-v" && !askedForHelp && !takingOver && !process.env.OPENCODE_BROWSER_HOME && legacyRootsLeft()) {
25
25
  try {
26
- const { migrateLegacy } = await import("./migrate-0fxn9ytf.mjs");
26
+ const { migrateLegacy } = await import("./migrate-07f3f3yp.mjs");
27
27
  migrateLegacy();
28
28
  } catch {}
29
29
  }
30
30
  if (command === "--version" || command === "-v") {
31
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-czqmpk2m.mjs")).opencodeBrowserVersion;
31
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-v3heqz8b.mjs")).opencodeBrowserVersion;
32
32
  process.stdout.write(`${opencodeBrowserVersion}
33
33
  `);
34
- } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-ksb2edez.mjs")).supervisesMcp()) {
35
- const { runBinaryMcp } = await import("./supervisor-ksb2edez.mjs");
34
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-6zbwkkpt.mjs")).supervisesMcp()) {
35
+ const { runBinaryMcp } = await import("./supervisor-6zbwkkpt.mjs");
36
36
  await runBinaryMcp(process.argv.slice(3));
37
37
  } else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
38
38
  const { NodeRuntime } = await import("./index-j79y2me1.mjs");
39
39
  const { defaultTeardown } = await import("./Runtime-jrg7sc9p.mjs");
40
- const { runMcpServer } = await import("./mcp-d0eew43s.mjs");
40
+ const { runMcpServer } = await import("./mcp-amxrbrbd.mjs");
41
41
  let stdinGone = false;
42
42
  const onStdinGone = () => {
43
43
  stdinGone = true;
@@ -59,13 +59,13 @@ if (command === "--version" || command === "-v") {
59
59
  })
60
60
  }));
61
61
  } else if (command === "self-update" || command === "runtime-switch") {
62
- const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-ch040q85.mjs");
62
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-xt7x7j6c.mjs");
63
63
  await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
64
64
  } else if (command === "update" && !askedForHelp) {
65
- const { runUpdateCommand } = await import("./update-mzmmrkv7.mjs");
65
+ const { runUpdateCommand } = await import("./update-drswqt2m.mjs");
66
66
  await runUpdateCommand(process.argv.slice(3));
67
67
  } else if (command && setupCommands.has(command) && !askedForHelp) {
68
- const { runSetup } = await import("./setup-xk4kk70j.mjs");
68
+ const { runSetup } = await import("./setup-m85mamg6.mjs");
69
69
  await runSetup(command, process.argv.slice(3));
70
70
  } else {
71
71
  if (preCliHelp || !command || command === "--help" || command === "-h") {
@@ -102,9 +102,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
102
102
  `);
103
103
  }
104
104
  if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
105
- const { printSetupStatus } = await import("./setup-xk4kk70j.mjs");
105
+ const { printSetupStatus } = await import("./setup-m85mamg6.mjs");
106
106
  printSetupStatus();
107
107
  }
108
- const { runCli } = await import("./cli-rkex22x1.mjs");
108
+ const { runCli } = await import("./cli-dbb5bjne.mjs");
109
109
  runCli(preCliHelp ? ["--help"] : undefined);
110
110
  }
@@ -32,9 +32,9 @@ import {
32
32
  isRestrictedTarget2,
33
33
  isRestrictedUrl2,
34
34
  dataUrlDocument2
35
- } from "./main-eb0f9214.mjs";
35
+ } from "./main-46wtkfsd.mjs";
36
36
  import"./main-4h7rfhhr.mjs";
37
- import"./main-b3jrctcx.mjs";
37
+ import"./main-gg7f12gg.mjs";
38
38
  export {
39
39
  HttpRouteError2 as HttpRouteError,
40
40
  chromeExtensionOriginForPath2 as chromeExtensionOriginForPath,
@@ -5,13 +5,13 @@ import {
5
5
  } from "./main-pmfd055v.mjs";
6
6
  import {
7
7
  opencodeBrowserVersion2
8
- } from "./main-1najktv4.mjs";
8
+ } from "./main-amkq7v9m.mjs";
9
9
  import {
10
10
  installerBinaryPath,
11
11
  compiledBinary,
12
12
  channelOf,
13
13
  installedRuntime2
14
- } from "./main-3w39tt3k.mjs";
14
+ } from "./main-awaqqre9.mjs";
15
15
 
16
16
  // src/setup/legacy-runtime.ts
17
17
  import fs from "node:fs";
@@ -37,7 +37,7 @@ async function prepareLegacyTakeover(legacy, options = {}) {
37
37
  if (await portInUse(Number(env.OPENCODE_BROWSER_PORT) || 19988))
38
38
  return false;
39
39
  const home = options.home ?? os.homedir();
40
- const { copyLegacyData } = await import("./migrate-0fxn9ytf.mjs");
40
+ const { copyLegacyData } = await import("./migrate-07f3f3yp.mjs");
41
41
  delete env.OPENCODE_BROWSER_HOME;
42
42
  copyLegacyData(home);
43
43
  pending = { legacy, install, home };
@@ -51,7 +51,7 @@ async function commitLegacyTakeover(now = Date.now()) {
51
51
  try {
52
52
  if (!adoptLegacyRuntime(legacy, install, now))
53
53
  return false;
54
- const { migrateLegacy } = await import("./migrate-0fxn9ytf.mjs");
54
+ const { migrateLegacy } = await import("./migrate-07f3f3yp.mjs");
55
55
  migrateLegacy(home, now);
56
56
  return true;
57
57
  } catch {
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-4c9hwd11.mjs";
8
+ } from "./main-fpn564ph.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-3w39tt3k.mjs";
14
+ } from "./main-awaqqre9.mjs";
15
15
 
16
16
  // src/setup/dev-extension.ts
17
17
  import { createHash } from "node:crypto";
@@ -4,7 +4,7 @@ import {
4
4
  extensionReconnectAlarmPeriodMs,
5
5
  extensionProtocolAdvice,
6
6
  parseJsonObject
7
- } from "./main-b3jrctcx.mjs";
7
+ } from "./main-gg7f12gg.mjs";
8
8
  import {
9
9
  ensurePrivateDirectorySync
10
10
  } from "./main-4h7rfhhr.mjs";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./main-s3g4jwx5.mjs";
19
19
  import {
20
20
  opencodeBrowserBuildId2
21
- } from "./main-1najktv4.mjs";
21
+ } from "./main-amkq7v9m.mjs";
22
22
  import {
23
23
  stateRoot,
24
24
  compiledBinary,
@@ -28,10 +28,10 @@ import {
28
28
  compareVersions,
29
29
  installedRuntime2,
30
30
  installedVersion
31
- } from "./main-3w39tt3k.mjs";
31
+ } from "./main-awaqqre9.mjs";
32
32
  import {
33
33
  relayAuthorization
34
- } from "./main-6db334p7.mjs";
34
+ } from "./main-jwss6gk9.mjs";
35
35
  import {
36
36
  Pointer,
37
37
  passthrough,
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.17-dev.180";
3
+ var opencodeBrowserBuildId2 = "2026-11-12T18:46:34.295Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./main-pmfd055v.mjs";
5
5
  import {
6
6
  opencodeBrowserVersion2
7
- } from "./main-1najktv4.mjs";
7
+ } from "./main-amkq7v9m.mjs";
8
8
 
9
9
  // src/paths.ts
10
10
  import fs from "node:fs";
@@ -114,7 +114,7 @@ function cliInstall() {
114
114
  return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
115
115
  if (fromCheckout())
116
116
  return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
117
- return { kind: "npm", version: "0.0.17-dev.178", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
117
+ return { kind: "npm", version: "0.0.17-dev.180", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
118
118
  }
119
119
  function cliPrefix(install = cliInstall()) {
120
120
  if (install.kind === "binary") {
@@ -136,7 +136,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
136
136
  return id ? { id } : {};
137
137
  }
138
138
  var RELEASE_SERVICE = "https://anoma.ly/release";
139
- function devExtension(baked = { file: "browse-extension-0.0.17-dev.178.zip", sha256: "393ce4153749365e87d5de4d37ef19c4b30ce719ff93ef76fcc2fb3854a24af6", size: 185299 }) {
139
+ function devExtension(baked = { file: "browse-extension-0.0.17-dev.180.zip", sha256: "46d56784a91ac6c14a44157a2156b605d1ba14a640ee3f9901cf3bfe8b22b2ca", size: 185298 }) {
140
140
  return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
141
141
  }
142
142
  var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  dataRoot,
6
6
  stateRoot
7
- } from "./main-3w39tt3k.mjs";
7
+ } from "./main-awaqqre9.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-1najktv4.mjs";
3
+ } from "./main-amkq7v9m.mjs";
4
4
  import {
5
5
  configRoot2,
6
6
  dataRoot,
@@ -21,16 +21,16 @@ import {
21
21
  npmGlobalRoot,
22
22
  installedVersion,
23
23
  runCommand
24
- } from "./main-3w39tt3k.mjs";
24
+ } from "./main-awaqqre9.mjs";
25
25
  import {
26
26
  writeStdout
27
27
  } from "./main-tk4axre7.mjs";
28
28
  import {
29
29
  formatPairingCode
30
- } from "./main-4c9hwd11.mjs";
30
+ } from "./main-fpn564ph.mjs";
31
31
  import {
32
32
  unpackedExtensionId
33
- } from "./main-b3jrctcx.mjs";
33
+ } from "./main-gg7f12gg.mjs";
34
34
  import {
35
35
  __toESM,
36
36
  __commonJS,
@@ -2,7 +2,7 @@
2
2
  var extensionProtocolVersion = 3;
3
3
  var minExtensionProtocolVersion = 3;
4
4
  var unpackedExtensionId = "afeafocngkodbmaipcngoamamfmekgfo";
5
- var browserUnresponsive = "The browser isn't responding (asleep or frozen?). Wake it and try again.";
5
+ var browserUnresponsive = "The browser isn't answering (asleep, frozen or very busy?). Wake it or wait a moment, then try again.";
6
6
  var browserReloading = "browse stopped answering in this browser for over a minute, so the relay asked it to reload. Try again in a few seconds.";
7
7
  var unpackedReloadAdvice = "Reload browse on your browser's extensions page (↻).";
8
8
  var checkoutReloadPrefix = "Extension protocol incompatible: extension-older; reload ";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  dataRoot
6
- } from "./main-3w39tt3k.mjs";
6
+ } from "./main-awaqqre9.mjs";
7
7
 
8
8
  // src/relay/secrets.ts
9
9
  import crypto from "node:crypto";
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  dataRoot,
54
54
  cliCommand
55
- } from "./main-3w39tt3k.mjs";
55
+ } from "./main-awaqqre9.mjs";
56
56
 
57
57
  // node_modules/effect/dist/Semaphore.js
58
58
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -6,10 +6,10 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-3w39tt3k.mjs";
9
+ } from "./main-awaqqre9.mjs";
10
10
  import {
11
11
  unpackedReloadAdvice
12
- } from "./main-b3jrctcx.mjs";
12
+ } from "./main-gg7f12gg.mjs";
13
13
 
14
14
  // src/update.ts
15
15
  import { execFile, spawnSync } from "node:child_process";
@@ -315,7 +315,7 @@ function runUpdate(args, deps) {
315
315
  async function runUpdateCommand2(args) {
316
316
  const log = (line) => process.stdout.write(line + `
317
317
  `);
318
- const { runInstalledUpdate } = await import("./runtime-update-ch040q85.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-xt7x7j6c.mjs");
319
319
  if (await runInstalledUpdate(args))
320
320
  return;
321
321
  if (compiledBinary()) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-eb0f9214.mjs";
6
+ } from "./main-46wtkfsd.mjs";
7
7
  import {
8
8
  decodeUnknownOption,
9
9
  optionalKey,
@@ -19,7 +19,7 @@ import {
19
19
  } from "./main-wpt5ha44.mjs";
20
20
  import {
21
21
  stateRoot
22
- } from "./main-3w39tt3k.mjs";
22
+ } from "./main-awaqqre9.mjs";
23
23
 
24
24
  // src/session-manager/journal.ts
25
25
  import fs from "node:fs";
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-eb0f9214.mjs";
15
+ } from "./main-46wtkfsd.mjs";
16
16
  import {
17
17
  isStream,
18
18
  provideContext
@@ -103,7 +103,7 @@ import {
103
103
  } from "./main-qazf3bhk.mjs";
104
104
  import {
105
105
  cliCommand
106
- } from "./main-3w39tt3k.mjs";
106
+ } from "./main-awaqqre9.mjs";
107
107
 
108
108
  // node_modules/effect/dist/PrimaryKey.js
109
109
  var symbol = "~effect/PrimaryKey";
@@ -46,12 +46,12 @@ import {
46
46
  import"./main-pmfd055v.mjs";
47
47
  import {
48
48
  opencodeBrowserVersion2
49
- } from "./main-1najktv4.mjs";
49
+ } from "./main-amkq7v9m.mjs";
50
50
  import {
51
51
  cliCommand,
52
52
  autoUpdateStatus
53
- } from "./main-3w39tt3k.mjs";
54
- import"./main-b3jrctcx.mjs";
53
+ } from "./main-awaqqre9.mjs";
54
+ import"./main-gg7f12gg.mjs";
55
55
  import {
56
56
  option,
57
57
  String2,
@@ -70,12 +70,12 @@ import {
70
70
  relayBuildProblem,
71
71
  ensureRelay,
72
72
  ensureExtensionConnected
73
- } from "./main-eb0f9214.mjs";
73
+ } from "./main-46wtkfsd.mjs";
74
74
  import"./main-4h7rfhhr.mjs";
75
75
  import {
76
76
  updateJson2,
77
77
  createUpdateWatcher2
78
- } from "./main-gx827npm.mjs";
78
+ } from "./main-r8g3xydm.mjs";
79
79
  import {
80
80
  settingSpecs,
81
81
  securityVariables,
@@ -156,12 +156,12 @@ import {
156
156
  toolResultForValue2,
157
157
  mcpErrorMessage2,
158
158
  toolResult
159
- } from "./main-ys021k3y.mjs";
159
+ } from "./main-wfmad10p.mjs";
160
160
  import {
161
161
  makeUnsafe,
162
162
  make3,
163
163
  listSecrets
164
- } from "./main-yd718w1x.mjs";
164
+ } from "./main-q2d5bd1e.mjs";
165
165
  import {
166
166
  Clock,
167
167
  type,
@@ -176,7 +176,7 @@ import {
176
176
  orElse,
177
177
  exhaustive
178
178
  } from "./main-048kx59h.mjs";
179
- import"./main-6db334p7.mjs";
179
+ import"./main-jwss6gk9.mjs";
180
180
  import {
181
181
  Class,
182
182
  taggedEnum,
@@ -8945,7 +8945,7 @@ registerMcpTools({
8945
8945
  inputSchema: objectSchema({
8946
8946
  code: {
8947
8947
  type: "string",
8948
- description: "JavaScript code to execute. It receives browser, context, page, state, modules (path, url, util, crypto, buffer, zlib, events, stream), files (dir and roots properties; path(name), write(target, data), read(target, encoding?)), fillInput, fillInputs, snapshot(options?) for compact semantic outlines of the page and the content of its iframes (options: find to search them, diff or delta for changes, frames: false to leave iframe content out), persistent compatible ref(id) locators that resolve inside the frame they came from, webmcp (list/call), screenshotWithLabels(options?) and screenshotDiff(options) for screenshots, ariaSnapshot for Playwright's YAML tree followed by a labelled block per iframe with its content, ghostCursor, handoff, demonstrate, network (start/status/stop/cancel), pageConsole (start/stop capturing the page's own console messages and errors, off by default because pages can detect it), and secrets.type(locator, name) to type a stored site secret (see secrets_list) only on its allowed origins, without seeing it. There is no location, document or fetch global (they belong to the page: use page.url() or page.evaluate(...)), and no structuredClone."
8948
+ description: "JavaScript code to execute. It receives browser, context, page, state, modules (path, url, util, crypto, buffer, zlib, events, stream), files (dir and roots properties; path(name), write(target, data), read(target, encoding?)), fillInput, fillInputs, snapshot(options?) for compact semantic outlines of the page and the content of its iframes (options: find to search them, diff or delta for changes, frames: false to leave iframe content out), persistent compatible ref(id) locators that resolve inside the frame they came from, webmcp (list/call), screenshotWithLabels(options?) and screenshotDiff(options) for screenshots, ariaSnapshot for Playwright's YAML tree followed by a labelled block per iframe with its content, ghostCursor, handoff, demonstrate, network (start/status/stop/cancel), pageConsole (start/stop capturing the page's own console messages and errors, off by default because pages can detect it), and secrets.type(locator, name) to type a stored site secret (see secrets_list) only on its allowed origins, without seeing it. There is no location, document or fetch global (they belong to the page: use page.url() or page.evaluate(...)), and no structuredClone. These helpers exist only inside this string, never as globals of a client's own code runtime: in a client that runs tools in its own code mode, pass the Playwright code here as a string."
8949
8949
  },
8950
8950
  session: {
8951
8951
  type: "string",
@@ -9607,7 +9607,7 @@ Use one loop: inspect, act, verify.
9607
9607
  - Act with the narrowest stable control, and keep dependent steps in one \`execute\` while transient UI is open.
9608
9608
  - Verify with a fresh page read (\`page.url()\`, a heading, or a new snapshot). A click that returned, or a handoff the user acknowledged, is not proof the task succeeded.
9609
9609
 
9610
- \`execute\` returns the value of your \`return\`; a single expression returns automatically. The execute tool's description lists the helpers it provides (snapshot, ref, handoff, files, secrets, screenshots, network capture, and more).
9610
+ \`execute\` returns the value of your \`return\`; a single expression returns automatically. The execute tool's description lists the helpers it provides (snapshot, ref, handoff, files, secrets, screenshots, network capture, and more). \`page\`, \`browser\`, \`context\`, \`state\` and the other helpers exist only inside the \`code\` string \`execute\` receives, never as globals of the client's own runtime: in a client that runs tools in its own code mode, pass the Playwright code as a string in \`code\`.
9611
9611
 
9612
9612
  When only a person can proceed — login, 2FA, passkey, captcha or payment confirmation — call \`handoff("what the user should do")\` and wait. Pass \`start\` for an action that itself blocks. Never solve a captcha yourself and never retry-loop a blocked site; if a challenge is interactive or the site refuses the visit, hand off or stop and tell the user.
9613
9613
 
@@ -7,14 +7,14 @@ import {
7
7
  editAgentConfig,
8
8
  OPENCODE_CONFIG_NAMES,
9
9
  configureMcp
10
- } from "./main-wtks5b18.mjs";
10
+ } from "./main-g1frnq76.mjs";
11
11
  import {
12
12
  legacyDataRoot,
13
13
  legacyRoots,
14
14
  legacyRuntime,
15
15
  LEGACY_HANDOVER_GRACE_MS
16
16
  } from "./main-pmfd055v.mjs";
17
- import"./main-1najktv4.mjs";
17
+ import"./main-amkq7v9m.mjs";
18
18
  import {
19
19
  configRoot2,
20
20
  dataRoot,
@@ -23,11 +23,11 @@ import {
23
23
  binRoot,
24
24
  binaryName,
25
25
  devExtensionFolder
26
- } from "./main-3w39tt3k.mjs";
26
+ } from "./main-awaqqre9.mjs";
27
27
  import"./main-tk4axre7.mjs";
28
28
  import"./main-4h7rfhhr.mjs";
29
- import"./main-4c9hwd11.mjs";
30
- import"./main-b3jrctcx.mjs";
29
+ import"./main-fpn564ph.mjs";
30
+ import"./main-gg7f12gg.mjs";
31
31
 
32
32
  // src/setup/migrate.ts
33
33
  import fs from "node:fs";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  opencodeBrowserVersion2,
6
6
  opencodeBrowserBuildId2
7
- } from "./main-1najktv4.mjs";
7
+ } from "./main-amkq7v9m.mjs";
8
8
  import {
9
9
  defaultRoots,
10
10
  configRoot2,
@@ -28,7 +28,7 @@ import {
28
28
  setStoredMode,
29
29
  autoUpdateStatus,
30
30
  createAutoUpdater
31
- } from "./main-3w39tt3k.mjs";
31
+ } from "./main-awaqqre9.mjs";
32
32
  import {
33
33
  extensionProtocolVersion,
34
34
  minExtensionProtocolVersion,
@@ -43,7 +43,7 @@ import {
43
43
  isExtensionResponse,
44
44
  isExtensionEvent,
45
45
  isJsonObject
46
- } from "./main-b3jrctcx.mjs";
46
+ } from "./main-gg7f12gg.mjs";
47
47
  import {
48
48
  isNodeError,
49
49
  isUnsupportedDirectorySyncError,
@@ -108,7 +108,7 @@ import {
108
108
  dataUrlDocument2,
109
109
  appendManagedRelayProcessLog,
110
110
  relayLog
111
- } from "./main-eb0f9214.mjs";
111
+ } from "./main-46wtkfsd.mjs";
112
112
  import {
113
113
  context,
114
114
  pendingPairingCodeKeys,
@@ -126,7 +126,7 @@ import {
126
126
  pairingSessionKey,
127
127
  sessionProof,
128
128
  wrapToken
129
- } from "./main-4c9hwd11.mjs";
129
+ } from "./main-fpn564ph.mjs";
130
130
  import {
131
131
  makeUnsafe,
132
132
  terminateChildProcess,
@@ -149,16 +149,16 @@ import {
149
149
  checkNavigationUrl,
150
150
  readSecret,
151
151
  secretText
152
- } from "./main-yd718w1x.mjs";
152
+ } from "./main-q2d5bd1e.mjs";
153
153
  import {
154
154
  defaultJournalBaseDir,
155
155
  makeJournalEntry,
156
156
  appendJournalEntry,
157
157
  startJournalRetention
158
- } from "./main-hf271qgj.mjs";
158
+ } from "./main-v2a390e1.mjs";
159
159
  import {
160
160
  createUpdateWatcher2
161
- } from "./main-gx827npm.mjs";
161
+ } from "./main-r8g3xydm.mjs";
162
162
  import {
163
163
  SettingsInputError,
164
164
  parseSettingChanges,
@@ -166,13 +166,13 @@ import {
166
166
  settingsToExtension,
167
167
  describeSettings,
168
168
  describeChanges
169
- } from "./main-ys021k3y.mjs";
169
+ } from "./main-wfmad10p.mjs";
170
170
  import {
171
171
  relayHostname,
172
172
  isLocalPeer,
173
173
  installedDevExtension,
174
174
  syncDevExtension
175
- } from "./main-2vqd5qzt.mjs";
175
+ } from "./main-44rp8pxg.mjs";
176
176
  import {
177
177
  currentTimeMillis,
178
178
  value,
@@ -185,7 +185,7 @@ import {
185
185
  relayToken,
186
186
  secretsEqual,
187
187
  ensurePrivateDirectory
188
- } from "./main-6db334p7.mjs";
188
+ } from "./main-jwss6gk9.mjs";
189
189
  import {
190
190
  join,
191
191
  interrupt,
@@ -314,6 +314,16 @@ import path from "node:path";
314
314
 
315
315
  // src/relay/rpc.ts
316
316
  import { WebSocket } from "ws";
317
+ var extensionCommandTimeout = { fallback: 30000, min: 15000, max: 300000 };
318
+ var extensionPingTimeout = { fallback: 1e4, min: 1000, max: 30000 };
319
+ function configuredTimeoutMs(value, setting) {
320
+ const trimmed = value?.trim();
321
+ if (!trimmed)
322
+ return setting.fallback;
323
+ const parsed = Number(trimmed);
324
+ return Number.isInteger(parsed) ? Math.min(Math.max(parsed, setting.min), setting.max) : setting.fallback;
325
+ }
326
+
317
327
  class ExtensionRpc {
318
328
  timeouts;
319
329
  socket;
@@ -323,6 +333,7 @@ class ExtensionRpc {
323
333
  unansweredSince;
324
334
  nextRequestId = 1;
325
335
  pendingRequests = new Map;
336
+ pendingPings = new Set;
326
337
  livenessProbe;
327
338
  version;
328
339
  protocolVersion;
@@ -334,6 +345,9 @@ class ExtensionRpc {
334
345
  get connected() {
335
346
  return this.socket?.readyState === WebSocket.OPEN && this.ready && !this.unresponsive && this.protocolCompatible !== false;
336
347
  }
348
+ get pingPending() {
349
+ return this.pendingPings.size > 0;
350
+ }
337
351
  get acceptsEvents() {
338
352
  return this.socket?.readyState === WebSocket.OPEN && this.protocolCompatible === true;
339
353
  }
@@ -427,7 +441,7 @@ class ExtensionRpc {
427
441
  const replies = this.replies;
428
442
  const message = { ...command, id };
429
443
  let completed = false;
430
- const timeoutMs = awaitsPagePromise(command) ? this.timeouts.awaitPromiseTimeoutMs ?? 5 * 60000 : command.method === "ping" ? this.timeouts.pingTimeoutMs ?? 4000 : command.method === "debugger.sendCommand" ? this.timeouts.debuggerCommandTimeoutMs ?? 60000 : this.timeouts.commandTimeoutMs ?? 15000;
444
+ const timeoutMs = awaitsPagePromise(command) ? this.timeouts.awaitPromiseTimeoutMs ?? 5 * 60000 : command.method === "ping" ? this.timeouts.pingTimeoutMs ?? extensionPingTimeout.fallback : command.method === "debugger.sendCommand" ? this.timeouts.debuggerCommandTimeoutMs ?? 60000 : this.timeouts.commandTimeoutMs ?? extensionCommandTimeout.fallback;
431
445
  const finish = (effect) => {
432
446
  if (completed) {
433
447
  return;
@@ -435,6 +449,7 @@ class ExtensionRpc {
435
449
  completed = true;
436
450
  clearTimeout(timeout);
437
451
  this.pendingRequests.delete(id);
452
+ this.pendingPings.delete(id);
438
453
  resume(effect);
439
454
  };
440
455
  const timeout = setTimeout(() => {
@@ -462,6 +477,8 @@ class ExtensionRpc {
462
477
  },
463
478
  ...debuggerTabId === undefined ? {} : { debuggerTabId }
464
479
  });
480
+ if (command.method === "ping")
481
+ this.pendingPings.add(id);
465
482
  try {
466
483
  socket.send(JSON.stringify(message), (error) => {
467
484
  if (error) {
@@ -475,6 +492,7 @@ class ExtensionRpc {
475
492
  completed = true;
476
493
  clearTimeout(timeout);
477
494
  this.pendingRequests.delete(id);
495
+ this.pendingPings.delete(id);
478
496
  });
479
497
  });
480
498
  }
@@ -590,7 +608,7 @@ class BrowserLinks {
590
608
  key: options.key,
591
609
  id: this.identify(options.key, options.name),
592
610
  name: options.name,
593
- rpc: new ExtensionRpc,
611
+ rpc: new ExtensionRpc(this.options.timeouts),
594
612
  socket: options.socket,
595
613
  generation: ++this.generation,
596
614
  connectedAt: Date.now(),
@@ -18234,6 +18252,8 @@ function createRelayHousekeeping(options) {
18234
18252
  for (const link of browsers.list()) {
18235
18253
  if (!link.rpc.connected && !link.rpc.unresponsive)
18236
18254
  continue;
18255
+ if (link.rpc.pingPending)
18256
+ continue;
18237
18257
  runPromise(link.rpc.send({ method: "ping" })).catch(() => {
18238
18258
  if (!link.rpc.unresponsive || browsers.byKey(link.key) !== link)
18239
18259
  return;
@@ -19410,7 +19430,16 @@ var makeRelay = fnUntraced(function* (options = {}) {
19410
19430
  },
19411
19431
  catch: (cause) => new Error("Create the relay token", { cause })
19412
19432
  });
19413
- const browsers = new BrowserLinks;
19433
+ const extensionTimeoutEnv = getOrUndefined(yield* option(String2("OPENCODE_BROWSER_EXTENSION_TIMEOUT_MS")));
19434
+ const pingTimeoutEnv = getOrUndefined(yield* option(String2("OPENCODE_BROWSER_PING_TIMEOUT_MS")));
19435
+ const extensionCommandTimeoutMs = configuredTimeoutMs(extensionTimeoutEnv, extensionCommandTimeout);
19436
+ const extensionPingTimeoutMs = configuredTimeoutMs(pingTimeoutEnv, extensionPingTimeout);
19437
+ const browsers = new BrowserLinks({
19438
+ timeouts: {
19439
+ commandTimeoutMs: extensionCommandTimeoutMs,
19440
+ pingTimeoutMs: extensionPingTimeoutMs
19441
+ }
19442
+ });
19414
19443
  const { sendToExtension, sendExtensionBestEffort, sendToEveryBrowser, sendToEach, cleanupTabs } = createExtensionCommands({ browsers, registry, onTabGone: forgetMissingTab });
19415
19444
  const debugEnabled = yield* Boolean2("OPENCODE_BROWSER_DEBUG").pipe(withDefault(false));
19416
19445
  const debugLog = debugEnabled ? (line) => console.error(`[bc ${new Date().toISOString().slice(11, 23)}] ${line}`) : undefined;
@@ -20065,7 +20094,15 @@ var makeRelay = fnUntraced(function* (options = {}) {
20065
20094
  handshake.reloadOutdatedDevExtension(link);
20066
20095
  }, (error) => relayLog("extension.dev_update_failed", { error: error.message }));
20067
20096
  }
20068
- relayLog("relay.ready", { url: endpointUrl, version: opencodeBrowserVersion2, build: opencodeBrowserBuildId2, pid: process.pid, managed });
20097
+ relayLog("relay.ready", {
20098
+ url: endpointUrl,
20099
+ version: opencodeBrowserVersion2,
20100
+ build: opencodeBrowserBuildId2,
20101
+ pid: process.pid,
20102
+ managed,
20103
+ extensionTimeoutMs: extensionCommandTimeoutMs,
20104
+ pingTimeoutMs: extensionPingTimeoutMs
20105
+ });
20069
20106
  }), (error) => gen(function* () {
20070
20107
  yield* cleanup();
20071
20108
  return yield* fail6(error);
@@ -1,6 +1,6 @@
1
1
  import"./main-3mhynene.mjs";
2
2
  import"./main-pmfd055v.mjs";
3
- import"./main-1najktv4.mjs";
3
+ import"./main-amkq7v9m.mjs";
4
4
  import {
5
5
  cliCommand,
6
6
  installCommand,
@@ -18,17 +18,17 @@ import {
18
18
  registryUrl,
19
19
  fetchPublished,
20
20
  runInstaller
21
- } from "./main-3w39tt3k.mjs";
22
- import"./main-b3jrctcx.mjs";
21
+ } from "./main-awaqqre9.mjs";
22
+ import"./main-gg7f12gg.mjs";
23
23
  import {
24
24
  Service,
25
25
  layerFetch,
26
26
  restartRelay,
27
27
  startManagedRelay
28
- } from "./main-eb0f9214.mjs";
28
+ } from "./main-46wtkfsd.mjs";
29
29
  import"./main-4h7rfhhr.mjs";
30
30
  import"./main-s3g4jwx5.mjs";
31
- import"./main-6db334p7.mjs";
31
+ import"./main-jwss6gk9.mjs";
32
32
  import {
33
33
  succeed6,
34
34
  gen,
@@ -63,11 +63,11 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-wtks5b18.mjs";
66
+ } from "./main-g1frnq76.mjs";
67
67
  import"./main-pmfd055v.mjs";
68
68
  import {
69
69
  opencodeBrowserBuildId2
70
- } from "./main-1najktv4.mjs";
70
+ } from "./main-amkq7v9m.mjs";
71
71
  import {
72
72
  installedBinaryPath,
73
73
  installerBinaryPath,
@@ -84,7 +84,7 @@ import {
84
84
  autoUpdateStatus,
85
85
  describeAutoUpdate,
86
86
  runCommand
87
- } from "./main-3w39tt3k.mjs";
87
+ } from "./main-awaqqre9.mjs";
88
88
  import"./main-4h7rfhhr.mjs";
89
89
  import {
90
90
  pairingCodeTtlMs,
@@ -98,25 +98,25 @@ import {
98
98
  revokeBrowserToken,
99
99
  legacyPairingCode,
100
100
  removeLegacyPairingCode
101
- } from "./main-4c9hwd11.mjs";
101
+ } from "./main-fpn564ph.mjs";
102
102
  import {
103
103
  unpackedExtensionId,
104
104
  extensionProtocolSkew,
105
105
  extensionProtocolAdvice
106
- } from "./main-b3jrctcx.mjs";
106
+ } from "./main-gg7f12gg.mjs";
107
107
  import"./main-tk4axre7.mjs";
108
108
  import {
109
109
  defaultSiteSecretsDir
110
- } from "./main-yd718w1x.mjs";
110
+ } from "./main-q2d5bd1e.mjs";
111
111
  import {
112
112
  parseHostname,
113
113
  readRelayConfig,
114
114
  writeRelayConfig,
115
115
  syncDevExtension
116
- } from "./main-2vqd5qzt.mjs";
116
+ } from "./main-44rp8pxg.mjs";
117
117
  import {
118
118
  relayAuthorization
119
- } from "./main-6db334p7.mjs";
119
+ } from "./main-jwss6gk9.mjs";
120
120
 
121
121
  // src/setup.ts
122
122
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -230,9 +230,12 @@ adds a loud warning, so set one first.
230
230
  Execute code can use \`page\`, \`context\`, \`browser\`, persistent \`state\`, the
231
231
  \`files\` helper, compute-only Node modules through \`modules\` (plus \`path\`, \`url\`,
232
232
  \`util\`, \`crypto\`, \`buffer\`, \`zlib\`, \`events\`, \`stream\`), and the browse helpers
233
- above. Timers, \`URL\`, \`TextEncoder\`, \`Buffer\` and \`crypto.randomUUID()\` are
234
- available. \`execute\` returns the value of \`return\`; a single expression returns
235
- automatically. Use \`--file\` for longer scripts:
233
+ above. Those names exist only inside the code string browse runs, never as
234
+ globals of a client's own runtime: in a client that runs tools in its own code
235
+ mode, pass the Playwright code as a string in \`code\`. Timers, \`URL\`,
236
+ \`TextEncoder\`, \`Buffer\` and \`crypto.randomUUID()\` are available. \`execute\`
237
+ returns the value of \`return\`; a single expression returns automatically. Use
238
+ \`--file\` for longer scripts:
236
239
 
237
240
  \`\`\`bash
238
241
  browse execute --session github --file ./perform-flow.js
@@ -1,10 +1,10 @@
1
1
  import"./main-pmfd055v.mjs";
2
- import"./main-1najktv4.mjs";
2
+ import"./main-amkq7v9m.mjs";
3
3
  import {
4
4
  entrySpawnCommand,
5
5
  installedRuntime2,
6
6
  installedVersion
7
- } from "./main-3w39tt3k.mjs";
7
+ } from "./main-awaqqre9.mjs";
8
8
 
9
9
  // src/mcp/supervisor.ts
10
10
  import { spawn } from "node:child_process";
@@ -35,7 +35,7 @@ async function runBinaryMcp(args) {
35
35
  const runtime = installedRuntime2();
36
36
  if (!runtime || runtime.kind === "npx") {
37
37
  process.env[directEnvironmentVariable] = "1";
38
- const { runCli } = await import("./cli-rkex22x1.mjs");
38
+ const { runCli } = await import("./cli-dbb5bjne.mjs");
39
39
  return runCli();
40
40
  }
41
41
  const REPLAY = `opencode-browser-shim-initialize-${randomUUID()}`;
@@ -4,11 +4,11 @@ import {
4
4
  updateNotice2,
5
5
  createUpdateWatcher2,
6
6
  runUpdateCommand2
7
- } from "./main-gx827npm.mjs";
8
- import"./main-b3jrctcx.mjs";
9
- import"./main-3w39tt3k.mjs";
7
+ } from "./main-r8g3xydm.mjs";
8
+ import"./main-gg7f12gg.mjs";
9
+ import"./main-awaqqre9.mjs";
10
10
  import"./main-pmfd055v.mjs";
11
- import"./main-1najktv4.mjs";
11
+ import"./main-amkq7v9m.mjs";
12
12
  export {
13
13
  createUpdateWatcher2 as createUpdateWatcher,
14
14
  formatUpdateNotice2 as formatUpdateNotice,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-1najktv4.mjs";
4
+ } from "./main-amkq7v9m.mjs";
5
5
  export {
6
6
  opencodeBrowserBuildId2 as opencodeBrowserBuildId,
7
7
  opencodeBrowserVersion2 as opencodeBrowserVersion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode/browse",
3
- "version": "0.0.17-dev.178",
3
+ "version": "0.0.17-dev.180",
4
4
  "description": "browse: connect the extension to opencode, and drive your browser from any agent (CLI, MCP, Playwright).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -229,9 +229,12 @@ adds a loud warning, so set one first.
229
229
  Execute code can use `page`, `context`, `browser`, persistent `state`, the
230
230
  `files` helper, compute-only Node modules through `modules` (plus `path`, `url`,
231
231
  `util`, `crypto`, `buffer`, `zlib`, `events`, `stream`), and the browse helpers
232
- above. Timers, `URL`, `TextEncoder`, `Buffer` and `crypto.randomUUID()` are
233
- available. `execute` returns the value of `return`; a single expression returns
234
- automatically. Use `--file` for longer scripts:
232
+ above. Those names exist only inside the code string browse runs, never as
233
+ globals of a client's own runtime: in a client that runs tools in its own code
234
+ mode, pass the Playwright code as a string in `code`. Timers, `URL`,
235
+ `TextEncoder`, `Buffer` and `crypto.randomUUID()` are available. `execute`
236
+ returns the value of `return`; a single expression returns automatically. Use
237
+ `--file` for longer scripts:
235
238
 
236
239
  ```bash
237
240
  browse execute --session github --file ./perform-flow.js
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.17-dev.178";
3
- var opencodeBrowserBuildId2 = "2026-11-12T11:49:15.110Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };