@mastra/convex 1.9.1 → 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.
Files changed (42) hide show
  1. package/dist/docs/SKILL.md +1 -1
  2. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  3. package/dist/docs/references/integrations-databases-convex.md +6 -6
  4. package/dist/index.cjs +0 -2
  5. package/dist/index.js +0 -2
  6. package/dist/schema.cjs +0 -2
  7. package/dist/schema.js +0 -2
  8. package/dist/server-CwHPmdFF.cjs +0 -2
  9. package/dist/server-DS6X9y1L.js +0 -2
  10. package/package.json +7 -6
  11. package/dist/cache/client.d.ts.map +0 -1
  12. package/dist/cache/index.d.ts.map +0 -1
  13. package/dist/cache/types.d.ts.map +0 -1
  14. package/dist/index.cjs.map +0 -1
  15. package/dist/index.d.ts.map +0 -1
  16. package/dist/index.js.map +0 -1
  17. package/dist/schema.cjs.map +0 -1
  18. package/dist/schema.d.ts.map +0 -1
  19. package/dist/schema.js.map +0 -1
  20. package/dist/server/cache.d.ts.map +0 -1
  21. package/dist/server/index-map.d.ts.map +0 -1
  22. package/dist/server/index.d.ts.map +0 -1
  23. package/dist/server/native-vector.d.ts.map +0 -1
  24. package/dist/server/observational-memory.d.ts.map +0 -1
  25. package/dist/server/run-fencing.d.ts.map +0 -1
  26. package/dist/server/storage.d.ts.map +0 -1
  27. package/dist/server/workflow-snapshot.d.ts.map +0 -1
  28. package/dist/server-CwHPmdFF.cjs.map +0 -1
  29. package/dist/server-DS6X9y1L.js.map +0 -1
  30. package/dist/storage/client.d.ts.map +0 -1
  31. package/dist/storage/db/index.d.ts.map +0 -1
  32. package/dist/storage/domains/background-tasks/index.d.ts.map +0 -1
  33. package/dist/storage/domains/channels/index.d.ts.map +0 -1
  34. package/dist/storage/domains/memory/index.d.ts.map +0 -1
  35. package/dist/storage/domains/schedules/index.d.ts.map +0 -1
  36. package/dist/storage/domains/scores/index.d.ts.map +0 -1
  37. package/dist/storage/domains/workflows/index.d.ts.map +0 -1
  38. package/dist/storage/index.d.ts.map +0 -1
  39. package/dist/storage/run-fencing.d.ts.map +0 -1
  40. package/dist/storage/types.d.ts.map +0 -1
  41. package/dist/vector/index.d.ts.map +0 -1
  42. package/dist/vector/native.d.ts.map +0 -1
@@ -3,7 +3,7 @@ name: mastra-convex
3
3
  description: Documentation for @mastra/convex. Use when working with @mastra/convex APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/convex"
6
- version: "1.9.1"
6
+ version: "1.9.2-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.1",
2
+ "version": "1.9.2-alpha.0",
3
3
  "package": "@mastra/convex",
4
4
  "exports": {
5
5
  "ConvexCacheClient": {
@@ -75,7 +75,7 @@ export default defineSchema({
75
75
  })
76
76
  ```
77
77
 
78
- ### 2. Create the Storage Handler
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. Very large lists are still bounded by Convex query limits when replaying a range.
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. While `clear()` is cleaning a key, reads for that key can return empty results until cleanup finishes.
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 very large cache namespaces, clear incrementally or use narrower prefixes to avoid long-running cleanup operations.
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 Management
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
- This design ensures compatibility with Mastra's storage contract while using Convex's automatic indexing and real-time capabilities.
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
@@ -2404,5 +2404,3 @@ Object.defineProperty(exports, "mastraStorage", {
2404
2404
  return mastraStorage;
2405
2405
  }
2406
2406
  });
2407
-
2408
- //# sourceMappingURL=server-CwHPmdFF.cjs.map
@@ -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.1",
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.150",
56
- "@internal/storage-test-utils": "0.0.146",
57
- "@internal/types-builder": "0.0.125",
58
- "@mastra/core": "1.84.0"
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,CAAC;IACtB,cAAc,EAAE,MAA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