unbrowse 10.1.5 → 10.1.6
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 +17 -1
- package/runtime/mcp.js +34 -1
package/package.json
CHANGED
package/runtime/cli.js
CHANGED
|
@@ -64923,7 +64923,7 @@ var init_telemetry = __esm(() => {
|
|
|
64923
64923
|
});
|
|
64924
64924
|
|
|
64925
64925
|
// .tmp-runtime-src/build-info.generated.ts
|
|
64926
|
-
var BUILD_RELEASE_VERSION = "10.1.
|
|
64926
|
+
var BUILD_RELEASE_VERSION = "10.1.6", BUILD_GIT_SHA = "416dbff46262", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS42IiwiZ2l0X3NoYSI6IjQxNmRiZmY0NjI2MiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFANDE2ZGJmZjQ2MjYyIiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yM1QxMTozNToyMS4wNDlaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "NHM896fAvzCu2ZBwpSbNxj9SNehiX7DkfO6fm221Kmo", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
64927
64927
|
|
|
64928
64928
|
// .tmp-runtime-src/version.ts
|
|
64929
64929
|
import { createHash as createHash8 } from "crypto";
|
|
@@ -196349,9 +196349,20 @@ function normalizeRouteContext(url) {
|
|
|
196349
196349
|
function buildResolveCacheKey(domain, intent, url) {
|
|
196350
196350
|
return `${domain || "global"}:${intent.trim().toLowerCase()}:${normalizeRouteContext(url)}`;
|
|
196351
196351
|
}
|
|
196352
|
+
function mirrorCapturedRouteToContract(cacheKey2, skill, endpointId, ledgerOverride) {
|
|
196353
|
+
if (!localCachesEnabled() || ISOLATED_SKILL_SNAPSHOT_MODE)
|
|
196354
|
+
return;
|
|
196355
|
+
try {
|
|
196356
|
+
const urlTemplate = skill.endpoints?.find((e) => e.endpoint_id === endpointId)?.url_template ?? skill.endpoints?.[0]?.url_template ?? "";
|
|
196357
|
+
const pointer = `route:${createHash20("sha256").update(`${skill.skill_id}|${endpointId ?? ""}|${urlTemplate}`).digest("hex").slice(0, 32)}`;
|
|
196358
|
+
console.error(`[contract-index] route ${cacheKey2} → /contract ledger (mirror fired)`);
|
|
196359
|
+
mirrorResolutionToChain2(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
196360
|
+
} catch {}
|
|
196361
|
+
}
|
|
196352
196362
|
function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
196353
196363
|
if (!localCachesEnabled())
|
|
196354
196364
|
return;
|
|
196365
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
196355
196366
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
196356
196367
|
capturedDomainCache.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
196357
196368
|
skillRouteCache.set(cacheKey2, {
|
|
@@ -196362,6 +196373,8 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
196362
196373
|
ts: Date.now()
|
|
196363
196374
|
});
|
|
196364
196375
|
persistRouteCache();
|
|
196376
|
+
if (isFreshCapture)
|
|
196377
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
196365
196378
|
const domainKey = getDomainReuseKey(contextUrl ?? skill.domain);
|
|
196366
196379
|
if (domainKey) {
|
|
196367
196380
|
domainSkillCache.set(domainKey, {
|
|
@@ -196376,6 +196389,7 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
196376
196389
|
function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
196377
196390
|
if (!localCachesEnabled())
|
|
196378
196391
|
return;
|
|
196392
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
196379
196393
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
196380
196394
|
skillRouteCache.set(cacheKey2, {
|
|
196381
196395
|
skillId: skill.skill_id,
|
|
@@ -196385,6 +196399,8 @@ function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
|
196385
196399
|
ts: Date.now()
|
|
196386
196400
|
});
|
|
196387
196401
|
persistRouteCache();
|
|
196402
|
+
if (isFreshCapture)
|
|
196403
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
196388
196404
|
}
|
|
196389
196405
|
function promoteResultSnapshot(cacheKey2, skill, endpointId, result, trace) {
|
|
196390
196406
|
if (!localCachesEnabled())
|
package/runtime/mcp.js
CHANGED
|
@@ -101443,7 +101443,7 @@ async function mergedAuthHeaders(key, signer) {
|
|
|
101443
101443
|
var AUTH_DOMAIN = "unbrowse-auth:v1";
|
|
101444
101444
|
|
|
101445
101445
|
// .tmp-runtime-src/build-info.generated.ts
|
|
101446
|
-
var BUILD_RELEASE_VERSION = "10.1.
|
|
101446
|
+
var BUILD_RELEASE_VERSION = "10.1.6", BUILD_GIT_SHA = "416dbff46262", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS42IiwiZ2l0X3NoYSI6IjQxNmRiZmY0NjI2MiIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFANDE2ZGJmZjQ2MjYyIiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yM1QxMTozNToyMS4wNDlaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "NHM896fAvzCu2ZBwpSbNxj9SNehiX7DkfO6fm221Kmo", BUILD_DEFAULT_BACKEND_URL = "https://beta-api.unbrowse.ai", BUILD_DEFAULT_PROFILE = "";
|
|
101447
101447
|
|
|
101448
101448
|
// .tmp-runtime-src/version.ts
|
|
101449
101449
|
import { createHash as createHash6 } from "crypto";
|
|
@@ -193486,9 +193486,20 @@ function normalizeRouteContext(url) {
|
|
|
193486
193486
|
function buildResolveCacheKey(domain, intent, url) {
|
|
193487
193487
|
return `${domain || "global"}:${intent.trim().toLowerCase()}:${normalizeRouteContext(url)}`;
|
|
193488
193488
|
}
|
|
193489
|
+
function mirrorCapturedRouteToContract(cacheKey2, skill, endpointId, ledgerOverride) {
|
|
193490
|
+
if (!localCachesEnabled() || ISOLATED_SKILL_SNAPSHOT_MODE)
|
|
193491
|
+
return;
|
|
193492
|
+
try {
|
|
193493
|
+
const urlTemplate = skill.endpoints?.find((e) => e.endpoint_id === endpointId)?.url_template ?? skill.endpoints?.[0]?.url_template ?? "";
|
|
193494
|
+
const pointer = `route:${createHash15("sha256").update(`${skill.skill_id}|${endpointId ?? ""}|${urlTemplate}`).digest("hex").slice(0, 32)}`;
|
|
193495
|
+
console.error(`[contract-index] route ${cacheKey2} → /contract ledger (mirror fired)`);
|
|
193496
|
+
mirrorResolutionToChain(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
193497
|
+
} catch {}
|
|
193498
|
+
}
|
|
193489
193499
|
function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
193490
193500
|
if (!localCachesEnabled())
|
|
193491
193501
|
return;
|
|
193502
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
193492
193503
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
193493
193504
|
capturedDomainCache.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
193494
193505
|
skillRouteCache.set(cacheKey2, {
|
|
@@ -193499,6 +193510,8 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
193499
193510
|
ts: Date.now()
|
|
193500
193511
|
});
|
|
193501
193512
|
persistRouteCache();
|
|
193513
|
+
if (isFreshCapture)
|
|
193514
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
193502
193515
|
const domainKey = getDomainReuseKey(contextUrl ?? skill.domain);
|
|
193503
193516
|
if (domainKey) {
|
|
193504
193517
|
domainSkillCache.set(domainKey, {
|
|
@@ -193513,6 +193526,7 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
193513
193526
|
function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
193514
193527
|
if (!localCachesEnabled())
|
|
193515
193528
|
return;
|
|
193529
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
193516
193530
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
193517
193531
|
skillRouteCache.set(cacheKey2, {
|
|
193518
193532
|
skillId: skill.skill_id,
|
|
@@ -193522,6 +193536,8 @@ function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
|
193522
193536
|
ts: Date.now()
|
|
193523
193537
|
});
|
|
193524
193538
|
persistRouteCache();
|
|
193539
|
+
if (isFreshCapture)
|
|
193540
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
193525
193541
|
}
|
|
193526
193542
|
function promoteResultSnapshot(cacheKey2, skill, endpointId, result, trace) {
|
|
193527
193543
|
if (!localCachesEnabled())
|
|
@@ -300251,6 +300267,7 @@ __export(exports_orchestrator, {
|
|
|
300251
300267
|
pickWalkTarget: () => pickWalkTarget2,
|
|
300252
300268
|
pickPreferredSkillSnapshot: () => pickPreferredSkillSnapshot2,
|
|
300253
300269
|
persistDomainCache: () => persistDomainCache2,
|
|
300270
|
+
mirrorCapturedRouteToContract: () => mirrorCapturedRouteToContract2,
|
|
300254
300271
|
marketplaceSkillMatchesContext: () => marketplaceSkillMatchesContext2,
|
|
300255
300272
|
looksLikeSingleItemRoute: () => looksLikeSingleItemRoute,
|
|
300256
300273
|
isRouteCacheEntryStale: () => isRouteCacheEntryStale2,
|
|
@@ -300835,9 +300852,20 @@ function normalizeRouteContext2(url) {
|
|
|
300835
300852
|
function buildResolveCacheKey2(domain, intent, url) {
|
|
300836
300853
|
return `${domain || "global"}:${intent.trim().toLowerCase()}:${normalizeRouteContext2(url)}`;
|
|
300837
300854
|
}
|
|
300855
|
+
function mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId, ledgerOverride) {
|
|
300856
|
+
if (!localCachesEnabled2() || ISOLATED_SKILL_SNAPSHOT_MODE2)
|
|
300857
|
+
return;
|
|
300858
|
+
try {
|
|
300859
|
+
const urlTemplate = skill.endpoints?.find((e) => e.endpoint_id === endpointId)?.url_template ?? skill.endpoints?.[0]?.url_template ?? "";
|
|
300860
|
+
const pointer = `route:${createHash51("sha256").update(`${skill.skill_id}|${endpointId ?? ""}|${urlTemplate}`).digest("hex").slice(0, 32)}`;
|
|
300861
|
+
console.error(`[contract-index] route ${cacheKey2} → /contract ledger (mirror fired)`);
|
|
300862
|
+
mirrorResolutionToChain(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
300863
|
+
} catch {}
|
|
300864
|
+
}
|
|
300838
300865
|
function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
300839
300866
|
if (!localCachesEnabled2())
|
|
300840
300867
|
return;
|
|
300868
|
+
const isFreshCapture = !skillRouteCache2.has(cacheKey2);
|
|
300841
300869
|
const localSkillPath = writeSkillSnapshot2(cacheKey2, skill);
|
|
300842
300870
|
capturedDomainCache2.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
300843
300871
|
skillRouteCache2.set(cacheKey2, {
|
|
@@ -300848,6 +300876,8 @@ function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
300848
300876
|
ts: Date.now()
|
|
300849
300877
|
});
|
|
300850
300878
|
persistRouteCache2();
|
|
300879
|
+
if (isFreshCapture)
|
|
300880
|
+
mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId);
|
|
300851
300881
|
const domainKey = getDomainReuseKey2(contextUrl ?? skill.domain);
|
|
300852
300882
|
if (domainKey) {
|
|
300853
300883
|
domainSkillCache2.set(domainKey, {
|
|
@@ -300862,6 +300892,7 @@ function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
300862
300892
|
function cacheResolvedSkill2(cacheKey2, skill, endpointId) {
|
|
300863
300893
|
if (!localCachesEnabled2())
|
|
300864
300894
|
return;
|
|
300895
|
+
const isFreshCapture = !skillRouteCache2.has(cacheKey2);
|
|
300865
300896
|
const localSkillPath = writeSkillSnapshot2(cacheKey2, skill);
|
|
300866
300897
|
skillRouteCache2.set(cacheKey2, {
|
|
300867
300898
|
skillId: skill.skill_id,
|
|
@@ -300871,6 +300902,8 @@ function cacheResolvedSkill2(cacheKey2, skill, endpointId) {
|
|
|
300871
300902
|
ts: Date.now()
|
|
300872
300903
|
});
|
|
300873
300904
|
persistRouteCache2();
|
|
300905
|
+
if (isFreshCapture)
|
|
300906
|
+
mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId);
|
|
300874
300907
|
}
|
|
300875
300908
|
function promoteResultSnapshot2(cacheKey2, skill, endpointId, result, trace) {
|
|
300876
300909
|
if (!localCachesEnabled2())
|