import type { ModuleLifecycleContext } from "../../contracts/module-contract.js";
import type { ImprovementStateDocument } from "./improvement-state.js";
export type TranscriptSyncArgs = {
    sourcePath?: string;
    archivePath?: string;
};
export type TranscriptSkipReason = "skipped-unchanged-hash" | "skipped-archive-conflict" | "skipped-file-too-large" | "skipped-budget-max-files" | "skipped-budget-total-bytes" | "skipped-read-error";
export type TranscriptSyncResult = {
    runId: string;
    sourcePath: string;
    archivePath: string;
    discoveredFrom: string;
    discoveryCandidatesTried: string[];
    scanned: number;
    copied: number;
    skippedExisting: number;
    skippedConflict: number;
    skippedBudget: number;
    skippedLargeFile: number;
    errors: Array<{
        file: string;
        code: string;
        message: string;
    }>;
    copiedFiles: string[];
    skipReasons: Record<string, TranscriptSkipReason>;
    budget: {
        maxFilesPerSync: number;
        maxBytesPerFile: number;
        maxTotalScanBytes: number;
        scanBytesUsed: number;
    };
    retryQueue: {
        pending: number;
        processedRetries: number;
        droppedPermanentFailures: number;
    };
};
type ImprovementTranscriptConfig = {
    sourcePath: string;
    archivePath: string;
    minIntervalMinutes: number;
    skipIfNoNewTranscripts: boolean;
    maxFilesPerSync: number;
    maxBytesPerFile: number;
    maxTotalScanBytes: number;
    discoveryPaths: string[];
};
export declare function resolveImprovementTranscriptConfig(ctx: ModuleLifecycleContext, args: TranscriptSyncArgs): ImprovementTranscriptConfig;
/**
 * Cursor stores agent transcripts under `~/.cursor/projects/<slug>/agent-transcripts`, where `slug`
 * is the workspace root with path separators replaced by hyphens (drive letter included on Windows).
 */
export declare function buildCursorProjectsAgentTranscriptsPath(workspacePath: string): string;
export declare function resolveTranscriptSourceRoot(workspacePath: string, cfg: ImprovementTranscriptConfig, args: TranscriptSyncArgs): Promise<{
    root: string;
    discoveredFrom: string;
    tried: string[];
}>;
export declare function runSyncTranscripts(ctx: ModuleLifecycleContext, args: TranscriptSyncArgs, state: ImprovementStateDocument, now?: Date): Promise<TranscriptSyncResult>;
export declare function resolveCadenceDecision(now: Date, previousRunAtIso: string | null, minIntervalMinutes: number, copiedCount: number, skipIfNoNewTranscripts: boolean): {
    shouldRunGenerate: boolean;
    reason: string;
};
export {};
