@mastra/inngest 1.11.2-alpha.3 → 1.11.2-alpha.4
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/dist/connect.cjs +1 -1
- package/dist/connect.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-HmoLmUk6.cjs → src-Bp3r5ZX4.cjs} +25 -2
- package/dist/src-Bp3r5ZX4.cjs.map +1 -0
- package/dist/{src-3ujfBhgX.js → src-DPEzH8P3.js} +25 -2
- package/dist/src-DPEzH8P3.js.map +1 -0
- package/package.json +4 -4
- package/dist/src-3ujfBhgX.js.map +0 -1
- package/dist/src-HmoLmUk6.cjs.map +0 -1
package/dist/connect.cjs
CHANGED
package/dist/connect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as connect } from "./src-
|
|
1
|
+
export { i as connect } from "./src-DPEzH8P3.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-Bp3r5ZX4.cjs");
|
|
3
3
|
exports.InngestExecutionEngine = require_src.InngestExecutionEngine;
|
|
4
4
|
exports.InngestPubSub = require_src.InngestPubSub;
|
|
5
5
|
exports.InngestRun = require_src.InngestRun;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { m as InngestExecutionEngine, f as InngestPubSub, d as InngestRun, u as InngestWorkflow, p as OVERSIZED_EVENT_CHUNK_TYPE, r as _compatibilityCheck, i as connect, s as createInngestAgent, l as createInngestDurableAgenticWorkflow, a as createServe, t as createStep, n as init, c as isInngestAgent, o as serve } from "./src-
|
|
1
|
+
export { m as InngestExecutionEngine, f as InngestPubSub, d as InngestRun, u as InngestWorkflow, p as OVERSIZED_EVENT_CHUNK_TYPE, r as _compatibilityCheck, i as connect, s as createInngestAgent, l as createInngestDurableAgenticWorkflow, a as createServe, t as createStep, n as init, c as isInngestAgent, o as serve } from "./src-DPEzH8P3.js";
|
|
@@ -2368,6 +2368,29 @@ function expandDurableSteps(steps) {
|
|
|
2368
2368
|
} : step;
|
|
2369
2369
|
});
|
|
2370
2370
|
}
|
|
2371
|
+
function isToolResultPart(part) {
|
|
2372
|
+
return part?.type === "tool-result";
|
|
2373
|
+
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Step records for a user's `stopWhen`. It is an AI SDK stop condition, so each
|
|
2376
|
+
* step's tool results must be the AI SDK tool-result parts from its content, as
|
|
2377
|
+
* the default loop builds them (#28519). The records themselves keep tool-call
|
|
2378
|
+
* payloads in `toolResults`, which compaction reads. Records written before
|
|
2379
|
+
* steps carried content are returned as stored.
|
|
2380
|
+
*/
|
|
2381
|
+
function durableStopConditionSteps(steps) {
|
|
2382
|
+
return expandDurableSteps(steps).map((step) => {
|
|
2383
|
+
const content = step?.content;
|
|
2384
|
+
if (!Array.isArray(content)) return step;
|
|
2385
|
+
const toolResults = content.filter(isToolResultPart);
|
|
2386
|
+
return {
|
|
2387
|
+
...step,
|
|
2388
|
+
toolResults,
|
|
2389
|
+
staticToolResults: toolResults.filter((part) => part.dynamic === false),
|
|
2390
|
+
dynamicToolResults: toolResults.filter((part) => part.dynamic === true)
|
|
2391
|
+
};
|
|
2392
|
+
});
|
|
2393
|
+
}
|
|
2371
2394
|
function buildDurableStepContent(state) {
|
|
2372
2395
|
const step = state.accumulatedSteps.at(-1);
|
|
2373
2396
|
if (!step) return [];
|
|
@@ -2709,7 +2732,7 @@ function createAgenticLoopWorkflow(options) {
|
|
|
2709
2732
|
const stopped = await step.run(`stop-when-${state.runId}-${state.iterationCount}`, async () => {
|
|
2710
2733
|
const stopWhen = (0, _mastra_core_agent_durable.getRunRegistryEntry)(state.runId, mastra)?.stopWhen;
|
|
2711
2734
|
if (!stopWhen || state.accumulatedSteps.length === 0) return false;
|
|
2712
|
-
const steps =
|
|
2735
|
+
const steps = durableStopConditionSteps(state.accumulatedSteps);
|
|
2713
2736
|
return (await Promise.all((Array.isArray(stopWhen) ? stopWhen : [stopWhen]).map(async (condition) => {
|
|
2714
2737
|
try {
|
|
2715
2738
|
return await condition({ steps });
|
|
@@ -5095,4 +5118,4 @@ Object.defineProperty(exports, "serve", {
|
|
|
5095
5118
|
}
|
|
5096
5119
|
});
|
|
5097
5120
|
|
|
5098
|
-
//# sourceMappingURL=src-
|
|
5121
|
+
//# sourceMappingURL=src-Bp3r5ZX4.cjs.map
|