@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/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.6";
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-8gwa4g0s.mjs")).opencodeBrowserVersion;
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("@effect/platform-node");
15
- const { runMcpServer } = await import("./mcp-4w28g9h2.mjs");
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-9qwn7rb1.mjs");
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-zjx0kaj7.mjs");
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-sxawv22k.mjs");
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-0z9803a3.mjs");
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-0z9803a3.mjs");
62
+ const { printSetupStatus } = await import("./setup-yj15s35p.mjs");
63
63
  printSetupStatus();
64
64
  }
65
- const { runCli } = await import("./cli-jp1jev7t.mjs");
65
+ const { runCli } = await import("./cli-t2hbftpz.mjs");
66
66
  runCli();
67
67
  }
@@ -31,7 +31,8 @@ import {
31
31
  isRestrictedTarget2,
32
32
  isRestrictedUrl2,
33
33
  dataUrlDocument2
34
- } from "./main-605j7tjk.mjs";
34
+ } from "./main-131yag9b.mjs";
35
+ import"./main-evpvxp5p.mjs";
35
36
  import"./main-3gthmkzw.mjs";
36
37
  export {
37
38
  HttpRouteError2 as HttpRouteError,
@@ -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-ry14nc9q.mjs";
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 = undefined) {
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-yv64m9we.mjs";
3
+ } from "./main-evpvxp5p.mjs";
4
4
  import {
5
5
  isValidSessionId2
6
- } from "./main-605j7tjk.mjs";
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-3cza6vx1.mjs";
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
- import { Option, Schema } from "effect";
15
- var JournalEntry = Schema.Struct({
16
- ts: Schema.String,
17
- sessionId: Schema.String,
18
- code: Schema.String,
19
- isError: Schema.Boolean,
20
- durationMs: Schema.Number,
21
- resultPreview: Schema.String,
22
- logCount: Schema.Number,
23
- startUrl: Schema.optionalKey(Schema.NullOr(Schema.String)),
24
- endUrl: Schema.optionalKey(Schema.NullOr(Schema.String)),
25
- navigations: Schema.optionalKey(Schema.Array(Schema.String)),
26
- warnings: Schema.optionalKey(Schema.Array(Schema.String)),
27
- diagnostic: Schema.optionalKey(Schema.String),
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 = Schema.decodeUnknownOption(JournalEntry);
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 (Option.isSome(decoded)) {
209
+ if (isSome(decoded)) {
200
210
  entries.push(decoded.value);
201
211
  }
202
212
  }