@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
64 lines • 2.41 kB
TypeScript
/**
* 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;
/**
* Generate the pubsub topic name for agent streaming events
* @param runId - The unique run identifier
* @returns The topic name for subscribing/publishing agent stream events
*/
export declare const AGENT_STREAM_TOPIC: (runId: string) => string;
/**
* Event type constants for agent stream events
*/
export declare const AgentStreamEventTypes: {
/** Chunk of streaming data (text, tool call, etc.) */
readonly CHUNK: "chunk";
/** Start of a new step in the agentic loop */
readonly STEP_START: "step-start";
/** End of a step in the agentic loop */
readonly STEP_FINISH: "step-finish";
/** Agent execution completed successfully */
readonly FINISH: "finish";
/** Error occurred during execution */
readonly ERROR: "error";
/** Workflow suspended (e.g., for tool approval) */
readonly SUSPENDED: "suspended";
};
/**
* 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.
* NOTE: Currently unused — durable workflows run tool calls sequentially
* (concurrency: 1) because tool approval and suspension require sequential
* execution. The serialized toolCallConcurrency option is preserved in
* workflow input for future use when dynamic foreach concurrency is supported.
*/
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";
};
//# sourceMappingURL=constants.d.ts.map