import { type AgUiSseProgressSnapshot as EvalProgressSnapshot, type ParsedAgUiSseRun as ParsedRun } from "../../../agent/index.js"; import { type LiveEvalRuntime } from "./performance.js"; import { type LiveEvalCaseMetadata } from "./report.js"; import { type LiveEvalResultRecord } from "./result.js"; /** Input payload for prepared live eval. */ export interface PreparedLiveEvalInput { prompt?: string; metadata?: Record; verificationContext?: LiveEvalContext; cleanup?: () => Promise; startSidecar?: () => Promise<(() => Promise) | void>; } /** Context for live eval. */ export interface LiveEvalContext { apiUrl: string; authToken: string; projectId: string | null; } /** Public API contract for live eval case. */ export interface LiveEvalCase { readonly id: string; readonly label: string; readonly prompt?: string; allowedTools?: string[]; forceRuntimeOverrides?: boolean; requireProject?: boolean; maxSteps?: number; expectedEventSubsequence?: string[]; metadata?: LiveEvalCaseMetadata; prepare?: (context: LiveEvalContext) => Promise; verify: (run: ParsedRun, prepared: PreparedLiveEvalInput | null) => string | null | Promise; } interface FileCheckInput { filePath: string; requiredContent?: string[]; description?: string; } /** Public API contract for live eval project file. */ export interface LiveEvalProjectFile { path: string; content: string; } /** Input payload for live eval project file reader. */ export interface LiveEvalProjectFileReaderInput { filePath: string; requestTimeoutMs: number; } /** Configuration used by live eval runner. */ export interface LiveEvalRunnerConfig { endpoint: string; authToken: string; apiUrl: string; projectId: string | null; branchId: string | null; model: string | null; requestTimeoutMs: number; progressLogIntervalMs: number; enableLlmJudge: boolean; fetch?: (input: string | URL | Request, init?: RequestInit) => Promise; log?: (message: string) => void; readProjectFile?: (input: LiveEvalProjectFileReaderInput) => Promise; } interface LiveEvalJudgeInput { question: string; criteria: string; } interface LiveEvalJudgeRequest extends LiveEvalJudgeInput { answer: string; } interface LiveEvalJudgeResult { pass: boolean; reason: string; } declare function collectPreparedArtifactPaths(prepared: PreparedLiveEvalInput | null): string[]; interface LiveEvalResultContext { id: string; label: string; runtime: LiveEvalRuntime; startedAt: number; conversationId?: string | null; artifactPaths?: string[]; } interface LiveEvalRunArtifactsInput { run: ParsedRun; runId?: string; traceSignature: string; } interface LiveEvalRunArtifacts { runId?: string; traceSignature: string; toolStarts: string[]; toolArgsPreview: string; textPreview: string; } declare function createLiveEvalRunArtifacts(input: LiveEvalRunArtifactsInput): LiveEvalRunArtifacts; declare function createFailedRunEvalResult(input: { details: string; context: LiveEvalResultContext; runArtifacts: LiveEvalRunArtifacts; }): LiveEvalResultRecord; declare function createPassedRunEvalResult(input: { details: string; context: LiveEvalResultContext; runArtifacts: LiveEvalRunArtifacts; }): LiveEvalResultRecord; declare function createStreamingFailureEvalResult(input: { details: string; context: LiveEvalResultContext; progress: EvalProgressSnapshot; }): LiveEvalResultRecord; declare function extractRunId(run: ParsedRun): string | null; /** Check whether finished is present. */ export declare function hasFinished(run: ParsedRun): boolean; /** Contains skill load helper. */ export declare function containsSkillLoad(run: ParsedRun, skillId: string): boolean; /** Count step started events helper. */ export declare function countStepStartedEvents(run: ParsedRun): number; /** Create live eval case support. */ export declare function createLiveEvalCaseSupport(config: LiveEvalRunnerConfig): { runEval: (testCase: LiveEvalCase, runtime: LiveEvalRuntime) => Promise; verifyFileExists: (input: FileCheckInput) => Promise; withJudge: (structuralVerify: (run: ParsedRun) => string | null, judgeInput: LiveEvalJudgeInput) => (run: ParsedRun) => Promise; judgeLlm: (input: LiveEvalJudgeRequest) => Promise; }; /** White-box helpers used by live eval runner tests. */ export declare const liveEvalRunnerInternals: { collectPreparedArtifactPaths: typeof collectPreparedArtifactPaths; createFailedRunEvalResult: typeof createFailedRunEvalResult; createLiveEvalRunArtifacts: typeof createLiveEvalRunArtifacts; createPassedRunEvalResult: typeof createPassedRunEvalResult; createStreamingFailureEvalResult: typeof createStreamingFailureEvalResult; extractRunId: typeof extractRunId; }; export {}; //# sourceMappingURL=runner.d.ts.map