@opencode/browse 0.0.16-dev.140 → 0.0.16-dev.143

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 (25) hide show
  1. package/dist/{cli-yeh12xqt.mjs → cli-evq7nxvm.mjs} +10 -10
  2. package/dist/cli.mjs +11 -11
  3. package/dist/{coreBundle-v82htk0w.mjs → coreBundle-mbshhes2.mjs} +1 -2
  4. package/dist/{helpers-cc7f5nfe.mjs → helpers-v8p9k6kx.mjs} +1 -1
  5. package/dist/{main-8sczgnet.mjs → main-0nav7jm4.mjs} +1 -1
  6. package/dist/{main-cvz67srf.mjs → main-1jrvda6m.mjs} +3 -3
  7. package/dist/{main-fba6kxk3.mjs → main-3jyk041x.mjs} +2 -2
  8. package/dist/{main-pv9f3rk8.mjs → main-6g4s9w8d.mjs} +2 -2
  9. package/dist/{main-wnw5xxfp.mjs → main-70n5sw7h.mjs} +9 -5
  10. package/dist/main-gxk938vp.mjs +4 -0
  11. package/dist/{main-bd4r5vm7.mjs → main-jdsvfz5d.mjs} +2 -2
  12. package/dist/{main-gp0hgckc.mjs → main-pkvnjcgw.mjs} +2 -2
  13. package/dist/{main-w22ytkrj.mjs → main-t9jfz58m.mjs} +1 -1
  14. package/dist/{main-1zqpc1gc.mjs → main-ya9p9h92.mjs} +3 -3
  15. package/dist/{main-e51pqgkb.mjs → main-zzpzy7t5.mjs} +1 -1
  16. package/dist/{mcp-79gp8yse.mjs → mcp-cf40r5j5.mjs} +22 -11
  17. package/dist/{migrate-5zsq4k88.mjs → migrate-w255ycts.mjs} +4 -4
  18. package/dist/{relay-3cj13pqn.mjs → relay-sgb403y7.mjs} +16 -15
  19. package/dist/{runtime-update-9y9grs3a.mjs → runtime-update-a04nndfx.mjs} +4 -4
  20. package/dist/{setup-r26f1w65.mjs → setup-yvvqt4se.mjs} +7 -7
  21. package/dist/{supervisor-zjsd3rxk.mjs → supervisor-k22sb1cy.mjs} +3 -3
  22. package/dist/{update-37fzcm2e.mjs → update-eyx8sh3v.mjs} +3 -3
  23. package/dist/{version-n8qr4qhq.mjs → version-zctgfw49.mjs} +1 -1
  24. package/package.json +1 -1
  25. package/dist/main-snsa0zy2.mjs +0 -4
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  opencodeBrowserVersion2,
18
18
  opencodeBrowserBuildId2
19
- } from "./main-snsa0zy2.mjs";
19
+ } from "./main-gxk938vp.mjs";
20
20
  import {
21
21
  configRoot2,
22
22
  dataRoot,
@@ -29,7 +29,7 @@ import {
29
29
  devExtension,
30
30
  installCommand,
31
31
  autoUpdateStatus
32
- } from "./main-cvz67srf.mjs";
32
+ } from "./main-1jrvda6m.mjs";
33
33
  import {
34
34
  extensionProtocolVersion,
35
35
  extensionProtocolAdvice
@@ -55,29 +55,29 @@ import {
55
55
  ensureExtensionConnected,
56
56
  stoppedRelayStatus,
57
57
  statusCollections
58
- } from "./main-1zqpc1gc.mjs";
58
+ } from "./main-ya9p9h92.mjs";
59
59
  import"./main-azpzpy0x.mjs";
60
60
  import {
61
61
  updateJson2,
62
62
  formatUpdateNotice2,
63
63
  updateNotice2
64
- } from "./main-pv9f3rk8.mjs";
64
+ } from "./main-6g4s9w8d.mjs";
65
65
  import {
66
66
  settingKeys,
67
67
  formatSettings,
68
68
  ensureSessionExists
69
- } from "./main-bd4r5vm7.mjs";
69
+ } from "./main-jdsvfz5d.mjs";
70
70
  import {
71
71
  addSecret,
72
72
  listSecrets,
73
73
  removeSecret
74
- } from "./main-e51pqgkb.mjs";
74
+ } from "./main-zzpzy7t5.mjs";
75
75
  import {
76
76
  defaultJournalBaseDir,
77
77
  readJournalEntries,
78
78
  formatJournalEntry
79
- } from "./main-fba6kxk3.mjs";
80
- import"./main-8sczgnet.mjs";
79
+ } from "./main-3jyk041x.mjs";
80
+ import"./main-0nav7jm4.mjs";
81
81
  import {
82
82
  format,
83
83
  assignProperty,
@@ -5871,7 +5871,7 @@ var status = make("status", {
5871
5871
  }
5872
5872
  })).pipe(withDescription4("Show relay, extension, and target status"));
5873
5873
  var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
5874
- const { runMcpServer } = yield* promise(() => import("./mcp-79gp8yse.mjs"));
5874
+ const { runMcpServer } = yield* promise(() => import("./mcp-cf40r5j5.mjs"));
5875
5875
  yield* runMcpServer;
5876
5876
  })).pipe(withDescription4("Run the browse MCP server over stdio"));
5877
5877
  registerCliCommand(400, () => tabs);
@@ -6319,7 +6319,7 @@ registerCliCommand(710, () => flightRecorder);
6319
6319
 
6320
6320
  // src/cli/relay.ts
6321
6321
  var serve = make("serve", {}, fn("Cli.serve")(function* () {
6322
- const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-3cj13pqn.mjs"), import("./helpers-cc7f5nfe.mjs")]));
6322
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-sgb403y7.mjs"), import("./helpers-v8p9k6kx.mjs")]));
6323
6323
  const port = yield* portConfig;
6324
6324
  const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
6325
6325
  yield* scoped(gen(function* () {
package/dist/cli.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  // src/main.ts
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
- var embeddedVersion = "0.0.16-dev.140";
9
+ var embeddedVersion = "0.0.16-dev.143";
10
10
  var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
11
11
  var command = process.argv[2];
12
12
  var args = process.argv.slice(3);
@@ -17,29 +17,29 @@ var askedForHelp = command === "--help" || command === "-h" || options.some((arg
17
17
  var preCliHelp = askedForHelp && (command === "update" || command !== undefined && setupCommands.has(command));
18
18
  if (command !== "--version" && command !== "-v" && !askedForHelp && !process.env.OPENCODE_BROWSER_HOME && legacyRoots().some((root) => fs.existsSync(root))) {
19
19
  try {
20
- const { migrateLegacy } = await import("./migrate-5zsq4k88.mjs");
20
+ const { migrateLegacy } = await import("./migrate-w255ycts.mjs");
21
21
  migrateLegacy();
22
22
  } catch {}
23
23
  }
24
24
  if (command === "--version" || command === "-v") {
25
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-n8qr4qhq.mjs")).opencodeBrowserVersion;
25
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-zctgfw49.mjs")).opencodeBrowserVersion;
26
26
  process.stdout.write(`${opencodeBrowserVersion}
27
27
  `);
28
- } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-zjsd3rxk.mjs")).supervisesMcp()) {
29
- const { runBinaryMcp } = await import("./supervisor-zjsd3rxk.mjs");
28
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-k22sb1cy.mjs")).supervisesMcp()) {
29
+ const { runBinaryMcp } = await import("./supervisor-k22sb1cy.mjs");
30
30
  await runBinaryMcp(process.argv.slice(3));
31
31
  } else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
32
32
  const { NodeRuntime } = await import("./index-6gkr235e.mjs");
33
- const { runMcpServer } = await import("./mcp-79gp8yse.mjs");
33
+ const { runMcpServer } = await import("./mcp-cf40r5j5.mjs");
34
34
  runMcpServer.pipe(NodeRuntime.runMain);
35
35
  } else if (command === "self-update" || command === "runtime-switch") {
36
- const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-9y9grs3a.mjs");
36
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-a04nndfx.mjs");
37
37
  await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
38
38
  } else if (command === "update" && !askedForHelp) {
39
- const { runUpdateCommand } = await import("./update-37fzcm2e.mjs");
39
+ const { runUpdateCommand } = await import("./update-eyx8sh3v.mjs");
40
40
  await runUpdateCommand(process.argv.slice(3));
41
41
  } else if (command && setupCommands.has(command) && !askedForHelp) {
42
- const { runSetup } = await import("./setup-r26f1w65.mjs");
42
+ const { runSetup } = await import("./setup-yvvqt4se.mjs");
43
43
  await runSetup(command, process.argv.slice(3));
44
44
  } else {
45
45
  if (preCliHelp || !command || command === "--help" || command === "-h") {
@@ -76,9 +76,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
76
76
  `);
77
77
  }
78
78
  if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
79
- const { printSetupStatus } = await import("./setup-r26f1w65.mjs");
79
+ const { printSetupStatus } = await import("./setup-yvvqt4se.mjs");
80
80
  printSetupStatus();
81
81
  }
82
- const { runCli } = await import("./cli-yeh12xqt.mjs");
82
+ const { runCli } = await import("./cli-evq7nxvm.mjs");
83
83
  runCli(preCliHelp ? ["--help"] : undefined);
84
84
  }
@@ -4,6 +4,5 @@ import { default as default2 } from "patchright-core/lib/coreBundle";
4
4
  export {
5
5
  chromium,
6
6
  errors,
7
- default2 as internals,
8
- selectors
7
+ default2 as internals
9
8
  };
@@ -32,7 +32,7 @@ import {
32
32
  isRestrictedTarget2,
33
33
  isRestrictedUrl2,
34
34
  dataUrlDocument2
35
- } from "./main-1zqpc1gc.mjs";
35
+ } from "./main-ya9p9h92.mjs";
36
36
  import"./main-azpzpy0x.mjs";
37
37
  import"./main-b3jrctcx.mjs";
38
38
  export {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-azpzpy0x.mjs";
4
4
  import {
5
5
  dataRoot
6
- } from "./main-cvz67srf.mjs";
6
+ } from "./main-1jrvda6m.mjs";
7
7
 
8
8
  // src/relay/secrets.ts
9
9
  import crypto from "node:crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-snsa0zy2.mjs";
3
+ } from "./main-gxk938vp.mjs";
4
4
 
5
5
  // src/paths.ts
6
6
  import fs from "node:fs";
@@ -110,7 +110,7 @@ function cliInstall() {
110
110
  return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
111
111
  if (fromCheckout())
112
112
  return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
113
- return { kind: "npm", version: "0.0.16-dev.140", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
113
+ return { kind: "npm", version: "0.0.16-dev.143", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
114
114
  }
115
115
  function cliPrefix(install = cliInstall()) {
116
116
  if (install.kind === "binary") {
@@ -132,7 +132,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
132
132
  return id ? { id } : {};
133
133
  }
134
134
  var RELEASE_SERVICE = "https://anoma.ly/release";
135
- function devExtension(baked = { file: "browse-extension-0.0.16-dev.140.zip", sha256: "cfe3a1c3d1646ab8cffe5af347924166b80006de2e8a89697f8cfb917b884f32", size: 183293 }) {
135
+ function devExtension(baked = { file: "browse-extension-0.0.16-dev.143.zip", sha256: "fae5f273a3265aaa7c10994221ebbc949232e24584da72237cec216214edf66b", size: 183294 }) {
136
136
  return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
137
137
  }
138
138
  var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-azpzpy0x.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-1zqpc1gc.mjs";
6
+ } from "./main-ya9p9h92.mjs";
7
7
  import {
8
8
  isSome,
9
9
  decodeUnknownOption,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./main-yf5j8g79.mjs";
18
18
  import {
19
19
  stateRoot
20
- } from "./main-cvz67srf.mjs";
20
+ } from "./main-1jrvda6m.mjs";
21
21
 
22
22
  // src/session-manager/journal.ts
23
23
  import fs from "node:fs";
@@ -6,7 +6,7 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-cvz67srf.mjs";
9
+ } from "./main-1jrvda6m.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-9y9grs3a.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-a04nndfx.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-snsa0zy2.mjs";
3
+ } from "./main-gxk938vp.mjs";
4
4
  import {
5
5
  configRoot2,
6
6
  dataRoot,
@@ -20,10 +20,10 @@ import {
20
20
  storeUrl,
21
21
  installedVersion,
22
22
  runCommand
23
- } from "./main-cvz67srf.mjs";
23
+ } from "./main-1jrvda6m.mjs";
24
24
  import {
25
25
  formatPairingCode
26
- } from "./main-w22ytkrj.mjs";
26
+ } from "./main-t9jfz58m.mjs";
27
27
  import {
28
28
  unpackedExtensionId
29
29
  } from "./main-b3jrctcx.mjs";
@@ -9409,7 +9409,8 @@ var agentLabels = {
9409
9409
  hermes: "Hermes Agent",
9410
9410
  grok: "Grok Build",
9411
9411
  vibe: "Mistral Vibe",
9412
- qoder: "Qoder CLI"
9412
+ qoder: "Qoder CLI",
9413
+ pi: "Pi"
9413
9414
  };
9414
9415
  var agentNames = Object.keys(agentLabels);
9415
9416
 
@@ -9452,6 +9453,8 @@ function callingAgent(env) {
9452
9453
  return identified;
9453
9454
  if (env.OPENCODE === "1" || env.OPENCODE_SESSION_ID)
9454
9455
  return "opencode";
9456
+ if (env.PI_SESSION_ID)
9457
+ return "pi";
9455
9458
  return;
9456
9459
  }
9457
9460
  function agentLocations(home, config, onPath, opencodeConfig, opencodeBinary) {
@@ -9506,7 +9509,8 @@ function agentLocations(home, config, onPath, opencodeConfig, opencodeBinary) {
9506
9509
  loc("hermes", path.join(env.HERMES_HOME ?? at(".hermes"), "config.yaml"), "hermes"),
9507
9510
  loc("grok", path.join(env.GROK_HOME ?? at(".grok"), "config.toml"), "grok"),
9508
9511
  loc("vibe", path.join(env.VIBE_HOME ?? at(".vibe"), "config.toml"), "vibe"),
9509
- loc("qoder", at(".qoder/settings.json"), "qoder", "Qoder")
9512
+ loc("qoder", at(".qoder/settings.json"), "qoder", "Qoder"),
9513
+ loc("pi", path.join(env.PI_CODING_AGENT_DIR ?? at(".pi/agent"), "mcp.json"), "pi")
9510
9514
  ];
9511
9515
  }
9512
9516
  var object = (value) => !!value && typeof value === "object" && !Array.isArray(value);
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.16-dev.143";
3
+ var opencodeBrowserBuildId2 = "2026-11-08T18:28:42.034Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-1zqpc1gc.mjs";
15
+ } from "./main-ya9p9h92.mjs";
16
16
  import {
17
17
  isStream,
18
18
  provideContext
@@ -101,7 +101,7 @@ import {
101
101
  } from "./main-ken6azcs.mjs";
102
102
  import {
103
103
  cliCommand
104
- } from "./main-cvz67srf.mjs";
104
+ } from "./main-1jrvda6m.mjs";
105
105
 
106
106
  // node_modules/effect/dist/PrimaryKey.js
107
107
  var symbol = "~effect/PrimaryKey";
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-w22ytkrj.mjs";
8
+ } from "./main-t9jfz58m.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-cvz67srf.mjs";
14
+ } from "./main-1jrvda6m.mjs";
15
15
 
16
16
  // src/setup/dev-extension.ts
17
17
  import { createHash } from "node:crypto";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  dataRoot,
6
6
  stateRoot
7
- } from "./main-cvz67srf.mjs";
7
+ } from "./main-1jrvda6m.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./main-9t2s5ptx.mjs";
16
16
  import {
17
17
  opencodeBrowserBuildId2
18
- } from "./main-snsa0zy2.mjs";
18
+ } from "./main-gxk938vp.mjs";
19
19
  import {
20
20
  compiledBinary,
21
21
  scriptEntry,
@@ -24,10 +24,10 @@ import {
24
24
  compareVersions,
25
25
  installedRuntime2,
26
26
  installedVersion
27
- } from "./main-cvz67srf.mjs";
27
+ } from "./main-1jrvda6m.mjs";
28
28
  import {
29
29
  relayAuthorization
30
- } from "./main-8sczgnet.mjs";
30
+ } from "./main-0nav7jm4.mjs";
31
31
  import {
32
32
  assignProperty,
33
33
  PipeInspectableProto,
@@ -50,7 +50,7 @@ import {
50
50
  import {
51
51
  dataRoot,
52
52
  cliCommand
53
- } from "./main-cvz67srf.mjs";
53
+ } from "./main-1jrvda6m.mjs";
54
54
 
55
55
  // node_modules/effect/dist/Semaphore.js
56
56
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -44,11 +44,11 @@ import {
44
44
  } from "./main-9t2s5ptx.mjs";
45
45
  import {
46
46
  opencodeBrowserVersion2
47
- } from "./main-snsa0zy2.mjs";
47
+ } from "./main-gxk938vp.mjs";
48
48
  import {
49
49
  cliCommand,
50
50
  autoUpdateStatus
51
- } from "./main-cvz67srf.mjs";
51
+ } from "./main-1jrvda6m.mjs";
52
52
  import"./main-b3jrctcx.mjs";
53
53
  import {
54
54
  option,
@@ -68,12 +68,12 @@ import {
68
68
  relayBuildProblem,
69
69
  ensureRelay,
70
70
  ensureExtensionConnected
71
- } from "./main-1zqpc1gc.mjs";
71
+ } from "./main-ya9p9h92.mjs";
72
72
  import"./main-azpzpy0x.mjs";
73
73
  import {
74
74
  updateJson2,
75
75
  createUpdateWatcher2
76
- } from "./main-pv9f3rk8.mjs";
76
+ } from "./main-6g4s9w8d.mjs";
77
77
  import {
78
78
  settingSpecs,
79
79
  securityVariables,
@@ -154,12 +154,12 @@ import {
154
154
  toolResultForValue2,
155
155
  mcpErrorMessage2,
156
156
  toolResult
157
- } from "./main-bd4r5vm7.mjs";
157
+ } from "./main-jdsvfz5d.mjs";
158
158
  import {
159
159
  makeUnsafe,
160
160
  make3,
161
161
  listSecrets
162
- } from "./main-e51pqgkb.mjs";
162
+ } from "./main-zzpzy7t5.mjs";
163
163
  import {
164
164
  Clock,
165
165
  type,
@@ -174,7 +174,7 @@ import {
174
174
  orElse,
175
175
  exhaustive
176
176
  } from "./main-er120rjm.mjs";
177
- import"./main-8sczgnet.mjs";
177
+ import"./main-0nav7jm4.mjs";
178
178
  import {
179
179
  hash,
180
180
  equals,
@@ -8768,6 +8768,7 @@ import { fileURLToPath } from "node:url";
8768
8768
  // src/mcp/registry.ts
8769
8769
  import { createHash } from "node:crypto";
8770
8770
  var groups = [];
8771
+ var maxRememberedCallers = 1024;
8771
8772
  function registerMcpTools(options) {
8772
8773
  groups.push({
8773
8774
  order: options.order,
@@ -8783,7 +8784,7 @@ function createMcpToolContext(options) {
8783
8784
  type: "string",
8784
8785
  description: "Optional browser id for a new session's tabs; omit for the default browser. A session stays in its browser. Call status to list the connected browsers."
8785
8786
  };
8786
- const newCaller = (session) => ({ ...session, sessions: new Set([session.id]), updateNoted: false });
8787
+ const newCaller = (session) => ({ ...session, sessions: new Set(session.established ? [session.id] : []), updateNoted: false });
8787
8788
  const shared = newCaller(options.currentSession);
8788
8789
  const callers = new Map;
8789
8790
  const caller = serviceOption(McpRequestContext).pipe(map5((context) => {
@@ -8792,8 +8793,13 @@ function createMcpToolContext(options) {
8792
8793
  if (typeof id !== "string" || id === "")
8793
8794
  return shared;
8794
8795
  const known = callers.get(id);
8795
- if (known)
8796
+ if (known) {
8797
+ callers.delete(id);
8798
+ callers.set(id, known);
8796
8799
  return known;
8800
+ }
8801
+ if (callers.size >= maxRememberedCallers)
8802
+ callers.delete(callers.keys().next().value);
8797
8803
  const created = newCaller(options.currentSession.established ? options.currentSession : { id: callerSessionId(id), established: false });
8798
8804
  callers.set(id, created);
8799
8805
  return created;
@@ -8813,7 +8819,12 @@ function createMcpToolContext(options) {
8813
8819
  browserProperty,
8814
8820
  caller,
8815
8821
  resolveSessionId,
8816
- establishCurrentSession
8822
+ establishCurrentSession,
8823
+ forgetSession: (id) => {
8824
+ shared.sessions.delete(id);
8825
+ for (const current of callers.values())
8826
+ current.sessions.delete(id);
8827
+ }
8817
8828
  };
8818
8829
  }
8819
8830
  function buildRegisteredMcpTools(ctx) {
@@ -9496,10 +9507,10 @@ registerMcpTools({
9496
9507
  const id = yield* ctx.resolveSessionId(input, "id");
9497
9508
  const result = yield* ctx.relay.sessionDelete(id);
9498
9509
  const caller = yield* ctx.caller;
9510
+ ctx.forgetSession(id);
9499
9511
  if (caller.id === id) {
9500
9512
  caller.id = `mcp-${crypto.randomUUID().slice(0, 8)}`;
9501
9513
  caller.established = false;
9502
- caller.sessions.add(caller.id);
9503
9514
  }
9504
9515
  return { ...result, currentSession: caller.id };
9505
9516
  })
@@ -6,8 +6,8 @@ import {
6
6
  browseServerCommand,
7
7
  editAgentConfig,
8
8
  configureMcp
9
- } from "./main-wnw5xxfp.mjs";
10
- import"./main-snsa0zy2.mjs";
9
+ } from "./main-70n5sw7h.mjs";
10
+ import"./main-gxk938vp.mjs";
11
11
  import {
12
12
  configRoot2,
13
13
  dataRoot,
@@ -15,9 +15,9 @@ import {
15
15
  cacheRoot,
16
16
  binRoot,
17
17
  binaryName
18
- } from "./main-cvz67srf.mjs";
18
+ } from "./main-1jrvda6m.mjs";
19
19
  import"./main-azpzpy0x.mjs";
20
- import"./main-w22ytkrj.mjs";
20
+ import"./main-t9jfz58m.mjs";
21
21
  import"./main-b3jrctcx.mjs";
22
22
  import {
23
23
  legacyDataRoot,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-snsa0zy2.mjs";
4
+ } from "./main-gxk938vp.mjs";
5
5
  import {
6
6
  defaultRoots,
7
7
  configRoot2,
@@ -25,7 +25,7 @@ import {
25
25
  setStoredMode,
26
26
  autoUpdateStatus,
27
27
  createAutoUpdater
28
- } from "./main-cvz67srf.mjs";
28
+ } from "./main-1jrvda6m.mjs";
29
29
  import {
30
30
  extensionProtocolVersion,
31
31
  minExtensionProtocolVersion,
@@ -102,7 +102,7 @@ import {
102
102
  isRestrictedTarget2,
103
103
  isRestrictedUrl2,
104
104
  dataUrlDocument2
105
- } from "./main-1zqpc1gc.mjs";
105
+ } from "./main-ya9p9h92.mjs";
106
106
  import {
107
107
  context,
108
108
  pendingPairingCodeKeys,
@@ -120,7 +120,7 @@ import {
120
120
  pairingSessionKey,
121
121
  sessionProof,
122
122
  wrapToken
123
- } from "./main-w22ytkrj.mjs";
123
+ } from "./main-t9jfz58m.mjs";
124
124
  import {
125
125
  makeUnsafe,
126
126
  terminateChildProcess,
@@ -142,16 +142,16 @@ import {
142
142
  checkNavigationUrl,
143
143
  readSecret,
144
144
  secretText
145
- } from "./main-e51pqgkb.mjs";
145
+ } from "./main-zzpzy7t5.mjs";
146
146
  import {
147
147
  defaultJournalBaseDir,
148
148
  makeJournalEntry,
149
149
  appendJournalEntry,
150
150
  startJournalRetention
151
- } from "./main-fba6kxk3.mjs";
151
+ } from "./main-3jyk041x.mjs";
152
152
  import {
153
153
  createUpdateWatcher2
154
- } from "./main-pv9f3rk8.mjs";
154
+ } from "./main-6g4s9w8d.mjs";
155
155
  import {
156
156
  SettingsInputError,
157
157
  parseSettingChanges,
@@ -159,13 +159,13 @@ import {
159
159
  settingsToExtension,
160
160
  describeSettings,
161
161
  describeChanges
162
- } from "./main-bd4r5vm7.mjs";
162
+ } from "./main-jdsvfz5d.mjs";
163
163
  import {
164
164
  relayHostname,
165
165
  isLocalPeer,
166
166
  installedDevExtension,
167
167
  syncDevExtension
168
- } from "./main-gp0hgckc.mjs";
168
+ } from "./main-pkvnjcgw.mjs";
169
169
  import {
170
170
  legacyRoots
171
171
  } from "./main-ckssvk4c.mjs";
@@ -186,7 +186,7 @@ import {
186
186
  relayToken,
187
187
  secretsEqual,
188
188
  ensurePrivateDirectory
189
- } from "./main-8sczgnet.mjs";
189
+ } from "./main-0nav7jm4.mjs";
190
190
  import {
191
191
  isNone,
192
192
  isSome,
@@ -1756,7 +1756,6 @@ class CdpRuntime {
1756
1756
  }
1757
1757
 
1758
1758
  // src/snapshot/aria-snapshot.ts
1759
- var { selectors } = await import("./coreBundle-v82htk0w.mjs");
1760
1759
  var redactionCleanupErrorMessage = "browse could not confirm ARIA snapshot value-redaction cleanup";
1761
1760
  var redactionSelectorSource = `({
1762
1761
  query(root, body) {
@@ -1877,7 +1876,7 @@ var redactionSelectorSource = `({
1877
1876
  },
1878
1877
  })`;
1879
1878
  var redactionModuleId = globalThis.crypto.randomUUID().replaceAll("-", "");
1880
- var nextRedactionSelector = 0;
1879
+ var selectorName = `bcariaredact${redactionModuleId}`;
1881
1880
  var nextRedactionToken = 0;
1882
1881
  var contextSelectors = new WeakMap;
1883
1882
  var pageCleanup = new WeakMap;
@@ -1920,8 +1919,10 @@ async function selectorForContext(context) {
1920
1919
  const existing = contextSelectors.get(context);
1921
1920
  if (existing)
1922
1921
  return existing;
1923
- const name = `bcariaredact${redactionModuleId}${++nextRedactionSelector}`;
1924
- const registration = selectors.register(name, { content: redactionSelectorSource }, { contentScript: true }).then(() => name, (error) => {
1922
+ const { _channel } = context;
1923
+ const registration = _channel.registerSelectorEngine({
1924
+ selectorEngine: { name: selectorName, source: redactionSelectorSource, contentScript: true }
1925
+ }, { timeout: 0 }).then(() => selectorName, (error) => {
1925
1926
  contextSelectors.delete(context);
1926
1927
  throw error;
1927
1928
  });
@@ -10895,7 +10896,7 @@ function tunePatchright({ server }) {
10895
10896
  }
10896
10897
 
10897
10898
  // src/execute.ts
10898
- var { chromium, errors, internals } = await import("./coreBundle-v82htk0w.mjs");
10899
+ var { chromium, errors, internals } = await import("./coreBundle-mbshhes2.mjs");
10899
10900
  tunePatchright(internals);
10900
10901
 
10901
10902
  class ExecuteSandbox extends DefaultPageHost {
@@ -1,4 +1,4 @@
1
- import"./main-snsa0zy2.mjs";
1
+ import"./main-gxk938vp.mjs";
2
2
  import {
3
3
  cliCommand,
4
4
  installCommand,
@@ -15,17 +15,17 @@ import {
15
15
  registryUrl,
16
16
  fetchPublished,
17
17
  runInstaller
18
- } from "./main-cvz67srf.mjs";
18
+ } from "./main-1jrvda6m.mjs";
19
19
  import"./main-b3jrctcx.mjs";
20
20
  import {
21
21
  Service,
22
22
  layerFetch,
23
23
  restartRelay,
24
24
  startManagedRelay
25
- } from "./main-1zqpc1gc.mjs";
25
+ } from "./main-ya9p9h92.mjs";
26
26
  import"./main-azpzpy0x.mjs";
27
27
  import"./main-9t2s5ptx.mjs";
28
- import"./main-8sczgnet.mjs";
28
+ import"./main-0nav7jm4.mjs";
29
29
  import {
30
30
  succeed6,
31
31
  gen,
@@ -63,10 +63,10 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-wnw5xxfp.mjs";
66
+ } from "./main-70n5sw7h.mjs";
67
67
  import {
68
68
  opencodeBrowserBuildId2
69
- } from "./main-snsa0zy2.mjs";
69
+ } from "./main-gxk938vp.mjs";
70
70
  import {
71
71
  installedBinaryPath,
72
72
  installerBinaryPath,
@@ -83,7 +83,7 @@ import {
83
83
  autoUpdateStatus,
84
84
  describeAutoUpdate,
85
85
  runCommand
86
- } from "./main-cvz67srf.mjs";
86
+ } from "./main-1jrvda6m.mjs";
87
87
  import"./main-azpzpy0x.mjs";
88
88
  import {
89
89
  pairingCodeTtlMs,
@@ -97,7 +97,7 @@ import {
97
97
  revokeBrowserToken,
98
98
  legacyPairingCode,
99
99
  removeLegacyPairingCode
100
- } from "./main-w22ytkrj.mjs";
100
+ } from "./main-t9jfz58m.mjs";
101
101
  import {
102
102
  unpackedExtensionId,
103
103
  extensionProtocolSkew,
@@ -105,16 +105,16 @@ import {
105
105
  } from "./main-b3jrctcx.mjs";
106
106
  import {
107
107
  defaultSiteSecretsDir
108
- } from "./main-e51pqgkb.mjs";
108
+ } from "./main-zzpzy7t5.mjs";
109
109
  import {
110
110
  parseHostname,
111
111
  readRelayConfig,
112
112
  writeRelayConfig,
113
113
  syncDevExtension
114
- } from "./main-gp0hgckc.mjs";
114
+ } from "./main-pkvnjcgw.mjs";
115
115
  import {
116
116
  relayAuthorization
117
- } from "./main-8sczgnet.mjs";
117
+ } from "./main-0nav7jm4.mjs";
118
118
 
119
119
  // src/setup.ts
120
120
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -1,9 +1,9 @@
1
- import"./main-snsa0zy2.mjs";
1
+ import"./main-gxk938vp.mjs";
2
2
  import {
3
3
  entrySpawnCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-cvz67srf.mjs";
6
+ } from "./main-1jrvda6m.mjs";
7
7
 
8
8
  // src/mcp/supervisor.ts
9
9
  import { spawn } from "node:child_process";
@@ -34,7 +34,7 @@ async function runBinaryMcp(args) {
34
34
  const runtime = installedRuntime2();
35
35
  if (!runtime || runtime.kind === "npx") {
36
36
  process.env[directEnvironmentVariable] = "1";
37
- const { runCli } = await import("./cli-yeh12xqt.mjs");
37
+ const { runCli } = await import("./cli-evq7nxvm.mjs");
38
38
  return runCli();
39
39
  }
40
40
  const REPLAY = `opencode-browser-shim-initialize-${randomUUID()}`;
@@ -4,10 +4,10 @@ import {
4
4
  updateNotice2,
5
5
  createUpdateWatcher2,
6
6
  runUpdateCommand2
7
- } from "./main-pv9f3rk8.mjs";
7
+ } from "./main-6g4s9w8d.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-cvz67srf.mjs";
10
- import"./main-snsa0zy2.mjs";
9
+ import"./main-1jrvda6m.mjs";
10
+ import"./main-gxk938vp.mjs";
11
11
  export {
12
12
  createUpdateWatcher2 as createUpdateWatcher,
13
13
  formatUpdateNotice2 as formatUpdateNotice,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-snsa0zy2.mjs";
4
+ } from "./main-gxk938vp.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.16-dev.140",
3
+ "version": "0.0.16-dev.143",
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",
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.16-dev.140";
3
- var opencodeBrowserBuildId2 = "2026-11-08T18:05:18.460Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };