@mastra/convex 1.1.0 → 1.2.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +31 -13
  3. package/dist/{chunk-FZDLZ4S3.js → chunk-AJFME2ZF.js} +323 -16
  4. package/dist/chunk-AJFME2ZF.js.map +1 -0
  5. package/dist/{chunk-JPWDG4L3.js → chunk-MC75WADX.js} +79 -4
  6. package/dist/chunk-MC75WADX.js.map +1 -0
  7. package/dist/{chunk-EEELVBWO.cjs → chunk-ORSDZTO4.cjs} +322 -15
  8. package/dist/chunk-ORSDZTO4.cjs.map +1 -0
  9. package/dist/{chunk-CV23JOCS.cjs → chunk-SFRHJGSM.cjs} +102 -2
  10. package/dist/chunk-SFRHJGSM.cjs.map +1 -0
  11. package/dist/docs/SKILL.md +1 -1
  12. package/dist/docs/assets/SOURCE_MAP.json +63 -23
  13. package/dist/index.cjs +634 -69
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +574 -49
  16. package/dist/index.js.map +1 -1
  17. package/dist/schema.cjs +60 -20
  18. package/dist/schema.d.ts +192 -2
  19. package/dist/schema.d.ts.map +1 -1
  20. package/dist/schema.js +1 -1
  21. package/dist/server/index-map.d.ts.map +1 -1
  22. package/dist/server/index.cjs +63 -23
  23. package/dist/server/index.d.ts +1 -1
  24. package/dist/server/index.d.ts.map +1 -1
  25. package/dist/server/index.js +2 -2
  26. package/dist/server/storage.d.ts.map +1 -1
  27. package/dist/storage/db/index.d.ts +28 -1
  28. package/dist/storage/db/index.d.ts.map +1 -1
  29. package/dist/storage/domains/background-tasks/index.d.ts.map +1 -1
  30. package/dist/storage/domains/channels/index.d.ts +19 -0
  31. package/dist/storage/domains/channels/index.d.ts.map +1 -0
  32. package/dist/storage/domains/schedules/index.d.ts +19 -0
  33. package/dist/storage/domains/schedules/index.d.ts.map +1 -0
  34. package/dist/storage/index.d.ts +3 -1
  35. package/dist/storage/index.d.ts.map +1 -1
  36. package/dist/storage/types.d.ts +42 -0
  37. package/dist/storage/types.d.ts.map +1 -1
  38. package/package.json +4 -4
  39. package/dist/chunk-CV23JOCS.cjs.map +0 -1
  40. package/dist/chunk-EEELVBWO.cjs.map +0 -1
  41. package/dist/chunk-FZDLZ4S3.js.map +0 -1
  42. package/dist/chunk-JPWDG4L3.js.map +0 -1
package/dist/schema.cjs CHANGED
@@ -1,84 +1,124 @@
1
1
  'use strict';
2
2
 
3
- var chunkCV23JOCS_cjs = require('./chunk-CV23JOCS.cjs');
3
+ var chunkSFRHJGSM_cjs = require('./chunk-SFRHJGSM.cjs');
4
4
 
5
5
 
6
6
 
7
+ Object.defineProperty(exports, "TABLE_BACKGROUND_TASKS", {
8
+ enumerable: true,
9
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_BACKGROUND_TASKS; }
10
+ });
11
+ Object.defineProperty(exports, "TABLE_CHANNEL_CONFIG", {
12
+ enumerable: true,
13
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_CHANNEL_CONFIG; }
14
+ });
15
+ Object.defineProperty(exports, "TABLE_CHANNEL_INSTALLATIONS", {
16
+ enumerable: true,
17
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_CHANNEL_INSTALLATIONS; }
18
+ });
7
19
  Object.defineProperty(exports, "TABLE_DOCUMENTS", {
8
20
  enumerable: true,
9
- get: function () { return chunkCV23JOCS_cjs.TABLE_DOCUMENTS; }
21
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_DOCUMENTS; }
10
22
  });
11
23
  Object.defineProperty(exports, "TABLE_MESSAGES", {
12
24
  enumerable: true,
13
- get: function () { return chunkCV23JOCS_cjs.TABLE_MESSAGES; }
25
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_MESSAGES; }
14
26
  });
15
27
  Object.defineProperty(exports, "TABLE_RESOURCES", {
16
28
  enumerable: true,
17
- get: function () { return chunkCV23JOCS_cjs.TABLE_RESOURCES; }
29
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_RESOURCES; }
30
+ });
31
+ Object.defineProperty(exports, "TABLE_SCHEDULES", {
32
+ enumerable: true,
33
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCHEDULES; }
34
+ });
35
+ Object.defineProperty(exports, "TABLE_SCHEDULE_TRIGGERS", {
36
+ enumerable: true,
37
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCHEDULE_TRIGGERS; }
18
38
  });
19
39
  Object.defineProperty(exports, "TABLE_SCORERS", {
20
40
  enumerable: true,
21
- get: function () { return chunkCV23JOCS_cjs.TABLE_SCORERS; }
41
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCORERS; }
22
42
  });
23
43
  Object.defineProperty(exports, "TABLE_THREADS", {
24
44
  enumerable: true,
25
- get: function () { return chunkCV23JOCS_cjs.TABLE_THREADS; }
45
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_THREADS; }
26
46
  });
27
47
  Object.defineProperty(exports, "TABLE_VECTORS", {
28
48
  enumerable: true,
29
- get: function () { return chunkCV23JOCS_cjs.TABLE_VECTORS; }
49
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_VECTORS; }
30
50
  });
31
51
  Object.defineProperty(exports, "TABLE_VECTOR_INDEXES", {
32
52
  enumerable: true,
33
- get: function () { return chunkCV23JOCS_cjs.TABLE_VECTOR_INDEXES; }
53
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_VECTOR_INDEXES; }
34
54
  });
35
55
  Object.defineProperty(exports, "TABLE_WORKFLOW_SNAPSHOT", {
36
56
  enumerable: true,
37
- get: function () { return chunkCV23JOCS_cjs.TABLE_WORKFLOW_SNAPSHOT; }
57
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_WORKFLOW_SNAPSHOT; }
38
58
  });
39
59
  Object.defineProperty(exports, "defineMastraNativeVectorTable", {
40
60
  enumerable: true,
41
- get: function () { return chunkCV23JOCS_cjs.defineMastraNativeVectorTable; }
61
+ get: function () { return chunkSFRHJGSM_cjs.defineMastraNativeVectorTable; }
62
+ });
63
+ Object.defineProperty(exports, "mastraBackgroundTasksTable", {
64
+ enumerable: true,
65
+ get: function () { return chunkSFRHJGSM_cjs.mastraBackgroundTasksTable; }
42
66
  });
43
67
  Object.defineProperty(exports, "mastraCacheListItemsTable", {
44
68
  enumerable: true,
45
- get: function () { return chunkCV23JOCS_cjs.mastraCacheListItemsTable; }
69
+ get: function () { return chunkSFRHJGSM_cjs.mastraCacheListItemsTable; }
46
70
  });
47
71
  Object.defineProperty(exports, "mastraCacheTable", {
48
72
  enumerable: true,
49
- get: function () { return chunkCV23JOCS_cjs.mastraCacheTable; }
73
+ get: function () { return chunkSFRHJGSM_cjs.mastraCacheTable; }
74
+ });
75
+ Object.defineProperty(exports, "mastraChannelConfigTable", {
76
+ enumerable: true,
77
+ get: function () { return chunkSFRHJGSM_cjs.mastraChannelConfigTable; }
78
+ });
79
+ Object.defineProperty(exports, "mastraChannelInstallationsTable", {
80
+ enumerable: true,
81
+ get: function () { return chunkSFRHJGSM_cjs.mastraChannelInstallationsTable; }
50
82
  });
51
83
  Object.defineProperty(exports, "mastraDocumentsTable", {
52
84
  enumerable: true,
53
- get: function () { return chunkCV23JOCS_cjs.mastraDocumentsTable; }
85
+ get: function () { return chunkSFRHJGSM_cjs.mastraDocumentsTable; }
54
86
  });
55
87
  Object.defineProperty(exports, "mastraMessagesTable", {
56
88
  enumerable: true,
57
- get: function () { return chunkCV23JOCS_cjs.mastraMessagesTable; }
89
+ get: function () { return chunkSFRHJGSM_cjs.mastraMessagesTable; }
58
90
  });
59
91
  Object.defineProperty(exports, "mastraResourcesTable", {
60
92
  enumerable: true,
61
- get: function () { return chunkCV23JOCS_cjs.mastraResourcesTable; }
93
+ get: function () { return chunkSFRHJGSM_cjs.mastraResourcesTable; }
94
+ });
95
+ Object.defineProperty(exports, "mastraScheduleTriggersTable", {
96
+ enumerable: true,
97
+ get: function () { return chunkSFRHJGSM_cjs.mastraScheduleTriggersTable; }
98
+ });
99
+ Object.defineProperty(exports, "mastraSchedulesTable", {
100
+ enumerable: true,
101
+ get: function () { return chunkSFRHJGSM_cjs.mastraSchedulesTable; }
62
102
  });
63
103
  Object.defineProperty(exports, "mastraScoresTable", {
64
104
  enumerable: true,
65
- get: function () { return chunkCV23JOCS_cjs.mastraScoresTable; }
105
+ get: function () { return chunkSFRHJGSM_cjs.mastraScoresTable; }
66
106
  });
67
107
  Object.defineProperty(exports, "mastraThreadsTable", {
68
108
  enumerable: true,
69
- get: function () { return chunkCV23JOCS_cjs.mastraThreadsTable; }
109
+ get: function () { return chunkSFRHJGSM_cjs.mastraThreadsTable; }
70
110
  });
71
111
  Object.defineProperty(exports, "mastraVectorIndexesTable", {
72
112
  enumerable: true,
73
- get: function () { return chunkCV23JOCS_cjs.mastraVectorIndexesTable; }
113
+ get: function () { return chunkSFRHJGSM_cjs.mastraVectorIndexesTable; }
74
114
  });
75
115
  Object.defineProperty(exports, "mastraVectorsTable", {
76
116
  enumerable: true,
77
- get: function () { return chunkCV23JOCS_cjs.mastraVectorsTable; }
117
+ get: function () { return chunkSFRHJGSM_cjs.mastraVectorsTable; }
78
118
  });
79
119
  Object.defineProperty(exports, "mastraWorkflowSnapshotsTable", {
80
120
  enumerable: true,
81
- get: function () { return chunkCV23JOCS_cjs.mastraWorkflowSnapshotsTable; }
121
+ get: function () { return chunkSFRHJGSM_cjs.mastraWorkflowSnapshotsTable; }
82
122
  });
83
123
  //# sourceMappingURL=schema.cjs.map
84
124
  //# sourceMappingURL=schema.cjs.map
package/dist/schema.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * avoid pulling in Node.js dependencies, making it safe to use in Convex's
9
9
  * sandboxed schema evaluation environment.
10
10
  */
11
- import { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS } from '@mastra/core/storage/constants';
11
+ import { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_CHANNEL_INSTALLATIONS, TABLE_CHANNEL_CONFIG, TABLE_BACKGROUND_TASKS } from '@mastra/core/storage/constants';
12
12
  /**
13
13
  * Threads table - stores conversation threads
14
14
  * Schema: TABLE_SCHEMAS[TABLE_THREADS]
@@ -91,6 +91,196 @@ export declare const mastraScoresTable: import("convex/server").TableDefinition<
91
91
  by_run: ["runId", "_creationTime"];
92
92
  by_created: ["createdAt", "_creationTime"];
93
93
  }, {}, {}>;
94
+ /**
95
+ * Schedules table - stores workflow scheduler state.
96
+ *
97
+ * Schedule times are represented as JavaScript millisecond timestamps. Target
98
+ * and metadata payloads are serialized JSON strings because user-provided JSON
99
+ * can contain Convex-reserved field names such as `$schema`.
100
+ */
101
+ export declare const mastraSchedulesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
102
+ metadata?: string | null | undefined;
103
+ timezone?: string | null | undefined;
104
+ owner_type?: string | null | undefined;
105
+ owner_id?: string | null | undefined;
106
+ workflow_id?: string | null | undefined;
107
+ last_fire_at?: number | null | undefined;
108
+ last_run_id?: string | null | undefined;
109
+ id: string;
110
+ status: string;
111
+ cron: string;
112
+ target: string;
113
+ next_fire_at: number;
114
+ updated_at: number;
115
+ created_at: number;
116
+ }, {
117
+ id: import("convex/values").VString<string, "required">;
118
+ target: import("convex/values").VString<string, "required">;
119
+ cron: import("convex/values").VString<string, "required">;
120
+ timezone: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
121
+ status: import("convex/values").VString<string, "required">;
122
+ next_fire_at: import("convex/values").VFloat64<number, "required">;
123
+ last_fire_at: import("convex/values").VUnion<number | null | undefined, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
124
+ last_run_id: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
125
+ created_at: import("convex/values").VFloat64<number, "required">;
126
+ updated_at: import("convex/values").VFloat64<number, "required">;
127
+ metadata: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
128
+ owner_type: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
129
+ owner_id: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
130
+ workflow_id: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
131
+ }, "required", "id" | "status" | "metadata" | "cron" | "timezone" | "target" | "owner_type" | "owner_id" | "workflow_id" | "next_fire_at" | "updated_at" | "created_at" | "last_fire_at" | "last_run_id">, {
132
+ by_record_id: ["id", "_creationTime"];
133
+ by_status_next_fire_at: ["status", "next_fire_at", "_creationTime"];
134
+ by_workflow_status: ["workflow_id", "status", "_creationTime"];
135
+ by_workflow_id: ["workflow_id", "_creationTime"];
136
+ by_owner: ["owner_type", "owner_id", "_creationTime"];
137
+ by_owner_id: ["owner_id", "_creationTime"];
138
+ by_created: ["created_at", "_creationTime"];
139
+ }, {}, {}>;
140
+ /**
141
+ * Schedule trigger table - stores scheduler trigger history.
142
+ */
143
+ export declare const mastraScheduleTriggersTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
144
+ error?: string | null | undefined;
145
+ run_id?: string | null | undefined;
146
+ metadata?: string | null | undefined;
147
+ parent_trigger_id?: string | null | undefined;
148
+ id: string;
149
+ outcome: string;
150
+ schedule_id: string;
151
+ actual_fire_at: number;
152
+ scheduled_fire_at: number;
153
+ trigger_kind: string;
154
+ }, {
155
+ id: import("convex/values").VString<string, "required">;
156
+ schedule_id: import("convex/values").VString<string, "required">;
157
+ run_id: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
158
+ scheduled_fire_at: import("convex/values").VFloat64<number, "required">;
159
+ actual_fire_at: import("convex/values").VFloat64<number, "required">;
160
+ outcome: import("convex/values").VString<string, "required">;
161
+ error: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
162
+ trigger_kind: import("convex/values").VString<string, "required">;
163
+ parent_trigger_id: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
164
+ metadata: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
165
+ }, "required", "error" | "id" | "run_id" | "metadata" | "outcome" | "schedule_id" | "actual_fire_at" | "parent_trigger_id" | "scheduled_fire_at" | "trigger_kind">, {
166
+ by_record_id: ["id", "_creationTime"];
167
+ by_schedule_actual: ["schedule_id", "actual_fire_at", "_creationTime"];
168
+ by_parent_trigger: ["parent_trigger_id", "_creationTime"];
169
+ }, {}, {}>;
170
+ /**
171
+ * Channel installations table - stores platform app installations for agents.
172
+ *
173
+ * Platform data is serialized as a JSON string because user/platform payloads
174
+ * can contain Convex-reserved field names such as `$schema`.
175
+ */
176
+ export declare const mastraChannelInstallationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
177
+ error?: string | null | undefined;
178
+ webhookId?: string | null | undefined;
179
+ configHash?: string | null | undefined;
180
+ id: string;
181
+ status: string;
182
+ createdAt: string;
183
+ agentId: string;
184
+ updatedAt: string;
185
+ data: string;
186
+ platform: string;
187
+ }, {
188
+ id: import("convex/values").VString<string, "required">;
189
+ platform: import("convex/values").VString<string, "required">;
190
+ agentId: import("convex/values").VString<string, "required">;
191
+ status: import("convex/values").VString<string, "required">;
192
+ webhookId: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
193
+ data: import("convex/values").VString<string, "required">;
194
+ configHash: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
195
+ error: import("convex/values").VUnion<string | null | undefined, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
196
+ createdAt: import("convex/values").VString<string, "required">;
197
+ updatedAt: import("convex/values").VString<string, "required">;
198
+ }, "required", "error" | "id" | "status" | "createdAt" | "agentId" | "updatedAt" | "data" | "platform" | "webhookId" | "configHash">, {
199
+ by_record_id: ["id", "_creationTime"];
200
+ by_webhook: ["webhookId", "_creationTime"];
201
+ by_platform_agent: ["platform", "agentId", "_creationTime"];
202
+ by_platform: ["platform", "_creationTime"];
203
+ }, {}, {}>;
204
+ /**
205
+ * Channel config table - stores platform-level channel configuration.
206
+ *
207
+ * The synthetic id mirrors `platform` so the generic Convex storage operations
208
+ * can use their existing by-record-id lookup path.
209
+ */
210
+ export declare const mastraChannelConfigTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
211
+ id: string;
212
+ updatedAt: string;
213
+ data: string;
214
+ platform: string;
215
+ }, {
216
+ id: import("convex/values").VString<string, "required">;
217
+ platform: import("convex/values").VString<string, "required">;
218
+ data: import("convex/values").VString<string, "required">;
219
+ updatedAt: import("convex/values").VString<string, "required">;
220
+ }, "required", "id" | "updatedAt" | "data" | "platform">, {
221
+ by_record_id: ["id", "_creationTime"];
222
+ by_platform: ["platform", "_creationTime"];
223
+ }, {}, {}>;
224
+ /**
225
+ * Background tasks table - stores durable background task state.
226
+ *
227
+ * JSON-like payloads are stored as encoded strings to match the existing
228
+ * Convex storage serialization used by this adapter.
229
+ *
230
+ * Optional fields are stored as null when cleared so partial Convex patches can
231
+ * preserve the existing task row while explicitly removing suspended state.
232
+ */
233
+ export declare const mastraBackgroundTasksTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
234
+ error: string | null;
235
+ result: string | null;
236
+ id: string;
237
+ run_id: string;
238
+ status: "pending" | "running" | "suspended" | "completed" | "failed" | "cancelled" | "timed_out";
239
+ createdAt: string;
240
+ tool_call_id: string;
241
+ tool_name: string;
242
+ agent_id: string;
243
+ thread_id: string | null;
244
+ resource_id: string | null;
245
+ args: string;
246
+ suspend_payload: string | null;
247
+ retry_count: number;
248
+ max_retries: number;
249
+ timeout_ms: number;
250
+ startedAt: string | null;
251
+ suspendedAt: string | null;
252
+ completedAt: string | null;
253
+ }, {
254
+ id: import("convex/values").VString<string, "required">;
255
+ tool_call_id: import("convex/values").VString<string, "required">;
256
+ tool_name: import("convex/values").VString<string, "required">;
257
+ agent_id: import("convex/values").VString<string, "required">;
258
+ run_id: import("convex/values").VString<string, "required">;
259
+ thread_id: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
260
+ resource_id: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
261
+ status: import("convex/values").VUnion<"pending" | "running" | "suspended" | "completed" | "failed" | "cancelled" | "timed_out", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"suspended", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">, import("convex/values").VLiteral<"timed_out", "required">], "required", never>;
262
+ args: import("convex/values").VString<string, "required">;
263
+ result: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
264
+ error: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
265
+ suspend_payload: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
266
+ retry_count: import("convex/values").VFloat64<number, "required">;
267
+ max_retries: import("convex/values").VFloat64<number, "required">;
268
+ timeout_ms: import("convex/values").VFloat64<number, "required">;
269
+ createdAt: import("convex/values").VString<string, "required">;
270
+ startedAt: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
271
+ suspendedAt: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
272
+ completedAt: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
273
+ }, "required", "error" | "result" | "id" | "run_id" | "status" | "createdAt" | "tool_call_id" | "tool_name" | "agent_id" | "thread_id" | "resource_id" | "args" | "suspend_payload" | "retry_count" | "max_retries" | "timeout_ms" | "startedAt" | "suspendedAt" | "completedAt">, {
274
+ by_record_id: ["id", "_creationTime"];
275
+ by_status_created: ["status", "createdAt", "_creationTime"];
276
+ by_agent_status: ["agent_id", "status", "_creationTime"];
277
+ by_run: ["run_id", "_creationTime"];
278
+ by_tool_call: ["tool_call_id", "_creationTime"];
279
+ by_thread: ["thread_id", "_creationTime"];
280
+ by_resource: ["resource_id", "_creationTime"];
281
+ by_tool: ["tool_name", "_creationTime"];
282
+ by_created: ["createdAt", "_creationTime"];
283
+ }, {}, {}>;
94
284
  /**
95
285
  * Vector indexes table - stores metadata about vector indexes
96
286
  */
@@ -219,7 +409,7 @@ export declare const mastraDocumentsTable: import("convex/server").TableDefiniti
219
409
  by_table: ["table", "_creationTime"];
220
410
  by_table_primary: ["table", "primaryKey", "_creationTime"];
221
411
  }, {}, {}>;
222
- export { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS };
412
+ export { TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_CHANNEL_INSTALLATIONS, TABLE_CHANNEL_CONFIG, TABLE_BACKGROUND_TASKS, };
223
413
  export declare const TABLE_VECTOR_INDEXES = "mastra_vector_indexes";
224
414
  export declare const TABLE_VECTORS = "mastra_vectors";
225
415
  export declare const TABLE_DOCUMENTS = "mastra_documents";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAEL,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACd,MAAM,gCAAgC,CAAC;AAoDxC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;UAIM,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;UAIO,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;UAEI,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;UAaJ,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;UAKO,CAAC;AAMtC;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;UAQH,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;UAOI,CAAC;AAEpC,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,UAAU,EACV,eAAgC,EAChC,MAAc,GACf,EAAE,6BAA6B;;;;;;;;;;WAuB/B;AAMD;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;UASW,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;UAOI,CAAC;AAM3C;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;UAMoB,CAAC;AAMtD,OA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CF,CAAC;AAMtC;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;UAQH,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;UAOI,CAAC;AAEpC,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,UAAU,EACV,eAAgC,EAChC,MAAc,GACf,EAAE,6BAA6B;;;;;;;;;;WAuB/B;AAMD;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;UASW,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;UAOI,CAAC;AAM3C;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;UAMoB,CAAC;AAMtD,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAGF,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,eAAe,qBAAqB,CAAC"}
package/dist/schema.js CHANGED
@@ -1,3 +1,3 @@
1
- export { TABLE_DOCUMENTS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_VECTORS, TABLE_VECTOR_INDEXES, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraCacheListItemsTable, mastraCacheTable, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from './chunk-JPWDG4L3.js';
1
+ export { TABLE_BACKGROUND_TASKS, TABLE_CHANNEL_CONFIG, TABLE_CHANNEL_INSTALLATIONS, TABLE_DOCUMENTS, TABLE_MESSAGES, 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, mastraResourcesTable, mastraScheduleTriggersTable, mastraSchedulesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from './chunk-MC75WADX.js';
2
2
  //# sourceMappingURL=schema.js.map
3
3
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-map.d.ts","sourceRoot":"","sources":["../../src/server/index-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAmCrF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,cAAc,EAAE,GACxB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG,IAAI,CA+BhE"}
1
+ {"version":3,"file":"index-map.d.ts","sourceRoot":"","sources":["../../src/server/index-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAsErF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,cAAc,EAAE,GACxB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,cAAc,EAAE,CAAA;CAAE,GAAG,IAAI,CA+BhE"}
@@ -1,93 +1,133 @@
1
1
  'use strict';
2
2
 
3
- var chunkEEELVBWO_cjs = require('../chunk-EEELVBWO.cjs');
4
- var chunkCV23JOCS_cjs = require('../chunk-CV23JOCS.cjs');
3
+ var chunkORSDZTO4_cjs = require('../chunk-ORSDZTO4.cjs');
4
+ var chunkSFRHJGSM_cjs = require('../chunk-SFRHJGSM.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "mastraCache", {
9
9
  enumerable: true,
10
- get: function () { return chunkEEELVBWO_cjs.mastraCache; }
10
+ get: function () { return chunkORSDZTO4_cjs.mastraCache; }
11
11
  });
12
12
  Object.defineProperty(exports, "mastraNativeVectorAction", {
13
13
  enumerable: true,
14
- get: function () { return chunkEEELVBWO_cjs.mastraNativeVectorAction; }
14
+ get: function () { return chunkORSDZTO4_cjs.mastraNativeVectorAction; }
15
15
  });
16
16
  Object.defineProperty(exports, "mastraNativeVectorMutation", {
17
17
  enumerable: true,
18
- get: function () { return chunkEEELVBWO_cjs.mastraNativeVectorMutation; }
18
+ get: function () { return chunkORSDZTO4_cjs.mastraNativeVectorMutation; }
19
19
  });
20
20
  Object.defineProperty(exports, "mastraNativeVectorQuery", {
21
21
  enumerable: true,
22
- get: function () { return chunkEEELVBWO_cjs.mastraNativeVectorQuery; }
22
+ get: function () { return chunkORSDZTO4_cjs.mastraNativeVectorQuery; }
23
23
  });
24
24
  Object.defineProperty(exports, "mastraStorage", {
25
25
  enumerable: true,
26
- get: function () { return chunkEEELVBWO_cjs.mastraStorage; }
26
+ get: function () { return chunkORSDZTO4_cjs.mastraStorage; }
27
+ });
28
+ Object.defineProperty(exports, "TABLE_BACKGROUND_TASKS", {
29
+ enumerable: true,
30
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_BACKGROUND_TASKS; }
31
+ });
32
+ Object.defineProperty(exports, "TABLE_CHANNEL_CONFIG", {
33
+ enumerable: true,
34
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_CHANNEL_CONFIG; }
35
+ });
36
+ Object.defineProperty(exports, "TABLE_CHANNEL_INSTALLATIONS", {
37
+ enumerable: true,
38
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_CHANNEL_INSTALLATIONS; }
27
39
  });
28
40
  Object.defineProperty(exports, "TABLE_MESSAGES", {
29
41
  enumerable: true,
30
- get: function () { return chunkCV23JOCS_cjs.TABLE_MESSAGES; }
42
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_MESSAGES; }
31
43
  });
32
44
  Object.defineProperty(exports, "TABLE_RESOURCES", {
33
45
  enumerable: true,
34
- get: function () { return chunkCV23JOCS_cjs.TABLE_RESOURCES; }
46
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_RESOURCES; }
47
+ });
48
+ Object.defineProperty(exports, "TABLE_SCHEDULES", {
49
+ enumerable: true,
50
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCHEDULES; }
51
+ });
52
+ Object.defineProperty(exports, "TABLE_SCHEDULE_TRIGGERS", {
53
+ enumerable: true,
54
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCHEDULE_TRIGGERS; }
35
55
  });
36
56
  Object.defineProperty(exports, "TABLE_SCORERS", {
37
57
  enumerable: true,
38
- get: function () { return chunkCV23JOCS_cjs.TABLE_SCORERS; }
58
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_SCORERS; }
39
59
  });
40
60
  Object.defineProperty(exports, "TABLE_THREADS", {
41
61
  enumerable: true,
42
- get: function () { return chunkCV23JOCS_cjs.TABLE_THREADS; }
62
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_THREADS; }
43
63
  });
44
64
  Object.defineProperty(exports, "TABLE_WORKFLOW_SNAPSHOT", {
45
65
  enumerable: true,
46
- get: function () { return chunkCV23JOCS_cjs.TABLE_WORKFLOW_SNAPSHOT; }
66
+ get: function () { return chunkSFRHJGSM_cjs.TABLE_WORKFLOW_SNAPSHOT; }
47
67
  });
48
68
  Object.defineProperty(exports, "defineMastraNativeVectorTable", {
49
69
  enumerable: true,
50
- get: function () { return chunkCV23JOCS_cjs.defineMastraNativeVectorTable; }
70
+ get: function () { return chunkSFRHJGSM_cjs.defineMastraNativeVectorTable; }
71
+ });
72
+ Object.defineProperty(exports, "mastraBackgroundTasksTable", {
73
+ enumerable: true,
74
+ get: function () { return chunkSFRHJGSM_cjs.mastraBackgroundTasksTable; }
51
75
  });
52
76
  Object.defineProperty(exports, "mastraCacheListItemsTable", {
53
77
  enumerable: true,
54
- get: function () { return chunkCV23JOCS_cjs.mastraCacheListItemsTable; }
78
+ get: function () { return chunkSFRHJGSM_cjs.mastraCacheListItemsTable; }
55
79
  });
56
80
  Object.defineProperty(exports, "mastraCacheTable", {
57
81
  enumerable: true,
58
- get: function () { return chunkCV23JOCS_cjs.mastraCacheTable; }
82
+ get: function () { return chunkSFRHJGSM_cjs.mastraCacheTable; }
83
+ });
84
+ Object.defineProperty(exports, "mastraChannelConfigTable", {
85
+ enumerable: true,
86
+ get: function () { return chunkSFRHJGSM_cjs.mastraChannelConfigTable; }
87
+ });
88
+ Object.defineProperty(exports, "mastraChannelInstallationsTable", {
89
+ enumerable: true,
90
+ get: function () { return chunkSFRHJGSM_cjs.mastraChannelInstallationsTable; }
59
91
  });
60
92
  Object.defineProperty(exports, "mastraDocumentsTable", {
61
93
  enumerable: true,
62
- get: function () { return chunkCV23JOCS_cjs.mastraDocumentsTable; }
94
+ get: function () { return chunkSFRHJGSM_cjs.mastraDocumentsTable; }
63
95
  });
64
96
  Object.defineProperty(exports, "mastraMessagesTable", {
65
97
  enumerable: true,
66
- get: function () { return chunkCV23JOCS_cjs.mastraMessagesTable; }
98
+ get: function () { return chunkSFRHJGSM_cjs.mastraMessagesTable; }
67
99
  });
68
100
  Object.defineProperty(exports, "mastraResourcesTable", {
69
101
  enumerable: true,
70
- get: function () { return chunkCV23JOCS_cjs.mastraResourcesTable; }
102
+ get: function () { return chunkSFRHJGSM_cjs.mastraResourcesTable; }
103
+ });
104
+ Object.defineProperty(exports, "mastraScheduleTriggersTable", {
105
+ enumerable: true,
106
+ get: function () { return chunkSFRHJGSM_cjs.mastraScheduleTriggersTable; }
107
+ });
108
+ Object.defineProperty(exports, "mastraSchedulesTable", {
109
+ enumerable: true,
110
+ get: function () { return chunkSFRHJGSM_cjs.mastraSchedulesTable; }
71
111
  });
72
112
  Object.defineProperty(exports, "mastraScoresTable", {
73
113
  enumerable: true,
74
- get: function () { return chunkCV23JOCS_cjs.mastraScoresTable; }
114
+ get: function () { return chunkSFRHJGSM_cjs.mastraScoresTable; }
75
115
  });
76
116
  Object.defineProperty(exports, "mastraThreadsTable", {
77
117
  enumerable: true,
78
- get: function () { return chunkCV23JOCS_cjs.mastraThreadsTable; }
118
+ get: function () { return chunkSFRHJGSM_cjs.mastraThreadsTable; }
79
119
  });
80
120
  Object.defineProperty(exports, "mastraVectorIndexesTable", {
81
121
  enumerable: true,
82
- get: function () { return chunkCV23JOCS_cjs.mastraVectorIndexesTable; }
122
+ get: function () { return chunkSFRHJGSM_cjs.mastraVectorIndexesTable; }
83
123
  });
84
124
  Object.defineProperty(exports, "mastraVectorsTable", {
85
125
  enumerable: true,
86
- get: function () { return chunkCV23JOCS_cjs.mastraVectorsTable; }
126
+ get: function () { return chunkSFRHJGSM_cjs.mastraVectorsTable; }
87
127
  });
88
128
  Object.defineProperty(exports, "mastraWorkflowSnapshotsTable", {
89
129
  enumerable: true,
90
- get: function () { return chunkCV23JOCS_cjs.mastraWorkflowSnapshotsTable; }
130
+ get: function () { return chunkSFRHJGSM_cjs.mastraWorkflowSnapshotsTable; }
91
131
  });
92
132
  //# sourceMappingURL=index.cjs.map
93
133
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  export { mastraCache } from './cache.js';
2
2
  export { mastraStorage } from './storage.js';
3
3
  export { mastraNativeVectorAction, mastraNativeVectorMutation, mastraNativeVectorQuery } from './native-vector.js';
4
- export { mastraThreadsTable, mastraMessagesTable, mastraResourcesTable, mastraWorkflowSnapshotsTable, mastraScoresTable, mastraVectorIndexesTable, mastraVectorsTable, defineMastraNativeVectorTable, type MastraNativeVectorTableConfig, mastraCacheTable, mastraCacheListItemsTable, mastraDocumentsTable, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, } from '../schema.js';
4
+ export { mastraThreadsTable, mastraMessagesTable, mastraResourcesTable, mastraWorkflowSnapshotsTable, mastraScoresTable, mastraSchedulesTable, mastraScheduleTriggersTable, mastraChannelInstallationsTable, mastraChannelConfigTable, mastraBackgroundTasksTable, mastraVectorIndexesTable, mastraVectorsTable, defineMastraNativeVectorTable, type MastraNativeVectorTableConfig, mastraCacheTable, mastraCacheListItemsTable, mastraDocumentsTable, TABLE_WORKFLOW_SNAPSHOT, TABLE_MESSAGES, TABLE_THREADS, TABLE_RESOURCES, TABLE_SCORERS, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_CHANNEL_INSTALLATIONS, TABLE_CHANNEL_CONFIG, TABLE_BACKGROUND_TASKS, } from '../schema.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAIhH,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,KAAK,6BAA6B,EAClC,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EAEpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAIhH,OAAO,EAEL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,6BAA6B,EAC7B,KAAK,6BAA6B,EAClC,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EAEpB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
@@ -1,4 +1,4 @@
1
- export { mastraCache, mastraNativeVectorAction, mastraNativeVectorMutation, mastraNativeVectorQuery, mastraStorage } from '../chunk-FZDLZ4S3.js';
2
- export { TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraCacheListItemsTable, mastraCacheTable, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-JPWDG4L3.js';
1
+ export { mastraCache, mastraNativeVectorAction, mastraNativeVectorMutation, mastraNativeVectorQuery, mastraStorage } from '../chunk-AJFME2ZF.js';
2
+ export { TABLE_BACKGROUND_TASKS, TABLE_CHANNEL_CONFIG, TABLE_CHANNEL_INSTALLATIONS, TABLE_MESSAGES, TABLE_RESOURCES, TABLE_SCHEDULES, TABLE_SCHEDULE_TRIGGERS, TABLE_SCORERS, TABLE_THREADS, TABLE_WORKFLOW_SNAPSHOT, defineMastraNativeVectorTable, mastraBackgroundTasksTable, mastraCacheListItemsTable, mastraCacheTable, mastraChannelConfigTable, mastraChannelInstallationsTable, mastraDocumentsTable, mastraMessagesTable, mastraResourcesTable, mastraScheduleTriggersTable, mastraSchedulesTable, mastraScoresTable, mastraThreadsTable, mastraVectorIndexesTable, mastraVectorsTable, mastraWorkflowSnapshotsTable } from '../chunk-MC75WADX.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/server/storage.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAIvE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAsFxE;;;GAGG;AACH,eAAO,MAAM,aAAa,gGAuBxB,CAAC;AAEH;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CA0J1B"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/server/storage.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAIvE,OAAO,KAAK,EAAkB,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAwOxF;;;GAGG;AACH,eAAO,MAAM,aAAa,gGA+BxB,CAAC;AAEH;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,EACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,eAAe,CAAC,CAyV1B"}
@@ -55,12 +55,39 @@ export declare class ConvexDB extends MastraBase {
55
55
  tableName: TABLE_NAMES;
56
56
  records: Record<string, any>[];
57
57
  }): Promise<void>;
58
+ patch({ tableName, id, record, }: {
59
+ tableName: TABLE_NAMES;
60
+ id: string;
61
+ record: Record<string, any>;
62
+ }): Promise<boolean>;
58
63
  load<R>({ tableName, keys }: {
59
64
  tableName: TABLE_NAMES;
60
65
  keys: Record<string, any>;
61
66
  }): Promise<R | null>;
62
- queryTable<R>(tableName: TABLE_NAMES, filters?: EqualityFilter[], indexHint?: IndexHint): Promise<R[]>;
67
+ queryTable<R>(tableName: TABLE_NAMES, filters?: EqualityFilter[], indexHint?: IndexHint, limit?: number): Promise<R[]>;
63
68
  deleteMany(tableName: TABLE_NAMES, ids: string[]): Promise<void>;
69
+ createSchedule(record: Record<string, any>): Promise<void>;
70
+ recordScheduleTrigger(record: Record<string, any>): Promise<void>;
71
+ listDueSchedules<R>(now: number, limit?: number): Promise<R[]>;
72
+ updateScheduleNextFire({ id, expectedNextFireAt, newNextFireAt, lastFireAt, lastRunId, }: {
73
+ id: string;
74
+ expectedNextFireAt: number;
75
+ newNextFireAt: number;
76
+ lastFireAt: number;
77
+ lastRunId: string;
78
+ }): Promise<boolean>;
79
+ updateSchedule<R>({ id, patch }: {
80
+ id: string;
81
+ patch: Record<string, any>;
82
+ }): Promise<R>;
83
+ listScheduleTriggers<R>({ scheduleId, fromActualFireAt, toActualFireAt, limit, }: {
84
+ scheduleId: string;
85
+ fromActualFireAt?: number;
86
+ toActualFireAt?: number;
87
+ limit?: number;
88
+ }): Promise<R[]>;
89
+ deleteScheduleTriggers(scheduleId: string): Promise<void>;
64
90
  private normalizeRecord;
91
+ private normalizePatch;
65
92
  }
66
93
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/db/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,sBAAsB,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,CAQjF;AAED,qBAAa,QAAS,SAAQ,UAAU;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,iBAAiB;IAIhD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5D,WAAW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