@opencode/browse 0.0.15-dev.106 → 0.0.15-dev.108

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.
@@ -1,4 +1,4 @@
1
- import"./main-js2skwv0.mjs";
1
+ import"./main-ph9p60em.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-w1tpmn40.mjs";
18
+ } from "./main-8x0vchk6.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-8v745bnc.mjs";
25
+ } from "./main-kcdhjma5.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-q3b9mgev.mjs";
35
+ import"./main-92gwpbpf.mjs";
36
36
 
37
37
  // src/update/runtime-update.ts
38
38
  var log = (line) => process.stdout.write(line + `
@@ -63,10 +63,10 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-dmzamkj7.mjs";
66
+ } from "./main-4q3e95c4.mjs";
67
67
  import {
68
68
  opencodeBrowserBuildId2
69
- } from "./main-js2skwv0.mjs";
69
+ } from "./main-ph9p60em.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-w1tpmn40.mjs";
86
+ } from "./main-8x0vchk6.mjs";
87
87
  import"./main-vgzr4689.mjs";
88
88
  import {
89
89
  pairingCodeTtlMs,
@@ -97,7 +97,7 @@ import {
97
97
  revokeBrowserToken,
98
98
  legacyPairingCode,
99
99
  removeLegacyPairingCode
100
- } from "./main-meb93fb6.mjs";
100
+ } from "./main-01m4wrg2.mjs";
101
101
  import {
102
102
  unpackedExtensionId,
103
103
  extensionProtocolSkew,
@@ -108,10 +108,10 @@ import {
108
108
  readRelayConfig,
109
109
  writeRelayConfig,
110
110
  syncDevExtension
111
- } from "./main-xh68g601.mjs";
111
+ } from "./main-gwch0y7g.mjs";
112
112
  import {
113
113
  relayAuthorization
114
- } from "./main-q3b9mgev.mjs";
114
+ } from "./main-92gwpbpf.mjs";
115
115
 
116
116
  // src/setup.ts
117
117
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -228,7 +228,8 @@ is no \`process\`, \`require\`, \`import()\`, \`eval\`, \`fs\`, \`os\`,
228
228
  \`page.request\`, \`context.request\` and \`browser.browserType()\` are unavailable.
229
229
  Files go through \`files\` and Playwright file options, which accept absolute paths
230
230
  inside the execute file roots (the temp directory, \`/tmp\`, and directories in
231
- \`OPENCODE_BROWSER_FILE_ROOTS\`):
231
+ \`OPENCODE_BROWSER_FILE_ROOTS\`); raw CDP commands that name local files are
232
+ checked the same way:
232
233
 
233
234
  \`\`\`js
234
235
  const saved = await files.write("report.csv", csvText)
@@ -236,6 +237,11 @@ const bytes = await files.read(saved) // Buffer; files.read(p, "utf8") for text
236
237
  await page.screenshot({ path: files.path("page.png") })
237
238
  \`\`\`
238
239
 
240
+ Setting \`Browser.setDownloadBehavior\` (or \`Page.setDownloadBehavior\`) replaces
241
+ Playwright's own download handling, so keep its folder inside the file roots.
242
+ After that, \`page.on("download")\` and \`download.saveAs()\` stop working for the
243
+ context.
244
+
239
245
  Use \`page.evaluate\` for \`window\`, \`document\`, storage and same-origin \`fetch\`
240
246
  with page cookies. It runs in an isolated world whose \`fetch\` skips the page's
241
247
  service worker; pass \`false\` as its fourth argument
@@ -1,9 +1,9 @@
1
- import"./main-js2skwv0.mjs";
1
+ import"./main-ph9p60em.mjs";
2
2
  import {
3
3
  entrySpawnCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-w1tpmn40.mjs";
6
+ } from "./main-8x0vchk6.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-w47wwyed.mjs");
36
+ const { runCli } = await import("./cli-t40yxjx0.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-y8pf1913.mjs";
7
+ } from "./main-w01bz8hg.mjs";
8
8
  import"./main-mrew6jy8.mjs";
9
- import"./main-w1tpmn40.mjs";
10
- import"./main-js2skwv0.mjs";
9
+ import"./main-8x0vchk6.mjs";
10
+ import"./main-ph9p60em.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-js2skwv0.mjs";
4
+ } from "./main-ph9p60em.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.106",
3
+ "version": "0.0.15-dev.108",
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",
@@ -227,7 +227,8 @@ is no `process`, `require`, `import()`, `eval`, `fs`, `os`,
227
227
  `page.request`, `context.request` and `browser.browserType()` are unavailable.
228
228
  Files go through `files` and Playwright file options, which accept absolute paths
229
229
  inside the execute file roots (the temp directory, `/tmp`, and directories in
230
- `OPENCODE_BROWSER_FILE_ROOTS`):
230
+ `OPENCODE_BROWSER_FILE_ROOTS`); raw CDP commands that name local files are
231
+ checked the same way:
231
232
 
232
233
  ```js
233
234
  const saved = await files.write("report.csv", csvText)
@@ -235,6 +236,11 @@ const bytes = await files.read(saved) // Buffer; files.read(p, "utf8") for text
235
236
  await page.screenshot({ path: files.path("page.png") })
236
237
  ```
237
238
 
239
+ Setting `Browser.setDownloadBehavior` (or `Page.setDownloadBehavior`) replaces
240
+ Playwright's own download handling, so keep its folder inside the file roots.
241
+ After that, `page.on("download")` and `download.saveAs()` stop working for the
242
+ context.
243
+
238
244
  Use `page.evaluate` for `window`, `document`, storage and same-origin `fetch`
239
245
  with page cookies. It runs in an isolated world whose `fetch` skips the page's
240
246
  service worker; pass `false` as its fourth argument
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.15-dev.106";
3
- var opencodeBrowserBuildId2 = "2026-11-07T19:19:59.271Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };