/** * Scenario assertion evaluator. * * Evaluates assertions against tool/prompt responses. */ import type { ScenarioAssertion, AssertionResult } from './types.js'; import { getValueAtPath } from '../utils/jsonpath.js'; export { getValueAtPath }; /** * Extract and parse the actual response content from an MCP tool call result. * * MCP returns responses in this format: * { * content: [{ type: 'text', text: '{"success": true, ...}' }], * isError: false * } * * This function extracts the JSON from content[0].text and parses it, * allowing assertions to check paths like 'success' and 'note.id' directly. * * For error responses (isError: true), returns an object with: * { error: true, message: "...", isError: true } * * Falls back to returning the original response if: * - Response is not an MCP tool call result * - No text content found * - Text is not valid JSON (for success responses) */ export declare function extractResponseContent(response: unknown): unknown; /** * Evaluate a single assertion against a response. */ export declare function evaluateAssertion(assertion: ScenarioAssertion, response: unknown, isError: boolean): AssertionResult; /** * Evaluate all assertions for a response. * Extracts JSON content from MCP results for direct path access. */ export declare function evaluateAssertions(assertions: ScenarioAssertion[], response: unknown, isError: boolean): AssertionResult[]; /** * Format assertion results for display. */ export declare function formatAssertionResults(results: AssertionResult[]): string; //# sourceMappingURL=evaluator.d.ts.map