import type { Db } from "@rudderhq/db";
import { type ObservedRunDetail, type RunDiagnosis, type RunDiagnosisMode, type RunExportRow, type RunSkillEvidenceMatch, type RunSkillEvidenceType } from "@rudderhq/run-intelligence-core";
import type { HeartbeatRunEvent } from "@rudderhq/shared";
export declare function extractSkillEvidenceMatch(input: {
    payload: unknown;
    evidenceType: RunSkillEvidenceType;
    skillQuery: string;
    eventType: string | null;
    eventId: number | null;
    eventCreatedAt: Date | string | null;
}): RunSkillEvidenceMatch | null;
export interface ListObservedRunsInput {
    orgId: string;
    updatedAfter?: Date | null;
    runIdPrefix?: string | null;
    agentId?: string | null;
    status?: string | null;
    runtime?: string | null;
    issueId?: string | null;
    usedSkill?: string | null;
    loadedSkill?: string | null;
    createdBefore?: Date | null;
    limit: number;
}
export declare function listObservedRuns(db: Db, input: ListObservedRunsInput): Promise<RunExportRow[]>;
type RunIdResolutionScope = {
    orgIds?: string[];
};
export declare function getObservedRun(db: Db, runId: string, scope?: RunIdResolutionScope): Promise<RunExportRow | null>;
export declare function getObservedRunEvents(db: Db, runId: string, scope?: RunIdResolutionScope): Promise<HeartbeatRunEvent[]>;
export declare function getObservedRunLog(db: Db, runId: string, scope?: RunIdResolutionScope): Promise<{
    content: string;
}>;
export declare function getObservedRunDetail(db: Db, runId: string, scope?: RunIdResolutionScope): Promise<ObservedRunDetail | null>;
export declare function diagnoseObservedRun(db: Db, runId: string, mode?: RunDiagnosisMode): Promise<{
    detail: ObservedRunDetail;
    diagnosis: RunDiagnosis;
}>;
export declare function buildObservedRunLangfuseScores(db: Db, runId: string): Promise<{
    detail: ObservedRunDetail;
    diagnosis: RunDiagnosis;
    scores: import("@rudderhq/run-intelligence-core").LangfuseScoreDraft[];
}>;
export {};
//# sourceMappingURL=run-intelligence.d.ts.map