@remnic/core 9.3.660 → 9.3.662
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/access-cli.js +10 -10
- package/dist/access-http.d.ts +5 -5
- package/dist/access-http.js +10 -10
- package/dist/access-mcp.d.ts +5 -5
- package/dist/access-mcp.js +9 -9
- package/dist/{access-service-D_nbpexW.d.ts → access-service-D0SLB4MH.d.ts} +2 -2
- package/dist/access-service.d.ts +5 -5
- package/dist/access-service.js +8 -8
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +3 -3
- package/dist/briefing.d.ts +1 -1
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +1 -1
- package/dist/calibration.d.ts +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/{chunk-7H7J3ZWN.js → chunk-2KDQI363.js} +2 -2
- package/dist/{chunk-R2EBP6CM.js → chunk-35HP3TGR.js} +5 -5
- package/dist/{chunk-FWIROLS6.js → chunk-44VFF3BB.js} +18 -16
- package/dist/chunk-44VFF3BB.js.map +1 -0
- package/dist/{chunk-OYXVENIS.js → chunk-4KDLCMLK.js} +3 -3
- package/dist/{chunk-MO77TWPS.js → chunk-5AYAZN45.js} +2 -2
- package/dist/{chunk-7PCZGNG2.js → chunk-6RHNCKHG.js} +113 -24
- package/dist/chunk-6RHNCKHG.js.map +1 -0
- package/dist/{chunk-RP2U54GG.js → chunk-DFAXGZKI.js} +2 -2
- package/dist/{chunk-6G5JEN55.js → chunk-FZC2WSDB.js} +2 -2
- package/dist/{chunk-2EVZ5EN6.js → chunk-HSCJYHYV.js} +6 -6
- package/dist/{chunk-B57QYSWN.js → chunk-TGOOJCGA.js} +109 -16
- package/dist/chunk-TGOOJCGA.js.map +1 -0
- package/dist/{chunk-UNLHHTKN.js → chunk-WOQIHC67.js} +10 -2
- package/dist/chunk-WOQIHC67.js.map +1 -0
- package/dist/{chunk-5PLUC5OB.js → chunk-WSQG37DV.js} +2 -2
- package/dist/{chunk-M3VYPE2H.js → chunk-YNQ6DFSV.js} +1 -1
- package/dist/chunk-YNQ6DFSV.js.map +1 -0
- package/dist/{chunk-256W7AXC.js → chunk-YYQRVNSV.js} +2 -2
- package/dist/{chunk-GRYAECRV.js → chunk-ZJH723NM.js} +2 -2
- package/dist/{cli-aYxSuPvP.d.ts → cli-C6twwe84.d.ts} +3 -3
- package/dist/cli.d.ts +5 -5
- package/dist/cli.js +13 -13
- package/dist/compounding/engine.d.ts +1 -1
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/consolidation-provenance-check.d.ts +1 -1
- package/dist/consolidation-undo.d.ts +1 -1
- package/dist/contradiction/index.d.ts +1 -1
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +1 -1
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +3 -3
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/identity-continuity.d.ts +1 -1
- package/dist/importance.d.ts +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +15 -15
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/mcp-memory-inspector-app.d.ts +5 -5
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +1 -1
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +1 -1
- package/dist/namespaces/migrate.js +8 -8
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.d.ts +1 -1
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +1 -1
- package/dist/operator-toolkit.js +9 -9
- package/dist/{orchestrator-D1wcmPNj.d.ts → orchestrator-Cg1UkvmO.d.ts} +2 -2
- package/dist/orchestrator.d.ts +3 -3
- package/dist/orchestrator.js +9 -9
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +50 -2
- package/dist/qmd.js +8 -2
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +2 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +17 -1
- package/dist/recall-state.js +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/retrieval-agents.d.ts +1 -1
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +6 -6
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +6 -6
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/orama-backend.js +2 -2
- package/dist/search/port.d.ts +21 -2
- package/dist/search/port.js +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-MWOdNtSE.d.ts → semantic-consolidation-BICZvQ3C.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +1 -1
- package/dist/tier-routing.d.ts +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/{types-CgcCpUrf.d.ts → types-D96bCB3C.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/package.json +3 -2
- package/scripts/build-with-heap.mjs +25 -0
- package/src/namespaces/search.ts +16 -0
- package/src/orchestrator.ts +144 -3
- package/src/qmd.ts +137 -18
- package/src/recall-state.ts +47 -21
- package/src/search/port.ts +25 -0
- package/dist/chunk-7PCZGNG2.js.map +0 -1
- package/dist/chunk-B57QYSWN.js.map +0 -1
- package/dist/chunk-FWIROLS6.js.map +0 -1
- package/dist/chunk-M3VYPE2H.js.map +0 -1
- package/dist/chunk-UNLHHTKN.js.map +0 -1
- /package/dist/{chunk-7H7J3ZWN.js.map → chunk-2KDQI363.js.map} +0 -0
- /package/dist/{chunk-R2EBP6CM.js.map → chunk-35HP3TGR.js.map} +0 -0
- /package/dist/{chunk-OYXVENIS.js.map → chunk-4KDLCMLK.js.map} +0 -0
- /package/dist/{chunk-MO77TWPS.js.map → chunk-5AYAZN45.js.map} +0 -0
- /package/dist/{chunk-RP2U54GG.js.map → chunk-DFAXGZKI.js.map} +0 -0
- /package/dist/{chunk-6G5JEN55.js.map → chunk-FZC2WSDB.js.map} +0 -0
- /package/dist/{chunk-2EVZ5EN6.js.map → chunk-HSCJYHYV.js.map} +0 -0
- /package/dist/{chunk-5PLUC5OB.js.map → chunk-WSQG37DV.js.map} +0 -0
- /package/dist/{chunk-256W7AXC.js.map → chunk-YYQRVNSV.js.map} +0 -0
- /package/dist/{chunk-GRYAECRV.js.map → chunk-ZJH723NM.js.map} +0 -0
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
LastRecallStore,
|
|
114
114
|
TierMigrationStatusStore,
|
|
115
115
|
clampGraphRecallExpandedEntries
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-44VFF3BB.js";
|
|
117
117
|
import {
|
|
118
118
|
applyReasoningTraceBoost
|
|
119
119
|
} from "./chunk-ZZTOURJI.js";
|
|
@@ -319,11 +319,11 @@ import {
|
|
|
319
319
|
} from "./chunk-2MXEVL75.js";
|
|
320
320
|
import {
|
|
321
321
|
NamespaceSearchRouter
|
|
322
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-WOQIHC67.js";
|
|
323
323
|
import {
|
|
324
324
|
createConversationIndexRuntime,
|
|
325
325
|
createSearchBackend
|
|
326
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-35HP3TGR.js";
|
|
327
327
|
import {
|
|
328
328
|
NoopSearchBackend
|
|
329
329
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -337,7 +337,7 @@ import {
|
|
|
337
337
|
} from "./chunk-OIF36KGD.js";
|
|
338
338
|
import {
|
|
339
339
|
parseQmdExplain
|
|
340
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-6RHNCKHG.js";
|
|
341
341
|
import {
|
|
342
342
|
objectiveStateStoreOverrideForNamespace,
|
|
343
343
|
searchObjectiveStateSnapshots
|
|
@@ -7619,20 +7619,25 @@ ${r.snippet.trim()}
|
|
|
7619
7619
|
fetchLimit,
|
|
7620
7620
|
primarySearchOptions,
|
|
7621
7621
|
{
|
|
7622
|
-
signal: options.abortSignal
|
|
7622
|
+
signal: options.abortSignal,
|
|
7623
|
+
onDegradation: options.onDegradation
|
|
7623
7624
|
}
|
|
7624
7625
|
) : await this.qmd.search(
|
|
7625
7626
|
prompt,
|
|
7626
7627
|
options.collection,
|
|
7627
7628
|
fetchLimit,
|
|
7628
|
-
primarySearchOptions
|
|
7629
|
+
primarySearchOptions,
|
|
7630
|
+
{ onDegradation: options.onDegradation }
|
|
7629
7631
|
) : await this.searchAcrossNamespaces({
|
|
7630
7632
|
query: prompt,
|
|
7631
7633
|
namespaces: options.namespacesEnabled ? options.recallNamespaces : void 0,
|
|
7632
7634
|
maxResults: fetchLimit,
|
|
7633
7635
|
mode: "search",
|
|
7634
7636
|
searchOptions: primarySearchOptions,
|
|
7635
|
-
execution: {
|
|
7637
|
+
execution: {
|
|
7638
|
+
signal: options.abortSignal,
|
|
7639
|
+
onDegradation: options.onDegradation
|
|
7640
|
+
}
|
|
7636
7641
|
});
|
|
7637
7642
|
lastPrimaryResultCount = primaryResults.length;
|
|
7638
7643
|
lastHybridResultCount = 0;
|
|
@@ -7650,14 +7655,18 @@ ${r.snippet.trim()}
|
|
|
7650
7655
|
options.collection,
|
|
7651
7656
|
fetchLimit,
|
|
7652
7657
|
{
|
|
7653
|
-
signal: options.abortSignal
|
|
7658
|
+
signal: options.abortSignal,
|
|
7659
|
+
onDegradation: options.onDegradation
|
|
7654
7660
|
}
|
|
7655
7661
|
) : await this.searchAcrossNamespaces({
|
|
7656
7662
|
query: prompt,
|
|
7657
7663
|
namespaces: options.namespacesEnabled ? options.recallNamespaces : void 0,
|
|
7658
7664
|
maxResults: fetchLimit,
|
|
7659
7665
|
mode: "hybrid",
|
|
7660
|
-
execution: {
|
|
7666
|
+
execution: {
|
|
7667
|
+
signal: options.abortSignal,
|
|
7668
|
+
onDegradation: options.onDegradation
|
|
7669
|
+
}
|
|
7661
7670
|
});
|
|
7662
7671
|
lastHybridResultCount = hybridResults.length;
|
|
7663
7672
|
lastHybridTopUpUsed = hybridResults.length > 0;
|
|
@@ -8174,6 +8183,7 @@ ${r.snippet.trim()}
|
|
|
8174
8183
|
}
|
|
8175
8184
|
async recallInternal(prompt, sessionKey, options = {}) {
|
|
8176
8185
|
const recallStart = Date.now();
|
|
8186
|
+
const backendDegradations = [];
|
|
8177
8187
|
let asOfMs;
|
|
8178
8188
|
if (typeof options.asOf === "string" && options.asOf.length > 0) {
|
|
8179
8189
|
const parsed = Date.parse(options.asOf);
|
|
@@ -9655,6 +9665,19 @@ ${rows.join("\n")}
|
|
|
9655
9665
|
const qmdPromise = observeEnrichmentPromise(
|
|
9656
9666
|
(async () => {
|
|
9657
9667
|
const t0 = Date.now();
|
|
9668
|
+
const phaseDegradationsStart = backendDegradations.length;
|
|
9669
|
+
const replayCachedDegradations = (value) => {
|
|
9670
|
+
for (const degradation of value.degradations ?? []) {
|
|
9671
|
+
backendDegradations.push(degradation);
|
|
9672
|
+
}
|
|
9673
|
+
};
|
|
9674
|
+
const reportRecallQmdUnavailable = (detail) => {
|
|
9675
|
+
backendDegradations.push({
|
|
9676
|
+
backend: "qmd",
|
|
9677
|
+
code: "backend_unavailable",
|
|
9678
|
+
detail
|
|
9679
|
+
});
|
|
9680
|
+
};
|
|
9658
9681
|
if (recallResultLimit <= 0) {
|
|
9659
9682
|
recordRecallSectionMetric({
|
|
9660
9683
|
section: "qmd",
|
|
@@ -9703,6 +9726,7 @@ ${rows.join("\n")}
|
|
|
9703
9726
|
success: true,
|
|
9704
9727
|
timing: `${Math.max(0, Math.round(cachedQmd.ageMs))}ms-cache`
|
|
9705
9728
|
});
|
|
9729
|
+
replayCachedDegradations(cachedQmd.value);
|
|
9706
9730
|
if (queryAwarePrefilterIsEmpty) {
|
|
9707
9731
|
return emptyQueryAwareQmdResult;
|
|
9708
9732
|
}
|
|
@@ -9722,6 +9746,8 @@ ${rows.join("\n")}
|
|
|
9722
9746
|
success: true,
|
|
9723
9747
|
timing: `stale-cache(reprobe-cooldown:${Math.max(0, Math.round(staleQmdFallback.ageMs))}ms)`
|
|
9724
9748
|
});
|
|
9749
|
+
reportRecallQmdUnavailable("served stale recall cache (reprobe cooldown)");
|
|
9750
|
+
replayCachedDegradations(staleQmdFallback.value);
|
|
9725
9751
|
if (queryAwarePrefilterIsEmpty) {
|
|
9726
9752
|
return emptyQueryAwareQmdResult;
|
|
9727
9753
|
}
|
|
@@ -9736,6 +9762,7 @@ ${rows.join("\n")}
|
|
|
9736
9762
|
success: true,
|
|
9737
9763
|
timing: "skip(reprobe-cooldown)"
|
|
9738
9764
|
});
|
|
9765
|
+
reportRecallQmdUnavailable("recall skipped QMD (reprobe cooldown)");
|
|
9739
9766
|
return null;
|
|
9740
9767
|
}
|
|
9741
9768
|
this.lastQmdReprobeAtMs = now;
|
|
@@ -9751,6 +9778,8 @@ ${rows.join("\n")}
|
|
|
9751
9778
|
success: true,
|
|
9752
9779
|
timing: `stale-cache(reprobe-failed:${Math.max(0, Math.round(staleQmdFallback.ageMs))}ms)`
|
|
9753
9780
|
});
|
|
9781
|
+
reportRecallQmdUnavailable("served stale recall cache (reprobe failed)");
|
|
9782
|
+
replayCachedDegradations(staleQmdFallback.value);
|
|
9754
9783
|
if (queryAwarePrefilterIsEmpty) {
|
|
9755
9784
|
return emptyQueryAwareQmdResult;
|
|
9756
9785
|
}
|
|
@@ -9768,6 +9797,7 @@ ${rows.join("\n")}
|
|
|
9768
9797
|
log.debug(
|
|
9769
9798
|
`Search skip (re-probe failed): ${this.qmd.debugStatus()}`
|
|
9770
9799
|
);
|
|
9800
|
+
reportRecallQmdUnavailable("recall skipped QMD (reprobe failed)");
|
|
9771
9801
|
return null;
|
|
9772
9802
|
}
|
|
9773
9803
|
log.info(`QMD re-probe succeeded: ${this.qmd.debugStatus()}`);
|
|
@@ -9832,6 +9862,9 @@ ${rows.join("\n")}
|
|
|
9832
9862
|
queryAwarePrefilter,
|
|
9833
9863
|
searchOptions: qmdSearchOptions,
|
|
9834
9864
|
abortSignal: qmdEnrichmentAbort.signal,
|
|
9865
|
+
onDegradation: (degradation) => {
|
|
9866
|
+
backendDegradations.push(degradation);
|
|
9867
|
+
},
|
|
9835
9868
|
onDebugSnapshot: async (snapshot) => {
|
|
9836
9869
|
await this.recordLastQmdRecallSnapshot({
|
|
9837
9870
|
storage: profileStorage,
|
|
@@ -9871,11 +9904,15 @@ ${rows.join("\n")}
|
|
|
9871
9904
|
maxSpecializedScore = 0;
|
|
9872
9905
|
}
|
|
9873
9906
|
}
|
|
9907
|
+
const phaseDegradations = backendDegradations.slice(
|
|
9908
|
+
phaseDegradationsStart
|
|
9909
|
+
);
|
|
9874
9910
|
const result = {
|
|
9875
9911
|
memoryResultsLists: [augmentedResults],
|
|
9876
9912
|
globalResults: [],
|
|
9877
9913
|
preAugmentTopScore,
|
|
9878
|
-
maxSpecializedScore
|
|
9914
|
+
maxSpecializedScore,
|
|
9915
|
+
...phaseDegradations.length > 0 ? { degradations: phaseDegradations } : {}
|
|
9879
9916
|
};
|
|
9880
9917
|
if (augmentedResults.length > 0 || result.globalResults.length > 0) {
|
|
9881
9918
|
setCachedQmdRecall(qmdCacheKey, result, {
|
|
@@ -9902,6 +9939,8 @@ ${rows.join("\n")}
|
|
|
9902
9939
|
success: true,
|
|
9903
9940
|
timing: `stale-cache(${err instanceof Error ? err.message : String(err)})`
|
|
9904
9941
|
});
|
|
9942
|
+
reportRecallQmdUnavailable("served stale recall cache (qmd phase error)");
|
|
9943
|
+
replayCachedDegradations(staleQmdFallback.value);
|
|
9905
9944
|
if (queryAwarePrefilterIsEmpty) {
|
|
9906
9945
|
return emptyQueryAwareQmdResult;
|
|
9907
9946
|
}
|
|
@@ -9921,7 +9960,16 @@ ${rows.join("\n")}
|
|
|
9921
9960
|
);
|
|
9922
9961
|
return null;
|
|
9923
9962
|
}).finally(() => qmdEnrichmentAbort.dispose()),
|
|
9924
|
-
() =>
|
|
9963
|
+
() => {
|
|
9964
|
+
if (!options.abortSignal?.aborted) {
|
|
9965
|
+
backendDegradations.push({
|
|
9966
|
+
backend: "qmd",
|
|
9967
|
+
code: "deadline_exceeded",
|
|
9968
|
+
detail: "hot qmd enrichment abandoned (enrichment deadline)"
|
|
9969
|
+
});
|
|
9970
|
+
}
|
|
9971
|
+
qmdEnrichmentAbort.cancel();
|
|
9972
|
+
}
|
|
9925
9973
|
);
|
|
9926
9974
|
const transcriptPromise = (async () => {
|
|
9927
9975
|
const t0 = Date.now();
|
|
@@ -11233,6 +11281,9 @@ ${tmtNode.summary}`
|
|
|
11233
11281
|
recallMode,
|
|
11234
11282
|
queryAwarePrefilter,
|
|
11235
11283
|
abortSignal: options.abortSignal,
|
|
11284
|
+
onDegradation: (degradation) => {
|
|
11285
|
+
backendDegradations.push(degradation);
|
|
11286
|
+
},
|
|
11236
11287
|
xrayPoolSizeSink: xrayColdPoolSink,
|
|
11237
11288
|
deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
|
|
11238
11289
|
asOfMs,
|
|
@@ -11401,6 +11452,9 @@ ${tmtNode.summary}`
|
|
|
11401
11452
|
recallMode,
|
|
11402
11453
|
queryAwarePrefilter,
|
|
11403
11454
|
abortSignal: options.abortSignal,
|
|
11455
|
+
onDegradation: (degradation) => {
|
|
11456
|
+
backendDegradations.push(degradation);
|
|
11457
|
+
},
|
|
11404
11458
|
xrayPoolSizeSink: xrayColdPoolSink,
|
|
11405
11459
|
deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
|
|
11406
11460
|
asOfMs,
|
|
@@ -11497,6 +11551,9 @@ ${tmtNode.summary}`
|
|
|
11497
11551
|
recallMode,
|
|
11498
11552
|
queryAwarePrefilter,
|
|
11499
11553
|
abortSignal: options.abortSignal,
|
|
11554
|
+
onDegradation: (degradation) => {
|
|
11555
|
+
backendDegradations.push(degradation);
|
|
11556
|
+
},
|
|
11500
11557
|
xrayPoolSizeSink: xrayColdPoolSink,
|
|
11501
11558
|
deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
|
|
11502
11559
|
asOfMs,
|
|
@@ -11538,6 +11595,9 @@ ${tmtNode.summary}`
|
|
|
11538
11595
|
recallMode,
|
|
11539
11596
|
queryAwarePrefilter,
|
|
11540
11597
|
abortSignal: options.abortSignal,
|
|
11598
|
+
onDegradation: (degradation) => {
|
|
11599
|
+
backendDegradations.push(degradation);
|
|
11600
|
+
},
|
|
11541
11601
|
xrayPoolSizeSink: xrayColdPoolSink,
|
|
11542
11602
|
deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
|
|
11543
11603
|
asOfMs,
|
|
@@ -11850,7 +11910,13 @@ _Context: ${topQuestion.context}_`
|
|
|
11850
11910
|
mode: identityInjectionModeUsed,
|
|
11851
11911
|
injectedChars: identityInjectedChars,
|
|
11852
11912
|
truncated: identityInjectionTruncated
|
|
11853
|
-
}
|
|
11913
|
+
},
|
|
11914
|
+
// Included at record time so the published snapshot is born
|
|
11915
|
+
// annotated — a post-record annotation leaves a window where
|
|
11916
|
+
// readers see the snapshot without degradations, and a concurrent
|
|
11917
|
+
// same-session recall could drop them entirely (codex + cursor
|
|
11918
|
+
// reviews on #1544).
|
|
11919
|
+
backendDegradations: backendDegradations.length > 0 ? backendDegradations : void 0
|
|
11854
11920
|
}).catch((err) => log.debug(`last recall record failed: ${err}`));
|
|
11855
11921
|
}
|
|
11856
11922
|
if (sessionKey) {
|
|
@@ -16245,10 +16311,14 @@ ${lines.join("\n\n")}`;
|
|
|
16245
16311
|
return [];
|
|
16246
16312
|
}
|
|
16247
16313
|
const deadlineRemainingMs = () => typeof options.deadlineAtMs === "number" ? Math.max(0, options.deadlineAtMs - Date.now()) : null;
|
|
16248
|
-
const runColdStepWithinDeadline = async (label, fallback, task) => {
|
|
16314
|
+
const runColdStepWithinDeadline = async (label, fallback, task, onDeadline) => {
|
|
16249
16315
|
throwIfRecallAborted(options.abortSignal);
|
|
16250
16316
|
const remainingMs = deadlineRemainingMs();
|
|
16251
16317
|
if (remainingMs === 0) {
|
|
16318
|
+
try {
|
|
16319
|
+
onDeadline?.();
|
|
16320
|
+
} catch {
|
|
16321
|
+
}
|
|
16252
16322
|
log.debug(`cold-tier recall ${label} skipped: shared assembly deadline expired`);
|
|
16253
16323
|
return fallback;
|
|
16254
16324
|
}
|
|
@@ -16268,6 +16338,10 @@ ${lines.join("\n\n")}`;
|
|
|
16268
16338
|
new Promise((resolve) => {
|
|
16269
16339
|
timeoutHandle = setTimeout(() => {
|
|
16270
16340
|
timedOut = true;
|
|
16341
|
+
try {
|
|
16342
|
+
onDeadline?.();
|
|
16343
|
+
} catch {
|
|
16344
|
+
}
|
|
16271
16345
|
log.debug(
|
|
16272
16346
|
`cold-tier recall ${label} skipped: shared assembly deadline expired`
|
|
16273
16347
|
);
|
|
@@ -16294,6 +16368,18 @@ ${lines.join("\n\n")}`;
|
|
|
16294
16368
|
false,
|
|
16295
16369
|
0
|
|
16296
16370
|
);
|
|
16371
|
+
let coldQmdObserverActive = true;
|
|
16372
|
+
const reportColdQmdDeadline = () => {
|
|
16373
|
+
coldQmdObserverActive = false;
|
|
16374
|
+
try {
|
|
16375
|
+
options.onDegradation?.({
|
|
16376
|
+
backend: "qmd",
|
|
16377
|
+
code: "deadline_exceeded",
|
|
16378
|
+
detail: "cold-tier qmd lookup abandoned (assembly deadline)"
|
|
16379
|
+
});
|
|
16380
|
+
} catch {
|
|
16381
|
+
}
|
|
16382
|
+
};
|
|
16297
16383
|
longTerm = await runColdStepWithinDeadline(
|
|
16298
16384
|
"qmd lookup",
|
|
16299
16385
|
[],
|
|
@@ -16308,10 +16394,17 @@ ${lines.join("\n\n")}`;
|
|
|
16308
16394
|
collection: coldCollection,
|
|
16309
16395
|
queryAwarePrefilter: options.queryAwarePrefilter,
|
|
16310
16396
|
searchOptions: this.buildConfiguredQmdSearchOptions(options.prompt),
|
|
16311
|
-
abortSignal: options.abortSignal
|
|
16397
|
+
abortSignal: options.abortSignal,
|
|
16398
|
+
onDegradation: (degradation) => {
|
|
16399
|
+
if (coldQmdObserverActive) {
|
|
16400
|
+
options.onDegradation?.(degradation);
|
|
16401
|
+
}
|
|
16402
|
+
}
|
|
16312
16403
|
}
|
|
16313
|
-
)
|
|
16404
|
+
),
|
|
16405
|
+
reportColdQmdDeadline
|
|
16314
16406
|
);
|
|
16407
|
+
coldQmdObserverActive = false;
|
|
16315
16408
|
if (longTerm.length > 0) {
|
|
16316
16409
|
log.debug(
|
|
16317
16410
|
`cold-tier recall source=cold-qmd collection=${coldCollection} hits=${longTerm.length}`
|
|
@@ -17242,4 +17335,4 @@ export {
|
|
|
17242
17335
|
resolvePersistedMemoryRelativePath,
|
|
17243
17336
|
Orchestrator
|
|
17244
17337
|
};
|
|
17245
|
-
//# sourceMappingURL=chunk-
|
|
17338
|
+
//# sourceMappingURL=chunk-TGOOJCGA.js.map
|