@mastra/inngest 0.0.0-feat-mcp-embedded-docs-tools-clean-20260102174212 → 0.0.0-feat-mcp-embedded-docs-tools-clean-20260108110334
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 +144 -3
- package/dist/index.cjs +3 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/dist/workflow.d.ts +1 -2
- package/dist/workflow.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1152,19 +1152,6 @@ var InngestWorkflow = class _InngestWorkflow extends Workflow {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
return workflowsStore.listWorkflowRuns({ workflowName: this.id, ...args ?? {} });
|
|
1154
1154
|
}
|
|
1155
|
-
async getWorkflowRunById(runId) {
|
|
1156
|
-
const storage = this.#mastra?.getStorage();
|
|
1157
|
-
if (!storage) {
|
|
1158
|
-
this.logger.debug("Cannot get workflow runs. Mastra engine is not initialized");
|
|
1159
|
-
return this.runs.get(runId) ? { ...this.runs.get(runId), workflowName: this.id } : null;
|
|
1160
|
-
}
|
|
1161
|
-
const workflowsStore = await storage.getStore("workflows");
|
|
1162
|
-
if (!workflowsStore) {
|
|
1163
|
-
return this.runs.get(runId) ? { ...this.runs.get(runId), workflowName: this.id } : null;
|
|
1164
|
-
}
|
|
1165
|
-
const run = await workflowsStore.getWorkflowRunById({ runId, workflowName: this.id });
|
|
1166
|
-
return run ?? (this.runs.get(runId) ? { ...this.runs.get(runId), workflowName: this.id } : null);
|
|
1167
|
-
}
|
|
1168
1155
|
__registerMastra(mastra) {
|
|
1169
1156
|
super.__registerMastra(mastra);
|
|
1170
1157
|
this.#mastra = mastra;
|
|
@@ -1208,10 +1195,11 @@ var InngestWorkflow = class _InngestWorkflow extends Workflow {
|
|
|
1208
1195
|
workflowStatus: run.workflowRunStatus,
|
|
1209
1196
|
stepResults: {}
|
|
1210
1197
|
});
|
|
1211
|
-
const
|
|
1198
|
+
const existingRun = await this.getWorkflowRunById(runIdToUse, {
|
|
1212
1199
|
withNestedWorkflows: false
|
|
1213
1200
|
});
|
|
1214
|
-
|
|
1201
|
+
const existsInStorage = existingRun && !existingRun.isFromInMemory;
|
|
1202
|
+
if (!existsInStorage && shouldPersistSnapshot) {
|
|
1215
1203
|
const workflowsStore = await this.mastra?.getStorage()?.getStore("workflows");
|
|
1216
1204
|
await workflowsStore?.persistWorkflowSnapshot({
|
|
1217
1205
|
workflowName: this.id,
|