@mastra/pg 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/pg
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-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
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/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -5716,7 +5716,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
5716
5716
  );
5717
5717
  }
5718
5718
  }
5719
- async addPendingMessageTokens(id, tokenCount) {
5719
+ async setPendingMessageTokens(id, tokenCount) {
5720
5720
  try {
5721
5721
  const tableName = getTableName3({
5722
5722
  indexName: OM_TABLE,
@@ -5725,7 +5725,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
5725
5725
  const nowStr = (/* @__PURE__ */ new Date()).toISOString();
5726
5726
  const result = await this.#db.client.query(
5727
5727
  `UPDATE ${tableName} SET
5728
- "pendingMessageTokens" = "pendingMessageTokens" + $1,
5728
+ "pendingMessageTokens" = $1,
5729
5729
  "updatedAt" = $2,
5730
5730
  "updatedAtZ" = $3
5731
5731
  WHERE id = $4`,
@@ -5733,7 +5733,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
5733
5733
  );
5734
5734
  if (result.rowCount === 0) {
5735
5735
  throw new error.MastraError({
5736
- id: storage.createStorageErrorId("PG", "ADD_PENDING_MESSAGE_TOKENS", "NOT_FOUND"),
5736
+ id: storage.createStorageErrorId("PG", "SET_PENDING_MESSAGE_TOKENS", "NOT_FOUND"),
5737
5737
  text: `Observational memory record not found: ${id}`,
5738
5738
  domain: error.ErrorDomain.STORAGE,
5739
5739
  category: error.ErrorCategory.THIRD_PARTY,
@@ -5746,7 +5746,7 @@ var MemoryPG = class _MemoryPG extends storage.MemoryStorage {
5746
5746
  }
5747
5747
  throw new error.MastraError(
5748
5748
  {
5749
- id: storage.createStorageErrorId("PG", "ADD_PENDING_MESSAGE_TOKENS", "FAILED"),
5749
+ id: storage.createStorageErrorId("PG", "SET_PENDING_MESSAGE_TOKENS", "FAILED"),
5750
5750
  domain: error.ErrorDomain.STORAGE,
5751
5751
  category: error.ErrorCategory.THIRD_PARTY,
5752
5752
  details: { id, tokenCount }