@mastra/convex 1.3.2 → 1.4.0-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.
- package/CHANGELOG.md +38 -0
- package/README.md +28 -17
- package/dist/{chunk-6P3LEDHY.cjs → chunk-PKCUPSKO.cjs} +315 -2
- package/dist/chunk-PKCUPSKO.cjs.map +1 -0
- package/dist/{chunk-MC75WADX.js → chunk-QWWFHN52.js} +41 -3
- package/dist/chunk-QWWFHN52.js.map +1 -0
- package/dist/{chunk-77UWNT5X.js → chunk-SQMTQ7ZD.js} +315 -2
- package/dist/chunk-SQMTQ7ZD.js.map +1 -0
- package/dist/{chunk-SFRHJGSM.cjs → chunk-ZCCKLZQH.cjs} +42 -2
- package/dist/chunk-ZCCKLZQH.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +41 -33
- package/dist/docs/references/reference-storage-convex.md +18 -11
- package/dist/index.cjs +586 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +542 -4
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +38 -30
- package/dist/schema.d.ts +95 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/server/index-map.d.ts.map +1 -1
- package/dist/server/index.cjs +41 -33
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/observational-memory.d.ts +52 -0
- package/dist/server/observational-memory.d.ts.map +1 -0
- package/dist/server/storage.d.ts.map +1 -1
- package/dist/storage/db/index.d.ts +65 -14
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +23 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/schedules/index.d.ts.map +1 -1
- package/dist/storage/domains/scores/index.d.ts.map +1 -1
- package/dist/storage/types.d.ts +133 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/dist/vector/native.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-6P3LEDHY.cjs.map +0 -1
- package/dist/chunk-77UWNT5X.js.map +0 -1
- package/dist/chunk-MC75WADX.js.map +0 -1
- package/dist/chunk-SFRHJGSM.cjs.map +0 -1
|
@@ -1,131 +1,139 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.4.0-alpha.0",
|
|
3
3
|
"package": "@mastra/convex",
|
|
4
4
|
"exports": {
|
|
5
5
|
"mastraCache": {
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"implementation": "dist/chunk-
|
|
7
|
+
"implementation": "dist/chunk-SQMTQ7ZD.js"
|
|
8
8
|
},
|
|
9
9
|
"mastraNativeVectorAction": {
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
|
-
"implementation": "dist/chunk-
|
|
11
|
+
"implementation": "dist/chunk-SQMTQ7ZD.js"
|
|
12
12
|
},
|
|
13
13
|
"mastraNativeVectorMutation": {
|
|
14
14
|
"types": "dist/index.d.ts",
|
|
15
|
-
"implementation": "dist/chunk-
|
|
15
|
+
"implementation": "dist/chunk-SQMTQ7ZD.js"
|
|
16
16
|
},
|
|
17
17
|
"mastraNativeVectorQuery": {
|
|
18
18
|
"types": "dist/index.d.ts",
|
|
19
|
-
"implementation": "dist/chunk-
|
|
19
|
+
"implementation": "dist/chunk-SQMTQ7ZD.js"
|
|
20
20
|
},
|
|
21
21
|
"mastraStorage": {
|
|
22
22
|
"types": "dist/index.d.ts",
|
|
23
|
-
"implementation": "dist/chunk-
|
|
23
|
+
"implementation": "dist/chunk-SQMTQ7ZD.js"
|
|
24
24
|
},
|
|
25
25
|
"TABLE_BACKGROUND_TASKS": {
|
|
26
26
|
"types": "dist/index.d.ts",
|
|
27
|
-
"implementation": "dist/chunk-
|
|
27
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
28
28
|
},
|
|
29
29
|
"TABLE_CHANNEL_CONFIG": {
|
|
30
30
|
"types": "dist/index.d.ts",
|
|
31
|
-
"implementation": "dist/chunk-
|
|
31
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
32
32
|
},
|
|
33
33
|
"TABLE_CHANNEL_INSTALLATIONS": {
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
|
-
"implementation": "dist/chunk-
|
|
35
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
36
36
|
},
|
|
37
37
|
"TABLE_MESSAGES": {
|
|
38
38
|
"types": "dist/index.d.ts",
|
|
39
|
-
"implementation": "dist/chunk-
|
|
39
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
40
|
+
},
|
|
41
|
+
"TABLE_OBSERVATIONAL_MEMORY": {
|
|
42
|
+
"types": "dist/index.d.ts",
|
|
43
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
40
44
|
},
|
|
41
45
|
"TABLE_RESOURCES": {
|
|
42
46
|
"types": "dist/index.d.ts",
|
|
43
|
-
"implementation": "dist/chunk-
|
|
47
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
44
48
|
},
|
|
45
49
|
"TABLE_SCHEDULES": {
|
|
46
50
|
"types": "dist/index.d.ts",
|
|
47
|
-
"implementation": "dist/chunk-
|
|
51
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
48
52
|
},
|
|
49
53
|
"TABLE_SCHEDULE_TRIGGERS": {
|
|
50
54
|
"types": "dist/index.d.ts",
|
|
51
|
-
"implementation": "dist/chunk-
|
|
55
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
52
56
|
},
|
|
53
57
|
"TABLE_SCORERS": {
|
|
54
58
|
"types": "dist/index.d.ts",
|
|
55
|
-
"implementation": "dist/chunk-
|
|
59
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
56
60
|
},
|
|
57
61
|
"TABLE_THREADS": {
|
|
58
62
|
"types": "dist/index.d.ts",
|
|
59
|
-
"implementation": "dist/chunk-
|
|
63
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
60
64
|
},
|
|
61
65
|
"TABLE_WORKFLOW_SNAPSHOT": {
|
|
62
66
|
"types": "dist/index.d.ts",
|
|
63
|
-
"implementation": "dist/chunk-
|
|
67
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
64
68
|
},
|
|
65
69
|
"defineMastraNativeVectorTable": {
|
|
66
70
|
"types": "dist/index.d.ts",
|
|
67
|
-
"implementation": "dist/chunk-
|
|
68
|
-
"line":
|
|
71
|
+
"implementation": "dist/chunk-QWWFHN52.js",
|
|
72
|
+
"line": 183
|
|
69
73
|
},
|
|
70
74
|
"mastraBackgroundTasksTable": {
|
|
71
75
|
"types": "dist/index.d.ts",
|
|
72
|
-
"implementation": "dist/chunk-
|
|
76
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
73
77
|
},
|
|
74
78
|
"mastraCacheListItemsTable": {
|
|
75
79
|
"types": "dist/index.d.ts",
|
|
76
|
-
"implementation": "dist/chunk-
|
|
80
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
77
81
|
},
|
|
78
82
|
"mastraCacheTable": {
|
|
79
83
|
"types": "dist/index.d.ts",
|
|
80
|
-
"implementation": "dist/chunk-
|
|
84
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
81
85
|
},
|
|
82
86
|
"mastraChannelConfigTable": {
|
|
83
87
|
"types": "dist/index.d.ts",
|
|
84
|
-
"implementation": "dist/chunk-
|
|
88
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
85
89
|
},
|
|
86
90
|
"mastraChannelInstallationsTable": {
|
|
87
91
|
"types": "dist/index.d.ts",
|
|
88
|
-
"implementation": "dist/chunk-
|
|
92
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
89
93
|
},
|
|
90
94
|
"mastraDocumentsTable": {
|
|
91
95
|
"types": "dist/index.d.ts",
|
|
92
|
-
"implementation": "dist/chunk-
|
|
96
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
93
97
|
},
|
|
94
98
|
"mastraMessagesTable": {
|
|
95
99
|
"types": "dist/index.d.ts",
|
|
96
|
-
"implementation": "dist/chunk-
|
|
100
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
101
|
+
},
|
|
102
|
+
"mastraObservationalMemoryTable": {
|
|
103
|
+
"types": "dist/index.d.ts",
|
|
104
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
97
105
|
},
|
|
98
106
|
"mastraResourcesTable": {
|
|
99
107
|
"types": "dist/index.d.ts",
|
|
100
|
-
"implementation": "dist/chunk-
|
|
108
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
101
109
|
},
|
|
102
110
|
"mastraScheduleTriggersTable": {
|
|
103
111
|
"types": "dist/index.d.ts",
|
|
104
|
-
"implementation": "dist/chunk-
|
|
112
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
105
113
|
},
|
|
106
114
|
"mastraSchedulesTable": {
|
|
107
115
|
"types": "dist/index.d.ts",
|
|
108
|
-
"implementation": "dist/chunk-
|
|
116
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
109
117
|
},
|
|
110
118
|
"mastraScoresTable": {
|
|
111
119
|
"types": "dist/index.d.ts",
|
|
112
|
-
"implementation": "dist/chunk-
|
|
120
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
113
121
|
},
|
|
114
122
|
"mastraThreadsTable": {
|
|
115
123
|
"types": "dist/index.d.ts",
|
|
116
|
-
"implementation": "dist/chunk-
|
|
124
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
117
125
|
},
|
|
118
126
|
"mastraVectorIndexesTable": {
|
|
119
127
|
"types": "dist/index.d.ts",
|
|
120
|
-
"implementation": "dist/chunk-
|
|
128
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
121
129
|
},
|
|
122
130
|
"mastraVectorsTable": {
|
|
123
131
|
"types": "dist/index.d.ts",
|
|
124
|
-
"implementation": "dist/chunk-
|
|
132
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
125
133
|
},
|
|
126
134
|
"mastraWorkflowSnapshotsTable": {
|
|
127
135
|
"types": "dist/index.d.ts",
|
|
128
|
-
"implementation": "dist/chunk-
|
|
136
|
+
"implementation": "dist/chunk-QWWFHN52.js"
|
|
129
137
|
}
|
|
130
138
|
},
|
|
131
139
|
"modules": {}
|
|
@@ -6,7 +6,7 @@ The Convex storage implementation provides a serverless storage solution using [
|
|
|
6
6
|
|
|
7
7
|
> **Observability Not Supported:** Convex storage **doesn't support the observability domain**. Traces from the `MastraStorageExporter` can't be persisted to Convex, and [Studio's](https://mastra.ai/docs/studio/overview) observability features won't work with Convex 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.
|
|
8
8
|
|
|
9
|
-
> **Record Size Limit:** Convex enforces a **1 MiB maximum record size**. This limit can be exceeded when storing messages with base64-encoded attachments such as images. See [Handling large attachments](https://mastra.ai/docs/memory/
|
|
9
|
+
> **Record Size Limit:** Convex enforces a **1 MiB maximum record size**. This limit can be exceeded when storing messages with base64-encoded attachments such as images. See [Handling large attachments](https://mastra.ai/docs/memory/memory-processors) for workarounds including uploading attachments to external storage like S3, Cloudflare R2, or [Convex file storage](https://docs.convex.dev/file-storage).
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
mastraResourcesTable,
|
|
51
51
|
mastraWorkflowSnapshotsTable,
|
|
52
52
|
mastraScoresTable,
|
|
53
|
+
mastraObservationalMemoryTable,
|
|
53
54
|
mastraVectorIndexesTable,
|
|
54
55
|
mastraVectorsTable,
|
|
55
56
|
mastraCacheTable,
|
|
@@ -63,6 +64,7 @@ export default defineSchema({
|
|
|
63
64
|
mastra_resources: mastraResourcesTable,
|
|
64
65
|
mastra_workflow_snapshots: mastraWorkflowSnapshotsTable,
|
|
65
66
|
mastra_scorers: mastraScoresTable,
|
|
67
|
+
mastra_observational_memory: mastraObservationalMemoryTable,
|
|
66
68
|
mastra_vector_indexes: mastraVectorIndexesTable,
|
|
67
69
|
mastra_vectors: mastraVectorsTable,
|
|
68
70
|
mastra_cache: mastraCacheTable,
|
|
@@ -192,16 +194,21 @@ Use a non-empty `keyPrefix` unless you intentionally want `clear()` to remove ev
|
|
|
192
194
|
|
|
193
195
|
The storage implementation uses typed Convex tables for each Mastra domain:
|
|
194
196
|
|
|
195
|
-
| Domain
|
|
196
|
-
|
|
|
197
|
-
| Threads
|
|
198
|
-
| Messages
|
|
199
|
-
| Resources
|
|
200
|
-
|
|
|
201
|
-
|
|
|
202
|
-
|
|
|
203
|
-
| Cache
|
|
204
|
-
|
|
|
197
|
+
| Domain | Convex Table | Purpose |
|
|
198
|
+
| -------------------- | ----------------------------- | ----------------------------------------- |
|
|
199
|
+
| Threads | `mastra_threads` | Conversation threads |
|
|
200
|
+
| Messages | `mastra_messages` | Chat messages |
|
|
201
|
+
| Resources | `mastra_resources` | User working memory |
|
|
202
|
+
| Observational Memory | `mastra_observational_memory` | Observational memory generations |
|
|
203
|
+
| Workflows | `mastra_workflow_snapshots` | Workflow state |
|
|
204
|
+
| Scorers | `mastra_scorers` | Evaluation data |
|
|
205
|
+
| Cache | `mastra_cache` | Cache values, counters, and list metadata |
|
|
206
|
+
| Cache Items | `mastra_cache_list_items` | Cache list entries |
|
|
207
|
+
| Fallback | `mastra_documents` | Unknown tables |
|
|
208
|
+
|
|
209
|
+
### Observational memory
|
|
210
|
+
|
|
211
|
+
`ConvexStore` supports [observational memory](https://mastra.ai/docs/memory/observational-memory). Add `mastraObservationalMemoryTable` to your Convex schema and redeploy with `npx convex deploy` to enable it. Existing deployments created before this table was added need the same schema update.
|
|
205
212
|
|
|
206
213
|
### Architecture
|
|
207
214
|
|