@remnic/core 9.3.677 → 9.3.678
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 +7 -7
- package/dist/access-http.js +6 -6
- package/dist/access-mcp.js +5 -5
- package/dist/access-service.js +4 -4
- package/dist/capabilities.d.ts +29 -1
- package/dist/capabilities.js +5 -3
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.js +2 -2
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.js +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-7UTCHQTB.js → chunk-2AP4QJX5.js} +3 -3
- package/dist/{chunk-Y56J7CXW.js → chunk-2LDBXPLB.js} +10 -5
- package/dist/chunk-2LDBXPLB.js.map +1 -0
- package/dist/{chunk-CZMLLVU2.js → chunk-4PPMUNV5.js} +3 -3
- package/dist/{chunk-YEQBJXVO.js → chunk-7AAKSHDG.js} +37 -22
- package/dist/chunk-7AAKSHDG.js.map +1 -0
- package/dist/{chunk-RP64QP7G.js → chunk-K2JYO6QV.js} +3 -3
- package/dist/{chunk-RI5XBIZ6.js → chunk-PBH4JUAB.js} +14 -2
- package/dist/{chunk-RI5XBIZ6.js.map → chunk-PBH4JUAB.js.map} +1 -1
- package/dist/{chunk-Z56KDLDK.js → chunk-PCGCQTU6.js} +7 -7
- package/dist/{chunk-B6IUW76R.js → chunk-Q2H5U37U.js} +1 -1
- package/dist/{chunk-WXGTC424.js → chunk-RC3AFF6Z.js} +1 -1
- package/dist/{chunk-HQCGRSRU.js → chunk-SECQS4G4.js} +2 -2
- package/dist/{chunk-2DKXY243.js → chunk-UNZLU2MX.js} +3 -3
- package/dist/{chunk-NE566K4E.js → chunk-YXWAILM4.js} +2 -2
- package/dist/cli.js +8 -8
- package/dist/compounding/engine.js +1 -1
- package/dist/{graph-edge-decay-PUFNHOBS.js → graph-edge-decay-KSVJGCZW.js} +2 -2
- package/dist/graph-snapshot.js +2 -2
- package/dist/graph.d.ts +11 -0
- package/dist/graph.js +1 -1
- package/dist/index.js +11 -11
- package/dist/operator-toolkit.js +2 -2
- package/dist/orchestrator.js +5 -5
- package/package.json +2 -2
- package/src/capabilities.test.ts +173 -0
- package/src/capabilities.ts +61 -0
- package/src/graph.ts +20 -4
- package/src/orchestrator.ts +35 -11
- package/dist/chunk-Y56J7CXW.js.map +0 -1
- package/dist/chunk-YEQBJXVO.js.map +0 -1
- /package/dist/{chunk-7UTCHQTB.js.map → chunk-2AP4QJX5.js.map} +0 -0
- /package/dist/{chunk-CZMLLVU2.js.map → chunk-4PPMUNV5.js.map} +0 -0
- /package/dist/{chunk-RP64QP7G.js.map → chunk-K2JYO6QV.js.map} +0 -0
- /package/dist/{chunk-Z56KDLDK.js.map → chunk-PCGCQTU6.js.map} +0 -0
- /package/dist/{chunk-B6IUW76R.js.map → chunk-Q2H5U37U.js.map} +0 -0
- /package/dist/{chunk-WXGTC424.js.map → chunk-RC3AFF6Z.js.map} +0 -0
- /package/dist/{chunk-HQCGRSRU.js.map → chunk-SECQS4G4.js.map} +0 -0
- /package/dist/{chunk-2DKXY243.js.map → chunk-UNZLU2MX.js.map} +0 -0
- /package/dist/{chunk-NE566K4E.js.map → chunk-YXWAILM4.js.map} +0 -0
- /package/dist/{graph-edge-decay-PUFNHOBS.js.map → graph-edge-decay-KSVJGCZW.js.map} +0 -0
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
CompoundingEngine,
|
|
28
28
|
defaultTierMigrationCycleBudget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-Q2H5U37U.js";
|
|
30
30
|
import {
|
|
31
31
|
SharedContextManager
|
|
32
32
|
} from "./chunk-DRD2Q7HQ.js";
|
|
@@ -274,8 +274,9 @@ import {
|
|
|
274
274
|
gatewayTaskChainOptions
|
|
275
275
|
} from "./chunk-LCC5EZTT.js";
|
|
276
276
|
import {
|
|
277
|
-
resolveCapabilities
|
|
278
|
-
|
|
277
|
+
resolveCapabilities,
|
|
278
|
+
resolveGraphConstructionCapabilities
|
|
279
|
+
} from "./chunk-PBH4JUAB.js";
|
|
279
280
|
import {
|
|
280
281
|
compileCorrectionRule,
|
|
281
282
|
correctionsFilePath,
|
|
@@ -356,7 +357,7 @@ import {
|
|
|
356
357
|
} from "./chunk-GKKAXVAJ.js";
|
|
357
358
|
import {
|
|
358
359
|
GraphIndex
|
|
359
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-2LDBXPLB.js";
|
|
360
361
|
import {
|
|
361
362
|
buildChainFollowupGenerator
|
|
362
363
|
} from "./chunk-ATRB6Q25.js";
|
|
@@ -408,7 +409,7 @@ import {
|
|
|
408
409
|
} from "./chunk-FVQJYWH7.js";
|
|
409
410
|
import {
|
|
410
411
|
searchCausalTrajectories
|
|
411
|
-
} from "./chunk-
|
|
412
|
+
} from "./chunk-RC3AFF6Z.js";
|
|
412
413
|
import {
|
|
413
414
|
canReadNamespace,
|
|
414
415
|
defaultNamespaceForPrincipal,
|
|
@@ -7162,6 +7163,7 @@ ${r.snippet.trim()}
|
|
|
7162
7163
|
}
|
|
7163
7164
|
async recall(prompt, sessionKey, options = {}) {
|
|
7164
7165
|
const caps = resolveCapabilities(this.config);
|
|
7166
|
+
const graphCaps = resolveGraphConstructionCapabilities(this.config);
|
|
7165
7167
|
const abortController = new AbortController();
|
|
7166
7168
|
const onAbort = () => {
|
|
7167
7169
|
abortController.abort();
|
|
@@ -7216,7 +7218,7 @@ ${r.snippet.trim()}
|
|
|
7216
7218
|
const recallPromise = this.recallInternal(prompt, sessionKey, {
|
|
7217
7219
|
...options,
|
|
7218
7220
|
abortSignal: abortController.signal
|
|
7219
|
-
}, caps);
|
|
7221
|
+
}, caps, graphCaps);
|
|
7220
7222
|
const RECALL_TIMEOUT_MS = this.config.recallOuterTimeoutMs ?? 75e3;
|
|
7221
7223
|
if (RECALL_TIMEOUT_MS <= 0) {
|
|
7222
7224
|
return await recallPromise;
|
|
@@ -8274,7 +8276,7 @@ ${r.snippet.trim()}
|
|
|
8274
8276
|
recallAssemblyClockMs() {
|
|
8275
8277
|
return Date.now();
|
|
8276
8278
|
}
|
|
8277
|
-
async recallInternal(prompt, sessionKey, options = {}, caps = resolveCapabilities(this.config)) {
|
|
8279
|
+
async recallInternal(prompt, sessionKey, options = {}, caps = resolveCapabilities(this.config), graphCaps = resolveGraphConstructionCapabilities(this.config)) {
|
|
8278
8280
|
const recallStart = Date.now();
|
|
8279
8281
|
const backendDegradations = [];
|
|
8280
8282
|
let asOfMs;
|
|
@@ -8372,7 +8374,7 @@ ${r.snippet.trim()}
|
|
|
8372
8374
|
const recallModeDecisionOptions = {
|
|
8373
8375
|
plannerEnabled: caps.recallPlanner,
|
|
8374
8376
|
graphRecallEnabled: caps.graphRecall,
|
|
8375
|
-
multiGraphMemoryEnabled:
|
|
8377
|
+
multiGraphMemoryEnabled: graphCaps.multiGraphMemory,
|
|
8376
8378
|
graphExpandedIntentEnabled: caps.graphExpandedIntent,
|
|
8377
8379
|
prompt
|
|
8378
8380
|
};
|
|
@@ -8510,7 +8512,7 @@ ${r.snippet.trim()}
|
|
|
8510
8512
|
shadowMode: graphDecisionShadowMode,
|
|
8511
8513
|
qmdAvailable,
|
|
8512
8514
|
graphRecallEnabled: caps.graphRecall,
|
|
8513
|
-
multiGraphMemoryEnabled:
|
|
8515
|
+
multiGraphMemoryEnabled: graphCaps.multiGraphMemory
|
|
8514
8516
|
}
|
|
8515
8517
|
});
|
|
8516
8518
|
if (recallMode === "no_recall") {
|
|
@@ -11004,7 +11006,7 @@ ${tmtNode.summary}`
|
|
|
11004
11006
|
memoryResults = memoryResults.filter(
|
|
11005
11007
|
(r) => !isArtifactMemoryPath(r.path)
|
|
11006
11008
|
);
|
|
11007
|
-
const isFullModeGraphAssist =
|
|
11009
|
+
const isFullModeGraphAssist = graphCaps.multiGraphMemory && caps.graphAssistInFullMode && recallMode === "full" && memoryResults.length >= Math.max(1, this.config.graphAssistMinSeedResults ?? 3);
|
|
11008
11010
|
const shouldRunGraphExpansion = recallMode === "graph_mode" || isFullModeGraphAssist;
|
|
11009
11011
|
const graphShadowEvalEnabled = isFullModeGraphAssist && this.config.graphAssistShadowEvalEnabled === true;
|
|
11010
11012
|
if (shouldRunGraphExpansion) {
|
|
@@ -11334,6 +11336,7 @@ ${tmtNode.summary}`
|
|
|
11334
11336
|
recallResultLimit,
|
|
11335
11337
|
recallMode,
|
|
11336
11338
|
caps,
|
|
11339
|
+
graphCaps,
|
|
11337
11340
|
queryAwarePrefilter,
|
|
11338
11341
|
abortSignal: options.abortSignal,
|
|
11339
11342
|
onDegradation: (degradation) => {
|
|
@@ -11507,6 +11510,7 @@ ${tmtNode.summary}`
|
|
|
11507
11510
|
recallResultLimit,
|
|
11508
11511
|
recallMode,
|
|
11509
11512
|
caps,
|
|
11513
|
+
graphCaps,
|
|
11510
11514
|
queryAwarePrefilter,
|
|
11511
11515
|
abortSignal: options.abortSignal,
|
|
11512
11516
|
onDegradation: (degradation) => {
|
|
@@ -11608,6 +11612,7 @@ ${tmtNode.summary}`
|
|
|
11608
11612
|
recallResultLimit,
|
|
11609
11613
|
recallMode,
|
|
11610
11614
|
caps,
|
|
11615
|
+
graphCaps,
|
|
11611
11616
|
queryAwarePrefilter,
|
|
11612
11617
|
abortSignal: options.abortSignal,
|
|
11613
11618
|
onDegradation: (degradation) => {
|
|
@@ -11653,6 +11658,7 @@ ${tmtNode.summary}`
|
|
|
11653
11658
|
recallResultLimit,
|
|
11654
11659
|
recallMode,
|
|
11655
11660
|
caps,
|
|
11661
|
+
graphCaps,
|
|
11656
11662
|
queryAwarePrefilter,
|
|
11657
11663
|
abortSignal: options.abortSignal,
|
|
11658
11664
|
onDegradation: (degradation) => {
|
|
@@ -13286,7 +13292,7 @@ ${normalized}`).digest("hex");
|
|
|
13286
13292
|
}
|
|
13287
13293
|
}
|
|
13288
13294
|
}
|
|
13289
|
-
async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan) {
|
|
13295
|
+
async persistExtraction(result, storage, threadIdForExtraction, sourceContext, baseNamespace, scopeProfileWritePlan, graphCaps = resolveGraphConstructionCapabilities(this.config)) {
|
|
13290
13296
|
const citationEnabled = this.config.inlineSourceAttributionEnabled === true;
|
|
13291
13297
|
const citationTemplate = this.config.inlineSourceAttributionFormat;
|
|
13292
13298
|
const citationContextBase = citationEnabled ? {
|
|
@@ -13633,7 +13639,7 @@ ${normalized}`).digest("hex");
|
|
|
13633
13639
|
allMemsForGraph: null,
|
|
13634
13640
|
memoryPathById: /* @__PURE__ */ new Map()
|
|
13635
13641
|
};
|
|
13636
|
-
if (
|
|
13642
|
+
if (graphCaps.multiGraphMemory) {
|
|
13637
13643
|
try {
|
|
13638
13644
|
created.allMemsForGraph = await targetStorage.readAllMemories();
|
|
13639
13645
|
for (const [id, relPath] of buildMemoryPathById(
|
|
@@ -13649,7 +13655,7 @@ ${normalized}`).digest("hex");
|
|
|
13649
13655
|
return created;
|
|
13650
13656
|
};
|
|
13651
13657
|
let threadEpisodeIdsForGraph;
|
|
13652
|
-
if (
|
|
13658
|
+
if (graphCaps.multiGraphMemory && threadIdForExtraction) {
|
|
13653
13659
|
try {
|
|
13654
13660
|
const thread = await this.threading.loadThread(threadIdForExtraction);
|
|
13655
13661
|
threadEpisodeIdsForGraph = thread?.episodeIds ? [...thread.episodeIds] : [];
|
|
@@ -14147,7 +14153,7 @@ ${normalized}`).digest("hex");
|
|
|
14147
14153
|
intentEntityTypes: inferredIntent?.entityTypes
|
|
14148
14154
|
});
|
|
14149
14155
|
}
|
|
14150
|
-
if (
|
|
14156
|
+
if (graphCaps.multiGraphMemory) {
|
|
14151
14157
|
try {
|
|
14152
14158
|
const graphContext = await ensureGraphContext(targetStorage);
|
|
14153
14159
|
const entityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
|
|
@@ -14176,7 +14182,8 @@ ${normalized}`).digest("hex");
|
|
|
14176
14182
|
graphContext.memoryPathById,
|
|
14177
14183
|
threadIdForExtraction ?? void 0,
|
|
14178
14184
|
threadEpisodeIdsForGraph,
|
|
14179
|
-
graphContext.previousPersistedRelPath
|
|
14185
|
+
graphContext.previousPersistedRelPath,
|
|
14186
|
+
graphCaps
|
|
14180
14187
|
);
|
|
14181
14188
|
graphContext.previousPersistedRelPath = parentRelPath;
|
|
14182
14189
|
} catch {
|
|
@@ -14285,7 +14292,7 @@ ${normalized}`).digest("hex");
|
|
|
14285
14292
|
validAt: sourceContext?.validAt,
|
|
14286
14293
|
source: extractionWriteSource
|
|
14287
14294
|
});
|
|
14288
|
-
if (
|
|
14295
|
+
if (graphCaps.multiGraphMemory) {
|
|
14289
14296
|
try {
|
|
14290
14297
|
const graphContext = await ensureGraphContext(targetStorage);
|
|
14291
14298
|
const entityRef = typeof fact.entityRef === "string" ? fact.entityRef : void 0;
|
|
@@ -14314,7 +14321,8 @@ ${normalized}`).digest("hex");
|
|
|
14314
14321
|
graphContext.memoryPathById,
|
|
14315
14322
|
threadIdForExtraction ?? void 0,
|
|
14316
14323
|
threadEpisodeIdsForGraph,
|
|
14317
|
-
graphContext.previousPersistedRelPath
|
|
14324
|
+
graphContext.previousPersistedRelPath,
|
|
14325
|
+
graphCaps
|
|
14318
14326
|
);
|
|
14319
14327
|
graphContext.previousPersistedRelPath = memoryRelPath;
|
|
14320
14328
|
} catch {
|
|
@@ -14486,7 +14494,7 @@ ${normalized}`).digest("hex");
|
|
|
14486
14494
|
* Shared helper used by both the chunked and non-chunked write paths to avoid duplication.
|
|
14487
14495
|
* Fail-open: caller wraps in try/catch.
|
|
14488
14496
|
*/
|
|
14489
|
-
async buildGraphEdge(storage, memoryRelPath, entityRef, memoryId, factContent, allMemsForGraph, memoryPathById, threadIdForEdge, threadEpisodeIdsForGraph, fallbackCausalPredecessor) {
|
|
14497
|
+
async buildGraphEdge(storage, memoryRelPath, entityRef, memoryId, factContent, allMemsForGraph, memoryPathById, threadIdForEdge, threadEpisodeIdsForGraph, fallbackCausalPredecessor, graphCaps = resolveGraphConstructionCapabilities(this.config)) {
|
|
14490
14498
|
const entitySiblings = [];
|
|
14491
14499
|
if (entityRef) {
|
|
14492
14500
|
try {
|
|
@@ -14516,7 +14524,7 @@ ${normalized}`).digest("hex");
|
|
|
14516
14524
|
} catch {
|
|
14517
14525
|
}
|
|
14518
14526
|
}
|
|
14519
|
-
if (recentInThread.length === 0 &&
|
|
14527
|
+
if (recentInThread.length === 0 && graphCaps.graphWriteSessionAdjacency && fallbackCausalPredecessor && fallbackCausalPredecessor !== memoryRelPath) {
|
|
14520
14528
|
recentInThread.push(fallbackCausalPredecessor);
|
|
14521
14529
|
}
|
|
14522
14530
|
const causalPredecessor = recentInThread[recentInThread.length - 1] ?? fallbackCausalPredecessor;
|
|
@@ -14528,7 +14536,13 @@ ${normalized}`).digest("hex");
|
|
|
14528
14536
|
threadId: threadIdForEdge,
|
|
14529
14537
|
recentInThread,
|
|
14530
14538
|
entitySiblings,
|
|
14531
|
-
causalPredecessor
|
|
14539
|
+
causalPredecessor,
|
|
14540
|
+
graphCapsOverride: {
|
|
14541
|
+
entityGraph: graphCaps.entityGraph,
|
|
14542
|
+
timeGraph: graphCaps.timeGraph,
|
|
14543
|
+
causalGraph: graphCaps.causalGraph,
|
|
14544
|
+
multiGraphMemory: graphCaps.multiGraphMemory
|
|
14545
|
+
}
|
|
14532
14546
|
});
|
|
14533
14547
|
}
|
|
14534
14548
|
graphIndexFor(storage) {
|
|
@@ -16367,6 +16381,7 @@ ${lines.join("\n\n")}`;
|
|
|
16367
16381
|
}
|
|
16368
16382
|
async applyColdFallbackPipeline(options) {
|
|
16369
16383
|
const caps = options.caps ?? resolveCapabilities(this.config);
|
|
16384
|
+
const graphCaps = options.graphCaps ?? resolveGraphConstructionCapabilities(this.config);
|
|
16370
16385
|
if (options.queryAwarePrefilter?.candidatePaths?.size === 0) {
|
|
16371
16386
|
if (options.xrayPoolSizeSink) options.xrayPoolSizeSink.size = 0;
|
|
16372
16387
|
return [];
|
|
@@ -16540,7 +16555,7 @@ ${lines.join("\n\n")}`;
|
|
|
16540
16555
|
}
|
|
16541
16556
|
results = results.filter((r) => !isArtifactMemoryPath(r.path));
|
|
16542
16557
|
if (results.length === 0) return [];
|
|
16543
|
-
const isFullModeGraphAssist = this.config.qmdTierParityGraphEnabled &&
|
|
16558
|
+
const isFullModeGraphAssist = this.config.qmdTierParityGraphEnabled && graphCaps.multiGraphMemory && caps.graphAssistInFullMode && options.recallMode === "full" && results.length >= Math.max(1, this.config.graphAssistMinSeedResults ?? 3);
|
|
16544
16559
|
const shouldRunGraphExpansion = this.config.qmdTierParityGraphEnabled && (options.recallMode === "graph_mode" || isFullModeGraphAssist);
|
|
16545
16560
|
if (shouldRunGraphExpansion) {
|
|
16546
16561
|
const { merged } = await this.expandResultsViaGraph({
|
|
@@ -17397,4 +17412,4 @@ export {
|
|
|
17397
17412
|
resolvePersistedMemoryRelativePath,
|
|
17398
17413
|
Orchestrator
|
|
17399
17414
|
};
|
|
17400
|
-
//# sourceMappingURL=chunk-
|
|
17415
|
+
//# sourceMappingURL=chunk-7AAKSHDG.js.map
|