@opencode/browse 0.0.17-dev.168 → 0.0.17-dev.169
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.
- package/dist/{cli-5834k85r.mjs → cli-zx7g8fek.mjs} +12 -12
- package/dist/cli.mjs +12 -12
- package/dist/{helpers-xaj2ycfy.mjs → helpers-nxtpzjhw.mjs} +1 -1
- package/dist/{legacy-runtime-34dh85e3.mjs → legacy-runtime-rvcn5zs6.mjs} +4 -4
- package/dist/{main-84masb5k.mjs → main-6k1dq78p.mjs} +3 -3
- package/dist/main-9xbcy9q0.mjs +4 -0
- package/dist/{main-4dtt7gft.mjs → main-dwjfhfpm.mjs} +1 -1
- package/dist/{main-f5rfs18m.mjs → main-fs2ymcvd.mjs} +3 -3
- package/dist/{main-905p32ds.mjs → main-gbq7c729.mjs} +3 -3
- package/dist/{main-4vpxzxr5.mjs → main-h55dwr1s.mjs} +2 -2
- package/dist/{main-8114va9r.mjs → main-m3xnn0cx.mjs} +2 -2
- package/dist/{main-rtsm881v.mjs → main-rvmzfmb7.mjs} +2 -2
- package/dist/{main-jde7rd73.mjs → main-sx7qpdfw.mjs} +1 -1
- package/dist/{main-5nns3hew.mjs → main-w80ghbx8.mjs} +1 -1
- package/dist/{main-nd3q2tgb.mjs → main-wf904nhj.mjs} +2 -2
- package/dist/{mcp-5ew0wby9.mjs → mcp-37b0xgq0.mjs} +8 -8
- package/dist/{migrate-s88qjtc8.mjs → migrate-49s4pykq.mjs} +4 -4
- package/dist/{relay-tw3t5jpf.mjs → relay-jkgh5rzg.mjs} +7071 -6602
- package/dist/{runtime-update-htnbyjxn.mjs → runtime-update-9d3dsv6t.mjs} +4 -4
- package/dist/{setup-0s98jsfn.mjs → setup-74nz1gqg.mjs} +7 -7
- package/dist/{skill-text-t7f2b8m7.mjs → skill-text-z1pce87x.mjs} +27 -6
- package/dist/{supervisor-k6wbp9ch.mjs → supervisor-5pjptkgz.mjs} +3 -3
- package/dist/{update-7r0y0tbk.mjs → update-n4sw8eht.mjs} +3 -3
- package/dist/{version-h67b69y6.mjs → version-2cadxvsa.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +27 -6
- package/dist/main-njw3wxwk.mjs +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import"./main-9bk4pprj.mjs";
|
|
2
2
|
import"./main-pmfd055v.mjs";
|
|
3
|
-
import"./main-
|
|
3
|
+
import"./main-9xbcy9q0.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-
|
|
21
|
+
} from "./main-gbq7c729.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-
|
|
28
|
+
} from "./main-fs2ymcvd.mjs";
|
|
29
29
|
import"./main-4h7rfhhr.mjs";
|
|
30
30
|
import"./main-jf7jberd.mjs";
|
|
31
|
-
import"./main-
|
|
31
|
+
import"./main-w80ghbx8.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-
|
|
66
|
+
} from "./main-6k1dq78p.mjs";
|
|
67
67
|
import"./main-pmfd055v.mjs";
|
|
68
68
|
import {
|
|
69
69
|
opencodeBrowserBuildId2
|
|
70
|
-
} from "./main-
|
|
70
|
+
} from "./main-9xbcy9q0.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-
|
|
87
|
+
} from "./main-gbq7c729.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-
|
|
101
|
+
} from "./main-dwjfhfpm.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-
|
|
110
|
+
} from "./main-sx7qpdfw.mjs";
|
|
111
111
|
import {
|
|
112
112
|
parseHostname,
|
|
113
113
|
readRelayConfig,
|
|
114
114
|
writeRelayConfig,
|
|
115
115
|
syncDevExtension
|
|
116
|
-
} from "./main-
|
|
116
|
+
} from "./main-wf904nhj.mjs";
|
|
117
117
|
import {
|
|
118
118
|
relayAuthorization
|
|
119
|
-
} from "./main-
|
|
119
|
+
} from "./main-w80ghbx8.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.
|
|
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
|
|
126
|
-
|
|
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
|
|
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-
|
|
2
|
+
import"./main-9xbcy9q0.mjs";
|
|
3
3
|
import {
|
|
4
4
|
entrySpawnCommand,
|
|
5
5
|
installedRuntime2,
|
|
6
6
|
installedVersion
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-gbq7c729.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-
|
|
38
|
+
const { runCli } = await import("./cli-zx7g8fek.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-
|
|
7
|
+
} from "./main-h55dwr1s.mjs";
|
|
8
8
|
import"./main-b3jrctcx.mjs";
|
|
9
|
-
import"./main-
|
|
9
|
+
import"./main-gbq7c729.mjs";
|
|
10
10
|
import"./main-pmfd055v.mjs";
|
|
11
|
-
import"./main-
|
|
11
|
+
import"./main-9xbcy9q0.mjs";
|
|
12
12
|
export {
|
|
13
13
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
14
14
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/skills/browse/SKILL.md
CHANGED
|
@@ -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.
|
|
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
|
|
125
|
-
|
|
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
|
|
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
|
package/dist/main-njw3wxwk.mjs
DELETED