@opencode/browse 0.0.6-dev.27 → 0.0.6-dev.32

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 (31) hide show
  1. package/dist/THIRD_PARTY_NOTICES.txt +310 -0
  2. package/dist/Undici-88kyhfpm.mjs +25295 -0
  3. package/dist/cli-pazs0vgt.mjs +6694 -0
  4. package/dist/cli.mjs +10 -10
  5. package/dist/{helpers-zeewknn2.mjs → helpers-1afz3xb6.mjs} +2 -1
  6. package/dist/index-yghakpfn.mjs +12 -0
  7. package/dist/{main-bq8az9yr.mjs → main-30dkfffj.mjs} +5 -4
  8. package/dist/{main-3g2t8jtq.mjs → main-3w449766.mjs} +9 -9
  9. package/dist/main-9z6jbwdp.mjs +14661 -0
  10. package/dist/main-aqzas8ts.mjs +1775 -0
  11. package/dist/main-brs53cap.mjs +205 -0
  12. package/dist/{main-a6mpfd6z.mjs → main-ea9djgtm.mjs} +2 -2
  13. package/dist/main-k9drabmz.mjs +4 -0
  14. package/dist/{main-cxrsjs2z.mjs → main-q641ckf5.mjs} +1443 -559
  15. package/dist/{main-a4yj9bpn.mjs → main-va90zea2.mjs} +30 -20
  16. package/dist/main-yf9xhpn4.mjs +290 -0
  17. package/dist/{main-x96gxahz.mjs → main-yxvg4ms6.mjs} +2 -2
  18. package/dist/mcp-4v2gsdr7.mjs +8515 -0
  19. package/dist/{relay-xqg264d4.mjs → relay-sxbxskww.mjs} +766 -1789
  20. package/dist/{runtime-update-gteb0gp8.mjs → runtime-update-tksdpg29.mjs} +22 -11
  21. package/dist/{setup-zka6z53q.mjs → setup-92ht2epc.mjs} +10 -40
  22. package/dist/{skill-text-kyjcembk.mjs → skill-text-rc6te209.mjs} +0 -75
  23. package/dist/{supervisor-w6hs0gbw.mjs → supervisor-0afrkpjb.mjs} +3 -3
  24. package/dist/{update-pj25xbh4.mjs → update-vv7x6c6j.mjs} +3 -3
  25. package/dist/{version-1hb8s8jj.mjs → version-pvx4s3qg.mjs} +1 -1
  26. package/package.json +4 -3
  27. package/skills/browse/SKILL.md +0 -75
  28. package/dist/cli-n0qhph13.mjs +0 -1853
  29. package/dist/main-vp3devjb.mjs +0 -4
  30. package/dist/main-xzc7qp1c.mjs +0 -1440
  31. package/dist/mcp-za7ymfdd.mjs +0 -972
@@ -1,4 +1,4 @@
1
- import"./main-vp3devjb.mjs";
1
+ import"./main-k9drabmz.mjs";
2
2
  import {
3
3
  cliCommand,
4
4
  installCommand,
@@ -17,18 +17,29 @@ import {
17
17
  installVersion,
18
18
  pruneVersions,
19
19
  switchVersion
20
- } from "./main-a6mpfd6z.mjs";
20
+ } from "./main-ea9djgtm.mjs";
21
21
  import"./main-3gthmkzw.mjs";
22
22
  import {
23
23
  Service,
24
24
  layerFetch,
25
25
  restartRelay,
26
26
  startManagedRelay
27
- } from "./main-xzc7qp1c.mjs";
28
- import"./main-bq8az9yr.mjs";
27
+ } from "./main-aqzas8ts.mjs";
28
+ import"./main-30dkfffj.mjs";
29
+ import {
30
+ succeed6,
31
+ suspend2,
32
+ sync2,
33
+ void_3,
34
+ gen,
35
+ andThen,
36
+ result,
37
+ catch_,
38
+ provide3,
39
+ runPromise
40
+ } from "./main-9z6jbwdp.mjs";
29
41
 
30
42
  // src/update/runtime-update.ts
31
- import { Effect } from "effect";
32
43
  import { existsSync } from "node:fs";
33
44
  var log = (line) => process.stdout.write(line + `
34
45
  `);
@@ -38,13 +49,13 @@ async function switchTo(layout, version, options) {
38
49
  return `${version} isn't installed`;
39
50
  const before = readCurrent(layout);
40
51
  let switched = false;
41
- const point = Effect.sync(() => {
52
+ const point = sync2(() => {
42
53
  switchVersion(layout, version, options.previous);
43
54
  switched = true;
44
55
  });
45
- const program = Effect.gen(function* () {
56
+ const program = gen(function* () {
46
57
  const relay = yield* Service;
47
- const running = yield* Effect.result(relay.version);
58
+ const running = yield* result(relay.version);
48
59
  if (running._tag === "Failure") {
49
60
  yield* point;
50
61
  return;
@@ -55,12 +66,12 @@ async function switchTo(layout, version, options) {
55
66
  force: options.force,
56
67
  otherBuild: true,
57
68
  onShutdownAccepted: point,
58
- start: Effect.suspend(() => switched ? Effect.void : point).pipe(Effect.andThen(startManagedRelay(entry)))
69
+ start: suspend2(() => switched ? void_3 : point).pipe(andThen(startManagedRelay(entry)))
59
70
  });
60
71
  const now = yield* relay.version;
61
72
  return now.version === version ? undefined : `a relay of version ${now.version} started first`;
62
- }).pipe(Effect.provide(layerFetch));
63
- const refused = await Effect.runPromise(program.pipe(Effect.catch((error) => Effect.succeed(error.message ?? String(error)))));
73
+ }).pipe(provide3(layerFetch));
74
+ const refused = await runPromise(program.pipe(catch_((error) => succeed6(error.message ?? String(error)))));
64
75
  if (refused && switched && before)
65
76
  writeCurrent(layout, before);
66
77
  return refused;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  opencodeBrowserVersion2
3
- } from "./main-vp3devjb.mjs";
3
+ } from "./main-k9drabmz.mjs";
4
4
  import {
5
5
  dataRoot,
6
6
  oldStoreMarker,
@@ -25,10 +25,10 @@ import {
25
25
  installVersion,
26
26
  pruneVersions,
27
27
  switchVersion
28
- } from "./main-a6mpfd6z.mjs";
28
+ } from "./main-ea9djgtm.mjs";
29
29
  import {
30
30
  relayAuthorization
31
- } from "./main-bq8az9yr.mjs";
31
+ } from "./main-30dkfffj.mjs";
32
32
  import {
33
33
  parseHostname,
34
34
  readRelayConfig,
@@ -45,47 +45,17 @@ import {
45
45
  legacyPairingCode,
46
46
  removeLegacyPairingCode,
47
47
  syncDevExtension
48
- } from "./main-3g2t8jtq.mjs";
48
+ } from "./main-3w449766.mjs";
49
49
  import {
50
50
  unpackedExtensionId,
51
51
  extensionProtocolSkew,
52
52
  extensionProtocolAdvice
53
53
  } from "./main-3gthmkzw.mjs";
54
- import { createRequire } from "node:module";
55
- var __create = Object.create;
56
- var __getProtoOf = Object.getPrototypeOf;
57
- var __defProp = Object.defineProperty;
58
- var __getOwnPropNames = Object.getOwnPropertyNames;
59
- var __hasOwnProp = Object.prototype.hasOwnProperty;
60
- function __accessProp(key) {
61
- return this[key];
62
- }
63
- var __toESMCache_node;
64
- var __toESMCache_esm;
65
- var __toESM = (mod, isNodeMode, target) => {
66
- var canCache = mod != null && typeof mod === "object";
67
- if (canCache) {
68
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
69
- var cached = cache.get(mod);
70
- if (cached)
71
- return cached;
72
- }
73
- target = mod != null ? __create(__getProtoOf(mod)) : {};
74
- const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
75
- if (mod && typeof mod === "object" || typeof mod === "function") {
76
- for (let key of __getOwnPropNames(mod))
77
- if (!__hasOwnProp.call(to, key))
78
- __defProp(to, key, {
79
- get: __accessProp.bind(mod, key),
80
- enumerable: true
81
- });
82
- }
83
- if (canCache)
84
- cache.set(mod, to);
85
- return to;
86
- };
87
- var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
88
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
54
+ import {
55
+ __toESM,
56
+ __commonJS,
57
+ __require
58
+ } from "./main-yf9xhpn4.mjs";
89
59
 
90
60
  // node_modules/sisteransi/src/index.js
91
61
  var require_src = __commonJS(function(exports, module) {
@@ -12081,7 +12051,7 @@ async function runSetup(command, args) {
12081
12051
  if (command === "set")
12082
12052
  return set(args);
12083
12053
  if (command === "rollback") {
12084
- const { runRollback } = await import("./runtime-update-gteb0gp8.mjs");
12054
+ const { runRollback } = await import("./runtime-update-tksdpg29.mjs");
12085
12055
  return runRollback(args);
12086
12056
  }
12087
12057
  }
@@ -581,81 +581,6 @@ secret in a session without an allowlist adds a loud warning: set one first.
581
581
  Once typed, the value is in the page, so don't read it back or copy it
582
582
  elsewhere.
583
583
 
584
- ### Signing in with Deadbolt
585
-
586
- When the user connected browse to Deadbolt (\`opencode-browser deadbolt
587
- connect\`), you can sign in with the logins they granted to agents, without
588
- seeing any value. \`secrets_list\` shows them for the session's allowed sites:
589
- title, username, \`granted\`, which \`fields\` (username, password, totp) and
590
- whether \`passkeys\` are allowed, plus the site's passkey accounts (\`username\`,
591
- \`displayName\`). Only the user grants, in Deadbolt: \`deadbolt agents allow
592
- <site>\` (everything for that site's logins: username, password, one-time code
593
- and passkeys, unless narrowed with \`--login\`, \`--fields\`, \`--no-passkeys\`,
594
- \`--expires\`) or
595
- \`deadbolt agents allow --all\` (every login).
596
- Never try to grant, pair or unlock yourself; Deadbolt refuses AI callers.
597
-
598
- Prefer the whole sign-in in one call (the \`signin\` tool, or in execute):
599
-
600
- \`\`\`js
601
- await page.goto("https://github.com/login")
602
- const result = await secrets.signIn() // or { site: "github.com", username: "me@example.com" }
603
- // { status: "signed_in" | "needs_user" | "not_granted" | "failed", step, reason }
604
- \`\`\`
605
-
606
- It fills the username, submits, waits, fills the password, types an
607
- authenticator (TOTP) code when the site asks for one (single field or split
608
- boxes), follows "Use password instead", and follows Sign in with Google when
609
- Deadbolt grants a Google login, all inside the relay. Then:
610
-
611
- - \`signed_in\`: carry on.
612
- - \`needs_user\`: a captcha, a code sent by SMS or email, a push approval, a
613
- new-device or "verify it's you" check, or Deadbolt is locked. Call
614
- \`handoff("Finish signing in, then click Continue")\` so the user does it.
615
- Don't retry in a loop.
616
- - \`needs_choice\`: several passkeys can sign in; \`choices\` lists their
617
- \`username\` / \`displayName\`. Ask the user which one if it isn't obvious, then
618
- call again with \`{ username }\`.
619
- - \`not_granted\`: tell the user what to allow (the reason names the site and
620
- login).
621
- - \`failed\`: the reason says why (no form found, wrong password, the page didn't
622
- move on). Don't loop.
623
-
624
- It doesn't handle security questions, image or canvas keypads, closed shadow
625
- roots, or sign-in providers other than Google; those return \`needs_user\` or
626
- \`failed\`. When it stops after a fill it empties the password and code fields
627
- first. For a form it misreads, type one value at a time: a username on its
628
- own, a password or code only with \`{ submit: true }\`, which types it, submits
629
- the form, waits for the page to move on and empties password and code fields
630
- in that frame, all in the same call:
631
-
632
- \`\`\`js
633
- await secrets.type("#login", "deadbolt:github.com/me@example.com", { field: "username" })
634
- await secrets.type("#password", "deadbolt:github.com/me@example.com", { submit: true }) // field defaults to "password"
635
- \`\`\`
636
-
637
- The same origin checks as stored secrets apply (the field's frame must be on
638
- the login's site and in the session allowlist; Deadbolt checks again), and
639
- values never appear in what you get back. Errors start with the code:
640
- \`submit_required\`, \`domain_not_allowed\`, \`not_granted\`, \`locked\`, \`forbidden\`
641
- (the user must reconnect), \`rate_limited\`, \`page_hooks\`. \`page_hooks\` means
642
- this session's code set up request interception or listeners
643
- (\`page.route\`, \`page.on("request")\`, \`waitForRequest\`...), init scripts,
644
- exposed functions or a CDP session: Deadbolt passwords and codes aren't typed
645
- then. Sign in first, in a fresh session (\`session_reset\`), and set those up
646
- afterwards. Never try to read or capture a value that was typed: the user
647
- grants logins on the understanding that you don't. Set a session allowlist
648
- before signing in.
649
-
650
- Passkeys: in tabs you opened, a site's passkey sign-in
651
- (\`navigator.credentials.get\`) is answered by Deadbolt when the grant allows
652
- passkeys. \`signIn({ username })\` picks that account's passkey; to choose one
653
- before your own click on a "Sign in with a passkey" button, call
654
- \`await secrets.usePasskey({ site: "example.com", username: "me@example.com" })\`
655
- (it applies to the tab's next passkey request, once). Deadbolt never verifies the user, so sites that require that fall back to
656
- other methods. Otherwise the request fails with NotAllowedError, as if the user
657
- dismissed it. WebAuthn CDP methods are blocked.
658
-
659
584
  For destructive UI work, use a two-phase **read, confirm, verify** flow:
660
585
 
661
586
  1. Read candidates and return exact stable identifiers or row text.
@@ -1,9 +1,9 @@
1
- import"./main-vp3devjb.mjs";
1
+ import"./main-k9drabmz.mjs";
2
2
  import {
3
3
  versionEntry,
4
4
  readCurrent,
5
5
  npmRuntime
6
- } from "./main-a6mpfd6z.mjs";
6
+ } from "./main-ea9djgtm.mjs";
7
7
 
8
8
  // src/mcp/supervisor.ts
9
9
  import { spawn } from "node:child_process";
@@ -14,7 +14,7 @@ async function runBinaryMcp(args) {
14
14
  const runtime = npmRuntime();
15
15
  if (!runtime) {
16
16
  process.env[directEnvironmentVariable] = "1";
17
- const { runCli } = await import("./cli-n0qhph13.mjs");
17
+ const { runCli } = await import("./cli-pazs0vgt.mjs");
18
18
  return runCli();
19
19
  }
20
20
  const { layout } = runtime;
@@ -4,10 +4,10 @@ import {
4
4
  updateNotice2,
5
5
  createUpdateWatcher2,
6
6
  runUpdateCommand2
7
- } from "./main-x96gxahz.mjs";
8
- import"./main-a6mpfd6z.mjs";
9
- import"./main-vp3devjb.mjs";
7
+ } from "./main-yxvg4ms6.mjs";
10
8
  import"./main-3gthmkzw.mjs";
9
+ import"./main-ea9djgtm.mjs";
10
+ import"./main-k9drabmz.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-vp3devjb.mjs";
4
+ } from "./main-k9drabmz.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.6-dev.27",
3
+ "version": "0.0.6-dev.32",
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",
@@ -28,9 +28,7 @@
28
28
  "prepublishOnly": "bun build.ts"
29
29
  },
30
30
  "dependencies": {
31
- "@effect/platform-node": "4.0.1",
32
31
  "acorn": "8.18.0",
33
- "effect": "4.0.1",
34
32
  "pixelmatch": "7.2.0",
35
33
  "patchright-core": "1.63.0",
36
34
  "pngjs": "7.0.0",
@@ -39,12 +37,15 @@
39
37
  "devDependencies": {
40
38
  "@clack/core": "1.5.1",
41
39
  "@clack/prompts": "1.8.1",
40
+ "@effect/platform-node": "4.0.1",
41
+ "@effect/platform-node-shared": "4.0.1",
42
42
  "@types/bun": "1.4.0",
43
43
  "@types/chrome": "0.3.4",
44
44
  "@types/node": "26.6.4",
45
45
  "@types/pngjs": "6.0.5",
46
46
  "@types/ws": "8.18.2",
47
47
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
48
+ "effect": "4.0.1",
48
49
  "jsonc-parser": "3.3.1",
49
50
  "smol-toml": "1.9.1",
50
51
  "yaml": "2.9.1"
@@ -580,81 +580,6 @@ secret in a session without an allowlist adds a loud warning: set one first.
580
580
  Once typed, the value is in the page, so don't read it back or copy it
581
581
  elsewhere.
582
582
 
583
- ### Signing in with Deadbolt
584
-
585
- When the user connected browse to Deadbolt (`opencode-browser deadbolt
586
- connect`), you can sign in with the logins they granted to agents, without
587
- seeing any value. `secrets_list` shows them for the session's allowed sites:
588
- title, username, `granted`, which `fields` (username, password, totp) and
589
- whether `passkeys` are allowed, plus the site's passkey accounts (`username`,
590
- `displayName`). Only the user grants, in Deadbolt: `deadbolt agents allow
591
- <site>` (everything for that site's logins: username, password, one-time code
592
- and passkeys, unless narrowed with `--login`, `--fields`, `--no-passkeys`,
593
- `--expires`) or
594
- `deadbolt agents allow --all` (every login).
595
- Never try to grant, pair or unlock yourself; Deadbolt refuses AI callers.
596
-
597
- Prefer the whole sign-in in one call (the `signin` tool, or in execute):
598
-
599
- ```js
600
- await page.goto("https://github.com/login")
601
- const result = await secrets.signIn() // or { site: "github.com", username: "me@example.com" }
602
- // { status: "signed_in" | "needs_user" | "not_granted" | "failed", step, reason }
603
- ```
604
-
605
- It fills the username, submits, waits, fills the password, types an
606
- authenticator (TOTP) code when the site asks for one (single field or split
607
- boxes), follows "Use password instead", and follows Sign in with Google when
608
- Deadbolt grants a Google login, all inside the relay. Then:
609
-
610
- - `signed_in`: carry on.
611
- - `needs_user`: a captcha, a code sent by SMS or email, a push approval, a
612
- new-device or "verify it's you" check, or Deadbolt is locked. Call
613
- `handoff("Finish signing in, then click Continue")` so the user does it.
614
- Don't retry in a loop.
615
- - `needs_choice`: several passkeys can sign in; `choices` lists their
616
- `username` / `displayName`. Ask the user which one if it isn't obvious, then
617
- call again with `{ username }`.
618
- - `not_granted`: tell the user what to allow (the reason names the site and
619
- login).
620
- - `failed`: the reason says why (no form found, wrong password, the page didn't
621
- move on). Don't loop.
622
-
623
- It doesn't handle security questions, image or canvas keypads, closed shadow
624
- roots, or sign-in providers other than Google; those return `needs_user` or
625
- `failed`. When it stops after a fill it empties the password and code fields
626
- first. For a form it misreads, type one value at a time: a username on its
627
- own, a password or code only with `{ submit: true }`, which types it, submits
628
- the form, waits for the page to move on and empties password and code fields
629
- in that frame, all in the same call:
630
-
631
- ```js
632
- await secrets.type("#login", "deadbolt:github.com/me@example.com", { field: "username" })
633
- await secrets.type("#password", "deadbolt:github.com/me@example.com", { submit: true }) // field defaults to "password"
634
- ```
635
-
636
- The same origin checks as stored secrets apply (the field's frame must be on
637
- the login's site and in the session allowlist; Deadbolt checks again), and
638
- values never appear in what you get back. Errors start with the code:
639
- `submit_required`, `domain_not_allowed`, `not_granted`, `locked`, `forbidden`
640
- (the user must reconnect), `rate_limited`, `page_hooks`. `page_hooks` means
641
- this session's code set up request interception or listeners
642
- (`page.route`, `page.on("request")`, `waitForRequest`...), init scripts,
643
- exposed functions or a CDP session: Deadbolt passwords and codes aren't typed
644
- then. Sign in first, in a fresh session (`session_reset`), and set those up
645
- afterwards. Never try to read or capture a value that was typed: the user
646
- grants logins on the understanding that you don't. Set a session allowlist
647
- before signing in.
648
-
649
- Passkeys: in tabs you opened, a site's passkey sign-in
650
- (`navigator.credentials.get`) is answered by Deadbolt when the grant allows
651
- passkeys. `signIn({ username })` picks that account's passkey; to choose one
652
- before your own click on a "Sign in with a passkey" button, call
653
- `await secrets.usePasskey({ site: "example.com", username: "me@example.com" })`
654
- (it applies to the tab's next passkey request, once). Deadbolt never verifies the user, so sites that require that fall back to
655
- other methods. Otherwise the request fails with NotAllowedError, as if the user
656
- dismissed it. WebAuthn CDP methods are blocked.
657
-
658
583
  For destructive UI work, use a two-phase **read, confirm, verify** flow:
659
584
 
660
585
  1. Read candidates and return exact stable identifiers or row text.