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

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 (34) hide show
  1. package/dist/{Runtime-qfc1eg1n.mjs → Runtime-jrg7sc9p.mjs} +1 -1
  2. package/dist/{cli-5834k85r.mjs → cli-k6tgme5c.mjs} +49 -49
  3. package/dist/cli.mjs +14 -14
  4. package/dist/{helpers-xaj2ycfy.mjs → helpers-g8dsh6s5.mjs} +1 -1
  5. package/dist/{index-yaf37ery.mjs → index-j79y2me1.mjs} +2 -2
  6. package/dist/{legacy-runtime-34dh85e3.mjs → legacy-runtime-jj1srsz7.mjs} +4 -4
  7. package/dist/{main-4074weqb.mjs → main-048kx59h.mjs} +1 -1
  8. package/dist/{main-f5rfs18m.mjs → main-0tr21dqs.mjs} +18 -18
  9. package/dist/{main-5nns3hew.mjs → main-16tqhq5g.mjs} +1 -1
  10. package/dist/{main-84masb5k.mjs → main-32h1fmkw.mjs} +3 -3
  11. package/dist/{main-rtsm881v.mjs → main-3g0xky5y.mjs} +5 -5
  12. package/dist/{main-9bk4pprj.mjs → main-3mhynene.mjs} +1 -1
  13. package/dist/{main-4dtt7gft.mjs → main-43k95nh0.mjs} +1 -1
  14. package/dist/{main-nd3q2tgb.mjs → main-63xjd6ts.mjs} +2 -2
  15. package/dist/{main-jde7rd73.mjs → main-8k9qykpa.mjs} +3 -3
  16. package/dist/{main-8114va9r.mjs → main-99dxg777.mjs} +4 -4
  17. package/dist/{main-905p32ds.mjs → main-apebcva2.mjs} +3 -3
  18. package/dist/main-dsx1pjp8.mjs +4 -0
  19. package/dist/{main-4vpxzxr5.mjs → main-e17wqzky.mjs} +2 -2
  20. package/dist/{main-v6hzbxjd.mjs → main-f98q5tcf.mjs} +12 -12
  21. package/dist/{main-jf7jberd.mjs → main-s3g4jwx5.mjs} +41 -41
  22. package/dist/{main-xycdhwqs.mjs → main-wpt5ha44.mjs} +23 -23
  23. package/dist/{mcp-5ew0wby9.mjs → mcp-85av73hq.mjs} +61 -61
  24. package/dist/{migrate-s88qjtc8.mjs → migrate-1vqatsz2.mjs} +4 -4
  25. package/dist/{relay-tw3t5jpf.mjs → relay-xkw8xs4k.mjs} +7168 -6654
  26. package/dist/{runtime-update-htnbyjxn.mjs → runtime-update-ny5cgrba.mjs} +7 -7
  27. package/dist/{setup-0s98jsfn.mjs → setup-18revp9m.mjs} +7 -7
  28. package/dist/{skill-text-t7f2b8m7.mjs → skill-text-z1pce87x.mjs} +27 -6
  29. package/dist/{supervisor-k6wbp9ch.mjs → supervisor-93fvdjav.mjs} +3 -3
  30. package/dist/{update-7r0y0tbk.mjs → update-y6xqxqww.mjs} +3 -3
  31. package/dist/{version-h67b69y6.mjs → version-ngzs1vvq.mjs} +1 -1
  32. package/package.json +1 -1
  33. package/skills/browse/SKILL.md +27 -6
  34. package/dist/main-njw3wxwk.mjs +0 -4
@@ -1,6 +1,6 @@
1
- import"./main-9bk4pprj.mjs";
1
+ import"./main-3mhynene.mjs";
2
2
  import"./main-pmfd055v.mjs";
3
- import"./main-njw3wxwk.mjs";
3
+ import"./main-dsx1pjp8.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-905p32ds.mjs";
21
+ } from "./main-apebcva2.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-f5rfs18m.mjs";
28
+ } from "./main-0tr21dqs.mjs";
29
29
  import"./main-4h7rfhhr.mjs";
30
- import"./main-jf7jberd.mjs";
31
- import"./main-5nns3hew.mjs";
30
+ import"./main-s3g4jwx5.mjs";
31
+ import"./main-16tqhq5g.mjs";
32
32
  import {
33
33
  succeed6,
34
34
  gen,
@@ -36,7 +36,7 @@ import {
36
36
  catch_,
37
37
  provide3,
38
38
  runPromise
39
- } from "./main-xycdhwqs.mjs";
39
+ } from "./main-wpt5ha44.mjs";
40
40
 
41
41
  // src/update/runtime-update.ts
42
42
  var log = (line) => process.stdout.write(line + `
@@ -63,11 +63,11 @@ import {
63
63
  installRuntime,
64
64
  installedRuntime,
65
65
  manualMcpEntry
66
- } from "./main-84masb5k.mjs";
66
+ } from "./main-32h1fmkw.mjs";
67
67
  import"./main-pmfd055v.mjs";
68
68
  import {
69
69
  opencodeBrowserBuildId2
70
- } from "./main-njw3wxwk.mjs";
70
+ } from "./main-dsx1pjp8.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-905p32ds.mjs";
87
+ } from "./main-apebcva2.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-4dtt7gft.mjs";
101
+ } from "./main-43k95nh0.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-jde7rd73.mjs";
110
+ } from "./main-8k9qykpa.mjs";
111
111
  import {
112
112
  parseHostname,
113
113
  readRelayConfig,
114
114
  writeRelayConfig,
115
115
  syncDevExtension
116
- } from "./main-nd3q2tgb.mjs";
116
+ } from "./main-63xjd6ts.mjs";
117
117
  import {
118
118
  relayAuthorization
119
- } from "./main-5nns3hew.mjs";
119
+ } from "./main-16tqhq5g.mjs";
120
120
 
121
121
  // src/setup.ts
122
122
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -120,12 +120,25 @@ Useful inspection helpers:
120
120
  one-time-code and card fields (\`autocomplete\` \`cc-number\`, \`cc-csc\`,
121
121
  \`cc-exp*\`); other readonly fields show their value, so a generated address or
122
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
123
+ readonly. Visible iframes appear as \`iframe\` lines with their own documents
124
+ nested under them, same-origin and cross-origin alike, up to 8 frames three
125
+ levels deep; iframe elements under 20px in both directions are skipped. So a
126
+ dialog whose form lives in a payment iframe is readable without
127
+ \`page.frames()\`; pass \`snapshot({ frames: false })\` to leave iframe content
128
+ out. \`snapshot({ find: /checkout/i, context: 2 })\` searches it, and
124
129
  \`snapshot({ diff: true })\` or \`{ delta: true }\` reports changes.
125
- - \`ref("e12")\` resolves a control from the latest snapshot. Refs fail closed
126
- after navigation or incompatible DOM drift; compatible refs keep their ids.
130
+ - \`ref("e12")\` resolves a control from the latest snapshot, including controls
131
+ inside an iframe: those refs resolve in that frame and fail closed when the
132
+ frame navigates. Refs fail closed after navigation or incompatible DOM drift;
133
+ compatible refs keep their ids. \`snapshot({ within: page.frameLocator(...) })\`
134
+ captures a frame and its refs resolve there.
127
135
  - \`ariaSnapshot(target?, { timeout })\` returns Playwright's detailed YAML tree
128
- when the compact snapshot omits needed structure.
136
+ when the compact snapshot omits needed structure. The tree keeps Playwright's
137
+ anonymous \`- iframe\` lines, and each iframe's document follows it as a
138
+ labelled block in document order (\`- iframe "name" [src=host]:\`, with nested
139
+ frames as further labelled blocks). It applies the same value hiding in
140
+ every frame; a frame it cannot read becomes a note, and if it cannot confirm
141
+ that redaction was removed the call fails rather than return values.
129
142
  - \`screenshotWithLabels({ page?, path? })\` adds visual labels when layout
130
143
  matters and registers its labels for \`ref()\`.
131
144
  - \`screenshotDiff({ baseline, path?, threshold?, fullPage? })\` compares a saved
@@ -267,6 +280,14 @@ Cookie access is limited to the hosts of the session's pages, and
267
280
  \`page.bringToFront()\` is refused because it raises the user's window; use
268
281
  \`handoff()\` when the user needs to act.
269
282
 
283
+ Clipboard calls in a frame need that frame focused: in the same \`frame.evaluate\`,
284
+ call \`window.focus()\` before \`navigator.clipboard\` (or click in the frame first).
285
+ A cross-origin iframe also needs \`allow="clipboard-write"\` (or \`clipboard-read\`)
286
+ from its parent; without it Chrome refuses the call and nothing in the frame can
287
+ fix that, so write from the top page or read the value from the DOM instead.
288
+ Clipboard reads usually ask the user for permission, so use \`handoff()\` or avoid
289
+ them. \`context.grantPermissions()\` is refused, so don't try it.
290
+
270
291
  The page's console messages and uncaught errors are off by default because
271
292
  capturing them lets the page detect a debugger. Turn them on for one page when
272
293
  debugging, then turn them off:
@@ -321,8 +342,8 @@ Never globally auto-accept native dialogs.
321
342
 
322
343
  browse refuses navigations to \`file:\`, \`chrome:\`, \`chrome-extension:\`,
323
344
  \`devtools:\` and \`view-source:\` URLs, and blocks CDP commands that would destroy
324
- shared browser state, including browser close and cookie/cache clearing. Never
325
- work around those guardrails.
345
+ shared browser state, including browser close, cookie/cache clearing, and
346
+ granting or changing site permissions. Never work around those guardrails.
326
347
 
327
348
  Every execute is journaled under \`<state root>/sessions/<id>/journal.jsonl\`
328
349
  (\`~/.local/state/browse\` on macOS and Linux). Never place credentials
@@ -1,10 +1,10 @@
1
1
  import"./main-pmfd055v.mjs";
2
- import"./main-njw3wxwk.mjs";
2
+ import"./main-dsx1pjp8.mjs";
3
3
  import {
4
4
  entrySpawnCommand,
5
5
  installedRuntime2,
6
6
  installedVersion
7
- } from "./main-905p32ds.mjs";
7
+ } from "./main-apebcva2.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-5834k85r.mjs");
38
+ const { runCli } = await import("./cli-k6tgme5c.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-4vpxzxr5.mjs";
7
+ } from "./main-e17wqzky.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-905p32ds.mjs";
9
+ import"./main-apebcva2.mjs";
10
10
  import"./main-pmfd055v.mjs";
11
- import"./main-njw3wxwk.mjs";
11
+ import"./main-dsx1pjp8.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-njw3wxwk.mjs";
4
+ } from "./main-dsx1pjp8.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.168",
3
+ "version": "0.0.17-dev.170",
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",
@@ -119,12 +119,25 @@ Useful inspection helpers:
119
119
  one-time-code and card fields (`autocomplete` `cc-number`, `cc-csc`,
120
120
  `cc-exp*`); other readonly fields show their value, so a generated address or
121
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
122
+ readonly. Visible iframes appear as `iframe` lines with their own documents
123
+ nested under them, same-origin and cross-origin alike, up to 8 frames three
124
+ levels deep; iframe elements under 20px in both directions are skipped. So a
125
+ dialog whose form lives in a payment iframe is readable without
126
+ `page.frames()`; pass `snapshot({ frames: false })` to leave iframe content
127
+ out. `snapshot({ find: /checkout/i, context: 2 })` searches it, and
123
128
  `snapshot({ diff: true })` or `{ delta: true }` reports changes.
124
- - `ref("e12")` resolves a control from the latest snapshot. Refs fail closed
125
- after navigation or incompatible DOM drift; compatible refs keep their ids.
129
+ - `ref("e12")` resolves a control from the latest snapshot, including controls
130
+ inside an iframe: those refs resolve in that frame and fail closed when the
131
+ frame navigates. Refs fail closed after navigation or incompatible DOM drift;
132
+ compatible refs keep their ids. `snapshot({ within: page.frameLocator(...) })`
133
+ captures a frame and its refs resolve there.
126
134
  - `ariaSnapshot(target?, { timeout })` returns Playwright's detailed YAML tree
127
- when the compact snapshot omits needed structure.
135
+ when the compact snapshot omits needed structure. The tree keeps Playwright's
136
+ anonymous `- iframe` lines, and each iframe's document follows it as a
137
+ labelled block in document order (`- iframe "name" [src=host]:`, with nested
138
+ frames as further labelled blocks). It applies the same value hiding in
139
+ every frame; a frame it cannot read becomes a note, and if it cannot confirm
140
+ that redaction was removed the call fails rather than return values.
128
141
  - `screenshotWithLabels({ page?, path? })` adds visual labels when layout
129
142
  matters and registers its labels for `ref()`.
130
143
  - `screenshotDiff({ baseline, path?, threshold?, fullPage? })` compares a saved
@@ -266,6 +279,14 @@ Cookie access is limited to the hosts of the session's pages, and
266
279
  `page.bringToFront()` is refused because it raises the user's window; use
267
280
  `handoff()` when the user needs to act.
268
281
 
282
+ Clipboard calls in a frame need that frame focused: in the same `frame.evaluate`,
283
+ call `window.focus()` before `navigator.clipboard` (or click in the frame first).
284
+ A cross-origin iframe also needs `allow="clipboard-write"` (or `clipboard-read`)
285
+ from its parent; without it Chrome refuses the call and nothing in the frame can
286
+ fix that, so write from the top page or read the value from the DOM instead.
287
+ Clipboard reads usually ask the user for permission, so use `handoff()` or avoid
288
+ them. `context.grantPermissions()` is refused, so don't try it.
289
+
269
290
  The page's console messages and uncaught errors are off by default because
270
291
  capturing them lets the page detect a debugger. Turn them on for one page when
271
292
  debugging, then turn them off:
@@ -320,8 +341,8 @@ Never globally auto-accept native dialogs.
320
341
 
321
342
  browse refuses navigations to `file:`, `chrome:`, `chrome-extension:`,
322
343
  `devtools:` and `view-source:` URLs, and blocks CDP commands that would destroy
323
- shared browser state, including browser close and cookie/cache clearing. Never
324
- work around those guardrails.
344
+ shared browser state, including browser close, cookie/cache clearing, and
345
+ granting or changing site permissions. Never work around those guardrails.
325
346
 
326
347
  Every execute is journaled under `<state root>/sessions/<id>/journal.jsonl`
327
348
  (`~/.local/state/browse` on macOS and Linux). Never place credentials
@@ -1,4 +0,0 @@
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 };