@opencode/browse 0.0.6-dev.18 → 0.0.6-dev.19
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-z00ttket.mjs → cli-22fe7etn.mjs} +771 -643
- package/dist/cli.mjs +8 -8
- package/dist/{relay-helpers-6a2vvzx9.mjs → helpers-rta4d2as.mjs} +1 -1
- package/dist/{main-w5sta7hq.mjs → main-2wrztakb.mjs} +4 -4
- package/dist/{main-9y22cffn.mjs → main-75rdz6bc.mjs} +3 -3
- package/dist/{main-jjny7bmm.mjs → main-8a245rm1.mjs} +21 -19
- package/dist/{main-fkhwazsm.mjs → main-90enpn5q.mjs} +1708 -1532
- package/dist/{main-d7rbre73.mjs → main-knahxbey.mjs} +4 -4
- package/dist/main-ts9jjqs8.mjs +4 -0
- package/dist/{main-0egy8naa.mjs → main-xatp12cr.mjs} +5 -5
- package/dist/{main-ha5bnd77.mjs → main-yd50d95g.mjs} +120 -118
- package/dist/{mcp-qh25n9s0.mjs → mcp-p0mcjvq9.mjs} +584 -481
- package/dist/{relay-zs96tkfm.mjs → relay-tfvn856e.mjs} +15736 -15299
- package/dist/{runtime-update-8wte78jj.mjs → runtime-update-pxbj49tf.mjs} +5 -5
- package/dist/{setup-cqjdfcy0.mjs → setup-y8pd11b8.mjs} +811 -705
- package/dist/{update-st5c8grg.mjs → update-5fx8t344.mjs} +2 -2
- package/dist/{version-6g6gtnra.mjs → version-cjhq7cm9.mjs} +1 -1
- package/package.json +1 -2
- package/dist/main-ppz7sv9s.mjs +0 -4
package/dist/cli.mjs
CHANGED
|
@@ -2,26 +2,26 @@
|
|
|
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.19";
|
|
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-cjhq7cm9.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-p0mcjvq9.mjs");
|
|
16
16
|
runMcpServer.pipe(NodeRuntime.runMain);
|
|
17
17
|
} else if (command === "runtime-install" || command === "runtime-switch") {
|
|
18
|
-
const { runRuntimeInstall, runRuntimeSwitch } = await import("./runtime-update-
|
|
18
|
+
const { runRuntimeInstall, runRuntimeSwitch } = await import("./runtime-update-pxbj49tf.mjs");
|
|
19
19
|
await (command === "runtime-install" ? runRuntimeInstall : runRuntimeSwitch)(process.argv.slice(3));
|
|
20
20
|
} else if (command === "update") {
|
|
21
|
-
const { runUpdateCommand } = await import("./update-
|
|
21
|
+
const { runUpdateCommand } = await import("./update-5fx8t344.mjs");
|
|
22
22
|
await runUpdateCommand(process.argv.slice(3));
|
|
23
23
|
} else if (command && setupCommands.has(command)) {
|
|
24
|
-
const { runSetup } = await import("./setup-
|
|
24
|
+
const { runSetup } = await import("./setup-y8pd11b8.mjs");
|
|
25
25
|
await runSetup(command, process.argv.slice(3));
|
|
26
26
|
} else {
|
|
27
27
|
if (!command || command === "--help" || command === "-h") {
|
|
@@ -55,9 +55,9 @@ if (command === "--version" || command === "-v") {
|
|
|
55
55
|
`);
|
|
56
56
|
}
|
|
57
57
|
if (command === "status" && !process.argv.includes("--json")) {
|
|
58
|
-
const { printSetupStatus } = await import("./setup-
|
|
58
|
+
const { printSetupStatus } = await import("./setup-y8pd11b8.mjs");
|
|
59
59
|
printSetupStatus();
|
|
60
60
|
}
|
|
61
|
-
const { runCli } = await import("./cli-
|
|
61
|
+
const { runCli } = await import("./cli-22fe7etn.mjs");
|
|
62
62
|
runCli();
|
|
63
63
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
unpackedReloadAdvice,
|
|
3
2
|
dataRoot,
|
|
4
3
|
checkoutRoot,
|
|
5
4
|
cliCommand,
|
|
6
5
|
compareVersions,
|
|
7
6
|
npmRuntime,
|
|
8
|
-
autoUpdateStatus
|
|
9
|
-
|
|
7
|
+
autoUpdateStatus,
|
|
8
|
+
unpackedReloadAdvice
|
|
9
|
+
} from "./main-yd50d95g.mjs";
|
|
10
10
|
|
|
11
11
|
// src/update.ts
|
|
12
12
|
import { execFile, spawnSync } from "node:child_process";
|
|
@@ -312,7 +312,7 @@ function runUpdate(args, deps) {
|
|
|
312
312
|
async function runUpdateCommand2(args) {
|
|
313
313
|
const log = (line) => process.stdout.write(line + `
|
|
314
314
|
`);
|
|
315
|
-
const { runNpmUpdate } = await import("./runtime-update-
|
|
315
|
+
const { runNpmUpdate } = await import("./runtime-update-pxbj49tf.mjs");
|
|
316
316
|
if (await runNpmUpdate(args))
|
|
317
317
|
return;
|
|
318
318
|
if (args.includes("--check")) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dataRoot
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-yd50d95g.mjs";
|
|
4
4
|
|
|
5
|
-
// src/relay
|
|
5
|
+
// src/relay/secrets.ts
|
|
6
6
|
import crypto2 from "node:crypto";
|
|
7
7
|
import fs2 from "node:fs";
|
|
8
8
|
import path2 from "node:path";
|
|
@@ -65,7 +65,7 @@ function writePrivateJsonFileSync(filePath, value, options = {}) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// src/relay
|
|
68
|
+
// src/relay/secrets.ts
|
|
69
69
|
var relayTokenQueryParam = "opencodeBrowserToken";
|
|
70
70
|
var tokenPattern = /^[A-Za-z0-9_-]{43}$/;
|
|
71
71
|
function relayTokenPath(root = dataRoot()) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
+
cliCommand,
|
|
3
|
+
installCommand,
|
|
4
|
+
npmRuntime,
|
|
2
5
|
unpackedExtensionId,
|
|
3
6
|
extensionReconnectAlarmPeriodMs,
|
|
4
7
|
extensionProtocolAdvice,
|
|
5
|
-
parseJsonObject
|
|
6
|
-
|
|
7
|
-
installCommand,
|
|
8
|
-
npmRuntime
|
|
9
|
-
} from "./main-ha5bnd77.mjs";
|
|
8
|
+
parseJsonObject
|
|
9
|
+
} from "./main-yd50d95g.mjs";
|
|
10
10
|
import {
|
|
11
11
|
relayAuthorization
|
|
12
|
-
} from "./main-
|
|
12
|
+
} from "./main-75rdz6bc.mjs";
|
|
13
13
|
import {
|
|
14
14
|
opencodeBrowserBuildId2
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-ts9jjqs8.mjs";
|
|
16
16
|
|
|
17
|
-
// src/relay
|
|
17
|
+
// src/relay/helpers.ts
|
|
18
18
|
import crypto from "node:crypto";
|
|
19
19
|
import { Effect, Option, Predicate, Schema as Schema2 } from "effect";
|
|
20
20
|
|
|
21
|
-
// src/relay
|
|
21
|
+
// src/relay/schema.ts
|
|
22
22
|
import { Schema } from "effect";
|
|
23
23
|
var SessionSummary = Schema.Struct({
|
|
24
24
|
id: Schema.String,
|
|
@@ -524,7 +524,7 @@ var ErrorEnvelope = Schema.Struct({
|
|
|
524
524
|
code: Schema.optionalKey(RelayErrorCode)
|
|
525
525
|
});
|
|
526
526
|
|
|
527
|
-
// src/relay
|
|
527
|
+
// src/relay/helpers.ts
|
|
528
528
|
var defaultHost2 = "127.0.0.1";
|
|
529
529
|
var defaultPort2 = 19988;
|
|
530
530
|
var stableUnpackedExtensionOrigin2 = `chrome-extension://${unpackedExtensionId}`;
|
|
@@ -946,7 +946,15 @@ async function dataUrlDocument2(url) {
|
|
|
946
946
|
return;
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
-
// src/relay
|
|
949
|
+
// src/relay/lifecycle.ts
|
|
950
|
+
import { Config as Config2, Effect as Effect3, Result, Schedule, Schema as Schema4 } from "effect";
|
|
951
|
+
import { spawn } from "node:child_process";
|
|
952
|
+
import crypto2 from "node:crypto";
|
|
953
|
+
import path from "node:path";
|
|
954
|
+
import process2 from "node:process";
|
|
955
|
+
import { fileURLToPath } from "node:url";
|
|
956
|
+
|
|
957
|
+
// src/relay/client.ts
|
|
950
958
|
import { NodeHttpClient } from "@effect/platform-node";
|
|
951
959
|
import { Config, Context, Effect as Effect2, Layer, Option as Option2, Schema as Schema3 } from "effect";
|
|
952
960
|
import { HttpClient, HttpClientRequest } from "effect/http";
|
|
@@ -1118,14 +1126,8 @@ function mcpClientPid() {
|
|
|
1118
1126
|
}
|
|
1119
1127
|
var layerFetchMcp = Layer.effect(Service, make({ clientPid: mcpClientPid() })).pipe(Layer.provide(NodeHttpClient.layerNodeHttp));
|
|
1120
1128
|
|
|
1121
|
-
// src/relay
|
|
1122
|
-
|
|
1123
|
-
import { spawn } from "node:child_process";
|
|
1124
|
-
import crypto2 from "node:crypto";
|
|
1125
|
-
import path from "node:path";
|
|
1126
|
-
import process2 from "node:process";
|
|
1127
|
-
import { fileURLToPath } from "node:url";
|
|
1128
|
-
var loadedCliEntrypoint = fileURLToPath(new URL(import.meta.url.endsWith(".ts") ? "./main.ts" : "./cli.mjs", import.meta.url));
|
|
1129
|
+
// src/relay/lifecycle.ts
|
|
1130
|
+
var loadedCliEntrypoint = fileURLToPath(new URL(import.meta.url.endsWith(".ts") ? "../main.ts" : "./cli.mjs", import.meta.url));
|
|
1129
1131
|
var clientInstanceId = crypto2.randomUUID();
|
|
1130
1132
|
function shouldWaitForExtensionReconnect(readiness) {
|
|
1131
1133
|
return readiness.started || readiness.waitForReconnect === true;
|