unbrowse 9.3.5 → 9.3.7
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/bin/unbrowse-update-hint.mjs +12 -1
- package/package.json +1 -1
- package/runtime/cli.js +108 -8
- package/runtime/mcp.js +1 -1
- package/vendor/kuri/darwin-arm64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/darwin-x64/libkuri_ffi.dylib +0 -0
- package/vendor/kuri/linux-arm64/libkuri_ffi.so +0 -0
- package/vendor/kuri/linux-x64/kuri +0 -0
- package/vendor/kuri/linux-x64/libkuri_ffi.so +0 -0
- package/vendor/kuri/manifest.json +7 -7
- package/vendor/kuri/win-x64/kuri.exe +0 -0
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { existsSync } from "node:fs";
|
|
5
6
|
import { spawn } from "node:child_process";
|
|
6
7
|
|
|
7
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
// Resolve the real CLI entrypoint. The package ships the readable bun runtime at
|
|
11
|
+
// `runtime/cli.js` (runnable on plain Node); older/dev layouts used `dist/cli.js`.
|
|
12
|
+
// Hardcoding `dist/cli.js` made this hook ENOENT silently on every shipped install
|
|
13
|
+
// — fall back across the known layouts and exit quietly if none is present.
|
|
14
|
+
const candidates = [
|
|
15
|
+
join(__dirname, "..", "runtime", "cli.js"),
|
|
16
|
+
join(__dirname, "..", "dist", "cli.js"),
|
|
17
|
+
];
|
|
18
|
+
const cliPath = candidates.find((p) => existsSync(p));
|
|
19
|
+
if (!cliPath) process.exit(0); // no runtime to drive — nothing to do, fail quiet
|
|
9
20
|
|
|
10
21
|
const child = spawn(process.execPath, [cliPath, "upgrade", "--hint-only"], {
|
|
11
22
|
stdio: "inherit",
|
package/package.json
CHANGED
package/runtime/cli.js
CHANGED
|
@@ -5020,7 +5020,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
5020
5020
|
});
|
|
5021
5021
|
|
|
5022
5022
|
// .tmp-runtime-src/build-info.generated.ts
|
|
5023
|
-
var BUILD_RELEASE_VERSION = "9.3.
|
|
5023
|
+
var BUILD_RELEASE_VERSION = "9.3.7", BUILD_GIT_SHA = "47b0fe9e117a", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjciLCJnaXRfc2hhIjoiNDdiMGZlOWUxMTdhIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA0N2IwZmU5ZTExN2EiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDA3OjI4OjQ3LjEwNloifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "MUndpRmLz2Zj74Zil7niMwoNPEyE5Uu4CgPB-U8iWx8", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
5024
5024
|
|
|
5025
5025
|
// .tmp-runtime-src/version.ts
|
|
5026
5026
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -191395,10 +191395,12 @@ var init_indexer_core2 = __esm(async () => {
|
|
|
191395
191395
|
// .tmp-runtime-src/runtime/update-hints.ts
|
|
191396
191396
|
var exports_update_hints = {};
|
|
191397
191397
|
__export(exports_update_hints, {
|
|
191398
|
+
shouldSpawnBackgroundUpdateCheck: () => shouldSpawnBackgroundUpdateCheck,
|
|
191398
191399
|
shouldAutoUpdate: () => shouldAutoUpdate,
|
|
191399
191400
|
saveInstallSource: () => saveInstallSource2,
|
|
191400
191401
|
resolveInstallSource: () => resolveInstallSource2,
|
|
191401
191402
|
recordUpdateHint: () => recordUpdateHint,
|
|
191403
|
+
maybeSpawnBackgroundUpdateCheck: () => maybeSpawnBackgroundUpdateCheck,
|
|
191402
191404
|
maybeAutoUpdate: () => maybeAutoUpdate,
|
|
191403
191405
|
loadInstallSource: () => loadInstallSource2,
|
|
191404
191406
|
getInstalledVersion: () => getInstalledVersion,
|
|
@@ -191477,13 +191479,20 @@ function detectInstallHost2(repoRoot) {
|
|
|
191477
191479
|
return "unknown";
|
|
191478
191480
|
}
|
|
191479
191481
|
function getInstalledVersion(metaUrl) {
|
|
191480
|
-
|
|
191481
|
-
|
|
191482
|
-
|
|
191483
|
-
|
|
191484
|
-
|
|
191485
|
-
|
|
191482
|
+
let dir = getModuleDir(metaUrl);
|
|
191483
|
+
const root2 = path23.parse(dir).root;
|
|
191484
|
+
while (dir !== root2) {
|
|
191485
|
+
const pj = path23.join(dir, "package.json");
|
|
191486
|
+
if (existsSync50(pj)) {
|
|
191487
|
+
try {
|
|
191488
|
+
const pkg = JSON.parse(readFileSync38(pj, "utf8"));
|
|
191489
|
+
if (typeof pkg.version === "string" && pkg.version.trim())
|
|
191490
|
+
return pkg.version.trim();
|
|
191491
|
+
} catch {}
|
|
191492
|
+
}
|
|
191493
|
+
dir = path23.dirname(dir);
|
|
191486
191494
|
}
|
|
191495
|
+
return "unknown";
|
|
191487
191496
|
}
|
|
191488
191497
|
function resolveInstallSource2(metaUrl) {
|
|
191489
191498
|
const packageRoot = getPackageRoot(metaUrl);
|
|
@@ -191598,6 +191607,46 @@ function shouldAutoUpdate(input2) {
|
|
|
191598
191607
|
}
|
|
191599
191608
|
return { update: true, reason: "applying" };
|
|
191600
191609
|
}
|
|
191610
|
+
function shouldSpawnBackgroundUpdateCheck(input2) {
|
|
191611
|
+
if (input2.disabled)
|
|
191612
|
+
return { spawn: false, reason: "disabled" };
|
|
191613
|
+
if (BACKGROUND_UPDATE_SKIP_COMMANDS2.has(input2.command)) {
|
|
191614
|
+
return { spawn: false, reason: `command:${input2.command}` };
|
|
191615
|
+
}
|
|
191616
|
+
if (input2.lastSpawnAtMs != null && Number.isFinite(input2.lastSpawnAtMs) && input2.nowMs - input2.lastSpawnAtMs < input2.intervalMs) {
|
|
191617
|
+
return { spawn: false, reason: "throttled" };
|
|
191618
|
+
}
|
|
191619
|
+
return { spawn: true, reason: "due" };
|
|
191620
|
+
}
|
|
191621
|
+
function maybeSpawnBackgroundUpdateCheck(metaUrl, command2) {
|
|
191622
|
+
try {
|
|
191623
|
+
const statePath = getUpdateCheckStatePath();
|
|
191624
|
+
const state = readJsonFile2(statePath) ?? {};
|
|
191625
|
+
const lastSpawn = state.bg_check_spawned_at ? Date.parse(state.bg_check_spawned_at) : Number.NaN;
|
|
191626
|
+
const decision = shouldSpawnBackgroundUpdateCheck({
|
|
191627
|
+
command: command2,
|
|
191628
|
+
disabled: autoUpdateDisabled(),
|
|
191629
|
+
lastSpawnAtMs: Number.isFinite(lastSpawn) ? lastSpawn : null,
|
|
191630
|
+
nowMs: Date.now(),
|
|
191631
|
+
intervalMs: getUpdateIntervalMs()
|
|
191632
|
+
});
|
|
191633
|
+
if (!decision.spawn)
|
|
191634
|
+
return { spawned: false, reason: decision.reason };
|
|
191635
|
+
writeJsonFile2(statePath, { ...state, bg_check_spawned_at: new Date().toISOString() });
|
|
191636
|
+
const hintBin = getHookScriptPath2(metaUrl);
|
|
191637
|
+
if (!existsSync50(hintBin))
|
|
191638
|
+
return { spawned: false, reason: "hint-bin-missing" };
|
|
191639
|
+
const child = spawn12(process.execPath, [hintBin], {
|
|
191640
|
+
detached: true,
|
|
191641
|
+
stdio: ["ignore", "ignore", "ignore"],
|
|
191642
|
+
windowsHide: true
|
|
191643
|
+
});
|
|
191644
|
+
child.unref();
|
|
191645
|
+
return { spawned: true, reason: "spawned" };
|
|
191646
|
+
} catch (err) {
|
|
191647
|
+
return { spawned: false, reason: `error:${err?.message ?? "unknown"}` };
|
|
191648
|
+
}
|
|
191649
|
+
}
|
|
191601
191650
|
function autoUpdateDisabled() {
|
|
191602
191651
|
return envOn("UNBROWSE_NO_AUTO_UPDATE") || envOn("UNBROWSE_DISABLE_UPDATE_HINTS") || envOn("CI") || !!process.env.GITHUB_ACTIONS;
|
|
191603
191652
|
}
|
|
@@ -191748,10 +191797,22 @@ function configureUpdateHintHooks2(metaUrl, install2) {
|
|
|
191748
191797
|
const configuredHosts = source.host === "codex" || source.host === "claude" ? [source.host] : ["codex", "claude"];
|
|
191749
191798
|
return configuredHosts.map((host) => host === "codex" ? writeCodexHook2(metaUrl) : writeClaudeHook2(metaUrl));
|
|
191750
191799
|
}
|
|
191751
|
-
var INSTALL_SCRIPT_URL = "https://unbrowse.ai/install.sh", DEFAULT_INTERVAL_MS2, CODEX_MARKER2 = "# Unbrowse update hints — managed by unbrowse setup";
|
|
191800
|
+
var INSTALL_SCRIPT_URL = "https://unbrowse.ai/install.sh", DEFAULT_INTERVAL_MS2, CODEX_MARKER2 = "# Unbrowse update hints — managed by unbrowse setup", BACKGROUND_UPDATE_SKIP_COMMANDS2;
|
|
191752
191801
|
var init_update_hints = __esm(() => {
|
|
191753
191802
|
init_paths();
|
|
191754
191803
|
DEFAULT_INTERVAL_MS2 = 12 * 60 * 60 * 1000;
|
|
191804
|
+
BACKGROUND_UPDATE_SKIP_COMMANDS2 = new Set([
|
|
191805
|
+
"upgrade",
|
|
191806
|
+
"update",
|
|
191807
|
+
"health",
|
|
191808
|
+
"mcp",
|
|
191809
|
+
"mcp-serve",
|
|
191810
|
+
"serve",
|
|
191811
|
+
"setup",
|
|
191812
|
+
"help",
|
|
191813
|
+
"__drain-queue",
|
|
191814
|
+
"contract-bridge"
|
|
191815
|
+
]);
|
|
191755
191816
|
});
|
|
191756
191817
|
|
|
191757
191818
|
// .tmp-runtime-src/lib/indexer-core/queue-store.ts
|
|
@@ -201855,6 +201916,19 @@ function inferWriteMethod(explicit, intent, hasBody) {
|
|
|
201855
201916
|
return "POST";
|
|
201856
201917
|
return;
|
|
201857
201918
|
}
|
|
201919
|
+
function extractEmbeddedJsonBody(intent) {
|
|
201920
|
+
if (!intent)
|
|
201921
|
+
return;
|
|
201922
|
+
const m = intent.match(/[{[][\s\S]*[}\]]/);
|
|
201923
|
+
if (!m)
|
|
201924
|
+
return;
|
|
201925
|
+
try {
|
|
201926
|
+
const parsed = JSON.parse(m[0]);
|
|
201927
|
+
if (parsed && typeof parsed === "object")
|
|
201928
|
+
return m[0];
|
|
201929
|
+
} catch {}
|
|
201930
|
+
return;
|
|
201931
|
+
}
|
|
201858
201932
|
|
|
201859
201933
|
// .tmp-runtime-src/env/kuri-proxy-bridge.ts
|
|
201860
201934
|
init_proxy_fetch();
|
|
@@ -204798,6 +204872,18 @@ function saveInstallSource(metaUrl) {
|
|
|
204798
204872
|
function loadInstallSource(metaUrl) {
|
|
204799
204873
|
return readJsonFile(getInstallSourcePath()) ?? resolveInstallSource(metaUrl);
|
|
204800
204874
|
}
|
|
204875
|
+
var BACKGROUND_UPDATE_SKIP_COMMANDS = new Set([
|
|
204876
|
+
"upgrade",
|
|
204877
|
+
"update",
|
|
204878
|
+
"health",
|
|
204879
|
+
"mcp",
|
|
204880
|
+
"mcp-serve",
|
|
204881
|
+
"serve",
|
|
204882
|
+
"setup",
|
|
204883
|
+
"help",
|
|
204884
|
+
"__drain-queue",
|
|
204885
|
+
"contract-bridge"
|
|
204886
|
+
]);
|
|
204801
204887
|
function commandIncludesHook(command2, marker) {
|
|
204802
204888
|
return typeof command2 === "string" && command2.includes(marker);
|
|
204803
204889
|
}
|
|
@@ -206893,6 +206979,17 @@ async function cmdRun(args, flags, verb = "run") {
|
|
|
206893
206979
|
if ("error" in parsed)
|
|
206894
206980
|
die(parsed.error);
|
|
206895
206981
|
const { url, intent } = parsed;
|
|
206982
|
+
const oneHoleWriteBody = typeof flags.body === "string" ? flags.body : extractEmbeddedJsonBody(intent);
|
|
206983
|
+
const oneHoleWriteVerb = inferWriteMethod(typeof flags.method === "string" ? flags.method : undefined, intent, !!oneHoleWriteBody);
|
|
206984
|
+
if (oneHoleWriteVerb && url && (!!oneHoleWriteBody || typeof flags.method === "string")) {
|
|
206985
|
+
return cmdExecute({
|
|
206986
|
+
...flags,
|
|
206987
|
+
url,
|
|
206988
|
+
intent,
|
|
206989
|
+
method: oneHoleWriteVerb,
|
|
206990
|
+
...oneHoleWriteBody ? { body: oneHoleWriteBody } : {}
|
|
206991
|
+
});
|
|
206992
|
+
}
|
|
206896
206993
|
const draftOnlyIntent = isDraftOnlyMutationIntent(intent);
|
|
206897
206994
|
const resolveIntent = draftOnlyIntent ? draftOnlyReadIntent(intent) : intent;
|
|
206898
206995
|
maybeShowContributionNotice();
|
|
@@ -210140,6 +210237,9 @@ async function main() {
|
|
|
210140
210237
|
}
|
|
210141
210238
|
}
|
|
210142
210239
|
_maybeSweepQueue().catch(() => {});
|
|
210240
|
+
try {
|
|
210241
|
+
maybeSpawnBackgroundUpdateCheck(import.meta.url, command2);
|
|
210242
|
+
} catch {}
|
|
210143
210243
|
if (Object.keys(cliParams).length > 0) {
|
|
210144
210244
|
flags._params = cliParams;
|
|
210145
210245
|
}
|
package/runtime/mcp.js
CHANGED
|
@@ -36178,7 +36178,7 @@ var init_cached_resolution = __esm(() => {
|
|
|
36178
36178
|
});
|
|
36179
36179
|
|
|
36180
36180
|
// .tmp-runtime-src/build-info.generated.ts
|
|
36181
|
-
var BUILD_RELEASE_VERSION = "9.3.
|
|
36181
|
+
var BUILD_RELEASE_VERSION = "9.3.7", BUILD_GIT_SHA = "47b0fe9e117a", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiOS4zLjciLCJnaXRfc2hhIjoiNDdiMGZlOWUxMTdhIiwiY29kZV9oYXNoIjoiNWQ5ZWJmNjE5YzYxIiwidHJhY2VfdmVyc2lvbiI6IjVkOWViZjYxOWM2MUA0N2IwZmU5ZTExN2EiLCJpc3N1ZWRfYXQiOiIyMDI2LTA2LTE1VDA3OjI4OjQ3LjEwNloifQ", BUILD_RELEASE_MANIFEST_SIGNATURE = "MUndpRmLz2Zj74Zil7niMwoNPEyE5Uu4CgPB-U8iWx8", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
36182
36182
|
|
|
36183
36183
|
// .tmp-runtime-src/version.ts
|
|
36184
36184
|
import { createHash as createHash3 } from "crypto";
|
|
Binary file
|
|
Binary file
|
|
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": "149881254046a20778f642b69f20f0c6468f6fb4",
|
|
5
|
-
"built_at": "2026-06-
|
|
5
|
+
"built_at": "2026-06-15T07:11:02.302Z",
|
|
6
6
|
"binaries": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"zig_target": "aarch64-macos",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"linux-x64": {
|
|
23
23
|
"zig_target": "x86_64-linux",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "12d0fe904ebb2ba3ee7b373843e6265247a24ab4d25c1874f28ef1ff9db13bb1"
|
|
25
25
|
},
|
|
26
26
|
"win-x64": {
|
|
27
27
|
"zig_target": "x86_64-windows-gnu",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "cef06cdc61b13fc79f12b21e7075e5de6cc6b0536fe5885e8166fcbeceaf5022",
|
|
29
29
|
"source": "pre-staged"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -33,22 +33,22 @@
|
|
|
33
33
|
"darwin-arm64": {
|
|
34
34
|
"zig_target": "aarch64-macos",
|
|
35
35
|
"lib": "libkuri_ffi.dylib",
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "5b98514679b7308fdc94409ee531389237908847e3521508ebce07e3a5c98a76"
|
|
37
37
|
},
|
|
38
38
|
"darwin-x64": {
|
|
39
39
|
"zig_target": "x86_64-macos",
|
|
40
40
|
"lib": "libkuri_ffi.dylib",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "e0427e2b5612cdcdf77956bd5d9f08ce323d875a48b781e1e471939206bbcd65"
|
|
42
42
|
},
|
|
43
43
|
"linux-arm64": {
|
|
44
44
|
"zig_target": "aarch64-linux",
|
|
45
45
|
"lib": "libkuri_ffi.so",
|
|
46
|
-
"sha256": "
|
|
46
|
+
"sha256": "fa04be637cf0366d90e71d248f733c99f1d5c32eebe798ede63e29a5d0fbf2f9"
|
|
47
47
|
},
|
|
48
48
|
"linux-x64": {
|
|
49
49
|
"zig_target": "x86_64-linux",
|
|
50
50
|
"lib": "libkuri_ffi.so",
|
|
51
|
-
"sha256": "
|
|
51
|
+
"sha256": "0042cad13aceb7da492edc61f4d28862dd1928b131197c176a0e957f1c0f21db"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
Binary file
|