@mastra/core
Version:
20 lines • 1.18 kB
TypeScript
/**
* Create the durable goal step.
*
* Mirrors the non-durable `createGoalStep` contract:
* - Runs after `isTaskCompleteStep` in the `singleIterationWorkflow`.
* - Only evaluates iterations where the LLM has signaled it is done
* (`lastStepResult.isContinued === false`) so we don't interrupt mid-loop
* tool execution.
* - Skips background-pending, working-memory-only iterations (same
* heuristic as the non-durable step).
* - Pulls the `goal` config from the in-process run registry (closures
* like `judge`, `scorer`, `tools` can't survive the wire). Cross-process
* engines without this slot skip goal evaluation.
* - Reads/writes the `GoalObjectiveRecord` from/to thread state storage.
* - Emits `goal` chunks via pubsub so external observers see the verdict.
* - Injects system-reminder + goal feedback into `messageList` via
* `createProcessorSendSignal` so the next LLM iteration can see it.
*/
export declare function createDurableGoalStep(): import("../../../../workflows").Step<"durable-goal", unknown, any, any, unknown, unknown, import("../../../../workflows").DefaultEngineType, unknown>;
//# sourceMappingURL=goal.d.ts.map