UNPKG

@mastra/core

Version:
23 lines 1.49 kB
/** * Create the durable isTaskComplete step. * * Mirrors the non-durable `createIsTaskCompleteStep` contract: * - Runs after each agentic iteration has settled its tool calls. * - Only scores iterations where the LLM has signaled it is done * (`lastStepResult.isContinued === false`) so we don't interrupt mid-loop * tool execution. * - Skips working-memory-only iterations (same heuristic as the non-durable * step) — those are bookkeeping, not user-visible task progress. * - Pulls the scorer instances + `onComplete` closure from the in-process run * registry. They can't survive the wire, so cross-process engines (Inngest * after a worker restart) simply skip this step and fall back to * `maxSteps` + `stopWhen`. * - On a verdict it flips `state.lastStepResult.isContinued` so the outer * `dowhile` predicate either stops the loop (passed) or runs one more LLM * iteration (not passed). Feedback (when not suppressed) is appended as an * assistant message so the next LLM call can see it. * - Emits an `is-task-complete` chunk via pubsub so external observers see * the verdict and payload exactly like the non-durable path. */ export declare function createDurableIsTaskCompleteStep(defaultMaxSteps?: number): import("../../../../workflows").Step<"durable-is-task-complete", unknown, any, any, unknown, unknown, import("../../../../workflows").DefaultEngineType, unknown>; //# sourceMappingURL=is-task-complete.d.ts.map