@opencode/browse 0.0.6 → 0.0.7
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/THIRD_PARTY_NOTICES.txt +310 -0
- package/dist/Undici-88kyhfpm.mjs +25295 -0
- package/dist/cli-9y4ksbjn.mjs +6694 -0
- package/dist/cli.mjs +10 -10
- package/dist/{helpers-ynamkf6t.mjs → helpers-vapejvdv.mjs} +2 -1
- package/dist/index-yghakpfn.mjs +12 -0
- package/dist/{main-yv64m9we.mjs → main-76r1c0hp.mjs} +5 -4
- package/dist/{main-njp635rz.mjs → main-7akqbf9h.mjs} +30 -20
- package/dist/main-9z6jbwdp.mjs +14661 -0
- package/dist/main-brs53cap.mjs +205 -0
- package/dist/main-g2y00taz.mjs +4 -0
- package/dist/{main-q5j1am67.mjs → main-jwjwc6a6.mjs} +2 -2
- package/dist/{main-hanwxg2c.mjs → main-krfmwmrb.mjs} +1416 -97
- package/dist/{main-0g9jqyts.mjs → main-m5gw4wda.mjs} +9 -9
- package/dist/{main-3cza6vx1.mjs → main-pzxxc274.mjs} +1 -1
- package/dist/main-r11ss6ah.mjs +1775 -0
- package/dist/main-yf9xhpn4.mjs +290 -0
- package/dist/mcp-8m6t3bd6.mjs +8515 -0
- package/dist/{relay-21t4e4tv.mjs → relay-jcc5r0yg.mjs} +739 -693
- package/dist/{runtime-update-zjx0kaj7.mjs → runtime-update-p6we99g4.mjs} +22 -11
- package/dist/{setup-0z9803a3.mjs → setup-5tabnedq.mjs} +10 -40
- package/dist/{supervisor-9qwn7rb1.mjs → supervisor-qf8vzxgy.mjs} +3 -3
- package/dist/{update-sxawv22k.mjs → update-t7drvm74.mjs} +3 -3
- package/dist/{version-8gwa4g0s.mjs → version-0k08p3by.mjs} +1 -1
- package/package.json +4 -3
- package/dist/cli-jp1jev7t.mjs +0 -1796
- package/dist/main-605j7tjk.mjs +0 -1410
- package/dist/main-ry14nc9q.mjs +0 -4
- package/dist/mcp-4w28g9h2.mjs +0 -905
package/dist/cli.mjs
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
var embeddedVersion = "0.0.
|
|
5
|
+
var embeddedVersion = "0.0.7";
|
|
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-0k08p3by.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
|
-
const { NodeRuntime } = await import("
|
|
15
|
-
const { runMcpServer } = await import("./mcp-
|
|
14
|
+
const { NodeRuntime } = await import("./index-yghakpfn.mjs");
|
|
15
|
+
const { runMcpServer } = await import("./mcp-8m6t3bd6.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-qf8vzxgy.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-p6we99g4.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-t7drvm74.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-5tabnedq.mjs");
|
|
28
28
|
await runSetup(command, process.argv.slice(3));
|
|
29
29
|
} else {
|
|
30
30
|
if (!command || command === "--help" || command === "-h") {
|
|
@@ -59,9 +59,9 @@ if (command === "--version" || command === "-v") {
|
|
|
59
59
|
`);
|
|
60
60
|
}
|
|
61
61
|
if (command === "status" && !process.argv.includes("--json")) {
|
|
62
|
-
const { printSetupStatus } = await import("./setup-
|
|
62
|
+
const { printSetupStatus } = await import("./setup-5tabnedq.mjs");
|
|
63
63
|
printSetupStatus();
|
|
64
64
|
}
|
|
65
|
-
const { runCli } = await import("./cli-
|
|
65
|
+
const { runCli } = await import("./cli-9y4ksbjn.mjs");
|
|
66
66
|
runCli();
|
|
67
67
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exports_NodeHttpClient,
|
|
3
|
+
exports_NodeRuntime,
|
|
4
|
+
exports_NodeStdio,
|
|
5
|
+
exports_NodeServices
|
|
6
|
+
} from "./main-9z6jbwdp.mjs";
|
|
7
|
+
export {
|
|
8
|
+
exports_NodeHttpClient as NodeHttpClient,
|
|
9
|
+
exports_NodeRuntime as NodeRuntime,
|
|
10
|
+
exports_NodeServices as NodeServices,
|
|
11
|
+
exports_NodeStdio as NodeStdio
|
|
12
|
+
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dataRoot
|
|
3
|
-
} from "./main-
|
|
4
|
-
|
|
3
|
+
} from "./main-pzxxc274.mjs";
|
|
4
|
+
import {
|
|
5
|
+
isString
|
|
6
|
+
} from "./main-yf9xhpn4.mjs";
|
|
5
7
|
// src/relay/secrets.ts
|
|
6
8
|
import crypto2 from "node:crypto";
|
|
7
9
|
import fs2 from "node:fs";
|
|
8
10
|
import path2 from "node:path";
|
|
9
11
|
|
|
10
12
|
// src/fs-durability.ts
|
|
11
|
-
import { Predicate } from "effect";
|
|
12
13
|
import crypto from "node:crypto";
|
|
13
14
|
import fsSync from "node:fs";
|
|
14
15
|
import fs from "node:fs/promises";
|
|
@@ -18,7 +19,7 @@ function isNodeError(error) {
|
|
|
18
19
|
return error instanceof Error && "code" in error;
|
|
19
20
|
}
|
|
20
21
|
function isUnsupportedDirectorySyncError(error) {
|
|
21
|
-
return isNodeError(error) &&
|
|
22
|
+
return isNodeError(error) && isString(error.code) && unsupportedDirectorySyncCodes.has(error.code);
|
|
22
23
|
}
|
|
23
24
|
async function writeJsonFileAtomically(filePath, value, options = {}) {
|
|
24
25
|
const directory = path.dirname(filePath);
|
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-76r1c0hp.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-r11ss6ah.mjs";
|
|
7
|
+
import {
|
|
8
|
+
isSome,
|
|
9
|
+
decodeUnknownOption,
|
|
10
|
+
optionalKey,
|
|
11
|
+
String3,
|
|
12
|
+
Number2,
|
|
13
|
+
Boolean3,
|
|
14
|
+
Struct,
|
|
15
|
+
ArraySchema,
|
|
16
|
+
NullOr
|
|
17
|
+
} from "./main-9z6jbwdp.mjs";
|
|
7
18
|
import {
|
|
8
19
|
dataRoot
|
|
9
|
-
} from "./main-
|
|
20
|
+
} from "./main-pzxxc274.mjs";
|
|
10
21
|
|
|
11
22
|
// src/session-manager/journal.ts
|
|
12
23
|
import fs from "node:fs";
|
|
13
24
|
import path from "node:path";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
handoffs: Schema.optionalKey(Schema.Number)
|
|
25
|
+
var JournalEntry = Struct({
|
|
26
|
+
ts: String3,
|
|
27
|
+
sessionId: String3,
|
|
28
|
+
code: String3,
|
|
29
|
+
isError: Boolean3,
|
|
30
|
+
durationMs: Number2,
|
|
31
|
+
resultPreview: String3,
|
|
32
|
+
logCount: Number2,
|
|
33
|
+
startUrl: optionalKey(NullOr(String3)),
|
|
34
|
+
endUrl: optionalKey(NullOr(String3)),
|
|
35
|
+
navigations: optionalKey(ArraySchema(String3)),
|
|
36
|
+
warnings: optionalKey(ArraySchema(String3)),
|
|
37
|
+
diagnostic: optionalKey(String3),
|
|
38
|
+
handoffs: optionalKey(Number2)
|
|
29
39
|
});
|
|
30
|
-
var decodeJournalEntry =
|
|
40
|
+
var decodeJournalEntry = decodeUnknownOption(JournalEntry);
|
|
31
41
|
var defaultJournalBaseDir = () => {
|
|
32
42
|
return path.join(dataRoot(), "sessions");
|
|
33
43
|
};
|
|
@@ -196,7 +206,7 @@ function parseJournalLines(raw) {
|
|
|
196
206
|
continue;
|
|
197
207
|
}
|
|
198
208
|
const decoded = decodeJournalEntry(parsed);
|
|
199
|
-
if (
|
|
209
|
+
if (isSome(decoded)) {
|
|
200
210
|
entries.push(decoded.value);
|
|
201
211
|
}
|
|
202
212
|
}
|