@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
57 lines • 1.76 kB
TypeScript
import type { SerializableScorersConfig, SerializableDurableState } from '../../types.js';
/**
* Input type for scorer execution
*/
export interface DurableScorerInput {
scorers: SerializableScorersConfig;
runId: string;
agentId: string;
agentName?: string;
scorerInput: {
inputMessages: any[];
rememberedMessages: any[];
systemMessages: any[];
taggedSystemMessages: Record<string, any[]>;
};
scorerOutput: any[];
structuredOutput?: boolean;
threadId?: string;
resourceId?: string;
state: SerializableDurableState;
}
/**
* Create a durable scorer execution step.
*
* This step:
* 1. Takes the serialized scorers configuration
* 2. Resolves each scorer from Mastra at runtime
* 3. Calls runScorer for each configured scorer
*
* Scorer execution is fire-and-forget - it doesn't affect the main execution result.
* Scorers are used for evaluation and monitoring purposes.
*/
export declare function createDurableScorerStep(): import("../../../../workflows").Step<"durable-scorer-execution", unknown, {
scorers: Record<string, {
scorerName: string;
sampling?: {
type: "none";
} | {
type: "ratio";
rate: number;
} | undefined;
}>;
runId: string;
agentId: string;
scorerInput: any;
scorerOutput: any;
state: any;
agentName?: string | undefined;
structuredOutput?: boolean | undefined;
threadId?: string | undefined;
resourceId?: string | undefined;
}, {
scorersExecuted: number;
executedScorerNames: string[];
skipped: boolean;
}, unknown, unknown, import("../../../../workflows").DefaultEngineType, unknown>;
//# sourceMappingURL=scorer-execution.d.ts.map