@opencode/browse 0.0.17-dev.177 → 0.0.17-dev.179

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 (27) hide show
  1. package/dist/{cli-v80q2ftg.mjs → cli-ndjnhr9r.mjs} +13 -13
  2. package/dist/cli.mjs +12 -12
  3. package/dist/{helpers-3bdm3prr.mjs → helpers-tnqjatbp.mjs} +1 -1
  4. package/dist/{legacy-runtime-8a0pmstz.mjs → legacy-runtime-we32g1pw.mjs} +4 -4
  5. package/dist/{main-1kc9rkr7.mjs → main-46fba60d.mjs} +1 -1
  6. package/dist/{main-rvag8xz5.mjs → main-5hymrtzq.mjs} +2 -2
  7. package/dist/{main-6qvy84t6.mjs → main-8jd0y17d.mjs} +1 -1
  8. package/dist/{main-rt2carvw.mjs → main-9fev890k.mjs} +2 -2
  9. package/dist/{main-879zq78n.mjs → main-g131p1r6.mjs} +3 -3
  10. package/dist/{main-zab6dsxe.mjs → main-nesqaw1p.mjs} +2 -2
  11. package/dist/{main-fkn2mngw.mjs → main-rpzzm8dd.mjs} +3 -3
  12. package/dist/{main-42w5hyna.mjs → main-thhv62x3.mjs} +1 -1
  13. package/dist/{main-hsmk0p72.mjs → main-tr20hmvg.mjs} +2 -2
  14. package/dist/main-x0s8gad5.mjs +4 -0
  15. package/dist/{main-4vqdvede.mjs → main-zw20hm01.mjs} +3 -3
  16. package/dist/{mcp-psjkrxvc.mjs → mcp-g9gatach.mjs} +10 -10
  17. package/dist/{migrate-jzymz5q6.mjs → migrate-9dmw3qm4.mjs} +4 -4
  18. package/dist/{relay-ktcee1qx.mjs → relay-bgmpqtc8.mjs} +69 -41
  19. package/dist/{runtime-update-sw34h0pn.mjs → runtime-update-6r9m6y2b.mjs} +4 -4
  20. package/dist/{setup-ryfs9zsf.mjs → setup-3be5gs2p.mjs} +7 -7
  21. package/dist/{skill-text-q7e8fafn.mjs → skill-text-7bqtc16a.mjs} +8 -3
  22. package/dist/{supervisor-rzgv88g0.mjs → supervisor-a9hk630y.mjs} +3 -3
  23. package/dist/{update-hz6sxwkh.mjs → update-xy15yz2m.mjs} +3 -3
  24. package/dist/{version-7t4m77cp.mjs → version-5gnas829.mjs} +1 -1
  25. package/package.json +1 -1
  26. package/skills/browse/SKILL.md +8 -3
  27. package/dist/main-51bvvxhp.mjs +0 -4
@@ -25,7 +25,7 @@ import"./main-pmfd055v.mjs";
25
25
  import {
26
26
  opencodeBrowserVersion2,
27
27
  opencodeBrowserBuildId2
28
- } from "./main-51bvvxhp.mjs";
28
+ } from "./main-x0s8gad5.mjs";
29
29
  import {
30
30
  configRoot2,
31
31
  dataRoot,
@@ -38,7 +38,7 @@ import {
38
38
  devExtension,
39
39
  installCommand,
40
40
  autoUpdateStatus
41
- } from "./main-4vqdvede.mjs";
41
+ } from "./main-zw20hm01.mjs";
42
42
  import {
43
43
  extensionProtocolVersion,
44
44
  extensionProtocolAdvice
@@ -64,29 +64,29 @@ import {
64
64
  ensureExtensionConnected,
65
65
  stoppedRelayStatus,
66
66
  statusCollections
67
- } from "./main-879zq78n.mjs";
67
+ } from "./main-g131p1r6.mjs";
68
68
  import"./main-4h7rfhhr.mjs";
69
69
  import {
70
70
  updateJson2,
71
71
  formatUpdateNotice2,
72
72
  updateNotice2
73
- } from "./main-zab6dsxe.mjs";
73
+ } from "./main-nesqaw1p.mjs";
74
74
  import {
75
75
  settingKeys,
76
76
  formatSettings,
77
77
  ensureSessionExists
78
- } from "./main-rt2carvw.mjs";
78
+ } from "./main-9fev890k.mjs";
79
79
  import {
80
80
  addSecret,
81
81
  listSecrets,
82
82
  removeSecret
83
- } from "./main-42w5hyna.mjs";
83
+ } from "./main-thhv62x3.mjs";
84
84
  import {
85
85
  defaultJournalBaseDir,
86
86
  readJournalEntries,
87
87
  formatJournalEntry
88
- } from "./main-hsmk0p72.mjs";
89
- import"./main-6qvy84t6.mjs";
88
+ } from "./main-tr20hmvg.mjs";
89
+ import"./main-8jd0y17d.mjs";
90
90
  import {
91
91
  taggedEnum,
92
92
  is2,
@@ -5844,7 +5844,7 @@ var status = make("status", {
5844
5844
  }
5845
5845
  })).pipe(withDescription4("Show relay, extension, and target status"));
5846
5846
  var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
5847
- const { runMcpServer } = yield* promise(() => import("./mcp-psjkrxvc.mjs"));
5847
+ const { runMcpServer } = yield* promise(() => import("./mcp-g9gatach.mjs"));
5848
5848
  yield* runMcpServer;
5849
5849
  })).pipe(withDescription4("Run the browse MCP server over stdio"));
5850
5850
  registerCliCommand(400, () => tabs);
@@ -5865,7 +5865,7 @@ registerCliCommand(810, ({ packageRoot }) => make("doctor", {
5865
5865
  }
5866
5866
  })).pipe(withDescription4("Diagnose the local browse install and runtime")));
5867
5867
  registerCliCommand(820, () => make("skill", {}, fn("Cli.skill")(function* () {
5868
- const { skillText } = yield* promise(() => import("./skill-text-q7e8fafn.mjs"));
5868
+ const { skillText } = yield* promise(() => import("./skill-text-7bqtc16a.mjs"));
5869
5869
  yield* log(skillText.trimEnd());
5870
5870
  })).pipe(withDescription4("Print the browse agent skill text")));
5871
5871
  registerCliCommand(900, () => mcp);
@@ -5941,7 +5941,7 @@ var execute = make("execute", {
5941
5941
  file: String8("file").pipe(optional4, withDescription3("Read execute code from a file")),
5942
5942
  session: sessionFlag("Continue an existing browse session; defaults to the OpenCode agent's session"),
5943
5943
  rm: Boolean4("rm").pipe(withDefault2(false), withDescription3("Use a fresh one-shot session and close its tabs afterward")),
5944
- timeoutMs: Int6("timeout-ms").pipe(optional4, withDescription3("Overall script timeout in milliseconds (paused during handoff); defaults to 60000, 0 disables. When set, it is also the timeout for Playwright actions and navigations, at least 30 seconds; 0 removes those too")),
5944
+ timeoutMs: Int6("timeout-ms").pipe(optional4, withDescription3("Overall script timeout in milliseconds (paused during handoff); defaults to 60000, 0 disables. It includes time spent waiting behind another execute on the same session, and that call's handoff does not pause it. When set, it is also the timeout for Playwright actions and navigations, at least 30 seconds; 0 removes those too")),
5945
5945
  targetUrl: String8("target-url").pipe(optional4, withDescription3("Use the attached page whose URL contains this text")),
5946
5946
  targetIndex: Int6("target-index").pipe(optional4, withDescription3("Use the attached page at this zero-based index")),
5947
5947
  json: Boolean4("json").pipe(withDefault2(false), withDescription3("Print a machine-readable result envelope: { ok, isError, text, value, valueUnavailable, error?, logs, warnings, diagnostic?, aftermath, session }"))
@@ -6292,12 +6292,12 @@ registerCliCommand(710, () => flightRecorder);
6292
6292
 
6293
6293
  // src/cli/relay.ts
6294
6294
  var serve = make("serve", {}, fn("Cli.serve")(function* () {
6295
- const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-ktcee1qx.mjs"), import("./helpers-3bdm3prr.mjs")]));
6295
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-bgmpqtc8.mjs"), import("./helpers-tnqjatbp.mjs")]));
6296
6296
  const port = yield* portConfig;
6297
6297
  const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
6298
6298
  yield* scoped(gen(function* () {
6299
6299
  const relay = yield* startRelay({ port, additionalExtensionOrigins });
6300
- yield* promise(() => import("./legacy-runtime-8a0pmstz.mjs").then((module) => module.commitLegacyTakeover()));
6300
+ yield* promise(() => import("./legacy-runtime-we32g1pw.mjs").then((module) => module.commitLegacyTakeover()));
6301
6301
  yield* log(`browse relay listening at ${relay.url}`);
6302
6302
  yield* log(`browse connects automatically while the browser runs. Run \`${cliCommand("status")}\` to check.`);
6303
6303
  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.177";
11
+ var embeddedVersion = "0.0.17-dev.179";
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-8a0pmstz.mjs").then((module) => module.prepareLegacyTakeover(oldRuntime)).catch(() => false);
21
+ var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-we32g1pw.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-jzymz5q6.mjs");
26
+ const { migrateLegacy } = await import("./migrate-9dmw3qm4.mjs");
27
27
  migrateLegacy();
28
28
  } catch {}
29
29
  }
30
30
  if (command === "--version" || command === "-v") {
31
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-7t4m77cp.mjs")).opencodeBrowserVersion;
31
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-5gnas829.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-rzgv88g0.mjs")).supervisesMcp()) {
35
- const { runBinaryMcp } = await import("./supervisor-rzgv88g0.mjs");
34
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-a9hk630y.mjs")).supervisesMcp()) {
35
+ const { runBinaryMcp } = await import("./supervisor-a9hk630y.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-psjkrxvc.mjs");
40
+ const { runMcpServer } = await import("./mcp-g9gatach.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-sw34h0pn.mjs");
62
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-6r9m6y2b.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-hz6sxwkh.mjs");
65
+ const { runUpdateCommand } = await import("./update-xy15yz2m.mjs");
66
66
  await runUpdateCommand(process.argv.slice(3));
67
67
  } else if (command && setupCommands.has(command) && !askedForHelp) {
68
- const { runSetup } = await import("./setup-ryfs9zsf.mjs");
68
+ const { runSetup } = await import("./setup-3be5gs2p.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-ryfs9zsf.mjs");
105
+ const { printSetupStatus } = await import("./setup-3be5gs2p.mjs");
106
106
  printSetupStatus();
107
107
  }
108
- const { runCli } = await import("./cli-v80q2ftg.mjs");
108
+ const { runCli } = await import("./cli-ndjnhr9r.mjs");
109
109
  runCli(preCliHelp ? ["--help"] : undefined);
110
110
  }
@@ -32,7 +32,7 @@ import {
32
32
  isRestrictedTarget2,
33
33
  isRestrictedUrl2,
34
34
  dataUrlDocument2
35
- } from "./main-879zq78n.mjs";
35
+ } from "./main-g131p1r6.mjs";
36
36
  import"./main-4h7rfhhr.mjs";
37
37
  import"./main-b3jrctcx.mjs";
38
38
  export {
@@ -5,13 +5,13 @@ import {
5
5
  } from "./main-pmfd055v.mjs";
6
6
  import {
7
7
  opencodeBrowserVersion2
8
- } from "./main-51bvvxhp.mjs";
8
+ } from "./main-x0s8gad5.mjs";
9
9
  import {
10
10
  installerBinaryPath,
11
11
  compiledBinary,
12
12
  channelOf,
13
13
  installedRuntime2
14
- } from "./main-4vqdvede.mjs";
14
+ } from "./main-zw20hm01.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-jzymz5q6.mjs");
40
+ const { copyLegacyData } = await import("./migrate-9dmw3qm4.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-jzymz5q6.mjs");
54
+ const { migrateLegacy } = await import("./migrate-9dmw3qm4.mjs");
55
55
  migrateLegacy(home, now);
56
56
  return true;
57
57
  } catch {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  dataRoot,
6
6
  stateRoot
7
- } from "./main-4vqdvede.mjs";
7
+ } from "./main-zw20hm01.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-1kc9rkr7.mjs";
8
+ } from "./main-46fba60d.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-4vqdvede.mjs";
14
+ } from "./main-zw20hm01.mjs";
15
15
 
16
16
  // src/setup/dev-extension.ts
17
17
  import { createHash } from "node:crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  dataRoot
6
- } from "./main-4vqdvede.mjs";
6
+ } from "./main-zw20hm01.mjs";
7
7
 
8
8
  // src/relay/secrets.ts
9
9
  import crypto from "node:crypto";
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-879zq78n.mjs";
15
+ } from "./main-g131p1r6.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-4vqdvede.mjs";
106
+ } from "./main-zw20hm01.mjs";
107
107
 
108
108
  // node_modules/effect/dist/PrimaryKey.js
109
109
  var symbol = "~effect/PrimaryKey";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./main-s3g4jwx5.mjs";
19
19
  import {
20
20
  opencodeBrowserBuildId2
21
- } from "./main-51bvvxhp.mjs";
21
+ } from "./main-x0s8gad5.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-4vqdvede.mjs";
31
+ } from "./main-zw20hm01.mjs";
32
32
  import {
33
33
  relayAuthorization
34
- } from "./main-6qvy84t6.mjs";
34
+ } from "./main-8jd0y17d.mjs";
35
35
  import {
36
36
  Pointer,
37
37
  passthrough,
@@ -6,7 +6,7 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-4vqdvede.mjs";
9
+ } from "./main-zw20hm01.mjs";
10
10
  import {
11
11
  unpackedReloadAdvice
12
12
  } from "./main-b3jrctcx.mjs";
@@ -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-sw34h0pn.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-6r9m6y2b.mjs");
319
319
  if (await runInstalledUpdate(args))
320
320
  return;
321
321
  if (compiledBinary()) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-51bvvxhp.mjs";
3
+ } from "./main-x0s8gad5.mjs";
4
4
  import {
5
5
  configRoot2,
6
6
  dataRoot,
@@ -21,13 +21,13 @@ import {
21
21
  npmGlobalRoot,
22
22
  installedVersion,
23
23
  runCommand
24
- } from "./main-4vqdvede.mjs";
24
+ } from "./main-zw20hm01.mjs";
25
25
  import {
26
26
  writeStdout
27
27
  } from "./main-tk4axre7.mjs";
28
28
  import {
29
29
  formatPairingCode
30
- } from "./main-1kc9rkr7.mjs";
30
+ } from "./main-46fba60d.mjs";
31
31
  import {
32
32
  unpackedExtensionId
33
33
  } from "./main-b3jrctcx.mjs";
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  dataRoot,
54
54
  cliCommand
55
- } from "./main-4vqdvede.mjs";
55
+ } from "./main-zw20hm01.mjs";
56
56
 
57
57
  // node_modules/effect/dist/Semaphore.js
58
58
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-879zq78n.mjs";
6
+ } from "./main-g131p1r6.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-4vqdvede.mjs";
22
+ } from "./main-zw20hm01.mjs";
23
23
 
24
24
  // src/session-manager/journal.ts
25
25
  import fs from "node:fs";
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.17-dev.179";
3
+ var opencodeBrowserBuildId2 = "2026-11-12T13:09:37.056Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./main-pmfd055v.mjs";
5
5
  import {
6
6
  opencodeBrowserVersion2
7
- } from "./main-51bvvxhp.mjs";
7
+ } from "./main-x0s8gad5.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.177", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
117
+ return { kind: "npm", version: "0.0.17-dev.179", 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.177.zip", sha256: "028e9cb833b9682a1c524b38da68a9ba50b84b5cd4a61f04d4d589e1a5399568", size: 185297 }) {
139
+ function devExtension(baked = { file: "browse-extension-0.0.17-dev.179.zip", sha256: "7f84c344769231684644f4bf74e7e923cf75e990ab985674a0835192ebd91210", size: 185256 }) {
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}`;
@@ -46,11 +46,11 @@ import {
46
46
  import"./main-pmfd055v.mjs";
47
47
  import {
48
48
  opencodeBrowserVersion2
49
- } from "./main-51bvvxhp.mjs";
49
+ } from "./main-x0s8gad5.mjs";
50
50
  import {
51
51
  cliCommand,
52
52
  autoUpdateStatus
53
- } from "./main-4vqdvede.mjs";
53
+ } from "./main-zw20hm01.mjs";
54
54
  import"./main-b3jrctcx.mjs";
55
55
  import {
56
56
  option,
@@ -70,12 +70,12 @@ import {
70
70
  relayBuildProblem,
71
71
  ensureRelay,
72
72
  ensureExtensionConnected
73
- } from "./main-879zq78n.mjs";
73
+ } from "./main-g131p1r6.mjs";
74
74
  import"./main-4h7rfhhr.mjs";
75
75
  import {
76
76
  updateJson2,
77
77
  createUpdateWatcher2
78
- } from "./main-zab6dsxe.mjs";
78
+ } from "./main-nesqaw1p.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-rt2carvw.mjs";
159
+ } from "./main-9fev890k.mjs";
160
160
  import {
161
161
  makeUnsafe,
162
162
  make3,
163
163
  listSecrets
164
- } from "./main-42w5hyna.mjs";
164
+ } from "./main-thhv62x3.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-6qvy84t6.mjs";
179
+ import"./main-8jd0y17d.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",
@@ -8964,7 +8964,7 @@ registerMcpTools({
8964
8964
  timeoutMs: {
8965
8965
  type: "integer",
8966
8966
  minimum: 0,
8967
- description: "Optional overall script timeout in milliseconds (paused while handoff() waits on the user); defaults to 60000, 0 disables. When set, it is also the timeout for Playwright actions and navigations in the code, at least 30 seconds; 0 removes those too."
8967
+ description: "Optional overall script timeout in milliseconds (paused while handoff() waits on the user); defaults to 60000, 0 disables. It includes time spent waiting behind another execute on the same session, and that call's handoff does not pause it. When set, it is also the timeout for Playwright actions and navigations in the code, at least 30 seconds; 0 removes those too."
8968
8968
  }
8969
8969
  }, ["code"]),
8970
8970
  readOnly: false,
@@ -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-fkn2mngw.mjs";
10
+ } from "./main-rpzzm8dd.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-51bvvxhp.mjs";
17
+ import"./main-x0s8gad5.mjs";
18
18
  import {
19
19
  configRoot2,
20
20
  dataRoot,
@@ -23,10 +23,10 @@ import {
23
23
  binRoot,
24
24
  binaryName,
25
25
  devExtensionFolder
26
- } from "./main-4vqdvede.mjs";
26
+ } from "./main-zw20hm01.mjs";
27
27
  import"./main-tk4axre7.mjs";
28
28
  import"./main-4h7rfhhr.mjs";
29
- import"./main-1kc9rkr7.mjs";
29
+ import"./main-46fba60d.mjs";
30
30
  import"./main-b3jrctcx.mjs";
31
31
 
32
32
  // src/setup/migrate.ts
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  opencodeBrowserVersion2,
6
6
  opencodeBrowserBuildId2
7
- } from "./main-51bvvxhp.mjs";
7
+ } from "./main-x0s8gad5.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-4vqdvede.mjs";
31
+ } from "./main-zw20hm01.mjs";
32
32
  import {
33
33
  extensionProtocolVersion,
34
34
  minExtensionProtocolVersion,
@@ -108,7 +108,7 @@ import {
108
108
  dataUrlDocument2,
109
109
  appendManagedRelayProcessLog,
110
110
  relayLog
111
- } from "./main-879zq78n.mjs";
111
+ } from "./main-g131p1r6.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-1kc9rkr7.mjs";
129
+ } from "./main-46fba60d.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-42w5hyna.mjs";
152
+ } from "./main-thhv62x3.mjs";
153
153
  import {
154
154
  defaultJournalBaseDir,
155
155
  makeJournalEntry,
156
156
  appendJournalEntry,
157
157
  startJournalRetention
158
- } from "./main-hsmk0p72.mjs";
158
+ } from "./main-tr20hmvg.mjs";
159
159
  import {
160
160
  createUpdateWatcher2
161
- } from "./main-zab6dsxe.mjs";
161
+ } from "./main-nesqaw1p.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-rt2carvw.mjs";
169
+ } from "./main-9fev890k.mjs";
170
170
  import {
171
171
  relayHostname,
172
172
  isLocalPeer,
173
173
  installedDevExtension,
174
174
  syncDevExtension
175
- } from "./main-rvag8xz5.mjs";
175
+ } from "./main-5hymrtzq.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-6qvy84t6.mjs";
188
+ } from "./main-8jd0y17d.mjs";
189
189
  import {
190
190
  join,
191
191
  interrupt,
@@ -11893,9 +11893,8 @@ class ExecuteSandbox extends DefaultPageHost {
11893
11893
  redactNetworkCaptureText(text) {
11894
11894
  return this.secrets.redactOutputText(text);
11895
11895
  }
11896
- abortExecution() {
11896
+ stopRealm() {
11897
11897
  this.realm?.dispose(new Error("Execute stopped: the session was stopped, deleted or reset"));
11898
- return this.disconnectSettled();
11899
11898
  }
11900
11899
  disconnectSettled() {
11901
11900
  const sandbox = this;
@@ -11904,6 +11903,11 @@ class ExecuteSandbox extends DefaultPageHost {
11904
11903
  sandbox.realm = sandbox.allowNode ? undefined : sandbox.createRealm();
11905
11904
  sandbox.state = sandbox.realm?.state ?? {};
11906
11905
  const browser = sandbox.browser;
11906
+ const closing = yield* (browser ? runPlaywrightOperation({
11907
+ label: "Disconnect sandbox browser after handoff cancellation",
11908
+ timeoutMs: playwrightCloseTimeoutMs,
11909
+ run: () => browser.close()
11910
+ }).pipe(ignore) : void_3).pipe(forkDetach({ startImmediately: true }));
11907
11911
  sandbox.browser = undefined;
11908
11912
  sandbox.unbindDefaultPage(sandbox.defaultPageTargetId, {
11909
11913
  ownsPage: sandbox.ownsPage,
@@ -11911,13 +11915,7 @@ class ExecuteSandbox extends DefaultPageHost {
11911
11915
  pageProtectedUi: sandbox.pageProtectedUi
11912
11916
  });
11913
11917
  yield* sandbox.networkCapture.cancel();
11914
- if (browser) {
11915
- yield* runPlaywrightOperation({
11916
- label: "Disconnect sandbox browser after handoff cancellation",
11917
- timeoutMs: playwrightCloseTimeoutMs,
11918
- run: () => browser.close()
11919
- }).pipe(ignore);
11920
- }
11918
+ yield* join(closing);
11921
11919
  });
11922
11920
  }
11923
11921
  closeSettled(options = {}) {
@@ -13736,46 +13734,63 @@ function executeInSession(ctx, options) {
13736
13734
  const resolved = yield* ctx.resolveWorkSession(options.sessionId, options.createIfMissing, options.browser);
13737
13735
  const session = resolved.session;
13738
13736
  const response = yield* make11();
13737
+ const stopSignal = makeUnsafe4();
13739
13738
  let started = false;
13739
+ let queued = true;
13740
13740
  let cancelled = false;
13741
+ let stopped;
13742
+ const stoppedExecution = (stop) => ({
13743
+ result: stoppedExecuteResult(stop.message, stop.diagnostic),
13744
+ session: createdSummary(session, resolved.created)
13745
+ });
13746
+ const chosenTimeoutMs = options.timeoutMs ?? ctx.hooks.executeTimeoutMs;
13747
+ const effectiveTimeoutMs = chosenTimeoutMs ?? defaultExecuteTimeoutMs;
13748
+ const actionTimeoutMs = chosenTimeoutMs === undefined ? undefined : chosenTimeoutMs === 0 ? 0 : Math.max(30000, chosenTimeoutMs);
13749
+ let deadline;
13750
+ const stopRunning = (message, diagnostic) => {
13751
+ if (stopped !== undefined)
13752
+ return;
13753
+ stopped = { message, diagnostic };
13754
+ deadline?.cancel();
13755
+ runSync(succeed4(stopSignal, { message, diagnostic }));
13756
+ runSync(succeed4(response, stoppedExecution({ message, diagnostic })));
13757
+ };
13758
+ if (effectiveTimeoutMs > 0) {
13759
+ deadline = new ExecutionDeadline(effectiveTimeoutMs, () => {
13760
+ if (queued) {
13761
+ stopRunning(`Execute timed out after ${effectiveTimeoutMs}ms while this session was still busy with another operation; this code did not run.`, "execute-queued-timeout");
13762
+ return;
13763
+ }
13764
+ stopRunning(`Execute timed out after ${effectiveTimeoutMs}ms. Pass --timeout-ms <ms> (or timeoutMs in MCP) for longer runs, or 0 to disable.`, "execute-timeout");
13765
+ });
13766
+ }
13741
13767
  const operation = gen(function* () {
13768
+ queued = false;
13742
13769
  if (cancelled) {
13743
13770
  return yield* sessionError("inactive", `Session execute was cancelled before starting: ${session.id}`, session.id);
13744
13771
  }
13772
+ if (stopped !== undefined) {
13773
+ return stoppedExecution(stopped);
13774
+ }
13745
13775
  if (ctx.sessions.get(session.id) !== session) {
13746
13776
  return yield* sessionError("inactive", `Session is no longer active: ${session.id}`, session.id);
13747
13777
  }
13748
13778
  yield* trySession(() => ctx.resolveBrowser(options.browser, session));
13749
13779
  if (session.browser?.key && ctx.hooks.checkBrowserResponsive)
13750
13780
  yield* ctx.hooks.checkBrowserResponsive(session.browser.key).pipe(mapError2((error) => sessionError("browser-unavailable", error.message, session.id)));
13781
+ if (stopped !== undefined) {
13782
+ return stoppedExecution(stopped);
13783
+ }
13751
13784
  started = true;
13752
13785
  session.updatedAt = new Date().toISOString();
13753
- yield* ctx.setExecuting(session.id, true);
13754
- const stopSignal = makeUnsafe4();
13755
13786
  const released = makeUnsafe4();
13756
- const chosenTimeoutMs = options.timeoutMs ?? ctx.hooks.executeTimeoutMs;
13757
- const effectiveTimeoutMs = chosenTimeoutMs ?? defaultExecuteTimeoutMs;
13758
- const actionTimeoutMs = chosenTimeoutMs === undefined ? undefined : chosenTimeoutMs === 0 ? 0 : Math.max(30000, chosenTimeoutMs);
13759
- let deadline;
13760
- const stopRunning = (message, diagnostic) => {
13761
- deadline?.cancel();
13762
- runSync(succeed4(stopSignal, { message, diagnostic }));
13763
- runSync(succeed4(response, {
13764
- result: stoppedExecuteResult(message, diagnostic),
13765
- session: createdSummary(session, resolved.created)
13766
- }));
13767
- };
13768
- if (effectiveTimeoutMs > 0) {
13769
- deadline = new ExecutionDeadline(effectiveTimeoutMs, () => {
13770
- stopRunning(`Execute timed out after ${effectiveTimeoutMs}ms. Pass --timeout-ms <ms> (or timeoutMs in MCP) for longer runs, or 0 to disable.`, "execute-timeout");
13771
- });
13772
- }
13773
13787
  const running = {
13774
13788
  released,
13775
13789
  stop: stopRunning,
13776
13790
  pauseTimeout: () => deadline ? deadline.pause() : () => {}
13777
13791
  };
13778
13792
  ctx.runningExecutions.set(session.id, running);
13793
+ yield* ctx.setExecuting(session.id, true);
13779
13794
  let forced = false;
13780
13795
  const startedAt = Date.now();
13781
13796
  const result = yield* gen(function* () {
@@ -13822,8 +13837,8 @@ function executeInSession(ctx, options) {
13822
13837
  return { result: resultWithHint, session: createdSummary(session, resolved.created) };
13823
13838
  });
13824
13839
  const worker = session.executeSemaphore.withPermit(operation.pipe(matchEffect2({
13825
- onFailure: (error) => (resolved.created ? ctx.cleanupCreatedSession(session) : void_3).pipe(andThen2(fail5(response, error))),
13826
- onSuccess: (value) => (options.removeAfterExecute ? ctx.cleanupCreatedSession(session) : void_3).pipe(andThen2(succeed4(response, value)))
13840
+ onFailure: (error) => sync2(() => deadline?.cancel()).pipe(andThen2(resolved.created ? ctx.cleanupCreatedSession(session) : void_3), andThen2(fail5(response, error))),
13841
+ onSuccess: (value) => sync2(() => deadline?.cancel()).pipe(andThen2(options.removeAfterExecute ? ctx.cleanupCreatedSession(session) : void_3), andThen2(succeed4(response, value)))
13827
13842
  })));
13828
13843
  const workerFiber = yield* ctx.admission.forkTracked(worker, session.id);
13829
13844
  return yield* restore(_await(response)).pipe(onInterrupt(() => suspend2(() => {
@@ -13832,6 +13847,7 @@ function executeInSession(ctx, options) {
13832
13847
  return void_3;
13833
13848
  }
13834
13849
  cancelled = true;
13850
+ deadline?.cancel();
13835
13851
  return interrupt(workerFiber).pipe(asVoid2, andThen2(resolved.created ? session.executeSemaphore.withPermit(ctx.cleanupCreatedSession(session)) : void_3));
13836
13852
  })));
13837
13853
  })));
@@ -14377,7 +14393,11 @@ class OpenCodeBrowserSessions {
14377
14393
  }
14378
14394
  endStoppedScript(session) {
14379
14395
  this.cancelSessionHandoff(session.id);
14380
- return session.sandbox.abortExecution().pipe(timeoutOption(this.stopGraceMs()), catchCause((cause) => sync2(() => console.error("Abort stopped execute", cause))), asVoid2);
14396
+ session.sandbox.stopRealm();
14397
+ const graceMs = this.stopGraceMs();
14398
+ const cancelNavigation = this.hooks.onStoppingExecute?.(session);
14399
+ const cancel = cancelNavigation === undefined ? void_3 : cancelNavigation.pipe(timeoutOption(Math.min(2000, Math.floor(graceMs / 2))), catchCause((cause) => sync2(() => console.error("Cancel stopped execute navigation", cause))), asVoid2);
14400
+ return cancel.pipe(andThen2(suspend2(() => session.sandbox.disconnectSettled())), timeoutOption(graceMs), catchCause((cause) => sync2(() => console.error("Disconnect stopped execute", cause))), asVoid2);
14381
14401
  }
14382
14402
  replaceSandbox(session) {
14383
14403
  if (this.sessions.get(session.id) !== session)
@@ -19549,6 +19569,14 @@ var makeRelay = fnUntraced(function* (options = {}) {
19549
19569
  },
19550
19570
  targetBrowserKey: (tabId) => browsers.ownerKey(tabId),
19551
19571
  getUserAttachedPageUrls: (session) => registry.listRootTargets().filter((target) => target.owner === "user" && browsers.ownerKey(target.tabId) === session.browser?.key).map((target) => target.targetInfo.url || "about:blank"),
19572
+ onStoppingExecute: (session) => {
19573
+ if (session.readOnly)
19574
+ return void_3;
19575
+ const tabs = registry.listRootTargets().filter((target) => target.opencodeBrowserSessionId === session.id);
19576
+ if (tabs.length === 0)
19577
+ return void_3;
19578
+ return forEach(tabs, (target) => sendDebuggerCommand({ tabId: target.tabId, method: "Page.stopLoading", params: {} }).pipe(timeoutOption("2 seconds"), ignore), { concurrency: "unbounded", discard: true });
19579
+ },
19552
19580
  ...executeTimeoutMs === undefined ? {} : { executeTimeoutMs },
19553
19581
  onExecuteStateChange: (sessionId, executing) => gen(function* () {
19554
19582
  yield* presentation.onSessionExecuteStateChange(sessionId, executing);
@@ -1,6 +1,6 @@
1
1
  import"./main-3mhynene.mjs";
2
2
  import"./main-pmfd055v.mjs";
3
- import"./main-51bvvxhp.mjs";
3
+ import"./main-x0s8gad5.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-4vqdvede.mjs";
21
+ } from "./main-zw20hm01.mjs";
22
22
  import"./main-b3jrctcx.mjs";
23
23
  import {
24
24
  Service,
25
25
  layerFetch,
26
26
  restartRelay,
27
27
  startManagedRelay
28
- } from "./main-879zq78n.mjs";
28
+ } from "./main-g131p1r6.mjs";
29
29
  import"./main-4h7rfhhr.mjs";
30
30
  import"./main-s3g4jwx5.mjs";
31
- import"./main-6qvy84t6.mjs";
31
+ import"./main-8jd0y17d.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-fkn2mngw.mjs";
66
+ } from "./main-rpzzm8dd.mjs";
67
67
  import"./main-pmfd055v.mjs";
68
68
  import {
69
69
  opencodeBrowserBuildId2
70
- } from "./main-51bvvxhp.mjs";
70
+ } from "./main-x0s8gad5.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-4vqdvede.mjs";
87
+ } from "./main-zw20hm01.mjs";
88
88
  import"./main-4h7rfhhr.mjs";
89
89
  import {
90
90
  pairingCodeTtlMs,
@@ -98,7 +98,7 @@ import {
98
98
  revokeBrowserToken,
99
99
  legacyPairingCode,
100
100
  removeLegacyPairingCode
101
- } from "./main-1kc9rkr7.mjs";
101
+ } from "./main-46fba60d.mjs";
102
102
  import {
103
103
  unpackedExtensionId,
104
104
  extensionProtocolSkew,
@@ -107,16 +107,16 @@ import {
107
107
  import"./main-tk4axre7.mjs";
108
108
  import {
109
109
  defaultSiteSecretsDir
110
- } from "./main-42w5hyna.mjs";
110
+ } from "./main-thhv62x3.mjs";
111
111
  import {
112
112
  parseHostname,
113
113
  readRelayConfig,
114
114
  writeRelayConfig,
115
115
  syncDevExtension
116
- } from "./main-rvag8xz5.mjs";
116
+ } from "./main-5hymrtzq.mjs";
117
117
  import {
118
118
  relayAuthorization
119
- } from "./main-6qvy84t6.mjs";
119
+ } from "./main-8jd0y17d.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
@@ -245,6 +248,8 @@ about 2 seconds; split heavy loops with
245
248
 
246
249
  \`execute\`'s \`timeoutMs\` (MCP) / \`--timeout-ms\` (CLI) is the whole-script
247
250
  deadline, 60 seconds by default and paused during \`handoff()\`; \`0\` disables it.
251
+ It starts with the call, so time queued behind another execute on the session
252
+ counts, and that other call's handoff doesn't pause it.
248
253
  When you set it (or the relay sets \`OPENCODE_BROWSER_EXECUTE_TIMEOUT_MS\`),
249
254
  Playwright actions and navigations get the same budget, at least 30 seconds;
250
255
  without either they keep Playwright's 30-second default.
@@ -1,10 +1,10 @@
1
1
  import"./main-pmfd055v.mjs";
2
- import"./main-51bvvxhp.mjs";
2
+ import"./main-x0s8gad5.mjs";
3
3
  import {
4
4
  entrySpawnCommand,
5
5
  installedRuntime2,
6
6
  installedVersion
7
- } from "./main-4vqdvede.mjs";
7
+ } from "./main-zw20hm01.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-v80q2ftg.mjs");
38
+ const { runCli } = await import("./cli-ndjnhr9r.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-zab6dsxe.mjs";
7
+ } from "./main-nesqaw1p.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-4vqdvede.mjs";
9
+ import"./main-zw20hm01.mjs";
10
10
  import"./main-pmfd055v.mjs";
11
- import"./main-51bvvxhp.mjs";
11
+ import"./main-x0s8gad5.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-51bvvxhp.mjs";
4
+ } from "./main-x0s8gad5.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.177",
3
+ "version": "0.0.17-dev.179",
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
@@ -244,6 +247,8 @@ about 2 seconds; split heavy loops with
244
247
 
245
248
  `execute`'s `timeoutMs` (MCP) / `--timeout-ms` (CLI) is the whole-script
246
249
  deadline, 60 seconds by default and paused during `handoff()`; `0` disables it.
250
+ It starts with the call, so time queued behind another execute on the session
251
+ counts, and that other call's handoff doesn't pause it.
247
252
  When you set it (or the relay sets `OPENCODE_BROWSER_EXECUTE_TIMEOUT_MS`),
248
253
  Playwright actions and navigations get the same budget, at least 30 seconds;
249
254
  without either they keep Playwright's 30-second default.
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.17-dev.177";
3
- var opencodeBrowserBuildId2 = "2026-11-12T03:35:34.521Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };