unbrowse 10.1.5 → 10.1.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/package.json +1 -1
- package/runtime/cli.js +21 -1
- package/runtime/mcp.js +42 -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.7", BUILD_GIT_SHA = "5933639925e9", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS43IiwiZ2l0X3NoYSI6IjU5MzM2Mzk5MjVlOSIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFANTkzMzYzOTkyNWU5IiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yM1QxMTo1MDowMS4wMThaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "chwO4hKNcRy_1ajpQf_g3IonkwUcnY_P9iZT6GG4v6Y", 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,23 @@ 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, emergentOverride) {
|
|
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 + emergent kv/rag (mirror fired)`);
|
|
196359
|
+
mirrorResolutionToChain2(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
196360
|
+
const emergentText = `${skill.domain ?? ""} ${skill.skill_id} ${urlTemplate}`.trim();
|
|
196361
|
+
const emergentValue = { skillId: skill.skill_id, endpointId, urlTemplate, pointer };
|
|
196362
|
+
(emergentOverride ?? mirrorToEmergent)(pointer, emergentText, emergentValue).catch(() => {});
|
|
196363
|
+
} catch {}
|
|
196364
|
+
}
|
|
196352
196365
|
function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
196353
196366
|
if (!localCachesEnabled())
|
|
196354
196367
|
return;
|
|
196368
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
196355
196369
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
196356
196370
|
capturedDomainCache.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
196357
196371
|
skillRouteCache.set(cacheKey2, {
|
|
@@ -196362,6 +196376,8 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
196362
196376
|
ts: Date.now()
|
|
196363
196377
|
});
|
|
196364
196378
|
persistRouteCache();
|
|
196379
|
+
if (isFreshCapture)
|
|
196380
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
196365
196381
|
const domainKey = getDomainReuseKey(contextUrl ?? skill.domain);
|
|
196366
196382
|
if (domainKey) {
|
|
196367
196383
|
domainSkillCache.set(domainKey, {
|
|
@@ -196376,6 +196392,7 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
196376
196392
|
function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
196377
196393
|
if (!localCachesEnabled())
|
|
196378
196394
|
return;
|
|
196395
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
196379
196396
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
196380
196397
|
skillRouteCache.set(cacheKey2, {
|
|
196381
196398
|
skillId: skill.skill_id,
|
|
@@ -196385,6 +196402,8 @@ function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
|
196385
196402
|
ts: Date.now()
|
|
196386
196403
|
});
|
|
196387
196404
|
persistRouteCache();
|
|
196405
|
+
if (isFreshCapture)
|
|
196406
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
196388
196407
|
}
|
|
196389
196408
|
function promoteResultSnapshot(cacheKey2, skill, endpointId, result, trace) {
|
|
196390
196409
|
if (!localCachesEnabled())
|
|
@@ -201423,6 +201442,7 @@ var init_orchestrator = __esm(async () => {
|
|
|
201423
201442
|
init_search_forms();
|
|
201424
201443
|
init_ddg_search();
|
|
201425
201444
|
init_cached_resolution2();
|
|
201445
|
+
init_contract_everything();
|
|
201426
201446
|
init_cardinality2();
|
|
201427
201447
|
init_cardinality2();
|
|
201428
201448
|
init_principal_scope();
|
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.7", BUILD_GIT_SHA = "5933639925e9", BUILD_CODE_HASH = "5d9ebf619c61", BUILD_RELEASE_MANIFEST_BASE64 = "eyJzY2hlbWFfdmVyc2lvbiI6MSwicmVsZWFzZV92ZXJzaW9uIjoiMTAuMS43IiwiZ2l0X3NoYSI6IjU5MzM2Mzk5MjVlOSIsImNvZGVfaGFzaCI6IjVkOWViZjYxOWM2MSIsInRyYWNlX3ZlcnNpb24iOiI1ZDllYmY2MTljNjFANTkzMzYzOTkyNWU5IiwiaXNzdWVkX2F0IjoiMjAyNi0wNi0yM1QxMTo1MDowMS4wMThaIn0", BUILD_RELEASE_MANIFEST_SIGNATURE = "chwO4hKNcRy_1ajpQf_g3IonkwUcnY_P9iZT6GG4v6Y", 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,23 @@ 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, emergentOverride) {
|
|
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 + emergent kv/rag (mirror fired)`);
|
|
193496
|
+
mirrorResolutionToChain(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
193497
|
+
const emergentText = `${skill.domain ?? ""} ${skill.skill_id} ${urlTemplate}`.trim();
|
|
193498
|
+
const emergentValue = { skillId: skill.skill_id, endpointId, urlTemplate, pointer };
|
|
193499
|
+
(emergentOverride ?? mirrorToEmergent)(pointer, emergentText, emergentValue).catch(() => {});
|
|
193500
|
+
} catch {}
|
|
193501
|
+
}
|
|
193489
193502
|
function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
193490
193503
|
if (!localCachesEnabled())
|
|
193491
193504
|
return;
|
|
193505
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
193492
193506
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
193493
193507
|
capturedDomainCache.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
193494
193508
|
skillRouteCache.set(cacheKey2, {
|
|
@@ -193499,6 +193513,8 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
193499
193513
|
ts: Date.now()
|
|
193500
193514
|
});
|
|
193501
193515
|
persistRouteCache();
|
|
193516
|
+
if (isFreshCapture)
|
|
193517
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
193502
193518
|
const domainKey = getDomainReuseKey(contextUrl ?? skill.domain);
|
|
193503
193519
|
if (domainKey) {
|
|
193504
193520
|
domainSkillCache.set(domainKey, {
|
|
@@ -193513,6 +193529,7 @@ function promoteLearnedSkill(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
193513
193529
|
function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
193514
193530
|
if (!localCachesEnabled())
|
|
193515
193531
|
return;
|
|
193532
|
+
const isFreshCapture = !skillRouteCache.has(cacheKey2);
|
|
193516
193533
|
const localSkillPath = writeSkillSnapshot(cacheKey2, skill);
|
|
193517
193534
|
skillRouteCache.set(cacheKey2, {
|
|
193518
193535
|
skillId: skill.skill_id,
|
|
@@ -193522,6 +193539,8 @@ function cacheResolvedSkill(cacheKey2, skill, endpointId) {
|
|
|
193522
193539
|
ts: Date.now()
|
|
193523
193540
|
});
|
|
193524
193541
|
persistRouteCache();
|
|
193542
|
+
if (isFreshCapture)
|
|
193543
|
+
mirrorCapturedRouteToContract(cacheKey2, skill, endpointId);
|
|
193525
193544
|
}
|
|
193526
193545
|
function promoteResultSnapshot(cacheKey2, skill, endpointId, result, trace) {
|
|
193527
193546
|
if (!localCachesEnabled())
|
|
@@ -198560,6 +198579,7 @@ var init_orchestrator = __esm(async () => {
|
|
|
198560
198579
|
init_search_forms();
|
|
198561
198580
|
init_ddg_search();
|
|
198562
198581
|
init_cached_resolution();
|
|
198582
|
+
init_contract_everything();
|
|
198563
198583
|
init_cardinality();
|
|
198564
198584
|
init_cardinality();
|
|
198565
198585
|
init_principal_scope();
|
|
@@ -300251,6 +300271,7 @@ __export(exports_orchestrator, {
|
|
|
300251
300271
|
pickWalkTarget: () => pickWalkTarget2,
|
|
300252
300272
|
pickPreferredSkillSnapshot: () => pickPreferredSkillSnapshot2,
|
|
300253
300273
|
persistDomainCache: () => persistDomainCache2,
|
|
300274
|
+
mirrorCapturedRouteToContract: () => mirrorCapturedRouteToContract2,
|
|
300254
300275
|
marketplaceSkillMatchesContext: () => marketplaceSkillMatchesContext2,
|
|
300255
300276
|
looksLikeSingleItemRoute: () => looksLikeSingleItemRoute,
|
|
300256
300277
|
isRouteCacheEntryStale: () => isRouteCacheEntryStale2,
|
|
@@ -300835,9 +300856,23 @@ function normalizeRouteContext2(url) {
|
|
|
300835
300856
|
function buildResolveCacheKey2(domain, intent, url) {
|
|
300836
300857
|
return `${domain || "global"}:${intent.trim().toLowerCase()}:${normalizeRouteContext2(url)}`;
|
|
300837
300858
|
}
|
|
300859
|
+
function mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId, ledgerOverride, emergentOverride) {
|
|
300860
|
+
if (!localCachesEnabled2() || ISOLATED_SKILL_SNAPSHOT_MODE2)
|
|
300861
|
+
return;
|
|
300862
|
+
try {
|
|
300863
|
+
const urlTemplate = skill.endpoints?.find((e) => e.endpoint_id === endpointId)?.url_template ?? skill.endpoints?.[0]?.url_template ?? "";
|
|
300864
|
+
const pointer = `route:${createHash51("sha256").update(`${skill.skill_id}|${endpointId ?? ""}|${urlTemplate}`).digest("hex").slice(0, 32)}`;
|
|
300865
|
+
console.error(`[contract-index] route ${cacheKey2} → /contract ledger + emergent kv/rag (mirror fired)`);
|
|
300866
|
+
mirrorResolutionToChain(cacheKey2, pointer, ledgerOverride ?? {}).catch(() => {});
|
|
300867
|
+
const emergentText = `${skill.domain ?? ""} ${skill.skill_id} ${urlTemplate}`.trim();
|
|
300868
|
+
const emergentValue = { skillId: skill.skill_id, endpointId, urlTemplate, pointer };
|
|
300869
|
+
(emergentOverride ?? mirrorToEmergent)(pointer, emergentText, emergentValue).catch(() => {});
|
|
300870
|
+
} catch {}
|
|
300871
|
+
}
|
|
300838
300872
|
function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
300839
300873
|
if (!localCachesEnabled2())
|
|
300840
300874
|
return;
|
|
300875
|
+
const isFreshCapture = !skillRouteCache2.has(cacheKey2);
|
|
300841
300876
|
const localSkillPath = writeSkillSnapshot2(cacheKey2, skill);
|
|
300842
300877
|
capturedDomainCache2.set(cacheKey2, { skill, endpointId, expires: Date.now() + 5 * 60000 });
|
|
300843
300878
|
skillRouteCache2.set(cacheKey2, {
|
|
@@ -300848,6 +300883,8 @@ function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
300848
300883
|
ts: Date.now()
|
|
300849
300884
|
});
|
|
300850
300885
|
persistRouteCache2();
|
|
300886
|
+
if (isFreshCapture)
|
|
300887
|
+
mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId);
|
|
300851
300888
|
const domainKey = getDomainReuseKey2(contextUrl ?? skill.domain);
|
|
300852
300889
|
if (domainKey) {
|
|
300853
300890
|
domainSkillCache2.set(domainKey, {
|
|
@@ -300862,6 +300899,7 @@ function promoteLearnedSkill2(scope, cacheKey2, skill, endpointId, contextUrl) {
|
|
|
300862
300899
|
function cacheResolvedSkill2(cacheKey2, skill, endpointId) {
|
|
300863
300900
|
if (!localCachesEnabled2())
|
|
300864
300901
|
return;
|
|
300902
|
+
const isFreshCapture = !skillRouteCache2.has(cacheKey2);
|
|
300865
300903
|
const localSkillPath = writeSkillSnapshot2(cacheKey2, skill);
|
|
300866
300904
|
skillRouteCache2.set(cacheKey2, {
|
|
300867
300905
|
skillId: skill.skill_id,
|
|
@@ -300871,6 +300909,8 @@ function cacheResolvedSkill2(cacheKey2, skill, endpointId) {
|
|
|
300871
300909
|
ts: Date.now()
|
|
300872
300910
|
});
|
|
300873
300911
|
persistRouteCache2();
|
|
300912
|
+
if (isFreshCapture)
|
|
300913
|
+
mirrorCapturedRouteToContract2(cacheKey2, skill, endpointId);
|
|
300874
300914
|
}
|
|
300875
300915
|
function promoteResultSnapshot2(cacheKey2, skill, endpointId, result, trace) {
|
|
300876
300916
|
if (!localCachesEnabled2())
|
|
@@ -305914,6 +305954,7 @@ var init_orchestrator2 = __esm(async () => {
|
|
|
305914
305954
|
init_search_forms();
|
|
305915
305955
|
init_ddg_search();
|
|
305916
305956
|
init_cached_resolution();
|
|
305957
|
+
init_contract_everything();
|
|
305917
305958
|
init_cardinality();
|
|
305918
305959
|
init_cardinality();
|
|
305919
305960
|
init_principal_scope();
|