unbrowse 10.1.0 → 10.1.1
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/package.json +1 -1
- package/runtime/cli.js +93 -75
- package/runtime/mcp.js +64 -46
package/package.json
CHANGED
package/runtime/cli.js
CHANGED
|
@@ -64060,12 +64060,24 @@ async function drillPlan(nodes) {
|
|
|
64060
64060
|
}
|
|
64061
64061
|
|
|
64062
64062
|
// .tmp-runtime-src/values/contract-native.ts
|
|
64063
|
-
import { dlopen, FFIType, CString } from "bun:ffi";
|
|
64064
64063
|
import { existsSync as existsSync5 } from "node:fs";
|
|
64065
|
-
import { join as join9 } from "node:path";
|
|
64064
|
+
import { dirname, join as join9 } from "node:path";
|
|
64065
|
+
import { fileURLToPath } from "node:url";
|
|
64066
|
+
function bunFfi() {
|
|
64067
|
+
if (_ffi)
|
|
64068
|
+
return _ffi;
|
|
64069
|
+
if (!isBun)
|
|
64070
|
+
return null;
|
|
64071
|
+
try {
|
|
64072
|
+
_ffi = __require("bun:ffi");
|
|
64073
|
+
return _ffi;
|
|
64074
|
+
} catch {
|
|
64075
|
+
return null;
|
|
64076
|
+
}
|
|
64077
|
+
}
|
|
64066
64078
|
function resolveLib() {
|
|
64067
64079
|
const rel = join9("vendor", "contract", HOST, `libcontract.${EXT}`);
|
|
64068
|
-
const here =
|
|
64080
|
+
const here = moduleDir;
|
|
64069
64081
|
const candidates = [
|
|
64070
64082
|
join9(here, "..", "..", "packages", "skill", rel),
|
|
64071
64083
|
join9(here, "..", "..", rel),
|
|
@@ -64080,6 +64092,10 @@ function resolveLib() {
|
|
|
64080
64092
|
function load2() {
|
|
64081
64093
|
if (lib)
|
|
64082
64094
|
return lib;
|
|
64095
|
+
const f = bunFfi();
|
|
64096
|
+
if (!f)
|
|
64097
|
+
throw new Error("contract-native: bun:ffi unavailable (not running under Bun)");
|
|
64098
|
+
const { dlopen, FFIType } = f;
|
|
64083
64099
|
const path = resolveLib();
|
|
64084
64100
|
if (!path)
|
|
64085
64101
|
throw new Error(`contract-native: vendored libcontract.${EXT} for ${HOST} not found (vendor/contract)`);
|
|
@@ -64107,10 +64123,12 @@ function nativeAvailable() {
|
|
|
64107
64123
|
return false;
|
|
64108
64124
|
}
|
|
64109
64125
|
}
|
|
64110
|
-
var HOST, EXT, lib = null, cstr = (s) => Buffer.from(s + "\x00");
|
|
64126
|
+
var HOST, EXT, isBun, moduleDir, _ffi = null, lib = null, cstr = (s) => Buffer.from(s + "\x00");
|
|
64111
64127
|
var init_contract_native = __esm(() => {
|
|
64112
64128
|
HOST = `${process.platform}-${process.arch}`;
|
|
64113
64129
|
EXT = process.platform === "darwin" ? "dylib" : process.platform === "win32" ? "dll" : "so";
|
|
64130
|
+
isBun = typeof process !== "undefined" && !!process.versions?.bun;
|
|
64131
|
+
moduleDir = dirname(fileURLToPath(import.meta.url));
|
|
64114
64132
|
});
|
|
64115
64133
|
|
|
64116
64134
|
// .tmp-runtime-src/values/resolution-contract.ts
|
|
@@ -64782,17 +64800,17 @@ var init_telemetry = __esm(() => {
|
|
|
64782
64800
|
});
|
|
64783
64801
|
|
|
64784
64802
|
// .tmp-runtime-src/build-info.generated.ts
|
|
64785
|
-
var BUILD_RELEASE_VERSION = "10.1.
|
|
64803
|
+
var BUILD_RELEASE_VERSION = "10.1.1", BUILD_GIT_SHA = "12c48f746c4b", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS4xIiwiZ2l0X3NoYSI6IjEyYzQ4Zjc0NmM0YiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAMTJjNDhmNzQ2YzRiIiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yMlQyMzoxNTozOS45MDlaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "ZQ8aUqU191Wl8QmKl5O-H_YvYmY7jcz63nrhY6myYMU", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
64786
64804
|
|
|
64787
64805
|
// .tmp-runtime-src/version.ts
|
|
64788
64806
|
import { createHash as createHash8 } from "crypto";
|
|
64789
64807
|
import { existsSync as existsSync9, readFileSync as readFileSync10, readdirSync } from "fs";
|
|
64790
|
-
import { dirname, join as join10, parse } from "path";
|
|
64791
|
-
import { fileURLToPath } from "url";
|
|
64808
|
+
import { dirname as dirname2, join as join10, parse } from "path";
|
|
64809
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
64792
64810
|
import { execSync } from "child_process";
|
|
64793
64811
|
function safeModuleDir() {
|
|
64794
64812
|
try {
|
|
64795
|
-
return
|
|
64813
|
+
return dirname2(fileURLToPath2(import.meta.url));
|
|
64796
64814
|
} catch {
|
|
64797
64815
|
return "";
|
|
64798
64816
|
}
|
|
@@ -64817,13 +64835,13 @@ function hashFiles(srcDir, files) {
|
|
|
64817
64835
|
}
|
|
64818
64836
|
return hash.digest("hex").slice(0, 12);
|
|
64819
64837
|
}
|
|
64820
|
-
function resolveCodeHashSourceDir(
|
|
64838
|
+
function resolveCodeHashSourceDir(moduleDir2) {
|
|
64821
64839
|
const candidates = [
|
|
64822
|
-
|
|
64823
|
-
join10(
|
|
64824
|
-
join10(
|
|
64825
|
-
join10(
|
|
64826
|
-
join10(
|
|
64840
|
+
moduleDir2,
|
|
64841
|
+
join10(moduleDir2, "runtime-src"),
|
|
64842
|
+
join10(moduleDir2, "..", "runtime-src"),
|
|
64843
|
+
join10(moduleDir2, "src"),
|
|
64844
|
+
join10(moduleDir2, "..", "src")
|
|
64827
64845
|
];
|
|
64828
64846
|
for (const candidate of candidates) {
|
|
64829
64847
|
try {
|
|
@@ -64872,8 +64890,8 @@ function getEmbeddedReleaseVersion() {
|
|
|
64872
64890
|
const manifest = decodeBase64UrlJson(BUILD_RELEASE_MANIFEST_BASE64?.trim() || "");
|
|
64873
64891
|
return typeof manifest?.release_version === "string" && manifest.release_version.trim() ? manifest.release_version.trim() : null;
|
|
64874
64892
|
}
|
|
64875
|
-
function getPackageVersionForModuleDir(
|
|
64876
|
-
let dir =
|
|
64893
|
+
function getPackageVersionForModuleDir(moduleDir2) {
|
|
64894
|
+
let dir = moduleDir2;
|
|
64877
64895
|
const root = parse(dir).root;
|
|
64878
64896
|
while (true) {
|
|
64879
64897
|
try {
|
|
@@ -64882,7 +64900,7 @@ function getPackageVersionForModuleDir(moduleDir) {
|
|
|
64882
64900
|
} catch {}
|
|
64883
64901
|
if (dir === root)
|
|
64884
64902
|
return "unknown";
|
|
64885
|
-
dir =
|
|
64903
|
+
dir = dirname2(dir);
|
|
64886
64904
|
}
|
|
64887
64905
|
}
|
|
64888
64906
|
function getPackageVersion() {
|
|
@@ -66025,12 +66043,12 @@ var require_bare_module_resolve = __commonJS((exports, module) => {
|
|
|
66025
66043
|
}
|
|
66026
66044
|
return status;
|
|
66027
66045
|
};
|
|
66028
|
-
exports.directory = function* (
|
|
66046
|
+
exports.directory = function* (dirname3, parentURL, opts = {}) {
|
|
66029
66047
|
let directoryURL;
|
|
66030
|
-
if (
|
|
66031
|
-
directoryURL = new URL(
|
|
66048
|
+
if (dirname3[dirname3.length - 1] === "/" || dirname3[dirname3.length - 1] === "\\") {
|
|
66049
|
+
directoryURL = new URL(dirname3, parentURL);
|
|
66032
66050
|
} else {
|
|
66033
|
-
directoryURL = new URL(
|
|
66051
|
+
directoryURL = new URL(dirname3 + "/", parentURL);
|
|
66034
66052
|
}
|
|
66035
66053
|
const info = yield { package: new URL("package.json", directoryURL) };
|
|
66036
66054
|
if (info) {
|
|
@@ -66254,7 +66272,7 @@ var require_bare_addon_resolve = __commonJS((exports, module) => {
|
|
|
66254
66272
|
}
|
|
66255
66273
|
return status;
|
|
66256
66274
|
};
|
|
66257
|
-
exports.directory = function* (
|
|
66275
|
+
exports.directory = function* (dirname3, version2, parentURL, opts = {}) {
|
|
66258
66276
|
const {
|
|
66259
66277
|
host = null,
|
|
66260
66278
|
hosts = host !== null ? [host] : [],
|
|
@@ -66262,10 +66280,10 @@ var require_bare_addon_resolve = __commonJS((exports, module) => {
|
|
|
66262
66280
|
matchedConditions = []
|
|
66263
66281
|
} = opts;
|
|
66264
66282
|
let directoryURL;
|
|
66265
|
-
if (
|
|
66266
|
-
directoryURL = new URL(
|
|
66283
|
+
if (dirname3[dirname3.length - 1] === "/" || dirname3[dirname3.length - 1] === "\\") {
|
|
66284
|
+
directoryURL = new URL(dirname3, parentURL);
|
|
66267
66285
|
} else {
|
|
66268
|
-
directoryURL = new URL(
|
|
66286
|
+
directoryURL = new URL(dirname3 + "/", parentURL);
|
|
66269
66287
|
}
|
|
66270
66288
|
const unversioned = version2 === null;
|
|
66271
66289
|
let name = null;
|
|
@@ -68121,9 +68139,9 @@ var sodiumMemzero = null, triedLoad = false, warned = false;
|
|
|
68121
68139
|
import { existsSync as existsSync11, mkdirSync as mkdirSync6, realpathSync } from "node:fs";
|
|
68122
68140
|
import os from "node:os";
|
|
68123
68141
|
import path3 from "node:path";
|
|
68124
|
-
import { fileURLToPath as
|
|
68142
|
+
import { fileURLToPath as fileURLToPath3, pathToFileURL } from "node:url";
|
|
68125
68143
|
function getModuleDir(metaUrl) {
|
|
68126
|
-
return path3.dirname(
|
|
68144
|
+
return path3.dirname(fileURLToPath3(metaUrl));
|
|
68127
68145
|
}
|
|
68128
68146
|
function getPackageRoot(metaUrl) {
|
|
68129
68147
|
if (process.env.UNBROWSE_PACKAGE_ROOT)
|
|
@@ -72433,7 +72451,7 @@ var init_client2 = __esm(() => {
|
|
|
72433
72451
|
|
|
72434
72452
|
// .tmp-runtime-src/impact-log.ts
|
|
72435
72453
|
import { existsSync as existsSync20, mkdirSync as mkdirSync10, appendFileSync as appendFileSync4, statSync as statSync3, readFileSync as readFileSync16, renameSync, unlinkSync as unlinkSync3 } from "node:fs";
|
|
72436
|
-
import { dirname as
|
|
72454
|
+
import { dirname as dirname3, join as join21 } from "node:path";
|
|
72437
72455
|
function getLogDir() {
|
|
72438
72456
|
if (process.env.UNBROWSE_CONFIG_DIR)
|
|
72439
72457
|
return process.env.UNBROWSE_CONFIG_DIR;
|
|
@@ -72444,7 +72462,7 @@ function getImpactLogPath() {
|
|
|
72444
72462
|
return join21(getLogDir(), "impact-log.jsonl");
|
|
72445
72463
|
}
|
|
72446
72464
|
function ensureDir3(path5) {
|
|
72447
|
-
const dir =
|
|
72465
|
+
const dir = dirname3(path5);
|
|
72448
72466
|
if (!existsSync20(dir))
|
|
72449
72467
|
mkdirSync10(dir, { recursive: true });
|
|
72450
72468
|
}
|
|
@@ -77982,7 +78000,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
77982
78000
|
var { existsSync: existsSync22 } = __require("node:fs");
|
|
77983
78001
|
var getCallers = require_caller();
|
|
77984
78002
|
var { join: join22, isAbsolute, sep } = __require("node:path");
|
|
77985
|
-
var { fileURLToPath:
|
|
78003
|
+
var { fileURLToPath: fileURLToPath4 } = __require("node:url");
|
|
77986
78004
|
var sleep = require_atomic_sleep();
|
|
77987
78005
|
var onExit = require_on_exit_leak_free();
|
|
77988
78006
|
var ThreadStream = require_thread_stream();
|
|
@@ -78048,7 +78066,7 @@ var require_transport = __commonJS((exports, module) => {
|
|
|
78048
78066
|
let path5 = unquoted;
|
|
78049
78067
|
if (path5.startsWith("file://")) {
|
|
78050
78068
|
try {
|
|
78051
|
-
path5 =
|
|
78069
|
+
path5 = fileURLToPath4(path5);
|
|
78052
78070
|
} catch {
|
|
78053
78071
|
return false;
|
|
78054
78072
|
}
|
|
@@ -135516,10 +135534,10 @@ var init_learned_confidence_core = __esm(() => {
|
|
|
135516
135534
|
|
|
135517
135535
|
// .tmp-runtime-src/ranking/signals/learned-confidence.ts
|
|
135518
135536
|
import { existsSync as existsSync28, readFileSync as readFileSync22, statSync as statSync4 } from "node:fs";
|
|
135519
|
-
import { join as join28, dirname as
|
|
135520
|
-
import { fileURLToPath as
|
|
135537
|
+
import { join as join28, dirname as dirname4 } from "node:path";
|
|
135538
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
135521
135539
|
function repoRoot() {
|
|
135522
|
-
return join28(
|
|
135540
|
+
return join28(dirname4(fileURLToPath4(import.meta.url)), "..", "..", "..");
|
|
135523
135541
|
}
|
|
135524
135542
|
function pointerPath() {
|
|
135525
135543
|
return process.env.UNBROWSE_RANKING_HEAD || join28(repoRoot(), "bench", "ranking", "ranking-head.latest.json");
|
|
@@ -135549,7 +135567,7 @@ function loadHead() {
|
|
|
135549
135567
|
return embeddedLoaded();
|
|
135550
135568
|
if (meta.synthetic && process.env.UNBROWSE_RANKING_ALLOW_SYNTHETIC !== "1")
|
|
135551
135569
|
return embeddedLoaded();
|
|
135552
|
-
const art = JSON.parse(readFileSync22(join28(
|
|
135570
|
+
const art = JSON.parse(readFileSync22(join28(dirname4(ptr), meta.pointer), "utf8"));
|
|
135553
135571
|
if (!Array.isArray(art.weights) || art.weights.length !== FEAT_DIM)
|
|
135554
135572
|
return embeddedLoaded();
|
|
135555
135573
|
cached3 = { weights: art.weights, mtimeMs: st.mtimeMs, sha: meta.sha256_8 || "" };
|
|
@@ -166809,7 +166827,7 @@ var require_snapshot_utils = __commonJS((exports, module) => {
|
|
|
166809
166827
|
// node_modules/.bun/undici@7.25.0/node_modules/undici/lib/mock/snapshot-recorder.js
|
|
166810
166828
|
var require_snapshot_recorder = __commonJS((exports, module) => {
|
|
166811
166829
|
var { writeFile, readFile: readFile2, mkdir } = __require("node:fs/promises");
|
|
166812
|
-
var { dirname:
|
|
166830
|
+
var { dirname: dirname6, resolve: resolve2 } = __require("node:path");
|
|
166813
166831
|
var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers");
|
|
166814
166832
|
var { InvalidArgumentError, UndiciError } = require_errors8();
|
|
166815
166833
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
@@ -167004,7 +167022,7 @@ var require_snapshot_recorder = __commonJS((exports, module) => {
|
|
|
167004
167022
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
167005
167023
|
}
|
|
167006
167024
|
const resolvedPath = resolve2(path9);
|
|
167007
|
-
await mkdir(
|
|
167025
|
+
await mkdir(dirname6(resolvedPath), { recursive: true });
|
|
167008
167026
|
const data2 = Array.from(this.#snapshots.entries()).map(([hash, snapshot2]) => ({
|
|
167009
167027
|
hash,
|
|
167010
167028
|
snapshot: snapshot2
|
|
@@ -185278,8 +185296,8 @@ __export(exports_spawn, {
|
|
|
185278
185296
|
import { spawn as spawn3 } from "node:child_process";
|
|
185279
185297
|
import { existsSync as existsSync31, openSync as openSync3 } from "node:fs";
|
|
185280
185298
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
185281
|
-
import { dirname as
|
|
185282
|
-
import { fileURLToPath as
|
|
185299
|
+
import { dirname as dirname6, join as join33 } from "node:path";
|
|
185300
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
185283
185301
|
async function ensureKuriSandboxReachable(kuriBase = "http://127.0.0.1:8080") {
|
|
185284
185302
|
const probeOnce = async () => {
|
|
185285
185303
|
try {
|
|
@@ -185292,12 +185310,12 @@ async function ensureKuriSandboxReachable(kuriBase = "http://127.0.0.1:8080") {
|
|
|
185292
185310
|
if (await probeOnce())
|
|
185293
185311
|
return true;
|
|
185294
185312
|
try {
|
|
185295
|
-
const
|
|
185313
|
+
const moduleDir2 = dirname6(fileURLToPath5(import.meta.url));
|
|
185296
185314
|
const candidates = [
|
|
185297
185315
|
process.env.UNBROWSE_KURI_BIN,
|
|
185298
185316
|
process.env.KURI_BIN,
|
|
185299
185317
|
join33(process.cwd(), "submodules", "kuri", "zig-out", "bin", kuriBinaryName2()),
|
|
185300
|
-
...kuriVendorCandidatePaths({ execDir:
|
|
185318
|
+
...kuriVendorCandidatePaths({ execDir: dirname6(process.execPath), moduleDir: moduleDir2 }),
|
|
185301
185319
|
"/opt/homebrew/bin/kuri",
|
|
185302
185320
|
"/usr/local/bin/kuri"
|
|
185303
185321
|
];
|
|
@@ -191756,8 +191774,8 @@ var init_timing_economics = __esm(() => {
|
|
|
191756
191774
|
// .tmp-runtime-src/auth/pre-resolve-gate.ts
|
|
191757
191775
|
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
191758
191776
|
import { existsSync as existsSync33 } from "node:fs";
|
|
191759
|
-
import { join as join36, dirname as
|
|
191760
|
-
import { fileURLToPath as
|
|
191777
|
+
import { join as join36, dirname as dirname7 } from "node:path";
|
|
191778
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
191761
191779
|
function hasPersonalPronoun(intent) {
|
|
191762
191780
|
if (!intent)
|
|
191763
191781
|
return false;
|
|
@@ -191798,7 +191816,7 @@ function applyHarvestFallback(base2, domain, scan) {
|
|
|
191798
191816
|
}
|
|
191799
191817
|
function findCookieFreshnessScript() {
|
|
191800
191818
|
try {
|
|
191801
|
-
const here =
|
|
191819
|
+
const here = dirname7(fileURLToPath6(import.meta.url));
|
|
191802
191820
|
const candidate = join36(here, "..", "..", "scripts", "check_cookie_freshness.py");
|
|
191803
191821
|
if (existsSync33(candidate))
|
|
191804
191822
|
return candidate;
|
|
@@ -192904,7 +192922,7 @@ var init_mount = __esm(() => {
|
|
|
192904
192922
|
|
|
192905
192923
|
// .tmp-runtime-src/orchestrator/index.ts
|
|
192906
192924
|
import { existsSync as existsSync34, writeFileSync as writeFileSync20, readFileSync as readFileSync28, mkdirSync as mkdirSync22, readdirSync as readdirSync9 } from "node:fs";
|
|
192907
|
-
import { dirname as
|
|
192925
|
+
import { dirname as dirname8, join as join37 } from "node:path";
|
|
192908
192926
|
import { createHash as createHash20 } from "node:crypto";
|
|
192909
192927
|
function registrableHost(u) {
|
|
192910
192928
|
if (!u)
|
|
@@ -193053,7 +193071,7 @@ function persistDomainCache() {
|
|
|
193053
193071
|
if (!LOCAL_CACHES_ENABLED || ISOLATED_SKILL_SNAPSHOT_MODE)
|
|
193054
193072
|
return;
|
|
193055
193073
|
try {
|
|
193056
|
-
const dir =
|
|
193074
|
+
const dir = dirname8(DOMAIN_CACHE_FILE);
|
|
193057
193075
|
if (!existsSync34(dir))
|
|
193058
193076
|
mkdirSync22(dir, { recursive: true });
|
|
193059
193077
|
writeFileSync20(DOMAIN_CACHE_FILE, JSON.stringify(Object.fromEntries(domainSkillCache)), "utf-8");
|
|
@@ -193065,7 +193083,7 @@ function _writeRouteCacheToDisk() {
|
|
|
193065
193083
|
return;
|
|
193066
193084
|
}
|
|
193067
193085
|
try {
|
|
193068
|
-
const dir =
|
|
193086
|
+
const dir = dirname8(ROUTE_CACHE_FILE);
|
|
193069
193087
|
if (!existsSync34(dir))
|
|
193070
193088
|
mkdirSync22(dir, { recursive: true });
|
|
193071
193089
|
const entries = Object.fromEntries(skillRouteCache);
|
|
@@ -193089,7 +193107,7 @@ function invalidateRouteCacheForDomain(domain) {
|
|
|
193089
193107
|
}
|
|
193090
193108
|
if (deleted > 0 && LOCAL_CACHES_ENABLED) {
|
|
193091
193109
|
try {
|
|
193092
|
-
const dir =
|
|
193110
|
+
const dir = dirname8(ROUTE_CACHE_FILE);
|
|
193093
193111
|
if (!existsSync34(dir))
|
|
193094
193112
|
mkdirSync22(dir, { recursive: true });
|
|
193095
193113
|
writeFileSync20(ROUTE_CACHE_FILE, JSON.stringify(Object.fromEntries(skillRouteCache)), "utf-8");
|
|
@@ -202325,7 +202343,7 @@ var init_stale_cleanup_runner = __esm(async () => {
|
|
|
202325
202343
|
|
|
202326
202344
|
// .tmp-runtime-src/foundry/publish-bundle.ts
|
|
202327
202345
|
import { existsSync as existsSync38, mkdirSync as mkdirSync24, readFileSync as readFileSync33, writeFileSync as writeFileSync22 } from "node:fs";
|
|
202328
|
-
import { dirname as
|
|
202346
|
+
import { dirname as dirname9, isAbsolute, join as join43, resolve as resolve4 } from "node:path";
|
|
202329
202347
|
function ensureObject(value, message) {
|
|
202330
202348
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
202331
202349
|
throw new Error(message);
|
|
@@ -202505,13 +202523,13 @@ function renderHostSnippet(preset, host, installCommands) {
|
|
|
202505
202523
|
`);
|
|
202506
202524
|
}
|
|
202507
202525
|
function writeJson(target, data2) {
|
|
202508
|
-
mkdirSync24(
|
|
202526
|
+
mkdirSync24(dirname9(target), { recursive: true });
|
|
202509
202527
|
writeFileSync22(target, JSON.stringify(data2, null, 2) + `
|
|
202510
202528
|
`, "utf-8");
|
|
202511
202529
|
return target;
|
|
202512
202530
|
}
|
|
202513
202531
|
function writeText(target, content) {
|
|
202514
|
-
mkdirSync24(
|
|
202532
|
+
mkdirSync24(dirname9(target), { recursive: true });
|
|
202515
202533
|
writeFileSync22(target, content + `
|
|
202516
202534
|
`, "utf-8");
|
|
202517
202535
|
return target;
|
|
@@ -206353,9 +206371,9 @@ var init_in_process_app = __esm(async () => {
|
|
|
206353
206371
|
import { existsSync as existsSync41, mkdirSync as mkdirSync28, realpathSync as realpathSync2 } from "node:fs";
|
|
206354
206372
|
import path13 from "node:path";
|
|
206355
206373
|
import { createRequire as createRequire2 } from "node:module";
|
|
206356
|
-
import { fileURLToPath as
|
|
206374
|
+
import { fileURLToPath as fileURLToPath7, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
206357
206375
|
function resolveSiblingEntrypoint2(metaUrl, basename2) {
|
|
206358
|
-
const file =
|
|
206376
|
+
const file = fileURLToPath7(metaUrl);
|
|
206359
206377
|
return path13.join(path13.dirname(file), `${basename2}${path13.extname(file) || ".js"}`);
|
|
206360
206378
|
}
|
|
206361
206379
|
function isBundledVirtualEntrypoint(entrypoint) {
|
|
@@ -206382,10 +206400,10 @@ function isMainModule(metaUrl) {
|
|
|
206382
206400
|
return false;
|
|
206383
206401
|
if (entry.startsWith("file://")) {
|
|
206384
206402
|
try {
|
|
206385
|
-
entry =
|
|
206403
|
+
entry = fileURLToPath7(entry);
|
|
206386
206404
|
} catch {}
|
|
206387
206405
|
}
|
|
206388
|
-
const modulePath =
|
|
206406
|
+
const modulePath = fileURLToPath7(metaUrl);
|
|
206389
206407
|
try {
|
|
206390
206408
|
return realpathSync2(entry) === realpathSync2(modulePath);
|
|
206391
206409
|
} catch {
|
|
@@ -209752,10 +209770,10 @@ __export(exports_skill_install, {
|
|
|
209752
209770
|
});
|
|
209753
209771
|
import { existsSync as existsSync49, mkdirSync as mkdirSync35, readFileSync as readFileSync42, writeFileSync as writeFileSync32 } from "node:fs";
|
|
209754
209772
|
import { homedir as homedir34 } from "node:os";
|
|
209755
|
-
import { dirname as
|
|
209756
|
-
import { fileURLToPath as
|
|
209773
|
+
import { dirname as dirname10, join as join53 } from "node:path";
|
|
209774
|
+
import { fileURLToPath as fileURLToPath8 } from "node:url";
|
|
209757
209775
|
function findShippedSkillMd(metaUrl) {
|
|
209758
|
-
const dir =
|
|
209776
|
+
const dir = dirname10(fileURLToPath8(metaUrl));
|
|
209759
209777
|
const candidates = [
|
|
209760
209778
|
join53(dir, "SKILL.md"),
|
|
209761
209779
|
join53(dir, "..", "SKILL.md"),
|
|
@@ -284399,19 +284417,19 @@ var init_cliui = __esm(() => {
|
|
|
284399
284417
|
});
|
|
284400
284418
|
|
|
284401
284419
|
// node_modules/.bun/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
284402
|
-
import { dirname as
|
|
284420
|
+
import { dirname as dirname11, resolve as resolve11 } from "path";
|
|
284403
284421
|
import { readdirSync as readdirSync15, statSync as statSync9 } from "fs";
|
|
284404
284422
|
function sync_default(start2, callback) {
|
|
284405
284423
|
let dir = resolve11(".", start2);
|
|
284406
284424
|
let tmp, stats = statSync9(dir);
|
|
284407
284425
|
if (!stats.isDirectory()) {
|
|
284408
|
-
dir =
|
|
284426
|
+
dir = dirname11(dir);
|
|
284409
284427
|
}
|
|
284410
284428
|
while (true) {
|
|
284411
284429
|
tmp = callback(dir, readdirSync15(dir));
|
|
284412
284430
|
if (tmp)
|
|
284413
284431
|
return resolve11(dir, tmp);
|
|
284414
|
-
dir =
|
|
284432
|
+
dir = dirname11(tmp = dir);
|
|
284415
284433
|
if (tmp === dir)
|
|
284416
284434
|
break;
|
|
284417
284435
|
}
|
|
@@ -285624,8 +285642,8 @@ var init_y18n = __esm(() => {
|
|
|
285624
285642
|
import { notStrictEqual, strictEqual } from "assert";
|
|
285625
285643
|
import { inspect } from "util";
|
|
285626
285644
|
import { readFileSync as readFileSync48 } from "fs";
|
|
285627
|
-
import { fileURLToPath as
|
|
285628
|
-
import { basename as basename4, dirname as
|
|
285645
|
+
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
285646
|
+
import { basename as basename4, dirname as dirname12, extname, relative, resolve as resolve14 } from "path";
|
|
285629
285647
|
var REQUIRE_ERROR = "require is not supported by ESM", REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM", __dirname2, mainFilename, esm_default4;
|
|
285630
285648
|
var init_esm14 = __esm(() => {
|
|
285631
285649
|
init_cliui();
|
|
@@ -285634,7 +285652,7 @@ var init_esm14 = __esm(() => {
|
|
|
285634
285652
|
init_yerror();
|
|
285635
285653
|
init_y18n();
|
|
285636
285654
|
try {
|
|
285637
|
-
__dirname2 =
|
|
285655
|
+
__dirname2 = fileURLToPath9(import.meta.url);
|
|
285638
285656
|
} catch (e) {
|
|
285639
285657
|
__dirname2 = process.cwd();
|
|
285640
285658
|
}
|
|
@@ -285658,7 +285676,7 @@ var init_esm14 = __esm(() => {
|
|
|
285658
285676
|
Parser: lib_default,
|
|
285659
285677
|
path: {
|
|
285660
285678
|
basename: basename4,
|
|
285661
|
-
dirname:
|
|
285679
|
+
dirname: dirname12,
|
|
285662
285680
|
extname,
|
|
285663
285681
|
relative,
|
|
285664
285682
|
resolve: resolve14
|
|
@@ -290164,8 +290182,8 @@ __export(exports_utls_daemon, {
|
|
|
290164
290182
|
});
|
|
290165
290183
|
import { spawn as spawn9 } from "node:child_process";
|
|
290166
290184
|
import { existsSync as existsSync55, statSync as statSync11 } from "node:fs";
|
|
290167
|
-
import { dirname as
|
|
290168
|
-
import { fileURLToPath as
|
|
290185
|
+
import { dirname as dirname13, join as join62, resolve as resolve15 } from "node:path";
|
|
290186
|
+
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
290169
290187
|
function resolveUtlsProxyBinary() {
|
|
290170
290188
|
const override = process.env.UNBROWSE_UTLS_PROXY_BINARY;
|
|
290171
290189
|
if (override && existsSync55(override))
|
|
@@ -290175,7 +290193,7 @@ function resolveUtlsProxyBinary() {
|
|
|
290175
290193
|
const goarch = arch === "x64" ? "amd64" : arch === "arm64" ? "arm64" : arch;
|
|
290176
290194
|
const binName = `utls-proxy-${platform6}-${goarch}`;
|
|
290177
290195
|
try {
|
|
290178
|
-
const here =
|
|
290196
|
+
const here = dirname13(fileURLToPath10(import.meta.url));
|
|
290179
290197
|
const vendoredCandidates = [
|
|
290180
290198
|
resolve15(here, "..", "..", "..", "vendor", "utls-proxy", binName),
|
|
290181
290199
|
resolve15(here, "..", "..", "..", "..", "vendor", "utls-proxy", binName),
|
|
@@ -290187,7 +290205,7 @@ function resolveUtlsProxyBinary() {
|
|
|
290187
290205
|
}
|
|
290188
290206
|
} catch {}
|
|
290189
290207
|
try {
|
|
290190
|
-
const here =
|
|
290208
|
+
const here = dirname13(fileURLToPath10(import.meta.url));
|
|
290191
290209
|
const devCandidates = [
|
|
290192
290210
|
resolve15(here, "..", "..", "..", "submodules", "utls-proxy", "dist", binName),
|
|
290193
290211
|
resolve15(here, "..", "..", "..", "..", "submodules", "utls-proxy", "dist", binName)
|
|
@@ -296742,7 +296760,7 @@ var init_cookies = __esm(() => {
|
|
|
296742
296760
|
|
|
296743
296761
|
// .tmp-runtime-src/impact-log.ts
|
|
296744
296762
|
import { existsSync as existsSync59, mkdirSync as mkdirSync42, appendFileSync as appendFileSync7, statSync as statSync12, readFileSync as readFileSync50, renameSync as renameSync5, unlinkSync as unlinkSync10 } from "node:fs";
|
|
296745
|
-
import { dirname as
|
|
296763
|
+
import { dirname as dirname14, join as join71 } from "node:path";
|
|
296746
296764
|
function getLogDir2() {
|
|
296747
296765
|
if (process.env.UNBROWSE_CONFIG_DIR)
|
|
296748
296766
|
return process.env.UNBROWSE_CONFIG_DIR;
|
|
@@ -303337,9 +303355,9 @@ async function ensureKuriReachable(kuriBase) {
|
|
|
303337
303355
|
return;
|
|
303338
303356
|
const { spawn: spawn15 } = await import("child_process");
|
|
303339
303357
|
const { existsSync: existsSync64, openSync: openSync4 } = await import("fs");
|
|
303340
|
-
const { join: join78, dirname:
|
|
303341
|
-
const { fileURLToPath:
|
|
303342
|
-
const
|
|
303358
|
+
const { join: join78, dirname: dirname16 } = await import("path");
|
|
303359
|
+
const { fileURLToPath: fileURLToPath11 } = await import("url");
|
|
303360
|
+
const moduleDir2 = dirname16(fileURLToPath11(import.meta.url));
|
|
303343
303361
|
const kuriTarget = (() => {
|
|
303344
303362
|
if (process.platform === "darwin" && process.arch === "arm64")
|
|
303345
303363
|
return "darwin-arm64";
|
|
@@ -303358,8 +303376,8 @@ async function ensureKuriReachable(kuriBase) {
|
|
|
303358
303376
|
process.env.UNBROWSE_KURI_BIN,
|
|
303359
303377
|
process.env.KURI_BIN,
|
|
303360
303378
|
join78(process.cwd(), "submodules/kuri/zig-out/bin/kuri"),
|
|
303361
|
-
kuriTarget ? join78(
|
|
303362
|
-
kuriTarget ? join78(
|
|
303379
|
+
kuriTarget ? join78(moduleDir2, "../vendor/kuri", kuriTarget, kuriBinName) : undefined,
|
|
303380
|
+
kuriTarget ? join78(moduleDir2, "../packages/skill/vendor/kuri", kuriTarget, kuriBinName) : undefined,
|
|
303363
303381
|
"/opt/homebrew/bin/kuri",
|
|
303364
303382
|
"/usr/local/bin/kuri"
|
|
303365
303383
|
].filter((p) => !!p && existsSync64(p));
|
package/runtime/mcp.js
CHANGED
|
@@ -95156,7 +95156,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
95156
95156
|
});
|
|
95157
95157
|
|
|
95158
95158
|
// .tmp-runtime-src/build-info.generated.ts
|
|
95159
|
-
var BUILD_RELEASE_VERSION = "10.1.
|
|
95159
|
+
var BUILD_RELEASE_VERSION = "10.1.1", BUILD_GIT_SHA = "12c48f746c4b", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS4xIiwiZ2l0X3NoYSI6IjEyYzQ4Zjc0NmM0YiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFAMTJjNDhmNzQ2YzRiIiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yMlQyMzoxNTozOS45MDlaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "ZQ8aUqU191Wl8QmKl5O-H_YvYmY7jcz63nrhY6myYMU", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
95160
95160
|
|
|
95161
95161
|
// .tmp-runtime-src/version.ts
|
|
95162
95162
|
import { createHash as createHash5 } from "crypto";
|
|
@@ -207880,12 +207880,24 @@ async function drillPlan(nodes) {
|
|
|
207880
207880
|
}
|
|
207881
207881
|
|
|
207882
207882
|
// .tmp-runtime-src/values/contract-native.ts
|
|
207883
|
-
import { dlopen, FFIType, CString } from "bun:ffi";
|
|
207884
207883
|
import { existsSync as existsSync42 } from "node:fs";
|
|
207885
|
-
import { join as join47 } from "node:path";
|
|
207884
|
+
import { dirname as dirname9, join as join47 } from "node:path";
|
|
207885
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
207886
|
+
function bunFfi() {
|
|
207887
|
+
if (_ffi)
|
|
207888
|
+
return _ffi;
|
|
207889
|
+
if (!isBun)
|
|
207890
|
+
return null;
|
|
207891
|
+
try {
|
|
207892
|
+
_ffi = __require("bun:ffi");
|
|
207893
|
+
return _ffi;
|
|
207894
|
+
} catch {
|
|
207895
|
+
return null;
|
|
207896
|
+
}
|
|
207897
|
+
}
|
|
207886
207898
|
function resolveLib() {
|
|
207887
207899
|
const rel = join47("vendor", "contract", HOST, `libcontract.${EXT}`);
|
|
207888
|
-
const here =
|
|
207900
|
+
const here = moduleDir;
|
|
207889
207901
|
const candidates = [
|
|
207890
207902
|
join47(here, "..", "..", "packages", "skill", rel),
|
|
207891
207903
|
join47(here, "..", "..", rel),
|
|
@@ -207900,6 +207912,10 @@ function resolveLib() {
|
|
|
207900
207912
|
function load3() {
|
|
207901
207913
|
if (lib)
|
|
207902
207914
|
return lib;
|
|
207915
|
+
const f = bunFfi();
|
|
207916
|
+
if (!f)
|
|
207917
|
+
throw new Error("contract-native: bun:ffi unavailable (not running under Bun)");
|
|
207918
|
+
const { dlopen, FFIType } = f;
|
|
207903
207919
|
const path15 = resolveLib();
|
|
207904
207920
|
if (!path15)
|
|
207905
207921
|
throw new Error(`contract-native: vendored libcontract.${EXT} for ${HOST} not found (vendor/contract)`);
|
|
@@ -207927,10 +207943,12 @@ function nativeAvailable() {
|
|
|
207927
207943
|
return false;
|
|
207928
207944
|
}
|
|
207929
207945
|
}
|
|
207930
|
-
var HOST, EXT, lib = null, cstr = (s) => Buffer.from(s + "\x00");
|
|
207946
|
+
var HOST, EXT, isBun, moduleDir, _ffi = null, lib = null, cstr = (s) => Buffer.from(s + "\x00");
|
|
207931
207947
|
var init_contract_native = __esm(() => {
|
|
207932
207948
|
HOST = `${process.platform}-${process.arch}`;
|
|
207933
207949
|
EXT = process.platform === "darwin" ? "dylib" : process.platform === "win32" ? "dll" : "so";
|
|
207950
|
+
isBun = typeof process !== "undefined" && !!process.versions?.bun;
|
|
207951
|
+
moduleDir = dirname9(fileURLToPath6(import.meta.url));
|
|
207934
207952
|
});
|
|
207935
207953
|
|
|
207936
207954
|
// .tmp-runtime-src/values/resolution-contract.ts
|
|
@@ -208080,7 +208098,7 @@ var init_issue = __esm(() => {
|
|
|
208080
208098
|
|
|
208081
208099
|
// .tmp-runtime-src/impact-log.ts
|
|
208082
208100
|
import { existsSync as existsSync43, mkdirSync as mkdirSync29, appendFileSync as appendFileSync7, statSync as statSync8, readFileSync as readFileSync38, renameSync as renameSync4, unlinkSync as unlinkSync6 } from "node:fs";
|
|
208083
|
-
import { dirname as
|
|
208101
|
+
import { dirname as dirname10, join as join48 } from "node:path";
|
|
208084
208102
|
function getLogDir2() {
|
|
208085
208103
|
if (process.env.UNBROWSE_CONFIG_DIR)
|
|
208086
208104
|
return process.env.UNBROWSE_CONFIG_DIR;
|
|
@@ -208091,7 +208109,7 @@ function getImpactLogPath2() {
|
|
|
208091
208109
|
return join48(getLogDir2(), "impact-log.jsonl");
|
|
208092
208110
|
}
|
|
208093
208111
|
function ensureDir5(path15) {
|
|
208094
|
-
const dir =
|
|
208112
|
+
const dir = dirname10(path15);
|
|
208095
208113
|
if (!existsSync43(dir))
|
|
208096
208114
|
mkdirSync29(dir, { recursive: true });
|
|
208097
208115
|
}
|
|
@@ -209415,10 +209433,10 @@ __export(exports_skill_install, {
|
|
|
209415
209433
|
});
|
|
209416
209434
|
import { existsSync as existsSync47, mkdirSync as mkdirSync32, readFileSync as readFileSync41, writeFileSync as writeFileSync29 } from "node:fs";
|
|
209417
209435
|
import { homedir as homedir31 } from "node:os";
|
|
209418
|
-
import { dirname as
|
|
209419
|
-
import { fileURLToPath as
|
|
209436
|
+
import { dirname as dirname11, join as join49 } from "node:path";
|
|
209437
|
+
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
209420
209438
|
function findShippedSkillMd(metaUrl) {
|
|
209421
|
-
const dir =
|
|
209439
|
+
const dir = dirname11(fileURLToPath7(metaUrl));
|
|
209422
209440
|
const candidates = [
|
|
209423
209441
|
join49(dir, "SKILL.md"),
|
|
209424
209442
|
join49(dir, "..", "SKILL.md"),
|
|
@@ -276467,19 +276485,19 @@ var init_cliui = __esm(() => {
|
|
|
276467
276485
|
});
|
|
276468
276486
|
|
|
276469
276487
|
// node_modules/.bun/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
276470
|
-
import { dirname as
|
|
276488
|
+
import { dirname as dirname12, resolve as resolve7 } from "path";
|
|
276471
276489
|
import { readdirSync as readdirSync15, statSync as statSync9 } from "fs";
|
|
276472
276490
|
function sync_default(start2, callback) {
|
|
276473
276491
|
let dir = resolve7(".", start2);
|
|
276474
276492
|
let tmp, stats = statSync9(dir);
|
|
276475
276493
|
if (!stats.isDirectory()) {
|
|
276476
|
-
dir =
|
|
276494
|
+
dir = dirname12(dir);
|
|
276477
276495
|
}
|
|
276478
276496
|
while (true) {
|
|
276479
276497
|
tmp = callback(dir, readdirSync15(dir));
|
|
276480
276498
|
if (tmp)
|
|
276481
276499
|
return resolve7(dir, tmp);
|
|
276482
|
-
dir =
|
|
276500
|
+
dir = dirname12(tmp = dir);
|
|
276483
276501
|
if (tmp === dir)
|
|
276484
276502
|
break;
|
|
276485
276503
|
}
|
|
@@ -277692,8 +277710,8 @@ var init_y18n = __esm(() => {
|
|
|
277692
277710
|
import { notStrictEqual, strictEqual } from "assert";
|
|
277693
277711
|
import { inspect } from "util";
|
|
277694
277712
|
import { readFileSync as readFileSync44 } from "fs";
|
|
277695
|
-
import { fileURLToPath as
|
|
277696
|
-
import { basename as basename3, dirname as
|
|
277713
|
+
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
277714
|
+
import { basename as basename3, dirname as dirname13, extname, relative, resolve as resolve10 } from "path";
|
|
277697
277715
|
var REQUIRE_ERROR = "require is not supported by ESM", REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM", __dirname2, mainFilename, esm_default4;
|
|
277698
277716
|
var init_esm14 = __esm(() => {
|
|
277699
277717
|
init_cliui();
|
|
@@ -277702,7 +277720,7 @@ var init_esm14 = __esm(() => {
|
|
|
277702
277720
|
init_yerror();
|
|
277703
277721
|
init_y18n();
|
|
277704
277722
|
try {
|
|
277705
|
-
__dirname2 =
|
|
277723
|
+
__dirname2 = fileURLToPath8(import.meta.url);
|
|
277706
277724
|
} catch (e) {
|
|
277707
277725
|
__dirname2 = process.cwd();
|
|
277708
277726
|
}
|
|
@@ -277726,7 +277744,7 @@ var init_esm14 = __esm(() => {
|
|
|
277726
277744
|
Parser: lib_default,
|
|
277727
277745
|
path: {
|
|
277728
277746
|
basename: basename3,
|
|
277729
|
-
dirname:
|
|
277747
|
+
dirname: dirname13,
|
|
277730
277748
|
extname,
|
|
277731
277749
|
relative,
|
|
277732
277750
|
resolve: resolve10
|
|
@@ -282232,8 +282250,8 @@ __export(exports_utls_daemon, {
|
|
|
282232
282250
|
});
|
|
282233
282251
|
import { spawn as spawn8 } from "node:child_process";
|
|
282234
282252
|
import { existsSync as existsSync50, statSync as statSync11 } from "node:fs";
|
|
282235
|
-
import { dirname as
|
|
282236
|
-
import { fileURLToPath as
|
|
282253
|
+
import { dirname as dirname14, join as join53, resolve as resolve11 } from "node:path";
|
|
282254
|
+
import { fileURLToPath as fileURLToPath9 } from "node:url";
|
|
282237
282255
|
function resolveUtlsProxyBinary() {
|
|
282238
282256
|
const override = process.env.UNBROWSE_UTLS_PROXY_BINARY;
|
|
282239
282257
|
if (override && existsSync50(override))
|
|
@@ -282243,7 +282261,7 @@ function resolveUtlsProxyBinary() {
|
|
|
282243
282261
|
const goarch = arch === "x64" ? "amd64" : arch === "arm64" ? "arm64" : arch;
|
|
282244
282262
|
const binName = `utls-proxy-${platform4}-${goarch}`;
|
|
282245
282263
|
try {
|
|
282246
|
-
const here =
|
|
282264
|
+
const here = dirname14(fileURLToPath9(import.meta.url));
|
|
282247
282265
|
const vendoredCandidates = [
|
|
282248
282266
|
resolve11(here, "..", "..", "..", "vendor", "utls-proxy", binName),
|
|
282249
282267
|
resolve11(here, "..", "..", "..", "..", "vendor", "utls-proxy", binName),
|
|
@@ -282255,7 +282273,7 @@ function resolveUtlsProxyBinary() {
|
|
|
282255
282273
|
}
|
|
282256
282274
|
} catch {}
|
|
282257
282275
|
try {
|
|
282258
|
-
const here =
|
|
282276
|
+
const here = dirname14(fileURLToPath9(import.meta.url));
|
|
282259
282277
|
const devCandidates = [
|
|
282260
282278
|
resolve11(here, "..", "..", "..", "submodules", "utls-proxy", "dist", binName),
|
|
282261
282279
|
resolve11(here, "..", "..", "..", "..", "submodules", "utls-proxy", "dist", binName)
|
|
@@ -295586,9 +295604,9 @@ async function ensureKuriReachable(kuriBase) {
|
|
|
295586
295604
|
return;
|
|
295587
295605
|
const { spawn: spawn14 } = await import("node:child_process");
|
|
295588
295606
|
const { existsSync: existsSync58, openSync: openSync4 } = await import("node:fs");
|
|
295589
|
-
const { join: join68, dirname:
|
|
295590
|
-
const { fileURLToPath:
|
|
295591
|
-
const
|
|
295607
|
+
const { join: join68, dirname: dirname16 } = await import("node:path");
|
|
295608
|
+
const { fileURLToPath: fileURLToPath10 } = await import("node:url");
|
|
295609
|
+
const moduleDir2 = dirname16(fileURLToPath10(import.meta.url));
|
|
295592
295610
|
const kuriTarget = (() => {
|
|
295593
295611
|
if (process.platform === "darwin" && process.arch === "arm64")
|
|
295594
295612
|
return "darwin-arm64";
|
|
@@ -295607,8 +295625,8 @@ async function ensureKuriReachable(kuriBase) {
|
|
|
295607
295625
|
process.env.UNBROWSE_KURI_BIN,
|
|
295608
295626
|
process.env.KURI_BIN,
|
|
295609
295627
|
join68(process.cwd(), "submodules/kuri/zig-out/bin/kuri"),
|
|
295610
|
-
kuriTarget ? join68(
|
|
295611
|
-
kuriTarget ? join68(
|
|
295628
|
+
kuriTarget ? join68(moduleDir2, "../vendor/kuri", kuriTarget, kuriBinName) : undefined,
|
|
295629
|
+
kuriTarget ? join68(moduleDir2, "../packages/skill/vendor/kuri", kuriTarget, kuriBinName) : undefined,
|
|
295612
295630
|
"/opt/homebrew/bin/kuri",
|
|
295613
295631
|
"/usr/local/bin/kuri"
|
|
295614
295632
|
].filter((p) => !!p && existsSync58(p));
|
|
@@ -299773,7 +299791,7 @@ __export(exports_orchestrator, {
|
|
|
299773
299791
|
anchorHitsToDomain: () => anchorHitsToDomain2
|
|
299774
299792
|
});
|
|
299775
299793
|
import { existsSync as existsSync61, writeFileSync as writeFileSync37, readFileSync as readFileSync51, mkdirSync as mkdirSync41, readdirSync as readdirSync18 } from "node:fs";
|
|
299776
|
-
import { dirname as
|
|
299794
|
+
import { dirname as dirname16, join as join71 } from "node:path";
|
|
299777
299795
|
import { createHash as createHash51 } from "node:crypto";
|
|
299778
299796
|
function registrableHost2(u) {
|
|
299779
299797
|
if (!u)
|
|
@@ -299922,7 +299940,7 @@ function persistDomainCache2() {
|
|
|
299922
299940
|
if (!LOCAL_CACHES_ENABLED2 || ISOLATED_SKILL_SNAPSHOT_MODE2)
|
|
299923
299941
|
return;
|
|
299924
299942
|
try {
|
|
299925
|
-
const dir =
|
|
299943
|
+
const dir = dirname16(DOMAIN_CACHE_FILE2);
|
|
299926
299944
|
if (!existsSync61(dir))
|
|
299927
299945
|
mkdirSync41(dir, { recursive: true });
|
|
299928
299946
|
writeFileSync37(DOMAIN_CACHE_FILE2, JSON.stringify(Object.fromEntries(domainSkillCache2)), "utf-8");
|
|
@@ -299934,7 +299952,7 @@ function _writeRouteCacheToDisk2() {
|
|
|
299934
299952
|
return;
|
|
299935
299953
|
}
|
|
299936
299954
|
try {
|
|
299937
|
-
const dir =
|
|
299955
|
+
const dir = dirname16(ROUTE_CACHE_FILE2);
|
|
299938
299956
|
if (!existsSync61(dir))
|
|
299939
299957
|
mkdirSync41(dir, { recursive: true });
|
|
299940
299958
|
const entries = Object.fromEntries(skillRouteCache2);
|
|
@@ -299958,7 +299976,7 @@ function invalidateRouteCacheForDomain3(domain) {
|
|
|
299958
299976
|
}
|
|
299959
299977
|
if (deleted > 0 && LOCAL_CACHES_ENABLED2) {
|
|
299960
299978
|
try {
|
|
299961
|
-
const dir =
|
|
299979
|
+
const dir = dirname16(ROUTE_CACHE_FILE2);
|
|
299962
299980
|
if (!existsSync61(dir))
|
|
299963
299981
|
mkdirSync41(dir, { recursive: true });
|
|
299964
299982
|
writeFileSync37(ROUTE_CACHE_FILE2, JSON.stringify(Object.fromEntries(skillRouteCache2)), "utf-8");
|
|
@@ -305455,12 +305473,12 @@ __export(exports_version2, {
|
|
|
305455
305473
|
});
|
|
305456
305474
|
import { createHash as createHash52 } from "crypto";
|
|
305457
305475
|
import { existsSync as existsSync62, readFileSync as readFileSync52, readdirSync as readdirSync19 } from "fs";
|
|
305458
|
-
import { dirname as
|
|
305459
|
-
import { fileURLToPath as
|
|
305476
|
+
import { dirname as dirname17, join as join72, parse as parse10 } from "path";
|
|
305477
|
+
import { fileURLToPath as fileURLToPath10 } from "url";
|
|
305460
305478
|
import { execSync as execSync8 } from "child_process";
|
|
305461
305479
|
function safeModuleDir2() {
|
|
305462
305480
|
try {
|
|
305463
|
-
return
|
|
305481
|
+
return dirname17(fileURLToPath10(import.meta.url));
|
|
305464
305482
|
} catch {
|
|
305465
305483
|
return "";
|
|
305466
305484
|
}
|
|
@@ -305485,13 +305503,13 @@ function hashFiles2(srcDir, files) {
|
|
|
305485
305503
|
}
|
|
305486
305504
|
return hash.digest("hex").slice(0, 12);
|
|
305487
305505
|
}
|
|
305488
|
-
function resolveCodeHashSourceDir2(
|
|
305506
|
+
function resolveCodeHashSourceDir2(moduleDir2) {
|
|
305489
305507
|
const candidates = [
|
|
305490
|
-
|
|
305491
|
-
join72(
|
|
305492
|
-
join72(
|
|
305493
|
-
join72(
|
|
305494
|
-
join72(
|
|
305508
|
+
moduleDir2,
|
|
305509
|
+
join72(moduleDir2, "runtime-src"),
|
|
305510
|
+
join72(moduleDir2, "..", "runtime-src"),
|
|
305511
|
+
join72(moduleDir2, "src"),
|
|
305512
|
+
join72(moduleDir2, "..", "src")
|
|
305495
305513
|
];
|
|
305496
305514
|
for (const candidate of candidates) {
|
|
305497
305515
|
try {
|
|
@@ -305540,8 +305558,8 @@ function getEmbeddedReleaseVersion2() {
|
|
|
305540
305558
|
const manifest = decodeBase64UrlJson2(BUILD_RELEASE_MANIFEST_BASE64?.trim() || "");
|
|
305541
305559
|
return typeof manifest?.release_version === "string" && manifest.release_version.trim() ? manifest.release_version.trim() : null;
|
|
305542
305560
|
}
|
|
305543
|
-
function getPackageVersionForModuleDir2(
|
|
305544
|
-
let dir =
|
|
305561
|
+
function getPackageVersionForModuleDir2(moduleDir2) {
|
|
305562
|
+
let dir = moduleDir2;
|
|
305545
305563
|
const root2 = parse10(dir).root;
|
|
305546
305564
|
while (true) {
|
|
305547
305565
|
try {
|
|
@@ -305550,7 +305568,7 @@ function getPackageVersionForModuleDir2(moduleDir) {
|
|
|
305550
305568
|
} catch {}
|
|
305551
305569
|
if (dir === root2)
|
|
305552
305570
|
return "unknown";
|
|
305553
|
-
dir =
|
|
305571
|
+
dir = dirname17(dir);
|
|
305554
305572
|
}
|
|
305555
305573
|
}
|
|
305556
305574
|
function getPackageVersion2() {
|
|
@@ -305602,7 +305620,7 @@ var import_dotenv3 = __toESM(require_main(), 1);
|
|
|
305602
305620
|
import { createInterface as createInterface5 } from "readline";
|
|
305603
305621
|
import { existsSync as existsSync63, readFileSync as readFileSync53 } from "fs";
|
|
305604
305622
|
import path27 from "path";
|
|
305605
|
-
import { fileURLToPath as
|
|
305623
|
+
import { fileURLToPath as fileURLToPath11 } from "url";
|
|
305606
305624
|
|
|
305607
305625
|
// .tmp-runtime-src/runtime/in-process-app.ts
|
|
305608
305626
|
init_ratelimit();
|
|
@@ -308959,7 +308977,7 @@ async function ensureServerReady() {
|
|
|
308959
308977
|
await getInProcessApp();
|
|
308960
308978
|
}
|
|
308961
308979
|
function getVersion() {
|
|
308962
|
-
let dir = path27.dirname(
|
|
308980
|
+
let dir = path27.dirname(fileURLToPath11(import.meta.url));
|
|
308963
308981
|
const root2 = path27.parse(dir).root;
|
|
308964
308982
|
while (dir !== root2) {
|
|
308965
308983
|
const pkgPath = path27.join(dir, "package.json");
|
|
@@ -308973,7 +308991,7 @@ function getVersion() {
|
|
|
308973
308991
|
return "unknown";
|
|
308974
308992
|
}
|
|
308975
308993
|
function getPackageRoot2() {
|
|
308976
|
-
let dir = path27.dirname(
|
|
308994
|
+
let dir = path27.dirname(fileURLToPath11(import.meta.url));
|
|
308977
308995
|
const root2 = path27.parse(dir).root;
|
|
308978
308996
|
while (dir !== root2) {
|
|
308979
308997
|
if (path27.basename(dir) === "src" && existsSync63(path27.join(path27.dirname(dir), "package.json"))) {
|
|
@@ -308986,7 +309004,7 @@ function getPackageRoot2() {
|
|
|
308986
309004
|
dir = path27.dirname(dir);
|
|
308987
309005
|
}
|
|
308988
309006
|
}
|
|
308989
|
-
return path27.dirname(
|
|
309007
|
+
return path27.dirname(fileURLToPath11(import.meta.url));
|
|
308990
309008
|
}
|
|
308991
309009
|
function loadSkillGuidance() {
|
|
308992
309010
|
try {
|