import type { IssueBucket, IssueSeverity } from '../monitoring/FrameworkIssueLedger.js';
export type TranscriptUxCategory = 'duplicate-notices-deliveries' | 'asks-of-user' | 'infra-noise' | 'content-free-updates';
export interface TranscriptMessage {
    messageId: number | string;
    topicId?: number | null;
    channelId?: number | string | null;
    text: string;
    fromUser: boolean;
    timestamp: string;
    sessionName?: string | null;
    senderName?: string;
    senderUsername?: string;
}
export interface TranscriptAuditWindow {
    start: string;
    end: string;
}
export interface TranscriptUxFinding {
    category: TranscriptUxCategory;
    topicId: number;
    messageIds: Array<number | string>;
    timestamps: string[];
    severity: IssueSeverity;
    title: string;
    reason: string;
    excerpt: string;
    dedupKey: string;
    frameworkIssue: {
        framework: string;
        bucket: IssueBucket;
        severity: IssueSeverity;
        title: string;
        dedupKey: string;
        signature: string;
        evidence: string;
        observedVersion: string;
        relatedSpec: string;
    };
}
export interface TranscriptAuditReport {
    topicIds: number[];
    window: TranscriptAuditWindow;
    generatedAt: string;
    summary: Record<TranscriptUxCategory, number> & {
        total: number;
    };
    findings: TranscriptUxFinding[];
    observations: Array<{
        dedupKey: string;
        filed: boolean;
        created?: boolean;
        episodeRecorded?: boolean;
        issueId?: string;
        error?: string;
    }>;
}
export interface TranscriptAuditDeps {
    readTopicHistory(topicId: number, limit: number): Promise<TranscriptMessage[]>;
    observeFinding(input: TranscriptUxFinding['frameworkIssue']): Promise<{
        created?: boolean;
        episodeRecorded?: boolean;
        issueId?: string;
    }>;
    now?: () => Date;
}
export interface RunPostDriveTranscriptAuditOptions {
    topicIds: number[];
    start: string;
    end: string;
    limit?: number;
    dryRun?: boolean;
    deps: TranscriptAuditDeps;
}
export interface PostDriveTranscriptAuditCliOptions {
    topics?: string[];
    topic?: string[];
    start: string;
    end: string;
    limit?: number;
    baseUrl?: string;
    /** Where the drive TRANSCRIPT lives when it is not this agent's server —
     *  e.g. the MENTEE's server records the mentor's Playwright drive, so the
     *  mentor reads history there while filing findings into its OWN ledger.
     *  Defaults to baseUrl (single-server flow, byte-compatible with #864).
     *  Auth for the remote read comes from --history-auth-token or the
     *  INSTAR_HISTORY_AUTH_TOKEN env var (env preferred — flags leak via ps). */
    historyBaseUrl?: string;
    historyAuthToken?: string;
    dir?: string;
    dryRun?: boolean;
    json?: boolean;
}
export declare function classifyTranscriptUx(input: {
    topicId: number;
    messages: TranscriptMessage[];
    window: TranscriptAuditWindow;
    observedVersion?: string;
}): TranscriptUxFinding[];
export declare function runPostDriveTranscriptAudit(options: RunPostDriveTranscriptAuditOptions): Promise<TranscriptAuditReport>;
export declare function runPostDriveTranscriptAuditCli(options: PostDriveTranscriptAuditCliOptions): Promise<number>;
//# sourceMappingURL=postDriveTranscriptAudit.d.ts.map