@mastra/upstash 1.2.2 → 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,40 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 1.3.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed multi-thread message queries so pagination metadata accounts for all queried threads. ([#20303](https://github.com/mastra-ai/mastra/pull/20303))
8
+
9
+ - Updated dependencies [[`a211d09`](https://github.com/mastra-ai/mastra/commit/a211d09185dc65a746534914cf38b67f21ee9bac), [`05db566`](https://github.com/mastra-ai/mastra/commit/05db566fcbdcbf33d0bffca0c72ec30129e2e3ca), [`8124754`](https://github.com/mastra-ai/mastra/commit/8124754ae89fbc69f8136d1df4a91904d0f84c4e)]:
10
+ - @mastra/core@1.54.0-alpha.2
11
+
12
+ ## 1.3.0-alpha.0
13
+
14
+ ### Minor Changes
15
+
16
+ - Added exact metadata filtering to message history queries across Memory APIs and supported storage providers. ([#19991](https://github.com/mastra-ai/mastra/pull/19991))
17
+
18
+ ```ts
19
+ const messages = await memory.recall({
20
+ threadId: 'thread-1',
21
+ filter: {
22
+ metadata: {
23
+ status: 'done',
24
+ priority: 'high',
25
+ },
26
+ },
27
+ });
28
+ ```
29
+
30
+ Multiple fields use AND semantics. Supported values are strings, finite numbers, booleans, and `null`.
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`0dca9d0`](https://github.com/mastra-ai/mastra/commit/0dca9d0b1356024a53b72ea6f040db528b126caa)]:
35
+ - @mastra/core@1.54.0-alpha.0
36
+ - @mastra/redis@1.3.0-alpha.0
37
+
3
38
  ## 1.2.2
4
39
 
5
40
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-upstash
3
3
  description: Documentation for @mastra/upstash. Use when working with @mastra/upstash APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/upstash"
6
- version: "1.2.2"
6
+ version: "1.3.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,15 +1,6 @@
1
1
  {
2
- "version": "1.2.2",
2
+ "version": "1.3.0-alpha.1",
3
3
  "package": "@mastra/upstash",
4
- "exports": {
5
- "RedisServerCache": {
6
- "types": "dist/index.d.ts",
7
- "implementation": "dist/redis"
8
- },
9
- "upstashPreset": {
10
- "types": "dist/index.d.ts",
11
- "implementation": "dist/redis"
12
- }
13
- },
4
+ "exports": {},
14
5
  "modules": {}
15
6
  }
@@ -10,6 +10,8 @@ This is useful for maintaining ongoing state that's always relevant and should a
10
10
 
11
11
  If you use [Observational Memory](https://mastra.ai/docs/memory/observational-memory), `observationalMemory.observation.manageWorkingMemory` lets OM update working memory for the agent.
12
12
 
13
+ > **📹 Watch:** Watch [Mastra working memory](https://www.youtube.com/watch?v=UMy_JHLf1n8\&pp=ygUVbWFzdHJhIHdvcmtpbmcgbWVtb3J5) to see how agents keep persistent user context available across interactions.
14
+
13
15
  Working memory can persist at two different scopes:
14
16
 
15
17
  - **Resource-scoped** (default): Memory persists across all conversation threads for the same user
@@ -43,9 +45,7 @@ const agent = new Agent({
43
45
 
44
46
  ## How it works
45
47
 
46
- Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information:
47
-
48
- [YouTube video player](https://www.youtube-nocookie.com/embed/UMy_JHLf1n8)
48
+ Working memory is a block of Markdown text that the agent is able to update over time to store continuously relevant information.
49
49
 
50
50
  ## Memory persistence scopes
51
51
 
@@ -399,11 +399,11 @@ const response = await agent.generate('What do you know about me?', {
399
399
 
400
400
  ## Opt in to state signals (experimental)
401
401
 
402
- By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/agents/signals) instead by setting `useStateSignals: true`:
402
+ By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/long-running-agents/signals) instead by setting `useStateSignals: true`:
403
403
 
404
404
  ```typescript
405
405
  const memory = new Memory({
406
- storage: new LibSQLStore({ url: 'file:./mastra.db' }),
406
+ storage: new LibSQLStore({ id: 'mastra-storage', url: 'file:./mastra.db' }),
407
407
  options: {
408
408
  workingMemory: {
409
409
  enabled: true,
@@ -14,7 +14,7 @@ import { MongoDBVector } from '@mastra/mongodb'
14
14
  const store = new MongoDBVector({
15
15
  id: 'mongodb-vector',
16
16
  uri: process.env.MONGODB_URI,
17
- dbName: process.env.MONGODB_DATABASE,
17
+ dbName: process.env.MONGODB_DB_NAME,
18
18
  })
19
19
  await store.createIndex({
20
20
  indexName: 'myCollection',
@@ -27,10 +27,31 @@ await store.upsert({
27
27
  })
28
28
  ```
29
29
 
30
- ### Using MongoDB Atlas Vector search
30
+ ### Using MongoDB Atlas Vector Search
31
31
 
32
32
  For detailed setup instructions and best practices, see the [official MongoDB Atlas Vector Search documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?utm_campaign=devrel\&utm_source=third-party-content\&utm_medium=cta\&utm_content=mastra-docs).
33
33
 
34
+ ### Using VoyageAI with MongoDB
35
+
36
+ MongoDB works seamlessly with VoyageAI's embedding models, which are optimized for retrieval tasks. For complete examples and specialized models, see the [VoyageAI embeddings documentation](https://mastra.ai/models/embeddings) and [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb).
37
+
38
+ ### Hybrid Search (Vector + Full-Text)
39
+
40
+ MongoDB supports hybrid search that fuses vector similarity with BM25 full-text search using server-side `$rankFusion` (requires MongoDB >= 8.0; generally available from 8.1, and enabled on Atlas 8.0.x). This is useful when you want to combine semantic and keyword-based retrieval:
41
+
42
+ ```ts
43
+ await store.createSearchIndex({ indexName: 'myCollection', fields: ['text'] })
44
+ const results = await store.hybridQuery({
45
+ indexName: 'myCollection',
46
+ queryVector: embedding,
47
+ query: 'search terms',
48
+ paths: ['text'],
49
+ topK: 10,
50
+ })
51
+ ```
52
+
53
+ See the [MongoDB vector reference](https://mastra.ai/reference/vectors/mongodb) for details on `createSearchIndex()`, `textQuery()`, and `hybridQuery()`.
54
+
34
55
  **PgVector**:
35
56
 
36
57
  ```ts
@@ -359,6 +380,7 @@ The dimension size must match the output dimension of your chosen embedding mode
359
380
 
360
381
  - `OpenAI text-embedding-3-small`: 1536 dimensions (or custom, e.g., 256)
361
382
  - `Cohere embed-multilingual-v3`: 1024 dimensions
383
+ - `VoyageAI voyage-3.5`: 1024 dimensions (or custom: 256, 512, 1024, 2048)
362
384
  - `Google gemini-embedding-001`: 768 dimensions (or custom)
363
385
 
364
386
  > **Warning:** Index dimensions can't be changed after creation. To use a different model, delete and recreate the index with the new dimension size.