@mastra/memory 1.17.4-alpha.0 → 1.17.5-alpha.0
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/CHANGELOG.md +18 -0
- package/dist/{chunk-BGVQRC2E.cjs → chunk-6ODYOMHN.cjs} +18 -2
- package/dist/chunk-6ODYOMHN.cjs.map +1 -0
- package/dist/{chunk-XLJGXHP5.js → chunk-Z5GWA7LB.js} +18 -2
- package/dist/chunk-Z5GWA7LB.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +29 -29
- package/dist/docs/references/docs-agents-supervisor-agents.md +16 -0
- package/dist/docs/references/reference-vectors-mongodb.md +0 -2
- package/dist/index.cjs +13 -13
- package/dist/index.js +4 -4
- package/dist/{observational-memory-JAQ5VAO3.cjs → observational-memory-OVSEK47Z.cjs} +26 -26
- package/dist/{observational-memory-JAQ5VAO3.cjs.map → observational-memory-OVSEK47Z.cjs.map} +1 -1
- package/dist/{observational-memory-JX7VDONY.js → observational-memory-UMDC4VC2.js} +3 -3
- package/dist/{observational-memory-JX7VDONY.js.map → observational-memory-UMDC4VC2.js.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/processor.d.ts.map +1 -1
- package/dist/processors/observational-memory/reflector-runner.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-BGVQRC2E.cjs.map +0 -1
- package/dist/chunk-XLJGXHP5.js.map +0 -1
|
@@ -4814,6 +4814,13 @@ ${unreflectedContent}` : freshRecord.bufferedReflection;
|
|
|
4814
4814
|
`[OM:reflect] blockAfter exceeded (${observationTokens} >= ${this.reflectionConfig.blockAfter}), falling through to sync reflection`
|
|
4815
4815
|
);
|
|
4816
4816
|
} else {
|
|
4817
|
+
const activationPoint = reflectThreshold * this.reflectionConfig.bufferActivation;
|
|
4818
|
+
if (observationTokens < activationPoint) {
|
|
4819
|
+
omDebug(
|
|
4820
|
+
`[OM:reflect] skipping async reflection \u2014 observationTokens (${observationTokens}) below activation point (${activationPoint}), triggered by ${activationTriggeredBy}`
|
|
4821
|
+
);
|
|
4822
|
+
return;
|
|
4823
|
+
}
|
|
4817
4824
|
omDebug(
|
|
4818
4825
|
`[OM:reflect] async activation failed, no blockAfter or below it (obsTokens=${observationTokens}, blockAfter=${this.reflectionConfig.blockAfter}) \u2014 starting background reflection`
|
|
4819
4826
|
);
|
|
@@ -9170,6 +9177,15 @@ var ObservationalMemoryProcessor = class {
|
|
|
9170
9177
|
if (readOnly) {
|
|
9171
9178
|
return messageList;
|
|
9172
9179
|
}
|
|
9180
|
+
const activeTurn = state.__omTurn ?? this.turn;
|
|
9181
|
+
if (activeTurn && activeTurn.messageList !== messageList) {
|
|
9182
|
+
await activeTurn.end().catch(() => {
|
|
9183
|
+
});
|
|
9184
|
+
if (this.turn === activeTurn) {
|
|
9185
|
+
this.turn = void 0;
|
|
9186
|
+
}
|
|
9187
|
+
state.__omTurn = void 0;
|
|
9188
|
+
}
|
|
9173
9189
|
if (!this.turn || !state.__omTurn) {
|
|
9174
9190
|
if (this.turn && !state.__omTurn) {
|
|
9175
9191
|
await this.turn.end().catch(() => {
|
|
@@ -9334,5 +9350,5 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
9334
9350
|
}
|
|
9335
9351
|
|
|
9336
9352
|
export { ModelByInputTokens, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, formatToolResultForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, resolveToolResultValue, stripEphemeralAnchorIds, stripObservationGroups, truncateStringByTokens, wrapInObservationGroup };
|
|
9337
|
-
//# sourceMappingURL=chunk-
|
|
9338
|
-
//# sourceMappingURL=chunk-
|
|
9353
|
+
//# sourceMappingURL=chunk-Z5GWA7LB.js.map
|
|
9354
|
+
//# sourceMappingURL=chunk-Z5GWA7LB.js.map
|