@opencode/browse 0.0.15-dev.95 → 0.0.15-dev.96

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.
@@ -105,7 +105,7 @@ import {
105
105
  import {
106
106
  opencodeBrowserVersion2,
107
107
  opencodeBrowserBuildId2
108
- } from "./main-08je0b07.mjs";
108
+ } from "./main-7a9t7psy.mjs";
109
109
  import {
110
110
  configRoot2,
111
111
  dataRoot,
@@ -118,7 +118,7 @@ import {
118
118
  devExtension,
119
119
  installCommand,
120
120
  autoUpdateStatus
121
- } from "./main-gwm43eg0.mjs";
121
+ } from "./main-56q3d6zp.mjs";
122
122
  import {
123
123
  extensionProtocolVersion,
124
124
  extensionProtocolAdvice
@@ -144,13 +144,13 @@ import {
144
144
  ensureExtensionConnected,
145
145
  stoppedRelayStatus,
146
146
  statusCollections
147
- } from "./main-7drsjfay.mjs";
147
+ } from "./main-2d15ncnt.mjs";
148
148
  import"./main-vgzr4689.mjs";
149
149
  import {
150
150
  updateJson2,
151
151
  formatUpdateNotice2,
152
152
  updateNotice2
153
- } from "./main-mmj2an0m.mjs";
153
+ } from "./main-dw9xz54y.mjs";
154
154
  import {
155
155
  settingKeys,
156
156
  formatSettings,
@@ -158,13 +158,13 @@ import {
158
158
  addSecret,
159
159
  listSecrets,
160
160
  removeSecret
161
- } from "./main-nhcf0kxg.mjs";
161
+ } from "./main-g2pzec54.mjs";
162
162
  import {
163
163
  defaultJournalBaseDir,
164
164
  readJournalEntries,
165
165
  formatJournalEntry
166
- } from "./main-s30p0ga6.mjs";
167
- import"./main-q76d0fwx.mjs";
166
+ } from "./main-m40yrz1e.mjs";
167
+ import"./main-9gfyxg1h.mjs";
168
168
  import {
169
169
  pipeArguments,
170
170
  dual,
@@ -5867,7 +5867,7 @@ var status = make("status", {
5867
5867
  }
5868
5868
  })).pipe(withDescription4("Show relay, extension, and target status"));
5869
5869
  var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
5870
- const { runMcpServer } = yield* promise(() => import("./mcp-yg5vftt2.mjs"));
5870
+ const { runMcpServer } = yield* promise(() => import("./mcp-apndqggm.mjs"));
5871
5871
  yield* runMcpServer;
5872
5872
  })).pipe(withDescription4("Run the browse MCP server over stdio"));
5873
5873
  registerCliCommand(400, () => tabs);
@@ -6315,7 +6315,7 @@ registerCliCommand(710, () => flightRecorder);
6315
6315
 
6316
6316
  // src/cli/relay.ts
6317
6317
  var serve = make("serve", {}, fn("Cli.serve")(function* () {
6318
- const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-4cfdjrqh.mjs"), import("./helpers-6t7jtzft.mjs")]));
6318
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-jbb3hycs.mjs"), import("./helpers-ymdsxnqh.mjs")]));
6319
6319
  const port = yield* portConfig;
6320
6320
  const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
6321
6321
  yield* scoped(gen(function* () {
package/dist/cli.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
  import fs from "node:fs";
5
5
  import os from "node:os";
6
6
  import path from "node:path";
7
- var embeddedVersion = "0.0.15-dev.95";
7
+ var embeddedVersion = "0.0.15-dev.96";
8
8
  var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
9
9
  var command = process.argv[2];
10
10
  var args = process.argv.slice(3);
@@ -16,29 +16,29 @@ var preCliHelp = askedForHelp && (command === "update" || command !== undefined
16
16
  var legacyDataRoot = process.platform === "win32" ? path.join(process.env.LOCALAPPDATA ?? path.join(os.homedir(), "AppData", "Local"), "opencode-browser") : path.join(process.env.XDG_DATA_HOME ?? path.join(os.homedir(), ".local", "share"), "opencode-browser");
17
17
  if (command !== "--version" && command !== "-v" && !askedForHelp && !process.env.OPENCODE_BROWSER_HOME && [path.join(os.homedir(), ".browse"), legacyDataRoot].some((root) => fs.existsSync(root))) {
18
18
  try {
19
- const { migrateLegacy } = await import("./migrate-dcqjcazw.mjs");
19
+ const { migrateLegacy } = await import("./migrate-d6c3jm8v.mjs");
20
20
  migrateLegacy();
21
21
  } catch {}
22
22
  }
23
23
  if (command === "--version" || command === "-v") {
24
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-47zqv01b.mjs")).opencodeBrowserVersion;
24
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-zx5ck933.mjs")).opencodeBrowserVersion;
25
25
  process.stdout.write(`${opencodeBrowserVersion}
26
26
  `);
27
- } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-1w8spdhn.mjs")).supervisesMcp()) {
28
- const { runBinaryMcp } = await import("./supervisor-1w8spdhn.mjs");
27
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-1fnvh39q.mjs")).supervisesMcp()) {
28
+ const { runBinaryMcp } = await import("./supervisor-1fnvh39q.mjs");
29
29
  await runBinaryMcp(process.argv.slice(3));
30
30
  } else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
31
31
  const { NodeRuntime } = await import("./index-yzz55kxm.mjs");
32
- const { runMcpServer } = await import("./mcp-yg5vftt2.mjs");
32
+ const { runMcpServer } = await import("./mcp-apndqggm.mjs");
33
33
  runMcpServer.pipe(NodeRuntime.runMain);
34
34
  } else if (command === "self-update" || command === "runtime-switch") {
35
- const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-18m21kpx.mjs");
35
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-g2pk1ep6.mjs");
36
36
  await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
37
37
  } else if (command === "update" && !askedForHelp) {
38
- const { runUpdateCommand } = await import("./update-vpyqkfxc.mjs");
38
+ const { runUpdateCommand } = await import("./update-2131w94c.mjs");
39
39
  await runUpdateCommand(process.argv.slice(3));
40
40
  } else if (command && setupCommands.has(command) && !askedForHelp) {
41
- const { runSetup } = await import("./setup-ew3rwcva.mjs");
41
+ const { runSetup } = await import("./setup-15e9vr0s.mjs");
42
42
  await runSetup(command, process.argv.slice(3));
43
43
  } else {
44
44
  if (preCliHelp || !command || command === "--help" || command === "-h") {
@@ -75,9 +75,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
75
75
  `);
76
76
  }
77
77
  if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
78
- const { printSetupStatus } = await import("./setup-ew3rwcva.mjs");
78
+ const { printSetupStatus } = await import("./setup-15e9vr0s.mjs");
79
79
  printSetupStatus();
80
80
  }
81
- const { runCli } = await import("./cli-x946pqcc.mjs");
81
+ const { runCli } = await import("./cli-f0f6tnd2.mjs");
82
82
  runCli(preCliHelp ? ["--help"] : undefined);
83
83
  }
@@ -31,7 +31,7 @@ import {
31
31
  isRestrictedTarget2,
32
32
  isRestrictedUrl2,
33
33
  dataUrlDocument2
34
- } from "./main-7drsjfay.mjs";
34
+ } from "./main-2d15ncnt.mjs";
35
35
  import"./main-vgzr4689.mjs";
36
36
  import"./main-mrew6jy8.mjs";
37
37
  export {
@@ -107,7 +107,7 @@ import {
107
107
  } from "./main-csnx585b.mjs";
108
108
  import {
109
109
  opencodeBrowserBuildId2
110
- } from "./main-08je0b07.mjs";
110
+ } from "./main-7a9t7psy.mjs";
111
111
  import {
112
112
  compiledBinary,
113
113
  scriptEntry,
@@ -116,10 +116,10 @@ import {
116
116
  compareVersions,
117
117
  installedRuntime2,
118
118
  installedVersion
119
- } from "./main-gwm43eg0.mjs";
119
+ } from "./main-56q3d6zp.mjs";
120
120
  import {
121
121
  relayAuthorization
122
- } from "./main-q76d0fwx.mjs";
122
+ } from "./main-9gfyxg1h.mjs";
123
123
  import {
124
124
  dual,
125
125
  memoize,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-08je0b07.mjs";
3
+ } from "./main-7a9t7psy.mjs";
4
4
  import {
5
5
  configRoot2,
6
6
  dataRoot,
@@ -18,10 +18,10 @@ import {
18
18
  storeUrl,
19
19
  installedVersion,
20
20
  runCommand
21
- } from "./main-gwm43eg0.mjs";
21
+ } from "./main-56q3d6zp.mjs";
22
22
  import {
23
23
  formatPairingCode
24
- } from "./main-wcxe09v0.mjs";
24
+ } from "./main-n5mfh7z3.mjs";
25
25
  import {
26
26
  unpackedExtensionId
27
27
  } from "./main-mrew6jy8.mjs";
@@ -9658,12 +9658,12 @@ ${block}`;
9658
9658
  // src/setup/mcp.ts
9659
9659
  import { spawnSync as spawnSync4 } from "node:child_process";
9660
9660
  import { createHash } from "node:crypto";
9661
- import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync4, rmSync as rmSync2, statSync, writeFileSync as writeFileSync2 } from "node:fs";
9661
+ import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync4, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
9662
9662
  import path5 from "node:path";
9663
9663
 
9664
9664
  // src/setup/binary.ts
9665
9665
  import { spawnSync as spawnSync2 } from "node:child_process";
9666
- import { chmodSync, copyFileSync, existsSync as existsSync2, mkdirSync, readdirSync, readFileSync as readFileSync2, realpathSync, renameSync, rmdirSync, rmSync, writeFileSync } from "node:fs";
9666
+ import { chmodSync, copyFileSync, existsSync as existsSync2, lstatSync, mkdirSync, readdirSync, readFileSync as readFileSync2, realpathSync, renameSync, rmdirSync, rmSync, statSync, writeFileSync } from "node:fs";
9667
9667
  import path3 from "node:path";
9668
9668
 
9669
9669
  // src/setup/environment.ts
@@ -10781,16 +10781,16 @@ function waitTimeout(args, defaultSeconds = 180) {
10781
10781
  }
10782
10782
 
10783
10783
  // src/setup/binary.ts
10784
+ var samePath = (left, right) => {
10785
+ try {
10786
+ return realpathSync(left) === realpathSync(right);
10787
+ } catch {
10788
+ return false;
10789
+ }
10790
+ };
10784
10791
  async function installBinaryRuntime() {
10785
10792
  const target = installedBinaryPath();
10786
- const same = (left, right) => {
10787
- try {
10788
- return realpathSync(left) === realpathSync(right);
10789
- } catch {
10790
- return false;
10791
- }
10792
- };
10793
- if (!same(target, process.execPath)) {
10793
+ if (!samePath(target, process.execPath)) {
10794
10794
  try {
10795
10795
  mkdirSync(path3.dirname(target), { recursive: true, mode: 493 });
10796
10796
  const staged = `${target}.${process.pid}.new`;
@@ -10815,6 +10815,21 @@ async function installBinaryRuntime() {
10815
10815
  }
10816
10816
  return { entry: target, version: opencodeBrowserVersion2 };
10817
10817
  }
10818
+ function isInstallerBinary(candidate, managed) {
10819
+ try {
10820
+ if (!lstatSync(candidate).isFile())
10821
+ return false;
10822
+ } catch {
10823
+ return false;
10824
+ }
10825
+ if (samePath(candidate, process.execPath))
10826
+ return true;
10827
+ try {
10828
+ return statSync(candidate).size === statSync(managed).size && readFileSync2(candidate).equals(readFileSync2(managed));
10829
+ } catch {
10830
+ return false;
10831
+ }
10832
+ }
10818
10833
  function addToPath(dir = path3.dirname(process.execPath)) {
10819
10834
  if (/(^|[\\/])(node|bun)(\.exe)?$/i.test(process.execPath))
10820
10835
  return;
@@ -11208,7 +11223,7 @@ var legacyShimPath = () => path5.join(files.dir, "bin", "opencode-browser.mjs");
11208
11223
  function configFile() {
11209
11224
  const directory = path5.join(configRoot, "opencode");
11210
11225
  const candidates = ["opencode.json", "opencode.jsonc", ".opencode/opencode.json", ".opencode/opencode.jsonc"].map((name) => path5.join(directory, name));
11211
- return candidates.find((file) => existsSync4(file) && statSync(file).isFile()) ?? candidates[0];
11226
+ return candidates.find((file) => existsSync4(file) && statSync2(file).isFile()) ?? candidates[0];
11212
11227
  }
11213
11228
  function fingerprint(entry) {
11214
11229
  return createHash("sha256").update(readFileOr(entry, entry)).digest("hex").slice(0, 16);
@@ -11356,4 +11371,4 @@ function manualMcpEntry(command) {
11356
11371
  }`;
11357
11372
  }
11358
11373
 
11359
- export { parse, parse2, $parseDocument, agentLabels, agentNames, agentName, callingAgent, agentLocations, browseServerCommand, editAgentConfig, settings, isCancel, T$1, S_BAR, S_BAR_END, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, limitOptions, intro, outro, note, spinner, STORE_IDS, STORE_URL, MCP_NAME, LEGACY_MCP_NAME, home, configRoot, paths, files, fromSource, checkoutExtensionDirs, dev, unpackedFolder, connectedMessage, pairedOfflineMessage, manualPair, findOnPath, findOpencode, readJson, tilde, rail, log, fail, installWaitTimeout, waitTimeout, addToPath, removeBinaryInstall, oldStoreBuild, detectBrowsers, parseJson, defaultBrowser, blockedReason, revealFolder, systemEffects, configFile, restartOutdatedRelay, mcpServers, configureMcp, removeMcp, legacyBrowserControl, removeLegacyHost, installRuntime, installedRuntime, manualMcpEntry };
11374
+ export { parse, parse2, $parseDocument, agentLabels, agentNames, agentName, callingAgent, agentLocations, browseServerCommand, editAgentConfig, settings, isCancel, T$1, S_BAR, S_BAR_END, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, limitOptions, intro, outro, note, spinner, STORE_IDS, STORE_URL, MCP_NAME, LEGACY_MCP_NAME, home, configRoot, paths, files, fromSource, checkoutExtensionDirs, dev, unpackedFolder, connectedMessage, pairedOfflineMessage, manualPair, findOnPath, findOpencode, readJson, tilde, rail, log, fail, installWaitTimeout, waitTimeout, samePath, isInstallerBinary, addToPath, removeBinaryInstall, oldStoreBuild, detectBrowsers, parseJson, defaultBrowser, blockedReason, revealFolder, systemEffects, configFile, restartOutdatedRelay, mcpServers, configureMcp, removeMcp, legacyBrowserControl, removeLegacyHost, installRuntime, installedRuntime, manualMcpEntry };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-08je0b07.mjs";
3
+ } from "./main-7a9t7psy.mjs";
4
4
 
5
5
  // src/paths.ts
6
6
  import fs from "node:fs";
@@ -12,8 +12,11 @@ var xdgRoot = (variable, fallback, home) => {
12
12
  const configured = home === os.homedir() ? process.env[variable] : undefined;
13
13
  return path.join(configured && path.isAbsolute(configured) ? configured : path.join(home, fallback), "browse");
14
14
  };
15
+ function defaultConfigRoot(home = os.homedir()) {
16
+ return xdgRoot("XDG_CONFIG_HOME", ".config", home);
17
+ }
15
18
  function configRoot2(home = os.homedir()) {
16
- return override(home) ?? xdgRoot("XDG_CONFIG_HOME", ".config", home);
19
+ return override(home) ?? defaultConfigRoot(home);
17
20
  }
18
21
  function dataRoot(home = os.homedir()) {
19
22
  return override(home) ?? xdgRoot("XDG_DATA_HOME", ".local/share", home);
@@ -24,13 +27,18 @@ function stateRoot(home = os.homedir()) {
24
27
  function cacheRoot(home = os.homedir()) {
25
28
  return override(home) ?? xdgRoot("XDG_CACHE_HOME", ".cache", home);
26
29
  }
30
+ function installerBinRoot(home = os.homedir()) {
31
+ const configured = home === os.homedir() ? process.env.XDG_BIN_HOME : undefined;
32
+ return configured && path.isAbsolute(configured) ? configured : path.join(home, ".local", "bin");
33
+ }
27
34
  function binRoot(home = os.homedir()) {
28
35
  if (override(home))
29
36
  return path.join(override(home), "bin");
30
- const configured = home === os.homedir() ? process.env.XDG_BIN_HOME : undefined;
31
- return configured && path.isAbsolute(configured) ? configured : path.join(home, ".local", "bin");
37
+ return installerBinRoot(home);
32
38
  }
33
39
  var installedBinaryPath = (home = os.homedir()) => path.join(binRoot(home), binaryName());
40
+ var installerBinaryPath = (home = os.homedir()) => path.join(installerBinRoot(home), binaryName());
41
+ var defaultSettingsPath = (home = os.homedir()) => path.join(defaultConfigRoot(home), "settings.json");
34
42
  var packageRoot = () => path.dirname(path.dirname(fileURLToPath(import.meta.url)));
35
43
  var oldStoreMarker = () => path.join(stateRoot(), "old-store-extension");
36
44
  function fromCheckout() {
@@ -55,7 +63,7 @@ function cliInstall() {
55
63
  return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
56
64
  if (fromCheckout())
57
65
  return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
58
- return { kind: "npm", version: "0.0.15-dev.95", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
66
+ return { kind: "npm", version: "0.0.15-dev.96", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
59
67
  }
60
68
  function cliPrefix(install = cliInstall()) {
61
69
  if (install.kind === "binary") {
@@ -77,7 +85,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
77
85
  return id ? { id } : {};
78
86
  }
79
87
  var RELEASE_SERVICE = "https://anoma.ly/release";
80
- function devExtension(baked = { file: "browse-extension-0.0.15-dev.95.zip", sha256: "d9fc1bd88bf8f1bb6c30e9f8130b874d9b3f062cf74b3b041b44a3d0811495a1", size: 182575 }) {
88
+ function devExtension(baked = { file: "browse-extension-0.0.15-dev.96.zip", sha256: "587f17e7ff5190cc05c1b0a1279d78545ce4d053cbb818f90ebe17470654e50c", size: 182576 }) {
81
89
  return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
82
90
  }
83
91
  var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
@@ -711,4 +719,4 @@ function spawnRuntimeChild(runtime, args, onExit, env = process.env) {
711
719
  }
712
720
  }
713
721
 
714
- export { configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, binaryName, scriptEntry, entryCommand, runningEntry, checkoutRoot, cliCommand, PUBLIC_STORE_ID, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, runningServiceTarget, releaseChannel, checkRelease, autoUpdateModes, UPDATE_VERSION, channelOf, compareVersions, installedRuntime2, installedVersion, updateState, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, updateAvailable, runCommand, registryUrl, fetchPublished, runInstaller, createAutoUpdater };
722
+ export { configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, installerBinaryPath, defaultSettingsPath, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, binaryName, scriptEntry, entryCommand, runningEntry, checkoutRoot, cliCommand, PUBLIC_STORE_ID, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, runningServiceTarget, releaseChannel, checkRelease, autoUpdateModes, UPDATE_VERSION, channelOf, compareVersions, installedRuntime2, installedVersion, updateState, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, updateAvailable, runCommand, registryUrl, fetchPublished, runInstaller, createAutoUpdater };
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.15-dev.96";
3
+ var opencodeBrowserBuildId2 = "2026-11-07T08:56:07.495Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-wcxe09v0.mjs";
8
+ } from "./main-n5mfh7z3.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-gwm43eg0.mjs";
14
+ } from "./main-56q3d6zp.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-vgzr4689.mjs";
4
4
  import {
5
5
  dataRoot
6
- } from "./main-gwm43eg0.mjs";
6
+ } from "./main-56q3d6zp.mjs";
7
7
 
8
8
  // src/relay/secrets.ts
9
9
  import crypto from "node:crypto";
@@ -6,7 +6,7 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-gwm43eg0.mjs";
9
+ } from "./main-56q3d6zp.mjs";
10
10
  import {
11
11
  unpackedReloadAdvice
12
12
  } from "./main-mrew6jy8.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-18m21kpx.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-g2pk1ep6.mjs");
319
319
  if (await runInstalledUpdate(args))
320
320
  return;
321
321
  if (compiledBinary()) {
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-7drsjfay.mjs";
15
+ } from "./main-2d15ncnt.mjs";
16
16
  import {
17
17
  isNodeError,
18
18
  writeJsonFileAtomically
@@ -131,7 +131,7 @@ import {
131
131
  import {
132
132
  dataRoot,
133
133
  cliCommand
134
- } from "./main-gwm43eg0.mjs";
134
+ } from "./main-56q3d6zp.mjs";
135
135
 
136
136
  // node_modules/effect/dist/Semaphore.js
137
137
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-vgzr4689.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-7drsjfay.mjs";
6
+ } from "./main-2d15ncnt.mjs";
7
7
  import {
8
8
  isSome,
9
9
  decodeUnknownOption,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./main-csnx585b.mjs";
18
18
  import {
19
19
  stateRoot
20
- } from "./main-gwm43eg0.mjs";
20
+ } from "./main-56q3d6zp.mjs";
21
21
 
22
22
  // src/session-manager/journal.ts
23
23
  import fs from "node:fs";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  dataRoot,
6
6
  stateRoot
7
- } from "./main-gwm43eg0.mjs";
7
+ } from "./main-56q3d6zp.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -256,11 +256,11 @@ import {
256
256
  } from "./main-csnx585b.mjs";
257
257
  import {
258
258
  opencodeBrowserVersion2
259
- } from "./main-08je0b07.mjs";
259
+ } from "./main-7a9t7psy.mjs";
260
260
  import {
261
261
  cliCommand,
262
262
  autoUpdateStatus
263
- } from "./main-gwm43eg0.mjs";
263
+ } from "./main-56q3d6zp.mjs";
264
264
  import"./main-mrew6jy8.mjs";
265
265
  import {
266
266
  option,
@@ -280,12 +280,12 @@ import {
280
280
  relayBuildProblem,
281
281
  ensureRelay,
282
282
  ensureExtensionConnected
283
- } from "./main-7drsjfay.mjs";
283
+ } from "./main-2d15ncnt.mjs";
284
284
  import"./main-vgzr4689.mjs";
285
285
  import {
286
286
  updateJson2,
287
287
  createUpdateWatcher2
288
- } from "./main-mmj2an0m.mjs";
288
+ } from "./main-dw9xz54y.mjs";
289
289
  import {
290
290
  makeUnsafe,
291
291
  make,
@@ -369,7 +369,7 @@ import {
369
369
  mcpErrorMessage2,
370
370
  toolResult,
371
371
  listSecrets
372
- } from "./main-nhcf0kxg.mjs";
372
+ } from "./main-g2pzec54.mjs";
373
373
  import {
374
374
  Clock,
375
375
  type,
@@ -384,7 +384,7 @@ import {
384
384
  orElse,
385
385
  exhaustive
386
386
  } from "./main-8z9d979q.mjs";
387
- import"./main-q76d0fwx.mjs";
387
+ import"./main-9gfyxg1h.mjs";
388
388
  import {
389
389
  pipeArguments,
390
390
  dual,
@@ -6,8 +6,8 @@ import {
6
6
  browseServerCommand,
7
7
  editAgentConfig,
8
8
  configureMcp
9
- } from "./main-wdxnb1n3.mjs";
10
- import"./main-08je0b07.mjs";
9
+ } from "./main-2xs2he23.mjs";
10
+ import"./main-7a9t7psy.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-gwm43eg0.mjs";
18
+ } from "./main-56q3d6zp.mjs";
19
19
  import"./main-vgzr4689.mjs";
20
- import"./main-wcxe09v0.mjs";
20
+ import"./main-n5mfh7z3.mjs";
21
21
  import"./main-mrew6jy8.mjs";
22
22
 
23
23
  // src/setup/migrate.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  opencodeBrowserVersion2,
3
3
  opencodeBrowserBuildId2
4
- } from "./main-08je0b07.mjs";
4
+ } from "./main-7a9t7psy.mjs";
5
5
  import {
6
6
  dataRoot,
7
7
  stateRoot,
@@ -20,7 +20,7 @@ import {
20
20
  setStoredMode,
21
21
  autoUpdateStatus,
22
22
  createAutoUpdater
23
- } from "./main-gwm43eg0.mjs";
23
+ } from "./main-56q3d6zp.mjs";
24
24
  import {
25
25
  extensionProtocolVersion,
26
26
  minExtensionProtocolVersion,
@@ -95,7 +95,7 @@ import {
95
95
  isRestrictedTarget2,
96
96
  isRestrictedUrl2,
97
97
  dataUrlDocument2
98
- } from "./main-7drsjfay.mjs";
98
+ } from "./main-2d15ncnt.mjs";
99
99
  import {
100
100
  context,
101
101
  pendingPairingCodeKeys,
@@ -113,7 +113,7 @@ import {
113
113
  pairingSessionKey,
114
114
  sessionProof,
115
115
  wrapToken
116
- } from "./main-wcxe09v0.mjs";
116
+ } from "./main-n5mfh7z3.mjs";
117
117
  import {
118
118
  makeUnsafe,
119
119
  SettingsInputError,
@@ -141,22 +141,22 @@ import {
141
141
  checkNavigationUrl,
142
142
  readSecret,
143
143
  secretText
144
- } from "./main-nhcf0kxg.mjs";
144
+ } from "./main-g2pzec54.mjs";
145
145
  import {
146
146
  defaultJournalBaseDir,
147
147
  makeJournalEntry,
148
148
  appendJournalEntry,
149
149
  startJournalRetention
150
- } from "./main-s30p0ga6.mjs";
150
+ } from "./main-m40yrz1e.mjs";
151
151
  import {
152
152
  createUpdateWatcher2
153
- } from "./main-mmj2an0m.mjs";
153
+ } from "./main-dw9xz54y.mjs";
154
154
  import {
155
155
  relayHostname,
156
156
  isLocalPeer,
157
157
  installedDevExtension,
158
158
  syncDevExtension
159
- } from "./main-4wdhhjx7.mjs";
159
+ } from "./main-9d905rf7.mjs";
160
160
  import {
161
161
  currentTimeMillis,
162
162
  value,
@@ -268,7 +268,7 @@ import {
268
268
  relayToken,
269
269
  secretsEqual,
270
270
  ensurePrivateDirectory
271
- } from "./main-q76d0fwx.mjs";
271
+ } from "./main-9gfyxg1h.mjs";
272
272
  import {
273
273
  isString,
274
274
  isNumber,
@@ -1,4 +1,4 @@
1
- import"./main-08je0b07.mjs";
1
+ import"./main-7a9t7psy.mjs";
2
2
  import {
3
3
  cliCommand,
4
4
  installCommand,
@@ -15,14 +15,14 @@ import {
15
15
  registryUrl,
16
16
  fetchPublished,
17
17
  runInstaller
18
- } from "./main-gwm43eg0.mjs";
18
+ } from "./main-56q3d6zp.mjs";
19
19
  import"./main-mrew6jy8.mjs";
20
20
  import {
21
21
  Service,
22
22
  layerFetch,
23
23
  restartRelay,
24
24
  startManagedRelay
25
- } from "./main-7drsjfay.mjs";
25
+ } from "./main-2d15ncnt.mjs";
26
26
  import"./main-vgzr4689.mjs";
27
27
  import {
28
28
  succeed6,
@@ -32,7 +32,7 @@ import {
32
32
  provide3,
33
33
  runPromise
34
34
  } from "./main-csnx585b.mjs";
35
- import"./main-q76d0fwx.mjs";
35
+ import"./main-9gfyxg1h.mjs";
36
36
 
37
37
  // src/update/runtime-update.ts
38
38
  var log = (line) => process.stdout.write(line + `
@@ -42,6 +42,8 @@ import {
42
42
  fail,
43
43
  installWaitTimeout,
44
44
  waitTimeout,
45
+ samePath,
46
+ isInstallerBinary,
45
47
  addToPath,
46
48
  removeBinaryInstall,
47
49
  oldStoreBuild,
@@ -61,12 +63,14 @@ import {
61
63
  installRuntime,
62
64
  installedRuntime,
63
65
  manualMcpEntry
64
- } from "./main-wdxnb1n3.mjs";
66
+ } from "./main-2xs2he23.mjs";
65
67
  import {
66
68
  opencodeBrowserBuildId2
67
- } from "./main-08je0b07.mjs";
69
+ } from "./main-7a9t7psy.mjs";
68
70
  import {
69
71
  installedBinaryPath,
72
+ installerBinaryPath,
73
+ defaultSettingsPath,
70
74
  oldStoreMarker,
71
75
  compiledBinary,
72
76
  scriptEntry,
@@ -78,7 +82,7 @@ import {
78
82
  autoUpdateStatus,
79
83
  describeAutoUpdate,
80
84
  runCommand
81
- } from "./main-gwm43eg0.mjs";
85
+ } from "./main-56q3d6zp.mjs";
82
86
  import"./main-vgzr4689.mjs";
83
87
  import {
84
88
  pairingCodeTtlMs,
@@ -92,7 +96,7 @@ import {
92
96
  revokeBrowserToken,
93
97
  legacyPairingCode,
94
98
  removeLegacyPairingCode
95
- } from "./main-wcxe09v0.mjs";
99
+ } from "./main-n5mfh7z3.mjs";
96
100
  import {
97
101
  unpackedExtensionId,
98
102
  extensionProtocolSkew,
@@ -103,10 +107,10 @@ import {
103
107
  readRelayConfig,
104
108
  writeRelayConfig,
105
109
  syncDevExtension
106
- } from "./main-4wdhhjx7.mjs";
110
+ } from "./main-9d905rf7.mjs";
107
111
  import {
108
112
  relayAuthorization
109
- } from "./main-q76d0fwx.mjs";
113
+ } from "./main-9gfyxg1h.mjs";
110
114
 
111
115
  // src/setup.ts
112
116
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -580,6 +584,25 @@ async function uninstall(args) {
580
584
  }
581
585
  }
582
586
  const binary = installedBinaryPath();
587
+ if (compiledBinary()) {
588
+ const installer = installerBinaryPath();
589
+ if (installer !== binary && existsSync(installer) && !samePath(installer, binary)) {
590
+ if (!existsSync(defaultSettingsPath()) && isInstallerBinary(installer, binary)) {
591
+ try {
592
+ rmSync(installer, { force: true });
593
+ log(`✓ Removed ${installer}`);
594
+ } catch {
595
+ log(`! Couldn't remove ${installer} while it's running; delete it after uninstall exits.`);
596
+ }
597
+ } else {
598
+ log(`! Left ${installer}; delete it if you no longer use browse there.`);
599
+ }
600
+ }
601
+ }
602
+ if (existsSync(binary)) {
603
+ const left = removeBinaryInstall(binary);
604
+ log(left ? `! Couldn't remove ${left}. After uninstall exits, close any browse agents using the file(s) and delete them.` : `✓ Removed ${binary}`);
605
+ }
583
606
  for (const directory of [paths.data, paths.config, paths.state, paths.cache]) {
584
607
  try {
585
608
  rmSync(directory, { recursive: true, force: true });
@@ -590,10 +613,6 @@ async function uninstall(args) {
590
613
  log(`! Couldn't remove all of ${directory}; close running browse agents and remove the remaining files.`);
591
614
  }
592
615
  }
593
- if (existsSync(binary)) {
594
- const left = removeBinaryInstall(binary);
595
- log(left ? `! Couldn't remove ${left}. After uninstall exits, close any browse agents using the file(s) and delete them.` : `✓ Removed ${binary}`);
596
- }
597
616
  if (!compiledBinary() && !fromSource) {
598
617
  const npm = await runCommand("npm", ["uninstall", "-g", "@opencode/browse"], { timeoutMs: 120000 });
599
618
  log(npm.status === 0 ? "✓ Removed the global npm package" : `! Couldn't remove the global npm package: ${(npm.stderr || npm.stdout).trim() || "npm uninstall failed"}`);
@@ -1,9 +1,9 @@
1
- import"./main-08je0b07.mjs";
1
+ import"./main-7a9t7psy.mjs";
2
2
  import {
3
3
  entryCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-gwm43eg0.mjs";
6
+ } from "./main-56q3d6zp.mjs";
7
7
 
8
8
  // src/mcp/supervisor.ts
9
9
  import { spawn } from "node:child_process";
@@ -33,7 +33,7 @@ async function runBinaryMcp(args) {
33
33
  const runtime = installedRuntime2();
34
34
  if (!runtime || runtime.kind === "npx") {
35
35
  process.env[directEnvironmentVariable] = "1";
36
- const { runCli } = await import("./cli-x946pqcc.mjs");
36
+ const { runCli } = await import("./cli-f0f6tnd2.mjs");
37
37
  return runCli();
38
38
  }
39
39
  const REPLAY = "opencode-browser-shim-initialize";
@@ -4,10 +4,10 @@ import {
4
4
  updateNotice2,
5
5
  createUpdateWatcher2,
6
6
  runUpdateCommand2
7
- } from "./main-mmj2an0m.mjs";
7
+ } from "./main-dw9xz54y.mjs";
8
8
  import"./main-mrew6jy8.mjs";
9
- import"./main-gwm43eg0.mjs";
10
- import"./main-08je0b07.mjs";
9
+ import"./main-56q3d6zp.mjs";
10
+ import"./main-7a9t7psy.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-08je0b07.mjs";
4
+ } from "./main-7a9t7psy.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.15-dev.95",
3
+ "version": "0.0.15-dev.96",
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.15-dev.95";
3
- var opencodeBrowserBuildId2 = "2026-11-07T08:45:30.433Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };