@mastra/memory 1.17.3 → 1.17.4-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.
@@ -4617,13 +4617,19 @@ var ReflectorRunner = class {
4617
4617
  const bufferKey = this.buffering.getReflectionBufferKey(lockKey);
4618
4618
  const asyncOp = BufferingCoordinator.asyncBufferingOps.get(bufferKey);
4619
4619
  if (asyncOp) {
4620
- omDebug(`[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...`);
4621
- try {
4622
- await Promise.race([
4623
- asyncOp,
4624
- new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 6e4))
4625
- ]);
4626
- } catch {
4620
+ if (activationMetadata?.triggeredBy === "ttl" || activationMetadata?.triggeredBy === "provider_change") {
4621
+ omDebug(
4622
+ `[OM:reflect] tryActivateBufferedReflection: async op in progress, not blocking for ${activationMetadata.triggeredBy} trigger`
4623
+ );
4624
+ } else {
4625
+ omDebug(`[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...`);
4626
+ try {
4627
+ await Promise.race([
4628
+ asyncOp,
4629
+ new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 5e3))
4630
+ ]);
4631
+ } catch {
4632
+ }
4627
4633
  }
4628
4634
  }
4629
4635
  const freshRecord = await this.storage.getObservationalMemory(record.threadId, record.resourceId);
@@ -9328,5 +9334,5 @@ function getObservationsAsOf(activeObservations, asOf) {
9328
9334
  }
9329
9335
 
9330
9336
  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 };
9331
- //# sourceMappingURL=chunk-7742VTN5.js.map
9332
- //# sourceMappingURL=chunk-7742VTN5.js.map
9337
+ //# sourceMappingURL=chunk-XLJGXHP5.js.map
9338
+ //# sourceMappingURL=chunk-XLJGXHP5.js.map