@opencode/browse 0.0.17-dev.151 → 0.0.17-dev.152

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.
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  opencodeBrowserVersion2,
20
20
  opencodeBrowserBuildId2
21
- } from "./main-2n1a279y.mjs";
21
+ } from "./main-px3k85hz.mjs";
22
22
  import {
23
23
  configRoot2,
24
24
  dataRoot,
@@ -31,7 +31,7 @@ import {
31
31
  devExtension,
32
32
  installCommand,
33
33
  autoUpdateStatus
34
- } from "./main-65rqqv4r.mjs";
34
+ } from "./main-34gpan1p.mjs";
35
35
  import {
36
36
  extensionProtocolVersion,
37
37
  extensionProtocolAdvice
@@ -57,29 +57,29 @@ import {
57
57
  ensureExtensionConnected,
58
58
  stoppedRelayStatus,
59
59
  statusCollections
60
- } from "./main-gb5jg0mj.mjs";
60
+ } from "./main-mq02pzer.mjs";
61
61
  import"./main-4h7rfhhr.mjs";
62
62
  import {
63
63
  updateJson2,
64
64
  formatUpdateNotice2,
65
65
  updateNotice2
66
- } from "./main-zq18j4rx.mjs";
66
+ } from "./main-9efrzgc5.mjs";
67
67
  import {
68
68
  settingKeys,
69
69
  formatSettings,
70
70
  ensureSessionExists
71
- } from "./main-pchbej16.mjs";
71
+ } from "./main-14144v01.mjs";
72
72
  import {
73
73
  addSecret,
74
74
  listSecrets,
75
75
  removeSecret
76
- } from "./main-8rmfjhq4.mjs";
76
+ } from "./main-df9z68rs.mjs";
77
77
  import {
78
78
  defaultJournalBaseDir,
79
79
  readJournalEntries,
80
80
  formatJournalEntry
81
- } from "./main-4kvbqnpf.mjs";
82
- import"./main-rvkfzxdh.mjs";
81
+ } from "./main-wjtpcs46.mjs";
82
+ import"./main-c07n6w3y.mjs";
83
83
  import {
84
84
  taggedEnum,
85
85
  is2,
@@ -5875,7 +5875,7 @@ var status = make("status", {
5875
5875
  }
5876
5876
  })).pipe(withDescription4("Show relay, extension, and target status"));
5877
5877
  var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
5878
- const { runMcpServer } = yield* promise(() => import("./mcp-kn0t0wy9.mjs"));
5878
+ const { runMcpServer } = yield* promise(() => import("./mcp-qjb6yt9d.mjs"));
5879
5879
  yield* runMcpServer;
5880
5880
  })).pipe(withDescription4("Run the browse MCP server over stdio"));
5881
5881
  registerCliCommand(400, () => tabs);
@@ -6323,7 +6323,7 @@ registerCliCommand(710, () => flightRecorder);
6323
6323
 
6324
6324
  // src/cli/relay.ts
6325
6325
  var serve = make("serve", {}, fn("Cli.serve")(function* () {
6326
- const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-ehaeyrbv.mjs"), import("./helpers-zsf41ghm.mjs")]));
6326
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-xby2brwe.mjs"), import("./helpers-8p9s4asz.mjs")]));
6327
6327
  const port = yield* portConfig;
6328
6328
  const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
6329
6329
  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.17-dev.151";
9
+ var embeddedVersion = "0.0.17-dev.152";
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,21 +17,21 @@ 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-pkbyqcwq.mjs");
20
+ const { migrateLegacy } = await import("./migrate-0mdxq7yq.mjs");
21
21
  migrateLegacy();
22
22
  } catch {}
23
23
  }
24
24
  if (command === "--version" || command === "-v") {
25
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-5ffc64pk.mjs")).opencodeBrowserVersion;
25
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-zp2w90xa.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-vavntyze.mjs")).supervisesMcp()) {
29
- const { runBinaryMcp } = await import("./supervisor-vavntyze.mjs");
28
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-dm38ymzm.mjs")).supervisesMcp()) {
29
+ const { runBinaryMcp } = await import("./supervisor-dm38ymzm.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-7d47yfra.mjs");
33
33
  const { defaultTeardown } = await import("./Runtime-qfc1eg1n.mjs");
34
- const { runMcpServer } = await import("./mcp-kn0t0wy9.mjs");
34
+ const { runMcpServer } = await import("./mcp-qjb6yt9d.mjs");
35
35
  let stdinEnded = false;
36
36
  let signalled = false;
37
37
  process.stdin.once("end", () => {
@@ -50,13 +50,13 @@ if (command === "--version" || command === "-v") {
50
50
  })
51
51
  }));
52
52
  } else if (command === "self-update" || command === "runtime-switch") {
53
- const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-8k5n6vhp.mjs");
53
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-3t8r9njs.mjs");
54
54
  await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
55
55
  } else if (command === "update" && !askedForHelp) {
56
- const { runUpdateCommand } = await import("./update-zx6w8w1f.mjs");
56
+ const { runUpdateCommand } = await import("./update-yw91cjg6.mjs");
57
57
  await runUpdateCommand(process.argv.slice(3));
58
58
  } else if (command && setupCommands.has(command) && !askedForHelp) {
59
- const { runSetup } = await import("./setup-cd2bs8nw.mjs");
59
+ const { runSetup } = await import("./setup-s2bng5dm.mjs");
60
60
  await runSetup(command, process.argv.slice(3));
61
61
  } else {
62
62
  if (preCliHelp || !command || command === "--help" || command === "-h") {
@@ -93,9 +93,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
93
93
  `);
94
94
  }
95
95
  if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
96
- const { printSetupStatus } = await import("./setup-cd2bs8nw.mjs");
96
+ const { printSetupStatus } = await import("./setup-s2bng5dm.mjs");
97
97
  printSetupStatus();
98
98
  }
99
- const { runCli } = await import("./cli-q8c8a5qs.mjs");
99
+ const { runCli } = await import("./cli-3ct2bpsc.mjs");
100
100
  runCli(preCliHelp ? ["--help"] : undefined);
101
101
  }
@@ -32,7 +32,7 @@ import {
32
32
  isRestrictedTarget2,
33
33
  isRestrictedUrl2,
34
34
  dataUrlDocument2
35
- } from "./main-gb5jg0mj.mjs";
35
+ } from "./main-mq02pzer.mjs";
36
36
  import"./main-4h7rfhhr.mjs";
37
37
  import"./main-b3jrctcx.mjs";
38
38
  export {
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-gb5jg0mj.mjs";
15
+ } from "./main-mq02pzer.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-65rqqv4r.mjs";
106
+ } from "./main-34gpan1p.mjs";
107
107
 
108
108
  // node_modules/effect/dist/PrimaryKey.js
109
109
  var symbol = "~effect/PrimaryKey";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-2n1a279y.mjs";
3
+ } from "./main-px3k85hz.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.17-dev.151", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
113
+ return { kind: "npm", version: "0.0.17-dev.152", 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.17-dev.151.zip", sha256: "0fe5f51c6c7f71355ee54bf0e23c679406d4aebe6e8f130286a5d8853bbe9032", size: 183293 }) {
135
+ function devExtension(baked = { file: "browse-extension-0.0.17-dev.152.zip", sha256: "e8099e7238d9e31be699bc950522d4156ba2e99ecbeee63216774cef91b34443", size: 183291 }) {
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}`;
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-131pm12v.mjs";
8
+ } from "./main-pkf4cqvw.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-65rqqv4r.mjs";
14
+ } from "./main-34gpan1p.mjs";
15
15
 
16
16
  // src/setup/dev-extension.ts
17
17
  import { createHash } from "node:crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-2n1a279y.mjs";
3
+ } from "./main-px3k85hz.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-65rqqv4r.mjs";
23
+ } from "./main-34gpan1p.mjs";
24
24
  import {
25
25
  formatPairingCode
26
- } from "./main-131pm12v.mjs";
26
+ } from "./main-pkf4cqvw.mjs";
27
27
  import {
28
28
  unpackedExtensionId
29
29
  } from "./main-b3jrctcx.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-65rqqv4r.mjs";
9
+ } from "./main-34gpan1p.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-8k5n6vhp.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-3t8r9njs.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
  dataRoot
6
- } from "./main-65rqqv4r.mjs";
6
+ } from "./main-34gpan1p.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-65rqqv4r.mjs";
55
+ } from "./main-34gpan1p.mjs";
56
56
 
57
57
  // node_modules/effect/dist/Semaphore.js
58
58
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -15,7 +15,7 @@ import {
15
15
  } from "./main-bc8cjey0.mjs";
16
16
  import {
17
17
  opencodeBrowserBuildId2
18
- } from "./main-2n1a279y.mjs";
18
+ } from "./main-px3k85hz.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-65rqqv4r.mjs";
27
+ } from "./main-34gpan1p.mjs";
28
28
  import {
29
29
  relayAuthorization
30
- } from "./main-rvkfzxdh.mjs";
30
+ } from "./main-c07n6w3y.mjs";
31
31
  import {
32
32
  Pointer,
33
33
  passthrough,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  dataRoot,
6
6
  stateRoot
7
- } from "./main-65rqqv4r.mjs";
7
+ } from "./main-34gpan1p.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.17-dev.152";
3
+ var opencodeBrowserBuildId2 = "2026-11-09T01:01:27.431Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-gb5jg0mj.mjs";
6
+ } from "./main-mq02pzer.mjs";
7
7
  import {
8
8
  decodeUnknownOption,
9
9
  optionalKey,
@@ -19,7 +19,7 @@ import {
19
19
  } from "./main-xycdhwqs.mjs";
20
20
  import {
21
21
  stateRoot
22
- } from "./main-65rqqv4r.mjs";
22
+ } from "./main-34gpan1p.mjs";
23
23
 
24
24
  // src/session-manager/journal.ts
25
25
  import fs from "node:fs";
@@ -45,11 +45,11 @@ import {
45
45
  } from "./main-bc8cjey0.mjs";
46
46
  import {
47
47
  opencodeBrowserVersion2
48
- } from "./main-2n1a279y.mjs";
48
+ } from "./main-px3k85hz.mjs";
49
49
  import {
50
50
  cliCommand,
51
51
  autoUpdateStatus
52
- } from "./main-65rqqv4r.mjs";
52
+ } from "./main-34gpan1p.mjs";
53
53
  import"./main-b3jrctcx.mjs";
54
54
  import {
55
55
  option,
@@ -69,12 +69,12 @@ import {
69
69
  relayBuildProblem,
70
70
  ensureRelay,
71
71
  ensureExtensionConnected
72
- } from "./main-gb5jg0mj.mjs";
72
+ } from "./main-mq02pzer.mjs";
73
73
  import"./main-4h7rfhhr.mjs";
74
74
  import {
75
75
  updateJson2,
76
76
  createUpdateWatcher2
77
- } from "./main-zq18j4rx.mjs";
77
+ } from "./main-9efrzgc5.mjs";
78
78
  import {
79
79
  settingSpecs,
80
80
  securityVariables,
@@ -155,12 +155,12 @@ import {
155
155
  toolResultForValue2,
156
156
  mcpErrorMessage2,
157
157
  toolResult
158
- } from "./main-pchbej16.mjs";
158
+ } from "./main-14144v01.mjs";
159
159
  import {
160
160
  makeUnsafe,
161
161
  make3,
162
162
  listSecrets
163
- } from "./main-8rmfjhq4.mjs";
163
+ } from "./main-df9z68rs.mjs";
164
164
  import {
165
165
  Clock,
166
166
  type,
@@ -175,7 +175,7 @@ import {
175
175
  orElse,
176
176
  exhaustive
177
177
  } from "./main-4074weqb.mjs";
178
- import"./main-rvkfzxdh.mjs";
178
+ import"./main-c07n6w3y.mjs";
179
179
  import {
180
180
  Class,
181
181
  taggedEnum,
@@ -6,8 +6,8 @@ import {
6
6
  browseServerCommand,
7
7
  editAgentConfig,
8
8
  configureMcp
9
- } from "./main-v36tamg2.mjs";
10
- import"./main-2n1a279y.mjs";
9
+ } from "./main-5p1sv0tx.mjs";
10
+ import"./main-px3k85hz.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-65rqqv4r.mjs";
18
+ } from "./main-34gpan1p.mjs";
19
19
  import"./main-4h7rfhhr.mjs";
20
- import"./main-131pm12v.mjs";
20
+ import"./main-pkf4cqvw.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-2n1a279y.mjs";
4
+ } from "./main-px3k85hz.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-65rqqv4r.mjs";
28
+ } from "./main-34gpan1p.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-gb5jg0mj.mjs";
105
+ } from "./main-mq02pzer.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-131pm12v.mjs";
123
+ } from "./main-pkf4cqvw.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-8rmfjhq4.mjs";
145
+ } from "./main-df9z68rs.mjs";
146
146
  import {
147
147
  defaultJournalBaseDir,
148
148
  makeJournalEntry,
149
149
  appendJournalEntry,
150
150
  startJournalRetention
151
- } from "./main-4kvbqnpf.mjs";
151
+ } from "./main-wjtpcs46.mjs";
152
152
  import {
153
153
  createUpdateWatcher2
154
- } from "./main-zq18j4rx.mjs";
154
+ } from "./main-9efrzgc5.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-pchbej16.mjs";
162
+ } from "./main-14144v01.mjs";
163
163
  import {
164
164
  relayHostname,
165
165
  isLocalPeer,
166
166
  installedDevExtension,
167
167
  syncDevExtension
168
- } from "./main-0m3tkvbh.mjs";
168
+ } from "./main-3e54np6z.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-rvkfzxdh.mjs";
189
+ } from "./main-c07n6w3y.mjs";
190
190
  import {
191
191
  taggedEnum,
192
192
  is2,
@@ -1,5 +1,5 @@
1
1
  import"./main-9bk4pprj.mjs";
2
- import"./main-2n1a279y.mjs";
2
+ import"./main-px3k85hz.mjs";
3
3
  import {
4
4
  cliCommand,
5
5
  installCommand,
@@ -16,17 +16,17 @@ import {
16
16
  registryUrl,
17
17
  fetchPublished,
18
18
  runInstaller
19
- } from "./main-65rqqv4r.mjs";
19
+ } from "./main-34gpan1p.mjs";
20
20
  import"./main-b3jrctcx.mjs";
21
21
  import {
22
22
  Service,
23
23
  layerFetch,
24
24
  restartRelay,
25
25
  startManagedRelay
26
- } from "./main-gb5jg0mj.mjs";
26
+ } from "./main-mq02pzer.mjs";
27
27
  import"./main-4h7rfhhr.mjs";
28
28
  import"./main-bc8cjey0.mjs";
29
- import"./main-rvkfzxdh.mjs";
29
+ import"./main-c07n6w3y.mjs";
30
30
  import {
31
31
  succeed6,
32
32
  gen,
@@ -42,14 +42,16 @@ var log = (line) => process.stdout.write(line + `
42
42
  async function switchTo(runtime, version, options) {
43
43
  const installed = installedVersion(runtime);
44
44
  if (!installed)
45
- return `${runtime.entry} doesn't report a version`;
45
+ return { refused: `${runtime.entry} doesn't report a version` };
46
46
  if (installed !== version)
47
- return `${version} isn't installed`;
47
+ return { refused: `${version} isn't installed` };
48
+ let from;
48
49
  const program = gen(function* () {
49
50
  const relay = yield* Service;
50
51
  const running = yield* result(relay.version);
51
52
  if (running._tag === "Failure")
52
- return;
53
+ return {};
54
+ from = running.success.version;
53
55
  yield* restartRelay({
54
56
  relay,
55
57
  clientKind: "cli",
@@ -58,9 +60,13 @@ async function switchTo(runtime, version, options) {
58
60
  start: startManagedRelay(runtime.entry)
59
61
  });
60
62
  const now = yield* relay.version;
61
- return now.version === installed ? undefined : `a relay of version ${now.version} started first`;
63
+ return now.version === installed ? { from } : { from, refused: `a relay of version ${now.version} started first` };
62
64
  }).pipe(provide3(layerFetch));
63
- return runPromise(program.pipe(catch_((error) => succeed6(error.message ?? String(error)))));
65
+ const refusal = (error) => ({
66
+ ...from === undefined ? {} : { from },
67
+ refused: error.message ?? String(error)
68
+ });
69
+ return runPromise(program.pipe(catch_((error) => succeed6(refusal(error)))));
64
70
  }
65
71
  async function runInstalledUpdate(args, runtime = installedRuntime2()) {
66
72
  if (!runtime)
@@ -119,7 +125,7 @@ async function runInstalledUpdate(args, runtime = installedRuntime2()) {
119
125
  if (!installed)
120
126
  return true;
121
127
  updateState(({ installing: _installing, ...state }) => ({ ...state, lastUpdate: { from: runtime.version, to: installed, at: new Date().toISOString() } }));
122
- const refused = await switchTo({ ...runtime, version: installed }, installed, { force: args.includes("--force") });
128
+ const { refused } = await switchTo({ ...runtime, version: installed }, installed, { force: args.includes("--force") });
123
129
  if (refused) {
124
130
  const automatic = effectiveMode() === "on";
125
131
  log(`! Installed ${installed}, but the relay didn't restart (${refused}).`);
@@ -153,7 +159,7 @@ async function runInstalledUpdate(args, runtime = installedRuntime2()) {
153
159
  if (!installed)
154
160
  return true;
155
161
  updateState(({ installing: _installing, ...state }) => ({ ...state, lastUpdate: { from: runtime.version, to: installed, at: new Date().toISOString() } }));
156
- const refused = await switchTo({ ...runtime, version: installed }, installed, { force: args.includes("--force") });
162
+ const { refused } = await switchTo({ ...runtime, version: installed }, installed, { force: args.includes("--force") });
157
163
  if (refused) {
158
164
  const automatic = effectiveMode() === "on";
159
165
  log(`! Installed ${installed}, but the relay didn't restart (${refused}).`);
@@ -214,8 +220,8 @@ async function runRuntimeSwitch(args) {
214
220
  process.exitCode = 2;
215
221
  return;
216
222
  }
217
- const before = runtime.version;
218
- const refused = await switchTo({ ...runtime, version }, version, { force: false });
223
+ const { from, refused } = await switchTo({ ...runtime, version }, version, { force: false });
224
+ const before = from ?? runtime.version;
219
225
  log(`${new Date().toISOString()} switch ${before} → ${version}: ${refused ? `refused (${refused})` : "done"}`);
220
226
  if (refused)
221
227
  process.exitCode = 1;
@@ -63,10 +63,10 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-v36tamg2.mjs";
66
+ } from "./main-5p1sv0tx.mjs";
67
67
  import {
68
68
  opencodeBrowserBuildId2
69
- } from "./main-2n1a279y.mjs";
69
+ } from "./main-px3k85hz.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-65rqqv4r.mjs";
86
+ } from "./main-34gpan1p.mjs";
87
87
  import"./main-4h7rfhhr.mjs";
88
88
  import {
89
89
  pairingCodeTtlMs,
@@ -97,7 +97,7 @@ import {
97
97
  revokeBrowserToken,
98
98
  legacyPairingCode,
99
99
  removeLegacyPairingCode
100
- } from "./main-131pm12v.mjs";
100
+ } from "./main-pkf4cqvw.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-8rmfjhq4.mjs";
108
+ } from "./main-df9z68rs.mjs";
109
109
  import {
110
110
  parseHostname,
111
111
  readRelayConfig,
112
112
  writeRelayConfig,
113
113
  syncDevExtension
114
- } from "./main-0m3tkvbh.mjs";
114
+ } from "./main-3e54np6z.mjs";
115
115
  import {
116
116
  relayAuthorization
117
- } from "./main-rvkfzxdh.mjs";
117
+ } from "./main-c07n6w3y.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-2n1a279y.mjs";
1
+ import"./main-px3k85hz.mjs";
2
2
  import {
3
3
  entrySpawnCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-65rqqv4r.mjs";
6
+ } from "./main-34gpan1p.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-q8c8a5qs.mjs");
37
+ const { runCli } = await import("./cli-3ct2bpsc.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-zq18j4rx.mjs";
7
+ } from "./main-9efrzgc5.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-65rqqv4r.mjs";
10
- import"./main-2n1a279y.mjs";
9
+ import"./main-34gpan1p.mjs";
10
+ import"./main-px3k85hz.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-2n1a279y.mjs";
4
+ } from "./main-px3k85hz.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.151",
3
+ "version": "0.0.17-dev.152",
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.17-dev.151";
3
- var opencodeBrowserBuildId2 = "2026-11-09T00:49:02.301Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };