@mastra/upstash 1.6.2 → 1.6.3-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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/integrations-databases-upstash.md +5 -5
- package/dist/docs/references/integrations-vectors-upstash.md +4 -4
- package/dist/index.cjs +0 -2
- package/dist/index.js +0 -2
- package/package.json +8 -7
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/storage/db/index.d.ts.map +0 -1
- package/dist/storage/domains/background-tasks/index.d.ts.map +0 -1
- package/dist/storage/domains/memory/index.d.ts.map +0 -1
- package/dist/storage/domains/run-fencing.d.ts.map +0 -1
- package/dist/storage/domains/scores/index.d.ts.map +0 -1
- package/dist/storage/domains/utils.d.ts.map +0 -1
- package/dist/storage/domains/workflows/index.d.ts.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/vector/filter.d.ts.map +0 -1
- package/dist/vector/index.d.ts.map +0 -1
- package/dist/vector/prompt.d.ts.map +0 -1
- package/dist/vector/types.d.ts.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
The Upstash storage implementation provides a serverless-friendly storage solution using Upstash's Redis-compatible key-value store.
|
|
8
8
|
|
|
9
|
-
> **Pricing:** When using Mastra with Upstash, the pay-as-you-go model can result in
|
|
9
|
+
> **Pricing:** When using Mastra with Upstash, the pay-as-you-go model can result in high costs due to the high volume of Redis commands generated during agent conversations. Use a **fixed pricing plan** for predictable costs. See [Upstash pricing](https://upstash.com/pricing/redis) for details and [GitHub issue #5850](https://github.com/mastra-ai/mastra/issues/5850) for context.
|
|
10
10
|
|
|
11
11
|
> **Observability Not Supported:** Upstash storage **doesn't support the observability domain**. Traces from the `MastraStorageExporter` can't be persisted to Upstash, and [Studio's](https://mastra.ai/docs/studio/overview) observability features won't work with Upstash as your only storage provider. To enable observability, use [composite storage](https://mastra.ai/reference/storage/composite) to route observability data to a supported provider like ClickHouse.
|
|
12
12
|
|
|
@@ -58,7 +58,7 @@ const storage = new UpstashStore({
|
|
|
58
58
|
|
|
59
59
|
## Additional notes
|
|
60
60
|
|
|
61
|
-
### Key
|
|
61
|
+
### Key structure
|
|
62
62
|
|
|
63
63
|
The Upstash storage implementation uses a key-value structure:
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ The Upstash storage implementation uses a key-value structure:
|
|
|
66
66
|
- Message keys: `{prefix}message:{messageId}`
|
|
67
67
|
- Metadata keys: `{prefix}metadata:{entityId}`
|
|
68
68
|
|
|
69
|
-
### Serverless
|
|
69
|
+
### Serverless benefits
|
|
70
70
|
|
|
71
71
|
Upstash storage is particularly well-suited for serverless deployments:
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@ Upstash storage is particularly well-suited for serverless deployments:
|
|
|
75
75
|
- Global replication options
|
|
76
76
|
- Edge-compatible
|
|
77
77
|
|
|
78
|
-
### Data
|
|
78
|
+
### Data persistence
|
|
79
79
|
|
|
80
80
|
Upstash provides:
|
|
81
81
|
|
|
@@ -83,7 +83,7 @@ Upstash provides:
|
|
|
83
83
|
- Point-in-time recovery
|
|
84
84
|
- Cross-region replication options
|
|
85
85
|
|
|
86
|
-
### Performance
|
|
86
|
+
### Performance considerations
|
|
87
87
|
|
|
88
88
|
For optimal performance:
|
|
89
89
|
|
|
@@ -108,7 +108,7 @@ Attempts to delete an item by its ID from the specified index. Logs an error mes
|
|
|
108
108
|
|
|
109
109
|
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both, and neither can be empty.
|
|
110
110
|
|
|
111
|
-
Filter deletion runs one approximate query with `topK: 1000` and deletes the returned IDs. `deleteVectors()` returns `Promise<void>` and
|
|
111
|
+
Filter deletion runs one approximate query with `topK: 1000` and deletes the returned IDs. `deleteVectors()` returns `Promise<void>` and doesn't report how many vectors it deleted, so repeating the call can't guarantee complete deletion. Use [Upstash's filter-delete API](https://upstash.com/docs/vector/api/endpoints/delete) when complete filter deletion is required. Deleting by `ids` isn't subject to this query limit.
|
|
112
112
|
|
|
113
113
|
**indexName** (`string`): Namespace to delete from
|
|
114
114
|
|
|
@@ -120,7 +120,7 @@ Filter deletion runs one approximate query with `topK: 1000` and deletes the ret
|
|
|
120
120
|
|
|
121
121
|
Upstash Vector supports hybrid search that combines semantic search (dense vectors) with keyword-based search (sparse vectors) for improved relevance and accuracy.
|
|
122
122
|
|
|
123
|
-
### Basic
|
|
123
|
+
### Basic hybrid usage
|
|
124
124
|
|
|
125
125
|
```typescript
|
|
126
126
|
import { UpstashVector } from '@mastra/upstash'
|
|
@@ -157,7 +157,7 @@ const results = await vectorStore.query({
|
|
|
157
157
|
})
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
### Advanced
|
|
160
|
+
### Advanced hybrid search options
|
|
161
161
|
|
|
162
162
|
```typescript
|
|
163
163
|
import { FusionAlgorithm, QueryMode } from '@upstash/vector'
|
|
@@ -189,7 +189,7 @@ const sparseResults = await vectorStore.query({
|
|
|
189
189
|
})
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
### Updating
|
|
192
|
+
### Updating hybrid vectors
|
|
193
193
|
|
|
194
194
|
```typescript
|
|
195
195
|
// Update both dense and sparse components
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -3065,5 +3065,3 @@ Example Complex Query:
|
|
|
3065
3065
|
]
|
|
3066
3066
|
}`;
|
|
3067
3067
|
export { BackgroundTasksUpstash, RedisServerCache, ScoresUpstash, StoreMemoryUpstash, UPSTASH_PROMPT, UpstashServerCache, UpstashStore, UpstashVector, WorkflowsUpstash, upstashPreset };
|
|
3068
|
-
|
|
3069
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/upstash",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3-alpha.1",
|
|
4
4
|
"description": "Upstash provider for Mastra - includes both vector and db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@upstash/redis": "^1.39.0",
|
|
24
24
|
"@upstash/vector": "^1.2.3",
|
|
25
|
-
"@mastra/redis": "1.4.
|
|
25
|
+
"@mastra/redis": "1.4.15-alpha.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "22.19.15",
|
|
@@ -33,16 +33,17 @@
|
|
|
33
33
|
"tsx": "^4.23.15",
|
|
34
34
|
"typescript": "^7.0.2",
|
|
35
35
|
"vitest": "5.1.0",
|
|
36
|
-
"@
|
|
37
|
-
"@internal/storage-test-utils": "0.0.
|
|
38
|
-
"@internal/types-builder": "0.0.
|
|
39
|
-
"@
|
|
36
|
+
"@mastra/core": "1.86.0-alpha.7",
|
|
37
|
+
"@internal/storage-test-utils": "0.0.147",
|
|
38
|
+
"@internal/types-builder": "0.0.126",
|
|
39
|
+
"@internal/lint": "0.0.151"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@mastra/core": ">=1.76.0-0 <2.0.0-0"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
|
-
"dist"
|
|
45
|
+
"dist",
|
|
46
|
+
"!dist/**/*.d.*ts.map"
|
|
46
47
|
],
|
|
47
48
|
"homepage": "https://mastra.ai",
|
|
48
49
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,YAAY,MAAM,EAAE,kBAAkB,EAAE,OAAO,GAAE,yBAA8B,EAgB9E;CACF;AAGD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
|