@opencode/browse 0.0.15-dev.107 → 0.0.15-dev.109

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-qbkd4m8w.mjs";
1
+ import"./main-kca4rh9g.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-4pkcp7nr.mjs";
18
+ } from "./main-tnt640me.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-26y7xmsp.mjs";
25
+ } from "./main-m17abecj.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-we2403rv.mjs";
35
+ import"./main-jd29wpzh.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-qb9ygadg.mjs";
66
+ } from "./main-92ddeppe.mjs";
67
67
  import {
68
68
  opencodeBrowserBuildId2
69
- } from "./main-qbkd4m8w.mjs";
69
+ } from "./main-kca4rh9g.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-4pkcp7nr.mjs";
86
+ } from "./main-tnt640me.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-3b3q4x3b.mjs";
100
+ } from "./main-v214rq9t.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-9nv37gwa.mjs";
111
+ } from "./main-g42426sk.mjs";
112
112
  import {
113
113
  relayAuthorization
114
- } from "./main-we2403rv.mjs";
114
+ } from "./main-jd29wpzh.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
@@ -345,15 +351,19 @@ viewport, state and interaction path actually tested.
345
351
  ## Tabs and settings
346
352
 
347
353
  Tabs agents open close by themselves after about 10 minutes without use (the
348
- user can choose 30 or 60 minutes, or never). When a task is done, tidy up right
349
- away:
354
+ user can choose 30 or 60 minutes, or never). When a task is done, reset or
355
+ delete your own session:
350
356
 
351
357
  \`\`\`bash
352
- browse tabs cleanup --idle-minutes 0 # MCP: tabs_cleanup { idleMinutes: 0 }
358
+ browse session reset <name> # MCP: session_reset
359
+ browse session delete <name> # MCP: session_delete
353
360
  \`\`\`
354
361
 
355
- Reset or delete session-owned pages when no follow-up work is expected. Keep a
356
- session only when you will continue with it.
362
+ \`browse tabs cleanup\` closes idle agent tabs from every session sharing the
363
+ browser, not just yours, and \`--idle-minutes 0\` (\`tabs_cleanup\` with
364
+ \`idleMinutes: 0\`) would close other sessions' pages between their calls, so
365
+ only run it when the user asks. Keep a session only when you will continue with
366
+ it.
357
367
 
358
368
  Use the \`settings\` tool (CLI: \`browse settings get\` / \`settings set key=value …\`)
359
369
  only when the user asks to change how browse behaves: where tabs open (\`window\`),
@@ -1,9 +1,9 @@
1
- import"./main-qbkd4m8w.mjs";
1
+ import"./main-kca4rh9g.mjs";
2
2
  import {
3
3
  entrySpawnCommand,
4
4
  installedRuntime2,
5
5
  installedVersion
6
- } from "./main-4pkcp7nr.mjs";
6
+ } from "./main-tnt640me.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-hth2dtmb.mjs");
36
+ const { runCli } = await import("./cli-p9153stn.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-fmnq295e.mjs";
7
+ } from "./main-xgygnzxq.mjs";
8
8
  import"./main-mrew6jy8.mjs";
9
- import"./main-4pkcp7nr.mjs";
10
- import"./main-qbkd4m8w.mjs";
9
+ import"./main-tnt640me.mjs";
10
+ import"./main-kca4rh9g.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-qbkd4m8w.mjs";
4
+ } from "./main-kca4rh9g.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.107",
3
+ "version": "0.0.15-dev.109",
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
@@ -344,15 +350,19 @@ viewport, state and interaction path actually tested.
344
350
  ## Tabs and settings
345
351
 
346
352
  Tabs agents open close by themselves after about 10 minutes without use (the
347
- user can choose 30 or 60 minutes, or never). When a task is done, tidy up right
348
- away:
353
+ user can choose 30 or 60 minutes, or never). When a task is done, reset or
354
+ delete your own session:
349
355
 
350
356
  ```bash
351
- browse tabs cleanup --idle-minutes 0 # MCP: tabs_cleanup { idleMinutes: 0 }
357
+ browse session reset <name> # MCP: session_reset
358
+ browse session delete <name> # MCP: session_delete
352
359
  ```
353
360
 
354
- Reset or delete session-owned pages when no follow-up work is expected. Keep a
355
- session only when you will continue with it.
361
+ `browse tabs cleanup` closes idle agent tabs from every session sharing the
362
+ browser, not just yours, and `--idle-minutes 0` (`tabs_cleanup` with
363
+ `idleMinutes: 0`) would close other sessions' pages between their calls, so
364
+ only run it when the user asks. Keep a session only when you will continue with
365
+ it.
356
366
 
357
367
  Use the `settings` tool (CLI: `browse settings get` / `settings set key=value …`)
358
368
  only when the user asks to change how browse behaves: where tabs open (`window`),
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.15-dev.107";
3
- var opencodeBrowserBuildId2 = "2026-11-07T20:56:37.595Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };