/**
 * Skills download — fetches skill folders from the storage API and writes them locally.
 *
 * Downloads can create or overwrite a local skill folder after approval so the
 * local copy matches the cloud version.
 */
import { type StorageContext } from './storage-client.js';
export interface SkillDownloadApprovalRequest {
    skillName: string;
    source: StorageContext;
    kind: 'create' | 'update';
    modifiedFiles: number;
    localOnlyFiles: number;
    remoteOnlyFiles: number;
    localModifiedAt?: string;
    cloudModifiedAt?: string;
    fileDiffs: SkillFileDiff[];
}
export interface SkillFileDiff {
    path: string;
    change: 'modified' | 'local-only' | 'remote-only';
}
export interface SkillDownloadChange {
    skillName: string;
    source: StorageContext;
    kind: 'create' | 'update';
    localModifiedAt?: string;
    cloudModifiedAt?: string;
    fileDiffs: SkillFileDiff[];
}
export interface SkillsDownloadResult {
    /** Skill names that had at least one file written */
    downloaded: string[];
    /** Skill names where local and cloud copies were already identical */
    skipped: string[];
    /** Skill names skipped after the user rejected overwrite */
    skippedByUser: string[];
    /** Total files written to disk */
    filesDownloaded: number;
    changes: SkillDownloadChange[];
    errors: string[];
}
export type SkillDownloadApprovalHandler = (request: SkillDownloadApprovalRequest) => Promise<boolean>;
export declare function downloadSkillsWithApproval(accessToken: string, approve: SkillDownloadApprovalHandler, authorizedSkillTeamIds?: readonly string[] | null): Promise<SkillsDownloadResult>;
//# sourceMappingURL=skills-download.d.ts.map