import { Connection } from '@salesforce/core'; import { Duration } from '@salesforce/kit'; import { type AgentTestStartResponse, type AgentTestStatusResponse, type AgentTestResultsResponse } from './types.js'; /** * A service for testing agents using `AiEvaluationDefinition` metadata. Start asynchronous * test runs, get or poll for test status, and get detailed test results. * * **Examples** * * Create an instance of the service: * * `const agentTester = new AgentTester(connection);` * * Start a test run: * * `const startResponse = await agentTester.start(aiEvalDef);` * * Get the status for a test run: * * `const status = await agentTester.status(startResponse.runId);` * * Get detailed results for a test run: * * `const results = await agentTester.results(startResponse.runId);` */ export declare class AgentTester { private maybeMock; constructor(connection: Connection); /** * Initiates a test run (i.e., AI evaluation). * * @param aiEvalDefName - The name of the AI evaluation definition to run. * @returns Promise that resolves with the response from starting the test. */ start(aiEvalDefName: string): Promise; /** * Get the status of a test run. * * @param {string} jobId * @returns {Promise} */ status(jobId: string): Promise; /** * Poll the status of a test run until the tests are complete or the timeout is reached. * * @param {string} jobId * @param {Duration} timeout * @returns {Promise} */ poll(jobId: string, { timeout }?: { timeout?: Duration; }): Promise; /** * Get detailed test run results. * * @param {string} jobId * @returns {Promise} */ results(jobId: string): Promise; /** * Cancel an in-progress test run. * * @param {string} jobId * @returns {Promise<{success: boolean}>} */ cancel(jobId: string): Promise<{ success: boolean; }>; } /** Decodes HTML entities in test result fields (utterance, actionsSequence, actualValue, expectedValue, metricExplainability). */ export declare function normalizeResults(results: AgentTestResultsResponse): AgentTestResultsResponse;