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

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-k6tgme5c.mjs → cli-bgsndmk3.mjs} +12 -12
  2. package/dist/cli.mjs +12 -12
  3. package/dist/{helpers-g8dsh6s5.mjs → helpers-58105m1j.mjs} +1 -1
  4. package/dist/{legacy-runtime-jj1srsz7.mjs → legacy-runtime-897mfrrg.mjs} +4 -4
  5. package/dist/{main-e17wqzky.mjs → main-1k2c2ysm.mjs} +2 -2
  6. package/dist/{main-apebcva2.mjs → main-8nvvaw37.mjs} +3 -3
  7. package/dist/{main-16tqhq5g.mjs → main-a7ym6xse.mjs} +1 -1
  8. package/dist/main-ezvw6bdp.mjs +4 -0
  9. package/dist/{main-43k95nh0.mjs → main-fezz88pf.mjs} +1 -1
  10. package/dist/{main-99dxg777.mjs → main-pc6r231b.mjs} +2 -2
  11. package/dist/{main-32h1fmkw.mjs → main-pp3m0bqv.mjs} +3 -3
  12. package/dist/{main-8k9qykpa.mjs → main-swjwyj9k.mjs} +1 -1
  13. package/dist/{main-3g0xky5y.mjs → main-ytaan398.mjs} +2 -2
  14. package/dist/{main-0tr21dqs.mjs → main-z2s3g2jd.mjs} +3 -3
  15. package/dist/{main-63xjd6ts.mjs → main-zc7snhsf.mjs} +2 -2
  16. package/dist/{mcp-85av73hq.mjs → mcp-0et3j7sb.mjs} +7 -7
  17. package/dist/{migrate-1vqatsz2.mjs → migrate-fknwf3s1.mjs} +4 -4
  18. package/dist/{relay-xkw8xs4k.mjs → relay-ebsaj9bt.mjs} +414 -57
  19. package/dist/{runtime-update-ny5cgrba.mjs → runtime-update-z51y0yav.mjs} +4 -4
  20. package/dist/{setup-18revp9m.mjs → setup-z4ezv7ht.mjs} +7 -7
  21. package/dist/{skill-text-z1pce87x.mjs → skill-text-q7e8fafn.mjs} +18 -3
  22. package/dist/{supervisor-93fvdjav.mjs → supervisor-h2gzmqar.mjs} +3 -3
  23. package/dist/{update-y6xqxqww.mjs → update-sb64ka4c.mjs} +3 -3
  24. package/dist/{version-ngzs1vvq.mjs → version-c4p8fkj3.mjs} +1 -1
  25. package/package.json +1 -1
  26. package/skills/browse/SKILL.md +18 -3
  27. package/dist/main-dsx1pjp8.mjs +0 -4
@@ -1,6 +1,6 @@
1
1
  import"./main-3mhynene.mjs";
2
2
  import"./main-pmfd055v.mjs";
3
- import"./main-dsx1pjp8.mjs";
3
+ import"./main-ezvw6bdp.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-apebcva2.mjs";
21
+ } from "./main-8nvvaw37.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-0tr21dqs.mjs";
28
+ } from "./main-z2s3g2jd.mjs";
29
29
  import"./main-4h7rfhhr.mjs";
30
30
  import"./main-s3g4jwx5.mjs";
31
- import"./main-16tqhq5g.mjs";
31
+ import"./main-a7ym6xse.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-32h1fmkw.mjs";
66
+ } from "./main-pp3m0bqv.mjs";
67
67
  import"./main-pmfd055v.mjs";
68
68
  import {
69
69
  opencodeBrowserBuildId2
70
- } from "./main-dsx1pjp8.mjs";
70
+ } from "./main-ezvw6bdp.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-apebcva2.mjs";
87
+ } from "./main-8nvvaw37.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-43k95nh0.mjs";
101
+ } from "./main-fezz88pf.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-8k9qykpa.mjs";
110
+ } from "./main-swjwyj9k.mjs";
111
111
  import {
112
112
  parseHostname,
113
113
  readRelayConfig,
114
114
  writeRelayConfig,
115
115
  syncDevExtension
116
- } from "./main-63xjd6ts.mjs";
116
+ } from "./main-zc7snhsf.mjs";
117
117
  import {
118
118
  relayAuthorization
119
- } from "./main-16tqhq5g.mjs";
119
+ } from "./main-a7ym6xse.mjs";
120
120
 
121
121
  // src/setup.ts
122
122
  import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
@@ -130,8 +130,10 @@ Useful inspection helpers:
130
130
  - \`ref("e12")\` resolves a control from the latest snapshot, including controls
131
131
  inside an iframe: those refs resolve in that frame and fail closed when the
132
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.
133
+ compatible refs keep their ids. An action on a ref whose control was renamed,
134
+ removed or re-rendered fails within a few seconds and says what changed; call
135
+ \`snapshot()\` again. \`snapshot({ within: page.frameLocator(...) })\` captures a
136
+ frame and its refs resolve there.
135
137
  - \`ariaSnapshot(target?, { timeout })\` returns Playwright's detailed YAML tree
136
138
  when the compact snapshot omits needed structure. The tree keeps Playwright's
137
139
  anonymous \`- iframe\` lines, and each iframe's document follows it as a
@@ -241,6 +243,12 @@ values between calls on \`state\`. A single run without an \`await\` is stopped
241
243
  about 2 seconds; split heavy loops with
242
244
  \`await new Promise(r => setTimeout(r, 0))\` or do the work in the page.
243
245
 
246
+ \`execute\`'s \`timeoutMs\` (MCP) / \`--timeout-ms\` (CLI) is the whole-script
247
+ deadline, 60 seconds by default and paused during \`handoff()\`; \`0\` disables it.
248
+ When you set it (or the relay sets \`OPENCODE_BROWSER_EXECUTE_TIMEOUT_MS\`),
249
+ Playwright actions and navigations get the same budget, at least 30 seconds;
250
+ without either they keep Playwright's 30-second default.
251
+
244
252
  Await promises: a rejection with no handler never stops the relay. A running call
245
253
  gets the error; a later one resets the realm and warns on the next call (a
246
254
  one-shot \`--rm\` session is already gone). Full Node mode has no realm to reset.
@@ -286,7 +294,14 @@ A cross-origin iframe also needs \`allow="clipboard-write"\` (or \`clipboard-rea
286
294
  from its parent; without it Chrome refuses the call and nothing in the frame can
287
295
  fix that, so write from the top page or read the value from the DOM instead.
288
296
  Clipboard reads usually ask the user for permission, so use \`handoff()\` or avoid
289
- them. \`context.grantPermissions()\` is refused, so don't try it.
297
+ them. Permission grants are refused (\`context.grantPermissions()\`,
298
+ \`context.clearPermissions()\`, \`Browser.grantPermissions\`, \`Browser.setPermission\`,
299
+ \`Browser.resetPermissions\`), so don't try them.
300
+
301
+ \`page.setViewportSize({ width, height })\` emulates a viewport inside the user's
302
+ window: the tab is letterboxed while it is set, and browse clears the override
303
+ when the script ends (within a couple of seconds), so the tab returns to the
304
+ window's size. Don't rely on the size carrying over to the next \`execute\`.
290
305
 
291
306
  The page's console messages and uncaught errors are off by default because
292
307
  capturing them lets the page detect a debugger. Turn them on for one page when
@@ -1,10 +1,10 @@
1
1
  import"./main-pmfd055v.mjs";
2
- import"./main-dsx1pjp8.mjs";
2
+ import"./main-ezvw6bdp.mjs";
3
3
  import {
4
4
  entrySpawnCommand,
5
5
  installedRuntime2,
6
6
  installedVersion
7
- } from "./main-apebcva2.mjs";
7
+ } from "./main-8nvvaw37.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-k6tgme5c.mjs");
38
+ const { runCli } = await import("./cli-bgsndmk3.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-e17wqzky.mjs";
7
+ } from "./main-1k2c2ysm.mjs";
8
8
  import"./main-b3jrctcx.mjs";
9
- import"./main-apebcva2.mjs";
9
+ import"./main-8nvvaw37.mjs";
10
10
  import"./main-pmfd055v.mjs";
11
- import"./main-dsx1pjp8.mjs";
11
+ import"./main-ezvw6bdp.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-dsx1pjp8.mjs";
4
+ } from "./main-ezvw6bdp.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.170",
3
+ "version": "0.0.17-dev.172",
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",
@@ -129,8 +129,10 @@ Useful inspection helpers:
129
129
  - `ref("e12")` resolves a control from the latest snapshot, including controls
130
130
  inside an iframe: those refs resolve in that frame and fail closed when the
131
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.
132
+ compatible refs keep their ids. An action on a ref whose control was renamed,
133
+ removed or re-rendered fails within a few seconds and says what changed; call
134
+ `snapshot()` again. `snapshot({ within: page.frameLocator(...) })` captures a
135
+ frame and its refs resolve there.
134
136
  - `ariaSnapshot(target?, { timeout })` returns Playwright's detailed YAML tree
135
137
  when the compact snapshot omits needed structure. The tree keeps Playwright's
136
138
  anonymous `- iframe` lines, and each iframe's document follows it as a
@@ -240,6 +242,12 @@ values between calls on `state`. A single run without an `await` is stopped afte
240
242
  about 2 seconds; split heavy loops with
241
243
  `await new Promise(r => setTimeout(r, 0))` or do the work in the page.
242
244
 
245
+ `execute`'s `timeoutMs` (MCP) / `--timeout-ms` (CLI) is the whole-script
246
+ deadline, 60 seconds by default and paused during `handoff()`; `0` disables it.
247
+ When you set it (or the relay sets `OPENCODE_BROWSER_EXECUTE_TIMEOUT_MS`),
248
+ Playwright actions and navigations get the same budget, at least 30 seconds;
249
+ without either they keep Playwright's 30-second default.
250
+
243
251
  Await promises: a rejection with no handler never stops the relay. A running call
244
252
  gets the error; a later one resets the realm and warns on the next call (a
245
253
  one-shot `--rm` session is already gone). Full Node mode has no realm to reset.
@@ -285,7 +293,14 @@ A cross-origin iframe also needs `allow="clipboard-write"` (or `clipboard-read`)
285
293
  from its parent; without it Chrome refuses the call and nothing in the frame can
286
294
  fix that, so write from the top page or read the value from the DOM instead.
287
295
  Clipboard reads usually ask the user for permission, so use `handoff()` or avoid
288
- them. `context.grantPermissions()` is refused, so don't try it.
296
+ them. Permission grants are refused (`context.grantPermissions()`,
297
+ `context.clearPermissions()`, `Browser.grantPermissions`, `Browser.setPermission`,
298
+ `Browser.resetPermissions`), so don't try them.
299
+
300
+ `page.setViewportSize({ width, height })` emulates a viewport inside the user's
301
+ window: the tab is letterboxed while it is set, and browse clears the override
302
+ when the script ends (within a couple of seconds), so the tab returns to the
303
+ window's size. Don't rely on the size carrying over to the next `execute`.
289
304
 
290
305
  The page's console messages and uncaught errors are off by default because
291
306
  capturing them lets the page detect a debugger. Turn them on for one page when
@@ -1,4 +0,0 @@
1
- // src/version.ts
2
- var opencodeBrowserVersion2 = "0.0.17-dev.170";
3
- var opencodeBrowserBuildId2 = "2026-11-10T21:01:43.297Z";
4
- export { opencodeBrowserVersion2, opencodeBrowserBuildId2 };