@opencode/browse 0.0.11 → 0.0.12-dev.81
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-skncaqc5.mjs → cli-9j5kvz5j.mjs} +9 -9
- package/dist/cli.mjs +11 -11
- package/dist/{helpers-rg33e4py.mjs → helpers-bxhn7z0a.mjs} +1 -1
- package/dist/{main-461k4pp2.mjs → main-5y0dnrzy.mjs} +2 -2
- package/dist/{main-1rtsyp53.mjs → main-74v73a6c.mjs} +1 -1
- package/dist/main-aq8cvj1r.mjs +4 -0
- package/dist/{main-5176f9jg.mjs → main-cqf569fz.mjs} +3 -3
- package/dist/{main-2p7e8j3t.mjs → main-e463c3p4.mjs} +2 -2
- package/dist/{main-f3argtem.mjs → main-mg9xc627.mjs} +1 -1
- package/dist/{main-g7g3xvpb.mjs → main-qtmsj6bb.mjs} +3 -3
- package/dist/{main-4w0t0g7f.mjs → main-sebfwf6k.mjs} +2 -2
- package/dist/{main-j61hd9zf.mjs → main-wmfngqg9.mjs} +2 -2
- package/dist/{main-6pse904z.mjs → main-y89nje38.mjs} +3 -3
- package/dist/{mcp-srpsbpx0.mjs → mcp-1w78a9d6.mjs} +6 -6
- package/dist/{migrate-23a9gwwh.mjs → migrate-c612jze4.mjs} +4 -4
- package/dist/{relay-8c154a1s.mjs → relay-s3htzd7r.mjs} +15 -12
- package/dist/{runtime-update-h2c1xw2w.mjs → runtime-update-9nq9x69v.mjs} +4 -4
- package/dist/{setup-2tq7tjx3.mjs → setup-gr5gqgns.mjs} +21 -9
- package/dist/{supervisor-mg8y36mj.mjs → supervisor-8b8g2wmr.mjs} +3 -3
- package/dist/{update-7qv2g8t6.mjs → update-z47xsvnw.mjs} +3 -3
- package/dist/{version-ss2eqkrx.mjs → version-b20491ja.mjs} +1 -1
- package/package.json +1 -1
- package/dist/main-vbqt4kp0.mjs +0 -4
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
import {
|
|
106
106
|
opencodeBrowserVersion2,
|
|
107
107
|
opencodeBrowserBuildId2
|
|
108
|
-
} from "./main-
|
|
108
|
+
} from "./main-aq8cvj1r.mjs";
|
|
109
109
|
import {
|
|
110
110
|
configRoot2,
|
|
111
111
|
dataRoot,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
devExtension,
|
|
119
119
|
installCommand,
|
|
120
120
|
autoUpdateStatus
|
|
121
|
-
} from "./main-
|
|
121
|
+
} from "./main-y89nje38.mjs";
|
|
122
122
|
import {
|
|
123
123
|
extensionProtocolVersion,
|
|
124
124
|
extensionProtocolAdvice
|
|
@@ -144,13 +144,13 @@ import {
|
|
|
144
144
|
ensureExtensionConnected,
|
|
145
145
|
stoppedRelayStatus,
|
|
146
146
|
statusCollections
|
|
147
|
-
} from "./main-
|
|
147
|
+
} from "./main-cqf569fz.mjs";
|
|
148
148
|
import"./main-vgzr4689.mjs";
|
|
149
149
|
import {
|
|
150
150
|
updateJson2,
|
|
151
151
|
formatUpdateNotice2,
|
|
152
152
|
updateNotice2
|
|
153
|
-
} from "./main-
|
|
153
|
+
} from "./main-e463c3p4.mjs";
|
|
154
154
|
import {
|
|
155
155
|
settingKeys,
|
|
156
156
|
formatSettings,
|
|
@@ -158,13 +158,13 @@ import {
|
|
|
158
158
|
addSecret,
|
|
159
159
|
listSecrets,
|
|
160
160
|
removeSecret
|
|
161
|
-
} from "./main-
|
|
161
|
+
} from "./main-wmfngqg9.mjs";
|
|
162
162
|
import {
|
|
163
163
|
defaultJournalBaseDir,
|
|
164
164
|
readJournalEntries,
|
|
165
165
|
formatJournalEntry
|
|
166
|
-
} from "./main-
|
|
167
|
-
import"./main-
|
|
166
|
+
} from "./main-sebfwf6k.mjs";
|
|
167
|
+
import"./main-74v73a6c.mjs";
|
|
168
168
|
import {
|
|
169
169
|
pipeArguments,
|
|
170
170
|
dual,
|
|
@@ -5867,7 +5867,7 @@ var status = make("status", {
|
|
|
5867
5867
|
}
|
|
5868
5868
|
})).pipe(withDescription4("Show relay, extension, and target status"));
|
|
5869
5869
|
var mcp = make("mcp", {}, fn("Cli.mcp")(function* () {
|
|
5870
|
-
const { runMcpServer } = yield* promise(() => import("./mcp-
|
|
5870
|
+
const { runMcpServer } = yield* promise(() => import("./mcp-1w78a9d6.mjs"));
|
|
5871
5871
|
yield* runMcpServer;
|
|
5872
5872
|
})).pipe(withDescription4("Run the browse MCP server over stdio"));
|
|
5873
5873
|
registerCliCommand(400, () => tabs);
|
|
@@ -6315,7 +6315,7 @@ registerCliCommand(710, () => flightRecorder);
|
|
|
6315
6315
|
|
|
6316
6316
|
// src/cli/relay.ts
|
|
6317
6317
|
var serve = make("serve", {}, fn("Cli.serve")(function* () {
|
|
6318
|
-
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-
|
|
6318
|
+
const [{ startRelay }, { parseAdditionalExtensionOrigins }] = yield* promise(() => Promise.all([import("./relay-s3htzd7r.mjs"), import("./helpers-bxhn7z0a.mjs")]));
|
|
6319
6319
|
const port = yield* portConfig;
|
|
6320
6320
|
const additionalExtensionOrigins = parseAdditionalExtensionOrigins(yield* extensionOriginsConfig);
|
|
6321
6321
|
yield* scoped(gen(function* () {
|
package/dist/cli.mjs
CHANGED
|
@@ -4,36 +4,36 @@
|
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
var embeddedVersion = "0.0.
|
|
7
|
+
var embeddedVersion = "0.0.12-dev.81";
|
|
8
8
|
var setupCommands = new Set(["install", "uninstall", "extension", "pair", "set"]);
|
|
9
9
|
var command = process.argv[2];
|
|
10
10
|
var invokedAs = path.basename(process.argv[1] ?? "");
|
|
11
11
|
var legacyDataRoot = process.platform === "win32" ? path.join(process.env.LOCALAPPDATA ?? path.join(os.homedir(), "AppData", "Local"), "opencode-browser") : path.join(process.env.XDG_DATA_HOME ?? path.join(os.homedir(), ".local", "share"), "opencode-browser");
|
|
12
12
|
if (command !== "--version" && command !== "-v" && !process.env.OPENCODE_BROWSER_HOME && [path.join(os.homedir(), ".browse"), legacyDataRoot].some((root) => fs.existsSync(root))) {
|
|
13
13
|
try {
|
|
14
|
-
const { migrateLegacy } = await import("./migrate-
|
|
14
|
+
const { migrateLegacy } = await import("./migrate-c612jze4.mjs");
|
|
15
15
|
migrateLegacy();
|
|
16
16
|
} catch {}
|
|
17
17
|
}
|
|
18
18
|
if (command === "--version" || command === "-v") {
|
|
19
|
-
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-
|
|
19
|
+
const opencodeBrowserVersion = embeddedVersion ?? (await import("./version-b20491ja.mjs")).opencodeBrowserVersion;
|
|
20
20
|
process.stdout.write(`${opencodeBrowserVersion}
|
|
21
21
|
`);
|
|
22
|
-
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-
|
|
23
|
-
const { runBinaryMcp } = await import("./supervisor-
|
|
22
|
+
} else if (command === "mcp" && process.env.OPENCODE_BROWSER_MCP_DIRECT !== "1" && (await import("./supervisor-8b8g2wmr.mjs")).supervisesMcp()) {
|
|
23
|
+
const { runBinaryMcp } = await import("./supervisor-8b8g2wmr.mjs");
|
|
24
24
|
await runBinaryMcp(process.argv.slice(3));
|
|
25
25
|
} else if (invokedAs === "opencode-browser-mcp" || command === "mcp" && process.argv.length === 3) {
|
|
26
26
|
const { NodeRuntime } = await import("./index-yzz55kxm.mjs");
|
|
27
|
-
const { runMcpServer } = await import("./mcp-
|
|
27
|
+
const { runMcpServer } = await import("./mcp-1w78a9d6.mjs");
|
|
28
28
|
runMcpServer.pipe(NodeRuntime.runMain);
|
|
29
29
|
} else if (command === "self-update" || command === "runtime-switch") {
|
|
30
|
-
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-
|
|
30
|
+
const { runSelfUpdate, runRuntimeSwitch } = await import("./runtime-update-9nq9x69v.mjs");
|
|
31
31
|
await (command === "self-update" ? runSelfUpdate : runRuntimeSwitch)(process.argv.slice(3));
|
|
32
32
|
} else if (command === "update") {
|
|
33
|
-
const { runUpdateCommand } = await import("./update-
|
|
33
|
+
const { runUpdateCommand } = await import("./update-z47xsvnw.mjs");
|
|
34
34
|
await runUpdateCommand(process.argv.slice(3));
|
|
35
35
|
} else if (command && setupCommands.has(command)) {
|
|
36
|
-
const { runSetup } = await import("./setup-
|
|
36
|
+
const { runSetup } = await import("./setup-gr5gqgns.mjs");
|
|
37
37
|
await runSetup(command, process.argv.slice(3));
|
|
38
38
|
} else {
|
|
39
39
|
if (!command || command === "--help" || command === "-h") {
|
|
@@ -70,9 +70,9 @@ executable in ~/.local/bin (or $XDG_BIN_HOME).
|
|
|
70
70
|
`);
|
|
71
71
|
}
|
|
72
72
|
if (command === "status" && !process.argv.includes("--json")) {
|
|
73
|
-
const { printSetupStatus } = await import("./setup-
|
|
73
|
+
const { printSetupStatus } = await import("./setup-gr5gqgns.mjs");
|
|
74
74
|
printSetupStatus();
|
|
75
75
|
}
|
|
76
|
-
const { runCli } = await import("./cli-
|
|
76
|
+
const { runCli } = await import("./cli-9j5kvz5j.mjs");
|
|
77
77
|
runCli();
|
|
78
78
|
}
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
bundledPairingCodeTtlMs,
|
|
6
6
|
mintPairingCode,
|
|
7
7
|
writeExtensionPairing
|
|
8
|
-
} from "./main-
|
|
8
|
+
} from "./main-mg9xc627.mjs";
|
|
9
9
|
import {
|
|
10
10
|
configRoot2,
|
|
11
11
|
cacheRoot,
|
|
12
12
|
devExtensionUrl,
|
|
13
13
|
devExtensionFolder
|
|
14
|
-
} from "./main-
|
|
14
|
+
} from "./main-y89nje38.mjs";
|
|
15
15
|
|
|
16
16
|
// src/setup/dev-extension.ts
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
} from "./main-csnx585b.mjs";
|
|
108
108
|
import {
|
|
109
109
|
opencodeBrowserBuildId2
|
|
110
|
-
} from "./main-
|
|
110
|
+
} from "./main-aq8cvj1r.mjs";
|
|
111
111
|
import {
|
|
112
112
|
compiledBinary,
|
|
113
113
|
scriptEntry,
|
|
@@ -116,10 +116,10 @@ import {
|
|
|
116
116
|
compareVersions,
|
|
117
117
|
installedRuntime2,
|
|
118
118
|
installedVersion
|
|
119
|
-
} from "./main-
|
|
119
|
+
} from "./main-y89nje38.mjs";
|
|
120
120
|
import {
|
|
121
121
|
relayAuthorization
|
|
122
|
-
} from "./main-
|
|
122
|
+
} from "./main-74v73a6c.mjs";
|
|
123
123
|
import {
|
|
124
124
|
dual,
|
|
125
125
|
memoize,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
compareVersions,
|
|
7
7
|
installedRuntime2,
|
|
8
8
|
autoUpdateStatus
|
|
9
|
-
} from "./main-
|
|
9
|
+
} from "./main-y89nje38.mjs";
|
|
10
10
|
import {
|
|
11
11
|
unpackedReloadAdvice
|
|
12
12
|
} from "./main-mrew6jy8.mjs";
|
|
@@ -315,7 +315,7 @@ function runUpdate(args, deps) {
|
|
|
315
315
|
async function runUpdateCommand2(args) {
|
|
316
316
|
const log = (line) => process.stdout.write(line + `
|
|
317
317
|
`);
|
|
318
|
-
const { runInstalledUpdate } = await import("./runtime-update-
|
|
318
|
+
const { runInstalledUpdate } = await import("./runtime-update-9nq9x69v.mjs");
|
|
319
319
|
if (await runInstalledUpdate(args))
|
|
320
320
|
return;
|
|
321
321
|
if (compiledBinary()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-aq8cvj1r.mjs";
|
|
4
4
|
import {
|
|
5
5
|
configRoot2,
|
|
6
6
|
dataRoot,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
storeUrl,
|
|
19
19
|
installedVersion,
|
|
20
20
|
runCommand
|
|
21
|
-
} from "./main-
|
|
21
|
+
} from "./main-y89nje38.mjs";
|
|
22
22
|
import {
|
|
23
23
|
formatPairingCode
|
|
24
|
-
} from "./main-
|
|
24
|
+
} from "./main-mg9xc627.mjs";
|
|
25
25
|
import {
|
|
26
26
|
unpackedExtensionId
|
|
27
27
|
} from "./main-mrew6jy8.mjs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./main-vgzr4689.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isValidSessionId2
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-cqf569fz.mjs";
|
|
7
7
|
import {
|
|
8
8
|
isSome,
|
|
9
9
|
decodeUnknownOption,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./main-csnx585b.mjs";
|
|
18
18
|
import {
|
|
19
19
|
stateRoot
|
|
20
|
-
} from "./main-
|
|
20
|
+
} from "./main-y89nje38.mjs";
|
|
21
21
|
|
|
22
22
|
// src/session-manager/journal.ts
|
|
23
23
|
import fs from "node:fs";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseTargetSelection2,
|
|
13
13
|
getObject2,
|
|
14
14
|
getString2
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-cqf569fz.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isNodeError,
|
|
18
18
|
writeJsonFileAtomically
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
import {
|
|
132
132
|
dataRoot,
|
|
133
133
|
cliCommand
|
|
134
|
-
} from "./main-
|
|
134
|
+
} from "./main-y89nje38.mjs";
|
|
135
135
|
|
|
136
136
|
// node_modules/effect/dist/Semaphore.js
|
|
137
137
|
var makeUnsafe = (permits) => new SemaphoreImpl(permits);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2
|
|
3
|
-
} from "./main-
|
|
3
|
+
} from "./main-aq8cvj1r.mjs";
|
|
4
4
|
|
|
5
5
|
// src/paths.ts
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -55,7 +55,7 @@ function cliInstall() {
|
|
|
55
55
|
return { kind: "binary", binary: installedBinary() ?? process.execPath, pathEnv: process.env.PATH };
|
|
56
56
|
if (fromCheckout())
|
|
57
57
|
return { kind: "checkout", bundle: path.join(packageRoot(), "dist", "cli.mjs") };
|
|
58
|
-
return { kind: "npm", version: "0.0.
|
|
58
|
+
return { kind: "npm", version: "0.0.12-dev.81", npx: /[/\\]_npx[/\\]/.test(process.argv[1] ?? "") };
|
|
59
59
|
}
|
|
60
60
|
function cliPrefix(install = cliInstall()) {
|
|
61
61
|
if (install.kind === "binary") {
|
|
@@ -77,7 +77,7 @@ function storeConfig(env = process.env, baked = { id: "mfnicocicmmlkpjnaffgihfjh
|
|
|
77
77
|
return id ? { id } : {};
|
|
78
78
|
}
|
|
79
79
|
var RELEASE_SERVICE = "https://anoma.ly/release";
|
|
80
|
-
function devExtension(baked =
|
|
80
|
+
function devExtension(baked = { file: "browse-extension-0.0.12-dev.81.zip", sha256: "27b3ee0a372fccab1610dd800eb46a626b2b20920a6e8cd24015790eebea9ff9", size: 182577 }) {
|
|
81
81
|
return baked && /^[0-9a-f]{64}$/.test(baked.sha256) && /^[\w.-]+\.zip$/.test(baked.file) ? baked : undefined;
|
|
82
82
|
}
|
|
83
83
|
var devExtensionUrl = (extension, env = process.env) => `${(env.OPENCODE_BROWSER_RELEASE_SERVICE || RELEASE_SERVICE).replace(/\/+$/, "")}/browse/files/${extension.sha256}/${extension.file}`;
|
|
@@ -256,11 +256,11 @@ import {
|
|
|
256
256
|
} from "./main-csnx585b.mjs";
|
|
257
257
|
import {
|
|
258
258
|
opencodeBrowserVersion2
|
|
259
|
-
} from "./main-
|
|
259
|
+
} from "./main-aq8cvj1r.mjs";
|
|
260
260
|
import {
|
|
261
261
|
cliCommand,
|
|
262
262
|
autoUpdateStatus
|
|
263
|
-
} from "./main-
|
|
263
|
+
} from "./main-y89nje38.mjs";
|
|
264
264
|
import"./main-mrew6jy8.mjs";
|
|
265
265
|
import {
|
|
266
266
|
option,
|
|
@@ -280,12 +280,12 @@ import {
|
|
|
280
280
|
relayBuildProblem,
|
|
281
281
|
ensureRelay,
|
|
282
282
|
ensureExtensionConnected
|
|
283
|
-
} from "./main-
|
|
283
|
+
} from "./main-cqf569fz.mjs";
|
|
284
284
|
import"./main-vgzr4689.mjs";
|
|
285
285
|
import {
|
|
286
286
|
updateJson2,
|
|
287
287
|
createUpdateWatcher2
|
|
288
|
-
} from "./main-
|
|
288
|
+
} from "./main-e463c3p4.mjs";
|
|
289
289
|
import {
|
|
290
290
|
makeUnsafe,
|
|
291
291
|
make,
|
|
@@ -369,7 +369,7 @@ import {
|
|
|
369
369
|
mcpErrorMessage2,
|
|
370
370
|
toolResult,
|
|
371
371
|
listSecrets
|
|
372
|
-
} from "./main-
|
|
372
|
+
} from "./main-wmfngqg9.mjs";
|
|
373
373
|
import {
|
|
374
374
|
Clock,
|
|
375
375
|
type,
|
|
@@ -384,7 +384,7 @@ import {
|
|
|
384
384
|
orElse,
|
|
385
385
|
exhaustive
|
|
386
386
|
} from "./main-8z9d979q.mjs";
|
|
387
|
-
import"./main-
|
|
387
|
+
import"./main-74v73a6c.mjs";
|
|
388
388
|
import {
|
|
389
389
|
pipeArguments,
|
|
390
390
|
dual,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
browseServerCommand,
|
|
7
7
|
editAgentConfig,
|
|
8
8
|
configureMcp
|
|
9
|
-
} from "./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
} from "./main-qtmsj6bb.mjs";
|
|
10
|
+
import"./main-aq8cvj1r.mjs";
|
|
11
11
|
import {
|
|
12
12
|
configRoot2,
|
|
13
13
|
dataRoot,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
cacheRoot,
|
|
16
16
|
binRoot,
|
|
17
17
|
binaryName
|
|
18
|
-
} from "./main-
|
|
18
|
+
} from "./main-y89nje38.mjs";
|
|
19
19
|
import"./main-vgzr4689.mjs";
|
|
20
|
-
import"./main-
|
|
20
|
+
import"./main-mg9xc627.mjs";
|
|
21
21
|
import"./main-mrew6jy8.mjs";
|
|
22
22
|
|
|
23
23
|
// src/setup/migrate.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
opencodeBrowserVersion2,
|
|
3
3
|
opencodeBrowserBuildId2
|
|
4
|
-
} from "./main-
|
|
4
|
+
} from "./main-aq8cvj1r.mjs";
|
|
5
5
|
import {
|
|
6
6
|
dataRoot,
|
|
7
7
|
stateRoot,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
setStoredMode,
|
|
21
21
|
autoUpdateStatus,
|
|
22
22
|
createAutoUpdater
|
|
23
|
-
} from "./main-
|
|
23
|
+
} from "./main-y89nje38.mjs";
|
|
24
24
|
import {
|
|
25
25
|
extensionProtocolVersion,
|
|
26
26
|
minExtensionProtocolVersion,
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
isRestrictedTarget2,
|
|
96
96
|
isRestrictedUrl2,
|
|
97
97
|
dataUrlDocument2
|
|
98
|
-
} from "./main-
|
|
98
|
+
} from "./main-cqf569fz.mjs";
|
|
99
99
|
import {
|
|
100
100
|
context,
|
|
101
101
|
pendingPairingCodeKeys,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
pairingSessionKey,
|
|
114
114
|
sessionProof,
|
|
115
115
|
wrapToken
|
|
116
|
-
} from "./main-
|
|
116
|
+
} from "./main-mg9xc627.mjs";
|
|
117
117
|
import {
|
|
118
118
|
makeUnsafe,
|
|
119
119
|
SettingsInputError,
|
|
@@ -141,22 +141,22 @@ import {
|
|
|
141
141
|
checkNavigationUrl,
|
|
142
142
|
readSecret,
|
|
143
143
|
secretText
|
|
144
|
-
} from "./main-
|
|
144
|
+
} from "./main-wmfngqg9.mjs";
|
|
145
145
|
import {
|
|
146
146
|
defaultJournalBaseDir,
|
|
147
147
|
makeJournalEntry,
|
|
148
148
|
appendJournalEntry,
|
|
149
149
|
startJournalRetention
|
|
150
|
-
} from "./main-
|
|
150
|
+
} from "./main-sebfwf6k.mjs";
|
|
151
151
|
import {
|
|
152
152
|
createUpdateWatcher2
|
|
153
|
-
} from "./main-
|
|
153
|
+
} from "./main-e463c3p4.mjs";
|
|
154
154
|
import {
|
|
155
155
|
relayHostname,
|
|
156
156
|
isLocalPeer,
|
|
157
157
|
installedDevExtension,
|
|
158
158
|
syncDevExtension
|
|
159
|
-
} from "./main-
|
|
159
|
+
} from "./main-5y0dnrzy.mjs";
|
|
160
160
|
import {
|
|
161
161
|
currentTimeMillis,
|
|
162
162
|
value,
|
|
@@ -268,7 +268,7 @@ import {
|
|
|
268
268
|
relayToken,
|
|
269
269
|
secretsEqual,
|
|
270
270
|
ensurePrivateDirectory
|
|
271
|
-
} from "./main-
|
|
271
|
+
} from "./main-74v73a6c.mjs";
|
|
272
272
|
import {
|
|
273
273
|
isString,
|
|
274
274
|
isNumber,
|
|
@@ -15632,6 +15632,7 @@ import fs13 from "node:fs";
|
|
|
15632
15632
|
import { WebSocket as WebSocket3 } from "ws";
|
|
15633
15633
|
var maxPreAuthMessageBytes = 64 * 1024;
|
|
15634
15634
|
var preAuthHandshakeTimeoutMs = 1e4;
|
|
15635
|
+
var unpairedPresenceTtlMs = 10 * 60000;
|
|
15635
15636
|
function rawDataByteLength(data) {
|
|
15636
15637
|
return Array.isArray(data) ? data.reduce((total, chunk) => total + chunk.byteLength, 0) : data.byteLength;
|
|
15637
15638
|
}
|
|
@@ -15713,9 +15714,11 @@ class ExtensionHandshake {
|
|
|
15713
15714
|
const { browsers, registry, storeId } = this.options;
|
|
15714
15715
|
const link = browsers.defaultLink();
|
|
15715
15716
|
const rejected = link ? undefined : this.rejectedProtocol();
|
|
15716
|
-
const
|
|
15717
|
-
const
|
|
15718
|
-
const
|
|
15717
|
+
const now = Date.now();
|
|
15718
|
+
const recentlyRefused = this.lastRefused > now - 65000;
|
|
15719
|
+
const recentlyUnpaired = this.lastUnpaired > now - unpairedPresenceTtlMs;
|
|
15720
|
+
const pairingState = browsers.connected ? "connected" : rejected ? "incompatible" : recentlyRefused ? "refused" : recentlyUnpaired ? "unpaired" : this.hasPairedBrowser ? "paired-offline" : "not-seen";
|
|
15721
|
+
const nextStep = pairingState === "connected" ? undefined : link?.rpc.unresponsive ? browserUnresponsive : pairingState === "incompatible" ? this.mismatchAdvice(rejected?.version) : pairingState === "refused" || pairingState === "unpaired" ? `${pairingState === "refused" ? "browse refused the pairing attempt" : "browse is installed but not paired"}. Run \`${cliCommand("install")}\` again: it pairs the browser when it can open it, or prints a code to enter in browse's Options (\`${cliCommand("pair")}\` prints one too).` : pairingState === "paired-offline" ? "Open the browser profile already paired with browse and enable the extension; it reconnects automatically." : `No browser has contacted this relay yet. If browse is installed, open that browser and run \`${cliCommand("install")}\` to pair it. Otherwise ${storeId ? `add browse from ${storeUrl(storeId)}` : `follow the extension steps in \`${installCommand()}\``}.`;
|
|
15719
15722
|
return {
|
|
15720
15723
|
connected: browsers.connected,
|
|
15721
15724
|
pairingState,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-aq8cvj1r.mjs";
|
|
2
2
|
import {
|
|
3
3
|
cliCommand,
|
|
4
4
|
installCommand,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
registryUrl,
|
|
13
13
|
fetchPublished,
|
|
14
14
|
runInstaller
|
|
15
|
-
} from "./main-
|
|
15
|
+
} from "./main-y89nje38.mjs";
|
|
16
16
|
import"./main-mrew6jy8.mjs";
|
|
17
17
|
import {
|
|
18
18
|
Service,
|
|
19
19
|
layerFetch,
|
|
20
20
|
restartRelay,
|
|
21
21
|
startManagedRelay
|
|
22
|
-
} from "./main-
|
|
22
|
+
} from "./main-cqf569fz.mjs";
|
|
23
23
|
import"./main-vgzr4689.mjs";
|
|
24
24
|
import {
|
|
25
25
|
succeed6,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
provide3,
|
|
30
30
|
runPromise
|
|
31
31
|
} from "./main-csnx585b.mjs";
|
|
32
|
-
import"./main-
|
|
32
|
+
import"./main-74v73a6c.mjs";
|
|
33
33
|
|
|
34
34
|
// src/update/runtime-update.ts
|
|
35
35
|
var log = (line) => process.stdout.write(line + `
|
|
@@ -61,10 +61,10 @@ import {
|
|
|
61
61
|
installRuntime,
|
|
62
62
|
installedRuntime,
|
|
63
63
|
manualMcpEntry
|
|
64
|
-
} from "./main-
|
|
64
|
+
} from "./main-qtmsj6bb.mjs";
|
|
65
65
|
import {
|
|
66
66
|
opencodeBrowserBuildId2
|
|
67
|
-
} from "./main-
|
|
67
|
+
} from "./main-aq8cvj1r.mjs";
|
|
68
68
|
import {
|
|
69
69
|
installedBinaryPath,
|
|
70
70
|
oldStoreMarker,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
autoUpdateStatus,
|
|
79
79
|
describeAutoUpdate,
|
|
80
80
|
runCommand
|
|
81
|
-
} from "./main-
|
|
81
|
+
} from "./main-y89nje38.mjs";
|
|
82
82
|
import"./main-vgzr4689.mjs";
|
|
83
83
|
import {
|
|
84
84
|
pairingCodeTtlMs,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
revokeBrowserToken,
|
|
93
93
|
legacyPairingCode,
|
|
94
94
|
removeLegacyPairingCode
|
|
95
|
-
} from "./main-
|
|
95
|
+
} from "./main-mg9xc627.mjs";
|
|
96
96
|
import {
|
|
97
97
|
unpackedExtensionId,
|
|
98
98
|
extensionProtocolSkew,
|
|
@@ -103,10 +103,10 @@ import {
|
|
|
103
103
|
readRelayConfig,
|
|
104
104
|
writeRelayConfig,
|
|
105
105
|
syncDevExtension
|
|
106
|
-
} from "./main-
|
|
106
|
+
} from "./main-5y0dnrzy.mjs";
|
|
107
107
|
import {
|
|
108
108
|
relayAuthorization
|
|
109
|
-
} from "./main-
|
|
109
|
+
} from "./main-74v73a6c.mjs";
|
|
110
110
|
|
|
111
111
|
// src/setup.ts
|
|
112
112
|
import { mkdirSync as mkdirSync2, rmSync as rmSync2, writeFileSync } from "node:fs";
|
|
@@ -256,6 +256,8 @@ function locateExtension(options, effects = systemEffects) {
|
|
|
256
256
|
log(`! browse is turned off in ${off.map((match) => `${match.browser.name} (${match.profile.name})`).join(", ")}. Turn it on in the browser's extensions page.`);
|
|
257
257
|
return "off";
|
|
258
258
|
}
|
|
259
|
+
if (options.unpaired)
|
|
260
|
+
return "ready";
|
|
259
261
|
const blocked = options.detections.filter((detection) => detection.blocked).map((detection) => detection.browser.name);
|
|
260
262
|
if (blocked.length)
|
|
261
263
|
log(`! Couldn't check ${blocked.join(", ")} for browse (${blockedReason()})`);
|
|
@@ -812,6 +814,7 @@ async function installSteps(args, tty, caller) {
|
|
|
812
814
|
const initial = await settledExtensionStatus(entry);
|
|
813
815
|
const connected = initial?.connected ? initial : undefined;
|
|
814
816
|
const pairedOffline = initial?.pairingState === "paired-offline";
|
|
817
|
+
const needsPairing = initial?.pairingState === "unpaired" || initial?.pairingState === "refused";
|
|
815
818
|
const folder = unpackedFolder();
|
|
816
819
|
if (folder && !pairedOffline) {
|
|
817
820
|
pairUnpacked();
|
|
@@ -854,6 +857,7 @@ async function installSteps(args, tty, caller) {
|
|
|
854
857
|
allowOpen: !args.includes("--no-open"),
|
|
855
858
|
connected: !!connected,
|
|
856
859
|
pairedOffline,
|
|
860
|
+
unpaired: needsPairing,
|
|
857
861
|
detections,
|
|
858
862
|
preferred: ssh ? undefined : defaultBrowser(detections.map((detection) => detection.browser)),
|
|
859
863
|
env
|
|
@@ -870,13 +874,21 @@ async function installSteps(args, tty, caller) {
|
|
|
870
874
|
env,
|
|
871
875
|
code: pairingCode
|
|
872
876
|
});
|
|
877
|
+
if (needsPairing)
|
|
878
|
+
log("browse is installed in a browser but isn't paired with this relay yet.");
|
|
873
879
|
let offer = ssh ? "none" : pairStore(detections);
|
|
874
880
|
const blocked = detections.filter((d) => d.blocked).map((d) => d.browser.name);
|
|
875
|
-
if (offer === "none" && blocked.length)
|
|
881
|
+
if (offer === "none" && blocked.length) {
|
|
876
882
|
log(`Couldn't check ${blocked.join(", ")}. If browse is already installed there, pair it manually. ${manualPair(pairingCode())}`);
|
|
877
|
-
|
|
883
|
+
offer = "manual";
|
|
884
|
+
}
|
|
885
|
+
if (needsPairing && offer === "none") {
|
|
886
|
+
log(manualPair(pairingCode()));
|
|
887
|
+
offer = "code";
|
|
888
|
+
}
|
|
889
|
+
const next = needsPairing ? `If it isn't paired, run \`${cliCommand("pair")}\` for a new code and enter it in browse's Options.` : `If browse isn't connected after you add it, run \`${cliCommand("install")}\` again to pair it.`;
|
|
878
890
|
const agentNext = () => {
|
|
879
|
-
return `Agent: ${offer === "opened" ? "ask the user to open browse's status page in their browser" : offer === "manual" ||
|
|
891
|
+
return `Agent: ${offer === "opened" ? "ask the user to open browse's status page in their browser" : offer === "manual" || offer === "code" ? "ask the user to enter the pairing code printed above in browse's Options" : "ask the user to add browse from the Chrome Web Store"}. Then re-run \`${cliCommand("install")}\` to finish, or call the browse status tool to check the connection.`;
|
|
880
892
|
};
|
|
881
893
|
if (!env.tty)
|
|
882
894
|
log(agentNext());
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import"./main-
|
|
1
|
+
import"./main-aq8cvj1r.mjs";
|
|
2
2
|
import {
|
|
3
3
|
entryCommand,
|
|
4
4
|
installedRuntime2,
|
|
5
5
|
installedVersion
|
|
6
|
-
} from "./main-
|
|
6
|
+
} from "./main-y89nje38.mjs";
|
|
7
7
|
|
|
8
8
|
// src/mcp/supervisor.ts
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
@@ -33,7 +33,7 @@ async function runBinaryMcp(args) {
|
|
|
33
33
|
const runtime = installedRuntime2();
|
|
34
34
|
if (!runtime || runtime.kind === "npx") {
|
|
35
35
|
process.env[directEnvironmentVariable] = "1";
|
|
36
|
-
const { runCli } = await import("./cli-
|
|
36
|
+
const { runCli } = await import("./cli-9j5kvz5j.mjs");
|
|
37
37
|
return runCli();
|
|
38
38
|
}
|
|
39
39
|
const REPLAY = "opencode-browser-shim-initialize";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
updateNotice2,
|
|
5
5
|
createUpdateWatcher2,
|
|
6
6
|
runUpdateCommand2
|
|
7
|
-
} from "./main-
|
|
7
|
+
} from "./main-e463c3p4.mjs";
|
|
8
8
|
import"./main-mrew6jy8.mjs";
|
|
9
|
-
import"./main-
|
|
10
|
-
import"./main-
|
|
9
|
+
import"./main-y89nje38.mjs";
|
|
10
|
+
import"./main-aq8cvj1r.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createUpdateWatcher2 as createUpdateWatcher,
|
|
13
13
|
formatUpdateNotice2 as formatUpdateNotice,
|
package/package.json
CHANGED
package/dist/main-vbqt4kp0.mjs
DELETED