UNPKG

@mastra/core

Version:
51 lines • 2.41 kB
/** * Constants for DurableAgent pubsub channels and event types */ /** * Symbol for passing run registry to workflow steps * This allows steps to access the actual model/tool instances */ export declare const RUN_REGISTRY_SYMBOL: unique symbol; export { AGENT_STREAM_TOPIC, AGENT_CONTROL_TOPIC, AgentControlEventTypes, AgentStreamEventTypes, } from '../streams/constants.js'; export declare const DURABLE_STOP_WHEN_ERROR_ID = "DURABLE_AGENT_STOP_WHEN_FAILED"; export declare function markErrorForStreamRejection(error: Error): Error; export declare function shouldRejectStream(error: Error): boolean; /** * Default values for durable agent execution */ export declare const DurableAgentDefaults: { /** Default maximum number of agentic loop iterations */ readonly MAX_STEPS: 5; /** * Default tool call concurrency. * Applied by `resolveDurableToolCallConcurrency` when a run doesn't * configure `toolCallConcurrency`. Approval / suspend-capable tool sets * always run sequentially (concurrency: 1) regardless of this value. */ readonly TOOL_CALL_CONCURRENCY: 10; }; /** * Step IDs used in the durable agentic workflow */ export declare const DurableStepIds: { /** LLM execution step */ readonly LLM_EXECUTION: 'durable-llm-execution'; /** Tool call step */ readonly TOOL_CALL: 'durable-tool-call'; /** LLM mapping step (combines results) */ readonly LLM_MAPPING: 'durable-llm-mapping'; /** Agentic execution workflow (one iteration) */ readonly AGENTIC_EXECUTION: 'durable-agentic-execution'; /** Full agentic loop workflow */ readonly AGENTIC_LOOP: 'durable-agentic-loop'; /** Scorer execution step */ readonly SCORER_EXECUTION: 'durable-scorer-execution'; /** isTaskComplete evaluation step */ readonly IS_TASK_COMPLETE: 'durable-is-task-complete'; }; export declare const RECOVER_ALREADY_IN_PROGRESS_ERROR_ID = "DURABLE_AGENT_RECOVER_ALREADY_IN_PROGRESS"; export declare const RECOVER_SNAPSHOT_NOT_FOUND_ERROR_ID = "DURABLE_AGENT_RECOVER_SNAPSHOT_NOT_FOUND"; export declare const RECOVER_CHECKPOINT_NOT_AVAILABLE_ERROR_ID = "DURABLE_AGENT_RECOVER_CHECKPOINT_NOT_AVAILABLE"; export declare const RECOVER_RUN_SUSPENDED_ERROR_ID = "DURABLE_AGENT_RECOVER_RUN_SUSPENDED"; export declare const RECOVER_RUN_NOT_ACTIVE_ERROR_ID = "DURABLE_AGENT_RECOVER_RUN_NOT_ACTIVE"; //# sourceMappingURL=constants.d.ts.map