@opencode/browse 0.0.17-dev.166 → 0.0.17-dev.168

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-xgpmv43m.mjs → cli-5834k85r.mjs} +12 -12
  2. package/dist/cli.mjs +12 -12
  3. package/dist/{helpers-btf1ap26.mjs → helpers-xaj2ycfy.mjs} +1 -1
  4. package/dist/{legacy-runtime-pkg0ecag.mjs → legacy-runtime-34dh85e3.mjs} +4 -4
  5. package/dist/{main-9xyg9y9c.mjs → main-4dtt7gft.mjs} +1 -1
  6. package/dist/{main-q5p3v6p0.mjs → main-4vpxzxr5.mjs} +2 -2
  7. package/dist/{main-6sdf0wq1.mjs → main-5nns3hew.mjs} +1 -1
  8. package/dist/{main-fe1sqpr1.mjs → main-8114va9r.mjs} +2 -2
  9. package/dist/{main-gqmxg4ne.mjs → main-84masb5k.mjs} +3 -3
  10. package/dist/{main-vrpndwjp.mjs → main-905p32ds.mjs} +3 -3
  11. package/dist/{main-7c5jc8mj.mjs → main-f5rfs18m.mjs} +3 -3
  12. package/dist/{main-42znx37a.mjs → main-jde7rd73.mjs} +1 -1
  13. package/dist/{main-553vntba.mjs → main-nd3q2tgb.mjs} +2 -2
  14. package/dist/main-njw3wxwk.mjs +4 -0
  15. package/dist/{main-8qyy8cnh.mjs → main-rtsm881v.mjs} +2 -2
  16. package/dist/{mcp-sj9xsxkv.mjs → mcp-5ew0wby9.mjs} +8 -8
  17. package/dist/{migrate-ms43gy8g.mjs → migrate-s88qjtc8.mjs} +4 -4
  18. package/dist/{relay-sehj3f4h.mjs → relay-tw3t5jpf.mjs} +51 -15
  19. package/dist/{runtime-update-a0khxsnq.mjs → runtime-update-htnbyjxn.mjs} +4 -4
  20. package/dist/{setup-bbpw66qx.mjs → setup-0s98jsfn.mjs} +7 -7
  21. package/dist/{skill-text-gbzt462e.mjs → skill-text-t7f2b8m7.mjs} +10 -3
  22. package/dist/{supervisor-sf5jbvwn.mjs → supervisor-k6wbp9ch.mjs} +3 -3
  23. package/dist/{update-nc0yg4ns.mjs → update-7r0y0tbk.mjs} +3 -3
  24. package/dist/{version-9zw92j95.mjs → version-h67b69y6.mjs} +1 -1
  25. package/package.json +1 -1
  26. package/skills/browse/SKILL.md +10 -3
  27. package/dist/main-y11nc1jt.mjs +0 -4
@@ -25,7 +25,7 @@ import"./main-pmfd055v.mjs";
25
25
  import {
26
26
  opencodeBrowserVersion2,
27
27
  opencodeBrowserBuildId2
28
- } from "./main-y11nc1jt.mjs";
28
+ } from "./main-njw3wxwk.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-vrpndwjp.mjs";
41
+ } from "./main-905p32ds.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-7c5jc8mj.mjs";
67
+ } from "./main-f5rfs18m.mjs";
68
68
  import"./main-4h7rfhhr.mjs";
69
69
  import {
70
70
  updateJson2,
71
71
  formatUpdateNotice2,
72
72
  updateNotice2
73
- } from "./main-q5p3v6p0.mjs";
73
+ } from "./main-4vpxzxr5.mjs";
74
74
  import {
75
75
  settingKeys,
76
76
  formatSettings,
77
77
  ensureSessionExists
78
- } from "./main-8qyy8cnh.mjs";
78
+ } from "./main-rtsm881v.mjs";
79
79
  import {
80
80
  addSecret,
81
81
  listSecrets,
82
82
  removeSecret
83
- } from "./main-42znx37a.mjs";
83
+ } from "./main-jde7rd73.mjs";
84
84
  import {
85
85
  defaultJournalBaseDir,
86
86
  readJournalEntries,
87
87
  formatJournalEntry
88
- } from "./main-fe1sqpr1.mjs";
89
- import"./main-6sdf0wq1.mjs";
88
+ } from "./main-8114va9r.mjs";
89
+ import"./main-5nns3hew.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-sj9xsxkv.mjs"));
5847
+ const { runMcpServer } = yield* promise(() => import("./mcp-5ew0wby9.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-gbzt462e.mjs"));
5868
+ const { skillText } = yield* promise(() => import("./skill-text-t7f2b8m7.mjs"));
5869
5869
  yield* log(skillText.trimEnd());
5870
5870
  })).pipe(withDescription4("Print the browse agent skill text")));
5871
5871
  registerCliCommand(900, () => mcp);
@@ -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-sehj3f4h.mjs"), import("./helpers-btf1ap26.mjs")]));
6295
+ const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-tw3t5jpf.mjs"), import("./helpers-xaj2ycfy.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-pkg0ecag.mjs").then((module) => module.commitLegacyTakeover()));
6300
+ yield* promise(() => import("./legacy-runtime-34dh85e3.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.166";
11
+ var embeddedVersion = "0.0.17-dev.168";
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-pkg0ecag.mjs").then((module) => module.prepareLegacyTakeover(oldRuntime)).catch(() => false);
21
+ var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-34dh85e3.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-ms43gy8g.mjs");
26
+ const { migrateLegacy } = await import("./migrate-s88qjtc8.mjs");
27
27
  migrateLegacy();
28
28
  } catch {}
29
29
  }
30
30
  if (command === "--version" || command === "-v") {
31
- const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-9zw92j95.mjs")).opencodeBrowserVersion;
31
+ const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-h67b69y6.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-sf5jbvwn.mjs")).supervisesMcp()) {
35
- const { runBinaryMcp } = await import("./supervisor-sf5jbvwn.mjs");
34
+ } else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-k6wbp9ch.mjs")).supervisesMcp()) {
35
+ const { runBinaryMcp } = await import("./supervisor-k6wbp9ch.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-yaf37ery.mjs");
39
39
  const { defaultTeardown } = await import("./Runtime-qfc1eg1n.mjs");
40
- const { runMcpServer } = await import("./mcp-sj9xsxkv.mjs");
40
+ const { runMcpServer } = await import("./mcp-5ew0wby9.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-a0khxsnq.mjs");
62
+ const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-htnbyjxn.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-nc0yg4ns.mjs");
65
+ const { runUpdateCommand } = await import("./update-7r0y0tbk.mjs");
66
66
  await runUpdateCommand(process.argv.slice(3));
67
67
  } else if (command && setupCommands.has(command) && !askedForHelp) {
68
- const { runSetup } = await import("./setup-bbpw66qx.mjs");
68
+ const { runSetup } = await import("./setup-0s98jsfn.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-bbpw66qx.mjs");
105
+ const { printSetupStatus } = await import("./setup-0s98jsfn.mjs");
106
106
  printSetupStatus();
107
107
  }
108
- const { runCli } = await import("./cli-xgpmv43m.mjs");
108
+ const { runCli } = await import("./cli-5834k85r.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-7c5jc8mj.mjs";
35
+ } from "./main-f5rfs18m.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-y11nc1jt.mjs";
8
+ } from "./main-njw3wxwk.mjs";
9
9
  import {
10
10
  installerBinaryPath,
11
11
  compiledBinary,
12
12
  channelOf,
13
13
  installedRuntime2
14
- } from "./main-vrpndwjp.mjs";
14
+ } from "./main-905p32ds.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-ms43gy8g.mjs");
40
+ const { copyLegacyData } = await import("./migrate-s88qjtc8.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-ms43gy8g.mjs");
54
+ const { migrateLegacy } = await import("./migrate-s88qjtc8.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-vrpndwjp.mjs";
7
+ } from "./main-905p32ds.mjs";
8
8
 
9
9
  // src/relay/browser-pairing.ts
10
10
  import crypto from "node:crypto";
@@ -6,7 +6,7 @@ import {
6
6
  installedRuntime2,
7
7
  autoUpdateStatus,
8
8
  updateAvailable
9
- } from "./main-vrpndwjp.mjs";
9
+ } from "./main-905p32ds.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-a0khxsnq.mjs");
318
+ const { runInstalledUpdate } = await import("./runtime-update-htnbyjxn.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-vrpndwjp.mjs";
6
+ } from "./main-905p32ds.mjs";
7
7
 
8
8
  // src/relay/secrets.ts
9
9
  import crypto from "node:crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./main-4h7rfhhr.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-7c5jc8mj.mjs";
6
+ } from "./main-f5rfs18m.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-vrpndwjp.mjs";
22
+ } from "./main-905p32ds.mjs";
23
23
 
24
24
  // src/session-manager/journal.ts
25
25
  import fs from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-y11nc1jt.mjs";
3
+ } from "./main-njw3wxwk.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-vrpndwjp.mjs";
24
+ } from "./main-905p32ds.mjs";
25
25
  import {
26
26
  writeStdout
27
27
  } from "./main-tk4axre7.mjs";
28
28
  import {
29
29
  formatPairingCode
30
- } from "./main-9xyg9y9c.mjs";
30
+ } from "./main-4dtt7gft.mjs";
31
31
  import {
32
32
  unpackedExtensionId
33
33
  } from "./main-b3jrctcx.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./main-pmfd055v.mjs";
5
5
  import {
6
6
  opencodeBrowserVersion2
7
- } from "./main-y11nc1jt.mjs";
7
+ } from "./main-njw3wxwk.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.166", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
117
+ return { kind: "npm", version: "0.0.17-dev.168", 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.166.zip", sha256: "277afff8c6ace8038f36d964a32605fe40114a6e8024804a06b27e732cf0c8e4", size: 184210 }) {
139
+ function devExtension(baked = { file: "browse-extension-0.0.17-dev.168.zip", sha256: "6990387444a9e78b6356aadcd7a866392b08632f11ef1bfb33f735cfe303fe66", size: 184211 }) {
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}`;
@@ -18,7 +18,7 @@ import {
18
18
  } from "./main-jf7jberd.mjs";
19
19
  import {
20
20
  opencodeBrowserBuildId2
21
- } from "./main-y11nc1jt.mjs";
21
+ } from "./main-njw3wxwk.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-vrpndwjp.mjs";
31
+ } from "./main-905p32ds.mjs";
32
32
  import {
33
33
  relayAuthorization
34
- } from "./main-6sdf0wq1.mjs";
34
+ } from "./main-5nns3hew.mjs";
35
35
  import {
36
36
  Pointer,
37
37
  passthrough,
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  dataRoot,
54
54
  cliCommand
55
- } from "./main-vrpndwjp.mjs";
55
+ } from "./main-905p32ds.mjs";
56
56
 
57
57
  // node_modules/effect/dist/Semaphore.js
58
58
  var makeUnsafe = (permits) => new SemaphoreImpl(permits);
@@ -5,13 +5,13 @@ import {
5
5
  bundledPairingCodeTtlMs,
6
6
  mintPairingCode,
7
7
  writeExtensionPairing
8
- } from "./main-9xyg9y9c.mjs";
8
+ } from "./main-4dtt7gft.mjs";
9
9
  import {
10
10
  configRoot2,
11
11
  cacheRoot,
12
12
  devExtensionUrl,
13
13
  devExtensionFolder
14
- } from "./main-vrpndwjp.mjs";
14
+ } from "./main-905p32ds.mjs";
15
15
 
16
16
  // src/setup/dev-extension.ts
17
17
  import { createHash } from "node:crypto";
@@ -0,0 +1,4 @@
1
+ // src/version.ts
2
+ var opencodeBrowserVersion2 = "0.0.17-dev.168";
3
+ var opencodeBrowserBuildId2 = "2026-11-10T20:26:49.759Z";
4
+ export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };
@@ -12,7 +12,7 @@ import {
12
12
  parseTargetSelection2,
13
13
  getObject2,
14
14
  getString2
15
- } from "./main-7c5jc8mj.mjs";
15
+ } from "./main-f5rfs18m.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-vrpndwjp.mjs";
106
+ } from "./main-905p32ds.mjs";
107
107
 
108
108
  // node_modules/effect/dist/PrimaryKey.js
109
109
  var symbol = "~effect/PrimaryKey";
@@ -46,11 +46,11 @@ import {
46
46
  import"./main-pmfd055v.mjs";
47
47
  import {
48
48
  opencodeBrowserVersion2
49
- } from "./main-y11nc1jt.mjs";
49
+ } from "./main-njw3wxwk.mjs";
50
50
  import {
51
51
  cliCommand,
52
52
  autoUpdateStatus
53
- } from "./main-vrpndwjp.mjs";
53
+ } from "./main-905p32ds.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-7c5jc8mj.mjs";
73
+ } from "./main-f5rfs18m.mjs";
74
74
  import"./main-4h7rfhhr.mjs";
75
75
  import {
76
76
  updateJson2,
77
77
  createUpdateWatcher2
78
- } from "./main-q5p3v6p0.mjs";
78
+ } from "./main-4vpxzxr5.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-8qyy8cnh.mjs";
159
+ } from "./main-rtsm881v.mjs";
160
160
  import {
161
161
  makeUnsafe,
162
162
  make3,
163
163
  listSecrets
164
- } from "./main-42znx37a.mjs";
164
+ } from "./main-jde7rd73.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-4074weqb.mjs";
179
- import"./main-6sdf0wq1.mjs";
179
+ import"./main-5nns3hew.mjs";
180
180
  import {
181
181
  Class,
182
182
  taggedEnum,
@@ -8941,7 +8941,7 @@ registerMcpTools({
8941
8941
  build: (ctx) => [
8942
8942
  {
8943
8943
  name: "execute",
8944
- description: `Execute Playwright JavaScript against the browse session. Code runs in a restricted JavaScript realm on the relay without process, require, import(), fs, child_process, http/https or Node fetch; save and read files with the files helper inside the execute file roots, and cookie access is limited to the session's pages. Synchronous code stops after about 2 seconds. It is not a security boundary, so treat code as running as the user. The result includes console logs, warnings, a bounded execution-context diagnostic when relevant, and an aftermath summary (URL movement, navigations, error counts, handoffs, and a bot challenge or block page when one appears: hand interactive ones to the user with handoff(), never solve or retry-loop them).`,
8944
+ description: `Execute Playwright JavaScript against the browse session. Code runs in a restricted JavaScript realm on the relay without process, require, import(), fs, child_process, http/https or Node fetch; save and read files with the files helper inside the execute file roots (file paths, including Playwright options like screenshot({ path }), must be in folders you own without group/world write access; files.path(name) gives a safe one), and cookie access is limited to the session's pages. Synchronous code stops after about 2 seconds. It is not a security boundary, so treat code as running as the user. The result includes console logs, warnings, a bounded execution-context diagnostic when relevant, and an aftermath summary (URL movement, navigations, error counts, handoffs, and a bot challenge or block page when one appears: hand interactive ones to the user with handoff(), never solve or retry-loop them).`,
8945
8945
  inputSchema: objectSchema({
8946
8946
  code: {
8947
8947
  type: "string",
@@ -7,14 +7,14 @@ import {
7
7
  editAgentConfig,
8
8
  OPENCODE_CONFIG_NAMES,
9
9
  configureMcp
10
- } from "./main-gqmxg4ne.mjs";
10
+ } from "./main-84masb5k.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-y11nc1jt.mjs";
17
+ import"./main-njw3wxwk.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-vrpndwjp.mjs";
26
+ } from "./main-905p32ds.mjs";
27
27
  import"./main-tk4axre7.mjs";
28
28
  import"./main-4h7rfhhr.mjs";
29
- import"./main-9xyg9y9c.mjs";
29
+ import"./main-4dtt7gft.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-y11nc1jt.mjs";
7
+ } from "./main-njw3wxwk.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-vrpndwjp.mjs";
31
+ } from "./main-905p32ds.mjs";
32
32
  import {
33
33
  extensionProtocolVersion,
34
34
  minExtensionProtocolVersion,
@@ -107,7 +107,7 @@ import {
107
107
  dataUrlDocument2,
108
108
  appendManagedRelayProcessLog,
109
109
  relayLog
110
- } from "./main-7c5jc8mj.mjs";
110
+ } from "./main-f5rfs18m.mjs";
111
111
  import {
112
112
  context,
113
113
  pendingPairingCodeKeys,
@@ -125,7 +125,7 @@ import {
125
125
  pairingSessionKey,
126
126
  sessionProof,
127
127
  wrapToken
128
- } from "./main-9xyg9y9c.mjs";
128
+ } from "./main-4dtt7gft.mjs";
129
129
  import {
130
130
  makeUnsafe,
131
131
  terminateChildProcess,
@@ -148,16 +148,16 @@ import {
148
148
  checkNavigationUrl,
149
149
  readSecret,
150
150
  secretText
151
- } from "./main-42znx37a.mjs";
151
+ } from "./main-jde7rd73.mjs";
152
152
  import {
153
153
  defaultJournalBaseDir,
154
154
  makeJournalEntry,
155
155
  appendJournalEntry,
156
156
  startJournalRetention
157
- } from "./main-fe1sqpr1.mjs";
157
+ } from "./main-8114va9r.mjs";
158
158
  import {
159
159
  createUpdateWatcher2
160
- } from "./main-q5p3v6p0.mjs";
160
+ } from "./main-4vpxzxr5.mjs";
161
161
  import {
162
162
  SettingsInputError,
163
163
  parseSettingChanges,
@@ -165,13 +165,13 @@ import {
165
165
  settingsToExtension,
166
166
  describeSettings,
167
167
  describeChanges
168
- } from "./main-8qyy8cnh.mjs";
168
+ } from "./main-rtsm881v.mjs";
169
169
  import {
170
170
  relayHostname,
171
171
  isLocalPeer,
172
172
  installedDevExtension,
173
173
  syncDevExtension
174
- } from "./main-553vntba.mjs";
174
+ } from "./main-nd3q2tgb.mjs";
175
175
  import {
176
176
  currentTimeMillis,
177
177
  value,
@@ -184,7 +184,7 @@ import {
184
184
  relayToken,
185
185
  secretsEqual,
186
186
  ensurePrivateDirectory
187
- } from "./main-6sdf0wq1.mjs";
187
+ } from "./main-5nns3hew.mjs";
188
188
  import {
189
189
  join,
190
190
  interrupt,
@@ -1814,6 +1814,14 @@ var redactionSelectorSource = `({
1814
1814
  const isEditableDescendant = (element) => explicitEditableState(element) !== true && isInEditableSubtree(element)
1815
1815
  const isNativeTextControl = (element) => element instanceof HTMLTextAreaElement
1816
1816
  || (element instanceof HTMLInputElement && !state.nonTextInputTypes.has(element.type))
1817
+ const readOnlyAutocompleteTokens = new Set(["current-password", "new-password", "one-time-code", "cc-number", "cc-csc", "cc-exp", "cc-exp-month", "cc-exp-year"])
1818
+ const isReadOnlyTextControl = (element) => {
1819
+ if (!isNativeTextControl(element) || !element.readOnly) return false
1820
+ if (element instanceof HTMLInputElement && element.type === "password") return false
1821
+ const autocomplete = getAttribute(element, "autocomplete")
1822
+ return autocomplete === null
1823
+ || !autocomplete.trim().toLowerCase().split(/\\s+/).some((token) => readOnlyAutocompleteTokens.has(token))
1824
+ }
1817
1825
  const isValueRole = (element) => {
1818
1826
  const role = getAttribute(element, "role")
1819
1827
  return role !== null && role.trim().toLowerCase().split(/\\s+/).some((candidate) => state.valueRoles.has(candidate))
@@ -1823,10 +1831,15 @@ var redactionSelectorSource = `({
1823
1831
  Object.defineProperty(HTMLInputElement.prototype, "value", {
1824
1832
  ...state.inputValue,
1825
1833
  get() {
1826
- return isNativeTextControl(this) ? "" : state.inputValue.get.call(this)
1834
+ return isNativeTextControl(this) && !isReadOnlyTextControl(this) ? "" : state.inputValue.get.call(this)
1835
+ },
1836
+ })
1837
+ Object.defineProperty(HTMLTextAreaElement.prototype, "value", {
1838
+ ...state.textareaValue,
1839
+ get() {
1840
+ return isReadOnlyTextControl(this) ? state.textareaValue.get.call(this) : ""
1827
1841
  },
1828
1842
  })
1829
- Object.defineProperty(HTMLTextAreaElement.prototype, "value", { ...state.textareaValue, get() { return "" } })
1830
1843
  Object.defineProperty(Node.prototype, "nodeValue", {
1831
1844
  ...state.nodeValue,
1832
1845
  get() {
@@ -1854,7 +1867,8 @@ var redactionSelectorSource = `({
1854
1867
  value(name) {
1855
1868
  const attribute = String(name).toLowerCase()
1856
1869
  if (state.valueAttributes.has(attribute)
1857
- && (isNativeTextControl(this) || isValueRole(this) || isInEditableSubtree(this))) return null
1870
+ && (isValueRole(this) || isInEditableSubtree(this)
1871
+ || (isNativeTextControl(this) && (attribute !== "value" || !isReadOnlyTextControl(this))))) return null
1858
1872
  if (state.editableNameAttributes.has(attribute) && isEditableDescendant(this)) return null
1859
1873
  return state.getAttribute.value.call(this, name)
1860
1874
  },
@@ -2974,7 +2988,7 @@ function assertExecuteFilePath(target, operation, options = {}) {
2974
2988
  if (stat?.isSymbolicLink())
2975
2989
  throw new ExecuteFileAccessError(`${operation}: symlink paths are not available in execute code`);
2976
2990
  if (stat && current !== root && process.getuid && (stat.uid !== process.getuid() || (stat.mode & 18) !== 0)) {
2977
- throw new ExecuteFileAccessError(`${operation}: file paths must use owned directories and files without group/world write access`);
2991
+ throw new ExecuteFileAccessError(`${operation}: file paths must use owned directories and files without group/world write access (${current} is not); use files.path(name) for a file in the private files.dir`);
2978
2992
  }
2979
2993
  if (stat && !stat.isDirectory() && (!stat.isFile() || stat.nlink !== 1)) {
2980
2994
  throw new ExecuteFileAccessError(`${operation}: expected a regular file with no hard links`);
@@ -8133,6 +8147,18 @@ var captureSnapshotInBrowser = (rootOrSettings, locatorSettings) => {
8133
8147
  if (settings.rootRole && roleFor(root) !== settings.rootRole || settings.rootName && accessibleName(root) !== settings.rootName) {
8134
8148
  throw new Error("Snapshot ref no longer identifies the captured element; call snapshot() again");
8135
8149
  }
8150
+ const nonTextInputTypes = new Set(["button", "checkbox", "file", "hidden", "image", "radio", "reset", "submit"]);
8151
+ const isNativeTextControl = (element) => element instanceof HTMLTextAreaElement || element instanceof HTMLInputElement && !nonTextInputTypes.has(element.type);
8152
+ const hiddenReadonlyAutocompleteTokens = new Set([
8153
+ "current-password",
8154
+ "new-password",
8155
+ "one-time-code",
8156
+ "cc-number",
8157
+ "cc-csc",
8158
+ "cc-exp",
8159
+ "cc-exp-month",
8160
+ "cc-exp-year"
8161
+ ]);
8136
8162
  const detailsFor = (element) => {
8137
8163
  const details = [];
8138
8164
  if (element instanceof HTMLInputElement) {
@@ -8143,6 +8169,16 @@ var captureSnapshotInBrowser = (rootOrSettings, locatorSettings) => {
8143
8169
  if ((ariaChecked === "true" || ariaChecked === "false" || ariaChecked === "mixed") && !(element instanceof HTMLInputElement)) {
8144
8170
  details.push(ariaChecked === "true" ? "checked" : ariaChecked === "false" ? "unchecked" : "checked=mixed");
8145
8171
  }
8172
+ if (isNativeTextControl(element)) {
8173
+ const autocomplete = (element.getAttribute("autocomplete") ?? "").toLowerCase().split(/\s+/);
8174
+ const isPassword = element instanceof HTMLInputElement && element.type === "password";
8175
+ if (element.readOnly && !isPassword && !autocomplete.some((token) => hiddenReadonlyAutocompleteTokens.has(token))) {
8176
+ details.push("readonly");
8177
+ const value = normalize(element.value);
8178
+ if (value)
8179
+ details.push(`value="${quote(truncate(value, 80))}"`);
8180
+ }
8181
+ }
8146
8182
  if (element instanceof HTMLSelectElement) {
8147
8183
  const selected = element.selectedOptions[0]?.textContent;
8148
8184
  if (selected)
@@ -8703,7 +8739,7 @@ var captureSnapshotInBrowser = (rootOrSettings, locatorSettings) => {
8703
8739
  const nameFromAuthorOnly = role === "combobox" || role === "listbox" || role === "textbox" || role === "searchbox" || role === "spinbutton" || role === "slider";
8704
8740
  const identityName = isInteractive ? nameFromAuthorOnly ? authorAccessibleName(element) : displayName : displayName;
8705
8741
  const isDisabled = element.disabled === true || element.getAttribute("aria-disabled") === "true";
8706
- if (isInteractive && isDisabled && !displayName && !element.getAttribute("name"))
8742
+ if (isInteractive && isDisabled && !displayName && !element.getAttribute("name") && !isNativeTextControl(element))
8707
8743
  continue;
8708
8744
  const fallbackName = role === "group" ? "Group" : role === "dialog" || role === "alertdialog" ? "Dialog" : role === "listbox" ? "Listbox" : role === "menu" ? "Menu" : role === "table" ? "Table" : role === "list" ? "List" : role === "tablist" ? "Tab list" : isInteractive ? element.getAttribute("name") || element.getAttribute("data-testid") || element.getAttribute("data-test-id") || element.getAttribute("data-test") || role : "";
8709
8745
  const name = truncate(displayName || fallbackName, isParagraph || isSafetyText || isStructural ? 180 : 120);
@@ -1,6 +1,6 @@
1
1
  import"./main-9bk4pprj.mjs";
2
2
  import"./main-pmfd055v.mjs";
3
- import"./main-y11nc1jt.mjs";
3
+ import"./main-njw3wxwk.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-vrpndwjp.mjs";
21
+ } from "./main-905p32ds.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-7c5jc8mj.mjs";
28
+ } from "./main-f5rfs18m.mjs";
29
29
  import"./main-4h7rfhhr.mjs";
30
30
  import"./main-jf7jberd.mjs";
31
- import"./main-6sdf0wq1.mjs";
31
+ import"./main-5nns3hew.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-gqmxg4ne.mjs";
66
+ } from "./main-84masb5k.mjs";
67
67
  import"./main-pmfd055v.mjs";
68
68
  import {
69
69
  opencodeBrowserBuildId2
70
- } from "./main-y11nc1jt.mjs";
70
+ } from "./main-njw3wxwk.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-vrpndwjp.mjs";
87
+ } from "./main-905p32ds.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-9xyg9y9c.mjs";
101
+ } from "./main-4dtt7gft.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-42znx37a.mjs";
110
+ } from "./main-jde7rd73.mjs";
111
111
  import {
112
112
  parseHostname,
113
113
  readRelayConfig,
114
114
  writeRelayConfig,
115
115
  syncDevExtension
116
- } from "./main-553vntba.mjs";
116
+ } from "./main-nd3q2tgb.mjs";
117
117
  import {
118
118
  relayAuthorization
119
- } from "./main-6sdf0wq1.mjs";
119
+ } from "./main-5nns3hew.mjs";
120
120
 
121
121
  // src/setup.ts
122
122
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -115,8 +115,12 @@ result carries a warning saying so.
115
115
  Useful inspection helpers:
116
116
 
117
117
  - \`snapshot()\` is the compact read-before-act default. It prioritizes semantic
118
- groups, alerts, lists, tables, headings, links, and controls; text input values
119
- are omitted. \`snapshot({ find: /checkout/i, context: 2 })\` searches it, and
118
+ groups, alerts, lists, tables, headings, links, and controls. It and
119
+ \`ariaSnapshot()\` hide the values of editable fields and of password,
120
+ one-time-code and card fields (\`autocomplete\` \`cc-number\`, \`cc-csc\`,
121
+ \`cc-exp*\`); other readonly fields show their value, so a generated address or
122
+ code is readable. A field the page locks after you type into it counts as
123
+ readonly. \`snapshot({ find: /checkout/i, context: 2 })\` searches it, and
120
124
  \`snapshot({ diff: true })\` or \`{ delta: true }\` reports changes.
121
125
  - \`ref("e12")\` resolves a control from the latest snapshot. Refs fail closed
122
126
  after navigation or incompatible DOM drift; compatible refs keep their ids.
@@ -238,7 +242,10 @@ is no \`process\`, \`require\`, \`import()\`, \`eval\`, \`fs\`, \`os\`,
238
242
  Files go through \`files\` and Playwright file options, which accept absolute paths
239
243
  inside the execute file roots (the temp directory, \`/tmp\`, and directories in
240
244
  \`OPENCODE_BROWSER_FILE_ROOTS\`); raw CDP commands that name local files are
241
- checked the same way:
245
+ checked the same way. Every existing folder and file between the root and the
246
+ target must be owned by you and not group/world writable, and a file or folder
247
+ directly in a shared root like \`/tmp\` is refused; \`files.path(name)\`, which
248
+ points into \`files.dir\`, is the easy way:
242
249
 
243
250
  \`\`\`js
244
251
  const saved = await files.write("report.csv", csvText)
@@ -1,10 +1,10 @@
1
1
  import"./main-pmfd055v.mjs";
2
- import"./main-y11nc1jt.mjs";
2
+ import"./main-njw3wxwk.mjs";
3
3
  import {
4
4
  entrySpawnCommand,
5
5
  installedRuntime2,
6
6
  installedVersion
7
- } from "./main-vrpndwjp.mjs";
7
+ } from "./main-905p32ds.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-xgpmv43m.mjs");
38
+ const { runCli } = await import("./cli-5834k85r.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-q5p3v6p0.mjs";
7
+ } from "./main-4vpxzxr5.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-vrpndwjp.mjs";
9
+ import"./main-905p32ds.mjs";
10
10
  import"./main-pmfd055v.mjs";
11
- import"./main-y11nc1jt.mjs";
11
+ import"./main-njw3wxwk.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-y11nc1jt.mjs";
4
+ } from "./main-njw3wxwk.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.166",
3
+ "version": "0.0.17-dev.168",
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",
@@ -114,8 +114,12 @@ result carries a warning saying so.
114
114
  Useful inspection helpers:
115
115
 
116
116
  - `snapshot()` is the compact read-before-act default. It prioritizes semantic
117
- groups, alerts, lists, tables, headings, links, and controls; text input values
118
- are omitted. `snapshot({ find: /checkout/i, context: 2 })` searches it, and
117
+ groups, alerts, lists, tables, headings, links, and controls. It and
118
+ `ariaSnapshot()` hide the values of editable fields and of password,
119
+ one-time-code and card fields (`autocomplete` `cc-number`, `cc-csc`,
120
+ `cc-exp*`); other readonly fields show their value, so a generated address or
121
+ code is readable. A field the page locks after you type into it counts as
122
+ readonly. `snapshot({ find: /checkout/i, context: 2 })` searches it, and
119
123
  `snapshot({ diff: true })` or `{ delta: true }` reports changes.
120
124
  - `ref("e12")` resolves a control from the latest snapshot. Refs fail closed
121
125
  after navigation or incompatible DOM drift; compatible refs keep their ids.
@@ -237,7 +241,10 @@ is no `process`, `require`, `import()`, `eval`, `fs`, `os`,
237
241
  Files go through `files` and Playwright file options, which accept absolute paths
238
242
  inside the execute file roots (the temp directory, `/tmp`, and directories in
239
243
  `OPENCODE_BROWSER_FILE_ROOTS`); raw CDP commands that name local files are
240
- checked the same way:
244
+ checked the same way. Every existing folder and file between the root and the
245
+ target must be owned by you and not group/world writable, and a file or folder
246
+ directly in a shared root like `/tmp` is refused; `files.path(name)`, which
247
+ points into `files.dir`, is the easy way:
241
248
 
242
249
  ```js
243
250
  const saved = await files.write("report.csv", csvText)
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.17-dev.166";
3
- var opencodeBrowserBuildId2 = "2026-11-10T16:11:37.540Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };