@opencode/browse 0.0.6 → 0.0.8-dev.36
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-t2hbftpz.mjs +6694 -0
- package/dist/cli.mjs +10 -10
- package/dist/{helpers-ynamkf6t.mjs → helpers-6h6q8p9b.mjs} +2 -1
- package/dist/index-yghakpfn.mjs +12 -0
- package/dist/{main-3cza6vx1.mjs → main-0jhjvcrn.mjs} +2 -2
- package/dist/{main-njp635rz.mjs → main-0qe3a59f.mjs} +30 -20
- package/dist/main-131yag9b.mjs +1775 -0
- package/dist/main-9z6jbwdp.mjs +14661 -0
- package/dist/main-brs53cap.mjs +205 -0
- package/dist/{main-yv64m9we.mjs → main-evpvxp5p.mjs} +5 -4
- package/dist/main-g25csbpx.mjs +4 -0
- package/dist/{main-q5j1am67.mjs → main-jqady4pw.mjs} +2 -2
- package/dist/{main-hanwxg2c.mjs → main-jyebwaqp.mjs} +1416 -97
- package/dist/{main-0g9jqyts.mjs → main-pybftexc.mjs} +9 -9
- package/dist/main-yf9xhpn4.mjs +290 -0
- package/dist/mcp-skdz88j0.mjs +8515 -0
- package/dist/{relay-21t4e4tv.mjs → relay-cd0k9sty.mjs} +739 -693
- package/dist/{runtime-update-zjx0kaj7.mjs → runtime-update-njmqcdep.mjs} +22 -11
- package/dist/{setup-0z9803a3.mjs → setup-yj15s35p.mjs} +10 -40
- package/dist/{supervisor-9qwn7rb1.mjs → supervisor-fmwtcxfy.mjs} +3 -3
- package/dist/{update-sxawv22k.mjs → update-y6xtyvjk.mjs} +3 -3
- package/dist/{version-8gwa4g0s.mjs → version-wc252mwz.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.8-dev.36";
|
|
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-wc252mwz.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-skdz88j0.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-fmwtcxfy.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-njmqcdep.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-y6xtyvjk.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-yj15s35p.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-yj15s35p.mjs");
|
|
63
63
|
printSetupStatus();
|
|
64
64
|
}
|
|
65
|
-
const { runCli } = await import("./cli-
|
|
65
|
+
const { runCli } = await import("./cli-t2hbftpz.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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-g25csbpx.mjs";
|
|
4
4
|
|
|
5
5
|
// src/update/auto-update.ts
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
@@ -70,7 +70,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
|
|
|
70
70
|
return id ? { id } : {};
|
|
71
71
|
}
|
|
72
72
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
73
|
-
function devExtension(baked =
|
|
73
|
+
function devExtension(baked = { file: "browse-extension-0.0.8-dev.36.zip", sha256: "63bc48d3f7e92e548486946d60322af1b6dab2534b2fc03da499cb53bc9aaf8d", size: 172556 }) {
|
|
74
74
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
75
75
|
}
|
|
76
76
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isNodeError
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-evpvxp5p.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-131yag9b.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-0jhjvcrn.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
|
}
|