@mastra/upstash 0.11.0-alpha.2 → 0.11.1-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.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/upstash@0.11.0-alpha.2 build /home/runner/work/mastra/mastra/stores/upstash
2
+ > @mastra/upstash@0.11.1-alpha.0 build /home/runner/work/mastra/mastra/stores/upstash
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 8774ms
9
+ TSC ⚡️ Build success in 10527ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 10074ms
16
+ DTS ⚡️ Build success in 10301ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- CJS dist/index.cjs 45.20 KB
21
- CJS ⚡️ Build success in 1237ms
22
- ESM dist/index.js 45.03 KB
23
- ESM ⚡️ Build success in 1238ms
20
+ ESM dist/index.js 45.19 KB
21
+ ESM ⚡️ Build success in 1620ms
22
+ CJS dist/index.cjs 45.36 KB
23
+ CJS ⚡️ Build success in 1619ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 0.11.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - d8f2d19: Add updateMessages API to storage classes (only support for PG and LibSQL for now) and to memory class. Additionally allow for metadata to be saved in the content field of a message.
8
+ - Updated dependencies [d8f2d19]
9
+ - Updated dependencies [9d52b17]
10
+ - Updated dependencies [8ba1b51]
11
+ - @mastra/core@0.10.7-alpha.0
12
+
13
+ ## 0.11.0
14
+
15
+ ### Minor Changes
16
+
17
+ - 704d1ca: Thread Timestamp Auto-Update Enhancement
18
+ Added automatic thread updatedAt timestamp updates when messages are saved across all storage providers
19
+ Enhanced user experience: Threads now accurately reflect their latest activity with automatic timestamp updates when new messages are added
20
+ Universal implementation: Consistent behavior across all 7 storage backends (ClickHouse, Cloudflare D1, DynamoDB, MongoDB, PostgreSQL, Upstash, LibSQL)
21
+ Performance optimized: Updates execute in parallel with message saving operations for minimal performance impact
22
+ Backwards compatible: No breaking changes - existing code continues to work unchanged
23
+ Improved conversation ordering: Chat interfaces can now properly sort threads by actual last activity
24
+ This enhancement resolves the issue where active conversations appeared stale due to outdated thread timestamps, providing better conversation management and user experience in chat applications.
25
+
26
+ ### Patch Changes
27
+
28
+ - 2fda031: Clarify upstash argument concepts.
29
+ - e8fdbdd: Fix dynamic require of crypto using upstash.
30
+ caused by a bad import was used in the monorepo
31
+
32
+ Fixes #4801
33
+
34
+ - Updated dependencies [63f6b7d]
35
+ - Updated dependencies [12a95fc]
36
+ - Updated dependencies [4b0f8a6]
37
+ - Updated dependencies [51264a5]
38
+ - Updated dependencies [8e6f677]
39
+ - Updated dependencies [d70c420]
40
+ - Updated dependencies [ee9af57]
41
+ - Updated dependencies [36f1c36]
42
+ - Updated dependencies [2a16996]
43
+ - Updated dependencies [10d352e]
44
+ - Updated dependencies [9589624]
45
+ - Updated dependencies [53d3c37]
46
+ - Updated dependencies [751c894]
47
+ - Updated dependencies [577ce3a]
48
+ - Updated dependencies [9260b3a]
49
+ - @mastra/core@0.10.6
50
+
3
51
  ## 0.11.0-alpha.2
4
52
 
5
53
  ### Patch Changes
@@ -5,8 +5,9 @@ import type { DeleteVectorParams } from '@mastra/core/vector';
5
5
  import type { DescribeIndexParams } from '@mastra/core/vector';
6
6
  import type { EvalRow } from '@mastra/core/storage';
7
7
  import type { IndexStats } from '@mastra/core/vector';
8
+ import type { MastraMessageContentV2 } from '@mastra/core/agent';
8
9
  import type { MastraMessageV1 } from '@mastra/core/memory';
9
- import type { MastraMessageV2 } from '@mastra/core/memory';
10
+ import type { MastraMessageV2 } from '@mastra/core/agent';
10
11
  import { MastraStorage } from '@mastra/core/storage';
11
12
  import { MastraVector } from '@mastra/core/vector';
12
13
  import type { OperatorSupport } from '@mastra/core/vector/filter';
@@ -211,6 +212,15 @@ declare class UpstashStore extends MastraStorage {
211
212
  workflowName?: string;
212
213
  }): Promise<WorkflowRun | null>;
213
214
  close(): Promise<void>;
215
+ updateMessages(_args: {
216
+ messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
217
+ id: string;
218
+ content?: {
219
+ metadata?: MastraMessageContentV2['metadata'];
220
+ content?: MastraMessageContentV2['content'];
221
+ };
222
+ }[];
223
+ }): Promise<MastraMessageV2[]>;
214
224
  }
215
225
  export { UpstashStore }
216
226
  export { UpstashStore as UpstashStore_alias_1 }
@@ -5,8 +5,9 @@ import type { DeleteVectorParams } from '@mastra/core/vector';
5
5
  import type { DescribeIndexParams } from '@mastra/core/vector';
6
6
  import type { EvalRow } from '@mastra/core/storage';
7
7
  import type { IndexStats } from '@mastra/core/vector';
8
+ import type { MastraMessageContentV2 } from '@mastra/core/agent';
8
9
  import type { MastraMessageV1 } from '@mastra/core/memory';
9
- import type { MastraMessageV2 } from '@mastra/core/memory';
10
+ import type { MastraMessageV2 } from '@mastra/core/agent';
10
11
  import { MastraStorage } from '@mastra/core/storage';
11
12
  import { MastraVector } from '@mastra/core/vector';
12
13
  import type { OperatorSupport } from '@mastra/core/vector/filter';
@@ -211,6 +212,15 @@ declare class UpstashStore extends MastraStorage {
211
212
  workflowName?: string;
212
213
  }): Promise<WorkflowRun | null>;
213
214
  close(): Promise<void>;
215
+ updateMessages(_args: {
216
+ messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
217
+ id: string;
218
+ content?: {
219
+ metadata?: MastraMessageContentV2['metadata'];
220
+ content?: MastraMessageContentV2['content'];
221
+ };
222
+ }[];
223
+ }): Promise<MastraMessageV2[]>;
214
224
  }
215
225
  export { UpstashStore }
216
226
  export { UpstashStore as UpstashStore_alias_1 }
package/dist/index.cjs CHANGED
@@ -858,6 +858,10 @@ var UpstashStore = class extends storage.MastraStorage {
858
858
  }
859
859
  async close() {
860
860
  }
861
+ async updateMessages(_args) {
862
+ this.logger.error("updateMessages is not yet implemented in UpstashStore");
863
+ throw new Error("Method not implemented");
864
+ }
861
865
  };
862
866
  var UpstashFilterTranslator = class extends filter.BaseFilterTranslator {
863
867
  getSupportedOperators() {
package/dist/index.js CHANGED
@@ -856,6 +856,10 @@ var UpstashStore = class extends MastraStorage {
856
856
  }
857
857
  async close() {
858
858
  }
859
+ async updateMessages(_args) {
860
+ this.logger.error("updateMessages is not yet implemented in UpstashStore");
861
+ throw new Error("Method not implemented");
862
+ }
859
863
  };
860
864
  var UpstashFilterTranslator = class extends BaseFilterTranslator {
861
865
  getSupportedOperators() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/upstash",
3
- "version": "0.11.0-alpha.2",
3
+ "version": "0.11.1-alpha.0",
4
4
  "description": "Upstash provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,9 +31,9 @@
31
31
  "tsup": "^8.5.0",
32
32
  "typescript": "^5.8.3",
33
33
  "vitest": "^3.2.3",
34
- "@internal/lint": "0.0.12",
35
- "@mastra/core": "0.10.6-alpha.4",
36
- "@internal/storage-test-utils": "0.0.8"
34
+ "@internal/lint": "0.0.13",
35
+ "@internal/storage-test-utils": "0.0.9",
36
+ "@mastra/core": "0.10.7-alpha.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@mastra/core": ">=0.10.4-0 <0.11.0"
@@ -1,6 +1,7 @@
1
1
  import { MessageList } from '@mastra/core/agent';
2
+ import type { MastraMessageContentV2, MastraMessageV2 } from '@mastra/core/agent';
2
3
  import type { MetricResult, TestInfo } from '@mastra/core/eval';
3
- import type { StorageThreadType, MastraMessageV1, MastraMessageV2 } from '@mastra/core/memory';
4
+ import type { StorageThreadType, MastraMessageV1 } from '@mastra/core/memory';
4
5
  import {
5
6
  MastraStorage,
6
7
  TABLE_MESSAGES,
@@ -1187,4 +1188,15 @@ export class UpstashStore extends MastraStorage {
1187
1188
  async close(): Promise<void> {
1188
1189
  // No explicit cleanup needed for Upstash Redis
1189
1190
  }
1191
+
1192
+ async updateMessages(_args: {
1193
+ messages: Partial<Omit<MastraMessageV2, 'createdAt'>> &
1194
+ {
1195
+ id: string;
1196
+ content?: { metadata?: MastraMessageContentV2['metadata']; content?: MastraMessageContentV2['content'] };
1197
+ }[];
1198
+ }): Promise<MastraMessageV2[]> {
1199
+ this.logger.error('updateMessages is not yet implemented in UpstashStore');
1200
+ throw new Error('Method not implemented');
1201
+ }
1190
1202
  }