/** * @artemiskit/sdk * Main ArtemisKit class - programmatic API for LLM testing */ import type { ArtemisKitConfig, ArtemisKitEventName, ArtemisKitEvents, CaseCompleteHandler, CaseStartHandler, CompareOptions, CompareResult, ProgressHandler, RedTeamMutationCompleteHandler, RedTeamMutationStartHandler, RedTeamOptions, RedTeamResult, RunOptions, RunResult, StressOptions, StressRequestCompleteHandler, StressResult, ValidateOptions, ValidationResult } from './types'; /** * ArtemisKit SDK - programmatic API for LLM evaluation testing * * @example * ```typescript * import { ArtemisKit } from '@artemiskit/sdk'; * * const kit = new ArtemisKit({ * provider: 'openai', * model: 'gpt-4', * }); * * // Run a test scenario * const result = await kit.run({ scenario: './my-tests.yaml' }); * console.log(result.success); // true/false * ``` */ export declare class ArtemisKit { private config; private eventHandlers; private storage; constructor(config?: ArtemisKitConfig); /** * Register an event handler */ on(event: E, handler: (event: ArtemisKitEvents[E]) => void): this; /** * Remove an event handler */ off(event: E, handler: (event: ArtemisKitEvents[E]) => void): this; /** * Register a one-time event handler */ once(event: E, handler: (event: ArtemisKitEvents[E]) => void): this; /** * Emit an event to all registered handlers */ private emit; /** * Register handler for when a test case starts */ onCaseStart(handler: CaseStartHandler): this; /** * Register handler for when a test case completes */ onCaseComplete(handler: CaseCompleteHandler): this; /** * Register handler for progress updates */ onProgress(handler: ProgressHandler): this; /** * Register handler for when a red team mutation starts */ onRedTeamMutationStart(handler: RedTeamMutationStartHandler): this; /** * Register handler for when a red team mutation completes */ onRedTeamMutationComplete(handler: RedTeamMutationCompleteHandler): this; /** * Register handler for stress test request completion */ onStressRequestComplete(handler: StressRequestCompleteHandler): this; /** * Run a test scenario */ run(options: RunOptions): Promise; /** * Run red team adversarial testing */ redteam(options: RedTeamOptions): Promise; /** * Run stress/load testing */ stress(options: StressOptions): Promise; /** * Validate scenario files without execution (pre-flight checks) * * Use this for CI/CD pipelines to catch configuration errors before running tests. * * @example * ```typescript * const result = await kit.validate({ scenario: './scenarios/**\/*.yaml' }); * if (!result.valid) { * console.error('Validation errors:', result.errors); * process.exit(1); * } * ``` */ validate(options: ValidateOptions): Promise; /** * Compare two test runs for regression detection * * Requires storage configuration to be set in ArtemisKitConfig. * * @example * ```typescript * const kit = new ArtemisKit({ * storage: { type: 'local', basePath: './artemis-runs' } * }); * * const comparison = await kit.compare({ * baseline: 'run_abc123', * current: 'run_def456', * threshold: 0.05, // 5% regression threshold * }); * * if (comparison.hasRegression) { * console.error('Regression detected!', comparison.regressions); * } * ``` * * @since 0.3.2 */ compare(options: CompareOptions): Promise; /** * Extract run metrics from a manifest */ private extractRunMetrics; /** * Compare cases between baseline and current manifests */ private compareCases; /** * Extract cases from a manifest */ private extractCases; /** * Load a scenario from file or use inline object */ private loadScenario; /** * Create a model client based on options */ private createClient; /** * Build mutation instances from mutation names */ private buildMutations; /** * Get available mutations for red team testing */ getAvailableMutations(): string[]; } //# sourceMappingURL=artemiskit.d.ts.map