import { type PreparedRunArtifactPaths } from "./run-paths.js"; import type { StudyAnalysisConfig } from "./study-analysis.js"; import { runAutomaticStudyAnalysis, type AutomaticStudyAnalysisDeps } from "./automatic-study-analysis.js"; import type { AutomaticStudyAnalysisOutcome } from "./study-analysis-job.js"; export interface AutomaticAnalysisHooks { /** Provider/test dependencies apply only to analysis, never to the participant. */ deps?: AutomaticStudyAnalysisDeps; /** Called after the source is finalized; the returned cleanup always runs. */ onStart?: () => void | (() => void); run?: typeof runAutomaticStudyAnalysis; } export interface AutomaticAnalysisResult { automaticAnalysis?: AutomaticStudyAnalysisOutcome; /** Distinguishes the default missing-key skip from failure of an explicit request. */ automaticAnalysisTrigger?: "default" | "explicit"; } /** Internal producer receipt: call only after final source publication, never for an early refusal. */ export declare function markFinalizedStudyResult(result: T, prepared: PreparedRunArtifactPaths): T; /** One post-completion boundary shared by all live recording producers. */ export declare function completeAutomaticAnalysis(result: T, config: StudyAnalysisConfig | undefined, hooks?: AutomaticAnalysisHooks, trigger?: "default" | "explicit", preferLargerOutput?: boolean): Promise; export declare function automaticAnalysisSucceeded(result: AutomaticAnalysisResult): boolean;