import { type TerminalWritable, type ITerminal } from '@rushstack/terminal';
import { CobuildLock } from '../cobuild/CobuildLock';
import { OperationBuildCache } from '../buildCache/OperationBuildCache';
import type { CobuildConfiguration } from '../../api/CobuildConfiguration';
import { DisjointSet } from '../cobuild/DisjointSet';
import { PeriodicCallback } from './PeriodicCallback';
import type { Operation } from './Operation';
import type { IPhasedCommandPlugin, PhasedCommandHooks } from '../../pluginFramework/PhasedCommandHooks';
import type { BuildCacheConfiguration } from '../../api/BuildCacheConfiguration';
export interface IProjectDeps {
    files: {
        [filePath: string]: string;
    };
    arguments: string;
}
export interface IOperationBuildCacheContext {
    isCacheWriteAllowed: boolean;
    isCacheReadAllowed: boolean;
    operationBuildCache: OperationBuildCache | undefined;
    cacheDisabledReason: string | undefined;
    outputFolderNames: ReadonlyArray<string>;
    cobuildLock: CobuildLock | undefined;
    cobuildClusterId: string | undefined;
    buildCacheTerminal: ITerminal | undefined;
    buildCacheTerminalWritable: TerminalWritable | undefined;
    periodicCallback: PeriodicCallback;
    cacheRestored: boolean;
    isCacheReadAttempted: boolean;
}
export interface ICacheableOperationPluginOptions {
    allowWarningsInSuccessfulBuild: boolean;
    buildCacheConfiguration: BuildCacheConfiguration;
    cobuildConfiguration: CobuildConfiguration | undefined;
    terminal: ITerminal;
    excludeAppleDoubleFiles: boolean;
}
export declare class CacheableOperationPlugin implements IPhasedCommandPlugin {
    private _buildCacheContextByOperation;
    private readonly _options;
    constructor(options: ICacheableOperationPluginOptions);
    apply(hooks: PhasedCommandHooks): void;
    private _getBuildCacheContextByOperation;
    private _getBuildCacheContextByOperationOrThrow;
    private _tryGetOperationBuildCache;
    private _tryGetLogOnlyOperationBuildCacheAsync;
    private _tryGetCobuildLockAsync;
    private _createBuildCacheTerminalAsync;
    private _tryGetBuildCacheTerminalWritableAsync;
}
export declare function clusterOperations(initialClusters: DisjointSet<Operation>, operationBuildCacheMap: Map<Operation, {
    cacheDisabledReason: string | undefined;
}>): void;
//# sourceMappingURL=CacheableOperationPlugin.d.ts.map