@opencode/browse 0.0.11-dev.74 → 0.0.11-dev.76
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-a7k2dxdn.mjs → cli-qpkh40gh.mjs} +10 -10
- package/dist/cli.mjs +9 -9
- package/dist/{helpers-84e9b406.mjs → helpers-kp0j46jt.mjs} +2 -2
- package/dist/{main-fp9pzxmb.mjs → main-7wgmq04v.mjs} +2 -2
- package/dist/{main-q5y16xa8.mjs → main-ajza8egc.mjs} +4 -4
- package/dist/{main-qdrd6jck.mjs → main-brv9dhy5.mjs} +2 -2
- package/dist/{main-7dpg0mjz.mjs → main-eej5z0y5.mjs} +3 -3
- package/dist/main-exnm62gg.mjs +4 -0
- package/dist/{main-2d1fteqw.mjs → main-hm4fcpfz.mjs} +1 -1
- package/dist/{main-43zcz56n.mjs → main-nqmm7pdz.mjs} +96 -15
- package/dist/{main-2bb5sfft.mjs → main-rn7hdcq2.mjs} +3 -3
- package/dist/{mcp-v0nqt3b0.mjs → mcp-sy8qgkyr.mjs} +214 -249
- package/dist/{relay-pbt8dmpa.mjs → relay-ateyg5ax.mjs} +71 -14
- package/dist/{runtime-update-nhpkbvt2.mjs → runtime-update-70gqzynp.mjs} +4 -4
- package/dist/{setup-gt8mrdn6.mjs → setup-j76yv51b.mjs} +5 -5
- package/dist/{skill-text-q5tkbz98.mjs → skill-text-x7sccp6h.mjs} +6 -4
- package/dist/{supervisor-w0t2qaej.mjs → supervisor-0rvjpf4e.mjs} +3 -3
- package/dist/{update-0ssj6chm.mjs → update-rbd2025v.mjs} +3 -3
- package/dist/{version-1mzgjxcn.mjs → version-4cjr3wpp.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +6 -4
- package/dist/main-7zgqqv4q.mjs +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-exnm62gg.mjs";
|
|
5
5
|
import {
|
|
6
6
|
dataRoot,
|
|
7
7
|
oldStoreMarker,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
setStoredMode,
|
|
20
20
|
autoUpdateStatus,
|
|
21
21
|
createAutoUpdater
|
|
22
|
-
} from "./main-
|
|
22
|
+
} from "./main-rn7hdcq2.mjs";
|
|
23
23
|
import {
|
|
24
24
|
extensionProtocolVersion,
|
|
25
25
|
minExtensionProtocolVersion,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
relayToken,
|
|
45
45
|
secretsEqual,
|
|
46
46
|
ensurePrivateDirectory
|
|
47
|
-
} from "./main-
|
|
47
|
+
} from "./main-hm4fcpfz.mjs";
|
|
48
48
|
import {
|
|
49
49
|
withDefault,
|
|
50
50
|
option,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
isRestrictedTarget2,
|
|
99
99
|
isRestrictedUrl2,
|
|
100
100
|
dataUrlDocument2
|
|
101
|
-
} from "./main-
|
|
101
|
+
} from "./main-ajza8egc.mjs";
|
|
102
102
|
import {
|
|
103
103
|
relayHostname,
|
|
104
104
|
isLocalPeer,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
wrapToken,
|
|
121
121
|
installedDevExtension,
|
|
122
122
|
syncDevExtension
|
|
123
|
-
} from "./main-
|
|
123
|
+
} from "./main-7wgmq04v.mjs";
|
|
124
124
|
import {
|
|
125
125
|
makeUnsafe,
|
|
126
126
|
SettingsInputError,
|
|
@@ -148,16 +148,16 @@ import {
|
|
|
148
148
|
checkNavigationUrl,
|
|
149
149
|
readSecret,
|
|
150
150
|
secretText
|
|
151
|
-
} from "./main-
|
|
151
|
+
} from "./main-nqmm7pdz.mjs";
|
|
152
152
|
import {
|
|
153
153
|
defaultJournalBaseDir,
|
|
154
154
|
makeJournalEntry,
|
|
155
155
|
appendJournalEntry,
|
|
156
156
|
startJournalRetention
|
|
157
|
-
} from "./main-
|
|
157
|
+
} from "./main-eej5z0y5.mjs";
|
|
158
158
|
import {
|
|
159
159
|
createUpdateWatcher2
|
|
160
|
-
} from "./main-
|
|
160
|
+
} from "./main-brv9dhy5.mjs";
|
|
161
161
|
import {
|
|
162
162
|
isNone,
|
|
163
163
|
isSome,
|
|
@@ -14233,9 +14233,66 @@ var alwaysBlocked = new Map([
|
|
|
14233
14233
|
["Network.deleteCookies", "it would delete the user's cookies and can log them out"],
|
|
14234
14234
|
["Storage.clearDataForOrigin", "it would erase a site's cookies and stored data in the user's browser"],
|
|
14235
14235
|
["Storage.clearDataForStorageKey", "it would erase a site's stored data in the user's browser"],
|
|
14236
|
-
["Browser.close", "it would close the user's browser"]
|
|
14236
|
+
["Browser.close", "it would close the user's browser"],
|
|
14237
|
+
["Browser.grantPermissions", "it would grant a site permissions the user never approved"],
|
|
14238
|
+
["Browser.setPermission", "it would change a site permission without the user's approval"],
|
|
14239
|
+
["Browser.resetPermissions", "it would reset the user's site permissions"]
|
|
14237
14240
|
]);
|
|
14238
|
-
var
|
|
14241
|
+
var readOnlyAllowedMethods = new Set([
|
|
14242
|
+
"Browser.getVersion",
|
|
14243
|
+
"Browser.getWindowForTarget",
|
|
14244
|
+
"Browser.setDownloadBehavior",
|
|
14245
|
+
"Target.attachToBrowserTarget",
|
|
14246
|
+
"Target.attachToTarget",
|
|
14247
|
+
"Target.detachFromTarget",
|
|
14248
|
+
"Target.getTargetInfo",
|
|
14249
|
+
"Target.getTargets",
|
|
14250
|
+
"Target.setAutoAttach",
|
|
14251
|
+
"Target.setDiscoverTargets",
|
|
14252
|
+
"Page.getFrameTree",
|
|
14253
|
+
"Page.getLayoutMetrics",
|
|
14254
|
+
"Page.getNavigationHistory",
|
|
14255
|
+
"Page.getResourceTree",
|
|
14256
|
+
"Page.captureScreenshot",
|
|
14257
|
+
"Page.addScriptToEvaluateOnNewDocument",
|
|
14258
|
+
"Page.createIsolatedWorld",
|
|
14259
|
+
"Page.setLifecycleEventsEnabled",
|
|
14260
|
+
"Runtime.callFunctionOn",
|
|
14261
|
+
"Runtime.evaluate",
|
|
14262
|
+
"Runtime.getProperties",
|
|
14263
|
+
"Runtime.releaseObject",
|
|
14264
|
+
"Runtime.releaseObjectGroup",
|
|
14265
|
+
"Runtime.runIfWaitingForDebugger",
|
|
14266
|
+
"Accessibility.getAXNodeAndAncestors",
|
|
14267
|
+
"Accessibility.getFullAXTree",
|
|
14268
|
+
"Accessibility.getPartialAXTree",
|
|
14269
|
+
"Accessibility.getRootAXNode",
|
|
14270
|
+
"Accessibility.queryAXTree",
|
|
14271
|
+
"DOM.describeNode",
|
|
14272
|
+
"DOM.getAttributes",
|
|
14273
|
+
"DOM.getBoxModel",
|
|
14274
|
+
"DOM.getContentQuads",
|
|
14275
|
+
"DOM.getDocument",
|
|
14276
|
+
"DOM.getFrameOwner",
|
|
14277
|
+
"DOM.getNodeForLocation",
|
|
14278
|
+
"DOM.querySelector",
|
|
14279
|
+
"DOM.querySelectorAll",
|
|
14280
|
+
"DOM.resolveNode",
|
|
14281
|
+
"Network.getAllCookies",
|
|
14282
|
+
"Network.getCookies",
|
|
14283
|
+
"Storage.getCookies",
|
|
14284
|
+
"Emulation.setEmulatedMedia",
|
|
14285
|
+
"Emulation.setFocusEmulationEnabled",
|
|
14286
|
+
"Network.setCacheDisabled"
|
|
14287
|
+
]);
|
|
14288
|
+
var readOnlySubscriptionDomains = ["Accessibility.", "DOM.", "Log.", "Network.", "Page.", "Performance.", "Runtime."];
|
|
14289
|
+
function isReadOnlyAllowed(method) {
|
|
14290
|
+
if (readOnlyAllowedMethods.has(method))
|
|
14291
|
+
return true;
|
|
14292
|
+
if (!method.endsWith(".enable") && !method.endsWith(".disable"))
|
|
14293
|
+
return false;
|
|
14294
|
+
return readOnlySubscriptionDomains.some((domain) => method.startsWith(domain));
|
|
14295
|
+
}
|
|
14239
14296
|
var allowAllCookiesEnvironmentVariable = "OPENCODE_BROWSER_ALLOW_ALL_COOKIES";
|
|
14240
14297
|
var allowsAllCookies = () => process.env[allowAllCookiesEnvironmentVariable] === "1";
|
|
14241
14298
|
var allowsForeground = () => process.env.OPENCODE_BROWSER_ALLOW_FOREGROUND === "1";
|
|
@@ -14404,6 +14461,10 @@ function guardCdpMethod(context) {
|
|
|
14404
14461
|
if (context.method.startsWith("WebAuthn.")) {
|
|
14405
14462
|
return `browse blocked ${context.method}: agents can't drive WebAuthn or add virtual authenticators. This command is always blocked by the relay.`;
|
|
14406
14463
|
}
|
|
14464
|
+
if (context.readOnly && !isReadOnlyAllowed(context.method)) {
|
|
14465
|
+
const session = context.sessionId ? `Session ${context.sessionId}` : "This session";
|
|
14466
|
+
return `${session} is read-only: ${context.method} is blocked because this tab is read-only. Read-only sessions can take snapshots and screenshots, read page information and subscribe to events. Use a session created without --read-only to interact with pages.`;
|
|
14467
|
+
}
|
|
14407
14468
|
if (context.method === "Page.bringToFront" && !allowsForeground()) {
|
|
14408
14469
|
return "browse blocked Page.bringToFront: it raises the user's browser window over their work. Use handoff() when the user needs to act in the tab, or set OPENCODE_BROWSER_ALLOW_FOREGROUND=1 on the relay to allow it.";
|
|
14409
14470
|
}
|
|
@@ -14428,10 +14489,6 @@ function guardCdpMethod(context) {
|
|
|
14428
14489
|
return `browse blocked Network.loadNetworkResource: it loads URLs with the user's credentials outside the page's same-origin policy, so only the hosts of this session's attached pages (${formatAllowedHosts(hosts)}) are allowed. Set ${allowAllStorageEnvironmentVariable}=1 on the relay to allow it.`;
|
|
14429
14490
|
}
|
|
14430
14491
|
}
|
|
14431
|
-
if (context.readOnly && readOnlyBlockedPrefixes.some((prefix) => context.method.startsWith(prefix))) {
|
|
14432
|
-
const session = context.sessionId ? `Session ${context.sessionId}` : "This session";
|
|
14433
|
-
return `${session} is read-only: ${context.method} is blocked. Use a session created without --read-only to interact with pages.`;
|
|
14434
|
-
}
|
|
14435
14492
|
return null;
|
|
14436
14493
|
}
|
|
14437
14494
|
function scopeCdpResult(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-exnm62gg.mjs";
|
|
2
2
|
import {
|
|
3
3
|
cliCommand,
|
|
4
4
|
installCommand,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
installVersion,
|
|
19
19
|
pruneVersions,
|
|
20
20
|
switchVersion
|
|
21
|
-
} from "./main-
|
|
21
|
+
} from "./main-rn7hdcq2.mjs";
|
|
22
22
|
import"./main-mrew6jy8.mjs";
|
|
23
23
|
import {
|
|
24
24
|
Service,
|
|
25
25
|
layerFetch,
|
|
26
26
|
restartRelay,
|
|
27
27
|
startManagedRelay
|
|
28
|
-
} from "./main-
|
|
29
|
-
import"./main-
|
|
28
|
+
} from "./main-ajza8egc.mjs";
|
|
29
|
+
import"./main-hm4fcpfz.mjs";
|
|
30
30
|
import {
|
|
31
31
|
succeed6,
|
|
32
32
|
suspend2,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-exnm62gg.mjs";
|
|
5
5
|
import {
|
|
6
6
|
dataRoot,
|
|
7
7
|
oldStoreMarker,
|
|
@@ -26,10 +26,10 @@ import {
|
|
|
26
26
|
installVersion,
|
|
27
27
|
pruneVersions,
|
|
28
28
|
switchVersion
|
|
29
|
-
} from "./main-
|
|
29
|
+
} from "./main-rn7hdcq2.mjs";
|
|
30
30
|
import {
|
|
31
31
|
relayAuthorization
|
|
32
|
-
} from "./main-
|
|
32
|
+
} from "./main-hm4fcpfz.mjs";
|
|
33
33
|
import {
|
|
34
34
|
parseHostname,
|
|
35
35
|
readRelayConfig,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
legacyPairingCode,
|
|
47
47
|
removeLegacyPairingCode,
|
|
48
48
|
syncDevExtension
|
|
49
|
-
} from "./main-
|
|
49
|
+
} from "./main-7wgmq04v.mjs";
|
|
50
50
|
import {
|
|
51
51
|
unpackedExtensionId,
|
|
52
52
|
extensionProtocolSkew,
|
|
@@ -12147,7 +12147,7 @@ async function runSetup(command, args) {
|
|
|
12147
12147
|
if (command === "set")
|
|
12148
12148
|
return set(args);
|
|
12149
12149
|
if (command === "rollback") {
|
|
12150
|
-
const { runRollback } = await import("./runtime-update-
|
|
12150
|
+
const { runRollback } = await import("./runtime-update-70gqzynp.mjs");
|
|
12151
12151
|
return runRollback(args);
|
|
12152
12152
|
}
|
|
12153
12153
|
}
|
|
@@ -301,8 +301,8 @@ browse secrets run github -- ./github-cli repositories
|
|
|
301
301
|
\`\`\`
|
|
302
302
|
|
|
303
303
|
A capture ends by itself after 30 minutes, and when the MCP server that started
|
|
304
|
-
it exits; stop it before then. MCP exposes the
|
|
305
|
-
\`secrets_*\` tools.
|
|
304
|
+
it exits; stop it before then. MCP exposes the same capture with the \`network\`
|
|
305
|
+
tool (\`action: "start"\` / \`"stop"\`) and the profiles with the \`secrets_*\` tools.
|
|
306
306
|
|
|
307
307
|
## Recording
|
|
308
308
|
|
|
@@ -314,7 +314,7 @@ browse recording stop --session github
|
|
|
314
314
|
\`--mode auto\` uses tab capture for user-owned tabs and CDP for relay-owned tabs.
|
|
315
315
|
Tab capture can include audio; CDP requires \`ffmpeg\` and has no audio.
|
|
316
316
|
Recordings are clean by default: the ghost cursor stays off unless you pass
|
|
317
|
-
\`--cursor\` (\`cursor: true\` on \`
|
|
317
|
+
\`--cursor\` (\`cursor: true\` with \`action: "start"\` on \`recording\`), and a handoff on a recorded tab
|
|
318
318
|
shows a system notification instead of the in-page card.
|
|
319
319
|
|
|
320
320
|
For failures that are hard to reproduce, keep a rolling buffer and save recent
|
|
@@ -347,7 +347,9 @@ how they're grouped (\`grouping\`), when untouched agent tabs close (\`idleMinut
|
|
|
347
347
|
the agent cursor (\`cursor\`), human-like input (\`humanInput\`) and handoff
|
|
348
348
|
notifications (\`handoffNotifications\`). Tell the user what changed. Security
|
|
349
349
|
switches (\`OPENCODE_BROWSER_ALLOW_*\`, \`OPENCODE_BROWSER_UPDATE_CHECK\`) are
|
|
350
|
-
environment-only and no tool changes them.
|
|
350
|
+
environment-only and no tool changes them. Update behaviour is not available to
|
|
351
|
+
the tool either: only the user changes it (\`browse settings set autoUpdate=…\`
|
|
352
|
+
or the extension's options page), and \`status\` reports the current value.
|
|
351
353
|
|
|
352
354
|
## Updating browse
|
|
353
355
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-exnm62gg.mjs";
|
|
2
2
|
import {
|
|
3
3
|
versionEntry,
|
|
4
4
|
readCurrent,
|
|
5
5
|
npmRuntime
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-rn7hdcq2.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-
|
|
17
|
+
const { runCli } = await import("./cli-qpkh40gh.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-
|
|
7
|
+
} from "./main-brv9dhy5.mjs";
|
|
8
8
|
import"./main-mrew6jy8.mjs";
|
|
9
|
-
import"./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
import"./main-rn7hdcq2.mjs";
|
|
10
|
+
import"./main-exnm62gg.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
13
13
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/skills/browse/SKILL.md
CHANGED
|
@@ -300,8 +300,8 @@ browse secrets run github -- ./github-cli repositories
|
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
A capture ends by itself after 30 minutes, and when the MCP server that started
|
|
303
|
-
it exits; stop it before then. MCP exposes the
|
|
304
|
-
`secrets_*` tools.
|
|
303
|
+
it exits; stop it before then. MCP exposes the same capture with the `network`
|
|
304
|
+
tool (`action: "start"` / `"stop"`) and the profiles with the `secrets_*` tools.
|
|
305
305
|
|
|
306
306
|
## Recording
|
|
307
307
|
|
|
@@ -313,7 +313,7 @@ browse recording stop --session github
|
|
|
313
313
|
`--mode auto` uses tab capture for user-owned tabs and CDP for relay-owned tabs.
|
|
314
314
|
Tab capture can include audio; CDP requires `ffmpeg` and has no audio.
|
|
315
315
|
Recordings are clean by default: the ghost cursor stays off unless you pass
|
|
316
|
-
`--cursor` (`cursor: true` on `
|
|
316
|
+
`--cursor` (`cursor: true` with `action: "start"` on `recording`), and a handoff on a recorded tab
|
|
317
317
|
shows a system notification instead of the in-page card.
|
|
318
318
|
|
|
319
319
|
For failures that are hard to reproduce, keep a rolling buffer and save recent
|
|
@@ -346,7 +346,9 @@ how they're grouped (`grouping`), when untouched agent tabs close (`idleMinutes`
|
|
|
346
346
|
the agent cursor (`cursor`), human-like input (`humanInput`) and handoff
|
|
347
347
|
notifications (`handoffNotifications`). Tell the user what changed. Security
|
|
348
348
|
switches (`OPENCODE_BROWSER_ALLOW_*`, `OPENCODE_BROWSER_UPDATE_CHECK`) are
|
|
349
|
-
environment-only and no tool changes them.
|
|
349
|
+
environment-only and no tool changes them. Update behaviour is not available to
|
|
350
|
+
the tool either: only the user changes it (`browse settings set autoUpdate=…`
|
|
351
|
+
or the extension's options page), and `status` reports the current value.
|
|
350
352
|
|
|
351
353
|
## Updating browse
|
|
352
354
|
|
package/dist/main-7zgqqv4q.mjs
DELETED