@remnic/core 9.3.737 → 9.3.739
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.d.ts +6 -6
- package/dist/access-boundary.js +10 -10
- package/dist/access-cli.js +26 -26
- package/dist/access-http.d.ts +6 -6
- package/dist/access-http.js +15 -15
- package/dist/access-mcp.d.ts +6 -6
- package/dist/access-mcp.js +14 -14
- package/dist/access-operations-batch.js +12 -12
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-operations.js +13 -13
- package/dist/{access-service-DwQ6BIQw.d.ts → access-service-Cbk-Kv_A.d.ts} +1 -1
- package/dist/access-service.d.ts +6 -6
- package/dist/access-service.js +9 -9
- package/dist/access-surface-catalog.d.ts +6 -6
- package/dist/active-memory-bridge.js +3 -3
- package/dist/bootstrap.d.ts +5 -5
- package/dist/buffer.js +2 -1
- package/dist/capabilities.d.ts +98 -1
- package/dist/capabilities.js +7 -1
- package/dist/{chunk-G54IDCD3.js → chunk-23PLOBWT.js} +30 -27
- package/dist/chunk-23PLOBWT.js.map +1 -0
- package/dist/{chunk-K3Y2SJTN.js → chunk-56LP72AD.js} +6 -6
- package/dist/{chunk-ZBZ4XULO.js → chunk-66RZ4EIT.js} +3 -3
- package/dist/{chunk-IPI45Q4S.js → chunk-75PDC7VT.js} +9 -8
- package/dist/chunk-75PDC7VT.js.map +1 -0
- package/dist/{chunk-GB2FZOWB.js → chunk-7B7IPPN5.js} +5 -5
- package/dist/{chunk-QNTLWH3T.js → chunk-A7INTIC5.js} +3 -3
- package/dist/{chunk-FLPKEMSO.js → chunk-AKKFHN3I.js} +2 -2
- package/dist/{chunk-AAIHDIMD.js → chunk-BHJAMSVC.js} +7 -7
- package/dist/{chunk-BXPG5AVX.js → chunk-BHQQVUEQ.js} +6 -6
- package/dist/{chunk-HFXZIF3V.js → chunk-BVG2IZOB.js} +3 -3
- package/dist/{chunk-NDKW67ER.js → chunk-C53JDEH3.js} +4 -4
- package/dist/{chunk-AESC5OQJ.js → chunk-CKHPUOAP.js} +2 -2
- package/dist/{chunk-OYHYBHHI.js → chunk-DS3FZ7GS.js} +4 -4
- package/dist/{chunk-UO6MPN77.js → chunk-EU543UDC.js} +10 -9
- package/dist/chunk-EU543UDC.js.map +1 -0
- package/dist/{chunk-PB5YON2G.js → chunk-IEWUPZ75.js} +659 -584
- package/dist/chunk-IEWUPZ75.js.map +1 -0
- package/dist/{chunk-E4LYJ7PY.js → chunk-IFCM6OLK.js} +6 -6
- package/dist/{chunk-5BOQNB2K.js → chunk-JQSP7YBJ.js} +3 -3
- package/dist/{chunk-2T2N7ISV.js → chunk-L3TYGUTH.js} +3 -3
- package/dist/{chunk-AB2E5DCN.js → chunk-MAU7DFCJ.js} +2 -2
- package/dist/{chunk-P6VLG7KE.js → chunk-N2O23WYA.js} +2 -2
- package/dist/{chunk-HYNHLBKA.js → chunk-OQQRWPFZ.js} +5 -2
- package/dist/chunk-OQQRWPFZ.js.map +1 -0
- package/dist/{chunk-IXGXALRV.js → chunk-QTJOORGN.js} +2 -2
- package/dist/{chunk-JWDE7OVJ.js → chunk-RJBW4EOU.js} +46 -2
- package/dist/{chunk-JWDE7OVJ.js.map → chunk-RJBW4EOU.js.map} +1 -1
- package/dist/{chunk-AE7NTZ75.js → chunk-TNLXCSXV.js} +3 -3
- package/dist/{chunk-NNJKEAP2.js → chunk-VRBBZH4U.js} +4 -4
- package/dist/{chunk-VOEVVIP3.js → chunk-W2FBVBQ4.js} +4 -4
- package/dist/{chunk-WNGXQMRI.js → chunk-WFNH4UDF.js} +5 -2
- package/dist/chunk-WFNH4UDF.js.map +1 -0
- package/dist/{chunk-CHJIWG2H.js → chunk-WVAEIKUY.js} +2 -2
- package/dist/{chunk-FF36YNKY.js → chunk-XIQAOGAA.js} +11 -10
- package/dist/chunk-XIQAOGAA.js.map +1 -0
- package/dist/{chunk-HLPYL6LC.js → chunk-Y5OOHER4.js} +14 -12
- package/dist/chunk-Y5OOHER4.js.map +1 -0
- package/dist/{chunk-GYICIICQ.js → chunk-YF2MMBKA.js} +9 -7
- package/dist/chunk-YF2MMBKA.js.map +1 -0
- package/dist/{chunk-IX4L7E5G.js → chunk-YXOXAQ5Y.js} +2 -2
- package/dist/{cli-BlEIWDQw.d.ts → cli-BQW2xKdb.d.ts} +2 -2
- package/dist/cli.d.ts +7 -7
- package/dist/cli.js +21 -21
- package/dist/compounding/engine.js +2 -2
- package/dist/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-2B4AE4TI.js → contradiction-scan-CWO3LIWV.js} +3 -3
- package/dist/embedding-fallback.js +2 -2
- package/dist/entity-retrieval.js +2 -2
- package/dist/explicit-capture.d.ts +5 -5
- package/dist/explicit-capture.js +2 -2
- package/dist/extraction.js +3 -3
- package/dist/{first-start-migration-2RQYDIZ7.js → first-start-migration-5DXD3TF2.js} +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +32 -32
- package/dist/local-llm.js +2 -2
- package/dist/mcp-memory-inspector-app.d.ts +6 -6
- package/dist/namespaces/migrate.js +6 -6
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.js +2 -2
- package/dist/operator-toolkit.js +11 -11
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.js +6 -6
- package/dist/{orchestrator-CJZ21ZiB.d.ts → orchestrator-BOAFN_Yr.d.ts} +186 -56
- package/dist/orchestrator.d.ts +4 -4
- package/dist/orchestrator.js +21 -21
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.js +3 -3
- package/dist/search/index.js +3 -3
- package/dist/summarizer.js +3 -3
- package/dist/{tier-stats-KPDIISG7.js → tier-stats-QID73BBB.js} +2 -2
- package/package.json +2 -2
- package/src/access-service.ts +7 -8
- package/src/buffer.ts +2 -1
- package/src/capabilities.test.ts +137 -0
- package/src/capabilities.ts +209 -0
- package/src/cli/creation-ledger-commands.ts +3 -3
- package/src/cli/research-status-commands.ts +4 -4
- package/src/cli.ts +9 -10
- package/src/compounding/engine.ts +7 -7
- package/src/correction/correction-access-wiring.ts +3 -2
- package/src/extraction.ts +8 -10
- package/src/operator-toolkit.ts +6 -7
- package/src/orchestration/conversation-index-coordinator.ts +344 -0
- package/src/orchestration/entity-synthesis-coordinator.ts +2 -1
- package/src/orchestration/maintenance.ts +5 -7
- package/src/orchestration/recall-rerank-coordinator.ts +425 -0
- package/src/orchestration/semantic-consolidation-coordinator.ts +2 -2
- package/src/orchestrator.ts +88 -602
- package/dist/chunk-FF36YNKY.js.map +0 -1
- package/dist/chunk-G54IDCD3.js.map +0 -1
- package/dist/chunk-GYICIICQ.js.map +0 -1
- package/dist/chunk-HLPYL6LC.js.map +0 -1
- package/dist/chunk-HYNHLBKA.js.map +0 -1
- package/dist/chunk-IPI45Q4S.js.map +0 -1
- package/dist/chunk-PB5YON2G.js.map +0 -1
- package/dist/chunk-UO6MPN77.js.map +0 -1
- package/dist/chunk-WNGXQMRI.js.map +0 -1
- /package/dist/{chunk-K3Y2SJTN.js.map → chunk-56LP72AD.js.map} +0 -0
- /package/dist/{chunk-ZBZ4XULO.js.map → chunk-66RZ4EIT.js.map} +0 -0
- /package/dist/{chunk-GB2FZOWB.js.map → chunk-7B7IPPN5.js.map} +0 -0
- /package/dist/{chunk-QNTLWH3T.js.map → chunk-A7INTIC5.js.map} +0 -0
- /package/dist/{chunk-FLPKEMSO.js.map → chunk-AKKFHN3I.js.map} +0 -0
- /package/dist/{chunk-AAIHDIMD.js.map → chunk-BHJAMSVC.js.map} +0 -0
- /package/dist/{chunk-BXPG5AVX.js.map → chunk-BHQQVUEQ.js.map} +0 -0
- /package/dist/{chunk-HFXZIF3V.js.map → chunk-BVG2IZOB.js.map} +0 -0
- /package/dist/{chunk-NDKW67ER.js.map → chunk-C53JDEH3.js.map} +0 -0
- /package/dist/{chunk-AESC5OQJ.js.map → chunk-CKHPUOAP.js.map} +0 -0
- /package/dist/{chunk-OYHYBHHI.js.map → chunk-DS3FZ7GS.js.map} +0 -0
- /package/dist/{chunk-E4LYJ7PY.js.map → chunk-IFCM6OLK.js.map} +0 -0
- /package/dist/{chunk-5BOQNB2K.js.map → chunk-JQSP7YBJ.js.map} +0 -0
- /package/dist/{chunk-2T2N7ISV.js.map → chunk-L3TYGUTH.js.map} +0 -0
- /package/dist/{chunk-AB2E5DCN.js.map → chunk-MAU7DFCJ.js.map} +0 -0
- /package/dist/{chunk-P6VLG7KE.js.map → chunk-N2O23WYA.js.map} +0 -0
- /package/dist/{chunk-IXGXALRV.js.map → chunk-QTJOORGN.js.map} +0 -0
- /package/dist/{chunk-AE7NTZ75.js.map → chunk-TNLXCSXV.js.map} +0 -0
- /package/dist/{chunk-NNJKEAP2.js.map → chunk-VRBBZH4U.js.map} +0 -0
- /package/dist/{chunk-VOEVVIP3.js.map → chunk-W2FBVBQ4.js.map} +0 -0
- /package/dist/{chunk-CHJIWG2H.js.map → chunk-WVAEIKUY.js.map} +0 -0
- /package/dist/{chunk-IX4L7E5G.js.map → chunk-YXOXAQ5Y.js.map} +0 -0
- /package/dist/{contradiction-scan-2B4AE4TI.js.map → contradiction-scan-CWO3LIWV.js.map} +0 -0
- /package/dist/{first-start-migration-2RQYDIZ7.js.map → first-start-migration-5DXD3TF2.js.map} +0 -0
- /package/dist/{tier-stats-KPDIISG7.js.map → tier-stats-QID73BBB.js.map} +0 -0
package/src/capabilities.test.ts
CHANGED
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
resolveUtilityLearningCapabilities,
|
|
15
15
|
resolveObjectiveStateCapabilities,
|
|
16
16
|
resolveCompressionCapabilities,
|
|
17
|
+
resolvePresentationCapabilities,
|
|
18
|
+
resolveConsolidationCapabilities,
|
|
19
|
+
resolveRecallAuxiliaryCapabilities,
|
|
17
20
|
type CapabilitySet,
|
|
18
21
|
type AccessSetupCapabilitySet,
|
|
19
22
|
type NamespaceCapabilitySet,
|
|
@@ -25,6 +28,9 @@ import {
|
|
|
25
28
|
type UtilityLearningCapabilitySet,
|
|
26
29
|
type ObjectiveStateCapabilitySet,
|
|
27
30
|
type CompressionCapabilitySet,
|
|
31
|
+
type PresentationCapabilitySet,
|
|
32
|
+
type ConsolidationCapabilitySet,
|
|
33
|
+
type RecallAuxiliaryCapabilitySet,
|
|
28
34
|
} from "./capabilities.js";
|
|
29
35
|
|
|
30
36
|
/**
|
|
@@ -1021,3 +1027,134 @@ test("resolveCompressionCapabilities returns a frozen object", () => {
|
|
|
1021
1027
|
const caps = resolveCompressionCapabilities(parseConfig({}));
|
|
1022
1028
|
assert.equal(Object.isFrozen(caps), true, "CompressionCapabilitySet must be frozen");
|
|
1023
1029
|
});
|
|
1030
|
+
|
|
1031
|
+
// ---------------------------------------------------------------------------
|
|
1032
|
+
// PresentationCapabilitySet — gate-parity tests (issue #1523 batch 8).
|
|
1033
|
+
// ---------------------------------------------------------------------------
|
|
1034
|
+
|
|
1035
|
+
const PRESENTATION_FIELD_TO_FLAG: Record<keyof PresentationCapabilitySet, string> = {
|
|
1036
|
+
verbatimArtifacts: "verbatimArtifactsEnabled",
|
|
1037
|
+
memoryBoxes: "memoryBoxesEnabled",
|
|
1038
|
+
bufferSurpriseTrigger: "bufferSurpriseTriggerEnabled",
|
|
1039
|
+
threading: "threadingEnabled",
|
|
1040
|
+
episodeNoteMode: "episodeNoteModeEnabled",
|
|
1041
|
+
transcript: "transcriptEnabled",
|
|
1042
|
+
entitySummary: "entitySummaryEnabled",
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
const PRESENTATION_FIELDS = Object.keys(PRESENTATION_FIELD_TO_FLAG) as Array<keyof PresentationCapabilitySet>;
|
|
1046
|
+
|
|
1047
|
+
test("resolvePresentationCapabilities projects every field from its flag (true variant)", () => {
|
|
1048
|
+
const overrides: Record<string, boolean> = {};
|
|
1049
|
+
for (const flag of Object.values(PRESENTATION_FIELD_TO_FLAG)) overrides[flag] = true;
|
|
1050
|
+
const config = parseConfig(overrides);
|
|
1051
|
+
const caps = resolvePresentationCapabilities(config);
|
|
1052
|
+
for (const field of PRESENTATION_FIELDS) {
|
|
1053
|
+
assert.equal(caps[field], true, `${field} must be true`);
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
test("resolvePresentationCapabilities projects every field from its flag (false variant)", () => {
|
|
1058
|
+
const overrides: Record<string, boolean> = {};
|
|
1059
|
+
for (const flag of Object.values(PRESENTATION_FIELD_TO_FLAG)) overrides[flag] = false;
|
|
1060
|
+
const config = parseConfig(overrides);
|
|
1061
|
+
const caps = resolvePresentationCapabilities(config);
|
|
1062
|
+
for (const field of PRESENTATION_FIELDS) {
|
|
1063
|
+
assert.equal(caps[field], false, `${field} must be false`);
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
test("resolvePresentationCapabilities returns a frozen object", () => {
|
|
1068
|
+
const caps = resolvePresentationCapabilities(parseConfig({}));
|
|
1069
|
+
assert.equal(Object.isFrozen(caps), true, "PresentationCapabilitySet must be frozen");
|
|
1070
|
+
});
|
|
1071
|
+
|
|
1072
|
+
// ---------------------------------------------------------------------------
|
|
1073
|
+
// ConsolidationCapabilitySet — gate-parity tests (issue #1523 batch 8).
|
|
1074
|
+
// ---------------------------------------------------------------------------
|
|
1075
|
+
|
|
1076
|
+
const CONSOLIDATION_FIELD_TO_FLAG: Record<keyof ConsolidationCapabilitySet, string> = {
|
|
1077
|
+
compoundingSemantic: "compoundingSemanticEnabled",
|
|
1078
|
+
abstractionAnchors: "abstractionAnchorsEnabled",
|
|
1079
|
+
compounding: "compoundingEnabled",
|
|
1080
|
+
calibration: "calibrationEnabled",
|
|
1081
|
+
semanticConsolidation: "semanticConsolidationEnabled",
|
|
1082
|
+
patternReinforcement: "patternReinforcementEnabled",
|
|
1083
|
+
continuityAudit: "continuityAuditEnabled",
|
|
1084
|
+
graphEdgeDecay: "graphEdgeDecayEnabled",
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
const CONSOLIDATION_FIELDS = Object.keys(CONSOLIDATION_FIELD_TO_FLAG) as Array<keyof ConsolidationCapabilitySet>;
|
|
1088
|
+
|
|
1089
|
+
test("resolveConsolidationCapabilities projects every field from its flag (true variant)", () => {
|
|
1090
|
+
const overrides: Record<string, boolean> = {};
|
|
1091
|
+
for (const flag of Object.values(CONSOLIDATION_FIELD_TO_FLAG)) overrides[flag] = true;
|
|
1092
|
+
const config = parseConfig(overrides);
|
|
1093
|
+
const caps = resolveConsolidationCapabilities(config);
|
|
1094
|
+
for (const field of CONSOLIDATION_FIELDS) {
|
|
1095
|
+
assert.equal(caps[field], true, `${field} must be true`);
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1099
|
+
test("resolveConsolidationCapabilities projects every field from its flag (false variant)", () => {
|
|
1100
|
+
const overrides: Record<string, boolean> = {};
|
|
1101
|
+
for (const flag of Object.values(CONSOLIDATION_FIELD_TO_FLAG)) overrides[flag] = false;
|
|
1102
|
+
const config = parseConfig(overrides);
|
|
1103
|
+
const caps = resolveConsolidationCapabilities(config);
|
|
1104
|
+
for (const field of CONSOLIDATION_FIELDS) {
|
|
1105
|
+
assert.equal(caps[field], false, `${field} must be false`);
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
test("resolveConsolidationCapabilities returns a frozen object", () => {
|
|
1110
|
+
const caps = resolveConsolidationCapabilities(parseConfig({}));
|
|
1111
|
+
assert.equal(Object.isFrozen(caps), true, "ConsolidationCapabilitySet must be frozen");
|
|
1112
|
+
});
|
|
1113
|
+
|
|
1114
|
+
// ---------------------------------------------------------------------------
|
|
1115
|
+
// RecallAuxiliaryCapabilitySet — gate-parity tests (issue #1523 batch 8).
|
|
1116
|
+
// ---------------------------------------------------------------------------
|
|
1117
|
+
|
|
1118
|
+
const RECALL_AUX_FIELD_TO_FLAG: Record<keyof RecallAuxiliaryCapabilitySet, string> = {
|
|
1119
|
+
causalRuleExtraction: "causalRuleExtractionEnabled",
|
|
1120
|
+
correction: "correctionEnabled",
|
|
1121
|
+
continuityIncidentLogging: "continuityIncidentLoggingEnabled",
|
|
1122
|
+
daySummary: "daySummaryEnabled",
|
|
1123
|
+
versioning: "versioningEnabled",
|
|
1124
|
+
verifiedRecall: "verifiedRecallEnabled",
|
|
1125
|
+
semanticRuleVerification: "semanticRuleVerificationEnabled",
|
|
1126
|
+
workProductRecall: "workProductRecallEnabled",
|
|
1127
|
+
secureStore: "secureStoreEnabled",
|
|
1128
|
+
knowledgeIndex: "knowledgeIndexEnabled",
|
|
1129
|
+
factDeduplication: "factDeduplicationEnabled",
|
|
1130
|
+
compactionReset: "compactionResetEnabled",
|
|
1131
|
+
entityRetrieval: "entityRetrievalEnabled",
|
|
1132
|
+
cronRecallPolicy: "cronRecallPolicyEnabled",
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
const RECALL_AUX_FIELDS = Object.keys(RECALL_AUX_FIELD_TO_FLAG) as Array<keyof RecallAuxiliaryCapabilitySet>;
|
|
1136
|
+
|
|
1137
|
+
test("resolveRecallAuxiliaryCapabilities projects every field from its flag (true variant)", () => {
|
|
1138
|
+
const overrides: Record<string, boolean> = {};
|
|
1139
|
+
for (const flag of Object.values(RECALL_AUX_FIELD_TO_FLAG)) overrides[flag] = true;
|
|
1140
|
+
const config = parseConfig(overrides);
|
|
1141
|
+
const caps = resolveRecallAuxiliaryCapabilities(config);
|
|
1142
|
+
for (const field of RECALL_AUX_FIELDS) {
|
|
1143
|
+
assert.equal(caps[field], true, `${field} must be true`);
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
test("resolveRecallAuxiliaryCapabilities projects every field from its flag (false variant)", () => {
|
|
1148
|
+
const overrides: Record<string, boolean> = {};
|
|
1149
|
+
for (const flag of Object.values(RECALL_AUX_FIELD_TO_FLAG)) overrides[flag] = false;
|
|
1150
|
+
const config = parseConfig(overrides);
|
|
1151
|
+
const caps = resolveRecallAuxiliaryCapabilities(config);
|
|
1152
|
+
for (const field of RECALL_AUX_FIELDS) {
|
|
1153
|
+
assert.equal(caps[field], false, `${field} must be false`);
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
|
|
1157
|
+
test("resolveRecallAuxiliaryCapabilities returns a frozen object", () => {
|
|
1158
|
+
const caps = resolveRecallAuxiliaryCapabilities(parseConfig({}));
|
|
1159
|
+
assert.equal(Object.isFrozen(caps), true, "RecallAuxiliaryCapabilitySet must be frozen");
|
|
1160
|
+
});
|
package/src/capabilities.ts
CHANGED
|
@@ -807,3 +807,212 @@ export function resolveCompressionCapabilities(config: CompressionConfigProjecti
|
|
|
807
807
|
contextCompressionActions: config.contextCompressionActionsEnabled,
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
|
+
|
|
811
|
+
// ---------------------------------------------------------------------------
|
|
812
|
+
// Presentation capability set (issue #1523 batch 8).
|
|
813
|
+
//
|
|
814
|
+
// These flags gate output formatting and presentation across the orchestrator, extraction
|
|
815
|
+
// pipeline, consolidation engine, and related modules. Resolved ONCE per
|
|
816
|
+
// operation entry rather than re-derived from raw config at each read site.
|
|
817
|
+
// All flags are non-optional booleans on PluginConfig (defaults applied at
|
|
818
|
+
// the parse boundary), so the projection is a pure pass-through.
|
|
819
|
+
// ---------------------------------------------------------------------------
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Frozen projection of output formatting and presentation feature gates (issue #1523 batch 8).
|
|
823
|
+
*/
|
|
824
|
+
export interface PresentationCapabilitySet {
|
|
825
|
+
/** `verbatimArtifactsEnabled` — verbatim-artifact rendering in recall output. */
|
|
826
|
+
readonly verbatimArtifacts: boolean;
|
|
827
|
+
/** `memoryBoxesEnabled` — memory-box rendering in recall output. */
|
|
828
|
+
readonly memoryBoxes: boolean;
|
|
829
|
+
/** `bufferSurpriseTriggerEnabled` — buffer surprise-detection trigger. */
|
|
830
|
+
readonly bufferSurpriseTrigger: boolean;
|
|
831
|
+
/** `threadingEnabled` — conversation threading in output. */
|
|
832
|
+
readonly threading: boolean;
|
|
833
|
+
/** `episodeNoteModeEnabled` — episode note-mode formatting. */
|
|
834
|
+
readonly episodeNoteMode: boolean;
|
|
835
|
+
/** `transcriptEnabled` — transcript-mode output. */
|
|
836
|
+
readonly transcript: boolean;
|
|
837
|
+
/** `entitySummaryEnabled` — entity summary generation. */
|
|
838
|
+
readonly entitySummary: boolean;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* Config projection consumed by {@link resolvePresentationCapabilities}.
|
|
843
|
+
*/
|
|
844
|
+
export type PresentationConfigProjection = Pick<
|
|
845
|
+
PluginConfig,
|
|
846
|
+
"verbatimArtifactsEnabled" |
|
|
847
|
+
"memoryBoxesEnabled" |
|
|
848
|
+
"bufferSurpriseTriggerEnabled" |
|
|
849
|
+
"threadingEnabled" |
|
|
850
|
+
"episodeNoteModeEnabled" |
|
|
851
|
+
"transcriptEnabled" |
|
|
852
|
+
"entitySummaryEnabled"
|
|
853
|
+
>;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Resolve the {@link PresentationCapabilitySet} from parsed config.
|
|
857
|
+
*/
|
|
858
|
+
export function resolvePresentationCapabilities(config: PresentationConfigProjection): PresentationCapabilitySet {
|
|
859
|
+
return Object.freeze({
|
|
860
|
+
verbatimArtifacts: config.verbatimArtifactsEnabled,
|
|
861
|
+
memoryBoxes: config.memoryBoxesEnabled,
|
|
862
|
+
bufferSurpriseTrigger: config.bufferSurpriseTriggerEnabled,
|
|
863
|
+
threading: config.threadingEnabled,
|
|
864
|
+
episodeNoteMode: config.episodeNoteModeEnabled,
|
|
865
|
+
transcript: config.transcriptEnabled,
|
|
866
|
+
entitySummary: config.entitySummaryEnabled,
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// ---------------------------------------------------------------------------
|
|
871
|
+
// Consolidation capability set (issue #1523 batch 8).
|
|
872
|
+
//
|
|
873
|
+
// These flags gate memory consolidation, compounding, and abstraction across the orchestrator, extraction
|
|
874
|
+
// pipeline, consolidation engine, and related modules. Resolved ONCE per
|
|
875
|
+
// operation entry rather than re-derived from raw config at each read site.
|
|
876
|
+
// All flags are non-optional booleans on PluginConfig (defaults applied at
|
|
877
|
+
// the parse boundary), so the projection is a pure pass-through.
|
|
878
|
+
// ---------------------------------------------------------------------------
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Frozen projection of memory consolidation, compounding, and abstraction feature gates (issue #1523 batch 8).
|
|
882
|
+
*/
|
|
883
|
+
export interface ConsolidationCapabilitySet {
|
|
884
|
+
/** `compoundingSemanticEnabled` — semantic compounding of memories. */
|
|
885
|
+
readonly compoundingSemantic: boolean;
|
|
886
|
+
/** `abstractionAnchorsEnabled` — abstraction-anchor extraction. */
|
|
887
|
+
readonly abstractionAnchors: boolean;
|
|
888
|
+
/** `compoundingEnabled` — master compounding switch. */
|
|
889
|
+
readonly compounding: boolean;
|
|
890
|
+
/** `calibrationEnabled` — memory calibration pass. */
|
|
891
|
+
readonly calibration: boolean;
|
|
892
|
+
/** `semanticConsolidationEnabled` — semantic consolidation pass. */
|
|
893
|
+
readonly semanticConsolidation: boolean;
|
|
894
|
+
/** `patternReinforcementEnabled` — pattern reinforcement in consolidation. */
|
|
895
|
+
readonly patternReinforcement: boolean;
|
|
896
|
+
/** `continuityAuditEnabled` — continuity audit during consolidation. */
|
|
897
|
+
readonly continuityAudit: boolean;
|
|
898
|
+
/** `graphEdgeDecayEnabled` — graph edge decay in maintenance. */
|
|
899
|
+
readonly graphEdgeDecay: boolean;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Config projection consumed by {@link resolveConsolidationCapabilities}.
|
|
904
|
+
*/
|
|
905
|
+
export type ConsolidationConfigProjection = Pick<
|
|
906
|
+
PluginConfig,
|
|
907
|
+
"compoundingSemanticEnabled" |
|
|
908
|
+
"abstractionAnchorsEnabled" |
|
|
909
|
+
"compoundingEnabled" |
|
|
910
|
+
"calibrationEnabled" |
|
|
911
|
+
"semanticConsolidationEnabled" |
|
|
912
|
+
"patternReinforcementEnabled" |
|
|
913
|
+
"continuityAuditEnabled" |
|
|
914
|
+
"graphEdgeDecayEnabled"
|
|
915
|
+
>;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Resolve the {@link ConsolidationCapabilitySet} from parsed config.
|
|
919
|
+
*/
|
|
920
|
+
export function resolveConsolidationCapabilities(config: ConsolidationConfigProjection): ConsolidationCapabilitySet {
|
|
921
|
+
return Object.freeze({
|
|
922
|
+
compoundingSemantic: config.compoundingSemanticEnabled,
|
|
923
|
+
abstractionAnchors: config.abstractionAnchorsEnabled,
|
|
924
|
+
compounding: config.compoundingEnabled,
|
|
925
|
+
calibration: config.calibrationEnabled,
|
|
926
|
+
semanticConsolidation: config.semanticConsolidationEnabled,
|
|
927
|
+
patternReinforcement: config.patternReinforcementEnabled,
|
|
928
|
+
continuityAudit: config.continuityAuditEnabled,
|
|
929
|
+
graphEdgeDecay: config.graphEdgeDecayEnabled,
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// ---------------------------------------------------------------------------
|
|
934
|
+
// RecallAuxiliary capability set (issue #1523 batch 8).
|
|
935
|
+
//
|
|
936
|
+
// These flags gate extraction pipeline details and auxiliary recall enrichment across the orchestrator, extraction
|
|
937
|
+
// pipeline, consolidation engine, and related modules. Resolved ONCE per
|
|
938
|
+
// operation entry rather than re-derived from raw config at each read site.
|
|
939
|
+
// All flags are non-optional booleans on PluginConfig (defaults applied at
|
|
940
|
+
// the parse boundary), so the projection is a pure pass-through.
|
|
941
|
+
// ---------------------------------------------------------------------------
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Frozen projection of extraction pipeline details and auxiliary recall enrichment feature gates (issue #1523 batch 8).
|
|
945
|
+
*/
|
|
946
|
+
export interface RecallAuxiliaryCapabilitySet {
|
|
947
|
+
/** `causalRuleExtractionEnabled` — causal-rule extraction in pipeline. */
|
|
948
|
+
readonly causalRuleExtraction: boolean;
|
|
949
|
+
/** `correctionEnabled` — memory correction subsystem. */
|
|
950
|
+
readonly correction: boolean;
|
|
951
|
+
/** `continuityIncidentLoggingEnabled` — continuity incident logging. */
|
|
952
|
+
readonly continuityIncidentLogging: boolean;
|
|
953
|
+
/** `daySummaryEnabled` — day-summary generation. */
|
|
954
|
+
readonly daySummary: boolean;
|
|
955
|
+
/** `versioningEnabled` — memory versioning. */
|
|
956
|
+
readonly versioning: boolean;
|
|
957
|
+
/** `verifiedRecallEnabled` — verified-recall tier. */
|
|
958
|
+
readonly verifiedRecall: boolean;
|
|
959
|
+
/** `semanticRuleVerificationEnabled` — semantic-rule verification. */
|
|
960
|
+
readonly semanticRuleVerification: boolean;
|
|
961
|
+
/** `workProductRecallEnabled` — work-product recall tier. */
|
|
962
|
+
readonly workProductRecall: boolean;
|
|
963
|
+
/** `secureStoreEnabled` — secure storage mode. */
|
|
964
|
+
readonly secureStore: boolean;
|
|
965
|
+
/** `knowledgeIndexEnabled` — knowledge index in recall. */
|
|
966
|
+
readonly knowledgeIndex: boolean;
|
|
967
|
+
/** `factDeduplicationEnabled` — fact deduplication in recall. */
|
|
968
|
+
readonly factDeduplication: boolean;
|
|
969
|
+
/** `compactionResetEnabled` — compaction reset on re-ingest. */
|
|
970
|
+
readonly compactionReset: boolean;
|
|
971
|
+
/** `entityRetrievalEnabled` — entity retrieval tier. */
|
|
972
|
+
readonly entityRetrieval: boolean;
|
|
973
|
+
/** `cronRecallPolicyEnabled` — cron-based recall policy. */
|
|
974
|
+
readonly cronRecallPolicy: boolean;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Config projection consumed by {@link resolveRecallAuxiliaryCapabilities}.
|
|
979
|
+
*/
|
|
980
|
+
export type RecallAuxiliaryConfigProjection = Pick<
|
|
981
|
+
PluginConfig,
|
|
982
|
+
"causalRuleExtractionEnabled" |
|
|
983
|
+
"correctionEnabled" |
|
|
984
|
+
"continuityIncidentLoggingEnabled" |
|
|
985
|
+
"daySummaryEnabled" |
|
|
986
|
+
"versioningEnabled" |
|
|
987
|
+
"verifiedRecallEnabled" |
|
|
988
|
+
"semanticRuleVerificationEnabled" |
|
|
989
|
+
"workProductRecallEnabled" |
|
|
990
|
+
"secureStoreEnabled" |
|
|
991
|
+
"knowledgeIndexEnabled" |
|
|
992
|
+
"factDeduplicationEnabled" |
|
|
993
|
+
"compactionResetEnabled" |
|
|
994
|
+
"entityRetrievalEnabled" |
|
|
995
|
+
"cronRecallPolicyEnabled"
|
|
996
|
+
>;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Resolve the {@link RecallAuxiliaryCapabilitySet} from parsed config.
|
|
1000
|
+
*/
|
|
1001
|
+
export function resolveRecallAuxiliaryCapabilities(config: RecallAuxiliaryConfigProjection): RecallAuxiliaryCapabilitySet {
|
|
1002
|
+
return Object.freeze({
|
|
1003
|
+
causalRuleExtraction: config.causalRuleExtractionEnabled,
|
|
1004
|
+
correction: config.correctionEnabled,
|
|
1005
|
+
continuityIncidentLogging: config.continuityIncidentLoggingEnabled,
|
|
1006
|
+
daySummary: config.daySummaryEnabled,
|
|
1007
|
+
versioning: config.versioningEnabled,
|
|
1008
|
+
verifiedRecall: config.verifiedRecallEnabled,
|
|
1009
|
+
semanticRuleVerification: config.semanticRuleVerificationEnabled,
|
|
1010
|
+
workProductRecall: config.workProductRecallEnabled,
|
|
1011
|
+
secureStore: config.secureStoreEnabled,
|
|
1012
|
+
knowledgeIndex: config.knowledgeIndexEnabled,
|
|
1013
|
+
factDeduplication: config.factDeduplicationEnabled,
|
|
1014
|
+
compactionReset: config.compactionResetEnabled,
|
|
1015
|
+
entityRetrieval: config.entityRetrievalEnabled,
|
|
1016
|
+
cronRecallPolicy: config.cronRecallPolicyEnabled,
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
@@ -20,7 +20,7 @@ import type { CliCommand } from "../cli.js";
|
|
|
20
20
|
import type { CommitmentLedgerEntry } from "../commitment-ledger.js";
|
|
21
21
|
import type { WorkProductLedgerEntry } from "../work-product-ledger.js";
|
|
22
22
|
import type { ResumeBundle } from "../resume-bundles.js";
|
|
23
|
-
import { resolveCreationMemoryCapabilities, resolveObjectiveStateCapabilities} from "../capabilities.js";
|
|
23
|
+
import { resolveCreationMemoryCapabilities, resolveObjectiveStateCapabilities, resolvePresentationCapabilities, resolveRecallAuxiliaryCapabilities } from "../capabilities.js";
|
|
24
24
|
import {
|
|
25
25
|
runResumeBundleStatusCliCommand,
|
|
26
26
|
runResumeBundleRecordCliCommand,
|
|
@@ -130,7 +130,7 @@ cmd
|
|
|
130
130
|
commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
|
|
131
131
|
creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
|
|
132
132
|
resumeBundlesEnabled: resolveCreationMemoryCapabilities(orchestrator.config).resumeBundles,
|
|
133
|
-
transcriptEnabled: orchestrator.config.
|
|
133
|
+
transcriptEnabled: resolvePresentationCapabilities(orchestrator.config).transcript,
|
|
134
134
|
objectiveStateMemoryEnabled: resolveObjectiveStateCapabilities(orchestrator.config).objectiveStateMemory,
|
|
135
135
|
commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
|
|
136
136
|
bundleId: String(options.bundleId ?? ""),
|
|
@@ -336,7 +336,7 @@ cmd
|
|
|
336
336
|
memoryDir: orchestrator.config.memoryDir,
|
|
337
337
|
workProductLedgerDir: orchestrator.config.workProductLedgerDir,
|
|
338
338
|
creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
|
|
339
|
-
workProductRecallEnabled: orchestrator.config.
|
|
339
|
+
workProductRecallEnabled: resolveRecallAuxiliaryCapabilities(orchestrator.config).workProductRecall,
|
|
340
340
|
query,
|
|
341
341
|
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
342
342
|
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : undefined,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import type { Orchestrator } from "../orchestrator.js";
|
|
21
|
-
import { resolveCapabilities, resolveSecurityCapabilities, resolveUtilityLearningCapabilities, resolveObjectiveStateCapabilities} from "../capabilities.js";
|
|
21
|
+
import { resolveCapabilities, resolveSecurityCapabilities, resolveUtilityLearningCapabilities, resolveObjectiveStateCapabilities, resolveConsolidationCapabilities } from "../capabilities.js";
|
|
22
22
|
import type { CliCommand } from "../cli.js";
|
|
23
23
|
import type { UtilityTelemetryEvent } from "../utility-telemetry.js";
|
|
24
24
|
import {
|
|
@@ -116,7 +116,7 @@ cmd
|
|
|
116
116
|
memoryDir: orchestrator.config.memoryDir,
|
|
117
117
|
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
118
118
|
harmonicRetrievalEnabled: caps.harmonicRetrieval,
|
|
119
|
-
abstractionAnchorsEnabled: orchestrator.config.
|
|
119
|
+
abstractionAnchorsEnabled: resolveConsolidationCapabilities(orchestrator.config).abstractionAnchors,
|
|
120
120
|
});
|
|
121
121
|
console.log(JSON.stringify(status, null, 2));
|
|
122
122
|
console.log("OK");
|
|
@@ -130,7 +130,7 @@ cmd
|
|
|
130
130
|
memoryDir: orchestrator.config.memoryDir,
|
|
131
131
|
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
132
132
|
harmonicRetrievalEnabled: caps.harmonicRetrieval,
|
|
133
|
-
abstractionAnchorsEnabled: orchestrator.config.
|
|
133
|
+
abstractionAnchorsEnabled: resolveConsolidationCapabilities(orchestrator.config).abstractionAnchors,
|
|
134
134
|
});
|
|
135
135
|
console.log(JSON.stringify(status, null, 2));
|
|
136
136
|
console.log("OK");
|
|
@@ -152,7 +152,7 @@ cmd
|
|
|
152
152
|
memoryDir: orchestrator.config.memoryDir,
|
|
153
153
|
abstractionNodeStoreDir: orchestrator.config.abstractionNodeStoreDir,
|
|
154
154
|
harmonicRetrievalEnabled: caps.harmonicRetrieval,
|
|
155
|
-
abstractionAnchorsEnabled: orchestrator.config.
|
|
155
|
+
abstractionAnchorsEnabled: resolveConsolidationCapabilities(orchestrator.config).abstractionAnchors,
|
|
156
156
|
query,
|
|
157
157
|
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
158
158
|
sessionKey: typeof options.sessionKey === "string" ? options.sessionKey : undefined,
|
package/src/cli.ts
CHANGED
|
@@ -4,11 +4,10 @@ import { access, lstat, readFile, readdir, realpath, unlink } from "node:fs/prom
|
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import type { Readable, Writable } from "node:stream";
|
|
6
6
|
import type { Orchestrator } from "./orchestrator.js";
|
|
7
|
-
import {
|
|
8
|
-
resolveNamespaceCapabilities,
|
|
7
|
+
import { resolveNamespaceCapabilities,
|
|
9
8
|
resolveMemoryLifecycleCapabilities,
|
|
10
9
|
resolveIdentityContinuityCapabilities,
|
|
11
|
-
resolveSecurityCapabilities, resolveEvalCapabilities} from "./capabilities.js";
|
|
10
|
+
resolveSecurityCapabilities, resolveEvalCapabilities, resolveConsolidationCapabilities, resolveRecallAuxiliaryCapabilities } from "./capabilities.js";
|
|
12
11
|
import { ThreadingManager } from "./threading.js";
|
|
13
12
|
import { utcDayRange } from "./transcript.js";
|
|
14
13
|
import { runWearablesCliCommand } from "./wearables/cli.js";
|
|
@@ -6259,7 +6258,7 @@ export function registerCli(
|
|
|
6259
6258
|
: 3;
|
|
6260
6259
|
const results = await runVerifiedRecallSearchCliCommand({
|
|
6261
6260
|
memoryDir: orchestrator.config.memoryDir,
|
|
6262
|
-
verifiedRecallEnabled: orchestrator.config.
|
|
6261
|
+
verifiedRecallEnabled: resolveRecallAuxiliaryCapabilities(orchestrator.config).verifiedRecall,
|
|
6263
6262
|
query,
|
|
6264
6263
|
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
6265
6264
|
boxRecallDays: orchestrator.config.boxRecallDays,
|
|
@@ -6295,8 +6294,8 @@ export function registerCli(
|
|
|
6295
6294
|
const options = (args[0] ?? {}) as Record<string, unknown>;
|
|
6296
6295
|
const result = await runCompoundingPromoteCliCommand({
|
|
6297
6296
|
memoryDir: orchestrator.config.memoryDir,
|
|
6298
|
-
compoundingEnabled: orchestrator.config.
|
|
6299
|
-
compoundingSemanticEnabled: orchestrator.config.
|
|
6297
|
+
compoundingEnabled: resolveConsolidationCapabilities(orchestrator.config).compounding,
|
|
6298
|
+
compoundingSemanticEnabled: resolveConsolidationCapabilities(orchestrator.config).compoundingSemantic,
|
|
6300
6299
|
weekId: String(options.weekId ?? ""),
|
|
6301
6300
|
candidateId: String(options.candidateId ?? ""),
|
|
6302
6301
|
dryRun: options.dryRun === true,
|
|
@@ -6318,7 +6317,7 @@ export function registerCli(
|
|
|
6318
6317
|
: 3;
|
|
6319
6318
|
const results = await runSemanticRuleVerifyCliCommand({
|
|
6320
6319
|
memoryDir: orchestrator.config.memoryDir,
|
|
6321
|
-
semanticRuleVerificationEnabled: orchestrator.config.
|
|
6320
|
+
semanticRuleVerificationEnabled: resolveRecallAuxiliaryCapabilities(orchestrator.config).semanticRuleVerification,
|
|
6322
6321
|
query,
|
|
6323
6322
|
maxResults: Number.isFinite(maxResults) ? maxResults : 3,
|
|
6324
6323
|
});
|
|
@@ -7805,7 +7804,7 @@ export function registerCli(
|
|
|
7805
7804
|
memoryDir: orchestrator.config.memoryDir,
|
|
7806
7805
|
targetPath,
|
|
7807
7806
|
versioning: {
|
|
7808
|
-
enabled: orchestrator.config.
|
|
7807
|
+
enabled: resolveRecallAuxiliaryCapabilities(orchestrator.config).versioning,
|
|
7809
7808
|
maxVersionsPerPage: orchestrator.config.versioningMaxPerPage,
|
|
7810
7809
|
sidecarDir: orchestrator.config.versioningSidecarDir,
|
|
7811
7810
|
},
|
|
@@ -7894,7 +7893,7 @@ export function registerCli(
|
|
|
7894
7893
|
console.log("Identity continuity is disabled.");
|
|
7895
7894
|
return;
|
|
7896
7895
|
}
|
|
7897
|
-
if (!orchestrator.config.
|
|
7896
|
+
if (!resolveRecallAuxiliaryCapabilities(orchestrator.config).continuityIncidentLogging) {
|
|
7898
7897
|
console.log("Continuity incident logging is disabled.");
|
|
7899
7898
|
return;
|
|
7900
7899
|
}
|
|
@@ -7925,7 +7924,7 @@ export function registerCli(
|
|
|
7925
7924
|
console.log("Identity continuity is disabled.");
|
|
7926
7925
|
return;
|
|
7927
7926
|
}
|
|
7928
|
-
if (!orchestrator.config.
|
|
7927
|
+
if (!resolveRecallAuxiliaryCapabilities(orchestrator.config).continuityIncidentLogging) {
|
|
7929
7928
|
console.log("Continuity incident logging is disabled.");
|
|
7930
7929
|
return;
|
|
7931
7930
|
}
|
|
@@ -7,7 +7,7 @@ import { StorageManager } from "../storage.js";
|
|
|
7
7
|
import type { ContinuityIncidentRecord, PluginConfig } from "../types.js";
|
|
8
8
|
import { resolveSharedContextDir, SharedFeedbackEntrySchema, type SharedFeedbackEntry } from "../shared-context/manager.js";
|
|
9
9
|
import { parseContinuityImprovementLoops } from "../identity-continuity.js";
|
|
10
|
-
import { resolveQmdCapabilities, type QmdConfigProjection } from "../capabilities.js";
|
|
10
|
+
import { resolveQmdCapabilities, type QmdConfigProjection, resolveConsolidationCapabilities } from "../capabilities.js";
|
|
11
11
|
|
|
12
12
|
type MistakesFile = {
|
|
13
13
|
version?: number;
|
|
@@ -493,7 +493,7 @@ export class CompoundingEngine {
|
|
|
493
493
|
const previousMistakes = await this.readMistakes();
|
|
494
494
|
const mistakes = this.buildMistakes(entries, actionPatterns, weekId, previousMistakes?.registry ?? []);
|
|
495
495
|
const rubrics = this.buildRubricSnapshot(entries, outcomeSummary);
|
|
496
|
-
let promotionCandidates = this.config.
|
|
496
|
+
let promotionCandidates = resolveConsolidationCapabilities(this.config).compoundingSemantic
|
|
497
497
|
? this.derivePromotionCandidates(outcomeSummary, mistakes.registry, rubrics)
|
|
498
498
|
: [];
|
|
499
499
|
if (this.config.cmcConsolidationEnabled) {
|
|
@@ -540,7 +540,7 @@ export class CompoundingEngine {
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
// PEDC: Run calibration consolidation during weekly synthesis
|
|
543
|
-
if (this.config.
|
|
543
|
+
if (resolveConsolidationCapabilities(this.config).calibration) {
|
|
544
544
|
try {
|
|
545
545
|
const { runCalibrationConsolidation } = await import("../calibration.js");
|
|
546
546
|
const calRules = await runCalibrationConsolidation({
|
|
@@ -555,7 +555,7 @@ export class CompoundingEngine {
|
|
|
555
555
|
log.warn(`[calibration] weekly consolidation failed (non-fatal): ${error instanceof Error ? error.message : String(error)}`);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
const continuity = this.config.
|
|
558
|
+
const continuity = resolveConsolidationCapabilities(this.config).continuityAudit
|
|
559
559
|
? await this.readContinuityAuditReferences(weekId)
|
|
560
560
|
: { monthId: monthIdFromIsoWeek(weekId), weeklyPath: null, monthlyPath: null };
|
|
561
561
|
|
|
@@ -641,7 +641,7 @@ export class CompoundingEngine {
|
|
|
641
641
|
storage?: StorageManager;
|
|
642
642
|
}): Promise<CompoundingPromotionReport> {
|
|
643
643
|
const report: CompoundingPromotionReport = {
|
|
644
|
-
enabled: this.config.
|
|
644
|
+
enabled: resolveConsolidationCapabilities(this.config).compounding === true && resolveConsolidationCapabilities(this.config).compoundingSemantic === true,
|
|
645
645
|
dryRun: opts.dryRun === true,
|
|
646
646
|
weekId: opts.weekId,
|
|
647
647
|
promoted: [],
|
|
@@ -1384,7 +1384,7 @@ export class CompoundingEngine {
|
|
|
1384
1384
|
}
|
|
1385
1385
|
lines.push("");
|
|
1386
1386
|
|
|
1387
|
-
if (this.config.
|
|
1387
|
+
if (resolveConsolidationCapabilities(this.config).compoundingSemantic) {
|
|
1388
1388
|
lines.push("## Promotion Candidates (Advisory)");
|
|
1389
1389
|
if (promotionCandidates.length === 0) {
|
|
1390
1390
|
lines.push("- (no advisory promotion candidates this week)");
|
|
@@ -1403,7 +1403,7 @@ export class CompoundingEngine {
|
|
|
1403
1403
|
lines.push("");
|
|
1404
1404
|
}
|
|
1405
1405
|
|
|
1406
|
-
if (this.config.
|
|
1406
|
+
if (resolveConsolidationCapabilities(this.config).continuityAudit) {
|
|
1407
1407
|
lines.push("## Continuity Audits");
|
|
1408
1408
|
if (continuity.weeklyPath) {
|
|
1409
1409
|
lines.push(`- weekly: ${continuity.weeklyPath}`);
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
} from "./correction-planner.js";
|
|
44
44
|
import { type ExecutorDeps, type ExecutorMemory } from "./correction-executor.js";
|
|
45
45
|
import { CorrectionService, type CorrectionServiceDeps } from "./correction-service.js";
|
|
46
|
+
import { resolveRecallAuxiliaryCapabilities } from "../capabilities.js";
|
|
46
47
|
|
|
47
48
|
// ---------------------------------------------------------------------------
|
|
48
49
|
// Public entry: build a fully-wired CorrectionService
|
|
@@ -810,11 +811,11 @@ function toExecutorMemory(m: MemoryFile): ExecutorMemory {
|
|
|
810
811
|
* Nested wins when present; both default to `true` (plan is read-only, safe on).
|
|
811
812
|
*/
|
|
812
813
|
export function isCorrectionFeatureEnabled(config: PluginConfig): boolean {
|
|
813
|
-
// parseConfig now resolves this into `config.
|
|
814
|
+
// parseConfig now resolves this into `resolveRecallAuxiliaryCapabilities(config).correction` (review
|
|
814
815
|
// thread Txp) — prefer the parsed boolean so operator config actually takes
|
|
815
816
|
// effect. The loose nested/flat read stays as a fallback for PluginConfig-
|
|
816
817
|
// shaped objects built without parseConfig (unit tests).
|
|
817
|
-
if (typeof config.
|
|
818
|
+
if (typeof resolveRecallAuxiliaryCapabilities(config).correction === "boolean") return resolveRecallAuxiliaryCapabilities(config).correction;
|
|
818
819
|
const nested = (config as unknown as Record<string, unknown>).correction as
|
|
819
820
|
| Record<string, unknown>
|
|
820
821
|
| undefined;
|
package/src/extraction.ts
CHANGED
|
@@ -38,10 +38,8 @@ import { normalizeProcedureSteps } from "./procedural/procedure-types.js";
|
|
|
38
38
|
import { normalizeReasoningTrace } from "./reasoning-trace-types.js";
|
|
39
39
|
import { looksLikeMechanicalTelemetryTranscript } from "./telemetry-transcript.js";
|
|
40
40
|
import { buildFactProvenance, type ProvenanceTurnInput } from "./provenance.js";
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
resolveLocalLlmCapabilities,
|
|
44
|
-
} from "./capabilities.js";
|
|
41
|
+
import { resolveMemoryLifecycleCapabilities,
|
|
42
|
+
resolveLocalLlmCapabilities,resolveRecallAuxiliaryCapabilities } from "./capabilities.js";
|
|
45
43
|
|
|
46
44
|
type ExtractionQuestion = ExtractionResult["questions"][number];
|
|
47
45
|
type ExtractedFactResult = ExtractionResult["facts"][number];
|
|
@@ -1664,7 +1662,7 @@ Memory categories:
|
|
|
1664
1662
|
- principle: Durable rules, values, or operating beliefs (e.g., "never use Chat Completions API")
|
|
1665
1663
|
- commitment: Promises, obligations, or deadlines (e.g., "deploy by Friday", "call accountant Monday")
|
|
1666
1664
|
- moment: Emotionally significant events or milestones (e.g., "first successful deployment of engram")
|
|
1667
|
-
- skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${this.config.
|
|
1665
|
+
- skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? `
|
|
1668
1666
|
- rule: Causal rules discovered through experience (format: "IF <condition> THEN <action/outcome>", e.g., "IF Shopify API returns 401 THEN the admin token is missing read_products scope")` : ""}
|
|
1669
1667
|
- procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to "procedure". Use "content" for a short title that includes explicit trigger phrasing (e.g. "When you deploy to production…", "Whenever you ship a release…"). Add "procedureSteps": an array of at least two objects {"order": number, "intent": "concrete step description"} in execution order. Optional per-step "toolCall": {"kind": "…", "signature": "…"}, "expectedOutcome", "optional": true.
|
|
1670
1668
|
- reasoning_trace: A stored solution chain / chain-of-thought the user walked through to solve a problem (e.g. "Here's how I debugged the latency spike: first I checked…, then I…, finally I…"). Set category to "reasoning_trace". Use "content" for a short title summarising the problem (e.g. "How I debugged the staging latency spike"). Add "reasoningTrace": {"steps": [{"order": number, "description": "what happened at this step"}, …], "finalAnswer": "the conclusion or answer", "observedOutcome": "optional confirmation of how it played out"}. Require at least two ordered steps AND a finalAnswer. Use this category only when the user explicitly narrates their reasoning — not for ordinary decisions (use "decision") or reusable workflows (use "procedure").
|
|
@@ -1672,7 +1670,7 @@ Memory categories:
|
|
|
1672
1670
|
Rules:
|
|
1673
1671
|
- Only extract genuinely NEW information worth remembering across sessions
|
|
1674
1672
|
- Skip transient task details (file paths being edited, current errors, etc.)
|
|
1675
|
-
- Priority: corrections > principles${this.config.
|
|
1673
|
+
- Priority: corrections > principles${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? " > rules" : ""} > preferences > commitments > decisions > relationships > entities > moments > skills > facts
|
|
1676
1674
|
- Corrections (user saying "actually, don't do X" or "I prefer Y") get highest confidence
|
|
1677
1675
|
- Each fact should be a standalone, self-contained statement
|
|
1678
1676
|
- Lines labelled [context user] or [context assistant] are reference context only. Use them to resolve pronouns and adjacent question/answer pairs, but do not extract a memory stated only in context lines unless a normal [user] or [assistant] line confirms or completes it.
|
|
@@ -1800,7 +1798,7 @@ Actions:
|
|
|
1800
1798
|
|
|
1801
1799
|
Also:
|
|
1802
1800
|
- Suggest profile updates based on patterns across memories
|
|
1803
|
-
- Identify entity updates for entity tracking${this.config.
|
|
1801
|
+
- Identify entity updates for entity tracking${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? `
|
|
1804
1802
|
- When merging or updating memories, look for IF→THEN causal patterns. If a memory describes "X failed/succeeded because Y" or "doing X led to Y", rewrite its content to make the causal rule explicit in the form "IF <condition> THEN <action/outcome>".` : ""}`,
|
|
1805
1803
|
},
|
|
1806
1804
|
{
|
|
@@ -1846,7 +1844,7 @@ Actions:
|
|
|
1846
1844
|
|
|
1847
1845
|
Also:
|
|
1848
1846
|
- Suggest profile updates based on patterns across memories
|
|
1849
|
-
- Identify entity updates for entity tracking${this.config.
|
|
1847
|
+
- Identify entity updates for entity tracking${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? `
|
|
1850
1848
|
- When merging or updating memories, look for IF→THEN causal patterns. If a memory describes "X failed/succeeded because Y" or "doing X led to Y", rewrite its content to make the causal rule explicit in the form "IF <condition> THEN <action/outcome>".` : ""}
|
|
1851
1849
|
|
|
1852
1850
|
Current behavioral profile:
|
|
@@ -1944,7 +1942,7 @@ Actions:
|
|
|
1944
1942
|
|
|
1945
1943
|
Also:
|
|
1946
1944
|
- Suggest profile updates based on patterns across memories
|
|
1947
|
-
- Identify entity updates for entity tracking${this.config.
|
|
1945
|
+
- Identify entity updates for entity tracking${resolveRecallAuxiliaryCapabilities(this.config).causalRuleExtraction ? `
|
|
1948
1946
|
- When merging or updating memories, look for IF→THEN causal patterns. If a memory describes "X failed/succeeded because Y" or "doing X led to Y", rewrite its content to make the causal rule explicit in the form "IF <condition> THEN <action/outcome>".` : ""}
|
|
1949
1947
|
|
|
1950
1948
|
Current behavioral profile:
|
|
@@ -2689,7 +2687,7 @@ Respond with valid JSON matching this schema:
|
|
|
2689
2687
|
}
|
|
2690
2688
|
|
|
2691
2689
|
async generateDaySummary(memories: string | MemoryFile[]): Promise<DaySummaryResultShape | null> {
|
|
2692
|
-
if (!this.config.
|
|
2690
|
+
if (!resolveRecallAuxiliaryCapabilities(this.config).daySummary) {
|
|
2693
2691
|
log.warn("day summary skipped — disabled by config");
|
|
2694
2692
|
return null;
|
|
2695
2693
|
}
|