@mastra/mongodb 1.3.0-alpha.0 → 1.3.0-alpha.1

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/mongodb
2
2
 
3
+ ## 1.3.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed observational memory progress bars resetting to zero after agent responses finish. The messages and observations sidebar bars now retain their values on stream completion, cancellation, and page reload. Also added a buffer-status endpoint so buffering badges resolve with accurate token counts instead of spinning forever when buffering outlives the stream. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
8
+
9
+ - Updated dependencies [[`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a)]:
10
+ - @mastra/core@1.3.0-alpha.2
11
+
3
12
  ## 1.3.0-alpha.0
4
13
 
5
14
  ### Minor Changes
@@ -3,7 +3,7 @@ name: mastra-mongodb
3
3
  description: Documentation for @mastra/mongodb. Use when working with @mastra/mongodb APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mongodb"
6
- version: "1.3.0-alpha.0"
6
+ version: "1.3.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0-alpha.0",
2
+ "version": "1.3.0-alpha.1",
3
3
  "package": "@mastra/mongodb",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -14,7 +14,7 @@ var evals = require('@mastra/core/evals');
14
14
 
15
15
  // package.json
16
16
  var package_default = {
17
- version: "1.3.0-alpha.0"};
17
+ version: "1.3.0-alpha.1"};
18
18
  var MongoDBFilterTranslator = class extends filter.BaseFilterTranslator {
19
19
  getSupportedOperators() {
20
20
  return {
@@ -2768,10 +2768,10 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
2768
2768
  );
2769
2769
  }
2770
2770
  }
2771
- async addPendingMessageTokens(id, tokenCount) {
2771
+ async setPendingMessageTokens(id, tokenCount) {
2772
2772
  if (typeof tokenCount !== "number" || !Number.isFinite(tokenCount) || tokenCount < 0) {
2773
2773
  throw new error.MastraError({
2774
- id: storage.createStorageErrorId("MONGODB", "ADD_PENDING_MESSAGE_TOKENS", "INVALID_INPUT"),
2774
+ id: storage.createStorageErrorId("MONGODB", "SET_PENDING_MESSAGE_TOKENS", "INVALID_INPUT"),
2775
2775
  text: `Invalid tokenCount: must be a finite non-negative number, got ${tokenCount}`,
2776
2776
  domain: error.ErrorDomain.STORAGE,
2777
2777
  category: error.ErrorCategory.USER,
@@ -2783,13 +2783,12 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
2783
2783
  const result = await collection.updateOne(
2784
2784
  { id },
2785
2785
  {
2786
- $inc: { pendingMessageTokens: tokenCount },
2787
- $set: { updatedAt: /* @__PURE__ */ new Date() }
2786
+ $set: { pendingMessageTokens: tokenCount, updatedAt: /* @__PURE__ */ new Date() }
2788
2787
  }
2789
2788
  );
2790
2789
  if (result.matchedCount === 0) {
2791
2790
  throw new error.MastraError({
2792
- id: storage.createStorageErrorId("MONGODB", "ADD_PENDING_MESSAGE_TOKENS", "NOT_FOUND"),
2791
+ id: storage.createStorageErrorId("MONGODB", "SET_PENDING_MESSAGE_TOKENS", "NOT_FOUND"),
2793
2792
  text: `Observational memory record not found: ${id}`,
2794
2793
  domain: error.ErrorDomain.STORAGE,
2795
2794
  category: error.ErrorCategory.THIRD_PARTY,
@@ -2802,7 +2801,7 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
2802
2801
  }
2803
2802
  throw new error.MastraError(
2804
2803
  {
2805
- id: storage.createStorageErrorId("MONGODB", "ADD_PENDING_MESSAGE_TOKENS", "FAILED"),
2804
+ id: storage.createStorageErrorId("MONGODB", "SET_PENDING_MESSAGE_TOKENS", "FAILED"),
2806
2805
  domain: error.ErrorDomain.STORAGE,
2807
2806
  category: error.ErrorCategory.THIRD_PARTY,
2808
2807
  details: { id, tokenCount }