import type { Database } from "bun:sqlite";
import type { TodosS3ArtifactStore } from "./s3-artifacts.js";
export interface TodosRunArtifactRemoteRef {
    provider: "s3";
    bucket: string;
    key: string;
    relative_path: string;
    url: string;
    sha256: string;
    size_bytes: number;
    uploaded_at?: string;
    downloaded_at?: string;
}
export interface TodosRunArtifactSyncFilter {
    runId?: string;
    taskId?: string;
    limit?: number;
    includeAlreadySynced?: boolean;
}
export interface TodosRunArtifactSyncResult {
    uploaded: number;
    downloaded: number;
    skipped: number;
    errors: string[];
    artifacts: Array<{
        id: string;
        run_id: string;
        task_id: string;
        key: string;
        sha256: string;
        size_bytes: number;
    }>;
}
export interface TodosRunArtifactSyncPlan {
    direction: "upload" | "download";
    dry_run: true;
    no_network: true;
    total: number;
    uploadable: number;
    downloadable: number;
    skipped: number;
    errors: string[];
    artifacts: Array<{
        id: string;
        run_id: string;
        task_id: string;
        status: "uploadable" | "downloadable" | "already_remote" | "local_ok" | "missing_local" | "metadata_only" | "missing_remote_ref";
        sha256: string | null;
        size_bytes: number | null;
        remote_key?: string;
    }>;
}
export interface UploadRunArtifactsToS3Options {
    store: TodosS3ArtifactStore;
    db?: Database;
    filter?: TodosRunArtifactSyncFilter;
    now?: () => Date;
}
export interface DownloadRunArtifactsFromS3Options {
    store: TodosS3ArtifactStore;
    db?: Database;
    filter?: Omit<TodosRunArtifactSyncFilter, "includeAlreadySynced">;
    force?: boolean;
    now?: () => Date;
}
export interface PlanRunArtifactsS3SyncOptions {
    db?: Database;
    filter?: TodosRunArtifactSyncFilter;
    direction: "upload" | "download";
    force?: boolean;
}
export declare function uploadRunArtifactsToS3(options: UploadRunArtifactsToS3Options): Promise<TodosRunArtifactSyncResult>;
export declare function planRunArtifactsS3Sync(options: PlanRunArtifactsS3SyncOptions): TodosRunArtifactSyncPlan;
export declare function downloadRunArtifactsFromS3(options: DownloadRunArtifactsFromS3Options): Promise<TodosRunArtifactSyncResult>;
//# sourceMappingURL=s3-artifact-sync.d.ts.map