import type { CanonicalEntry } from '../../../engine/index.js';
import { type MaterializationAction, type MaterializationApplyResult, type MaterializationContext, type MaterializationExtension, type MaterializationPlan, type MaterializationWriteOperation } from '../../shared/index.js';
export type CodexExtensionAction = MaterializationAction;
export type CodexExtensionTarget = 'role' | 'config';
export interface CodexExtensionOperation {
    action: CodexExtensionAction;
    target: CodexExtensionTarget;
    path: string;
    reason: string;
    roleName?: string;
}
export interface CodexExtensionWriteOperation extends MaterializationWriteOperation<'codex', CodexExtensionTarget> {
    roleName?: string;
}
export interface CodexExtensionPlan extends MaterializationPlan<'codex', CodexExtensionTarget, CodexExtensionPlanMetadata> {
    operations: CodexExtensionWriteOperation[];
    managedRoles: string[];
    aggregateConfigHash: string;
}
export interface CodexExtensionPlanMetadata {
    managedRoles: string[];
    aggregateConfigHash: string;
}
export type CodexExtensionApplyResult = MaterializationApplyResult;
export interface CodexMaterializationTargetOptions {
    userConfigDir?: string;
    projectPath?: string | null;
    env?: NodeJS.ProcessEnv;
}
export declare function computeCodexProjectExtensionPlan(scopeRoot: string, canonicalEntries: CanonicalEntry[], allowedCanonicalPaths?: string[], options?: CodexMaterializationTargetOptions): Promise<CodexExtensionPlan>;
export declare function applyCodexProjectExtensionPlan(scopeRoot: string, plan: CodexExtensionPlan): Promise<CodexExtensionApplyResult>;
export declare function hasCodexExtensionChanges(plan: CodexExtensionPlan): boolean;
export declare function summarizeCodexExtension(plan: CodexExtensionPlan): {
    plannedOperations: number;
    skipped: number;
};
export declare function toCodexExtensionOperations(plan: CodexExtensionPlan): CodexExtensionOperation[];
export declare const codexMaterializationExtension: MaterializationExtension<CodexExtensionPlan, MaterializationContext<CodexMaterializationTargetOptions>>;
//# sourceMappingURL=sync-extension.d.ts.map