@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @mastra/memory
2
2
 
3
+ ## 1.17.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed idle timeout and provider-change observation activations blocking on in-progress reflection buffering. These triggers now return immediately, letting the background reflection complete asynchronously. ([#15937](https://github.com/mastra-ai/mastra/pull/15937))
8
+
9
+ - Updated dependencies [[`d587199`](https://github.com/mastra-ai/mastra/commit/d5871993c0371bde2b0717d6b47194755baa1443)]:
10
+ - @mastra/core@1.29.2-alpha.0
11
+
3
12
  ## 1.17.3
4
13
 
5
14
  ### Patch Changes
@@ -4624,13 +4624,19 @@ var ReflectorRunner = class {
4624
4624
  const bufferKey = this.buffering.getReflectionBufferKey(lockKey);
4625
4625
  const asyncOp = BufferingCoordinator.asyncBufferingOps.get(bufferKey);
4626
4626
  if (asyncOp) {
4627
- omDebug(`[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...`);
4628
- try {
4629
- await Promise.race([
4630
- asyncOp,
4631
- new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 6e4))
4632
- ]);
4633
- } catch {
4627
+ if (activationMetadata?.triggeredBy === "ttl" || activationMetadata?.triggeredBy === "provider_change") {
4628
+ omDebug(
4629
+ `[OM:reflect] tryActivateBufferedReflection: async op in progress, not blocking for ${activationMetadata.triggeredBy} trigger`
4630
+ );
4631
+ } else {
4632
+ omDebug(`[OM:reflect] tryActivateBufferedReflection: waiting for in-progress op...`);
4633
+ try {
4634
+ await Promise.race([
4635
+ asyncOp,
4636
+ new Promise((_, reject) => setTimeout(() => reject(new Error("Timeout")), 5e3))
4637
+ ]);
4638
+ } catch {
4639
+ }
4634
4640
  }
4635
4641
  }
4636
4642
  const freshRecord = await this.storage.getObservationalMemory(record.threadId, record.resourceId);
@@ -9360,5 +9366,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
9360
9366
  exports.stripObservationGroups = stripObservationGroups;
9361
9367
  exports.truncateStringByTokens = truncateStringByTokens;
9362
9368
  exports.wrapInObservationGroup = wrapInObservationGroup;
9363
- //# sourceMappingURL=chunk-J2XQSPAB.cjs.map
9364
- //# sourceMappingURL=chunk-J2XQSPAB.cjs.map
9369
+ //# sourceMappingURL=chunk-BGVQRC2E.cjs.map
9370
+ //# sourceMappingURL=chunk-BGVQRC2E.cjs.map