@mastra/lance 1.0.2 → 1.0.3
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/LICENSE.md +15 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +11 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -43
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +3 -2
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1648,6 +1648,9 @@ var StoreWorkflowsLance = class extends WorkflowsStorage {
|
|
|
1648
1648
|
this.client = client;
|
|
1649
1649
|
this.#db = new LanceDB({ client });
|
|
1650
1650
|
}
|
|
1651
|
+
supportsConcurrentUpdates() {
|
|
1652
|
+
return false;
|
|
1653
|
+
}
|
|
1651
1654
|
parseWorkflowRun(row) {
|
|
1652
1655
|
let parsedSnapshot = row.snapshot;
|
|
1653
1656
|
if (typeof parsedSnapshot === "string") {
|
|
@@ -1678,50 +1681,15 @@ var StoreWorkflowsLance = class extends WorkflowsStorage {
|
|
|
1678
1681
|
async dangerouslyClearAll() {
|
|
1679
1682
|
await this.#db.clearTable({ tableName: TABLE_WORKFLOW_SNAPSHOT });
|
|
1680
1683
|
}
|
|
1681
|
-
async updateWorkflowResults({
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
result,
|
|
1686
|
-
requestContext
|
|
1687
|
-
}) {
|
|
1688
|
-
let snapshot = await this.loadWorkflowSnapshot({ workflowName, runId });
|
|
1689
|
-
if (!snapshot) {
|
|
1690
|
-
snapshot = {
|
|
1691
|
-
context: {},
|
|
1692
|
-
activePaths: [],
|
|
1693
|
-
timestamp: Date.now(),
|
|
1694
|
-
suspendedPaths: {},
|
|
1695
|
-
activeStepsPath: {},
|
|
1696
|
-
resumeLabels: {},
|
|
1697
|
-
serializedStepGraph: [],
|
|
1698
|
-
status: "pending",
|
|
1699
|
-
value: {},
|
|
1700
|
-
waitingPaths: {},
|
|
1701
|
-
runId,
|
|
1702
|
-
requestContext: {}
|
|
1703
|
-
};
|
|
1704
|
-
}
|
|
1705
|
-
snapshot.context[stepId] = result;
|
|
1706
|
-
snapshot.requestContext = { ...snapshot.requestContext, ...requestContext };
|
|
1707
|
-
await this.persistWorkflowSnapshot({ workflowName, runId, snapshot });
|
|
1708
|
-
return snapshot.context;
|
|
1684
|
+
async updateWorkflowResults(_args) {
|
|
1685
|
+
throw new Error(
|
|
1686
|
+
"updateWorkflowResults is not implemented for LanceDB storage. LanceDB does not support atomic read-modify-write operations needed for concurrent workflow updates."
|
|
1687
|
+
);
|
|
1709
1688
|
}
|
|
1710
|
-
async updateWorkflowState({
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
}) {
|
|
1715
|
-
const snapshot = await this.loadWorkflowSnapshot({ workflowName, runId });
|
|
1716
|
-
if (!snapshot) {
|
|
1717
|
-
return void 0;
|
|
1718
|
-
}
|
|
1719
|
-
if (!snapshot.context) {
|
|
1720
|
-
throw new Error(`Snapshot not found for runId ${runId}`);
|
|
1721
|
-
}
|
|
1722
|
-
const updatedSnapshot = { ...snapshot, ...opts };
|
|
1723
|
-
await this.persistWorkflowSnapshot({ workflowName, runId, snapshot: updatedSnapshot });
|
|
1724
|
-
return updatedSnapshot;
|
|
1689
|
+
async updateWorkflowState(_args) {
|
|
1690
|
+
throw new Error(
|
|
1691
|
+
"updateWorkflowState is not implemented for LanceDB storage. LanceDB does not support atomic read-modify-write operations needed for concurrent workflow updates."
|
|
1692
|
+
);
|
|
1725
1693
|
}
|
|
1726
1694
|
async persistWorkflowSnapshot({
|
|
1727
1695
|
workflowName,
|