@mastra/convex 1.9.1-alpha.2 → 1.9.2-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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/integrations-databases-convex.md +6 -6
- package/dist/index.cjs +0 -2
- package/dist/index.js +0 -2
- package/dist/schema.cjs +0 -2
- package/dist/schema.js +0 -2
- package/dist/server-CwHPmdFF.cjs +0 -2
- package/dist/server-DS6X9y1L.js +0 -2
- package/package.json +7 -6
- package/dist/cache/client.d.ts.map +0 -1
- package/dist/cache/index.d.ts.map +0 -1
- package/dist/cache/types.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/schema.cjs.map +0 -1
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js.map +0 -1
- package/dist/server/cache.d.ts.map +0 -1
- package/dist/server/index-map.d.ts.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/native-vector.d.ts.map +0 -1
- package/dist/server/observational-memory.d.ts.map +0 -1
- package/dist/server/run-fencing.d.ts.map +0 -1
- package/dist/server/storage.d.ts.map +0 -1
- package/dist/server/workflow-snapshot.d.ts.map +0 -1
- package/dist/server-CwHPmdFF.cjs.map +0 -1
- package/dist/server-DS6X9y1L.js.map +0 -1
- package/dist/storage/client.d.ts.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/channels/index.d.ts.map +0 -1
- package/dist/storage/domains/memory/index.d.ts.map +0 -1
- package/dist/storage/domains/schedules/index.d.ts.map +0 -1
- package/dist/storage/domains/scores/index.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/storage/run-fencing.d.ts.map +0 -1
- package/dist/storage/types.d.ts.map +0 -1
- package/dist/vector/index.d.ts.map +0 -1
- package/dist/vector/native.d.ts.map +0 -1
package/dist/docs/SKILL.md
CHANGED
|
@@ -75,7 +75,7 @@ export default defineSchema({
|
|
|
75
75
|
})
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
### 2. Create the
|
|
78
|
+
### 2. Create the storage handler
|
|
79
79
|
|
|
80
80
|
In `convex/mastra/storage.ts`:
|
|
81
81
|
|
|
@@ -174,11 +174,11 @@ const cache = new ConvexServerCache({
|
|
|
174
174
|
|
|
175
175
|
`ConvexServerCache` stores list entries as separate Convex documents. This avoids growing a stream replay list inside one document and helps stay within Convex's record size limit.
|
|
176
176
|
|
|
177
|
-
Each scalar cache value and each list item is stored as one Convex row and must stay within Convex's row-size limits.
|
|
177
|
+
Each scalar cache value and each list item is stored as one Convex row and must stay within Convex's row-size limits. Large lists are still bounded by Convex query limits when replaying a range.
|
|
178
178
|
|
|
179
|
-
Cache cleanup and `clear()` run in bounded batches. A single client call can loop through up to 1,000 Convex mutations, with each mutation handling up to 25 list items.
|
|
179
|
+
Cache cleanup and `clear()` run in bounded batches. A single client call can loop through up to 1,000 Convex mutations, with each mutation handling up to 25 list items. A key that `clear()` is cleaning returns empty results on read until cleanup finishes.
|
|
180
180
|
|
|
181
|
-
For
|
|
181
|
+
For large cache namespaces, clear incrementally or use narrower prefixes to avoid long-running cleanup operations.
|
|
182
182
|
|
|
183
183
|
During batched cleanup, cache metadata can temporarily use an internal `deleted` state. The next cleanup pass removes those rows. Avoid writing new values with the same prefix until `clear()` finishes.
|
|
184
184
|
|
|
@@ -192,7 +192,7 @@ Use a non-empty `keyPrefix` unless you intentionally want `clear()` to remove ev
|
|
|
192
192
|
|
|
193
193
|
## Additional notes
|
|
194
194
|
|
|
195
|
-
### Schema
|
|
195
|
+
### Schema management
|
|
196
196
|
|
|
197
197
|
The storage implementation uses typed Convex tables for each Mastra domain:
|
|
198
198
|
|
|
@@ -219,7 +219,7 @@ All typed tables include:
|
|
|
219
219
|
- An `id` field for Mastra's record ID (distinct from Convex's auto-generated `_id`)
|
|
220
220
|
- A `by_record_id` index for efficient lookups by Mastra ID
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
The adapter stores data in a layout compatible with Mastra's storage contract and uses Convex's automatic indexing and real-time capabilities.
|
|
223
223
|
|
|
224
224
|
### Environment variables
|
|
225
225
|
|
package/dist/index.cjs
CHANGED
|
@@ -3133,5 +3133,3 @@ exports.mastraThreadsTable = require_schema.mastraThreadsTable;
|
|
|
3133
3133
|
exports.mastraVectorIndexesTable = require_schema.mastraVectorIndexesTable;
|
|
3134
3134
|
exports.mastraVectorsTable = require_schema.mastraVectorsTable;
|
|
3135
3135
|
exports.mastraWorkflowSnapshotsTable = require_schema.mastraWorkflowSnapshotsTable;
|
|
3136
|
-
|
|
3137
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -3044,5 +3044,3 @@ var ConvexNativeVector = class extends MastraVector {
|
|
|
3044
3044
|
}
|
|
3045
3045
|
};
|
|
3046
3046
|
export { ConvexCacheClient, ConvexNativeVector, ConvexServerCache, ConvexStore, ConvexVector, TABLE_BACKGROUND_TASKS, TABLE_CHANNEL_CONFIG, TABLE_CHANNEL_INSTALLATIONS, TABLE_MESSAGES, TABLE_OBSERVATIONAL_MEMORY, TABLE_RESOURCES, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraBackgroundTasksTable, mastraCache, mastraCacheListItemsTable, mastraCacheTable, mastraChannelConfigTable, mastraChannelInstallationsTable, mastraDocumentsTable, mastraMessagesTable, mastraNativeVectorAction, mastraNativeVectorMutation, mastraNativeVectorQuery, mastraObservationalMemoryTable, mastraResourcesTable, mastraScheduleTriggersTable, mastraSchedulesTable, mastraScoresTable, mastraStorage, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable };
|
|
3047
|
-
|
|
3048
|
-
//# sourceMappingURL=index.js.map
|
package/dist/schema.cjs
CHANGED
|
@@ -412,5 +412,3 @@ exports.mastraThreadsTable = mastraThreadsTable;
|
|
|
412
412
|
exports.mastraVectorIndexesTable = mastraVectorIndexesTable;
|
|
413
413
|
exports.mastraVectorsTable = mastraVectorsTable;
|
|
414
414
|
exports.mastraWorkflowSnapshotsTable = mastraWorkflowSnapshotsTable;
|
|
415
|
-
|
|
416
|
-
//# sourceMappingURL=schema.cjs.map
|
package/dist/schema.js
CHANGED
|
@@ -331,5 +331,3 @@ const TABLE_VECTORS = "mastra_vectors";
|
|
|
331
331
|
const TABLE_DOCUMENTS = "mastra_documents";
|
|
332
332
|
const TABLE_OBSERVATIONAL_MEMORY = "mastra_observational_memory";
|
|
333
333
|
export { TABLE_BACKGROUND_TASKS, TABLE_CHANNEL_CONFIG, TABLE_CHANNEL_INSTALLATIONS, TABLE_DOCUMENTS, TABLE_MESSAGES, TABLE_OBSERVATIONAL_MEMORY, TABLE_RESOURCES, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_SCORERS, TABLE_THREADS, TABLE_VECTORS, TABLE_VECTOR_INDEXES, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraBackgroundTasksTable, mastraCacheListItemsTable, mastraCacheTable, mastraChannelConfigTable, mastraChannelInstallationsTable, mastraDocumentsTable, mastraMessagesTable, mastraObservationalMemoryTable, mastraResourcesTable, mastraScheduleTriggersTable, mastraSchedulesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable };
|
|
334
|
-
|
|
335
|
-
//# sourceMappingURL=schema.js.map
|
package/dist/server-CwHPmdFF.cjs
CHANGED
package/dist/server-DS6X9y1L.js
CHANGED
|
@@ -2375,5 +2375,3 @@ const mastraNativeVectorMutation = mutationGeneric({
|
|
|
2375
2375
|
}
|
|
2376
2376
|
});
|
|
2377
2377
|
export { mastraCache as a, mastraStorage as i, mastraNativeVectorMutation as n, mastraNativeVectorQuery as r, mastraNativeVectorAction as t };
|
|
2378
|
-
|
|
2379
|
-
//# sourceMappingURL=server-DS6X9y1L.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/convex",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2-alpha.0",
|
|
4
4
|
"description": "Convex provider for Mastra - includes both storage and vector adapters plus Convex server helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,16 +52,17 @@
|
|
|
52
52
|
"typescript": "^7.0.2",
|
|
53
53
|
"vitest": "5.1.0",
|
|
54
54
|
"@internal/core": "0.1.4",
|
|
55
|
-
"@internal/lint": "0.0.
|
|
56
|
-
"@internal/storage-test-utils": "0.0.
|
|
57
|
-
"@internal/types-builder": "0.0.
|
|
58
|
-
"@mastra/core": "1.
|
|
55
|
+
"@internal/lint": "0.0.151",
|
|
56
|
+
"@internal/storage-test-utils": "0.0.147",
|
|
57
|
+
"@internal/types-builder": "0.0.126",
|
|
58
|
+
"@mastra/core": "1.86.0-alpha.6"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@mastra/core": ">=1.76.0-0 <2.0.0-0"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
|
-
"dist"
|
|
64
|
+
"dist",
|
|
65
|
+
"!dist/**/*.d.*ts.map"
|
|
65
66
|
],
|
|
66
67
|
"homepage": "https://mastra.ai",
|
|
67
68
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/cache/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,aAAa,EAAE,MAAM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