@opencode/browse 0.0.6-dev.24 → 0.0.6-dev.27
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-7zkmgv4c.mjs → cli-n0qhph13.mjs} +10 -10
- package/dist/cli.mjs +12 -13
- package/dist/{helpers-87hhg4yj.mjs → helpers-zeewknn2.mjs} +1 -1
- package/dist/{main-c9gph20g.mjs → main-3g2t8jtq.mjs} +2 -2
- package/dist/{main-ff4v65y7.mjs → main-a4yj9bpn.mjs} +3 -3
- package/dist/{main-b02s2pwd.mjs → main-a6mpfd6z.mjs} +4 -3
- package/dist/{main-bpdgpfnb.mjs → main-bq8az9yr.mjs} +1 -1
- package/dist/{main-mzeff7ra.mjs → main-cxrsjs2z.mjs} +3 -3
- package/dist/main-vp3devjb.mjs +4 -0
- package/dist/{main-kh4wmj6b.mjs → main-x96gxahz.mjs} +2 -2
- package/dist/{main-v1ydywv7.mjs → main-xzc7qp1c.mjs} +3 -3
- package/dist/{mcp-66vbq3eh.mjs → mcp-za7ymfdd.mjs} +7 -7
- package/dist/{relay-m9d4qx12.mjs → relay-xqg264d4.mjs} +11 -11
- package/dist/{runtime-update-3363s1p6.mjs → runtime-update-gteb0gp8.mjs} +4 -4
- package/dist/{setup-xg1wg5n3.mjs → setup-zka6z53q.mjs} +20 -67
- package/dist/{skill-text-v35020jn.mjs → skill-text-kyjcembk.mjs} +2 -3
- package/dist/{supervisor-0htj3g9d.mjs → supervisor-w6hs0gbw.mjs} +3 -3
- package/dist/{update-b7sh1sth.mjs → update-pj25xbh4.mjs} +3 -3
- package/dist/{version-2e7d1st1.mjs → version-1hb8s8jj.mjs} +1 -1
- package/package.json +1 -1
- package/skills/browse/SKILL.md +2 -3
- package/dist/main-gjk0tqwa.mjs +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
opencodeBrowserVersion2,
|
|
4
4
|
opencodeBrowserBuildId2
|
|
5
|
-
} from "./main-
|
|
5
|
+
} from "./main-vp3devjb.mjs";
|
|
6
6
|
import {
|
|
7
7
|
dataRoot,
|
|
8
8
|
fromCheckout,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
devExtension,
|
|
13
13
|
installCommand,
|
|
14
14
|
autoUpdateStatus
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-a6mpfd6z.mjs";
|
|
16
16
|
import {
|
|
17
17
|
extensionProtocolVersion,
|
|
18
18
|
extensionProtocolAdvice
|
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
ensureExtensionConnected,
|
|
36
36
|
stoppedRelayStatus,
|
|
37
37
|
statusCollections
|
|
38
|
-
} from "./main-
|
|
39
|
-
import"./main-
|
|
38
|
+
} from "./main-xzc7qp1c.mjs";
|
|
39
|
+
import"./main-bq8az9yr.mjs";
|
|
40
40
|
import {
|
|
41
41
|
updateJson2,
|
|
42
42
|
formatUpdateNotice2,
|
|
43
43
|
updateNotice2
|
|
44
|
-
} from "./main-
|
|
44
|
+
} from "./main-x96gxahz.mjs";
|
|
45
45
|
import {
|
|
46
46
|
settingKeys,
|
|
47
47
|
formatSettings,
|
|
@@ -54,12 +54,12 @@ import {
|
|
|
54
54
|
addSecret,
|
|
55
55
|
listSecrets,
|
|
56
56
|
removeSecret
|
|
57
|
-
} from "./main-
|
|
57
|
+
} from "./main-cxrsjs2z.mjs";
|
|
58
58
|
import {
|
|
59
59
|
defaultJournalBaseDir,
|
|
60
60
|
readJournalEntries,
|
|
61
61
|
formatJournalEntry
|
|
62
|
-
} from "./main-
|
|
62
|
+
} from "./main-a4yj9bpn.mjs";
|
|
63
63
|
|
|
64
64
|
// src/cli.ts
|
|
65
65
|
import { NodeRuntime, NodeServices } from "@effect/platform-node";
|
|
@@ -950,7 +950,7 @@ var status = Command.make("status", {
|
|
|
950
950
|
}
|
|
951
951
|
})).pipe(Command.withDescription("Show relay, extension, and target status"));
|
|
952
952
|
var mcp = Command.make("mcp", {}, Effect4.fn("Cli.mcp")(function* () {
|
|
953
|
-
const { runMcpServer } = yield* Effect4.promise(() => import("./mcp-
|
|
953
|
+
const { runMcpServer } = yield* Effect4.promise(() => import("./mcp-za7ymfdd.mjs"));
|
|
954
954
|
yield* runMcpServer;
|
|
955
955
|
})).pipe(Command.withDescription("Run the browse MCP server over stdio"));
|
|
956
956
|
registerCliCommand(400, () => tabs);
|
|
@@ -971,7 +971,7 @@ registerCliCommand(810, ({ packageRoot }) => Command.make("doctor", {
|
|
|
971
971
|
}
|
|
972
972
|
})).pipe(Command.withDescription("Diagnose the local browse install and runtime")));
|
|
973
973
|
registerCliCommand(820, () => Command.make("skill", {}, Effect4.fn("Cli.skill")(function* () {
|
|
974
|
-
const { skillText } = yield* Effect4.promise(() => import("./skill-text-
|
|
974
|
+
const { skillText } = yield* Effect4.promise(() => import("./skill-text-kyjcembk.mjs"));
|
|
975
975
|
yield* Console2.log(skillText.trimEnd());
|
|
976
976
|
})).pipe(Command.withDescription("Print the browse agent skill text")));
|
|
977
977
|
registerCliCommand(900, () => mcp);
|
|
@@ -1406,7 +1406,7 @@ registerCliCommand(710, () => flightRecorder);
|
|
|
1406
1406
|
import { Console as Console6, Effect as Effect8 } from "effect";
|
|
1407
1407
|
import { Command as Command5, Flag as Flag6 } from "effect/cli";
|
|
1408
1408
|
var serve = Command5.make("serve", {}, Effect8.fn("Cli.serve")(function* () {
|
|
1409
|
-
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* Effect8.promise(() => Promise.all([import("./relay-
|
|
1409
|
+
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* Effect8.promise(() => Promise.all([import("./relay-xqg264d4.mjs"), import("./helpers-zeewknn2.mjs")]));
|
|
1410
1410
|
const port = yield* portConfig;
|
|
1411
1411
|
const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
|
|
1412
1412
|
yield* Effect8.scoped(Effect8.gen(function* () {
|
package/dist/cli.mjs
CHANGED
|
@@ -2,40 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
var embeddedVersion = "0.0.6-dev.
|
|
5
|
+
var embeddedVersion = "0.0.6-dev.27";
|
|
6
6
|
var setupCommands = new Set(["install", "uninstall", "extension", "pair", "rollback", "set"]);
|
|
7
7
|
var command = process.argv[2];
|
|
8
8
|
var invokedAs = path.basename(process.argv[1] ?? "");
|
|
9
9
|
if (command === "--version" || command === "-v") {
|
|
10
|
-
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-
|
|
10
|
+
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-1hb8s8jj.mjs")).opencodeBrowserVersion;
|
|
11
11
|
process.stdout.write(`${opencodeBrowserVersion}
|
|
12
12
|
`);
|
|
13
13
|
} else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
|
|
14
14
|
const { NodeRuntime } = await import("@effect/platform-node");
|
|
15
|
-
const { runMcpServer } = await import("./mcp-
|
|
15
|
+
const { runMcpServer } = await import("./mcp-za7ymfdd.mjs");
|
|
16
16
|
runMcpServer.pipe(NodeRuntime.runMain);
|
|
17
17
|
} else if (command === "mcp" && globalThis.__OPENCODE_BROWSER_COMPILED__ && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1") {
|
|
18
|
-
const { runBinaryMcp } = await import("./supervisor-
|
|
18
|
+
const { runBinaryMcp } = await import("./supervisor-w6hs0gbw.mjs");
|
|
19
19
|
await runBinaryMcp(process.argv.slice(3));
|
|
20
20
|
} else if (command === "runtime-install" || command === "runtime-switch") {
|
|
21
|
-
const { runRuntimeInstall, runRuntimeSwitch } = await import("./runtime-update-
|
|
21
|
+
const { runRuntimeInstall, runRuntimeSwitch } = await import("./runtime-update-gteb0gp8.mjs");
|
|
22
22
|
await (command === "runtime-install" ? runRuntimeInstall : runRuntimeSwitch)(process.argv.slice(3));
|
|
23
23
|
} else if (command === "update") {
|
|
24
|
-
const { runUpdateCommand } = await import("./update-
|
|
24
|
+
const { runUpdateCommand } = await import("./update-pj25xbh4.mjs");
|
|
25
25
|
await runUpdateCommand(process.argv.slice(3));
|
|
26
26
|
} else if (command && setupCommands.has(command)) {
|
|
27
|
-
const { runSetup } = await import("./setup-
|
|
27
|
+
const { runSetup } = await import("./setup-zka6z53q.mjs");
|
|
28
28
|
await runSetup(command, process.argv.slice(3));
|
|
29
29
|
} else {
|
|
30
30
|
if (!command || command === "--help" || command === "-h") {
|
|
31
31
|
process.stdout.write(`SETUP
|
|
32
32
|
install [--opencode <path>] Install browse: choose agents for the browse MCP server, check which browsers
|
|
33
|
-
have the extension and pair it (when none does,
|
|
34
|
-
|
|
35
|
-
and wait for it)
|
|
33
|
+
have the extension and pair it (when none does, say to add it from the Chrome
|
|
34
|
+
Web Store, open its page, and wait for it)
|
|
36
35
|
--remote For a browser on another computer: open the relay to other computers and print
|
|
37
36
|
its address and a one-time pairing code instead of pairing a browser here
|
|
38
|
-
--no-open Print the steps without opening anything
|
|
37
|
+
--no-open Print the steps without opening anything
|
|
39
38
|
--no-wait Don't wait for the extension to be added or connect
|
|
40
39
|
--wait-seconds <seconds> How long to wait for a connection (default 180 in a terminal, 90 otherwise)
|
|
41
40
|
-a, --agent <names...> Configure named agents (repeatable); '*' or --all-agents selects every supported agent
|
|
@@ -60,9 +59,9 @@ if (command === "--version" || command === "-v") {
|
|
|
60
59
|
`);
|
|
61
60
|
}
|
|
62
61
|
if (command === "status" && !process.argv.includes("--json")) {
|
|
63
|
-
const { printSetupStatus } = await import("./setup-
|
|
62
|
+
const { printSetupStatus } = await import("./setup-zka6z53q.mjs");
|
|
64
63
|
printSetupStatus();
|
|
65
64
|
}
|
|
66
|
-
const { runCli } = await import("./cli-
|
|
65
|
+
const { runCli } = await import("./cli-n0qhph13.mjs");
|
|
67
66
|
runCli();
|
|
68
67
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-bq8az9yr.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dataRoot,
|
|
6
6
|
devExtensionUrl,
|
|
7
7
|
devExtensionFolder
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-a6mpfd6z.mjs";
|
|
9
9
|
|
|
10
10
|
// src/relay/browser-pairing.ts
|
|
11
11
|
import crypto from "node:crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-bq8az9yr.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-xzc7qp1c.mjs";
|
|
7
7
|
import {
|
|
8
8
|
dataRoot
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-a6mpfd6z.mjs";
|
|
10
10
|
|
|
11
11
|
// src/session-manager/journal.ts
|
|
12
12
|
import fs from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-vp3devjb.mjs";
|
|
4
4
|
|
|
5
5
|
// src/update/auto-update.ts
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -64,12 +64,13 @@ function cliCommand(args) {
|
|
|
64
64
|
return `npx @opencode/browse ${args}`;
|
|
65
65
|
}
|
|
66
66
|
var STORE_ITEM_ID = /^[a-p]{32}$/;
|
|
67
|
+
var PUBLIC_STORE_ID = "mfnicocicmmlkpjnaffgihfjhdgjkdjg";
|
|
67
68
|
function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjhdgjkdjg" }) {
|
|
68
69
|
const id = [env.OPENCODE_BROWSER_STORE_ID, baked?.id].find((value) => value && STORE_ITEM_ID.test(value));
|
|
69
70
|
return id ? { id } : {};
|
|
70
71
|
}
|
|
71
72
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
72
|
-
function devExtension(baked = { file: "browse-extension-0.0.6-dev.
|
|
73
|
+
function devExtension(baked = { file: "browse-extension-0.0.6-dev.27.zip", sha256: "c7696375313ea9d7bbd41e65895e0594c6ec66ccebbda988216fb3c79f1950fb", size: 172557 }) {
|
|
73
74
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
74
75
|
}
|
|
75
76
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|
|
@@ -768,4 +769,4 @@ function spawnRuntimeChild(layout, entry, args, onExit, env = process.env) {
|
|
|
768
769
|
}
|
|
769
770
|
}
|
|
770
771
|
|
|
771
|
-
export { dataRoot, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, scriptEntry, entryCommand, runningEntry, checkoutRoot, cliCommand, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, autoUpdateModes, runtimeLayout, versionEntry, channelOf, UPDATE_VERSION, compareVersions, readCurrent, writeCurrent, updateState, npmRuntime, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, registryUrl, fetchPublished, installVersion, pruneVersions, switchVersion, createAutoUpdater };
|
|
772
|
+
export { dataRoot, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, scriptEntry, entryCommand, runningEntry, checkoutRoot, cliCommand, PUBLIC_STORE_ID, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, autoUpdateModes, runtimeLayout, versionEntry, channelOf, UPDATE_VERSION, compareVersions, readCurrent, writeCurrent, updateState, npmRuntime, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, registryUrl, fetchPublished, installVersion, pruneVersions, switchVersion, createAutoUpdater };
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
parseTargetSelection2,
|
|
3
3
|
getObject2,
|
|
4
4
|
getString2
|
|
5
|
-
} from "./main-
|
|
5
|
+
} from "./main-xzc7qp1c.mjs";
|
|
6
6
|
import {
|
|
7
7
|
isNodeError,
|
|
8
8
|
writeJsonFileAtomically
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-bq8az9yr.mjs";
|
|
10
10
|
import {
|
|
11
11
|
dataRoot,
|
|
12
12
|
cliCommand
|
|
13
|
-
} from "./main-
|
|
13
|
+
} from "./main-a6mpfd6z.mjs";
|
|
14
14
|
|
|
15
15
|
// src/relay/user-settings.ts
|
|
16
16
|
var settingKeys = ["window", "grouping", "idleMinutes", "cursor", "humanInput", "handoffNotifications", "autoUpdate"];
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
compareVersions,
|
|
7
7
|
npmRuntime,
|
|
8
8
|
autoUpdateStatus
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-a6mpfd6z.mjs";
|
|
10
10
|
import {
|
|
11
11
|
unpackedReloadAdvice
|
|
12
12
|
} from "./main-3gthmkzw.mjs";
|
|
@@ -315,7 +315,7 @@ function runUpdate(args, deps) {
|
|
|
315
315
|
async function runUpdateCommand2(args) {
|
|
316
316
|
const log = (line) => process.stdout.write(line + `
|
|
317
317
|
`);
|
|
318
|
-
const { runNpmUpdate } = await import("./runtime-update-
|
|
318
|
+
const { runNpmUpdate } = await import("./runtime-update-gteb0gp8.mjs");
|
|
319
319
|
if (await runNpmUpdate(args))
|
|
320
320
|
return;
|
|
321
321
|
if (compiledBinary()) {
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
} from "./main-3gthmkzw.mjs";
|
|
7
7
|
import {
|
|
8
8
|
relayAuthorization
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-bq8az9yr.mjs";
|
|
10
10
|
import {
|
|
11
11
|
opencodeBrowserBuildId2
|
|
12
|
-
} from "./main-
|
|
12
|
+
} from "./main-vp3devjb.mjs";
|
|
13
13
|
import {
|
|
14
14
|
compiledBinary,
|
|
15
15
|
scriptEntry,
|
|
16
16
|
cliCommand,
|
|
17
17
|
installCommand,
|
|
18
18
|
npmRuntime
|
|
19
|
-
} from "./main-
|
|
19
|
+
} from "./main-a6mpfd6z.mjs";
|
|
20
20
|
|
|
21
21
|
// src/relay/helpers.ts
|
|
22
22
|
import { Option, Predicate, Schema as Schema3 } from "effect";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-vp3devjb.mjs";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateStatus
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-a6mpfd6z.mjs";
|
|
7
7
|
import"./main-3gthmkzw.mjs";
|
|
8
8
|
import {
|
|
9
9
|
getObject2,
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
relayBuildProblem,
|
|
13
13
|
ensureRelay,
|
|
14
14
|
ensureExtensionConnected
|
|
15
|
-
} from "./main-
|
|
16
|
-
import"./main-
|
|
15
|
+
} from "./main-xzc7qp1c.mjs";
|
|
16
|
+
import"./main-bq8az9yr.mjs";
|
|
17
17
|
import {
|
|
18
18
|
updateJson2,
|
|
19
19
|
createUpdateWatcher2
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-x96gxahz.mjs";
|
|
21
21
|
import {
|
|
22
22
|
settingKeys,
|
|
23
23
|
settingSpecs,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
toolResult,
|
|
44
44
|
readClient,
|
|
45
45
|
listSecrets
|
|
46
|
-
} from "./main-
|
|
46
|
+
} from "./main-cxrsjs2z.mjs";
|
|
47
47
|
|
|
48
48
|
// src/mcp.ts
|
|
49
49
|
import { NodeStdio } from "@effect/platform-node";
|
|
@@ -179,7 +179,7 @@ registerMcpTools({
|
|
|
179
179
|
destructive: false,
|
|
180
180
|
idempotent: true,
|
|
181
181
|
handle: () => Effect.tryPromise({
|
|
182
|
-
try: () => import("./skill-text-
|
|
182
|
+
try: () => import("./skill-text-kyjcembk.mjs").then((module) => module.skillText),
|
|
183
183
|
catch: (cause) => new Error("read opencode-browser skill", { cause })
|
|
184
184
|
})
|
|
185
185
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-vp3devjb.mjs";
|
|
5
5
|
import {
|
|
6
6
|
dataRoot,
|
|
7
7
|
oldStoreMarker,
|
|
8
8
|
fromCheckout,
|
|
9
9
|
cliCommand,
|
|
10
|
+
PUBLIC_STORE_ID,
|
|
10
11
|
storeConfig,
|
|
11
12
|
devExtension,
|
|
12
13
|
storeUrl,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
setStoredMode,
|
|
19
20
|
autoUpdateStatus,
|
|
20
21
|
createAutoUpdater
|
|
21
|
-
} from "./main-
|
|
22
|
+
} from "./main-a6mpfd6z.mjs";
|
|
22
23
|
import {
|
|
23
24
|
extensionProtocolVersion,
|
|
24
25
|
minExtensionProtocolVersion,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
relayToken,
|
|
43
44
|
secretsEqual,
|
|
44
45
|
ensurePrivateDirectory
|
|
45
|
-
} from "./main-
|
|
46
|
+
} from "./main-bq8az9yr.mjs";
|
|
46
47
|
import {
|
|
47
48
|
ExecuteRequest,
|
|
48
49
|
SessionAdoptRequest,
|
|
@@ -92,7 +93,7 @@ import {
|
|
|
92
93
|
isRestrictedTarget2,
|
|
93
94
|
isRestrictedUrl2,
|
|
94
95
|
dataUrlDocument2
|
|
95
|
-
} from "./main-
|
|
96
|
+
} from "./main-xzc7qp1c.mjs";
|
|
96
97
|
import {
|
|
97
98
|
relayHostname,
|
|
98
99
|
isLocalPeer,
|
|
@@ -114,7 +115,7 @@ import {
|
|
|
114
115
|
wrapToken,
|
|
115
116
|
installedDevExtension,
|
|
116
117
|
syncDevExtension
|
|
117
|
-
} from "./main-
|
|
118
|
+
} from "./main-3g2t8jtq.mjs";
|
|
118
119
|
import {
|
|
119
120
|
SettingsInputError,
|
|
120
121
|
parseSettingChanges,
|
|
@@ -152,16 +153,16 @@ import {
|
|
|
152
153
|
checkNavigationUrl,
|
|
153
154
|
readSecret,
|
|
154
155
|
secretText
|
|
155
|
-
} from "./main-
|
|
156
|
+
} from "./main-cxrsjs2z.mjs";
|
|
156
157
|
import {
|
|
157
158
|
defaultJournalBaseDir,
|
|
158
159
|
makeJournalEntry,
|
|
159
160
|
appendJournalEntry,
|
|
160
161
|
startJournalRetention
|
|
161
|
-
} from "./main-
|
|
162
|
+
} from "./main-a4yj9bpn.mjs";
|
|
162
163
|
import {
|
|
163
164
|
createUpdateWatcher2
|
|
164
|
-
} from "./main-
|
|
165
|
+
} from "./main-x96gxahz.mjs";
|
|
165
166
|
|
|
166
167
|
// src/relay.ts
|
|
167
168
|
import crypto10 from "node:crypto";
|
|
@@ -18148,9 +18149,8 @@ var makeRelay = Effect34.fnUntraced(function* (options = {}) {
|
|
|
18148
18149
|
const browserId = crypto10.randomUUID();
|
|
18149
18150
|
const endpointUrl = `http://${formatHostForUrl2(host)}:${port}`;
|
|
18150
18151
|
const additionalChromeExtensionOrigins = new Set(options.additionalExtensionOrigins ?? []);
|
|
18151
|
-
const storeId = storeConfig().id;
|
|
18152
|
-
|
|
18153
|
-
additionalChromeExtensionOrigins.add(`chrome-extension://${storeId}`);
|
|
18152
|
+
const storeId = storeConfig().id ?? PUBLIC_STORE_ID;
|
|
18153
|
+
additionalChromeExtensionOrigins.add(`chrome-extension://${storeId}`);
|
|
18154
18154
|
const sessionCatalog = options.sessionCatalogPath === null ? undefined : new SessionCatalog(options.sessionCatalogPath ?? defaultSessionCatalogPath(port));
|
|
18155
18155
|
let catalogWritesEnabled = false;
|
|
18156
18156
|
const registry = new TargetRegistry;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-vp3devjb.mjs";
|
|
2
2
|
import {
|
|
3
3
|
cliCommand,
|
|
4
4
|
installCommand,
|
|
@@ -17,15 +17,15 @@ import {
|
|
|
17
17
|
installVersion,
|
|
18
18
|
pruneVersions,
|
|
19
19
|
switchVersion
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-a6mpfd6z.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-
|
|
28
|
-
import"./main-
|
|
27
|
+
} from "./main-xzc7qp1c.mjs";
|
|
28
|
+
import"./main-bq8az9yr.mjs";
|
|
29
29
|
|
|
30
30
|
// src/update/runtime-update.ts
|
|
31
31
|
import { Effect } from "effect";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-vp3devjb.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dataRoot,
|
|
6
6
|
oldStoreMarker,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
entryCommand,
|
|
10
10
|
runningEntry,
|
|
11
11
|
cliCommand,
|
|
12
|
+
PUBLIC_STORE_ID,
|
|
12
13
|
storeConfig,
|
|
13
14
|
devExtension,
|
|
14
15
|
devExtensionFolder,
|
|
@@ -24,10 +25,10 @@ import {
|
|
|
24
25
|
installVersion,
|
|
25
26
|
pruneVersions,
|
|
26
27
|
switchVersion
|
|
27
|
-
} from "./main-
|
|
28
|
+
} from "./main-a6mpfd6z.mjs";
|
|
28
29
|
import {
|
|
29
30
|
relayAuthorization
|
|
30
|
-
} from "./main-
|
|
31
|
+
} from "./main-bq8az9yr.mjs";
|
|
31
32
|
import {
|
|
32
33
|
parseHostname,
|
|
33
34
|
readRelayConfig,
|
|
@@ -44,10 +45,9 @@ import {
|
|
|
44
45
|
legacyPairingCode,
|
|
45
46
|
removeLegacyPairingCode,
|
|
46
47
|
syncDevExtension
|
|
47
|
-
} from "./main-
|
|
48
|
+
} from "./main-3g2t8jtq.mjs";
|
|
48
49
|
import {
|
|
49
50
|
unpackedExtensionId,
|
|
50
|
-
unpackedReloadAdvice,
|
|
51
51
|
extensionProtocolSkew,
|
|
52
52
|
extensionProtocolAdvice
|
|
53
53
|
} from "./main-3gthmkzw.mjs";
|
|
@@ -10803,9 +10803,9 @@ import { existsSync, readFileSync } from "node:fs";
|
|
|
10803
10803
|
import { homedir } from "node:os";
|
|
10804
10804
|
import path2 from "node:path";
|
|
10805
10805
|
import { fileURLToPath } from "node:url";
|
|
10806
|
-
var
|
|
10807
|
-
var STORE_IDS = [
|
|
10808
|
-
var STORE_URL =
|
|
10806
|
+
var storeId = storeConfig().id ?? PUBLIC_STORE_ID;
|
|
10807
|
+
var STORE_IDS = [storeId];
|
|
10808
|
+
var STORE_URL = storeUrl(storeId);
|
|
10809
10809
|
var PACKAGE = "@opencode/browse";
|
|
10810
10810
|
var MCP_NAME = "browse";
|
|
10811
10811
|
var LEGACY_MCP_NAME = "opencode-browser";
|
|
@@ -10841,7 +10841,7 @@ var checkoutExtensionDirs = (() => {
|
|
|
10841
10841
|
})();
|
|
10842
10842
|
var dev = fromSource ? undefined : devExtension();
|
|
10843
10843
|
var unpackedFolder = () => checkoutExtensionDirs[1] ?? (dev ? devExtensionFolder(root) : undefined);
|
|
10844
|
-
var connectedMessage = "✓ Connected to your browser.
|
|
10844
|
+
var connectedMessage = "✓ Connected to your browser. Ask your agent to open a page.";
|
|
10845
10845
|
var pairedOfflineMessage = "! Not connected yet. Open the browser profile already paired with browse and make sure the extension is enabled. It reconnects automatically.";
|
|
10846
10846
|
var manualPair = (code) => `Open the Extensions menu → browse → Options, enter ${formatPairingCode(code)} as the pairing code, then click Pair.`;
|
|
10847
10847
|
function flag(args, name) {
|
|
@@ -11008,10 +11008,6 @@ function browsers() {
|
|
|
11008
11008
|
browser("Helium", configRoot, "net.imput.helium", ["helium", "helium-browser"])
|
|
11009
11009
|
];
|
|
11010
11010
|
}
|
|
11011
|
-
function extensionsPage(browser) {
|
|
11012
|
-
const scheme = { "Microsoft Edge": "edge", Brave: "brave", Vivaldi: "vivaldi", Opera: "opera" }[browser.name];
|
|
11013
|
-
return `${scheme ?? "chrome"}://extensions`;
|
|
11014
|
-
}
|
|
11015
11011
|
function detectBrowsers() {
|
|
11016
11012
|
return browsers().flatMap((browser) => {
|
|
11017
11013
|
const state = readLocked(path3.join(browser.userData, "Local State"));
|
|
@@ -11298,24 +11294,11 @@ ${block}`, `
|
|
|
11298
11294
|
function locateExtension(options, effects = systemEffects) {
|
|
11299
11295
|
const { log } = effects;
|
|
11300
11296
|
const listing = options.storeUrl ?? STORE_URL;
|
|
11301
|
-
const noListing = () => log(`! This package doesn't know its Chrome Web Store item, so it can't install the extension. Install a released version (\`npx @opencode/browse install\`), or set up browse from a checkout.`);
|
|
11302
|
-
const pairLater = () => log(` Once it's added, run \`${cliCommand("install")}\` again to pair it with the relay.`);
|
|
11303
11297
|
if (options.pairedOffline)
|
|
11304
11298
|
return log(pairedOfflineMessage), "ready";
|
|
11305
|
-
if (options.env.ssh) {
|
|
11306
|
-
if (options.connected)
|
|
11307
|
-
return log(connectedMessage), "ready";
|
|
11308
|
-
if (options.folder)
|
|
11309
|
-
unpackedSteps({ folder: options.folder, platform: options.env.platform, log });
|
|
11310
|
-
else if (listing)
|
|
11311
|
-
log(`Install browse in your browser from the Chrome Web Store: ${listing}`), pairLater();
|
|
11312
|
-
else
|
|
11313
|
-
noListing();
|
|
11314
|
-
return "guided";
|
|
11315
|
-
}
|
|
11316
11299
|
if (options.connected)
|
|
11317
11300
|
return log(connectedMessage), "ready";
|
|
11318
|
-
if (options.detections.some((detection) => detection.enabled.length))
|
|
11301
|
+
if (!options.env.ssh && options.detections.some((detection) => detection.enabled.length))
|
|
11319
11302
|
return "ready";
|
|
11320
11303
|
const off = options.detections.flatMap((detection) => detection.disabled);
|
|
11321
11304
|
if (off.length) {
|
|
@@ -11326,26 +11309,9 @@ function locateExtension(options, effects = systemEffects) {
|
|
|
11326
11309
|
if (blocked.length)
|
|
11327
11310
|
log(`! Couldn't check ${blocked.join(", ")} for browse (${blockedReason()})`);
|
|
11328
11311
|
const target = options.preferred ?? options.detections.find((detection) => !detection.blocked)?.browser;
|
|
11329
|
-
const interactive = options.allowOpen && options.env.display;
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
return noListing(), "guided";
|
|
11333
|
-
const opened = interactive && !blocked.length && (target ? effects.open(target, listing) : effects.openDefault?.(listing));
|
|
11334
|
-
log(`Add browse to ${target?.name ?? "your browser"} from the Chrome Web Store${opened ? " (opened)" : ""}: ${listing}`);
|
|
11335
|
-
return "guided";
|
|
11336
|
-
}
|
|
11337
|
-
const act = interactive && !blocked.length;
|
|
11338
|
-
const page = target ? extensionsPage(target) : "chrome://extensions";
|
|
11339
|
-
unpackedSteps({
|
|
11340
|
-
folder: options.folder,
|
|
11341
|
-
platform: options.env.platform,
|
|
11342
|
-
log,
|
|
11343
|
-
browser: target?.name,
|
|
11344
|
-
page,
|
|
11345
|
-
opened: act && target !== undefined && effects.open(target, page),
|
|
11346
|
-
revealed: act && options.env.tty && effects.reveal(options.folder),
|
|
11347
|
-
copied: act && options.env.tty && effects.copy(options.folder)
|
|
11348
|
-
});
|
|
11312
|
+
const interactive = options.allowOpen && options.env.display && !options.env.ssh;
|
|
11313
|
+
const opened = interactive && !blocked.length && (target ? effects.open(target, listing) : effects.openDefault?.(listing));
|
|
11314
|
+
log(`Add browse to ${target?.name ?? "your browser"} from the Chrome Web Store${opened ? " (opened)" : ""}: ${listing}`);
|
|
11349
11315
|
return "guided";
|
|
11350
11316
|
}
|
|
11351
11317
|
function pairStoreExtension(options, effects = systemEffects) {
|
|
@@ -11362,13 +11328,6 @@ function pairStoreExtension(options, effects = systemEffects) {
|
|
|
11362
11328
|
effects.log(`To connect browse in ${match.browser.name}: ${manualPair(options.code())}`);
|
|
11363
11329
|
return "manual";
|
|
11364
11330
|
}
|
|
11365
|
-
function unpackedSteps(step) {
|
|
11366
|
-
const { log } = step;
|
|
11367
|
-
const page = step.page ?? "chrome://extensions";
|
|
11368
|
-
const fileManager = step.platform === "darwin" ? "Finder" : step.platform === "win32" ? "Explorer" : "your file manager";
|
|
11369
|
-
const paste = step.platform === "darwin" ? "press Cmd+Shift+G in the folder picker and paste" : "paste it into the folder picker";
|
|
11370
|
-
log(`Load browse in ${step.browser ?? "your browser"}: open ${page}${step.opened ? " (opened)" : ""}, turn on Developer mode, click Load unpacked and choose ${step.folder}${step.copied ? ` (path copied: ${paste})` : step.revealed ? ` (shown in ${fileManager})` : ""}`);
|
|
11371
|
-
}
|
|
11372
11331
|
async function waitForExtension(options) {
|
|
11373
11332
|
const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
11374
11333
|
for (let waited = 0;; waited += options.intervalMs) {
|
|
@@ -11599,8 +11558,7 @@ async function syncDev() {
|
|
|
11599
11558
|
if (!dev)
|
|
11600
11559
|
return;
|
|
11601
11560
|
try {
|
|
11602
|
-
|
|
11603
|
-
log2(result === "updated" ? `✓ Downloaded the dev extension (${dev.file}) to ${devExtensionFolder(root)}` : `✓ Dev extension ${dev.file} is in ${devExtensionFolder(root)}`);
|
|
11561
|
+
await syncDevExtension(dev, { root });
|
|
11604
11562
|
} catch (error) {
|
|
11605
11563
|
fail(`Could not get the dev extension: ${error.message}`);
|
|
11606
11564
|
}
|
|
@@ -11873,7 +11831,7 @@ async function install(args) {
|
|
|
11873
11831
|
if (!rail.active)
|
|
11874
11832
|
return;
|
|
11875
11833
|
rail.waiting?.stop();
|
|
11876
|
-
outro(process.exitCode ? "browse isn't fully set up yet. Fix the steps above, then run browse install again." : byHand ? "Done. Add the MCP server above to your agent,
|
|
11834
|
+
outro(process.exitCode ? "browse isn't fully set up yet. Fix the steps above, then run browse install again." : byHand ? "Done. Add the MCP server above to your agent, then ask it to open a page." : "Done. Ask your agent to open a page.");
|
|
11877
11835
|
}
|
|
11878
11836
|
var byHand = false;
|
|
11879
11837
|
function showManualMcp(command, caller) {
|
|
@@ -11992,8 +11950,6 @@ async function installSteps(args, tty, caller) {
|
|
|
11992
11950
|
const reload = connected ? await reloadOutdatedExtension(connected, folder) : "current";
|
|
11993
11951
|
if (reload === "reloaded")
|
|
11994
11952
|
log2("✓ Reloaded browse in your browser");
|
|
11995
|
-
if (reload === "stale")
|
|
11996
|
-
return log2(`! ${unpackedReloadAdvice}`);
|
|
11997
11953
|
}
|
|
11998
11954
|
const reportMismatch = (status) => {
|
|
11999
11955
|
const advice = status.nextStep ?? extensionProtocolAdvice(status.protocolVersion, { install: installCommand() });
|
|
@@ -12030,12 +11986,11 @@ async function installSteps(args, tty, caller) {
|
|
|
12030
11986
|
allowOpen: !args.includes("--no-open"),
|
|
12031
11987
|
connected: !!connected,
|
|
12032
11988
|
pairedOffline,
|
|
12033
|
-
...folder ? { folder } : {},
|
|
12034
11989
|
detections,
|
|
12035
11990
|
preferred: ssh ? undefined : defaultBrowser(detections.map((detection) => detection.browser)),
|
|
12036
11991
|
env
|
|
12037
11992
|
});
|
|
12038
|
-
if (connected || found === "off" || pairedOffline
|
|
11993
|
+
if (connected || found === "off" || pairedOffline)
|
|
12039
11994
|
return;
|
|
12040
11995
|
ensureRelay(entry);
|
|
12041
11996
|
let code;
|
|
@@ -12051,11 +12006,9 @@ async function installSteps(args, tty, caller) {
|
|
|
12051
12006
|
const blocked = detections.filter((d) => d.blocked).map((d) => d.browser.name);
|
|
12052
12007
|
if (offer === "none" && blocked.length)
|
|
12053
12008
|
log2(`Couldn't check ${blocked.join(", ")}. If browse is already installed there, pair it manually. ${manualPair(pairingCode())}`);
|
|
12054
|
-
const next =
|
|
12009
|
+
const next = `If browse isn't connected after you add it, run \`${cliCommand("install")}\` again to pair it.`;
|
|
12055
12010
|
const agentNext = () => {
|
|
12056
|
-
|
|
12057
|
-
return `Agent: if browse is already loaded unpacked, ask the user: ${unpackedReloadAdvice} Otherwise ask them to load ${folder}. Check the connection with the browse status tool.`;
|
|
12058
|
-
return `Agent: ${offer === "opened" ? "ask the user to open browse's status page in their browser" : offer === "manual" || blocked.length ? "ask the user to finish pairing in browse's Options" : "ask the user to add browse in their browser"}. Then re-run \`${cliCommand("install")}\` to finish, or call the browse status tool to check the connection.`;
|
|
12011
|
+
return `Agent: ${offer === "opened" ? "ask the user to open browse's status page in their browser" : offer === "manual" || blocked.length ? "ask the user to finish pairing in browse's Options" : "ask the user to add browse from the Chrome Web Store"}. Then re-run \`${cliCommand("install")}\` to finish, or call the browse status tool to check the connection.`;
|
|
12059
12012
|
};
|
|
12060
12013
|
if (!env.tty)
|
|
12061
12014
|
log2(agentNext());
|
|
@@ -12088,7 +12041,7 @@ async function installSteps(args, tty, caller) {
|
|
|
12088
12041
|
return log2(connectedMessage);
|
|
12089
12042
|
if (status?.pairingState === "paired-offline")
|
|
12090
12043
|
return log2(pairedOfflineMessage);
|
|
12091
|
-
if (
|
|
12044
|
+
if (offer === "none") {
|
|
12092
12045
|
const scan = detectBrowsers();
|
|
12093
12046
|
if (!checkStore(scan))
|
|
12094
12047
|
return;
|
|
@@ -12128,7 +12081,7 @@ async function runSetup(command, args) {
|
|
|
12128
12081
|
if (command === "set")
|
|
12129
12082
|
return set(args);
|
|
12130
12083
|
if (command === "rollback") {
|
|
12131
|
-
const { runRollback } = await import("./runtime-update-
|
|
12084
|
+
const { runRollback } = await import("./runtime-update-gteb0gp8.mjs");
|
|
12132
12085
|
return runRollback(args);
|
|
12133
12086
|
}
|
|
12134
12087
|
}
|
|
@@ -900,8 +900,7 @@ with the command it names. If the user asks you to update browse, run that
|
|
|
900
900
|
command yourself (\`node <browse>/cli/dist/cli.mjs update\`): it fast-forwards the
|
|
901
901
|
git clone and reruns setup, and refuses with the fix when the clone has local
|
|
902
902
|
changes or has diverged. Pass its refusal on rather than resolving git state
|
|
903
|
-
yourself.
|
|
904
|
-
browser work first and tell them to restart.
|
|
903
|
+
yourself. Finish in-flight browser work before you run it.
|
|
905
904
|
|
|
906
905
|
## Troubleshooting
|
|
907
906
|
|
|
@@ -922,7 +921,7 @@ Common diagnoses:
|
|
|
922
921
|
\`unpaired\` or \`refused\` means browse is installed: re-run install to pair it, **not** the store.
|
|
923
922
|
\`paired-offline\`: reopen the paired browser profile and enable browse; its worker wakes every 30 seconds.
|
|
924
923
|
\`not-seen\`: the relay hasn't heard from a browser. If browse is already added, open that browser and
|
|
925
|
-
rerun install. Otherwise follow install's store
|
|
924
|
+
rerun install. Otherwise follow install's store step.
|
|
926
925
|
- Incompatible extension protocol: follow \`extension.nextStep\`. For an older unpacked extension after setup,
|
|
927
926
|
ask the user: “Reload browse on your browser's extensions page (↻).” Running setup again does not reload older workers.
|
|
928
927
|
- Competing browser/profile connections: the active browser is preserved and
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-vp3devjb.mjs";
|
|
2
2
|
import {
|
|
3
3
|
versionEntry,
|
|
4
4
|
readCurrent,
|
|
5
5
|
npmRuntime
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-a6mpfd6z.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-n0qhph13.mjs");
|
|
18
18
|
return runCli();
|
|
19
19
|
}
|
|
20
20
|
const { layout } = runtime;
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
updateNotice2,
|
|
5
5
|
createUpdateWatcher2,
|
|
6
6
|
runUpdateCommand2
|
|
7
|
-
} from "./main-
|
|
8
|
-
import"./main-
|
|
9
|
-
import"./main-
|
|
7
|
+
} from "./main-x96gxahz.mjs";
|
|
8
|
+
import"./main-a6mpfd6z.mjs";
|
|
9
|
+
import"./main-vp3devjb.mjs";
|
|
10
10
|
import"./main-3gthmkzw.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
package/package.json
CHANGED
package/skills/browse/SKILL.md
CHANGED
|
@@ -899,8 +899,7 @@ with the command it names. If the user asks you to update browse, run that
|
|
|
899
899
|
command yourself (`node <browse>/cli/dist/cli.mjs update`): it fast-forwards the
|
|
900
900
|
git clone and reruns setup, and refuses with the fix when the clone has local
|
|
901
901
|
changes or has diverged. Pass its refusal on rather than resolving git state
|
|
902
|
-
yourself.
|
|
903
|
-
browser work first and tell them to restart.
|
|
902
|
+
yourself. Finish in-flight browser work before you run it.
|
|
904
903
|
|
|
905
904
|
## Troubleshooting
|
|
906
905
|
|
|
@@ -921,7 +920,7 @@ Common diagnoses:
|
|
|
921
920
|
`unpaired` or `refused` means browse is installed: re-run install to pair it, **not** the store.
|
|
922
921
|
`paired-offline`: reopen the paired browser profile and enable browse; its worker wakes every 30 seconds.
|
|
923
922
|
`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
|
|
923
|
+
rerun install. Otherwise follow install's store step.
|
|
925
924
|
- Incompatible extension protocol: follow `extension.nextStep`. For an older unpacked extension after setup,
|
|
926
925
|
ask the user: “Reload browse on your browser's extensions page (↻).” Running setup again does not reload older workers.
|
|
927
926
|
- Competing browser/profile connections: the active browser is preserved and
|
package/dist/main-gjk0tqwa.mjs
DELETED