unbrowse 3.1.0-experiments.92b9fb5 → 3.1.0-experiments.93cfad2
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.js +30 -34
- package/dist/index.js +6 -2
- package/dist/mcp.js +21 -25
- package/package.json +1 -1
- package/runtime-src/build-info.generated.ts +4 -4
- package/runtime-src/runtime/local-server.ts +1 -7
- package/vendor/kuri/darwin-x64/kuri +0 -0
- package/vendor/kuri/linux-arm64/kuri +0 -0
- package/vendor/kuri/linux-x64/kuri +0 -0
- package/vendor/kuri/manifest.json +4 -4
- package/dist/server.js +0 -25798
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ var __promiseAll = (args) => Promise.all(args);
|
|
|
31
31
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
32
32
|
|
|
33
33
|
// ../../src/build-info.generated.ts
|
|
34
|
-
var BUILD_RELEASE_VERSION = "3.1.0-experiments.
|
|
34
|
+
var BUILD_RELEASE_VERSION = "3.1.0-experiments.93cfad2", BUILD_GIT_SHA = "93cfad23737e", BUILD_CODE_HASH = "1488fc1d92b7", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy4xLjAtZXhwZXJpbWVudHMuOTNjZmFkMiIsImdpdF9zaGEiOiI5M2NmYWQyMzczN2UiLCJjb2RlX2hhc2giOiIxNDg4ZmMxZDkyYjciLCJ0cmFjZV92ZXJzaW9uIjoiMTQ4OGZjMWQ5MmI3QDkzY2ZhZDIzNzM3ZSIsImlzc3VlZF9hdCI6IjIwMjYtMDQtMDZUMDM6MDM6MDAuODk5WiJ9", BUILD_RELEASE_MANIFEST_SIGNATURE = "dL8-FjofQKein9ZtjuzUMwrPbZIaUz9s46uyyRqj9Jo", BUILD_DEFAULT_BACKEND_URL = "https://unbrowse-backend-experiments.lewis-6d8.workers.dev";
|
|
35
35
|
|
|
36
36
|
// ../../src/version.ts
|
|
37
37
|
import { createHash } from "crypto";
|
|
@@ -586,7 +586,7 @@ var init_logger = __esm(() => {
|
|
|
586
586
|
|
|
587
587
|
// ../../src/kuri/client.ts
|
|
588
588
|
import { execFileSync as execFileSync2, spawn as spawn2 } from "node:child_process";
|
|
589
|
-
import { existsSync as
|
|
589
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
590
590
|
import path5 from "node:path";
|
|
591
591
|
function createBrokerState(port = KURI_DEFAULT_PORT) {
|
|
592
592
|
return {
|
|
@@ -661,7 +661,7 @@ function findKuriBinary() {
|
|
|
661
661
|
if (process.env.KURI_BIN)
|
|
662
662
|
return process.env.KURI_BIN;
|
|
663
663
|
const candidates = getKuriBinaryCandidates();
|
|
664
|
-
return candidates.find((candidate) =>
|
|
664
|
+
return candidates.find((candidate) => existsSync8(candidate)) ?? candidates[0] ?? kuriBinaryName();
|
|
665
665
|
}
|
|
666
666
|
var KURI_DEFAULT_PORT = 7700, defaultBrokerState, brokerClients;
|
|
667
667
|
var init_client2 = __esm(() => {
|
|
@@ -1152,7 +1152,7 @@ var init_routing_telemetry = __esm(() => {
|
|
|
1152
1152
|
});
|
|
1153
1153
|
// ../../src/orchestrator/index.ts
|
|
1154
1154
|
import { nanoid as nanoid9 } from "nanoid";
|
|
1155
|
-
import { existsSync as
|
|
1155
|
+
import { existsSync as existsSync9, writeFileSync as writeFileSync3, readFileSync as readFileSync6, mkdirSync as mkdirSync5, readdirSync as readdirSync3 } from "node:fs";
|
|
1156
1156
|
import { dirname as dirname3, join as join9 } from "node:path";
|
|
1157
1157
|
var LIVE_CAPTURE_TIMEOUT_MS, capturedDomainCache, captureInFlight, captureDomainLocks, skillRouteCache, ROUTE_CACHE_FILE, SKILL_SNAPSHOT_DIR2, domainSkillCache, DOMAIN_CACHE_FILE, _routeCacheDirty = false, routeCacheFlushTimer, routeResultCache, ROUTE_CACHE_TTL, MARKETPLACE_HYDRATE_LIMIT, MARKETPLACE_GET_SKILL_TIMEOUT_MS, MARKETPLACE_DOMAIN_SEARCH_K, MARKETPLACE_GLOBAL_SEARCH_K, SEARCH_INTENT_STOPWORDS;
|
|
1158
1158
|
var init_orchestrator = __esm(async () => {
|
|
@@ -1188,7 +1188,7 @@ var init_orchestrator = __esm(async () => {
|
|
|
1188
1188
|
domainSkillCache = new Map;
|
|
1189
1189
|
DOMAIN_CACHE_FILE = join9(process.env.HOME ?? "/tmp", ".unbrowse", "domain-skill-cache.json");
|
|
1190
1190
|
try {
|
|
1191
|
-
if (
|
|
1191
|
+
if (existsSync9(DOMAIN_CACHE_FILE)) {
|
|
1192
1192
|
const data = JSON.parse(readFileSync6(DOMAIN_CACHE_FILE, "utf-8"));
|
|
1193
1193
|
for (const [k, v] of Object.entries(data)) {
|
|
1194
1194
|
const entry = v;
|
|
@@ -1205,7 +1205,7 @@ var init_orchestrator = __esm(async () => {
|
|
|
1205
1205
|
_routeCacheDirty = false;
|
|
1206
1206
|
try {
|
|
1207
1207
|
const dir = dirname3(ROUTE_CACHE_FILE);
|
|
1208
|
-
if (!
|
|
1208
|
+
if (!existsSync9(dir))
|
|
1209
1209
|
mkdirSync5(dir, { recursive: true });
|
|
1210
1210
|
const entries = Object.fromEntries(skillRouteCache);
|
|
1211
1211
|
writeFileSync3(ROUTE_CACHE_FILE, JSON.stringify(entries), "utf-8");
|
|
@@ -1213,7 +1213,7 @@ var init_orchestrator = __esm(async () => {
|
|
|
1213
1213
|
}, 5000);
|
|
1214
1214
|
routeCacheFlushTimer.unref?.();
|
|
1215
1215
|
try {
|
|
1216
|
-
if (
|
|
1216
|
+
if (existsSync9(ROUTE_CACHE_FILE)) {
|
|
1217
1217
|
const data = JSON.parse(readFileSync6(ROUTE_CACHE_FILE, "utf-8"));
|
|
1218
1218
|
for (const [k, v] of Object.entries(data)) {
|
|
1219
1219
|
const entry = v;
|
|
@@ -1310,7 +1310,7 @@ __export(exports_wallet, {
|
|
|
1310
1310
|
getWalletContext: () => getWalletContext2,
|
|
1311
1311
|
checkWalletConfigured: () => checkWalletConfigured2
|
|
1312
1312
|
});
|
|
1313
|
-
import { existsSync as
|
|
1313
|
+
import { existsSync as existsSync13, readFileSync as readFileSync9 } from "node:fs";
|
|
1314
1314
|
import { homedir as homedir6 } from "node:os";
|
|
1315
1315
|
import { join as join11 } from "node:path";
|
|
1316
1316
|
function asNonEmptyString2(value) {
|
|
@@ -1318,7 +1318,7 @@ function asNonEmptyString2(value) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
function getLobsterWalletFromLocalConfig2() {
|
|
1320
1320
|
const agentsPath = join11(process.env.HOME || homedir6(), ".lobster", "agents.json");
|
|
1321
|
-
if (!
|
|
1321
|
+
if (!existsSync13(agentsPath))
|
|
1322
1322
|
return;
|
|
1323
1323
|
try {
|
|
1324
1324
|
const raw = JSON.parse(readFileSync9(agentsPath, "utf8"));
|
|
@@ -2297,7 +2297,7 @@ function buildDepsMetadata(pack, taskName) {
|
|
|
2297
2297
|
init_paths();
|
|
2298
2298
|
init_supervisor();
|
|
2299
2299
|
init_version();
|
|
2300
|
-
import {
|
|
2300
|
+
import { openSync, readFileSync as readFileSync5, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
2301
2301
|
import path2 from "node:path";
|
|
2302
2302
|
import { spawn } from "node:child_process";
|
|
2303
2303
|
function isServerVersionMismatch(runningVersion, installedVersion, runningCodeHash, installedCodeHash) {
|
|
@@ -2363,10 +2363,6 @@ function getServerSpawnSpec(metaUrl, entrypoint = resolveSiblingEntrypoint(metaU
|
|
|
2363
2363
|
recordedEntrypoint: `${process.execPath} serve`
|
|
2364
2364
|
};
|
|
2365
2365
|
}
|
|
2366
|
-
const serverJs = path2.join(path2.dirname(entrypoint), "server.js");
|
|
2367
|
-
if (path2.extname(entrypoint) !== ".js" && existsSync7(serverJs)) {
|
|
2368
|
-
entrypoint = serverJs;
|
|
2369
|
-
}
|
|
2370
2366
|
return {
|
|
2371
2367
|
command: process.execPath,
|
|
2372
2368
|
args: runtimeArgsForEntrypoint(metaUrl, entrypoint),
|
|
@@ -2512,7 +2508,7 @@ async function restartServer(baseUrl, metaUrl) {
|
|
|
2512
2508
|
}
|
|
2513
2509
|
|
|
2514
2510
|
// ../../src/runtime/paths.ts
|
|
2515
|
-
import { existsSync as
|
|
2511
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync4, realpathSync as realpathSync2 } from "node:fs";
|
|
2516
2512
|
import path3 from "node:path";
|
|
2517
2513
|
import { createRequire as createRequire3 } from "node:module";
|
|
2518
2514
|
import { fileURLToPath as fileURLToPath3, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
@@ -2532,7 +2528,7 @@ function runtimeArgsForEntrypoint2(metaUrl, entrypoint) {
|
|
|
2532
2528
|
const req = createRequire3(metaUrl);
|
|
2533
2529
|
const tsxPkg = req.resolve("tsx/package.json");
|
|
2534
2530
|
const tsxLoader = path3.join(path3.dirname(tsxPkg), "dist", "loader.mjs");
|
|
2535
|
-
if (
|
|
2531
|
+
if (existsSync7(tsxLoader))
|
|
2536
2532
|
return ["--import", pathToFileURL2(tsxLoader).href, entrypoint];
|
|
2537
2533
|
} catch {}
|
|
2538
2534
|
return ["--import", "tsx", entrypoint];
|
|
@@ -2601,13 +2597,13 @@ init_client2();
|
|
|
2601
2597
|
init_logger();
|
|
2602
2598
|
init_wallet();
|
|
2603
2599
|
import { execFileSync as execFileSync3 } from "node:child_process";
|
|
2604
|
-
import { existsSync as
|
|
2600
|
+
import { existsSync as existsSync11, mkdirSync as mkdirSync7, writeFileSync as writeFileSync5 } from "node:fs";
|
|
2605
2601
|
import os4 from "node:os";
|
|
2606
2602
|
import path7 from "node:path";
|
|
2607
2603
|
|
|
2608
2604
|
// ../../src/runtime/update-hints.ts
|
|
2609
2605
|
init_paths();
|
|
2610
|
-
import { existsSync as
|
|
2606
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readFileSync as readFileSync7, writeFileSync as writeFileSync4 } from "node:fs";
|
|
2611
2607
|
import os3 from "node:os";
|
|
2612
2608
|
import path6 from "node:path";
|
|
2613
2609
|
var DEFAULT_INTERVAL_MS = 12 * 60 * 60 * 1000;
|
|
@@ -2621,7 +2617,7 @@ function getConfigDir2() {
|
|
|
2621
2617
|
return path6.join(getHomeDir(), ".unbrowse");
|
|
2622
2618
|
}
|
|
2623
2619
|
function ensureDir3(dir) {
|
|
2624
|
-
if (!
|
|
2620
|
+
if (!existsSync10(dir))
|
|
2625
2621
|
mkdirSync6(dir, { recursive: true });
|
|
2626
2622
|
return dir;
|
|
2627
2623
|
}
|
|
@@ -2644,7 +2640,7 @@ function detectRepoRoot(start2) {
|
|
|
2644
2640
|
let dir = path6.resolve(start2);
|
|
2645
2641
|
const root = path6.parse(dir).root;
|
|
2646
2642
|
while (dir !== root) {
|
|
2647
|
-
if (
|
|
2643
|
+
if (existsSync10(path6.join(dir, ".git")))
|
|
2648
2644
|
return dir;
|
|
2649
2645
|
dir = path6.dirname(dir);
|
|
2650
2646
|
}
|
|
@@ -2723,12 +2719,12 @@ codex_hooks = true
|
|
|
2723
2719
|
}
|
|
2724
2720
|
function writeCodexHook(metaUrl) {
|
|
2725
2721
|
const configPath = getCodexConfigPath();
|
|
2726
|
-
if (!
|
|
2722
|
+
if (!existsSync10(path6.dirname(configPath))) {
|
|
2727
2723
|
return { host: "codex", action: "not-detected", config_file: configPath };
|
|
2728
2724
|
}
|
|
2729
2725
|
try {
|
|
2730
2726
|
const hookScript = getHookScriptPath(metaUrl).replace(/\\/g, "/");
|
|
2731
|
-
const fileExistsBefore =
|
|
2727
|
+
const fileExistsBefore = existsSync10(configPath);
|
|
2732
2728
|
let content = fileExistsBefore ? readFileSync7(configPath, "utf8") : "";
|
|
2733
2729
|
const previous = content;
|
|
2734
2730
|
content = ensureCodexHooksFeature(content);
|
|
@@ -2763,13 +2759,13 @@ command = ${JSON.stringify(command)}
|
|
|
2763
2759
|
}
|
|
2764
2760
|
function writeClaudeHook(metaUrl) {
|
|
2765
2761
|
const settingsPath = getClaudeSettingsPath();
|
|
2766
|
-
if (!
|
|
2762
|
+
if (!existsSync10(path6.dirname(settingsPath))) {
|
|
2767
2763
|
return { host: "claude", action: "not-detected", config_file: settingsPath };
|
|
2768
2764
|
}
|
|
2769
2765
|
try {
|
|
2770
2766
|
const hookScript = getHookScriptPath(metaUrl).replace(/\\/g, "/");
|
|
2771
2767
|
const command = `node "${hookScript}"`;
|
|
2772
|
-
const fileExistsBefore =
|
|
2768
|
+
const fileExistsBefore = existsSync10(settingsPath);
|
|
2773
2769
|
const settings = readJsonFile(settingsPath) ?? {};
|
|
2774
2770
|
settings.hooks ??= {};
|
|
2775
2771
|
settings.hooks.SessionStart ??= [];
|
|
@@ -2834,7 +2830,7 @@ function getOpenCodeProjectCommandsDir(cwd) {
|
|
|
2834
2830
|
return path7.join(cwd, ".opencode", "commands");
|
|
2835
2831
|
}
|
|
2836
2832
|
function detectOpenCode(cwd) {
|
|
2837
|
-
return hasBinary("opencode") ||
|
|
2833
|
+
return hasBinary("opencode") || existsSync11(path7.join(resolveConfigHome(), "opencode")) || existsSync11(path7.join(cwd, ".opencode"));
|
|
2838
2834
|
}
|
|
2839
2835
|
function renderOpenCodeCommand() {
|
|
2840
2836
|
return `---
|
|
@@ -2862,11 +2858,11 @@ function writeOpenCodeCommand(scope, cwd) {
|
|
|
2862
2858
|
if (scope === "auto" && !detected) {
|
|
2863
2859
|
return { detected: false, action: "not-detected", scope: "off" };
|
|
2864
2860
|
}
|
|
2865
|
-
const resolvedScope = scope === "project" ? "project" : scope === "global" ? "global" :
|
|
2861
|
+
const resolvedScope = scope === "project" ? "project" : scope === "global" ? "global" : existsSync11(path7.join(cwd, ".opencode")) ? "project" : "global";
|
|
2866
2862
|
const commandsDir = resolvedScope === "project" ? getOpenCodeProjectCommandsDir(cwd) : getOpenCodeGlobalCommandsDir();
|
|
2867
2863
|
const commandFile = path7.join(ensureDir2(commandsDir), "unbrowse.md");
|
|
2868
2864
|
const content = renderOpenCodeCommand();
|
|
2869
|
-
const action2 =
|
|
2865
|
+
const action2 = existsSync11(commandFile) ? "updated" : "installed";
|
|
2870
2866
|
mkdirSync7(path7.dirname(commandFile), { recursive: true });
|
|
2871
2867
|
writeFileSync5(commandFile, content);
|
|
2872
2868
|
return {
|
|
@@ -2878,10 +2874,10 @@ function writeOpenCodeCommand(scope, cwd) {
|
|
|
2878
2874
|
}
|
|
2879
2875
|
async function ensureBrowserEngineInstalled() {
|
|
2880
2876
|
const binary = findKuriBinary();
|
|
2881
|
-
if (
|
|
2877
|
+
if (existsSync11(binary)) {
|
|
2882
2878
|
return { installed: true, action: "already-installed" };
|
|
2883
2879
|
}
|
|
2884
|
-
const sourceDir = getKuriSourceCandidates().find((candidate) =>
|
|
2880
|
+
const sourceDir = getKuriSourceCandidates().find((candidate) => existsSync11(path7.join(candidate, "build.zig")));
|
|
2885
2881
|
if (!sourceDir) {
|
|
2886
2882
|
return {
|
|
2887
2883
|
installed: false,
|
|
@@ -2903,7 +2899,7 @@ async function ensureBrowserEngineInstalled() {
|
|
|
2903
2899
|
timeout: 300000
|
|
2904
2900
|
});
|
|
2905
2901
|
const builtBinary = findKuriBinary();
|
|
2906
|
-
if (
|
|
2902
|
+
if (existsSync11(builtBinary)) {
|
|
2907
2903
|
return {
|
|
2908
2904
|
installed: true,
|
|
2909
2905
|
action: "installed",
|
|
@@ -2928,7 +2924,7 @@ async function runSetup(options) {
|
|
|
2928
2924
|
const browser = options?.installBrowser === false ? { installed: false, action: "skipped" } : await ensureBrowserEngineInstalled();
|
|
2929
2925
|
const walletCheck = checkWalletConfigured();
|
|
2930
2926
|
const skipWalletSetup = process.env.UNBROWSE_SKIP_WALLET_SETUP === "1";
|
|
2931
|
-
const lobsterInstalled = hasBinary("lobstercash") ||
|
|
2927
|
+
const lobsterInstalled = hasBinary("lobstercash") || existsSync11(path7.join(os4.homedir(), ".agents", "skills", "lobstercash", "SKILL.md"));
|
|
2932
2928
|
if (!skipWalletSetup && !walletCheck.configured && lobsterInstalled) {
|
|
2933
2929
|
console.log("[unbrowse] Crossmint lobster.cash detected but wallet not configured — running wallet setup...");
|
|
2934
2930
|
try {
|
|
@@ -2968,7 +2964,7 @@ async function runSetup(options) {
|
|
|
2968
2964
|
|
|
2969
2965
|
// ../../src/runtime/update-hints.ts
|
|
2970
2966
|
init_paths();
|
|
2971
|
-
import { existsSync as
|
|
2967
|
+
import { existsSync as existsSync12, mkdirSync as mkdirSync8, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "node:fs";
|
|
2972
2968
|
import os5 from "node:os";
|
|
2973
2969
|
import path8 from "node:path";
|
|
2974
2970
|
var INSTALL_SCRIPT_URL = "https://unbrowse.ai/install.sh";
|
|
@@ -2982,7 +2978,7 @@ function getConfigDir3() {
|
|
|
2982
2978
|
return path8.join(getHomeDir2(), ".unbrowse");
|
|
2983
2979
|
}
|
|
2984
2980
|
function ensureDir4(dir) {
|
|
2985
|
-
if (!
|
|
2981
|
+
if (!existsSync12(dir))
|
|
2986
2982
|
mkdirSync8(dir, { recursive: true });
|
|
2987
2983
|
return dir;
|
|
2988
2984
|
}
|
|
@@ -3008,7 +3004,7 @@ function detectRepoRoot2(start2) {
|
|
|
3008
3004
|
let dir = path8.resolve(start2);
|
|
3009
3005
|
const root = path8.parse(dir).root;
|
|
3010
3006
|
while (dir !== root) {
|
|
3011
|
-
if (
|
|
3007
|
+
if (existsSync12(path8.join(dir, ".git")))
|
|
3012
3008
|
return dir;
|
|
3013
3009
|
dir = path8.dirname(dir);
|
|
3014
3010
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
5
6
|
|
|
6
7
|
const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
|
7
|
-
const serverEntrypoint = path.join(packageRoot, "
|
|
8
|
+
const serverEntrypoint = path.join(packageRoot, "runtime-src", "index.ts");
|
|
9
|
+
const req = createRequire(import.meta.url);
|
|
10
|
+
const tsxPkg = req.resolve("tsx/package.json");
|
|
11
|
+
const tsxLoader = path.join(path.dirname(tsxPkg), "dist", "loader.mjs");
|
|
8
12
|
|
|
9
|
-
const child = spawn(process.execPath, [serverEntrypoint, ...process.argv.slice(2)], {
|
|
13
|
+
const child = spawn(process.execPath, ["--import", tsxLoader, serverEntrypoint, ...process.argv.slice(2)], {
|
|
10
14
|
stdio: "inherit",
|
|
11
15
|
cwd: process.cwd(),
|
|
12
16
|
env: {
|
package/dist/mcp.js
CHANGED
|
@@ -20,7 +20,7 @@ __export(exports_lobster_pay, {
|
|
|
20
20
|
isLobsterAvailable: () => isLobsterAvailable
|
|
21
21
|
});
|
|
22
22
|
import { execFile, execFileSync } from "node:child_process";
|
|
23
|
-
import { existsSync as
|
|
23
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
24
24
|
import { homedir as homedir3 } from "node:os";
|
|
25
25
|
import { join as join4 } from "node:path";
|
|
26
26
|
function getLobsterCommand() {
|
|
@@ -31,7 +31,7 @@ function getLobsterCommand() {
|
|
|
31
31
|
try {
|
|
32
32
|
const npmPrefix = execFileSync("npm", ["config", "get", "prefix"], { encoding: "utf8", timeout: 5000 }).trim();
|
|
33
33
|
const lobsterPath = join4(npmPrefix, "bin", "lobstercash");
|
|
34
|
-
if (
|
|
34
|
+
if (existsSync5(lobsterPath)) {
|
|
35
35
|
execFileSync(lobsterPath, ["--version"], { stdio: "ignore", timeout: 3000 });
|
|
36
36
|
return { cmd: lobsterPath, prefix: [] };
|
|
37
37
|
}
|
|
@@ -45,7 +45,7 @@ function lobsterCmd() {
|
|
|
45
45
|
}
|
|
46
46
|
function isLobsterAvailable() {
|
|
47
47
|
const agentsPath = join4(process.env.HOME || homedir3(), ".lobster", "agents.json");
|
|
48
|
-
return
|
|
48
|
+
return existsSync5(agentsPath);
|
|
49
49
|
}
|
|
50
50
|
function lobsterX402Fetch(url, options) {
|
|
51
51
|
return new Promise((resolve) => {
|
|
@@ -121,12 +121,12 @@ var init_lobster_pay = () => {};
|
|
|
121
121
|
// ../../src/mcp.ts
|
|
122
122
|
import { config as loadEnv } from "dotenv";
|
|
123
123
|
import { createInterface } from "readline";
|
|
124
|
-
import { existsSync as
|
|
124
|
+
import { existsSync as existsSync7, readFileSync as readFileSync6 } from "fs";
|
|
125
125
|
import path4 from "path";
|
|
126
126
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
127
127
|
|
|
128
128
|
// ../../src/runtime/local-server.ts
|
|
129
|
-
import {
|
|
129
|
+
import { openSync, readFileSync as readFileSync2, unlinkSync, writeFileSync } from "node:fs";
|
|
130
130
|
import path2 from "node:path";
|
|
131
131
|
import { spawn } from "node:child_process";
|
|
132
132
|
|
|
@@ -225,11 +225,11 @@ import { dirname, join, parse } from "path";
|
|
|
225
225
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
226
226
|
|
|
227
227
|
// ../../src/build-info.generated.ts
|
|
228
|
-
var BUILD_RELEASE_VERSION = "3.1.0-experiments.
|
|
229
|
-
var BUILD_GIT_SHA = "
|
|
228
|
+
var BUILD_RELEASE_VERSION = "3.1.0-experiments.93cfad2";
|
|
229
|
+
var BUILD_GIT_SHA = "93cfad23737e";
|
|
230
230
|
var BUILD_CODE_HASH = "1488fc1d92b7";
|
|
231
|
-
var BUILD_RELEASE_MANIFEST_BASE64 = "
|
|
232
|
-
var BUILD_RELEASE_MANIFEST_SIGNATURE = "
|
|
231
|
+
var BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy4xLjAtZXhwZXJpbWVudHMuOTNjZmFkMiIsImdpdF9zaGEiOiI5M2NmYWQyMzczN2UiLCJjb2RlX2hhc2giOiIxNDg4ZmMxZDkyYjciLCJ0cmFjZV92ZXJzaW9uIjoiMTQ4OGZjMWQ5MmI3QDkzY2ZhZDIzNzM3ZSIsImlzc3VlZF9hdCI6IjIwMjYtMDQtMDZUMDM6MDM6MDAuODk5WiJ9";
|
|
232
|
+
var BUILD_RELEASE_MANIFEST_SIGNATURE = "dL8-FjofQKein9ZtjuzUMwrPbZIaUz9s46uyyRqj9Jo";
|
|
233
233
|
var BUILD_DEFAULT_BACKEND_URL = "https://unbrowse-backend-experiments.lewis-6d8.workers.dev";
|
|
234
234
|
|
|
235
235
|
// ../../src/version.ts
|
|
@@ -400,10 +400,6 @@ function getServerSpawnSpec(metaUrl, entrypoint = resolveSiblingEntrypoint(metaU
|
|
|
400
400
|
recordedEntrypoint: `${process.execPath} serve`
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
const serverJs = path2.join(path2.dirname(entrypoint), "server.js");
|
|
404
|
-
if (path2.extname(entrypoint) !== ".js" && existsSync3(serverJs)) {
|
|
405
|
-
entrypoint = serverJs;
|
|
406
|
-
}
|
|
407
403
|
return {
|
|
408
404
|
command: process.execPath,
|
|
409
405
|
args: runtimeArgsForEntrypoint(metaUrl, entrypoint),
|
|
@@ -544,7 +540,7 @@ function stopServer(baseUrl) {
|
|
|
544
540
|
}
|
|
545
541
|
|
|
546
542
|
// ../../src/workflow/publish.ts
|
|
547
|
-
import { existsSync as
|
|
543
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync3, readdirSync as readdirSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
548
544
|
import { homedir } from "node:os";
|
|
549
545
|
import { join as join2 } from "node:path";
|
|
550
546
|
|
|
@@ -571,7 +567,7 @@ function workflowPublishArtifactPathForSkill(skillId) {
|
|
|
571
567
|
}
|
|
572
568
|
function readWorkflowPublishArtifact(skillId) {
|
|
573
569
|
const target = workflowPublishArtifactPathForSkill(skillId);
|
|
574
|
-
if (!
|
|
570
|
+
if (!existsSync3(target))
|
|
575
571
|
return null;
|
|
576
572
|
try {
|
|
577
573
|
return JSON.parse(readFileSync3(target, "utf-8"));
|
|
@@ -581,13 +577,13 @@ function readWorkflowPublishArtifact(skillId) {
|
|
|
581
577
|
}
|
|
582
578
|
function listWorkflowPublishArtifacts() {
|
|
583
579
|
const dir = getWorkflowExportDir();
|
|
584
|
-
if (!
|
|
580
|
+
if (!existsSync3(dir))
|
|
585
581
|
return [];
|
|
586
582
|
return readdirSync2(dir).filter((entry) => entry.endsWith(".json")).map((entry) => join2(dir, entry));
|
|
587
583
|
}
|
|
588
584
|
|
|
589
585
|
// ../../src/impact-log.ts
|
|
590
|
-
import { existsSync as
|
|
586
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, appendFileSync, statSync, readFileSync as readFileSync4, renameSync, unlinkSync as unlinkSync2 } from "node:fs";
|
|
591
587
|
import { homedir as homedir2 } from "node:os";
|
|
592
588
|
import { dirname as dirname2, join as join3 } from "node:path";
|
|
593
589
|
var MAX_LOG_BYTES = 5 * 1024 * 1024;
|
|
@@ -603,19 +599,19 @@ function getImpactLogPath() {
|
|
|
603
599
|
}
|
|
604
600
|
function ensureDir2(path4) {
|
|
605
601
|
const dir = dirname2(path4);
|
|
606
|
-
if (!
|
|
602
|
+
if (!existsSync4(dir))
|
|
607
603
|
mkdirSync3(dir, { recursive: true });
|
|
608
604
|
}
|
|
609
605
|
function rotateIfNeeded(path4) {
|
|
610
606
|
try {
|
|
611
|
-
if (!
|
|
607
|
+
if (!existsSync4(path4))
|
|
612
608
|
return;
|
|
613
609
|
const size = statSync(path4).size;
|
|
614
610
|
if (size < MAX_LOG_BYTES)
|
|
615
611
|
return;
|
|
616
612
|
for (let i = MAX_ROTATIONS;i >= 1; i--) {
|
|
617
613
|
const older = `${path4}.${i}`;
|
|
618
|
-
if (!
|
|
614
|
+
if (!existsSync4(older))
|
|
619
615
|
continue;
|
|
620
616
|
if (i === MAX_ROTATIONS) {
|
|
621
617
|
try {
|
|
@@ -685,10 +681,10 @@ function readImpactSummary() {
|
|
|
685
681
|
const files = [];
|
|
686
682
|
for (let i = MAX_ROTATIONS;i >= 1; i--) {
|
|
687
683
|
const rotated = `${path4}.${i}`;
|
|
688
|
-
if (
|
|
684
|
+
if (existsSync4(rotated))
|
|
689
685
|
files.push(rotated);
|
|
690
686
|
}
|
|
691
|
-
if (
|
|
687
|
+
if (existsSync4(path4))
|
|
692
688
|
files.push(path4);
|
|
693
689
|
if (files.length === 0)
|
|
694
690
|
return summary;
|
|
@@ -745,7 +741,7 @@ function readImpactSummary() {
|
|
|
745
741
|
}
|
|
746
742
|
|
|
747
743
|
// ../../src/client/index.ts
|
|
748
|
-
import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, existsSync as
|
|
744
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, existsSync as existsSync6, mkdirSync as mkdirSync4, readdirSync as readdirSync3 } from "fs";
|
|
749
745
|
import { join as join5 } from "path";
|
|
750
746
|
import { homedir as homedir4, hostname, release as osRelease } from "os";
|
|
751
747
|
|
|
@@ -796,7 +792,7 @@ function sanitizeProfileName2(value) {
|
|
|
796
792
|
function loadConfig() {
|
|
797
793
|
try {
|
|
798
794
|
const configPath = getConfigPath();
|
|
799
|
-
if (
|
|
795
|
+
if (existsSync6(configPath)) {
|
|
800
796
|
return JSON.parse(readFileSync5(configPath, "utf-8"));
|
|
801
797
|
}
|
|
802
798
|
} catch {}
|
|
@@ -1316,7 +1312,7 @@ function getPackageRoot2() {
|
|
|
1316
1312
|
let dir = path4.dirname(fileURLToPath3(import.meta.url));
|
|
1317
1313
|
const root = path4.parse(dir).root;
|
|
1318
1314
|
while (dir !== root) {
|
|
1319
|
-
if (path4.basename(dir) === "src" &&
|
|
1315
|
+
if (path4.basename(dir) === "src" && existsSync7(path4.join(path4.dirname(dir), "package.json"))) {
|
|
1320
1316
|
return path4.dirname(dir);
|
|
1321
1317
|
}
|
|
1322
1318
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const BUILD_RELEASE_VERSION = "3.1.0-experiments.
|
|
2
|
-
export const BUILD_GIT_SHA = "
|
|
1
|
+
export const BUILD_RELEASE_VERSION = "3.1.0-experiments.93cfad2";
|
|
2
|
+
export const BUILD_GIT_SHA = "93cfad23737e";
|
|
3
3
|
export const BUILD_CODE_HASH = "1488fc1d92b7";
|
|
4
|
-
export const BUILD_RELEASE_MANIFEST_BASE64 = "
|
|
5
|
-
export const BUILD_RELEASE_MANIFEST_SIGNATURE = "
|
|
4
|
+
export const BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMy4xLjAtZXhwZXJpbWVudHMuOTNjZmFkMiIsImdpdF9zaGEiOiI5M2NmYWQyMzczN2UiLCJjb2RlX2hhc2giOiIxNDg4ZmMxZDkyYjciLCJ0cmFjZV92ZXJzaW9uIjoiMTQ4OGZjMWQ5MmI3QDkzY2ZhZDIzNzM3ZSIsImlzc3VlZF9hdCI6IjIwMjYtMDQtMDZUMDM6MDM6MDAuODk5WiJ9";
|
|
5
|
+
export const BUILD_RELEASE_MANIFEST_SIGNATURE = "dL8-FjofQKein9ZtjuzUMwrPbZIaUz9s46uyyRqj9Jo";
|
|
6
6
|
export const BUILD_DEFAULT_BACKEND_URL = "https://unbrowse-backend-experiments.lewis-6d8.workers.dev";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { openSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { ensureDir, getPackageRoot, getServerAutostartLogFile, getServerPidFile, resolveSiblingEntrypoint, runtimeArgsForEntrypoint } from "./paths.js";
|
|
@@ -105,12 +105,6 @@ export function getServerSpawnSpec(metaUrl: string, entrypoint = resolveSiblingE
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// Prefer bun-built dist/server.js over tsx-interpreted runtime-src/index.ts
|
|
109
|
-
const serverJs = path.join(path.dirname(entrypoint), "server.js");
|
|
110
|
-
if (path.extname(entrypoint) !== ".js" && existsSync(serverJs)) {
|
|
111
|
-
entrypoint = serverJs;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
108
|
return {
|
|
115
109
|
command: process.execPath,
|
|
116
110
|
args: runtimeArgsForEntrypoint(metaUrl, entrypoint),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"repo_url": "https://github.com/justrach/kuri.git",
|
|
3
3
|
"branch": "adding-extensions",
|
|
4
4
|
"source_sha": "eadfaa5f921f7152e1762aed5ed64b3a4fbefbf3",
|
|
5
|
-
"built_at": "2026-04-06T03:
|
|
5
|
+
"built_at": "2026-04-06T03:03:00.954Z",
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
},
|
|
12
12
|
"darwin-x64": {
|
|
13
13
|
"zig_target": "x86_64-macos",
|
|
14
|
-
"sha256": "
|
|
14
|
+
"sha256": "82db8a0f3596d1f9335785eca8009e257bf379197e725f29aaedd6f9c2456267"
|
|
15
15
|
},
|
|
16
16
|
"linux-arm64": {
|
|
17
17
|
"zig_target": "aarch64-linux",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "8b53f4944274cb8930488ef822b0052f121e824424501863c399f251d827386b"
|
|
19
19
|
},
|
|
20
20
|
"linux-x64": {
|
|
21
21
|
"zig_target": "x86_64-linux",
|
|
22
|
-
"sha256": "
|
|
22
|
+
"sha256": "ac00c41f2a8c706de9f0dcce1087fcdccb53484303c05f101bb461f7b9dceb48"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|