@mastra/lance 1.0.5-alpha.0 → 1.0.6-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 +18 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/background-tasks/index.d.ts.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/lance
|
|
2
2
|
|
|
3
|
+
## 1.0.6-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
|
+
|
|
12
|
+
## 1.0.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Add `BackgroundTasksStorage` domain implementation so `@mastra/core` background task execution works with any storage adapter. ([#15307](https://github.com/mastra-ai/mastra/pull/15307))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`20f59b8`](https://github.com/mastra-ai/mastra/commit/20f59b876cf91199efbc49a0e36b391240708f08), [`aba393e`](https://github.com/mastra-ai/mastra/commit/aba393e2da7390c69b80e516a4f153cda6f09376), [`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`e2687a7`](https://github.com/mastra-ai/mastra/commit/e2687a7408790c384563816a9a28ed06735684c9), [`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`0a5fa1d`](https://github.com/mastra-ai/mastra/commit/0a5fa1d3cb0583889d06687155f26fd7d2edc76c), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`ea43e64`](https://github.com/mastra-ai/mastra/commit/ea43e646dd95d507694b6112b0bf1df22ad552b2), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69), [`00d1b16`](https://github.com/mastra-ai/mastra/commit/00d1b16b401199cb294fa23f43336547db4dca9b), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`16e34ca`](https://github.com/mastra-ai/mastra/commit/16e34caa98b9a114b17a6125e4e3fd87f169d0d0), [`7020c06`](https://github.com/mastra-ai/mastra/commit/7020c0690b199d9da337f0e805f16948e557922e), [`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`af8a57e`](https://github.com/mastra-ai/mastra/commit/af8a57ed9ba9685ad8601d5b71ae3706da6222f9), [`d63ffdb`](https://github.com/mastra-ai/mastra/commit/d63ffdbb2c11e76fe5ea45faab44bc15460f010c), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`1bd5104`](https://github.com/mastra-ai/mastra/commit/1bd51048b6da93507276d6623e3fd96a9e1a8944), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653), [`8f1b280`](https://github.com/mastra-ai/mastra/commit/8f1b280b7fe6999ec654f160cb69c1a8719e7a57), [`92dcf02`](https://github.com/mastra-ai/mastra/commit/92dcf029294210ac91b090900c1a0555a425c57a), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5), [`12df98c`](https://github.com/mastra-ai/mastra/commit/12df98c4904643d9481f5c78f3bed443725b4c96)]:
|
|
19
|
+
- @mastra/core@1.26.0
|
|
20
|
+
|
|
3
21
|
## 1.0.5-alpha.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -607,11 +607,13 @@ function toRecord(task) {
|
|
|
607
607
|
args: serializeJson(task.args),
|
|
608
608
|
result: serializeJson(task.result),
|
|
609
609
|
error: serializeJson(task.error),
|
|
610
|
+
suspend_payload: serializeJson(task.suspendPayload),
|
|
610
611
|
retry_count: task.retryCount,
|
|
611
612
|
max_retries: task.maxRetries,
|
|
612
613
|
timeout_ms: task.timeoutMs,
|
|
613
614
|
createdAt: task.createdAt,
|
|
614
615
|
startedAt: task.startedAt ?? /* @__PURE__ */ new Date(0),
|
|
616
|
+
suspendedAt: task.suspendedAt ?? /* @__PURE__ */ new Date(0),
|
|
615
617
|
completedAt: task.completedAt ?? /* @__PURE__ */ new Date(0)
|
|
616
618
|
};
|
|
617
619
|
}
|
|
@@ -628,6 +630,7 @@ function fromRecord(row) {
|
|
|
628
630
|
return val;
|
|
629
631
|
};
|
|
630
632
|
const startedAt = row.startedAt instanceof Date ? row.startedAt : row.startedAt ? new Date(row.startedAt) : void 0;
|
|
633
|
+
const suspendedAt = row.suspendedAt instanceof Date ? row.suspendedAt : row.suspendedAt ? new Date(row.suspendedAt) : void 0;
|
|
631
634
|
const completedAt = row.completedAt instanceof Date ? row.completedAt : row.completedAt ? new Date(row.completedAt) : void 0;
|
|
632
635
|
return {
|
|
633
636
|
id: String(row.id),
|
|
@@ -641,11 +644,13 @@ function fromRecord(row) {
|
|
|
641
644
|
runId: row.run_id ?? "",
|
|
642
645
|
result: parseJson(row.result),
|
|
643
646
|
error: parseJson(row.error),
|
|
647
|
+
suspendPayload: parseJson(row.suspend_payload),
|
|
644
648
|
retryCount: Number(row.retry_count ?? 0),
|
|
645
649
|
maxRetries: Number(row.max_retries ?? 0),
|
|
646
650
|
timeoutMs: Number(row.timeout_ms ?? 3e5),
|
|
647
651
|
createdAt: row.createdAt instanceof Date ? row.createdAt : new Date(row.createdAt),
|
|
648
652
|
startedAt: startedAt && startedAt.getTime() > 0 ? startedAt : void 0,
|
|
653
|
+
suspendedAt: suspendedAt && suspendedAt.getTime() > 0 ? suspendedAt : void 0,
|
|
649
654
|
completedAt: completedAt && completedAt.getTime() > 0 ? completedAt : void 0
|
|
650
655
|
};
|
|
651
656
|
}
|
|
@@ -666,6 +671,11 @@ var StoreBackgroundTasksLance = class extends storage.BackgroundTasksStorage {
|
|
|
666
671
|
tableName: storage.TABLE_BACKGROUND_TASKS,
|
|
667
672
|
schema: storage.TABLE_SCHEMAS[storage.TABLE_BACKGROUND_TASKS]
|
|
668
673
|
});
|
|
674
|
+
await this.#db.alterTable({
|
|
675
|
+
tableName: storage.TABLE_BACKGROUND_TASKS,
|
|
676
|
+
schema: storage.TABLE_SCHEMAS[storage.TABLE_BACKGROUND_TASKS],
|
|
677
|
+
ifNotExists: ["suspend_payload", "suspendedAt"]
|
|
678
|
+
});
|
|
669
679
|
}
|
|
670
680
|
async dangerouslyClearAll() {
|
|
671
681
|
await this.#db.clearTable({ tableName: storage.TABLE_BACKGROUND_TASKS });
|
|
@@ -681,8 +691,10 @@ var StoreBackgroundTasksLance = class extends storage.BackgroundTasksStorage {
|
|
|
681
691
|
if ("status" in update) merged.status = update.status;
|
|
682
692
|
if ("result" in update) merged.result = update.result;
|
|
683
693
|
if ("error" in update) merged.error = update.error;
|
|
694
|
+
if ("suspendPayload" in update) merged.suspendPayload = update.suspendPayload;
|
|
684
695
|
if ("retryCount" in update) merged.retryCount = update.retryCount;
|
|
685
696
|
if ("startedAt" in update) merged.startedAt = update.startedAt;
|
|
697
|
+
if ("suspendedAt" in update) merged.suspendedAt = update.suspendedAt;
|
|
686
698
|
if ("completedAt" in update) merged.completedAt = update.completedAt;
|
|
687
699
|
const table = await this.client.openTable(storage.TABLE_BACKGROUND_TASKS);
|
|
688
700
|
await table.delete(`id = '${escapeStr(taskId)}'`);
|
|
@@ -712,6 +724,7 @@ var StoreBackgroundTasksLance = class extends storage.BackgroundTasksStorage {
|
|
|
712
724
|
if (filter.resourceId) conditions.push(`resource_id = '${escapeStr(filter.resourceId)}'`);
|
|
713
725
|
if (filter.runId) conditions.push(`run_id = '${escapeStr(filter.runId)}'`);
|
|
714
726
|
if (filter.toolName) conditions.push(`tool_name = '${escapeStr(filter.toolName)}'`);
|
|
727
|
+
if (filter.toolCallId) conditions.push(`tool_call_id = '${escapeStr(filter.toolCallId)}'`);
|
|
715
728
|
let query = table.query();
|
|
716
729
|
if (conditions.length > 0) {
|
|
717
730
|
query = query.where(conditions.join(" AND "));
|