export interface IncludesOptions { /** Case-insensitive match (default: true) */ ignoreCase?: boolean; } /** * Scores 1 if the agent's output text contains the expected substring, 0 otherwise. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.includes('sunny'); * ``` */ export declare function includes(expected: string, options?: IncludesOptions): import("@mastra/core/evals").MastraScorer<"check-includes", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { output: string; target: string; found: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the agent's output text does NOT contain the substring, 0 otherwise. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.excludes('error'); * ``` */ export declare function excludes(unwanted: string, options?: IncludesOptions): import("@mastra/core/evals").MastraScorer<"check-excludes", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { output: string; target: string; excluded: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the output text exactly equals the expected string (after optional normalization). * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.equals('Hello, world!'); * ``` */ export declare function equals(expected: string, options?: IncludesOptions): import("@mastra/core/evals").MastraScorer<"check-equals", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { output: string; target: string; isEqual: boolean; }> & Record<"generateScoreStepResult", number>>; export interface MatchesOptions { /** If true, the output must match the pattern exactly (anchored). Default: false (substring match). */ exact?: boolean; } /** * Scores 1 if the output matches the given regular expression, 0 otherwise. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.matches(/\d{1,3}°[FC]/); * ``` */ export declare function matches(pattern: RegExp, options?: MatchesOptions): import("@mastra/core/evals").MastraScorer<"check-matches", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { output: string; pattern: string; matched: boolean; }> & Record<"generateScoreStepResult", number>>; export interface SimilarityOptions { /** Minimum similarity threshold (0-1) to score 1. Default: 0.7 */ threshold?: number; /** Case-insensitive comparison (default: true) */ ignoreCase?: boolean; } /** * Returns the string similarity score (0-1) between the output and an expected string. * Useful for fuzzy matching when exact equality is too strict. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.similarity('Sunny, 72°F'); * ``` */ export declare function similarity(expected: string, options?: SimilarityOptions): import("@mastra/core/evals").MastraScorer<"check-similarity", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { output: string; target: string; score: number; threshold: number | undefined; }> & Record<"generateScoreStepResult", number>>; export interface CalledToolOptions { /** Minimum number of times the tool must be called. Default: 1 */ times?: number; } /** * Scores 1 if the agent called the specified tool (at least `times` times). * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.calledTool('get_weather'); * const twice = checks.calledTool('search', { times: 2 }); * ``` */ export declare function calledTool(toolName: string, options?: CalledToolOptions): import("@mastra/core/evals").MastraScorer<"check-called-tool", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { toolName: string; expectedTimes: number; actualCount: number; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the agent did NOT call the specified tool. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.didNotCall('delete_user'); * ``` */ export declare function didNotCall(toolName: string): import("@mastra/core/evals").MastraScorer<"check-did-not-call", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { toolName: string; count: number; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the tools were called in the specified order (relaxed: allows other calls in between). * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.toolOrder(['search', 'summarize', 'respond']); * ``` */ export declare function toolOrder(expectedOrder: string[]): import("@mastra/core/evals").MastraScorer<"check-tool-order", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { actualTools: string[]; expectedOrder: string[]; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the agent used no more than `max` tool calls. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.maxToolCalls(5); * ``` */ export declare function maxToolCalls(max: number): import("@mastra/core/evals").MastraScorer<"check-max-tool-calls", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { count: number; max: number; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if the agent made no tool calls at all. * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.usedNoTools(); * ``` */ export declare function usedNoTools(): import("@mastra/core/evals").MastraScorer<"check-used-no-tools", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { count: number; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Scores 1 if none of the tool invocations resulted in an error state. * Checks for tool invocations with state other than 'result' (i.e., missing results). * * @example * ```ts * import { checks } from '@mastra/evals'; * const scorer = checks.noToolErrors(); * ``` */ export declare function noToolErrors(): import("@mastra/core/evals").MastraScorer<"check-no-tool-errors", import("@mastra/core/evals").ScorerRunInputForAgent, import("@mastra/core/evals").ScorerRunOutputForAgent, Record<"preprocessStepResult", { errorCount: number; totalCalls: number; passed: boolean; }> & Record<"generateScoreStepResult", number>>; /** * Quick Checks — composable micro-scorers for common assertions. * * These are zero-LLM, zero-ceremony scorers that plug into the existing * `scorers: [...]` array anywhere scorers are used. Internally they are * standard `createScorer()` instances with the same observability, storage, * and pipeline integration as any other scorer. * * @example * ```ts * import { checks } from '@mastra/evals'; * * await runEvals({ * data: [...], * target: myAgent, * scorers: [ * checks.includes('sunny'), * checks.calledTool('get_weather'), * checks.toolOrder(['search', 'summarize']), * checks.noToolErrors(), * ], * }); * ``` */ export declare const checks: { includes: typeof includes; excludes: typeof excludes; equals: typeof equals; matches: typeof matches; similarity: typeof similarity; calledTool: typeof calledTool; didNotCall: typeof didNotCall; toolOrder: typeof toolOrder; maxToolCalls: typeof maxToolCalls; usedNoTools: typeof usedNoTools; noToolErrors: typeof noToolErrors; }; //# sourceMappingURL=index.d.ts.map