@opencode/browse 0.0.15-dev.98 → 0.0.15
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/{Undici-88kyhfpm.mjs → Undici-mxpvn7gy.mjs} +1 -1
- package/dist/{cli-yw23xxk6.mjs → cli-xke2d25m.mjs} +136 -132
- package/dist/cli.mjs +17 -16
- package/dist/{helpers-5bz1ykzf.mjs → helpers-tsvynww5.mjs} +4 -2
- package/dist/{index-yzz55kxm.mjs → index-6gkr235e.mjs} +1 -1
- package/dist/{main-sr7x6ex2.mjs → main-3esbykhb.mjs} +4 -4
- package/dist/{main-y2e9e5kz.mjs → main-70y5racc.mjs} +2 -2
- package/dist/main-7y3pj4rc.mjs +1694 -0
- package/dist/{main-br0znez7.mjs → main-9kxgkcse.mjs} +2 -2
- package/dist/main-9t2s5ptx.mjs +5405 -0
- package/dist/{main-vgzr4689.mjs → main-azpzpy0x.mjs} +1 -1
- package/dist/main-ckssvk4c.mjs +18 -0
- package/dist/{main-nf4p3mes.mjs → main-crssg4wd.mjs} +25 -11
- package/dist/{main-hz7wj5ze.mjs → main-d79nrcqc.mjs} +67 -58
- package/dist/{main-8z9d979q.mjs → main-er120rjm.mjs} +2 -2
- package/dist/{main-yf9xhpn4.mjs → main-ken6azcs.mjs} +2 -2
- package/dist/main-m05te79v.mjs +1255 -0
- package/dist/{main-x58yhgrq.mjs → main-rycc0g05.mjs} +3 -3
- package/dist/{main-z0a00g4g.mjs → main-sfb6r1ye.mjs} +2 -2
- package/dist/{main-n0qm6500.mjs → main-w9h0wtxs.mjs} +57 -10
- package/dist/main-xkbs0qyx.mjs +4 -0
- package/dist/{main-csnx585b.mjs → main-yf5j8g79.mjs} +2800 -8017
- package/dist/{mcp-q0wgd05d.mjs → mcp-qzkz0rbx.mjs} +418 -414
- package/dist/{migrate-tmsm0mc7.mjs → migrate-bcea81cv.mjs} +11 -14
- package/dist/{relay-pg3r3re0.mjs → relay-pc2ke2t2.mjs} +1229 -408
- package/dist/{runtime-update-65ffn31x.mjs → runtime-update-jaxftsqk.mjs} +7 -6
- package/dist/{setup-wkp99mwd.mjs → setup-cpr4psvg.mjs} +30 -20
- package/dist/{skill-text-28va391t.mjs → skill-text-v0etv8b7.mjs} +20 -8
- package/dist/{supervisor-p0agjsxt.mjs → supervisor-recc7rne.mjs} +5 -5
- package/dist/{update-rrk7rh0w.mjs → update-0vgwjjha.mjs} +3 -3
- package/dist/{version-t3shmxrb.mjs → version-67w7t6ce.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +20 -8
- package/dist/main-630yypmy.mjs +0 -2924
- package/dist/main-bccm3dk2.mjs +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-xkbs0qyx.mjs";
|
|
2
2
|
import {
|
|
3
3
|
cliCommand,
|
|
4
4
|
installCommand,
|
|
@@ -15,15 +15,17 @@ import {
|
|
|
15
15
|
registryUrl,
|
|
16
16
|
fetchPublished,
|
|
17
17
|
runInstaller
|
|
18
|
-
} from "./main-
|
|
18
|
+
} from "./main-w9h0wtxs.mjs";
|
|
19
19
|
import"./main-mrew6jy8.mjs";
|
|
20
20
|
import {
|
|
21
21
|
Service,
|
|
22
22
|
layerFetch,
|
|
23
23
|
restartRelay,
|
|
24
24
|
startManagedRelay
|
|
25
|
-
} from "./main-
|
|
26
|
-
import"./main-
|
|
25
|
+
} from "./main-d79nrcqc.mjs";
|
|
26
|
+
import"./main-azpzpy0x.mjs";
|
|
27
|
+
import"./main-9t2s5ptx.mjs";
|
|
28
|
+
import"./main-70y5racc.mjs";
|
|
27
29
|
import {
|
|
28
30
|
succeed6,
|
|
29
31
|
gen,
|
|
@@ -31,8 +33,7 @@ import {
|
|
|
31
33
|
catch_,
|
|
32
34
|
provide3,
|
|
33
35
|
runPromise
|
|
34
|
-
} from "./main-
|
|
35
|
-
import"./main-y2e9e5kz.mjs";
|
|
36
|
+
} from "./main-yf5j8g79.mjs";
|
|
36
37
|
|
|
37
38
|
// src/update/runtime-update.ts
|
|
38
39
|
var log = (line) => process.stdout.write(line + `
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
installRuntime,
|
|
64
64
|
installedRuntime,
|
|
65
65
|
manualMcpEntry
|
|
66
|
-
} from "./main-
|
|
66
|
+
} from "./main-crssg4wd.mjs";
|
|
67
67
|
import {
|
|
68
68
|
opencodeBrowserBuildId2
|
|
69
|
-
} from "./main-
|
|
69
|
+
} from "./main-xkbs0qyx.mjs";
|
|
70
70
|
import {
|
|
71
71
|
installedBinaryPath,
|
|
72
72
|
installerBinaryPath,
|
|
@@ -75,6 +75,7 @@ import {
|
|
|
75
75
|
compiledBinary,
|
|
76
76
|
scriptEntry,
|
|
77
77
|
entryCommand,
|
|
78
|
+
entrySpawnCommand,
|
|
78
79
|
runningEntry,
|
|
79
80
|
cliCommand,
|
|
80
81
|
devExtensionFolder,
|
|
@@ -82,8 +83,8 @@ import {
|
|
|
82
83
|
autoUpdateStatus,
|
|
83
84
|
describeAutoUpdate,
|
|
84
85
|
runCommand
|
|
85
|
-
} from "./main-
|
|
86
|
-
import"./main-
|
|
86
|
+
} from "./main-w9h0wtxs.mjs";
|
|
87
|
+
import"./main-azpzpy0x.mjs";
|
|
87
88
|
import {
|
|
88
89
|
pairingCodeTtlMs,
|
|
89
90
|
bundledPairingCodeTtlMs,
|
|
@@ -96,21 +97,24 @@ import {
|
|
|
96
97
|
revokeBrowserToken,
|
|
97
98
|
legacyPairingCode,
|
|
98
99
|
removeLegacyPairingCode
|
|
99
|
-
} from "./main-
|
|
100
|
+
} from "./main-9kxgkcse.mjs";
|
|
100
101
|
import {
|
|
101
102
|
unpackedExtensionId,
|
|
102
103
|
extensionProtocolSkew,
|
|
103
104
|
extensionProtocolAdvice
|
|
104
105
|
} from "./main-mrew6jy8.mjs";
|
|
106
|
+
import {
|
|
107
|
+
defaultSiteSecretsDir
|
|
108
|
+
} from "./main-m05te79v.mjs";
|
|
105
109
|
import {
|
|
106
110
|
parseHostname,
|
|
107
111
|
readRelayConfig,
|
|
108
112
|
writeRelayConfig,
|
|
109
113
|
syncDevExtension
|
|
110
|
-
} from "./main-
|
|
114
|
+
} from "./main-rycc0g05.mjs";
|
|
111
115
|
import {
|
|
112
116
|
relayAuthorization
|
|
113
|
-
} from "./main-
|
|
117
|
+
} from "./main-70y5racc.mjs";
|
|
114
118
|
|
|
115
119
|
// src/setup.ts
|
|
116
120
|
import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
|
|
@@ -306,7 +310,7 @@ var relayHeaders = () => {
|
|
|
306
310
|
}
|
|
307
311
|
};
|
|
308
312
|
function ensureRelay(entry) {
|
|
309
|
-
const [file, ...prefix] =
|
|
313
|
+
const [file, ...prefix] = entrySpawnCommand(entry);
|
|
310
314
|
const started = spawnSync(file, [...prefix, "session", "list", "--json"], {
|
|
311
315
|
encoding: "utf8",
|
|
312
316
|
timeout: 30000
|
|
@@ -486,7 +490,7 @@ async function set(args) {
|
|
|
486
490
|
log(`✓ hostname is ${hostname}`);
|
|
487
491
|
const running = await fetch(`${relayBase()}/version`, { signal: AbortSignal.timeout(2000) }).then((response) => response.ok, () => false);
|
|
488
492
|
if (running) {
|
|
489
|
-
const [file, ...prefix] =
|
|
493
|
+
const [file, ...prefix] = entrySpawnCommand(runningEntry());
|
|
490
494
|
const restarted = spawnSync(file, [...prefix, "relay", "restart"], { stdio: "inherit" });
|
|
491
495
|
if (restarted.status !== 0)
|
|
492
496
|
log(`! The relay is still running with the old hostname. Run \`${cliCommand("relay restart --force")}\` to apply it.`);
|
|
@@ -496,17 +500,23 @@ async function set(args) {
|
|
|
496
500
|
const tailscale = Object.values(networkInterfaces()).flat().find((address) => address?.family === "IPv4" && /^100\.(6[4-9]|[7-9]\d|1[01]\d|12[0-7])\./.test(address.address))?.address;
|
|
497
501
|
log("");
|
|
498
502
|
log("In the browser on the other computer, open browse's options (right-click its toolbar button, then Options),");
|
|
499
|
-
log("and under
|
|
503
|
+
log("and under advanced enter:");
|
|
500
504
|
log(` Relay ${tailscale ?? "this computer's address"}`);
|
|
501
505
|
log(` Pairing code ${formatPairingCode(mintPairingCode())} (works once, within ${pairingCodeTtlMs / 60000} minutes; \`${cliCommand("pair")}\` prints another)`);
|
|
502
506
|
log("The connection isn't encrypted by browse: use it over Tailscale or a LAN you trust, not the open internet.");
|
|
503
507
|
}
|
|
504
508
|
async function confirmSecretRemoval(args) {
|
|
505
509
|
const secrets = path.join(files.dir, "secrets");
|
|
506
|
-
const
|
|
507
|
-
|
|
510
|
+
const siteSecrets = defaultSiteSecretsDir();
|
|
511
|
+
const count = (directory) => existsSync(directory) ? readdirSync(directory).filter((name) => name.endsWith(".json")).length : 0;
|
|
512
|
+
const profiles = count(secrets);
|
|
513
|
+
const sites = count(siteSecrets);
|
|
514
|
+
if (profiles === 0 && sites === 0 || args.includes("--yes") || args.includes("-y"))
|
|
508
515
|
return;
|
|
509
|
-
const notice = `Uninstalling deletes ${
|
|
516
|
+
const notice = `Uninstalling deletes ${[
|
|
517
|
+
...profiles > 0 ? [`${profiles} stored secret profile${profiles === 1 ? "" : "s"} in ${secrets}`] : [],
|
|
518
|
+
...sites > 0 ? [`${sites} site secret${sites === 1 ? "" : "s"} in ${siteSecrets}`] : []
|
|
519
|
+
].join(" and ")}.`;
|
|
510
520
|
if (!process.stdin.isTTY)
|
|
511
521
|
fail(`${notice} Re-run with --yes to confirm.`);
|
|
512
522
|
const prompt = createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -660,7 +670,7 @@ async function installRemote(entry, tty) {
|
|
|
660
670
|
if (config.hostname !== "0.0.0.0") {
|
|
661
671
|
writeRelayConfig({ ...config, hostname: "0.0.0.0" });
|
|
662
672
|
const running = await fetch(`${relayBase()}/version`, { signal: AbortSignal.timeout(2000) }).then((response) => response.ok, () => false);
|
|
663
|
-
const [file, ...prefix] =
|
|
673
|
+
const [file, ...prefix] = entrySpawnCommand(entry);
|
|
664
674
|
const restarted = running && spawnSync2(file, [...prefix, "relay", "restart"], { encoding: "utf8", timeout: 60000 }).status === 0;
|
|
665
675
|
if (running && !restarted) {
|
|
666
676
|
process.exitCode = 1;
|
|
@@ -745,7 +755,7 @@ async function installSteps(args, tty, caller) {
|
|
|
745
755
|
const plan = agentPlan(locations, flags, tty, caller, remembered);
|
|
746
756
|
mkdirSync2(path2.dirname(files.settings), { recursive: true, mode: 448 });
|
|
747
757
|
mkdirSync2(files.dir, { recursive: true, mode: 448 });
|
|
748
|
-
const { entry, version } = await installRuntime();
|
|
758
|
+
const { entry, version, spawnEntry } = await installRuntime();
|
|
749
759
|
log(`✓ browse ${version} installed${fromSource ? " (from source)" : ""}`);
|
|
750
760
|
const onPath = args.includes("--no-modify-path") ? undefined : path2.isAbsolute(entry) && !scriptEntry(entry) ? addToPath(path2.dirname(entry)) : undefined;
|
|
751
761
|
if (onPath)
|
|
@@ -822,15 +832,15 @@ async function installSteps(args, tty, caller) {
|
|
|
822
832
|
log(`! Couldn't edit ${tilde(agent.file)} for ${label}. Check its syntax and permissions, then run ${cliCommand(`install --agent ${agent.name}`)}.`);
|
|
823
833
|
}
|
|
824
834
|
}
|
|
825
|
-
for (const line of restartOutdatedRelay(
|
|
835
|
+
for (const line of restartOutdatedRelay(spawnEntry) ?? [])
|
|
826
836
|
log(line);
|
|
827
837
|
const legacy = selected.includes("opencode") ? legacyBrowserControl() : [];
|
|
828
838
|
if (legacy.length)
|
|
829
839
|
log(`! Also configured: ${legacy.map((name) => `"${name}"`).join(", ")}, ${legacy.length === 1 ? "an older browser MCP server" : "older browser MCP servers"} that browse replaces. Remove ${legacy.length === 1 ? "it" : "them"} from ${configFile()} to avoid two sets of browser tools.`);
|
|
830
840
|
if (args.includes("--remote"))
|
|
831
|
-
return installRemote(
|
|
841
|
+
return installRemote(spawnEntry, tty);
|
|
832
842
|
await syncDev();
|
|
833
|
-
const initial = await settledExtensionStatus(
|
|
843
|
+
const initial = await settledExtensionStatus(spawnEntry);
|
|
834
844
|
const connected = initial?.connected ? initial : undefined;
|
|
835
845
|
const pairedOffline = initial?.pairingState === "paired-offline";
|
|
836
846
|
const needsPairing = initial?.pairingState === "unpaired" || initial?.pairingState === "refused";
|
|
@@ -859,7 +869,7 @@ async function installSteps(args, tty, caller) {
|
|
|
859
869
|
return true;
|
|
860
870
|
writeFileSync(oldStoreMarker(), `2
|
|
861
871
|
`);
|
|
862
|
-
ensureRelay(
|
|
872
|
+
ensureRelay(spawnEntry);
|
|
863
873
|
log(`! Found browse ${matches[0].version} in ${matches[0].browser.name}. ${extensionProtocolAdvice(2, { install: cliCommand("install") }, "store")}`);
|
|
864
874
|
process.exitCode = 1;
|
|
865
875
|
return false;
|
|
@@ -883,7 +893,7 @@ async function installSteps(args, tty, caller) {
|
|
|
883
893
|
});
|
|
884
894
|
if (connected || found === "off" || pairedOffline)
|
|
885
895
|
return;
|
|
886
|
-
ensureRelay(
|
|
896
|
+
ensureRelay(spawnEntry);
|
|
887
897
|
let code;
|
|
888
898
|
const pairingCode = () => code && pendingPairingCodeKeys().includes(pairingCodeKey(code)) ? code : code = mintPairingCode();
|
|
889
899
|
const pairStore = (scanned) => pairStoreExtension({
|
|
@@ -228,7 +228,8 @@ is no \`process\`, \`require\`, \`import()\`, \`eval\`, \`fs\`, \`os\`,
|
|
|
228
228
|
\`page.request\`, \`context.request\` and \`browser.browserType()\` are unavailable.
|
|
229
229
|
Files go through \`files\` and Playwright file options, which accept absolute paths
|
|
230
230
|
inside the execute file roots (the temp directory, \`/tmp\`, and directories in
|
|
231
|
-
\`OPENCODE_BROWSER_FILE_ROOTS\`)
|
|
231
|
+
\`OPENCODE_BROWSER_FILE_ROOTS\`); raw CDP commands that name local files are
|
|
232
|
+
checked the same way:
|
|
232
233
|
|
|
233
234
|
\`\`\`js
|
|
234
235
|
const saved = await files.write("report.csv", csvText)
|
|
@@ -236,6 +237,11 @@ const bytes = await files.read(saved) // Buffer; files.read(p, "utf8") for text
|
|
|
236
237
|
await page.screenshot({ path: files.path("page.png") })
|
|
237
238
|
\`\`\`
|
|
238
239
|
|
|
240
|
+
Setting \`Browser.setDownloadBehavior\` (or \`Page.setDownloadBehavior\`) replaces
|
|
241
|
+
Playwright's own download handling, so keep its folder inside the file roots.
|
|
242
|
+
After that, \`page.on("download")\` and \`download.saveAs()\` stop working for the
|
|
243
|
+
context.
|
|
244
|
+
|
|
239
245
|
Use \`page.evaluate\` for \`window\`, \`document\`, storage and same-origin \`fetch\`
|
|
240
246
|
with page cookies. It runs in an isolated world whose \`fetch\` skips the page's
|
|
241
247
|
service worker; pass \`false\` as its fourth argument
|
|
@@ -345,15 +351,19 @@ viewport, state and interaction path actually tested.
|
|
|
345
351
|
## Tabs and settings
|
|
346
352
|
|
|
347
353
|
Tabs agents open close by themselves after about 10 minutes without use (the
|
|
348
|
-
user can choose 30 or 60 minutes, or never). When a task is done,
|
|
349
|
-
|
|
354
|
+
user can choose 30 or 60 minutes, or never). When a task is done, reset or
|
|
355
|
+
delete your own session:
|
|
350
356
|
|
|
351
357
|
\`\`\`bash
|
|
352
|
-
browse
|
|
358
|
+
browse session reset <name> # MCP: session_reset
|
|
359
|
+
browse session delete <name> # MCP: session_delete
|
|
353
360
|
\`\`\`
|
|
354
361
|
|
|
355
|
-
|
|
356
|
-
|
|
362
|
+
\`browse tabs cleanup\` closes idle agent tabs from every session sharing the
|
|
363
|
+
browser, not just yours, and \`--idle-minutes 0\` (\`tabs_cleanup\` with
|
|
364
|
+
\`idleMinutes: 0\`) would close other sessions' pages between their calls, so
|
|
365
|
+
only run it when the user asks. Keep a session only when you will continue with
|
|
366
|
+
it.
|
|
357
367
|
|
|
358
368
|
Use the \`settings\` tool (CLI: \`browse settings get\` / \`settings set key=value …\`)
|
|
359
369
|
only when the user asks to change how browse behaves: where tabs open (\`window\`),
|
|
@@ -394,8 +404,10 @@ Common diagnoses:
|
|
|
394
404
|
page. Running setup again does not reload older workers.
|
|
395
405
|
- \`Target not found\`: attach the intended tab, then select or adopt it by a
|
|
396
406
|
unique URL substring or explicit index.
|
|
397
|
-
-
|
|
398
|
-
tab
|
|
407
|
+
- Dismissing Chromium's debugging bar (Cancel in Chrome, OK in some browsers)
|
|
408
|
+
detaches every tab: browse no longer controls them. Tabs an agent opened stay
|
|
409
|
+
open and close when idle; ask the user to lend the tab again with the toolbar
|
|
410
|
+
button, or continue in a new tab. \`execute\` says when this happened.
|
|
399
411
|
- Repeated execution-context errors: run one short follow-up so browse can
|
|
400
412
|
health-check the page. A live page is reconnected and re-resolved once; a
|
|
401
413
|
crashed or \`chrome-error://\` relay-owned page is recreated. It never replaces
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-xkbs0qyx.mjs";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
entrySpawnCommand,
|
|
4
4
|
installedRuntime2,
|
|
5
5
|
installedVersion
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-w9h0wtxs.mjs";
|
|
7
7
|
|
|
8
8
|
// src/mcp/supervisor.ts
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
@@ -33,7 +33,7 @@ async function runBinaryMcp(args) {
|
|
|
33
33
|
const runtime = installedRuntime2();
|
|
34
34
|
if (!runtime || runtime.kind === "npx") {
|
|
35
35
|
process.env[directEnvironmentVariable] = "1";
|
|
36
|
-
const { runCli } = await import("./cli-
|
|
36
|
+
const { runCli } = await import("./cli-xke2d25m.mjs");
|
|
37
37
|
return runCli();
|
|
38
38
|
}
|
|
39
39
|
const REPLAY = "opencode-browser-shim-initialize";
|
|
@@ -77,7 +77,7 @@ async function runBinaryMcp(args) {
|
|
|
77
77
|
toChild(line);
|
|
78
78
|
};
|
|
79
79
|
const start = (replay) => {
|
|
80
|
-
const [file, ...prefix] =
|
|
80
|
+
const [file, ...prefix] = entrySpawnCommand(command());
|
|
81
81
|
const next = spawn(file, [...prefix, "mcp", ...args], { stdio: ["pipe", "pipe", "inherit"], env: { ...process.env, [directEnvironmentVariable]: "1" } });
|
|
82
82
|
next.stdin.on("error", () => {});
|
|
83
83
|
child = next;
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
updateNotice2,
|
|
5
5
|
createUpdateWatcher2,
|
|
6
6
|
runUpdateCommand2
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-sfb6r1ye.mjs";
|
|
8
8
|
import"./main-mrew6jy8.mjs";
|
|
9
|
-
import"./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
import"./main-w9h0wtxs.mjs";
|
|
10
|
+
import"./main-xkbs0qyx.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
13
13
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/skills/browse/SKILL.md
CHANGED
|
@@ -227,7 +227,8 @@ is no `process`, `require`, `import()`, `eval`, `fs`, `os`,
|
|
|
227
227
|
`page.request`, `context.request` and `browser.browserType()` are unavailable.
|
|
228
228
|
Files go through `files` and Playwright file options, which accept absolute paths
|
|
229
229
|
inside the execute file roots (the temp directory, `/tmp`, and directories in
|
|
230
|
-
`OPENCODE_BROWSER_FILE_ROOTS`)
|
|
230
|
+
`OPENCODE_BROWSER_FILE_ROOTS`); raw CDP commands that name local files are
|
|
231
|
+
checked the same way:
|
|
231
232
|
|
|
232
233
|
```js
|
|
233
234
|
const saved = await files.write("report.csv", csvText)
|
|
@@ -235,6 +236,11 @@ const bytes = await files.read(saved) // Buffer; files.read(p, "utf8") for text
|
|
|
235
236
|
await page.screenshot({ path: files.path("page.png") })
|
|
236
237
|
```
|
|
237
238
|
|
|
239
|
+
Setting `Browser.setDownloadBehavior` (or `Page.setDownloadBehavior`) replaces
|
|
240
|
+
Playwright's own download handling, so keep its folder inside the file roots.
|
|
241
|
+
After that, `page.on("download")` and `download.saveAs()` stop working for the
|
|
242
|
+
context.
|
|
243
|
+
|
|
238
244
|
Use `page.evaluate` for `window`, `document`, storage and same-origin `fetch`
|
|
239
245
|
with page cookies. It runs in an isolated world whose `fetch` skips the page's
|
|
240
246
|
service worker; pass `false` as its fourth argument
|
|
@@ -344,15 +350,19 @@ viewport, state and interaction path actually tested.
|
|
|
344
350
|
## Tabs and settings
|
|
345
351
|
|
|
346
352
|
Tabs agents open close by themselves after about 10 minutes without use (the
|
|
347
|
-
user can choose 30 or 60 minutes, or never). When a task is done,
|
|
348
|
-
|
|
353
|
+
user can choose 30 or 60 minutes, or never). When a task is done, reset or
|
|
354
|
+
delete your own session:
|
|
349
355
|
|
|
350
356
|
```bash
|
|
351
|
-
browse
|
|
357
|
+
browse session reset <name> # MCP: session_reset
|
|
358
|
+
browse session delete <name> # MCP: session_delete
|
|
352
359
|
```
|
|
353
360
|
|
|
354
|
-
|
|
355
|
-
|
|
361
|
+
`browse tabs cleanup` closes idle agent tabs from every session sharing the
|
|
362
|
+
browser, not just yours, and `--idle-minutes 0` (`tabs_cleanup` with
|
|
363
|
+
`idleMinutes: 0`) would close other sessions' pages between their calls, so
|
|
364
|
+
only run it when the user asks. Keep a session only when you will continue with
|
|
365
|
+
it.
|
|
356
366
|
|
|
357
367
|
Use the `settings` tool (CLI: `browse settings get` / `settings set key=value …`)
|
|
358
368
|
only when the user asks to change how browse behaves: where tabs open (`window`),
|
|
@@ -393,8 +403,10 @@ Common diagnoses:
|
|
|
393
403
|
page. Running setup again does not reload older workers.
|
|
394
404
|
- `Target not found`: attach the intended tab, then select or adopt it by a
|
|
395
405
|
unique URL substring or explicit index.
|
|
396
|
-
-
|
|
397
|
-
tab
|
|
406
|
+
- Dismissing Chromium's debugging bar (Cancel in Chrome, OK in some browsers)
|
|
407
|
+
detaches every tab: browse no longer controls them. Tabs an agent opened stay
|
|
408
|
+
open and close when idle; ask the user to lend the tab again with the toolbar
|
|
409
|
+
button, or continue in a new tab. `execute` says when this happened.
|
|
398
410
|
- Repeated execution-context errors: run one short follow-up so browse can
|
|
399
411
|
health-check the page. A live page is reconnected and re-resolved once; a
|
|
400
412
|
crashed or `chrome-error://` relay-owned page is recreated. It never replaces
|