import type { CanonicalEntry } from '../../engine/index.js';
export type MaterializationAction = 'create' | 'update' | 'remove' | 'skip';
export interface MaterializationOperation<TProvider extends string = string, TTarget extends string = string> {
    provider: TProvider;
    action: MaterializationAction;
    target: TTarget;
    path: string;
    reason: string;
    entryName?: string;
}
export interface MaterializationWriteOperation<TProvider extends string = string, TTarget extends string = string> extends MaterializationOperation<TProvider, TTarget> {
    content?: string;
}
export interface MaterializationPlan<TProvider extends string = string, TTarget extends string = string, TMetadata = unknown> {
    provider: TProvider;
    operations: MaterializationWriteOperation<TProvider, TTarget>[];
    managedEntries: string[];
    aggregateHash: string;
    metadata: TMetadata;
}
export interface MaterializationApplyResult {
    applied: number;
    failed: number;
    skipped: number;
}
export interface MaterializationContext<TOptions = undefined> {
    scopeRoot: string;
    canonicalEntries: CanonicalEntry[];
    allowedCanonicalPaths?: string[];
    options: TOptions;
}
export interface MaterializationExtension<TPlan extends MaterializationPlan = MaterializationPlan, TContext extends MaterializationContext<unknown> = MaterializationContext<unknown>> {
    provider: TPlan['provider'];
    computePlan(context: TContext): Promise<TPlan>;
    applyPlan(scopeRoot: string, plan: TPlan): Promise<MaterializationApplyResult>;
}
export interface MaterializationPlanSummary {
    plannedOperations: number;
    skipped: number;
}
export declare function hasMaterializationChanges(plan: MaterializationPlan): boolean;
export declare function summarizeMaterializationPlan(plan: MaterializationPlan): MaterializationPlanSummary;
export declare function toMaterializationOperations<TProvider extends string, TTarget extends string>(plan: MaterializationPlan<TProvider, TTarget, unknown>): MaterializationOperation<TProvider, TTarget>[];
//# sourceMappingURL=materialization-extension.d.ts.map