@opencode/browse 0.0.15-dev.102 → 0.0.15-dev.104
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-9sgczzrw.mjs → cli-gmcaa8qb.mjs} +9 -9
- package/dist/cli.mjs +11 -11
- package/dist/{helpers-18tnh8f3.mjs → helpers-sgcbqpe4.mjs} +1 -1
- package/dist/{main-80jesay1.mjs → main-31v8xyf6.mjs} +3 -3
- package/dist/{main-0wvv6nat.mjs → main-45f52ch9.mjs} +44 -5
- package/dist/{main-ezf20xwm.mjs → main-6s978p18.mjs} +1 -1
- package/dist/{main-0jyyvzkx.mjs → main-7q7wxe04.mjs} +2 -2
- package/dist/main-dx69nfvd.mjs +4 -0
- package/dist/{main-rz1540v9.mjs → main-dxevz15s.mjs} +2 -2
- package/dist/{main-qxer7zjj.mjs → main-gsbhq9et.mjs} +2 -2
- package/dist/{main-f7qkgyz5.mjs → main-wj876afj.mjs} +23 -9
- package/dist/{main-8r1t7vba.mjs → main-ynpptf5e.mjs} +1 -1
- package/dist/{main-2rtwhyhh.mjs → main-zmmsgx7j.mjs} +2 -2
- package/dist/{mcp-rmj6h1s1.mjs → mcp-3g667176.mjs} +6 -6
- package/dist/{migrate-xgnfe9c3.mjs → migrate-d7czbna8.mjs} +4 -4
- package/dist/{relay-5zw323v4.mjs → relay-0xvjxftx.mjs} +18 -10
- package/dist/{runtime-update-wn4gab74.mjs → runtime-update-26aa8xp0.mjs} +4 -4
- package/dist/{setup-6fa9eddq.mjs → setup-ayackqkg.mjs} +16 -15
- package/dist/{supervisor-rce413ez.mjs → supervisor-kj6k1dvs.mjs} +5 -5
- package/dist/{update-g0qt4kea.mjs → update-8ypbbkwq.mjs} +3 -3
- package/dist/{version-kpv6469c.mjs → version-9wqpt90e.mjs} +1 -1
- package/package.json +1 -1
- package/dist/main-aeg6a5nk.mjs +0 -4
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
import {
|
|
106
106
|
opencodeBrowserVersion2,
|
|
107
107
|
opencodeBrowserBuildId2
|
|
108
|
-
} from "./main-
|
|
108
|
+
} from "./main-dx69nfvd.mjs";
|
|
109
109
|
import {
|
|
110
110
|
configRoot2,
|
|
111
111
|
dataRoot,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
devExtension,
|
|
119
119
|
installCommand,
|
|
120
120
|
autoUpdateStatus
|
|
121
|
-
} from "./main-
|
|
121
|
+
} from "./main-45f52ch9.mjs";
|
|
122
122
|
import {
|
|
123
123
|
extensionProtocolVersion,
|
|
124
124
|
extensionProtocolAdvice
|
|
@@ -144,13 +144,13 @@ import {
|
|
|
144
144
|
ensureExtensionConnected,
|
|
145
145
|
stoppedRelayStatus,
|
|
146
146
|
statusCollections
|
|
147
|
-
} from "./main-
|
|
147
|
+
} from "./main-31v8xyf6.mjs";
|
|
148
148
|
import"./main-vgzr4689.mjs";
|
|
149
149
|
import {
|
|
150
150
|
updateJson2,
|
|
151
151
|
formatUpdateNotice2,
|
|
152
152
|
updateNotice2
|
|
153
|
-
} from "./main-
|
|
153
|
+
} from "./main-gsbhq9et.mjs";
|
|
154
154
|
import {
|
|
155
155
|
settingKeys,
|
|
156
156
|
formatSettings,
|
|
@@ -158,13 +158,13 @@ import {
|
|
|
158
158
|
addSecret,
|
|
159
159
|
listSecrets,
|
|
160
160
|
removeSecret
|
|
161
|
-
} from "./main-
|
|
161
|
+
} from "./main-dxevz15s.mjs";
|
|
162
162
|
import {
|
|
163
163
|
defaultJournalBaseDir,
|
|
164
164
|
readJournalEntries,
|
|
165
165
|
formatJournalEntry
|
|
166
|
-
} from "./main-
|
|
167
|
-
import"./main-
|
|
166
|
+
} from "./main-7q7wxe04.mjs";
|
|
167
|
+
import"./main-6s978p18.mjs";
|
|
168
168
|
import {
|
|
169
169
|
pipeArguments,
|
|
170
170
|
dual,
|
|
@@ -5867,7 +5867,7 @@ var status = make("status", {
|
|
|
5867
5867
|
}
|
|
5868
5868
|
})).pipe(withDescription4("Show relay, extension, and target status"));
|
|
5869
5869
|
var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
|
|
5870
|
-
const { runMcpServer } = yield* promise(() => import("./mcp-
|
|
5870
|
+
const { runMcpServer } = yield* promise(() => import("./mcp-3g667176.mjs"));
|
|
5871
5871
|
yield* runMcpServer;
|
|
5872
5872
|
})).pipe(withDescription4("Run the browse MCP server over stdio"));
|
|
5873
5873
|
registerCliCommand(400, () => tabs);
|
|
@@ -6315,7 +6315,7 @@ registerCliCommand(710, () => flightRecorder);
|
|
|
6315
6315
|
|
|
6316
6316
|
// src/cli/relay.ts
|
|
6317
6317
|
var serve = make("serve", {}, fn("Cli.serve")(function* () {
|
|
6318
|
-
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-
|
|
6318
|
+
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-0xvjxftx.mjs"), import("./helpers-sgcbqpe4.mjs")]));
|
|
6319
6319
|
const port = yield* portConfig;
|
|
6320
6320
|
const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
|
|
6321
6321
|
yield* scoped(gen(function* () {
|
package/dist/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
// src/main.ts
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
var embeddedVersion = "0.0.15-dev.
|
|
9
|
+
var embeddedVersion = "0.0.15-dev.104";
|
|
10
10
|
var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
|
|
11
11
|
var command = process.argv[2];
|
|
12
12
|
var args = process.argv.slice(3);
|
|
@@ -17,29 +17,29 @@ var askedForHelp = command === "--help" || command === "-h" || options.some((arg
|
|
|
17
17
|
var preCliHelp = askedForHelp && (command === "update" || command !== undefined && setupCommands.has(command));
|
|
18
18
|
if (command !== "--version" && command !== "-v" && !askedForHelp && !process.env.OPENCODE_BROWSER_HOME && legacyRoots().some((root) => fs.existsSync(root))) {
|
|
19
19
|
try {
|
|
20
|
-
const { migrateLegacy } = await import("./migrate-
|
|
20
|
+
const { migrateLegacy } = await import("./migrate-d7czbna8.mjs");
|
|
21
21
|
migrateLegacy();
|
|
22
22
|
} catch {}
|
|
23
23
|
}
|
|
24
24
|
if (command === "--version" || command === "-v") {
|
|
25
|
-
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-
|
|
25
|
+
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-9wqpt90e.mjs")).opencodeBrowserVersion;
|
|
26
26
|
process.stdout.write(`${opencodeBrowserVersion}
|
|
27
27
|
`);
|
|
28
|
-
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-
|
|
29
|
-
const { runBinaryMcp } = await import("./supervisor-
|
|
28
|
+
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-kj6k1dvs.mjs")).supervisesMcp()) {
|
|
29
|
+
const { runBinaryMcp } = await import("./supervisor-kj6k1dvs.mjs");
|
|
30
30
|
await runBinaryMcp(process.argv.slice(3));
|
|
31
31
|
} else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
|
|
32
32
|
const { NodeRuntime } = await import("./index-yzz55kxm.mjs");
|
|
33
|
-
const { runMcpServer } = await import("./mcp-
|
|
33
|
+
const { runMcpServer } = await import("./mcp-3g667176.mjs");
|
|
34
34
|
runMcpServer.pipe(NodeRuntime.runMain);
|
|
35
35
|
} else if (command === "self-update" || command === "runtime-switch") {
|
|
36
|
-
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-
|
|
36
|
+
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-26aa8xp0.mjs");
|
|
37
37
|
await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
|
|
38
38
|
} else if (command === "update" && !askedForHelp) {
|
|
39
|
-
const { runUpdateCommand } = await import("./update-
|
|
39
|
+
const { runUpdateCommand } = await import("./update-8ypbbkwq.mjs");
|
|
40
40
|
await runUpdateCommand(process.argv.slice(3));
|
|
41
41
|
} else if (command && setupCommands.has(command) && !askedForHelp) {
|
|
42
|
-
const { runSetup } = await import("./setup-
|
|
42
|
+
const { runSetup } = await import("./setup-ayackqkg.mjs");
|
|
43
43
|
await runSetup(command, process.argv.slice(3));
|
|
44
44
|
} else {
|
|
45
45
|
if (preCliHelp || !command || command === "--help" || command === "-h") {
|
|
@@ -76,9 +76,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
|
|
|
76
76
|
`);
|
|
77
77
|
}
|
|
78
78
|
if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
|
|
79
|
-
const { printSetupStatus } = await import("./setup-
|
|
79
|
+
const { printSetupStatus } = await import("./setup-ayackqkg.mjs");
|
|
80
80
|
printSetupStatus();
|
|
81
81
|
}
|
|
82
|
-
const { runCli } = await import("./cli-
|
|
82
|
+
const { runCli } = await import("./cli-gmcaa8qb.mjs");
|
|
83
83
|
runCli(preCliHelp ? ["--help"] : undefined);
|
|
84
84
|
}
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
} from "./main-csnx585b.mjs";
|
|
108
108
|
import {
|
|
109
109
|
opencodeBrowserBuildId2
|
|
110
|
-
} from "./main-
|
|
110
|
+
} from "./main-dx69nfvd.mjs";
|
|
111
111
|
import {
|
|
112
112
|
compiledBinary,
|
|
113
113
|
scriptEntry,
|
|
@@ -116,10 +116,10 @@ import {
|
|
|
116
116
|
compareVersions,
|
|
117
117
|
installedRuntime2,
|
|
118
118
|
installedVersion
|
|
119
|
-
} from "./main-
|
|
119
|
+
} from "./main-45f52ch9.mjs";
|
|
120
120
|
import {
|
|
121
121
|
relayAuthorization
|
|
122
|
-
} from "./main-
|
|
122
|
+
} from "./main-6s978p18.mjs";
|
|
123
123
|
import {
|
|
124
124
|
dual,
|
|
125
125
|
memoize,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-dx69nfvd.mjs";
|
|
4
4
|
|
|
5
5
|
// src/paths.ts
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -57,6 +57,45 @@ var binaryPackage = () => globalThis.__OPENCODE_BROWSER_TARGET__ ? `@opencode/br
|
|
|
57
57
|
var binaryName = (platform = process.platform) => platform === "win32" ? "browse.exe" : "browse";
|
|
58
58
|
var scriptEntry = (entry) => /\.[cm]?[jt]s$/.test(entry);
|
|
59
59
|
var entryCommand = (entry, node = process.execPath) => scriptEntry(entry) ? [node, entry] : [entry];
|
|
60
|
+
var windowsShellShim = (entry, pathModule) => /\.(cmd|bat)$/i.test(entry) || pathModule.extname(entry) === "" && !pathModule.isAbsolute(entry) && !/[\\/]/.test(entry);
|
|
61
|
+
var npxEntry = (entry) => /(^|\/)_npx\//.test(entry.replaceAll("\\", "/"));
|
|
62
|
+
function resolveWindowsShim(entry, node = process.execPath, options = {}) {
|
|
63
|
+
const pathModule = options.pathModule ?? path.win32;
|
|
64
|
+
const exists = options.existsSync ?? fs.existsSync;
|
|
65
|
+
if (!windowsShellShim(entry, pathModule))
|
|
66
|
+
return;
|
|
67
|
+
const shimmed = /\.(cmd|bat)$/i.test(entry);
|
|
68
|
+
const withFolder = shimmed && (pathModule.isAbsolute(entry) || /[\\/]/.test(entry));
|
|
69
|
+
const directories = withFolder ? [pathModule.dirname(entry)] : (options.env ?? process.env).PATH?.split(";").map((directory) => directory.trim().replace(/^"(.*)"$/, "$1")).filter(Boolean) ?? [];
|
|
70
|
+
for (const directory of directories) {
|
|
71
|
+
if (!shimmed) {
|
|
72
|
+
const executable = pathModule.join(directory, `${entry}.exe`);
|
|
73
|
+
if (exists(executable))
|
|
74
|
+
return [executable];
|
|
75
|
+
}
|
|
76
|
+
const shim = withFolder ? entry : pathModule.join(directory, shimmed ? entry : `${entry}.cmd`);
|
|
77
|
+
if (!exists(shim))
|
|
78
|
+
continue;
|
|
79
|
+
const script = pathModule.join(directory, "node_modules", "@opencode", "browse", "dist", "cli.mjs");
|
|
80
|
+
if (exists(script))
|
|
81
|
+
return [node, script];
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
function entrySpawnCommand(entry, node = process.execPath, options = {}) {
|
|
86
|
+
if (scriptEntry(entry))
|
|
87
|
+
return [node, entry];
|
|
88
|
+
const pathModule = options.pathModule ?? path.win32;
|
|
89
|
+
if ((options.platform ?? process.platform) !== "win32" || !windowsShellShim(entry, pathModule))
|
|
90
|
+
return [entry];
|
|
91
|
+
const resolved = resolveWindowsShim(entry, node, options);
|
|
92
|
+
if (resolved)
|
|
93
|
+
return resolved;
|
|
94
|
+
const running = options.running ?? runningEntry();
|
|
95
|
+
const compiled = options.compiled ?? compiledBinary();
|
|
96
|
+
const checkout = options.checkout ?? fromCheckout();
|
|
97
|
+
return !compiled && !checkout && scriptEntry(running) && !npxEntry(running) ? [node, running] : [entry];
|
|
98
|
+
}
|
|
60
99
|
function installedBinary() {
|
|
61
100
|
const binary = installedBinaryPath();
|
|
62
101
|
return fs.existsSync(binary) ? binary : undefined;
|
|
@@ -71,7 +110,7 @@ function cliInstall() {
|
|
|
71
110
|
return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
|
|
72
111
|
if (fromCheckout())
|
|
73
112
|
return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
|
|
74
|
-
return { kind: "npm", version: "0.0.15-dev.
|
|
113
|
+
return { kind: "npm", version: "0.0.15-dev.104", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
|
|
75
114
|
}
|
|
76
115
|
function cliPrefix(install = cliInstall()) {
|
|
77
116
|
if (install.kind === "binary") {
|
|
@@ -93,7 +132,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
|
|
|
93
132
|
return id ? { id } : {};
|
|
94
133
|
}
|
|
95
134
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
96
|
-
function devExtension(baked = { file: "browse-extension-0.0.15-dev.
|
|
135
|
+
function devExtension(baked = { file: "browse-extension-0.0.15-dev.104.zip", sha256: "9f9232a8b8e07983d91875f23794db7b94a4e50c2973c41dba37b85e4da740cb", size: 183070 }) {
|
|
97
136
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
98
137
|
}
|
|
99
138
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|
|
@@ -713,7 +752,7 @@ function spawnRuntimeChild(runtime, args, onExit, env = process.env) {
|
|
|
713
752
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
714
753
|
const log = openSync(path3.join(directory, "auto-update.log"), "a", 384);
|
|
715
754
|
try {
|
|
716
|
-
const [file, ...prefix] =
|
|
755
|
+
const [file, ...prefix] = entrySpawnCommand(runtime.entry);
|
|
717
756
|
const child = spawn(file, [...prefix, ...args], { detached: true, stdio: ["ignore", log, log], env: rest });
|
|
718
757
|
child.on("error", () => onExit(null));
|
|
719
758
|
child.on("exit", (code) => onExit(code));
|
|
@@ -727,4 +766,4 @@ function spawnRuntimeChild(runtime, args, onExit, env = process.env) {
|
|
|
727
766
|
}
|
|
728
767
|
}
|
|
729
768
|
|
|
730
|
-
export { defaultRoots, configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, installerBinaryPath, defaultSettingsPath, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, binaryName, scriptEntry, entryCommand, runningEntry, checkoutRoot, cliCommand, PUBLIC_STORE_ID, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, runningServiceTarget, releaseChannel, checkRelease, autoUpdateModes, UPDATE_VERSION, channelOf, compareVersions, installedRuntime2, installedVersion, updateState, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, updateAvailable, runCommand, registryUrl, fetchPublished, runInstaller, createAutoUpdater };
|
|
769
|
+
export { defaultRoots, configRoot2, dataRoot, stateRoot, cacheRoot, binRoot, installedBinaryPath, installerBinaryPath, defaultSettingsPath, oldStoreMarker, fromCheckout, compiledBinary, binaryPackage, binaryName, scriptEntry, entryCommand, resolveWindowsShim, entrySpawnCommand, runningEntry, checkoutRoot, cliCommand, PUBLIC_STORE_ID, storeConfig, devExtension, devExtensionUrl, devExtensionFolder, storeUrl, installCommand, runningServiceTarget, releaseChannel, checkRelease, autoUpdateModes, UPDATE_VERSION, channelOf, compareVersions, installedRuntime2, installedVersion, updateState, autoUpdateOverride, storedMode, effectiveMode, setStoredMode, autoUpdateStatus, describeAutoUpdate, updateAvailable, runCommand, registryUrl, fetchPublished, runInstaller, createAutoUpdater };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./main-vgzr4689.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-31v8xyf6.mjs";
|
|
7
7
|
import {
|
|
8
8
|
isSome,
|
|
9
9
|
decodeUnknownOption,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./main-csnx585b.mjs";
|
|
18
18
|
import {
|
|
19
19
|
stateRoot
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-45f52ch9.mjs";
|
|
21
21
|
|
|
22
22
|
// src/session-manager/journal.ts
|
|
23
23
|
import fs from "node:fs";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseTargetSelection2,
|
|
13
13
|
getObject2,
|
|
14
14
|
getString2
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-31v8xyf6.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isNodeError,
|
|
18
18
|
writeJsonFileAtomically
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
import {
|
|
132
132
|
dataRoot,
|
|
133
133
|
cliCommand
|
|
134
|
-
} from "./main-
|
|
134
|
+
} from "./main-45f52ch9.mjs";
|
|
135
135
|
|
|
136
136
|
// node_modules/effect/dist/Semaphore.js
|
|
137
137
|
var makeUnsafe = (permits) => new SemaphoreImpl(permits);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
installedRuntime2,
|
|
7
7
|
autoUpdateStatus,
|
|
8
8
|
updateAvailable
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-45f52ch9.mjs";
|
|
10
10
|
import {
|
|
11
11
|
unpackedReloadAdvice
|
|
12
12
|
} from "./main-mrew6jy8.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 { runInstalledUpdate } = await import("./runtime-update-
|
|
318
|
+
const { runInstalledUpdate } = await import("./runtime-update-26aa8xp0.mjs");
|
|
319
319
|
if (await runInstalledUpdate(args))
|
|
320
320
|
return;
|
|
321
321
|
if (compiledBinary()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-dx69nfvd.mjs";
|
|
4
4
|
import {
|
|
5
5
|
configRoot2,
|
|
6
6
|
dataRoot,
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
compiledBinary,
|
|
11
11
|
scriptEntry,
|
|
12
12
|
entryCommand,
|
|
13
|
+
resolveWindowsShim,
|
|
14
|
+
entrySpawnCommand,
|
|
13
15
|
cliCommand,
|
|
14
16
|
PUBLIC_STORE_ID,
|
|
15
17
|
storeConfig,
|
|
@@ -18,10 +20,10 @@ import {
|
|
|
18
20
|
storeUrl,
|
|
19
21
|
installedVersion,
|
|
20
22
|
runCommand
|
|
21
|
-
} from "./main-
|
|
23
|
+
} from "./main-45f52ch9.mjs";
|
|
22
24
|
import {
|
|
23
25
|
formatPairingCode
|
|
24
|
-
} from "./main-
|
|
26
|
+
} from "./main-ynpptf5e.mjs";
|
|
25
27
|
import {
|
|
26
28
|
unpackedExtensionId
|
|
27
29
|
} from "./main-mrew6jy8.mjs";
|
|
@@ -11229,7 +11231,7 @@ function fingerprint(entry) {
|
|
|
11229
11231
|
return createHash("sha256").update(readFileOr(entry, entry)).digest("hex").slice(0, 16);
|
|
11230
11232
|
}
|
|
11231
11233
|
function restartOutdatedRelay(entry) {
|
|
11232
|
-
const [file, ...prefix] =
|
|
11234
|
+
const [file, ...prefix] = entrySpawnCommand(entry);
|
|
11233
11235
|
const status = spawnSync4(file, [...prefix, "status", "--json"], { encoding: "utf8", timeout: 15000 });
|
|
11234
11236
|
if (!/"stale":\s*true/.test(status.stdout ?? ""))
|
|
11235
11237
|
return;
|
|
@@ -11321,13 +11323,15 @@ async function npmGlobalRoot() {
|
|
|
11321
11323
|
return root && path5.isAbsolute(root) ? root : undefined;
|
|
11322
11324
|
}
|
|
11323
11325
|
async function installRuntime() {
|
|
11324
|
-
if (compiledBinary())
|
|
11325
|
-
|
|
11326
|
+
if (compiledBinary()) {
|
|
11327
|
+
const runtime = await installBinaryRuntime();
|
|
11328
|
+
return { ...runtime, spawnEntry: runtime.entry };
|
|
11329
|
+
}
|
|
11326
11330
|
if (fromSource) {
|
|
11327
11331
|
const bundle = path5.join(packageRoot, "dist", "cli.mjs");
|
|
11328
11332
|
if (!existsSync4(bundle))
|
|
11329
11333
|
fail("Build the CLI first: `bun run build` in cli/ (or `bun run setup` at the top).");
|
|
11330
|
-
return { entry: bundle, version: opencodeBrowserVersion2 };
|
|
11334
|
+
return { entry: bundle, version: opencodeBrowserVersion2, spawnEntry: bundle };
|
|
11331
11335
|
}
|
|
11332
11336
|
const spec = process.env.OPENCODE_BROWSER_PACKAGE;
|
|
11333
11337
|
const globalRoot = await npmGlobalRoot();
|
|
@@ -11348,7 +11352,7 @@ async function installRuntime() {
|
|
|
11348
11352
|
if (!existsSync4(entry))
|
|
11349
11353
|
fail(`npm didn't install ${PACKAGE} in ${root}; run \`npm install -g ${PACKAGE}\` and try again.`);
|
|
11350
11354
|
const version = readJson(path5.join(root, "@opencode", "browse", "package.json"))?.version ?? opencodeBrowserVersion2;
|
|
11351
|
-
return { entry: "browse", version };
|
|
11355
|
+
return { entry: "browse", version, spawnEntry: entry };
|
|
11352
11356
|
}
|
|
11353
11357
|
function installedRuntime(settings, server) {
|
|
11354
11358
|
const command = Array.isArray(server?.command) ? server.command.filter((part) => typeof part === "string") : [];
|
|
@@ -11357,7 +11361,17 @@ function installedRuntime(settings, server) {
|
|
|
11357
11361
|
return;
|
|
11358
11362
|
const packageDir = path5.dirname(path5.dirname(entry));
|
|
11359
11363
|
const source = scriptEntry(entry) && existsSync4(path5.join(packageDir, "src", "main.ts"));
|
|
11360
|
-
const
|
|
11364
|
+
const windowsShim = process.platform === "win32" && (entry === "browse" || /\.(cmd|bat)$/i.test(entry));
|
|
11365
|
+
const onDisk = windowsShim ? (() => {
|
|
11366
|
+
const resolved = resolveWindowsShim(entry);
|
|
11367
|
+
if (!resolved)
|
|
11368
|
+
return;
|
|
11369
|
+
return installedVersion({
|
|
11370
|
+
kind: resolved.length === 2 ? "npm" : "binary",
|
|
11371
|
+
entry: resolved[resolved.length - 1],
|
|
11372
|
+
version: settings?.version ?? opencodeBrowserVersion2
|
|
11373
|
+
});
|
|
11374
|
+
})() : entry === "browse" ? spawnSync4("browse", ["--version"], { encoding: "utf8", timeout: 15000 }).stdout?.trim() || undefined : existsSync4(entry) ? installedVersion({ kind: scriptEntry(entry) ? "npm" : "binary", entry, version: settings?.version ?? opencodeBrowserVersion2 }) : undefined;
|
|
11361
11375
|
const version = onDisk ?? settings?.version ?? (path5.resolve(entry) === path5.join(packageRoot, "dist", "cli.mjs") ? opencodeBrowserVersion2 : readJson(path5.join(packageDir, "package.json"))?.version);
|
|
11362
11376
|
return { entry, version, source };
|
|
11363
11377
|
}
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
bundledPairingCodeTtlMs,
|
|
6
6
|
mintPairingCode,
|
|
7
7
|
writeExtensionPairing
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-ynpptf5e.mjs";
|
|
9
9
|
import {
|
|
10
10
|
configRoot2,
|
|
11
11
|
cacheRoot,
|
|
12
12
|
devExtensionUrl,
|
|
13
13
|
devExtensionFolder
|
|
14
|
-
} from "./main-
|
|
14
|
+
} from "./main-45f52ch9.mjs";
|
|
15
15
|
|
|
16
16
|
// src/setup/dev-extension.ts
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
@@ -256,11 +256,11 @@ import {
|
|
|
256
256
|
} from "./main-csnx585b.mjs";
|
|
257
257
|
import {
|
|
258
258
|
opencodeBrowserVersion2
|
|
259
|
-
} from "./main-
|
|
259
|
+
} from "./main-dx69nfvd.mjs";
|
|
260
260
|
import {
|
|
261
261
|
cliCommand,
|
|
262
262
|
autoUpdateStatus
|
|
263
|
-
} from "./main-
|
|
263
|
+
} from "./main-45f52ch9.mjs";
|
|
264
264
|
import"./main-mrew6jy8.mjs";
|
|
265
265
|
import {
|
|
266
266
|
option,
|
|
@@ -280,12 +280,12 @@ import {
|
|
|
280
280
|
relayBuildProblem,
|
|
281
281
|
ensureRelay,
|
|
282
282
|
ensureExtensionConnected
|
|
283
|
-
} from "./main-
|
|
283
|
+
} from "./main-31v8xyf6.mjs";
|
|
284
284
|
import"./main-vgzr4689.mjs";
|
|
285
285
|
import {
|
|
286
286
|
updateJson2,
|
|
287
287
|
createUpdateWatcher2
|
|
288
|
-
} from "./main-
|
|
288
|
+
} from "./main-gsbhq9et.mjs";
|
|
289
289
|
import {
|
|
290
290
|
makeUnsafe,
|
|
291
291
|
make,
|
|
@@ -369,7 +369,7 @@ import {
|
|
|
369
369
|
mcpErrorMessage2,
|
|
370
370
|
toolResult,
|
|
371
371
|
listSecrets
|
|
372
|
-
} from "./main-
|
|
372
|
+
} from "./main-dxevz15s.mjs";
|
|
373
373
|
import {
|
|
374
374
|
Clock,
|
|
375
375
|
type,
|
|
@@ -384,7 +384,7 @@ import {
|
|
|
384
384
|
orElse,
|
|
385
385
|
exhaustive
|
|
386
386
|
} from "./main-8z9d979q.mjs";
|
|
387
|
-
import"./main-
|
|
387
|
+
import"./main-6s978p18.mjs";
|
|
388
388
|
import {
|
|
389
389
|
pipeArguments,
|
|
390
390
|
dual,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
browseServerCommand,
|
|
7
7
|
editAgentConfig,
|
|
8
8
|
configureMcp
|
|
9
|
-
} from "./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
} from "./main-wj876afj.mjs";
|
|
10
|
+
import"./main-dx69nfvd.mjs";
|
|
11
11
|
import {
|
|
12
12
|
configRoot2,
|
|
13
13
|
dataRoot,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
cacheRoot,
|
|
16
16
|
binRoot,
|
|
17
17
|
binaryName
|
|
18
|
-
} from "./main-
|
|
18
|
+
} from "./main-45f52ch9.mjs";
|
|
19
19
|
import"./main-vgzr4689.mjs";
|
|
20
|
-
import"./main-
|
|
20
|
+
import"./main-ynpptf5e.mjs";
|
|
21
21
|
import"./main-mrew6jy8.mjs";
|
|
22
22
|
import {
|
|
23
23
|
legacyDataRoot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-dx69nfvd.mjs";
|
|
5
5
|
import {
|
|
6
6
|
defaultRoots,
|
|
7
7
|
configRoot2,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
setStoredMode,
|
|
26
26
|
autoUpdateStatus,
|
|
27
27
|
createAutoUpdater
|
|
28
|
-
} from "./main-
|
|
28
|
+
} from "./main-45f52ch9.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extensionProtocolVersion,
|
|
31
31
|
minExtensionProtocolVersion,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
isRestrictedTarget2,
|
|
102
102
|
isRestrictedUrl2,
|
|
103
103
|
dataUrlDocument2
|
|
104
|
-
} from "./main-
|
|
104
|
+
} from "./main-31v8xyf6.mjs";
|
|
105
105
|
import {
|
|
106
106
|
context,
|
|
107
107
|
pendingPairingCodeKeys,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
pairingSessionKey,
|
|
120
120
|
sessionProof,
|
|
121
121
|
wrapToken
|
|
122
|
-
} from "./main-
|
|
122
|
+
} from "./main-ynpptf5e.mjs";
|
|
123
123
|
import {
|
|
124
124
|
makeUnsafe,
|
|
125
125
|
SettingsInputError,
|
|
@@ -147,22 +147,22 @@ import {
|
|
|
147
147
|
checkNavigationUrl,
|
|
148
148
|
readSecret,
|
|
149
149
|
secretText
|
|
150
|
-
} from "./main-
|
|
150
|
+
} from "./main-dxevz15s.mjs";
|
|
151
151
|
import {
|
|
152
152
|
defaultJournalBaseDir,
|
|
153
153
|
makeJournalEntry,
|
|
154
154
|
appendJournalEntry,
|
|
155
155
|
startJournalRetention
|
|
156
|
-
} from "./main-
|
|
156
|
+
} from "./main-7q7wxe04.mjs";
|
|
157
157
|
import {
|
|
158
158
|
createUpdateWatcher2
|
|
159
|
-
} from "./main-
|
|
159
|
+
} from "./main-gsbhq9et.mjs";
|
|
160
160
|
import {
|
|
161
161
|
relayHostname,
|
|
162
162
|
isLocalPeer,
|
|
163
163
|
installedDevExtension,
|
|
164
164
|
syncDevExtension
|
|
165
|
-
} from "./main-
|
|
165
|
+
} from "./main-zmmsgx7j.mjs";
|
|
166
166
|
import {
|
|
167
167
|
legacyRoots
|
|
168
168
|
} from "./main-ckssvk4c.mjs";
|
|
@@ -278,7 +278,7 @@ import {
|
|
|
278
278
|
relayToken,
|
|
279
279
|
secretsEqual,
|
|
280
280
|
ensurePrivateDirectory
|
|
281
|
-
} from "./main-
|
|
281
|
+
} from "./main-6s978p18.mjs";
|
|
282
282
|
import {
|
|
283
283
|
isString,
|
|
284
284
|
isNumber,
|
|
@@ -15094,7 +15094,15 @@ function createCdpDispatcher(options) {
|
|
|
15094
15094
|
return;
|
|
15095
15095
|
yield* ghostCursor.mouseEvent(mouseOptions.tabId, mouseOptions.message.params);
|
|
15096
15096
|
});
|
|
15097
|
+
function captureScreenshotNudgeParams(params) {
|
|
15098
|
+
const nudge = { ...params, format: "jpeg", quality: 1 };
|
|
15099
|
+
if (nudge.clip === undefined)
|
|
15100
|
+
return nudge;
|
|
15101
|
+
const { captureBeyondViewport: _fullPage, ...clipped } = nudge;
|
|
15102
|
+
return clipped;
|
|
15103
|
+
}
|
|
15097
15104
|
function captureScreenshotNudged(command) {
|
|
15105
|
+
const nudgeParams = captureScreenshotNudgeParams(command.params);
|
|
15098
15106
|
const nudges = gen(function* () {
|
|
15099
15107
|
for (const delayMs of [600, 1000, 1500, 2000, 3000, 5000, 8000]) {
|
|
15100
15108
|
yield* sleep(delayMs);
|
|
@@ -15102,7 +15110,7 @@ function createCdpDispatcher(options) {
|
|
|
15102
15110
|
yield* forkDetach(sendDebuggerCommand({
|
|
15103
15111
|
tabId: command.tabId,
|
|
15104
15112
|
method: "Page.captureScreenshot",
|
|
15105
|
-
params:
|
|
15113
|
+
params: nudgeParams
|
|
15106
15114
|
}).pipe(ignore));
|
|
15107
15115
|
}
|
|
15108
15116
|
return yield* never;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-dx69nfvd.mjs";
|
|
2
2
|
import {
|
|
3
3
|
cliCommand,
|
|
4
4
|
installCommand,
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
registryUrl,
|
|
16
16
|
fetchPublished,
|
|
17
17
|
runInstaller
|
|
18
|
-
} from "./main-
|
|
18
|
+
} from "./main-45f52ch9.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-
|
|
25
|
+
} from "./main-31v8xyf6.mjs";
|
|
26
26
|
import"./main-vgzr4689.mjs";
|
|
27
27
|
import {
|
|
28
28
|
succeed6,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
provide3,
|
|
33
33
|
runPromise
|
|
34
34
|
} from "./main-csnx585b.mjs";
|
|
35
|
-
import"./main-
|
|
35
|
+
import"./main-6s978p18.mjs";
|
|
36
36
|
|
|
37
37
|
// src/update/runtime-update.ts
|
|
38
38
|
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-wj876afj.mjs";
|
|
67
67
|
import {
|
|
68
68
|
opencodeBrowserBuildId2
|
|
69
|
-
} from "./main-
|
|
69
|
+
} from "./main-dx69nfvd.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,7 +83,7 @@ import {
|
|
|
82
83
|
autoUpdateStatus,
|
|
83
84
|
describeAutoUpdate,
|
|
84
85
|
runCommand
|
|
85
|
-
} from "./main-
|
|
86
|
+
} from "./main-45f52ch9.mjs";
|
|
86
87
|
import"./main-vgzr4689.mjs";
|
|
87
88
|
import {
|
|
88
89
|
pairingCodeTtlMs,
|
|
@@ -96,7 +97,7 @@ import {
|
|
|
96
97
|
revokeBrowserToken,
|
|
97
98
|
legacyPairingCode,
|
|
98
99
|
removeLegacyPairingCode
|
|
99
|
-
} from "./main-
|
|
100
|
+
} from "./main-ynpptf5e.mjs";
|
|
100
101
|
import {
|
|
101
102
|
unpackedExtensionId,
|
|
102
103
|
extensionProtocolSkew,
|
|
@@ -107,10 +108,10 @@ import {
|
|
|
107
108
|
readRelayConfig,
|
|
108
109
|
writeRelayConfig,
|
|
109
110
|
syncDevExtension
|
|
110
|
-
} from "./main-
|
|
111
|
+
} from "./main-zmmsgx7j.mjs";
|
|
111
112
|
import {
|
|
112
113
|
relayAuthorization
|
|
113
|
-
} from "./main-
|
|
114
|
+
} from "./main-6s978p18.mjs";
|
|
114
115
|
|
|
115
116
|
// src/setup.ts
|
|
116
117
|
import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
|
|
@@ -306,7 +307,7 @@ var relayHeaders = () => {
|
|
|
306
307
|
}
|
|
307
308
|
};
|
|
308
309
|
function ensureRelay(entry) {
|
|
309
|
-
const [file, ...prefix] =
|
|
310
|
+
const [file, ...prefix] = entrySpawnCommand(entry);
|
|
310
311
|
const started = spawnSync(file, [...prefix, "session", "list", "--json"], {
|
|
311
312
|
encoding: "utf8",
|
|
312
313
|
timeout: 30000
|
|
@@ -486,7 +487,7 @@ async function set(args) {
|
|
|
486
487
|
log(`✓ hostname is ${hostname}`);
|
|
487
488
|
const running = await fetch(`${relayBase()}/version`, { signal: AbortSignal.timeout(2000) }).then((response) => response.ok, () => false);
|
|
488
489
|
if (running) {
|
|
489
|
-
const [file, ...prefix] =
|
|
490
|
+
const [file, ...prefix] = entrySpawnCommand(runningEntry());
|
|
490
491
|
const restarted = spawnSync(file, [...prefix, "relay", "restart"], { stdio: "inherit" });
|
|
491
492
|
if (restarted.status !== 0)
|
|
492
493
|
log(`! The relay is still running with the old hostname. Run \`${cliCommand("relay restart --force")}\` to apply it.`);
|
|
@@ -660,7 +661,7 @@ async function installRemote(entry, tty) {
|
|
|
660
661
|
if (config.hostname !== "0.0.0.0") {
|
|
661
662
|
writeRelayConfig({ ...config, hostname: "0.0.0.0" });
|
|
662
663
|
const running = await fetch(`${relayBase()}/version`, { signal: AbortSignal.timeout(2000) }).then((response) => response.ok, () => false);
|
|
663
|
-
const [file, ...prefix] =
|
|
664
|
+
const [file, ...prefix] = entrySpawnCommand(entry);
|
|
664
665
|
const restarted = running && spawnSync2(file, [...prefix, "relay", "restart"], { encoding: "utf8", timeout: 60000 }).status === 0;
|
|
665
666
|
if (running && !restarted) {
|
|
666
667
|
process.exitCode = 1;
|
|
@@ -745,7 +746,7 @@ async function installSteps(args, tty, caller) {
|
|
|
745
746
|
const plan = agentPlan(locations, flags, tty, caller, remembered);
|
|
746
747
|
mkdirSync2(path2.dirname(files.settings), { recursive: true, mode: 448 });
|
|
747
748
|
mkdirSync2(files.dir, { recursive: true, mode: 448 });
|
|
748
|
-
const { entry, version } = await installRuntime();
|
|
749
|
+
const { entry, version, spawnEntry } = await installRuntime();
|
|
749
750
|
log(`✓ browse ${version} installed${fromSource ? " (from source)" : ""}`);
|
|
750
751
|
const onPath = args.includes("--no-modify-path") ? undefined : path2.isAbsolute(entry) && !scriptEntry(entry) ? addToPath(path2.dirname(entry)) : undefined;
|
|
751
752
|
if (onPath)
|
|
@@ -822,15 +823,15 @@ async function installSteps(args, tty, caller) {
|
|
|
822
823
|
log(`! Couldn't edit ${tilde(agent.file)} for ${label}. Check its syntax and permissions, then run ${cliCommand(`install --agent ${agent.name}`)}.`);
|
|
823
824
|
}
|
|
824
825
|
}
|
|
825
|
-
for (const line of restartOutdatedRelay(
|
|
826
|
+
for (const line of restartOutdatedRelay(spawnEntry) ?? [])
|
|
826
827
|
log(line);
|
|
827
828
|
const legacy = selected.includes("opencode") ? legacyBrowserControl() : [];
|
|
828
829
|
if (legacy.length)
|
|
829
830
|
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
831
|
if (args.includes("--remote"))
|
|
831
|
-
return installRemote(
|
|
832
|
+
return installRemote(spawnEntry, tty);
|
|
832
833
|
await syncDev();
|
|
833
|
-
const initial = await settledExtensionStatus(
|
|
834
|
+
const initial = await settledExtensionStatus(spawnEntry);
|
|
834
835
|
const connected = initial?.connected ? initial : undefined;
|
|
835
836
|
const pairedOffline = initial?.pairingState === "paired-offline";
|
|
836
837
|
const needsPairing = initial?.pairingState === "unpaired" || initial?.pairingState === "refused";
|
|
@@ -859,7 +860,7 @@ async function installSteps(args, tty, caller) {
|
|
|
859
860
|
return true;
|
|
860
861
|
writeFileSync(oldStoreMarker(), `2
|
|
861
862
|
`);
|
|
862
|
-
ensureRelay(
|
|
863
|
+
ensureRelay(spawnEntry);
|
|
863
864
|
log(`! Found browse ${matches[0].version} in ${matches[0].browser.name}. ${extensionProtocolAdvice(2, { install: cliCommand("install") }, "store")}`);
|
|
864
865
|
process.exitCode = 1;
|
|
865
866
|
return false;
|
|
@@ -883,7 +884,7 @@ async function installSteps(args, tty, caller) {
|
|
|
883
884
|
});
|
|
884
885
|
if (connected || found === "off" || pairedOffline)
|
|
885
886
|
return;
|
|
886
|
-
ensureRelay(
|
|
887
|
+
ensureRelay(spawnEntry);
|
|
887
888
|
let code;
|
|
888
889
|
const pairingCode = () => code && pendingPairingCodeKeys().includes(pairingCodeKey(code)) ? code : code = mintPairingCode();
|
|
889
890
|
const pairStore = (scanned) => pairStoreExtension({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-dx69nfvd.mjs";
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
entrySpawnCommand,
|
|
4
4
|
installedRuntime2,
|
|
5
5
|
installedVersion
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-45f52ch9.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-gmcaa8qb.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-gsbhq9et.mjs";
|
|
8
8
|
import"./main-mrew6jy8.mjs";
|
|
9
|
-
import"./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
import"./main-45f52ch9.mjs";
|
|
10
|
+
import"./main-dx69nfvd.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
13
13
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/dist/main-aeg6a5nk.mjs
DELETED