@mastra/memory 1.18.0-alpha.2 → 1.18.0-alpha.3
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 +10 -0
- package/dist/{chunk-MJNTQ6GP.cjs → chunk-ET2TVAT3.cjs} +9 -7
- package/dist/chunk-ET2TVAT3.cjs.map +1 -0
- package/dist/{chunk-PBZHHKPE.js → chunk-XVVCS6R6.js} +9 -7
- package/dist/chunk-XVVCS6R6.js.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +27 -27
- package/dist/docs/references/docs-memory-observational-memory.md +56 -12
- package/dist/docs/references/reference-memory-observational-memory.md +11 -1
- package/dist/index.cjs +18 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/{observational-memory-IP2RVQQG.js → observational-memory-2PRVG6BF.js} +3 -3
- package/dist/{observational-memory-IP2RVQQG.js.map → observational-memory-2PRVG6BF.js.map} +1 -1
- package/dist/{observational-memory-TASIB4PH.cjs → observational-memory-UJUAQKJB.cjs} +26 -26
- package/dist/{observational-memory-TASIB4PH.cjs.map → observational-memory-UJUAQKJB.cjs.map} +1 -1
- package/dist/processors/index.cjs +24 -24
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/dist/processors/observational-memory/processor.d.ts.map +1 -1
- package/dist/processors/observational-memory/types.d.ts +35 -4
- package/dist/processors/observational-memory/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-MJNTQ6GP.cjs.map +0 -1
- package/dist/chunk-PBZHHKPE.js.map +0 -1
|
@@ -6659,7 +6659,7 @@ function getCurrentModel2(model) {
|
|
|
6659
6659
|
return formatModelContext2(model?.provider, model?.modelId);
|
|
6660
6660
|
}
|
|
6661
6661
|
function parseActivationTTL(value, fieldPath) {
|
|
6662
|
-
if (value === void 0) {
|
|
6662
|
+
if (value === void 0 || value === false) {
|
|
6663
6663
|
return void 0;
|
|
6664
6664
|
}
|
|
6665
6665
|
if (typeof value === "number") {
|
|
@@ -6807,6 +6807,8 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
6807
6807
|
);
|
|
6808
6808
|
}
|
|
6809
6809
|
}
|
|
6810
|
+
const observationActivateAfterIdle = config.observation?.activateAfterIdle ?? config.activateAfterIdle;
|
|
6811
|
+
const observationActivateAfterIdlePath = config.observation?.activateAfterIdle !== void 0 ? "observation.activateAfterIdle" : "activateAfterIdle";
|
|
6810
6812
|
this.observationConfig = {
|
|
6811
6813
|
model: observationModel,
|
|
6812
6814
|
// When shared budget, store as range: min = base threshold, max = total budget
|
|
@@ -6824,8 +6826,8 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
6824
6826
|
config.observation?.messageTokens ?? OBSERVATIONAL_MEMORY_DEFAULTS.observation.messageTokens
|
|
6825
6827
|
),
|
|
6826
6828
|
bufferActivation: asyncBufferingDisabled ? void 0 : config.observation?.bufferActivation ?? OBSERVATIONAL_MEMORY_DEFAULTS.observation.bufferActivation,
|
|
6827
|
-
activateAfterIdle: parseActivationTTL(
|
|
6828
|
-
activateOnProviderChange: config.activateOnProviderChange ?? false,
|
|
6829
|
+
activateAfterIdle: parseActivationTTL(observationActivateAfterIdle, observationActivateAfterIdlePath),
|
|
6830
|
+
activateOnProviderChange: config.observation?.activateOnProviderChange ?? config.activateOnProviderChange ?? false,
|
|
6829
6831
|
blockAfter: asyncBufferingDisabled ? void 0 : resolveBlockAfter(
|
|
6830
6832
|
config.observation?.blockAfter ?? (config.observation?.bufferTokens ?? OBSERVATIONAL_MEMORY_DEFAULTS.observation.bufferTokens ? 1.2 : void 0),
|
|
6831
6833
|
config.observation?.messageTokens ?? OBSERVATIONAL_MEMORY_DEFAULTS.observation.messageTokens
|
|
@@ -6844,8 +6846,8 @@ Async buffering is enabled by default \u2014 this opt-out is only needed when us
|
|
|
6844
6846
|
},
|
|
6845
6847
|
providerOptions: config.reflection?.providerOptions ?? OBSERVATIONAL_MEMORY_DEFAULTS.reflection.providerOptions,
|
|
6846
6848
|
bufferActivation: asyncBufferingDisabled ? void 0 : config?.reflection?.bufferActivation ?? OBSERVATIONAL_MEMORY_DEFAULTS.reflection.bufferActivation,
|
|
6847
|
-
activateAfterIdle: parseActivationTTL(config.activateAfterIdle, "activateAfterIdle"),
|
|
6848
|
-
activateOnProviderChange: config.activateOnProviderChange ?? false,
|
|
6849
|
+
activateAfterIdle: parseActivationTTL(config.reflection?.activateAfterIdle, "reflection.activateAfterIdle"),
|
|
6850
|
+
activateOnProviderChange: config.reflection?.activateOnProviderChange ?? false,
|
|
6849
6851
|
blockAfter: asyncBufferingDisabled ? void 0 : resolveBlockAfter(
|
|
6850
6852
|
config.reflection?.blockAfter ?? (config.reflection?.bufferActivation ?? OBSERVATIONAL_MEMORY_DEFAULTS.reflection.bufferActivation ? 1.2 : void 0),
|
|
6851
6853
|
config.reflection?.observationTokens ?? OBSERVATIONAL_MEMORY_DEFAULTS.reflection.observationTokens
|
|
@@ -9494,5 +9496,5 @@ function getObservationsAsOf(activeObservations, asOf) {
|
|
|
9494
9496
|
}
|
|
9495
9497
|
|
|
9496
9498
|
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 };
|
|
9497
|
-
//# sourceMappingURL=chunk-
|
|
9498
|
-
//# sourceMappingURL=chunk-
|
|
9499
|
+
//# sourceMappingURL=chunk-XVVCS6R6.js.map
|
|
9500
|
+
//# sourceMappingURL=chunk-XVVCS6R6.js.map
|