@mastra/convex 1.0.10 → 1.0.11-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 +9 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/background-tasks/index.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/convex
|
|
2
2
|
|
|
3
|
+
## 1.0.11-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Track `suspendedAt` and `suspendPayload` on background tasks. SQL adapters auto-migrate the new columns via `alterTable`. ([#16260](https://github.com/mastra-ai/mastra/pull/16260))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`9f17410`](https://github.com/mastra-ai/mastra/commit/9f1741080def23d42ee50b39887a385ae316a3c6), [`c6eb39e`](https://github.com/mastra-ai/mastra/commit/c6eb39ea6dca381c6563cb240237fbe608e02f93), [`900d086`](https://github.com/mastra-ai/mastra/commit/900d086bb737b9cf2fcf68f11b0389b801a2738c), [`4c0e286`](https://github.com/mastra-ai/mastra/commit/4c0e28637c9cfb4f416549b55e97ebfa13319dfc), [`25184ff`](https://github.com/mastra-ai/mastra/commit/25184ffaf1293ec95119426eb1a1f8d38831b96c), [`aebde9c`](https://github.com/mastra-ai/mastra/commit/aebde9cfacf56592c6b6350cae721740fe090b8a)]:
|
|
10
|
+
- @mastra/core@1.33.0-alpha.4
|
|
11
|
+
|
|
3
12
|
## 1.0.10
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -193,8 +193,10 @@ function toStored(task) {
|
|
|
193
193
|
args: serializeJson(task.args),
|
|
194
194
|
result: serializeJson(task.result),
|
|
195
195
|
error: serializeJson(task.error),
|
|
196
|
+
suspendPayload: serializeJson(task.suspendPayload),
|
|
196
197
|
createdAt: task.createdAt.toISOString(),
|
|
197
198
|
startedAt: task.startedAt?.toISOString(),
|
|
199
|
+
suspendedAt: task.suspendedAt?.toISOString(),
|
|
198
200
|
completedAt: task.completedAt?.toISOString()
|
|
199
201
|
};
|
|
200
202
|
}
|
|
@@ -219,11 +221,13 @@ function fromStored(stored) {
|
|
|
219
221
|
runId: stored.runId,
|
|
220
222
|
result: parseJson(stored.result),
|
|
221
223
|
error: parseJson(stored.error),
|
|
224
|
+
suspendPayload: parseJson(stored.suspendPayload),
|
|
222
225
|
retryCount: stored.retryCount,
|
|
223
226
|
maxRetries: stored.maxRetries,
|
|
224
227
|
timeoutMs: stored.timeoutMs,
|
|
225
228
|
createdAt: new Date(stored.createdAt),
|
|
226
229
|
startedAt: stored.startedAt ? new Date(stored.startedAt) : void 0,
|
|
230
|
+
suspendedAt: stored.suspendedAt ? new Date(stored.suspendedAt) : void 0,
|
|
227
231
|
completedAt: stored.completedAt ? new Date(stored.completedAt) : void 0
|
|
228
232
|
};
|
|
229
233
|
}
|
|
@@ -247,8 +251,10 @@ var BackgroundTasksConvex = class extends storage.BackgroundTasksStorage {
|
|
|
247
251
|
if ("status" in update) merged.status = update.status;
|
|
248
252
|
if ("result" in update) merged.result = update.result;
|
|
249
253
|
if ("error" in update) merged.error = update.error;
|
|
254
|
+
if ("suspendPayload" in update) merged.suspendPayload = update.suspendPayload;
|
|
250
255
|
if ("retryCount" in update) merged.retryCount = update.retryCount;
|
|
251
256
|
if ("startedAt" in update) merged.startedAt = update.startedAt;
|
|
257
|
+
if ("suspendedAt" in update) merged.suspendedAt = update.suspendedAt;
|
|
252
258
|
if ("completedAt" in update) merged.completedAt = update.completedAt;
|
|
253
259
|
await this.#db.deleteMany(storage.TABLE_BACKGROUND_TASKS, [taskId]);
|
|
254
260
|
await this.#db.insert({ tableName: storage.TABLE_BACKGROUND_TASKS, record: toStored(merged) });
|
|
@@ -267,6 +273,7 @@ var BackgroundTasksConvex = class extends storage.BackgroundTasksStorage {
|
|
|
267
273
|
if (filter.agentId) tasks = tasks.filter((t) => t.agentId === filter.agentId);
|
|
268
274
|
if (filter.threadId) tasks = tasks.filter((t) => t.threadId === filter.threadId);
|
|
269
275
|
if (filter.toolName) tasks = tasks.filter((t) => t.toolName === filter.toolName);
|
|
276
|
+
if (filter.toolCallId) tasks = tasks.filter((t) => t.toolCallId === filter.toolCallId);
|
|
270
277
|
if (filter.runId) tasks = tasks.filter((t) => t.runId === filter.runId);
|
|
271
278
|
const dateCol = filter.dateFilterBy ?? "createdAt";
|
|
272
279
|
if (filter.fromDate) {
|