@remnic/core 9.3.727 → 9.3.728
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-boundary.js +6 -6
- package/dist/access-cli.js +11 -11
- package/dist/access-http.js +10 -10
- package/dist/access-mcp.js +9 -9
- package/dist/access-operations-batch.js +7 -7
- package/dist/access-operations.d.ts +1 -1
- package/dist/access-operations.js +8 -8
- package/dist/access-schema.d.ts +4 -4
- package/dist/access-service.js +5 -5
- package/dist/capabilities.d.ts +43 -1
- package/dist/capabilities.js +5 -3
- package/dist/{chunk-DVRHLN2O.js → chunk-3RCBIOOJ.js} +18 -2
- package/dist/{chunk-DVRHLN2O.js.map → chunk-3RCBIOOJ.js.map} +1 -1
- package/dist/{chunk-R7IYU5DZ.js → chunk-4ESAR77N.js} +2 -2
- package/dist/{chunk-SNKPUJHR.js → chunk-76NHR6ZL.js} +3 -3
- package/dist/{chunk-6PY5YJAV.js → chunk-BQCHEV7O.js} +8 -3
- package/dist/{chunk-6PY5YJAV.js.map → chunk-BQCHEV7O.js.map} +1 -1
- package/dist/{chunk-ZA2S2VLL.js → chunk-C2PG7IEH.js} +5 -2
- package/dist/chunk-C2PG7IEH.js.map +1 -0
- package/dist/{chunk-MJIHJ7OG.js → chunk-H5BWGCRZ.js} +11 -10
- package/dist/chunk-H5BWGCRZ.js.map +1 -0
- package/dist/{chunk-N3VNUM4Z.js → chunk-HGNOCPZX.js} +4 -4
- package/dist/{chunk-CSRXQ6NB.js → chunk-I5REUWLH.js} +10 -4
- package/dist/chunk-I5REUWLH.js.map +1 -0
- package/dist/{chunk-NSA5ZRUL.js → chunk-M4AYVEWS.js} +3 -3
- package/dist/{chunk-OEEW4KJA.js → chunk-O6YH5F47.js} +3 -3
- package/dist/{chunk-XPHVAOBT.js → chunk-QNEUZIAH.js} +45 -36
- package/dist/chunk-QNEUZIAH.js.map +1 -0
- package/dist/{chunk-27QQC7ZX.js → chunk-UM5AWJNQ.js} +6 -5
- package/dist/chunk-UM5AWJNQ.js.map +1 -0
- package/dist/{chunk-2KAYTPPT.js → chunk-UTHQPSRC.js} +2 -2
- package/dist/{chunk-CTOQEZSN.js → chunk-V4GNSDFH.js} +2 -2
- package/dist/{chunk-EHISUJFN.js → chunk-WAS3NV46.js} +6 -3
- package/dist/chunk-WAS3NV46.js.map +1 -0
- package/dist/{chunk-DKJCRGWM.js → chunk-YGIQORJ3.js} +2 -2
- package/dist/cli.js +13 -13
- package/dist/embedding-fallback.js +2 -1
- package/dist/extraction.js +2 -1
- package/dist/{first-start-migration-PG5HBC3K.js → first-start-migration-22LPFHD5.js} +6 -2
- package/dist/first-start-migration-22LPFHD5.js.map +1 -0
- package/dist/index.js +16 -16
- package/dist/namespaces/migrate.js +5 -4
- package/dist/namespaces/search.js +4 -3
- package/dist/operator-toolkit.js +6 -6
- package/dist/orchestrator.js +7 -7
- package/dist/schemas.d.ts +22 -22
- package/dist/search/embed-helper.js +2 -1
- package/dist/search/factory.js +3 -2
- package/dist/search/index.js +3 -2
- package/dist/transfer/types.d.ts +12 -12
- package/package.json +2 -2
- package/src/access-service.ts +2 -1
- package/src/capabilities.test.ts +155 -0
- package/src/capabilities.ts +91 -0
- package/src/chat/chat-engine.test.ts +39 -1
- package/src/chat/chat-session.ts +25 -2
- package/src/cli.ts +3 -2
- package/src/embedding-fallback.ts +2 -1
- package/src/extraction.ts +7 -3
- package/src/maintenance/first-start-migration.ts +3 -1
- package/src/orchestrator.ts +38 -26
- package/src/search/embed-helper.ts +3 -2
- package/dist/chunk-27QQC7ZX.js.map +0 -1
- package/dist/chunk-CSRXQ6NB.js.map +0 -1
- package/dist/chunk-EHISUJFN.js.map +0 -1
- package/dist/chunk-MJIHJ7OG.js.map +0 -1
- package/dist/chunk-XPHVAOBT.js.map +0 -1
- package/dist/chunk-ZA2S2VLL.js.map +0 -1
- package/dist/first-start-migration-PG5HBC3K.js.map +0 -1
- /package/dist/{chunk-R7IYU5DZ.js.map → chunk-4ESAR77N.js.map} +0 -0
- /package/dist/{chunk-SNKPUJHR.js.map → chunk-76NHR6ZL.js.map} +0 -0
- /package/dist/{chunk-N3VNUM4Z.js.map → chunk-HGNOCPZX.js.map} +0 -0
- /package/dist/{chunk-NSA5ZRUL.js.map → chunk-M4AYVEWS.js.map} +0 -0
- /package/dist/{chunk-OEEW4KJA.js.map → chunk-O6YH5F47.js.map} +0 -0
- /package/dist/{chunk-2KAYTPPT.js.map → chunk-UTHQPSRC.js.map} +0 -0
- /package/dist/{chunk-CTOQEZSN.js.map → chunk-V4GNSDFH.js.map} +0 -0
- /package/dist/{chunk-DKJCRGWM.js.map → chunk-YGIQORJ3.js.map} +0 -0
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
} from "./chunk-LTHVM4XN.js";
|
|
155
155
|
import {
|
|
156
156
|
ExtractionEngine
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-I5REUWLH.js";
|
|
158
158
|
import {
|
|
159
159
|
parseMemoryActionEligibilityContext
|
|
160
160
|
} from "./chunk-5GSUBCZM.js";
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
} from "./chunk-Q6IP2ARR.js";
|
|
188
188
|
import {
|
|
189
189
|
EmbeddingFallback
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-C2PG7IEH.js";
|
|
191
191
|
import {
|
|
192
192
|
buildEntityRecallSection,
|
|
193
193
|
entityRecentTranscriptLookbackHours,
|
|
@@ -333,11 +333,11 @@ import {
|
|
|
333
333
|
} from "./chunk-J6BH2OBA.js";
|
|
334
334
|
import {
|
|
335
335
|
NamespaceSearchRouter
|
|
336
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-V4GNSDFH.js";
|
|
337
337
|
import {
|
|
338
338
|
createConversationIndexRuntime,
|
|
339
339
|
createSearchBackend
|
|
340
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-UTHQPSRC.js";
|
|
341
341
|
import {
|
|
342
342
|
NoopSearchBackend
|
|
343
343
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -363,8 +363,9 @@ import {
|
|
|
363
363
|
} from "./chunk-EH5ED3C6.js";
|
|
364
364
|
import {
|
|
365
365
|
resolveCapabilities,
|
|
366
|
-
resolveGraphConstructionCapabilities
|
|
367
|
-
|
|
366
|
+
resolveGraphConstructionCapabilities,
|
|
367
|
+
resolveMemoryLifecycleCapabilities
|
|
368
|
+
} from "./chunk-3RCBIOOJ.js";
|
|
368
369
|
import {
|
|
369
370
|
searchCausalTrajectories
|
|
370
371
|
} from "./chunk-SQNED75R.js";
|
|
@@ -3787,8 +3788,9 @@ var Orchestrator = class _Orchestrator {
|
|
|
3787
3788
|
path3.join(config.memoryDir, "threads"),
|
|
3788
3789
|
config.threadingGapMinutes
|
|
3789
3790
|
);
|
|
3791
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);
|
|
3790
3792
|
this.tmtBuilder = new TmtBuilder(config.memoryDir, {
|
|
3791
|
-
temporalMemoryTreeEnabled:
|
|
3793
|
+
temporalMemoryTreeEnabled: lifecycleCaps.temporalMemoryTree,
|
|
3792
3794
|
tmtHourlyMinMemories: config.tmtHourlyMinMemories,
|
|
3793
3795
|
tmtSummaryMaxTokens: config.tmtSummaryMaxTokens
|
|
3794
3796
|
});
|
|
@@ -4182,6 +4184,7 @@ var Orchestrator = class _Orchestrator {
|
|
|
4182
4184
|
}
|
|
4183
4185
|
}
|
|
4184
4186
|
async deferredInitialize(signal) {
|
|
4187
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
4185
4188
|
if (this.qmd.isAvailable() && this.config.qmdMaintenanceEnabled) {
|
|
4186
4189
|
try {
|
|
4187
4190
|
log.info("QMD startup sync: updating index to match current disk state");
|
|
@@ -4215,7 +4218,7 @@ var Orchestrator = class _Orchestrator {
|
|
|
4215
4218
|
})
|
|
4216
4219
|
);
|
|
4217
4220
|
}
|
|
4218
|
-
if (this.config.
|
|
4221
|
+
if (resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) {
|
|
4219
4222
|
warmupPromises.push(
|
|
4220
4223
|
this.embeddingFallback.isAvailable().then((ok) => {
|
|
4221
4224
|
log.info(
|
|
@@ -4279,9 +4282,9 @@ var Orchestrator = class _Orchestrator {
|
|
|
4279
4282
|
if (signal.aborted) return;
|
|
4280
4283
|
await this.maintenanceScheduler.autoRegisterCrons(signal);
|
|
4281
4284
|
if (signal.aborted) return;
|
|
4282
|
-
if (
|
|
4285
|
+
if (lifecycleCaps.lifecyclePolicy && this.config.qmdTierMigrationEnabled) {
|
|
4283
4286
|
try {
|
|
4284
|
-
const { runFirstStartMigration } = await import("./first-start-migration-
|
|
4287
|
+
const { runFirstStartMigration } = await import("./first-start-migration-22LPFHD5.js");
|
|
4285
4288
|
const result = await runFirstStartMigration({
|
|
4286
4289
|
storage: this.storage,
|
|
4287
4290
|
config: this.config,
|
|
@@ -4506,6 +4509,7 @@ var Orchestrator = class _Orchestrator {
|
|
|
4506
4509
|
* default storage.
|
|
4507
4510
|
*/
|
|
4508
4511
|
async runLifecyclePolicyFanout() {
|
|
4512
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
4509
4513
|
return this.runNamespaceMaintenanceFanoutForJob(
|
|
4510
4514
|
"lifecycle",
|
|
4511
4515
|
async (ctx) => {
|
|
@@ -4514,7 +4518,7 @@ var Orchestrator = class _Orchestrator {
|
|
|
4514
4518
|
const assessed = await this.runLifecyclePolicyPass(corpus, storage);
|
|
4515
4519
|
return { itemCount: assessed };
|
|
4516
4520
|
},
|
|
4517
|
-
{ enabled:
|
|
4521
|
+
{ enabled: lifecycleCaps.lifecyclePolicy }
|
|
4518
4522
|
);
|
|
4519
4523
|
}
|
|
4520
4524
|
/**
|
|
@@ -6832,7 +6836,7 @@ ${r.snippet.trim()}
|
|
|
6832
6836
|
recallAssemblyClockMs() {
|
|
6833
6837
|
return Date.now();
|
|
6834
6838
|
}
|
|
6835
|
-
async recallInternal(prompt, sessionKey, options = {}, caps = resolveCapabilities(this.config), graphCaps = resolveGraphConstructionCapabilities(this.config)) {
|
|
6839
|
+
async recallInternal(prompt, sessionKey, options = {}, caps = resolveCapabilities(this.config), graphCaps = resolveGraphConstructionCapabilities(this.config), lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config)) {
|
|
6836
6840
|
const recallStart = Date.now();
|
|
6837
6841
|
const backendDegradations = [];
|
|
6838
6842
|
let asOfMs;
|
|
@@ -9409,8 +9413,8 @@ ${boxLines.join("\n")}`
|
|
|
9409
9413
|
}
|
|
9410
9414
|
if (this.isRecallSectionEnabled(
|
|
9411
9415
|
"temporal-memory-tree",
|
|
9412
|
-
|
|
9413
|
-
) &&
|
|
9416
|
+
lifecycleCaps.temporalMemoryTree
|
|
9417
|
+
) && lifecycleCaps.temporalMemoryTree && recallMode !== "minimal" && recallMode !== "no_recall") {
|
|
9414
9418
|
const tmtNode = await this.tmtBuilder.getMostRelevantNode();
|
|
9415
9419
|
if (tmtNode) {
|
|
9416
9420
|
const levelLabel = tmtNode.level.charAt(0).toUpperCase() + tmtNode.level.slice(1);
|
|
@@ -10073,7 +10077,7 @@ ${tmtNode.summary}`
|
|
|
10073
10077
|
);
|
|
10074
10078
|
if (memories.length > 0) {
|
|
10075
10079
|
const supersessionOptions = {
|
|
10076
|
-
enabled:
|
|
10080
|
+
enabled: lifecycleCaps.temporalSupersession,
|
|
10077
10081
|
includeInRecall: this.config.temporalSupersessionIncludeInRecall
|
|
10078
10082
|
};
|
|
10079
10083
|
const asOfActive = typeof asOfMs === "number" && Number.isFinite(asOfMs);
|
|
@@ -11208,7 +11212,8 @@ _Context: ${topQuestion.context}_`
|
|
|
11208
11212
|
${normalized}`).digest("hex");
|
|
11209
11213
|
}
|
|
11210
11214
|
shouldQueueExtraction(turns, options = {}) {
|
|
11211
|
-
|
|
11215
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
11216
|
+
if (!lifecycleCaps.extractionDedupe) return true;
|
|
11212
11217
|
if (!Array.isArray(turns) || turns.length === 0) return false;
|
|
11213
11218
|
const bufferKey = options.bufferKey ?? turns[0]?.sessionKey ?? "default";
|
|
11214
11219
|
const fingerprint = this.buildExtractionFingerprint(turns, bufferKey);
|
|
@@ -11809,7 +11814,7 @@ ${normalized}`).digest("hex");
|
|
|
11809
11814
|
requestQmdMaintenanceForTool(reason) {
|
|
11810
11815
|
this.maintenanceScheduler.requestQmdMaintenanceForTool(reason);
|
|
11811
11816
|
}
|
|
11812
|
-
async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, sourceText, graphCaps = resolveGraphConstructionCapabilities(this.config)) {
|
|
11817
|
+
async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, sourceText, graphCaps = resolveGraphConstructionCapabilities(this.config), lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config)) {
|
|
11813
11818
|
const citationEnabled = this.config.inlineSourceAttributionEnabled === true;
|
|
11814
11819
|
const citationTemplate = this.config.inlineSourceAttributionFormat;
|
|
11815
11820
|
const citationContextBase = citationEnabled ? {
|
|
@@ -11984,7 +11989,7 @@ ${normalized}`).digest("hex");
|
|
|
11984
11989
|
...options.provenance ? { provenance: options.provenance } : {}
|
|
11985
11990
|
}
|
|
11986
11991
|
);
|
|
11987
|
-
if (
|
|
11992
|
+
if (lifecycleCaps.temporalSupersession && options.category === "fact" && options.entityRef && options.structuredAttributes && Object.keys(options.structuredAttributes).length > 0) {
|
|
11988
11993
|
try {
|
|
11989
11994
|
await applyTemporalSupersession({
|
|
11990
11995
|
storage: targetStorage,
|
|
@@ -12052,7 +12057,7 @@ ${normalized}`).digest("hex");
|
|
|
12052
12057
|
options.entityRef
|
|
12053
12058
|
);
|
|
12054
12059
|
}
|
|
12055
|
-
if (
|
|
12060
|
+
if (lifecycleCaps.temporalSupersession && options.entityRef && options.structuredAttributes && Object.keys(options.structuredAttributes).length > 0) {
|
|
12056
12061
|
let hashDedupMatchingFact;
|
|
12057
12062
|
let hashDedupLookupComplete = false;
|
|
12058
12063
|
try {
|
|
@@ -12131,7 +12136,7 @@ ${normalized}`).digest("hex");
|
|
|
12131
12136
|
...options.provenance ? { provenance: options.provenance } : {}
|
|
12132
12137
|
}
|
|
12133
12138
|
);
|
|
12134
|
-
if (
|
|
12139
|
+
if (lifecycleCaps.temporalSupersession && options.entityRef && options.structuredAttributes && Object.keys(options.structuredAttributes).length > 0) {
|
|
12135
12140
|
try {
|
|
12136
12141
|
await applyTemporalSupersession({
|
|
12137
12142
|
storage: sharedStorage,
|
|
@@ -12309,7 +12314,7 @@ ${normalized}`).digest("hex");
|
|
|
12309
12314
|
let judgeVerdictsByFactIndex = null;
|
|
12310
12315
|
let judgeGatedCount = 0;
|
|
12311
12316
|
this.lastPersistExtractionDeferredCount = 0;
|
|
12312
|
-
if (
|
|
12317
|
+
if (lifecycleCaps.extractionJudge) {
|
|
12313
12318
|
let preJudgeRedactionRules = [];
|
|
12314
12319
|
try {
|
|
12315
12320
|
preJudgeRedactionRules = await redactionRulesFor(storage.dir);
|
|
@@ -12353,7 +12358,7 @@ ${normalized}`).digest("hex");
|
|
|
12353
12358
|
candidateToFactIndex.push(fi);
|
|
12354
12359
|
}
|
|
12355
12360
|
const judgeTelemetryOpts = {
|
|
12356
|
-
enabled:
|
|
12361
|
+
enabled: lifecycleCaps.extractionJudgeTelemetry,
|
|
12357
12362
|
memoryDir: this.config.memoryDir
|
|
12358
12363
|
};
|
|
12359
12364
|
const judgeTrainingOpts = {
|
|
@@ -12478,7 +12483,7 @@ ${normalized}`).digest("hex");
|
|
|
12478
12483
|
);
|
|
12479
12484
|
}
|
|
12480
12485
|
}
|
|
12481
|
-
if (
|
|
12486
|
+
if (lifecycleCaps.extractionScopeClassification && this.config.namespacesEnabled && fact.scope === "global" && !routedNamespaceExplicit) {
|
|
12482
12487
|
const currentNs = this.storageDirNamespace(targetStorage.dir);
|
|
12483
12488
|
if (currentNs !== this.config.sharedNamespace && profileAllowsSharedWrites) {
|
|
12484
12489
|
try {
|
|
@@ -12840,7 +12845,7 @@ ${normalized}`).digest("hex");
|
|
|
12840
12845
|
// #1578 r3: an extracted end-only bound (validFrom absent) is
|
|
12841
12846
|
// historical, not a new authoritative state — never let it
|
|
12842
12847
|
// supersede a later active fact (codex P1 on :15534).
|
|
12843
|
-
enabled:
|
|
12848
|
+
enabled: lifecycleCaps.temporalSupersession && !(biTemporal && !biTemporal.validFrom)
|
|
12844
12849
|
});
|
|
12845
12850
|
} catch (err) {
|
|
12846
12851
|
log.warn(`temporal-supersession (chunked): unexpected error: ${err}`);
|
|
@@ -13003,7 +13008,7 @@ ${normalized}`).digest("hex");
|
|
|
13003
13008
|
entityRef: supersessionEntityRef,
|
|
13004
13009
|
structuredAttributes: fact.structuredAttributes,
|
|
13005
13010
|
createdAt: supersessionOrderingAt(biTemporal?.validFrom ?? sourceContext?.validAt),
|
|
13006
|
-
enabled:
|
|
13011
|
+
enabled: lifecycleCaps.temporalSupersession && !(biTemporal && !biTemporal.validFrom)
|
|
13007
13012
|
});
|
|
13008
13013
|
} catch (err) {
|
|
13009
13014
|
log.warn(`temporal-supersession: unexpected error: ${err}`);
|
|
@@ -13257,7 +13262,7 @@ ${normalized}`).digest("hex");
|
|
|
13257
13262
|
}
|
|
13258
13263
|
}
|
|
13259
13264
|
async indexPersistedMemory(storage, memoryId) {
|
|
13260
|
-
if (!this.config.
|
|
13265
|
+
if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) return;
|
|
13261
13266
|
if (!await this.embeddingFallback.isAvailable()) return;
|
|
13262
13267
|
const memory = await storage.getMemoryById(memoryId);
|
|
13263
13268
|
if (!memory) return;
|
|
@@ -13385,6 +13390,7 @@ ${normalized}`).digest("hex");
|
|
|
13385
13390
|
/** IDs of facts persisted in the last extraction */
|
|
13386
13391
|
lastPersistedIds = [];
|
|
13387
13392
|
async runConsolidation() {
|
|
13393
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
13388
13394
|
log.info("running consolidation pass");
|
|
13389
13395
|
let merged = 0;
|
|
13390
13396
|
let invalidated = 0;
|
|
@@ -13549,7 +13555,7 @@ ${normalized}`).digest("hex");
|
|
|
13549
13555
|
}
|
|
13550
13556
|
}
|
|
13551
13557
|
}
|
|
13552
|
-
if (
|
|
13558
|
+
if (lifecycleCaps.lifecyclePolicy) {
|
|
13553
13559
|
try {
|
|
13554
13560
|
const lightSleepStartedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
13555
13561
|
const lifecycleCorpus = await this.storage.readAllMemories();
|
|
@@ -13699,7 +13705,7 @@ ${normalized}`).digest("hex");
|
|
|
13699
13705
|
const meta = await this.storage.loadMeta();
|
|
13700
13706
|
meta.lastConsolidationAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
13701
13707
|
await this.storage.saveMeta(meta);
|
|
13702
|
-
if (
|
|
13708
|
+
if (lifecycleCaps.temporalMemoryTree) {
|
|
13703
13709
|
try {
|
|
13704
13710
|
const tmtEntries = allMemories.filter(
|
|
13705
13711
|
(m) => m.frontmatter.status !== "superseded" && m.frontmatter.status !== "archived" && m.frontmatter.status !== "forgotten" && m.frontmatter.status !== "pending_review"
|
|
@@ -14095,6 +14101,7 @@ ${texts.map((t, i) => `[${i + 1}] ${t}`).join("\n\n")}`;
|
|
|
14095
14101
|
let updatedCount = 0;
|
|
14096
14102
|
let disputedCount = 0;
|
|
14097
14103
|
let evaluatedCount = 0;
|
|
14104
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
14098
14105
|
const thresholds = this.effectiveLifecycleThresholds();
|
|
14099
14106
|
const policy = {
|
|
14100
14107
|
promoteHeatThreshold: thresholds.promoteHeatThreshold,
|
|
@@ -14134,7 +14141,7 @@ ${texts.map((t, i) => `[${i + 1}] ${t}`).join("\n\n")}`;
|
|
|
14134
14141
|
});
|
|
14135
14142
|
if (wrote) updatedCount += 1;
|
|
14136
14143
|
}
|
|
14137
|
-
if (!
|
|
14144
|
+
if (!lifecycleCaps.lifecycleMetrics) return updatedCount;
|
|
14138
14145
|
const total = evaluatedCount;
|
|
14139
14146
|
const metrics = {
|
|
14140
14147
|
generatedAt: nowIso,
|
|
@@ -15137,7 +15144,7 @@ ${lines.join("\n\n")}`;
|
|
|
15137
15144
|
* `memoryDir` root, an exclusion list for `namespaces/*`).
|
|
15138
15145
|
*/
|
|
15139
15146
|
async semanticDedupLookup(content, limit, targetStorage) {
|
|
15140
|
-
if (!this.config.
|
|
15147
|
+
if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) {
|
|
15141
15148
|
throw new Error("semantic dedup: embedding backend not configured");
|
|
15142
15149
|
}
|
|
15143
15150
|
if (!await this.embeddingFallback.isAvailable()) {
|
|
@@ -15187,7 +15194,7 @@ ${lines.join("\n\n")}`;
|
|
|
15187
15194
|
return { pathPrefix: rel };
|
|
15188
15195
|
}
|
|
15189
15196
|
async searchEmbeddingFallback(query, limit) {
|
|
15190
|
-
if (!this.config.
|
|
15197
|
+
if (!resolveMemoryLifecycleCapabilities(this.config).embeddingFallback) return [];
|
|
15191
15198
|
if (!await this.embeddingFallback.isAvailable()) return [];
|
|
15192
15199
|
const hits = await this.embeddingFallback.search(query, limit);
|
|
15193
15200
|
if (hits.length === 0) return [];
|
|
@@ -15710,6 +15717,7 @@ ${lines.join("\n\n")}`;
|
|
|
15710
15717
|
return { memoryByPath, checkedPaths, unreadablePaths, completed: true };
|
|
15711
15718
|
}
|
|
15712
15719
|
filterSearchResultsByRecallSafety(results, memoryByPath, options) {
|
|
15720
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
15713
15721
|
let lifecycleFilteredCount = 0;
|
|
15714
15722
|
let temporalSupersededFilteredCount = 0;
|
|
15715
15723
|
let biTemporalExpiredFilteredCount = 0;
|
|
@@ -15730,8 +15738,8 @@ ${lines.join("\n\n")}`;
|
|
|
15730
15738
|
continue;
|
|
15731
15739
|
}
|
|
15732
15740
|
if (options?.allowLifecycleFiltered !== true && shouldFilterLifecycleRecallCandidate(memory.frontmatter, {
|
|
15733
|
-
lifecyclePolicyEnabled:
|
|
15734
|
-
lifecycleFilterStaleEnabled:
|
|
15741
|
+
lifecyclePolicyEnabled: lifecycleCaps.lifecyclePolicy,
|
|
15742
|
+
lifecycleFilterStaleEnabled: lifecycleCaps.lifecycleFilterStale
|
|
15735
15743
|
})) {
|
|
15736
15744
|
lifecycleFilteredCount += 1;
|
|
15737
15745
|
continue;
|
|
@@ -15754,7 +15762,7 @@ ${lines.join("\n\n")}`;
|
|
|
15754
15762
|
// half-open `[valid_at, invalid_at)` evaluation in isValidAsOf
|
|
15755
15763
|
// is the authoritative gate for historical recall.
|
|
15756
15764
|
shouldFilterSupersededFromRecall(memory.frontmatter, {
|
|
15757
|
-
enabled:
|
|
15765
|
+
enabled: lifecycleCaps.temporalSupersession,
|
|
15758
15766
|
includeInRecall: this.config.temporalSupersessionIncludeInRecall
|
|
15759
15767
|
})
|
|
15760
15768
|
) {
|
|
@@ -15844,6 +15852,7 @@ ${lines.join("\n\n")}`;
|
|
|
15844
15852
|
* Returns re-ranked results.
|
|
15845
15853
|
*/
|
|
15846
15854
|
async boostSearchResults(results, _recallNamespaces, prompt, preloadedMemoryMap, options) {
|
|
15855
|
+
const lifecycleCaps = resolveMemoryLifecycleCapabilities(this.config);
|
|
15847
15856
|
if (results.length === 0) return results;
|
|
15848
15857
|
const safety = await this.filterSearchResultsForRecall(
|
|
15849
15858
|
results,
|
|
@@ -15977,7 +15986,7 @@ ${lines.join("\n\n")}`;
|
|
|
15977
15986
|
const lifecycleDelta = lifecycleRecallScoreAdjustment(
|
|
15978
15987
|
memory.frontmatter,
|
|
15979
15988
|
{
|
|
15980
|
-
lifecyclePolicyEnabled:
|
|
15989
|
+
lifecyclePolicyEnabled: lifecycleCaps.lifecyclePolicy
|
|
15981
15990
|
}
|
|
15982
15991
|
);
|
|
15983
15992
|
score += applyUtilityRankingRuntimeDelta(
|
|
@@ -16313,4 +16322,4 @@ export {
|
|
|
16313
16322
|
resolvePersistedMemoryRelativePath,
|
|
16314
16323
|
Orchestrator
|
|
16315
16324
|
};
|
|
16316
|
-
//# sourceMappingURL=chunk-
|
|
16325
|
+
//# sourceMappingURL=chunk-QNEUZIAH.js.map
|