@opencode/browse 0.0.17-dev.179 → 0.0.17-dev.181
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/{Runtime-jrg7sc9p.mjs → Runtime-xss8qan1.mjs} +1 -1
- package/dist/{cli-ndjnhr9r.mjs → cli-1bdh4p0a.mjs} +60 -46
- package/dist/cli.mjs +14 -14
- package/dist/{helpers-tnqjatbp.mjs → helpers-bbaa1vjs.mjs} +1 -3
- package/dist/{index-j79y2me1.mjs → index-gjq7chrk.mjs} +2 -2
- package/dist/{legacy-runtime-we32g1pw.mjs → legacy-runtime-yjsm0xpg.mjs} +30 -17
- package/dist/{main-5hymrtzq.mjs → main-32bwyqja.mjs} +4 -4
- package/dist/{main-f98q5tcf.mjs → main-6hvv25x8.mjs} +27 -29
- package/dist/{main-tr20hmvg.mjs → main-6qfvnjxc.mjs} +7 -9
- package/dist/{main-3mhynene.mjs → main-9frwnsnf.mjs} +3 -5
- package/dist/{main-048kx59h.mjs → main-akpa411k.mjs} +6 -8
- package/dist/main-bt237ys7.mjs +1012 -0
- package/dist/main-d5ke1bpm.mjs +4 -0
- package/dist/{main-s3g4jwx5.mjs → main-jeta10c6.mjs} +23 -25
- package/dist/{main-wpt5ha44.mjs → main-m45zegrn.mjs} +371 -167
- package/dist/{main-46fba60d.mjs → main-pq962g72.mjs} +7 -4
- package/dist/main-q4typx7c.mjs +213 -0
- package/dist/{main-nesqaw1p.mjs → main-qccyxwg8.mjs} +3 -5
- package/dist/{main-zw20hm01.mjs → main-rb7dermc.mjs} +117 -4
- package/dist/{main-g131p1r6.mjs → main-reh7k0hv.mjs} +199 -989
- package/dist/{main-8jd0y17d.mjs → main-rvn834gn.mjs} +2 -2
- package/dist/{main-9fev890k.mjs → main-sfxkq31s.mjs} +16 -18
- package/dist/{main-thhv62x3.mjs → main-tg0r67xj.mjs} +8 -10
- package/dist/{main-rpzzm8dd.mjs → main-tk2thty0.mjs} +8 -7
- package/dist/{mcp-g9gatach.mjs → mcp-rjpmt73q.mjs} +31 -32
- package/dist/{migrate-9dmw3qm4.mjs → migrate-hggn66v2.mjs} +5 -6
- package/dist/{relay-bgmpqtc8.mjs → relay-fm6q9hnx.mjs} +128 -64
- package/dist/{runtime-update-6r9m6y2b.mjs → runtime-update-vdw1eajx.mjs} +9 -9
- package/dist/{setup-3be5gs2p.mjs → setup-wyrpwq4c.mjs} +196 -129
- package/dist/{supervisor-a9hk630y.mjs → supervisor-nbce8yhg.mjs} +10 -6
- package/dist/{update-xy15yz2m.mjs → update-be8dfw51.mjs} +3 -4
- package/dist/{version-5gnas829.mjs → version-6j8cdg2k.mjs} +1 -1
- package/package.json +1 -1
- package/dist/main-4h7rfhhr.mjs +0 -61
- package/dist/main-b3jrctcx.mjs +0 -114
- package/dist/main-qazf3bhk.mjs +0 -223
- package/dist/main-x0s8gad5.mjs +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
errorExitCode2,
|
|
4
4
|
errorReported2
|
|
5
|
-
} from "./main-
|
|
5
|
+
} from "./main-9frwnsnf.mjs";
|
|
6
6
|
import {
|
|
7
7
|
make4,
|
|
8
8
|
value2,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Terminal,
|
|
15
15
|
runMain,
|
|
16
16
|
layer2
|
|
17
|
-
} from "./main-
|
|
17
|
+
} from "./main-jeta10c6.mjs";
|
|
18
18
|
import {
|
|
19
19
|
ExitCode,
|
|
20
20
|
failure,
|
|
@@ -25,7 +25,7 @@ import"./main-pmfd055v.mjs";
|
|
|
25
25
|
import {
|
|
26
26
|
opencodeBrowserVersion2,
|
|
27
27
|
opencodeBrowserBuildId2
|
|
28
|
-
} from "./main-
|
|
28
|
+
} from "./main-d5ke1bpm.mjs";
|
|
29
29
|
import {
|
|
30
30
|
configRoot2,
|
|
31
31
|
dataRoot,
|
|
@@ -37,21 +37,20 @@ import {
|
|
|
37
37
|
cliCommand,
|
|
38
38
|
devExtension,
|
|
39
39
|
installCommand,
|
|
40
|
+
extensionProtocolVersion,
|
|
41
|
+
extensionProtocolAdvice,
|
|
40
42
|
autoUpdateStatus
|
|
41
|
-
} from "./main-
|
|
43
|
+
} from "./main-rb7dermc.mjs";
|
|
42
44
|
import {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} from "./main-
|
|
45
|
+
defaultPort2,
|
|
46
|
+
isValidSessionId2
|
|
47
|
+
} from "./main-bt237ys7.mjs";
|
|
46
48
|
import {
|
|
47
49
|
option,
|
|
48
50
|
String2,
|
|
49
51
|
Int,
|
|
50
|
-
defaultPort2,
|
|
51
|
-
isValidSessionId2,
|
|
52
52
|
portConfig,
|
|
53
53
|
extensionOriginsConfig,
|
|
54
|
-
endpointForPort,
|
|
55
54
|
RelayUnreachable,
|
|
56
55
|
RelayRejected,
|
|
57
56
|
Service,
|
|
@@ -64,29 +63,31 @@ import {
|
|
|
64
63
|
ensureExtensionConnected,
|
|
65
64
|
stoppedRelayStatus,
|
|
66
65
|
statusCollections
|
|
67
|
-
} from "./main-
|
|
68
|
-
import"./main-4h7rfhhr.mjs";
|
|
66
|
+
} from "./main-reh7k0hv.mjs";
|
|
69
67
|
import {
|
|
70
68
|
updateJson2,
|
|
71
69
|
formatUpdateNotice2,
|
|
72
70
|
updateNotice2
|
|
73
|
-
} from "./main-
|
|
71
|
+
} from "./main-qccyxwg8.mjs";
|
|
74
72
|
import {
|
|
75
73
|
settingKeys,
|
|
76
74
|
formatSettings,
|
|
77
75
|
ensureSessionExists
|
|
78
|
-
} from "./main-
|
|
76
|
+
} from "./main-sfxkq31s.mjs";
|
|
79
77
|
import {
|
|
80
78
|
addSecret,
|
|
81
79
|
listSecrets,
|
|
82
80
|
removeSecret
|
|
83
|
-
} from "./main-
|
|
81
|
+
} from "./main-tg0r67xj.mjs";
|
|
84
82
|
import {
|
|
85
83
|
defaultJournalBaseDir,
|
|
86
84
|
readJournalEntries,
|
|
87
85
|
formatJournalEntry
|
|
88
|
-
} from "./main-
|
|
89
|
-
import"./main-
|
|
86
|
+
} from "./main-6qfvnjxc.mjs";
|
|
87
|
+
import"./main-rvn834gn.mjs";
|
|
88
|
+
import {
|
|
89
|
+
endpointForPort
|
|
90
|
+
} from "./main-q4typx7c.mjs";
|
|
90
91
|
import {
|
|
91
92
|
taggedEnum,
|
|
92
93
|
is2,
|
|
@@ -107,12 +108,21 @@ import {
|
|
|
107
108
|
Defect,
|
|
108
109
|
TaggedError2,
|
|
109
110
|
toCodecStringTree
|
|
110
|
-
} from "./main-
|
|
111
|
+
} from "./main-6hvv25x8.mjs";
|
|
111
112
|
import {
|
|
113
|
+
pipeArguments,
|
|
114
|
+
dual,
|
|
115
|
+
identity,
|
|
116
|
+
pipe,
|
|
117
|
+
isString,
|
|
118
|
+
isNotUndefined,
|
|
119
|
+
isObject,
|
|
120
|
+
hasProperty,
|
|
121
|
+
isTagged,
|
|
112
122
|
format,
|
|
113
123
|
assignProperty,
|
|
114
124
|
withFiber,
|
|
115
|
-
|
|
125
|
+
Prototype2,
|
|
116
126
|
none,
|
|
117
127
|
some,
|
|
118
128
|
isNone,
|
|
@@ -179,18 +189,7 @@ import {
|
|
|
179
189
|
interrupt3,
|
|
180
190
|
fnUntraced,
|
|
181
191
|
fn
|
|
182
|
-
} from "./main-
|
|
183
|
-
import {
|
|
184
|
-
pipeArguments,
|
|
185
|
-
dual,
|
|
186
|
-
identity,
|
|
187
|
-
pipe,
|
|
188
|
-
isString,
|
|
189
|
-
isNotUndefined,
|
|
190
|
-
isObject,
|
|
191
|
-
hasProperty,
|
|
192
|
-
isTagged
|
|
193
|
-
} from "./main-qazf3bhk.mjs";
|
|
192
|
+
} from "./main-m45zegrn.mjs";
|
|
194
193
|
|
|
195
194
|
// node_modules/effect/dist/Number.js
|
|
196
195
|
var Number2 = globalThis.Number;
|
|
@@ -708,7 +707,7 @@ var Toggle = (options) => {
|
|
|
708
707
|
});
|
|
709
708
|
};
|
|
710
709
|
var proto = {
|
|
711
|
-
.../* @__PURE__ */
|
|
710
|
+
.../* @__PURE__ */ Prototype2({
|
|
712
711
|
label: "Prompt",
|
|
713
712
|
evaluate() {
|
|
714
713
|
return run(this);
|
|
@@ -3399,7 +3398,7 @@ var reconstructTree = (tree, results) => {
|
|
|
3399
3398
|
var TypeId5 = "~effect/cli/Command";
|
|
3400
3399
|
var toImpl = (self) => self;
|
|
3401
3400
|
var Proto3 = {
|
|
3402
|
-
.../* @__PURE__ */
|
|
3401
|
+
.../* @__PURE__ */ Prototype2({
|
|
3403
3402
|
label: "Command",
|
|
3404
3403
|
evaluate() {
|
|
3405
3404
|
return toImpl(this).service;
|
|
@@ -5188,6 +5187,7 @@ var createDoctorReport = fn("Doctor.createReport")(function* (options) {
|
|
|
5188
5187
|
},
|
|
5189
5188
|
extension: {
|
|
5190
5189
|
connected: extensionResult.ok ? extensionResult.value.connected : null,
|
|
5190
|
+
unresponsive: extensionResult.ok ? extensionResult.value.browsers?.some((browser) => browser.unresponsive) ?? false : null,
|
|
5191
5191
|
version: extensionVersion,
|
|
5192
5192
|
expectedVersion,
|
|
5193
5193
|
versionMatches: extensionVersionMatches,
|
|
@@ -5260,12 +5260,7 @@ function buildDoctorChecks(options) {
|
|
|
5260
5260
|
message: options.relayResult.ok ? `reachable (${options.relayResult.value.version})` : options.relayResult.error
|
|
5261
5261
|
},
|
|
5262
5262
|
relayBuildCheck({ relayResult: options.relayResult, cliBuildId: opencodeBrowserBuildId2 }),
|
|
5263
|
-
|
|
5264
|
-
id: "extension-connected",
|
|
5265
|
-
label: "extension connection",
|
|
5266
|
-
status: options.extensionResult.ok && options.extensionResult.value.connected ? "ok" : "fail",
|
|
5267
|
-
message: options.extensionResult.ok ? options.extensionResult.value.connected ? `connected${options.extensionResult.value.version ? ` (${options.extensionResult.value.version})` : ""}` : "disconnected" : options.extensionResult.error
|
|
5268
|
-
},
|
|
5263
|
+
extensionConnectedCheck(options.extensionResult),
|
|
5269
5264
|
extensionVersionCheck({
|
|
5270
5265
|
extensionResult: options.extensionResult,
|
|
5271
5266
|
expectedExtensionVersion: options.expectedExtensionVersion
|
|
@@ -5368,6 +5363,23 @@ function relayBuildCheck(options) {
|
|
|
5368
5363
|
const matches = relayBuildId === options.cliBuildId;
|
|
5369
5364
|
return check(matches ? "ok" : "warn", matches ? `matches CLI build (${options.cliBuildId})` : `runtime ${relayBuildId} does not match CLI ${options.cliBuildId}`);
|
|
5370
5365
|
}
|
|
5366
|
+
function extensionConnectedCheck(extensionResult) {
|
|
5367
|
+
const check = makeDoctorCheck("extension-connected", "extension connection");
|
|
5368
|
+
if (!extensionResult.ok) {
|
|
5369
|
+
return check("fail", extensionResult.error);
|
|
5370
|
+
}
|
|
5371
|
+
const status = extensionResult.value;
|
|
5372
|
+
const unresponsive = (status.browsers ?? []).filter((browser) => browser.unresponsive);
|
|
5373
|
+
if (status.connected) {
|
|
5374
|
+
const connected = `connected${status.version ? ` (${status.version})` : ""}`;
|
|
5375
|
+
const others = unresponsive.map((browser) => `${browser.id} isn't answering (busy or asleep)`).join(", ");
|
|
5376
|
+
return others ? check("warn", `${connected}; ${others}`) : check("ok", connected);
|
|
5377
|
+
}
|
|
5378
|
+
if (unresponsive.length > 0) {
|
|
5379
|
+
return check("warn", "connected but not answering (busy or asleep)");
|
|
5380
|
+
}
|
|
5381
|
+
return check("fail", "disconnected");
|
|
5382
|
+
}
|
|
5371
5383
|
function extensionVersionCheck(options) {
|
|
5372
5384
|
const check = makeDoctorCheck("extension-version", "extension version");
|
|
5373
5385
|
if (!options.extensionResult.ok) {
|
|
@@ -5490,7 +5502,8 @@ function formatExtensionSummary(report) {
|
|
|
5490
5502
|
const version = report.extension.version ? ` (${report.extension.version})` : "";
|
|
5491
5503
|
const protocol = report.extension.protocolVersion === null ? "" : `, protocol ${report.extension.protocolVersion} ${report.extension.protocolCompatible === false ? "incompatible" : "compatible"}`;
|
|
5492
5504
|
const match = report.extension.versionMatches === null ? "" : report.extension.versionMatches ? ", matches the CLI's version" : ", differs from the CLI's version";
|
|
5493
|
-
|
|
5505
|
+
const state = report.extension.connected ? "connected" : report.extension.unresponsive ? "not answering (busy or asleep)" : "disconnected";
|
|
5506
|
+
return `${state}${version}${protocol}${match}`;
|
|
5494
5507
|
}
|
|
5495
5508
|
function formatNullableNumber(value) {
|
|
5496
5509
|
return value === null ? "unknown" : String(value);
|
|
@@ -5787,7 +5800,8 @@ var status = make("status", {
|
|
|
5787
5800
|
if (buildProblem) {
|
|
5788
5801
|
yield* log(`Warning: ${buildProblem}`);
|
|
5789
5802
|
}
|
|
5790
|
-
|
|
5803
|
+
const notAnswering = extensionStatus.browsers?.some((browser) => browser.unresponsive) ?? false;
|
|
5804
|
+
yield* log(`Extension: ${extensionStatus.connected ? "connected" : notAnswering ? "not answering (busy or asleep)" : "disconnected"}${extensionStatus.version ? ` (${extensionStatus.version})` : ""}`);
|
|
5791
5805
|
if ((extensionStatus.rejectedConnections ?? 0) > 0) {
|
|
5792
5806
|
yield* log(`Warning: ${extensionStatus.rejectedConnections} competing browser/profile connection attempt(s) rejected; the active connection was preserved. The relay is an older browse that connects one browser at a time; update browse on the computer running the relay, or close the other browser.`);
|
|
5793
5807
|
}
|
|
@@ -5844,7 +5858,7 @@ var status = make("status", {
|
|
|
5844
5858
|
}
|
|
5845
5859
|
})).pipe(withDescription4("Show relay, extension, and target status"));
|
|
5846
5860
|
var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
|
|
5847
|
-
const { runMcpServer } = yield* promise(() => import("./mcp-
|
|
5861
|
+
const { runMcpServer } = yield* promise(() => import("./mcp-rjpmt73q.mjs"));
|
|
5848
5862
|
yield* runMcpServer;
|
|
5849
5863
|
})).pipe(withDescription4("Run the browse MCP server over stdio"));
|
|
5850
5864
|
registerCliCommand(400, () => tabs);
|
|
@@ -6292,12 +6306,12 @@ registerCliCommand(710, () => flightRecorder);
|
|
|
6292
6306
|
|
|
6293
6307
|
// src/cli/relay.ts
|
|
6294
6308
|
var serve = make("serve", {}, fn("Cli.serve")(function* () {
|
|
6295
|
-
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-
|
|
6296
|
-
const port = yield* portConfig;
|
|
6309
|
+
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-fm6q9hnx.mjs"), import("./helpers-bbaa1vjs.mjs")]));
|
|
6310
|
+
const port = process.env.OPENCODE_BROWSER_PORT === undefined ? undefined : yield* portConfig;
|
|
6297
6311
|
const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
|
|
6298
6312
|
yield* scoped(gen(function* () {
|
|
6299
|
-
const relay = yield* startRelay({ port, additionalExtensionOrigins });
|
|
6300
|
-
yield* promise(() => import("./legacy-runtime-
|
|
6313
|
+
const relay = yield* startRelay({ ...port === undefined ? {} : { port }, additionalExtensionOrigins });
|
|
6314
|
+
yield* promise(() => import("./legacy-runtime-yjsm0xpg.mjs").then((module) => module.commitLegacyTakeover()));
|
|
6301
6315
|
yield* log(`browse relay listening at ${relay.url}`);
|
|
6302
6316
|
yield* log(`browse connects automatically while the browser runs. Run \`${cliCommand("status")}\` to check.`);
|
|
6303
6317
|
yield* never;
|
package/dist/cli.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// src/main.ts
|
|
10
10
|
import path from "node:path";
|
|
11
|
-
var embeddedVersion = "0.0.17-dev.
|
|
11
|
+
var embeddedVersion = "0.0.17-dev.181";
|
|
12
12
|
var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
|
|
13
13
|
var command = process.argv[2];
|
|
14
14
|
var args = process.argv.slice(3);
|
|
@@ -18,26 +18,26 @@ var options = separator === -1 ? args : args.slice(0, separator);
|
|
|
18
18
|
var askedForHelp = command === "--help" || command === "-h" || options.some((arg) => arg === "--help" || arg === "-h");
|
|
19
19
|
var preCliHelp = askedForHelp && (command === "update" || command !== undefined && setupCommands.has(command));
|
|
20
20
|
var oldRuntime = legacyRuntime();
|
|
21
|
-
var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-
|
|
21
|
+
var takingOver = command === "serve" && !askedForHelp && legacyRuntimeActive(oldRuntime) && await import("./legacy-runtime-yjsm0xpg.mjs").then((module) => module.prepareLegacyTakeover(oldRuntime)).catch(() => false);
|
|
22
22
|
if (!takingOver)
|
|
23
23
|
settleLegacyHome(process.env, oldRuntime);
|
|
24
24
|
if (command !== "--version" && command !== "-v" && !askedForHelp && !takingOver && !process.env.OPENCODE_BROWSER_HOME && legacyRootsLeft()) {
|
|
25
25
|
try {
|
|
26
|
-
const { migrateLegacy } = await import("./migrate-
|
|
26
|
+
const { migrateLegacy } = await import("./migrate-hggn66v2.mjs");
|
|
27
27
|
migrateLegacy();
|
|
28
28
|
} catch {}
|
|
29
29
|
}
|
|
30
30
|
if (command === "--version" || command === "-v") {
|
|
31
|
-
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-
|
|
31
|
+
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-6j8cdg2k.mjs")).opencodeBrowserVersion;
|
|
32
32
|
process.stdout.write(`${opencodeBrowserVersion}
|
|
33
33
|
`);
|
|
34
|
-
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-
|
|
35
|
-
const { runBinaryMcp } = await import("./supervisor-
|
|
34
|
+
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-nbce8yhg.mjs")).supervisesMcp()) {
|
|
35
|
+
const { runBinaryMcp } = await import("./supervisor-nbce8yhg.mjs");
|
|
36
36
|
await runBinaryMcp(process.argv.slice(3));
|
|
37
37
|
} else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
|
|
38
|
-
const { NodeRuntime } = await import("./index-
|
|
39
|
-
const { defaultTeardown } = await import("./Runtime-
|
|
40
|
-
const { runMcpServer } = await import("./mcp-
|
|
38
|
+
const { NodeRuntime } = await import("./index-gjq7chrk.mjs");
|
|
39
|
+
const { defaultTeardown } = await import("./Runtime-xss8qan1.mjs");
|
|
40
|
+
const { runMcpServer } = await import("./mcp-rjpmt73q.mjs");
|
|
41
41
|
let stdinGone = false;
|
|
42
42
|
const onStdinGone = () => {
|
|
43
43
|
stdinGone = true;
|
|
@@ -59,13 +59,13 @@ if (command === "--version" || command === "-v") {
|
|
|
59
59
|
})
|
|
60
60
|
}));
|
|
61
61
|
} else if (command === "self-update" || command === "runtime-switch") {
|
|
62
|
-
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-
|
|
62
|
+
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-vdw1eajx.mjs");
|
|
63
63
|
await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
|
|
64
64
|
} else if (command === "update" && !askedForHelp) {
|
|
65
|
-
const { runUpdateCommand } = await import("./update-
|
|
65
|
+
const { runUpdateCommand } = await import("./update-be8dfw51.mjs");
|
|
66
66
|
await runUpdateCommand(process.argv.slice(3));
|
|
67
67
|
} else if (command && setupCommands.has(command) && !askedForHelp) {
|
|
68
|
-
const { runSetup } = await import("./setup-
|
|
68
|
+
const { runSetup } = await import("./setup-wyrpwq4c.mjs");
|
|
69
69
|
await runSetup(command, process.argv.slice(3));
|
|
70
70
|
} else {
|
|
71
71
|
if (preCliHelp || !command || command === "--help" || command === "-h") {
|
|
@@ -102,9 +102,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
|
|
|
102
102
|
`);
|
|
103
103
|
}
|
|
104
104
|
if (command === "status" && !askedForHelp && !process.argv.includes("--json")) {
|
|
105
|
-
const { printSetupStatus } = await import("./setup-
|
|
105
|
+
const { printSetupStatus } = await import("./setup-wyrpwq4c.mjs");
|
|
106
106
|
printSetupStatus();
|
|
107
107
|
}
|
|
108
|
-
const { runCli } = await import("./cli-
|
|
108
|
+
const { runCli } = await import("./cli-1bdh4p0a.mjs");
|
|
109
109
|
runCli(preCliHelp ? ["--help"] : undefined);
|
|
110
110
|
}
|
|
@@ -32,9 +32,7 @@ import {
|
|
|
32
32
|
isRestrictedTarget2,
|
|
33
33
|
isRestrictedUrl2,
|
|
34
34
|
dataUrlDocument2
|
|
35
|
-
} from "./main-
|
|
36
|
-
import"./main-4h7rfhhr.mjs";
|
|
37
|
-
import"./main-b3jrctcx.mjs";
|
|
35
|
+
} from "./main-bt237ys7.mjs";
|
|
38
36
|
export {
|
|
39
37
|
HttpRouteError2 as HttpRouteError,
|
|
40
38
|
chromeExtensionOriginForPath2 as chromeExtensionOriginForPath,
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
exports_NodeRuntime,
|
|
4
4
|
exports_NodeStdio,
|
|
5
5
|
exports_NodeServices
|
|
6
|
-
} from "./main-
|
|
7
|
-
import"./main-
|
|
6
|
+
} from "./main-jeta10c6.mjs";
|
|
7
|
+
import"./main-9frwnsnf.mjs";
|
|
8
8
|
export {
|
|
9
9
|
exports_NodeHttpClient as NodeHttpClient,
|
|
10
10
|
exports_NodeRuntime as NodeRuntime,
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import"./main-bt237ys7.mjs";
|
|
2
|
+
import {
|
|
3
|
+
installerBinaryPath,
|
|
4
|
+
compiledBinary,
|
|
5
|
+
channelOf,
|
|
6
|
+
installedRuntime2
|
|
7
|
+
} from "./main-rb7dermc.mjs";
|
|
1
8
|
import {
|
|
2
9
|
legacyRuntimeActive,
|
|
3
10
|
insidePath,
|
|
@@ -5,13 +12,12 @@ import {
|
|
|
5
12
|
} from "./main-pmfd055v.mjs";
|
|
6
13
|
import {
|
|
7
14
|
opencodeBrowserVersion2
|
|
8
|
-
} from "./main-
|
|
15
|
+
} from "./main-d5ke1bpm.mjs";
|
|
9
16
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from "./main-zw20hm01.mjs";
|
|
17
|
+
relayPortPinned,
|
|
18
|
+
resolveRelayPort,
|
|
19
|
+
probeRelayPort
|
|
20
|
+
} from "./main-q4typx7c.mjs";
|
|
15
21
|
|
|
16
22
|
// src/setup/legacy-runtime.ts
|
|
17
23
|
import fs from "node:fs";
|
|
@@ -34,10 +40,17 @@ async function prepareLegacyTakeover(legacy, options = {}) {
|
|
|
34
40
|
return false;
|
|
35
41
|
if (env.OPENCODE_BROWSER_HOME && !samePath2(env.OPENCODE_BROWSER_HOME, legacy.root))
|
|
36
42
|
return false;
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
const port = options.relayPort ?? (Number(env.OPENCODE_BROWSER_PORT) || resolveRelayPort());
|
|
44
|
+
if (options.pinned ?? relayPortPinned(env)) {
|
|
45
|
+
if (await portInUse(port))
|
|
46
|
+
return false;
|
|
47
|
+
} else {
|
|
48
|
+
const owner = await probeRelayPort(port);
|
|
49
|
+
if (owner === "browse" || owner === "nobody" && await portInUse(port))
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
39
52
|
const home = options.home ?? os.homedir();
|
|
40
|
-
const { copyLegacyData } = await import("./migrate-
|
|
53
|
+
const { copyLegacyData } = await import("./migrate-hggn66v2.mjs");
|
|
41
54
|
delete env.OPENCODE_BROWSER_HOME;
|
|
42
55
|
copyLegacyData(home);
|
|
43
56
|
pending = { legacy, install, home };
|
|
@@ -51,7 +64,7 @@ async function commitLegacyTakeover(now = Date.now()) {
|
|
|
51
64
|
try {
|
|
52
65
|
if (!adoptLegacyRuntime(legacy, install, now))
|
|
53
66
|
return false;
|
|
54
|
-
const { migrateLegacy } = await import("./migrate-
|
|
67
|
+
const { migrateLegacy } = await import("./migrate-hggn66v2.mjs");
|
|
55
68
|
migrateLegacy(home, now);
|
|
56
69
|
return true;
|
|
57
70
|
} catch {
|
|
@@ -94,6 +107,13 @@ function writeForwarder(entry, runtime) {
|
|
|
94
107
|
writeAtomic(entry, ["#!/usr/bin/env node", `${FORWARDER} (${runtime.kind}). Don't edit.`, ...run, ""].join(`
|
|
95
108
|
`));
|
|
96
109
|
}
|
|
110
|
+
function realpath(file) {
|
|
111
|
+
try {
|
|
112
|
+
return fs.realpathSync(file);
|
|
113
|
+
} catch {
|
|
114
|
+
return path.resolve(file);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
97
117
|
function portInUse(port) {
|
|
98
118
|
return new Promise((resolve) => {
|
|
99
119
|
const socket = net.connect({ host: "127.0.0.1", port });
|
|
@@ -102,13 +122,6 @@ function portInUse(port) {
|
|
|
102
122
|
socket.once("error", (error) => resolve(error.code !== "ECONNREFUSED"));
|
|
103
123
|
});
|
|
104
124
|
}
|
|
105
|
-
function realpath(file) {
|
|
106
|
-
try {
|
|
107
|
-
return fs.realpathSync(file);
|
|
108
|
-
} catch {
|
|
109
|
-
return path.resolve(file);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
125
|
function writeAtomic(file, text, mode = 420) {
|
|
113
126
|
const temporary = `${file}.${process.pid}.tmp`;
|
|
114
127
|
fs.writeFileSync(temporary, text, { mode });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writePrivateJsonFileSync
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-bt237ys7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
bundledPairingCodeTtlMs,
|
|
6
6
|
mintPairingCode,
|
|
7
7
|
writeExtensionPairing
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-pq962g72.mjs";
|
|
9
9
|
import {
|
|
10
10
|
configRoot2,
|
|
11
11
|
cacheRoot,
|
|
12
12
|
devExtensionUrl,
|
|
13
13
|
devExtensionFolder
|
|
14
|
-
} from "./main-
|
|
14
|
+
} from "./main-rb7dermc.mjs";
|
|
15
15
|
|
|
16
16
|
// src/setup/dev-extension.ts
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
@@ -54,7 +54,7 @@ async function syncDevExtension(extension, options = {}) {
|
|
|
54
54
|
const manifest = JSON.parse(readFileSync(path.join(staging, "manifest.json"), "utf8"));
|
|
55
55
|
if (!manifest.key)
|
|
56
56
|
throw new Error("the dev extension has no manifest key, so it wouldn't have browse's unpacked ID");
|
|
57
|
-
writeExtensionPairing(staging, mintPairingCode(undefined, { ttlMs: bundledPairingCodeTtlMs }));
|
|
57
|
+
writeExtensionPairing(staging, mintPairingCode(undefined, { ttlMs: bundledPairingCodeTtlMs }), options.port);
|
|
58
58
|
const build = (() => {
|
|
59
59
|
try {
|
|
60
60
|
return JSON.parse(readFileSync(path.join(staging, "build.json"), "utf8")).build;
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
|
+
pipeArguments,
|
|
3
|
+
Prototype,
|
|
4
|
+
Class3,
|
|
5
|
+
dual,
|
|
6
|
+
identity,
|
|
7
|
+
memoize,
|
|
8
|
+
memoizeIdempotent,
|
|
9
|
+
isString,
|
|
10
|
+
isNumber,
|
|
11
|
+
isBoolean,
|
|
12
|
+
isPropertyKey,
|
|
13
|
+
isFunction,
|
|
14
|
+
isNotUndefined,
|
|
15
|
+
isNotNullish,
|
|
16
|
+
isNever,
|
|
17
|
+
isUnknown,
|
|
18
|
+
isObject,
|
|
19
|
+
isObjectKeyword,
|
|
20
|
+
hasProperty,
|
|
21
|
+
isTagged,
|
|
22
|
+
isError,
|
|
2
23
|
equals,
|
|
3
24
|
format,
|
|
4
25
|
formatPropertyKey,
|
|
@@ -65,33 +86,10 @@ import {
|
|
|
65
86
|
mapBothEager,
|
|
66
87
|
flatMapEager,
|
|
67
88
|
fnUntracedEager
|
|
68
|
-
} from "./main-
|
|
69
|
-
import {
|
|
70
|
-
pipeArguments,
|
|
71
|
-
Prototype2,
|
|
72
|
-
Class4,
|
|
73
|
-
dual,
|
|
74
|
-
identity,
|
|
75
|
-
memoize,
|
|
76
|
-
memoizeIdempotent,
|
|
77
|
-
isString,
|
|
78
|
-
isNumber,
|
|
79
|
-
isBoolean,
|
|
80
|
-
isPropertyKey,
|
|
81
|
-
isFunction,
|
|
82
|
-
isNotUndefined,
|
|
83
|
-
isNotNullish,
|
|
84
|
-
isNever,
|
|
85
|
-
isUnknown,
|
|
86
|
-
isObject,
|
|
87
|
-
isObjectKeyword,
|
|
88
|
-
hasProperty,
|
|
89
|
-
isTagged,
|
|
90
|
-
isError
|
|
91
|
-
} from "./main-qazf3bhk.mjs";
|
|
89
|
+
} from "./main-m45zegrn.mjs";
|
|
92
90
|
|
|
93
91
|
// node_modules/effect/dist/Data.js
|
|
94
|
-
var Class = class extends
|
|
92
|
+
var Class = class extends Class3 {
|
|
95
93
|
constructor(props) {
|
|
96
94
|
super();
|
|
97
95
|
if (props) {
|
|
@@ -509,7 +507,7 @@ function getSchemaIssueOrThrow(cause, message) {
|
|
|
509
507
|
}
|
|
510
508
|
|
|
511
509
|
// node_modules/effect/dist/SchemaGetter.js
|
|
512
|
-
var makeGetter = (fields) => Object.assign(Object.create(
|
|
510
|
+
var makeGetter = (fields) => Object.assign(Object.create(Prototype), fields);
|
|
513
511
|
var passthrough_ = /* @__PURE__ */ makeGetter({
|
|
514
512
|
_tag: "Passthrough"
|
|
515
513
|
});
|
|
@@ -563,7 +561,7 @@ function decodeBase64() {
|
|
|
563
561
|
|
|
564
562
|
// node_modules/effect/dist/SchemaTransformation.js
|
|
565
563
|
var TypeId2 = "~effect/SchemaTransformation/Transformation";
|
|
566
|
-
var Transformation = class extends
|
|
564
|
+
var Transformation = class extends Class3 {
|
|
567
565
|
[TypeId2] = TypeId2;
|
|
568
566
|
_tag = "Transformation";
|
|
569
567
|
decode;
|
|
@@ -1986,7 +1984,7 @@ function formatIsMutable(isMutable) {
|
|
|
1986
1984
|
function formatIsOptional(isOptional) {
|
|
1987
1985
|
return isOptional ? "?" : "";
|
|
1988
1986
|
}
|
|
1989
|
-
var Filter2 = class extends
|
|
1987
|
+
var Filter2 = class extends Class3 {
|
|
1990
1988
|
_tag = "Filter";
|
|
1991
1989
|
run;
|
|
1992
1990
|
annotations;
|
|
@@ -2010,7 +2008,7 @@ var Filter2 = class extends Class4 {
|
|
|
2010
2008
|
return new FilterGroup([this, other], annotations);
|
|
2011
2009
|
}
|
|
2012
2010
|
};
|
|
2013
|
-
var FilterGroup = class extends
|
|
2011
|
+
var FilterGroup = class extends Class3 {
|
|
2014
2012
|
_tag = "FilterGroup";
|
|
2015
2013
|
checks;
|
|
2016
2014
|
annotations;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
isNodeError
|
|
3
|
-
} from "./main-4h7rfhhr.mjs";
|
|
4
|
-
import {
|
|
2
|
+
isNodeError,
|
|
5
3
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
4
|
+
} from "./main-bt237ys7.mjs";
|
|
5
|
+
import {
|
|
6
|
+
stateRoot
|
|
7
|
+
} from "./main-rb7dermc.mjs";
|
|
7
8
|
import {
|
|
8
9
|
decodeUnknownOption,
|
|
9
10
|
optionalKey,
|
|
@@ -13,13 +14,10 @@ import {
|
|
|
13
14
|
Struct,
|
|
14
15
|
ArraySchema,
|
|
15
16
|
NullOr
|
|
16
|
-
} from "./main-
|
|
17
|
+
} from "./main-6hvv25x8.mjs";
|
|
17
18
|
import {
|
|
18
19
|
isSome
|
|
19
|
-
} from "./main-
|
|
20
|
-
import {
|
|
21
|
-
stateRoot
|
|
22
|
-
} from "./main-zw20hm01.mjs";
|
|
20
|
+
} from "./main-m45zegrn.mjs";
|
|
23
21
|
|
|
24
22
|
// src/session-manager/journal.ts
|
|
25
23
|
import fs from "node:fs";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
dual,
|
|
3
|
+
constVoid,
|
|
2
4
|
hasInterruptsOnly,
|
|
3
5
|
squash,
|
|
4
6
|
isSuccess2,
|
|
@@ -7,11 +9,7 @@ import {
|
|
|
7
9
|
tapCause,
|
|
8
10
|
runFork,
|
|
9
11
|
logError
|
|
10
|
-
} from "./main-
|
|
11
|
-
import {
|
|
12
|
-
dual,
|
|
13
|
-
constVoid
|
|
14
|
-
} from "./main-qazf3bhk.mjs";
|
|
12
|
+
} from "./main-m45zegrn.mjs";
|
|
15
13
|
|
|
16
14
|
// node_modules/effect/dist/Runtime.js
|
|
17
15
|
var defaultTeardown2 = (exit, onExit) => {
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
pipeArguments,
|
|
3
|
+
identity,
|
|
4
|
+
isString,
|
|
5
|
+
isNumber,
|
|
6
|
+
isBoolean,
|
|
2
7
|
succeed,
|
|
3
8
|
fail2,
|
|
4
9
|
isResult,
|
|
5
10
|
isSuccess,
|
|
6
11
|
ClockRef,
|
|
7
12
|
currentTimeMillis2
|
|
8
|
-
} from "./main-
|
|
9
|
-
import {
|
|
10
|
-
pipeArguments,
|
|
11
|
-
identity,
|
|
12
|
-
isString,
|
|
13
|
-
isNumber,
|
|
14
|
-
isBoolean
|
|
15
|
-
} from "./main-qazf3bhk.mjs";
|
|
13
|
+
} from "./main-m45zegrn.mjs";
|
|
16
14
|
|
|
17
15
|
// node_modules/effect/dist/Clock.js
|
|
18
16
|
var Clock = ClockRef;
|