@mastra/memory 1.17.3 → 1.17.4
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-7742VTN5.js → chunk-4C4ERX6N.js} +24 -9
- package/dist/{chunk-7742VTN5.js.map → chunk-4C4ERX6N.js.map} +1 -1
- package/dist/{chunk-J2XQSPAB.cjs → chunk-M6QU3KKP.cjs} +24 -9
- package/dist/{chunk-J2XQSPAB.cjs.map → chunk-M6QU3KKP.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +29 -29
- package/dist/index.cjs +13 -13
- package/dist/index.js +4 -4
- package/dist/{observational-memory-ISRI7QGE.cjs → observational-memory-TC2CBKCL.cjs} +26 -26
- package/dist/{observational-memory-ISRI7QGE.cjs.map → observational-memory-TC2CBKCL.cjs.map} +1 -1
- package/dist/{observational-memory-YYO73QMY.js → observational-memory-ZS2HJPUO.js} +3 -3
- package/dist/{observational-memory-YYO73QMY.js.map → observational-memory-ZS2HJPUO.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
|
@@ -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
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
]);
|
|
4633
|
-
|
|
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);
|
|
@@ -9171,6 +9177,15 @@ var ObservationalMemoryProcessor = class {
|
|
|
9171
9177
|
if (readOnly) {
|
|
9172
9178
|
return messageList;
|
|
9173
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
|
+
}
|
|
9174
9189
|
if (!this.turn || !state.__omTurn) {
|
|
9175
9190
|
if (this.turn && !state.__omTurn) {
|
|
9176
9191
|
await this.turn.end().catch(() => {
|
|
@@ -9360,5 +9375,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
|
|
|
9360
9375
|
exports.stripObservationGroups = stripObservationGroups;
|
|
9361
9376
|
exports.truncateStringByTokens = truncateStringByTokens;
|
|
9362
9377
|
exports.wrapInObservationGroup = wrapInObservationGroup;
|
|
9363
|
-
//# sourceMappingURL=chunk-
|
|
9364
|
-
//# sourceMappingURL=chunk-
|
|
9378
|
+
//# sourceMappingURL=chunk-M6QU3KKP.cjs.map
|
|
9379
|
+
//# sourceMappingURL=chunk-M6QU3KKP.cjs.map
|