@remnic/core 9.3.677 → 9.3.679
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/dist/schemas.d.ts +22 -22
- package/dist/transfer/types.d.ts +12 -12
- 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
package/dist/schemas.d.ts
CHANGED
|
@@ -275,12 +275,12 @@ declare const EntityMentionSchema: z.ZodObject<{
|
|
|
275
275
|
title: z.ZodString;
|
|
276
276
|
facts: z.ZodArray<z.ZodString, "many">;
|
|
277
277
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
key: string;
|
|
279
278
|
title: string;
|
|
279
|
+
key: string;
|
|
280
280
|
facts: string[];
|
|
281
281
|
}, {
|
|
282
|
-
key: string;
|
|
283
282
|
title: string;
|
|
283
|
+
key: string;
|
|
284
284
|
facts: string[];
|
|
285
285
|
}>, "many">>>;
|
|
286
286
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -288,8 +288,8 @@ declare const EntityMentionSchema: z.ZodObject<{
|
|
|
288
288
|
name: string;
|
|
289
289
|
facts: string[];
|
|
290
290
|
structuredSections?: {
|
|
291
|
-
key: string;
|
|
292
291
|
title: string;
|
|
292
|
+
key: string;
|
|
293
293
|
facts: string[];
|
|
294
294
|
}[] | null | undefined;
|
|
295
295
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -298,8 +298,8 @@ declare const EntityMentionSchema: z.ZodObject<{
|
|
|
298
298
|
name: string;
|
|
299
299
|
facts: string[];
|
|
300
300
|
structuredSections?: {
|
|
301
|
-
key: string;
|
|
302
301
|
title: string;
|
|
302
|
+
key: string;
|
|
303
303
|
facts: string[];
|
|
304
304
|
}[] | null | undefined;
|
|
305
305
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -584,12 +584,12 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
|
|
|
584
584
|
title: z.ZodString;
|
|
585
585
|
facts: z.ZodArray<z.ZodString, "many">;
|
|
586
586
|
}, "strip", z.ZodTypeAny, {
|
|
587
|
-
key: string;
|
|
588
587
|
title: string;
|
|
588
|
+
key: string;
|
|
589
589
|
facts: string[];
|
|
590
590
|
}, {
|
|
591
|
-
key: string;
|
|
592
591
|
title: string;
|
|
592
|
+
key: string;
|
|
593
593
|
facts: string[];
|
|
594
594
|
}>, "many">>>;
|
|
595
595
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -597,8 +597,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
|
|
|
597
597
|
name: string;
|
|
598
598
|
facts: string[];
|
|
599
599
|
structuredSections?: {
|
|
600
|
-
key: string;
|
|
601
600
|
title: string;
|
|
601
|
+
key: string;
|
|
602
602
|
facts: string[];
|
|
603
603
|
}[] | null | undefined;
|
|
604
604
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -607,8 +607,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
|
|
|
607
607
|
name: string;
|
|
608
608
|
facts: string[];
|
|
609
609
|
structuredSections?: {
|
|
610
|
-
key: string;
|
|
611
610
|
title: string;
|
|
611
|
+
key: string;
|
|
612
612
|
facts: string[];
|
|
613
613
|
}[] | null | undefined;
|
|
614
614
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -665,8 +665,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
|
|
|
665
665
|
name: string;
|
|
666
666
|
facts: string[];
|
|
667
667
|
structuredSections?: {
|
|
668
|
-
key: string;
|
|
669
668
|
title: string;
|
|
669
|
+
key: string;
|
|
670
670
|
facts: string[];
|
|
671
671
|
}[] | null | undefined;
|
|
672
672
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -714,8 +714,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
|
|
|
714
714
|
name: string;
|
|
715
715
|
facts: string[];
|
|
716
716
|
structuredSections?: {
|
|
717
|
-
key: string;
|
|
718
717
|
title: string;
|
|
718
|
+
key: string;
|
|
719
719
|
facts: string[];
|
|
720
720
|
}[] | null | undefined;
|
|
721
721
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -952,12 +952,12 @@ declare const ExtractionResultSchema: z.ZodObject<{
|
|
|
952
952
|
title: z.ZodString;
|
|
953
953
|
facts: z.ZodArray<z.ZodString, "many">;
|
|
954
954
|
}, "strip", z.ZodTypeAny, {
|
|
955
|
-
key: string;
|
|
956
955
|
title: string;
|
|
956
|
+
key: string;
|
|
957
957
|
facts: string[];
|
|
958
958
|
}, {
|
|
959
|
-
key: string;
|
|
960
959
|
title: string;
|
|
960
|
+
key: string;
|
|
961
961
|
facts: string[];
|
|
962
962
|
}>, "many">>>;
|
|
963
963
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -965,8 +965,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
|
|
|
965
965
|
name: string;
|
|
966
966
|
facts: string[];
|
|
967
967
|
structuredSections?: {
|
|
968
|
-
key: string;
|
|
969
968
|
title: string;
|
|
969
|
+
key: string;
|
|
970
970
|
facts: string[];
|
|
971
971
|
}[] | null | undefined;
|
|
972
972
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -975,8 +975,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
|
|
|
975
975
|
name: string;
|
|
976
976
|
facts: string[];
|
|
977
977
|
structuredSections?: {
|
|
978
|
-
key: string;
|
|
979
978
|
title: string;
|
|
979
|
+
key: string;
|
|
980
980
|
facts: string[];
|
|
981
981
|
}[] | null | undefined;
|
|
982
982
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1047,8 +1047,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
|
|
|
1047
1047
|
name: string;
|
|
1048
1048
|
facts: string[];
|
|
1049
1049
|
structuredSections?: {
|
|
1050
|
-
key: string;
|
|
1051
1050
|
title: string;
|
|
1051
|
+
key: string;
|
|
1052
1052
|
facts: string[];
|
|
1053
1053
|
}[] | null | undefined;
|
|
1054
1054
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1102,8 +1102,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
|
|
|
1102
1102
|
name: string;
|
|
1103
1103
|
facts: string[];
|
|
1104
1104
|
structuredSections?: {
|
|
1105
|
-
key: string;
|
|
1106
1105
|
title: string;
|
|
1106
|
+
key: string;
|
|
1107
1107
|
facts: string[];
|
|
1108
1108
|
}[] | null | undefined;
|
|
1109
1109
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1172,12 +1172,12 @@ declare const ConsolidationResultSchema: z.ZodObject<{
|
|
|
1172
1172
|
title: z.ZodString;
|
|
1173
1173
|
facts: z.ZodArray<z.ZodString, "many">;
|
|
1174
1174
|
}, "strip", z.ZodTypeAny, {
|
|
1175
|
-
key: string;
|
|
1176
1175
|
title: string;
|
|
1176
|
+
key: string;
|
|
1177
1177
|
facts: string[];
|
|
1178
1178
|
}, {
|
|
1179
|
-
key: string;
|
|
1180
1179
|
title: string;
|
|
1180
|
+
key: string;
|
|
1181
1181
|
facts: string[];
|
|
1182
1182
|
}>, "many">>>;
|
|
1183
1183
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1185,8 +1185,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
|
|
|
1185
1185
|
name: string;
|
|
1186
1186
|
facts: string[];
|
|
1187
1187
|
structuredSections?: {
|
|
1188
|
-
key: string;
|
|
1189
1188
|
title: string;
|
|
1189
|
+
key: string;
|
|
1190
1190
|
facts: string[];
|
|
1191
1191
|
}[] | null | undefined;
|
|
1192
1192
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1195,8 +1195,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
|
|
|
1195
1195
|
name: string;
|
|
1196
1196
|
facts: string[];
|
|
1197
1197
|
structuredSections?: {
|
|
1198
|
-
key: string;
|
|
1199
1198
|
title: string;
|
|
1199
|
+
key: string;
|
|
1200
1200
|
facts: string[];
|
|
1201
1201
|
}[] | null | undefined;
|
|
1202
1202
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1215,8 +1215,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
|
|
|
1215
1215
|
name: string;
|
|
1216
1216
|
facts: string[];
|
|
1217
1217
|
structuredSections?: {
|
|
1218
|
-
key: string;
|
|
1219
1218
|
title: string;
|
|
1219
|
+
key: string;
|
|
1220
1220
|
facts: string[];
|
|
1221
1221
|
}[] | null | undefined;
|
|
1222
1222
|
promptedByQuestion?: string | null | undefined;
|
|
@@ -1235,8 +1235,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
|
|
|
1235
1235
|
name: string;
|
|
1236
1236
|
facts: string[];
|
|
1237
1237
|
structuredSections?: {
|
|
1238
|
-
key: string;
|
|
1239
1238
|
title: string;
|
|
1239
|
+
key: string;
|
|
1240
1240
|
facts: string[];
|
|
1241
1241
|
}[] | null | undefined;
|
|
1242
1242
|
promptedByQuestion?: string | null | undefined;
|
package/dist/transfer/types.d.ts
CHANGED
|
@@ -313,13 +313,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
|
|
|
313
313
|
peerProfiles: boolean;
|
|
314
314
|
}>;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
+
schemaVersion: string;
|
|
316
317
|
includes: {
|
|
317
318
|
procedural: boolean;
|
|
318
319
|
taxonomy: boolean;
|
|
319
320
|
identityAnchors: boolean;
|
|
320
321
|
peerProfiles: boolean;
|
|
321
322
|
};
|
|
322
|
-
schemaVersion: string;
|
|
323
323
|
id: string;
|
|
324
324
|
description: string;
|
|
325
325
|
version: string;
|
|
@@ -334,13 +334,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
|
|
|
334
334
|
directAnswerEnabled: boolean;
|
|
335
335
|
};
|
|
336
336
|
}, {
|
|
337
|
+
schemaVersion: string;
|
|
337
338
|
includes: {
|
|
338
339
|
procedural: boolean;
|
|
339
340
|
taxonomy: boolean;
|
|
340
341
|
identityAnchors: boolean;
|
|
341
342
|
peerProfiles: boolean;
|
|
342
343
|
};
|
|
343
|
-
schemaVersion: string;
|
|
344
344
|
id: string;
|
|
345
345
|
description: string;
|
|
346
346
|
version: string;
|
|
@@ -464,13 +464,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
464
464
|
peerProfiles: boolean;
|
|
465
465
|
}>;
|
|
466
466
|
}, "strip", z.ZodTypeAny, {
|
|
467
|
+
schemaVersion: string;
|
|
467
468
|
includes: {
|
|
468
469
|
procedural: boolean;
|
|
469
470
|
taxonomy: boolean;
|
|
470
471
|
identityAnchors: boolean;
|
|
471
472
|
peerProfiles: boolean;
|
|
472
473
|
};
|
|
473
|
-
schemaVersion: string;
|
|
474
474
|
id: string;
|
|
475
475
|
description: string;
|
|
476
476
|
version: string;
|
|
@@ -485,13 +485,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
485
485
|
directAnswerEnabled: boolean;
|
|
486
486
|
};
|
|
487
487
|
}, {
|
|
488
|
+
schemaVersion: string;
|
|
488
489
|
includes: {
|
|
489
490
|
procedural: boolean;
|
|
490
491
|
taxonomy: boolean;
|
|
491
492
|
identityAnchors: boolean;
|
|
492
493
|
peerProfiles: boolean;
|
|
493
494
|
};
|
|
494
|
-
schemaVersion: string;
|
|
495
495
|
id: string;
|
|
496
496
|
description: string;
|
|
497
497
|
version: string;
|
|
@@ -518,13 +518,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
518
518
|
pluginVersion: string;
|
|
519
519
|
includesTranscripts: boolean;
|
|
520
520
|
capsule: {
|
|
521
|
+
schemaVersion: string;
|
|
521
522
|
includes: {
|
|
522
523
|
procedural: boolean;
|
|
523
524
|
taxonomy: boolean;
|
|
524
525
|
identityAnchors: boolean;
|
|
525
526
|
peerProfiles: boolean;
|
|
526
527
|
};
|
|
527
|
-
schemaVersion: string;
|
|
528
528
|
id: string;
|
|
529
529
|
description: string;
|
|
530
530
|
version: string;
|
|
@@ -551,13 +551,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
|
|
|
551
551
|
pluginVersion: string;
|
|
552
552
|
includesTranscripts: boolean;
|
|
553
553
|
capsule: {
|
|
554
|
+
schemaVersion: string;
|
|
554
555
|
includes: {
|
|
555
556
|
procedural: boolean;
|
|
556
557
|
taxonomy: boolean;
|
|
557
558
|
identityAnchors: boolean;
|
|
558
559
|
peerProfiles: boolean;
|
|
559
560
|
};
|
|
560
|
-
schemaVersion: string;
|
|
561
561
|
id: string;
|
|
562
562
|
description: string;
|
|
563
563
|
version: string;
|
|
@@ -683,13 +683,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
683
683
|
peerProfiles: boolean;
|
|
684
684
|
}>;
|
|
685
685
|
}, "strip", z.ZodTypeAny, {
|
|
686
|
+
schemaVersion: string;
|
|
686
687
|
includes: {
|
|
687
688
|
procedural: boolean;
|
|
688
689
|
taxonomy: boolean;
|
|
689
690
|
identityAnchors: boolean;
|
|
690
691
|
peerProfiles: boolean;
|
|
691
692
|
};
|
|
692
|
-
schemaVersion: string;
|
|
693
693
|
id: string;
|
|
694
694
|
description: string;
|
|
695
695
|
version: string;
|
|
@@ -704,13 +704,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
704
704
|
directAnswerEnabled: boolean;
|
|
705
705
|
};
|
|
706
706
|
}, {
|
|
707
|
+
schemaVersion: string;
|
|
707
708
|
includes: {
|
|
708
709
|
procedural: boolean;
|
|
709
710
|
taxonomy: boolean;
|
|
710
711
|
identityAnchors: boolean;
|
|
711
712
|
peerProfiles: boolean;
|
|
712
713
|
};
|
|
713
|
-
schemaVersion: string;
|
|
714
714
|
id: string;
|
|
715
715
|
description: string;
|
|
716
716
|
version: string;
|
|
@@ -737,13 +737,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
737
737
|
pluginVersion: string;
|
|
738
738
|
includesTranscripts: boolean;
|
|
739
739
|
capsule: {
|
|
740
|
+
schemaVersion: string;
|
|
740
741
|
includes: {
|
|
741
742
|
procedural: boolean;
|
|
742
743
|
taxonomy: boolean;
|
|
743
744
|
identityAnchors: boolean;
|
|
744
745
|
peerProfiles: boolean;
|
|
745
746
|
};
|
|
746
|
-
schemaVersion: string;
|
|
747
747
|
id: string;
|
|
748
748
|
description: string;
|
|
749
749
|
version: string;
|
|
@@ -770,13 +770,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
770
770
|
pluginVersion: string;
|
|
771
771
|
includesTranscripts: boolean;
|
|
772
772
|
capsule: {
|
|
773
|
+
schemaVersion: string;
|
|
773
774
|
includes: {
|
|
774
775
|
procedural: boolean;
|
|
775
776
|
taxonomy: boolean;
|
|
776
777
|
identityAnchors: boolean;
|
|
777
778
|
peerProfiles: boolean;
|
|
778
779
|
};
|
|
779
|
-
schemaVersion: string;
|
|
780
780
|
id: string;
|
|
781
781
|
description: string;
|
|
782
782
|
version: string;
|
|
@@ -815,13 +815,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
815
815
|
pluginVersion: string;
|
|
816
816
|
includesTranscripts: boolean;
|
|
817
817
|
capsule: {
|
|
818
|
+
schemaVersion: string;
|
|
818
819
|
includes: {
|
|
819
820
|
procedural: boolean;
|
|
820
821
|
taxonomy: boolean;
|
|
821
822
|
identityAnchors: boolean;
|
|
822
823
|
peerProfiles: boolean;
|
|
823
824
|
};
|
|
824
|
-
schemaVersion: string;
|
|
825
825
|
id: string;
|
|
826
826
|
description: string;
|
|
827
827
|
version: string;
|
|
@@ -854,13 +854,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
|
|
|
854
854
|
pluginVersion: string;
|
|
855
855
|
includesTranscripts: boolean;
|
|
856
856
|
capsule: {
|
|
857
|
+
schemaVersion: string;
|
|
857
858
|
includes: {
|
|
858
859
|
procedural: boolean;
|
|
859
860
|
taxonomy: boolean;
|
|
860
861
|
identityAnchors: boolean;
|
|
861
862
|
peerProfiles: boolean;
|
|
862
863
|
};
|
|
863
|
-
schemaVersion: string;
|
|
864
864
|
id: string;
|
|
865
865
|
description: string;
|
|
866
866
|
version: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.679",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -2921,7 +2921,7 @@
|
|
|
2921
2921
|
"core"
|
|
2922
2922
|
],
|
|
2923
2923
|
"peerDependencies": {
|
|
2924
|
-
"@remnic/coding-graph": "^9.3.
|
|
2924
|
+
"@remnic/coding-graph": "^9.3.679"
|
|
2925
2925
|
},
|
|
2926
2926
|
"peerDependenciesMeta": {
|
|
2927
2927
|
"@remnic/coding-graph": {
|
package/src/capabilities.test.ts
CHANGED
|
@@ -95,3 +95,176 @@ test("resolveCapabilities returns a frozen object", () => {
|
|
|
95
95
|
const caps = resolveCapabilities(parseConfig({}));
|
|
96
96
|
assert.equal(Object.isFrozen(caps), true, "CapabilitySet must be frozen");
|
|
97
97
|
});
|
|
98
|
+
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// GraphConstructionCapabilitySet — gate-parity tests (issue #1566 Cluster A).
|
|
101
|
+
//
|
|
102
|
+
// Same invariant as the recall CapabilitySet tests above: every caps field
|
|
103
|
+
// must project from its `<field>Enabled` config flag, so a future edit to
|
|
104
|
+
// `resolveGraphConstructionCapabilities` that maps a field to the wrong flag
|
|
105
|
+
// (or drops the `!== false` default for the optional session-adjacency flag)
|
|
106
|
+
// fails loudly here.
|
|
107
|
+
//
|
|
108
|
+
// Parity contract: a caps-resolved run and a config-derived run MUST produce
|
|
109
|
+
// identical boolean values for every gate — on AND off. These tests are the
|
|
110
|
+
// executable proof of that contract.
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
import {
|
|
114
|
+
resolveGraphConstructionCapabilities,
|
|
115
|
+
type GraphConstructionCapabilitySet,
|
|
116
|
+
} from "./capabilities.js";
|
|
117
|
+
|
|
118
|
+
const GRAPH_FIELD_TO_FLAG: Record<keyof GraphConstructionCapabilitySet, string> = {
|
|
119
|
+
entityGraph: "entityGraphEnabled",
|
|
120
|
+
timeGraph: "timeGraphEnabled",
|
|
121
|
+
causalGraph: "causalGraphEnabled",
|
|
122
|
+
multiGraphMemory: "multiGraphMemoryEnabled",
|
|
123
|
+
graphWriteSessionAdjacency: "graphWriteSessionAdjacencyEnabled",
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const GRAPH_FIELDS = Object.keys(GRAPH_FIELD_TO_FLAG) as Array<
|
|
127
|
+
keyof GraphConstructionCapabilitySet
|
|
128
|
+
>;
|
|
129
|
+
|
|
130
|
+
test("resolveGraphConstructionCapabilities projects every field from its flag (true variant)", () => {
|
|
131
|
+
const overrides: Record<string, boolean> = {};
|
|
132
|
+
for (const flag of Object.values(GRAPH_FIELD_TO_FLAG)) overrides[flag] = true;
|
|
133
|
+
const config = parseConfig(overrides);
|
|
134
|
+
const graphCaps = resolveGraphConstructionCapabilities(config);
|
|
135
|
+
|
|
136
|
+
for (const field of GRAPH_FIELDS) {
|
|
137
|
+
const flag = GRAPH_FIELD_TO_FLAG[field];
|
|
138
|
+
assert.equal(
|
|
139
|
+
graphCaps[field],
|
|
140
|
+
(config as unknown as Record<string, boolean>)[flag],
|
|
141
|
+
`graphCaps.${field} must equal config.${flag} (true variant)`,
|
|
142
|
+
);
|
|
143
|
+
assert.equal(graphCaps[field], true, `graphCaps.${field} should be true here`);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test("resolveGraphConstructionCapabilities projects every field from its flag (false variant)", () => {
|
|
148
|
+
const overrides: Record<string, boolean> = {};
|
|
149
|
+
for (const flag of Object.values(GRAPH_FIELD_TO_FLAG)) overrides[flag] = false;
|
|
150
|
+
const config = parseConfig(overrides);
|
|
151
|
+
const graphCaps = resolveGraphConstructionCapabilities(config);
|
|
152
|
+
|
|
153
|
+
for (const field of GRAPH_FIELDS) {
|
|
154
|
+
const flag = GRAPH_FIELD_TO_FLAG[field];
|
|
155
|
+
assert.equal(
|
|
156
|
+
graphCaps[field],
|
|
157
|
+
(config as unknown as Record<string, boolean>)[flag],
|
|
158
|
+
`graphCaps.${field} must equal config.${flag} (false variant)`,
|
|
159
|
+
);
|
|
160
|
+
assert.equal(graphCaps[field], false, `graphCaps.${field} should be false here`);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
test("resolveGraphConstructionCapabilities preserves graphWriteSessionAdjacency default-on when undefined", () => {
|
|
165
|
+
// graphWriteSessionAdjacencyEnabled is optional — `!== false` means
|
|
166
|
+
// default-ON. This is the exact semantics the migrated call site used
|
|
167
|
+
// (orchestrator.ts buildGraphEdge), and the parity test below verifies
|
|
168
|
+
// the caps resolver does not drift from it.
|
|
169
|
+
const config = parseConfig({});
|
|
170
|
+
const graphCaps = resolveGraphConstructionCapabilities(config);
|
|
171
|
+
|
|
172
|
+
assert.equal(
|
|
173
|
+
graphCaps.graphWriteSessionAdjacency,
|
|
174
|
+
config.graphWriteSessionAdjacencyEnabled !== false,
|
|
175
|
+
"graphWriteSessionAdjacency must be default-on unless explicitly false",
|
|
176
|
+
);
|
|
177
|
+
assert.equal(
|
|
178
|
+
graphCaps.graphWriteSessionAdjacency,
|
|
179
|
+
true,
|
|
180
|
+
"with no explicit override, graphWriteSessionAdjacency should be true",
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
// Explicit-false must propagate (not get swallowed by the default).
|
|
184
|
+
const disabled = parseConfig({ graphWriteSessionAdjacencyEnabled: false });
|
|
185
|
+
assert.equal(
|
|
186
|
+
resolveGraphConstructionCapabilities(disabled).graphWriteSessionAdjacency,
|
|
187
|
+
false,
|
|
188
|
+
"explicit false must disable graphWriteSessionAdjacency",
|
|
189
|
+
);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
test("resolveGraphConstructionCapabilities returns a frozen object", () => {
|
|
193
|
+
const graphCaps = resolveGraphConstructionCapabilities(parseConfig({}));
|
|
194
|
+
assert.equal(Object.isFrozen(graphCaps), true, "GraphConstructionCapabilitySet must be frozen");
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
test("resolveGraphConstructionCapabilities matches pre-migration config reads (parity contract)", () => {
|
|
198
|
+
// This is the core parity test: for EVERY combination of the 5 cluster-A
|
|
199
|
+
// flags, the caps-resolved values MUST be identical to what the old
|
|
200
|
+
// scattered `this.config.<flag>Enabled` reads would have produced.
|
|
201
|
+
//
|
|
202
|
+
// We exercise representative combinations rather than the full 2^5 space
|
|
203
|
+
// (32 cases) to keep the test cheap, but we cover:
|
|
204
|
+
// - all-off (the "no graphs" baseline)
|
|
205
|
+
// - all-on (the "full graph" mode)
|
|
206
|
+
// - only entity graph
|
|
207
|
+
// - multiGraph off but others on (the recall-without-write split)
|
|
208
|
+
// - session-adjacency undefined vs explicit-false
|
|
209
|
+
const cases: Record<string, Record<string, boolean | undefined>> = {
|
|
210
|
+
"all-off": {
|
|
211
|
+
entityGraphEnabled: false,
|
|
212
|
+
timeGraphEnabled: false,
|
|
213
|
+
causalGraphEnabled: false,
|
|
214
|
+
multiGraphMemoryEnabled: false,
|
|
215
|
+
graphWriteSessionAdjacencyEnabled: false,
|
|
216
|
+
},
|
|
217
|
+
"all-on": {
|
|
218
|
+
entityGraphEnabled: true,
|
|
219
|
+
timeGraphEnabled: true,
|
|
220
|
+
causalGraphEnabled: true,
|
|
221
|
+
multiGraphMemoryEnabled: true,
|
|
222
|
+
graphWriteSessionAdjacencyEnabled: true,
|
|
223
|
+
},
|
|
224
|
+
"entity-only": {
|
|
225
|
+
entityGraphEnabled: true,
|
|
226
|
+
timeGraphEnabled: false,
|
|
227
|
+
causalGraphEnabled: false,
|
|
228
|
+
multiGraphMemoryEnabled: true,
|
|
229
|
+
graphWriteSessionAdjacencyEnabled: true,
|
|
230
|
+
},
|
|
231
|
+
"multigraph-off": {
|
|
232
|
+
entityGraphEnabled: true,
|
|
233
|
+
timeGraphEnabled: true,
|
|
234
|
+
causalGraphEnabled: true,
|
|
235
|
+
multiGraphMemoryEnabled: false,
|
|
236
|
+
graphWriteSessionAdjacencyEnabled: true,
|
|
237
|
+
},
|
|
238
|
+
"session-adj-undefined": {
|
|
239
|
+
entityGraphEnabled: true,
|
|
240
|
+
timeGraphEnabled: true,
|
|
241
|
+
causalGraphEnabled: true,
|
|
242
|
+
multiGraphMemoryEnabled: true,
|
|
243
|
+
// graphWriteSessionAdjacencyEnabled deliberately omitted
|
|
244
|
+
},
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
for (const [label, overrides] of Object.entries(cases)) {
|
|
248
|
+
const config = parseConfig(overrides);
|
|
249
|
+
const graphCaps = resolveGraphConstructionCapabilities(config);
|
|
250
|
+
|
|
251
|
+
// Parity: each caps field must equal the pre-migration config read.
|
|
252
|
+
// entityGraph/timeGraph/causalGraph/multiGraphMemory used bare reads:
|
|
253
|
+
// config.entityGraphEnabled → graphCaps.entityGraph
|
|
254
|
+
// graphWriteSessionAdjacency used `!== false`:
|
|
255
|
+
// config.graphWriteSessionAdjacencyEnabled !== false → graphCaps.graphWriteSessionAdjacency
|
|
256
|
+
assert.equal(graphCaps.entityGraph, config.entityGraphEnabled, `[${label}] entityGraph parity`);
|
|
257
|
+
assert.equal(graphCaps.timeGraph, config.timeGraphEnabled, `[${label}] timeGraph parity`);
|
|
258
|
+
assert.equal(graphCaps.causalGraph, config.causalGraphEnabled, `[${label}] causalGraph parity`);
|
|
259
|
+
assert.equal(
|
|
260
|
+
graphCaps.multiGraphMemory,
|
|
261
|
+
config.multiGraphMemoryEnabled,
|
|
262
|
+
`[${label}] multiGraphMemory parity`,
|
|
263
|
+
);
|
|
264
|
+
assert.equal(
|
|
265
|
+
graphCaps.graphWriteSessionAdjacency,
|
|
266
|
+
config.graphWriteSessionAdjacencyEnabled !== false,
|
|
267
|
+
`[${label}] graphWriteSessionAdjacency parity (must match !== false)`,
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
});
|
package/src/capabilities.ts
CHANGED
|
@@ -84,3 +84,64 @@ export function resolveCapabilities(config: PluginConfig): CapabilitySet {
|
|
|
84
84
|
graphExpandedIntent: config.graphExpandedIntentEnabled === true,
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Graph-construction capability set (issue #1566 Cluster A).
|
|
90
|
+
//
|
|
91
|
+
// The recall CapabilitySet above covers flags whose EVERY read site lives on
|
|
92
|
+
// the recall call chain. The five flags below are read on graph-construction,
|
|
93
|
+
// write/extraction, AND recall paths — so they cannot join the recall set
|
|
94
|
+
// without leaving some sites on `caps.` and others on `config.` (the exact
|
|
95
|
+
// divergence #1523 forbade). They get their own projection, resolved at graph
|
|
96
|
+
// build/write entry (and alongside `caps` when recall reads them).
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Frozen projection of graph-construction feature gates.
|
|
101
|
+
*
|
|
102
|
+
* Every field is `readonly boolean`. Composition (including default-when-
|
|
103
|
+
* undefined semantics for the optional `graphWriteSessionAdjacencyEnabled`)
|
|
104
|
+
* lives ONLY in {@link resolveGraphConstructionCapabilities}.
|
|
105
|
+
*/
|
|
106
|
+
export interface GraphConstructionCapabilitySet {
|
|
107
|
+
/** `entityGraphEnabled` — maintain entity co-reference graph edges. */
|
|
108
|
+
readonly entityGraph: boolean;
|
|
109
|
+
/** `timeGraphEnabled` — maintain thread-adjacency graph edges. */
|
|
110
|
+
readonly timeGraph: boolean;
|
|
111
|
+
/** `causalGraphEnabled` — maintain causal-language graph edges. */
|
|
112
|
+
readonly causalGraph: boolean;
|
|
113
|
+
/** `multiGraphMemoryEnabled` — master switch for multi-graph writes/traversal. */
|
|
114
|
+
readonly multiGraphMemory: boolean;
|
|
115
|
+
/** `graphWriteSessionAdjacencyEnabled` — session-adjacency fallback for time edges (default-on). */
|
|
116
|
+
readonly graphWriteSessionAdjacency: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the {@link GraphConstructionCapabilitySet} from parsed config.
|
|
121
|
+
*
|
|
122
|
+
* Call this ONCE at graph build/write entry (extraction, recall graph
|
|
123
|
+
* expansion, graph-health/repair) and thread the result down — exactly the
|
|
124
|
+
* pattern {@link resolveCapabilities} established for recall.
|
|
125
|
+
*/
|
|
126
|
+
export type GraphConstructionConfigProjection = Pick<
|
|
127
|
+
PluginConfig,
|
|
128
|
+
| "entityGraphEnabled"
|
|
129
|
+
| "timeGraphEnabled"
|
|
130
|
+
| "causalGraphEnabled"
|
|
131
|
+
| "multiGraphMemoryEnabled"
|
|
132
|
+
| "graphWriteSessionAdjacencyEnabled"
|
|
133
|
+
>;
|
|
134
|
+
|
|
135
|
+
export function resolveGraphConstructionCapabilities(
|
|
136
|
+
config: GraphConstructionConfigProjection,
|
|
137
|
+
): GraphConstructionCapabilitySet {
|
|
138
|
+
return Object.freeze({
|
|
139
|
+
entityGraph: config.entityGraphEnabled,
|
|
140
|
+
timeGraph: config.timeGraphEnabled,
|
|
141
|
+
causalGraph: config.causalGraphEnabled,
|
|
142
|
+
multiGraphMemory: config.multiGraphMemoryEnabled,
|
|
143
|
+
// Optional flag: preserve the exact default-when-undefined semantics the
|
|
144
|
+
// migrated call site used (`!== false` = default-on).
|
|
145
|
+
graphWriteSessionAdjacency: config.graphWriteSessionAdjacencyEnabled !== false,
|
|
146
|
+
});
|
|
147
|
+
}
|
package/src/graph.ts
CHANGED
|
@@ -424,13 +424,29 @@ export class GraphIndex {
|
|
|
424
424
|
recentInThread?: string[];
|
|
425
425
|
entitySiblings?: string[];
|
|
426
426
|
causalPredecessor?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Optional frozen gate overrides (from GraphConstructionCapabilitySet).
|
|
429
|
+
* When provided, these take precedence over `this.cfg` so the caller's
|
|
430
|
+
* operation-scoped snapshot is the single source of truth (#1566).
|
|
431
|
+
*/
|
|
432
|
+
graphCapsOverride?: {
|
|
433
|
+
entityGraph: boolean;
|
|
434
|
+
timeGraph: boolean;
|
|
435
|
+
causalGraph: boolean;
|
|
436
|
+
multiGraphMemory: boolean;
|
|
437
|
+
};
|
|
427
438
|
}): Promise<void> {
|
|
428
|
-
|
|
439
|
+
const g = opts.graphCapsOverride;
|
|
440
|
+
const multiGraphOn = g ? g.multiGraphMemory : this.cfg.multiGraphMemoryEnabled;
|
|
441
|
+
if (!multiGraphOn) return;
|
|
442
|
+
const entityOn = g ? g.entityGraph : this.cfg.entityGraphEnabled;
|
|
443
|
+
const timeOn = g ? g.timeGraph : this.cfg.timeGraphEnabled;
|
|
444
|
+
const causalOn = g ? g.causalGraph : this.cfg.causalGraphEnabled;
|
|
429
445
|
const ts = new Date().toISOString();
|
|
430
446
|
|
|
431
447
|
try {
|
|
432
448
|
// Entity graph
|
|
433
|
-
if (
|
|
449
|
+
if (entityOn && opts.entityRef && opts.entitySiblings?.length) {
|
|
434
450
|
const siblings = opts.entitySiblings.slice(0, this.cfg.maxEntityGraphEdgesPerMemory);
|
|
435
451
|
for (const sibling of siblings) {
|
|
436
452
|
await appendEdge(this.memoryDir, {
|
|
@@ -445,7 +461,7 @@ export class GraphIndex {
|
|
|
445
461
|
}
|
|
446
462
|
|
|
447
463
|
// Time graph — link to most recent memory in same thread
|
|
448
|
-
if (
|
|
464
|
+
if (timeOn && opts.threadId && opts.recentInThread?.length) {
|
|
449
465
|
const predecessor = opts.recentInThread[opts.recentInThread.length - 1];
|
|
450
466
|
if (predecessor && predecessor !== opts.memoryPath) {
|
|
451
467
|
await appendEdge(this.memoryDir, {
|
|
@@ -460,7 +476,7 @@ export class GraphIndex {
|
|
|
460
476
|
}
|
|
461
477
|
|
|
462
478
|
// Causal graph
|
|
463
|
-
if (
|
|
479
|
+
if (causalOn && opts.causalPredecessor) {
|
|
464
480
|
const phrase = detectCausalPhrase(opts.content);
|
|
465
481
|
if (phrase) {
|
|
466
482
|
await appendEdge(this.memoryDir, {
|