@opencode/browse 0.0.3-dev.2 → 0.0.6-dev.17
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-b4sbkefj.mjs +1725 -0
- package/dist/cli.mjs +17 -26932
- package/dist/main-3qpkwaa7.mjs +1425 -0
- package/dist/main-4bht27ry.mjs +72 -0
- package/dist/main-4p2p9eey.mjs +334 -0
- package/dist/main-e4stqtf2.mjs +1698 -0
- package/dist/main-g5mke6rn.mjs +731 -0
- package/dist/main-kvmxefp1.mjs +217 -0
- package/dist/main-y7c1atbf.mjs +4 -0
- package/dist/main-zwe0c783.mjs +315 -0
- package/dist/mcp-2smdsn8z.mjs +870 -0
- package/dist/relay-helpers-pjcbxs7p.mjs +68 -0
- package/dist/relay-ns525pms.mjs +18151 -0
- package/dist/runtime-update-0mddkfy5.mjs +187 -0
- package/dist/setup-f2qjnvre.mjs +11320 -0
- package/dist/update-cyy1grjj.mjs +15 -0
- package/dist/version-wrebjhy7.mjs +8 -0
- package/package.json +5 -2
- package/skills/browse/SKILL.md +20 -18
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
updateJson2,
|
|
3
|
+
formatUpdateNotice2,
|
|
4
|
+
updateNotice2,
|
|
5
|
+
createUpdateWatcher2,
|
|
6
|
+
runUpdateCommand2
|
|
7
|
+
} from "./main-4p2p9eey.mjs";
|
|
8
|
+
import"./main-g5mke6rn.mjs";
|
|
9
|
+
export {
|
|
10
|
+
createUpdateWatcher2 as createUpdateWatcher,
|
|
11
|
+
formatUpdateNotice2 as formatUpdateNotice,
|
|
12
|
+
runUpdateCommand2 as runUpdateCommand,
|
|
13
|
+
updateJson2 as updateJson,
|
|
14
|
+
updateNotice2 as updateNotice
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencode/browse",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6-dev.17",
|
|
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",
|
|
@@ -38,13 +38,16 @@
|
|
|
38
38
|
"ws": "8.22.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"@clack/core": "1.5.1",
|
|
41
42
|
"@types/bun": "1.4.0",
|
|
42
43
|
"@types/chrome": "0.3.4",
|
|
43
44
|
"@types/node": "26.6.4",
|
|
44
45
|
"@types/pngjs": "6.0.5",
|
|
45
46
|
"@types/ws": "8.18.2",
|
|
46
47
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
47
|
-
"jsonc-parser": "3.3.1"
|
|
48
|
+
"jsonc-parser": "3.3.1",
|
|
49
|
+
"smol-toml": "1.9.1",
|
|
50
|
+
"yaml": "2.9.1"
|
|
48
51
|
},
|
|
49
52
|
"publishConfig": {
|
|
50
53
|
"access": "public"
|
package/skills/browse/SKILL.md
CHANGED
|
@@ -59,22 +59,25 @@ are excluded from Browse's inventory. `page.title()` reads time out
|
|
|
59
59
|
after five seconds if the page execution context remains unavailable; the read
|
|
60
60
|
timeout does not close or replace the tab.
|
|
61
61
|
|
|
62
|
-
A bare CLI execute
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
A bare CLI execute inside OpenCode defaults to `oc-<opencode-session-id>` (or
|
|
63
|
+
creates a fresh session-owned page outside OpenCode and prints its
|
|
64
|
+
`--session <id>` continuation command). Pass `--rm` for a one-shot session whose
|
|
65
|
+
tabs close as soon as the command finishes, `--timeout-ms <ms>` when a script
|
|
66
|
+
needs longer than the 60s default (paused while `handoff()` waits on the user),
|
|
67
|
+
or pass a descriptive session name (including an optional emoji, which appears
|
|
68
|
+
directly on the browser tab group):
|
|
68
69
|
|
|
69
70
|
```bash
|
|
70
71
|
opencode-browser session new "🎙️ elevenlabs"
|
|
71
72
|
opencode-browser execute --session "🎙️ elevenlabs" 'return page.url()'
|
|
72
73
|
opencode-browser execute 'return page.url()'
|
|
74
|
+
opencode-browser execute --rm 'await page.goto("https://example.com"); return await page.title()'
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
MCP keeps one implicit process session. Omit `session` for that normal path, or
|
|
76
78
|
call `session_new` and pass an explicit id when one MCP process needs multiple
|
|
77
79
|
sessions.
|
|
80
|
+
Each session stays in the browser selected at creation (the default if omitted); reconnect that browser or start a new session to use another.
|
|
78
81
|
|
|
79
82
|
Tabs you open live in the background of the user's window, in your session's
|
|
80
83
|
tab group, collapsed at the start of their tab strip, so the user keeps working
|
|
@@ -914,12 +917,13 @@ Common diagnoses:
|
|
|
914
917
|
not cancel the underlying read or trigger page replacement. A cached
|
|
915
918
|
`page.url()` read can still work; retry the page read after the page settles.
|
|
916
919
|
Ordinary missing-locator timeouts do not receive this diagnostic.
|
|
917
|
-
- `connected:false`:
|
|
918
|
-
or
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
920
|
+
- `connected:false`: check `extension.pairingState` and follow `extension.nextStep`.
|
|
921
|
+
`unpaired` or `refused` means Browse is installed: re-run install to pair it, **not** the store.
|
|
922
|
+
`paired-offline`: reopen the paired browser profile and enable Browse; its worker wakes every 30 seconds.
|
|
923
|
+
`not-seen`: the relay hasn't heard from a browser. If Browse is already added, open that browser and
|
|
924
|
+
rerun install. Otherwise follow install's store or Load unpacked steps.
|
|
925
|
+
- Incompatible extension protocol: follow `extension.nextStep`. For an older unpacked extension after setup,
|
|
926
|
+
ask the user: “Reload Browse on your browser's extensions page (↻).” Running setup again does not reload older workers.
|
|
923
927
|
- Competing browser/profile connections: the active browser is preserved and
|
|
924
928
|
additional connections are rejected. Use one browser/profile per relay;
|
|
925
929
|
repeatedly creating sessions or resetting tabs does not switch browsers.
|
|
@@ -939,12 +943,10 @@ Common diagnoses:
|
|
|
939
943
|
unique URL substring or explicit index.
|
|
940
944
|
- All targets disappeared: dismissing Chromium's debugging banner detaches every
|
|
941
945
|
tab. Ask the user to click the toolbar button on it again.
|
|
942
|
-
- Extension not
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
10 minutes) under Connection on the status page. `pair --list` shows paired
|
|
947
|
-
browsers; `pair --revoke <browser>` unpairs one.
|
|
946
|
+
- Extension installed but not paired: re-run `npx @opencode/browse install` to open its pairing link
|
|
947
|
+
(from a checkout, `bun run setup`). To pair manually, run `npx @opencode/browse pair`
|
|
948
|
+
(from the checkout root, `node cli/dist/cli.mjs pair`). This starts the relay. Have the user enter
|
|
949
|
+
the code in Browse's Options and click Connect. The terminal confirms which browser paired.
|
|
948
950
|
- HTTP 401 from the relay: clients need the relay token from the data root
|
|
949
951
|
(`relay-token`); the CLI and MCP server send it, other CDP clients must add
|
|
950
952
|
`Authorization: Bearer <token>` or `?opencodeBrowserToken=<token>`.
|