/**
 * Nexus Prime — Mutation Engine
 *
 * SOLE MUTATION AUTHORITY.
 * All file mutations go through this engine. No other module may
 * directly create, modify, or delete files in worktrees.
 *
 * Synapse and Architects are explicitly forbidden from calling mutation methods.
 */
import type { MutationRecord } from '../types/execution.js';
export interface MutationEngineDeps {
    repoRoot: string;
    artifactsRoot: string;
}
/** Caller context — used to enforce governance boundaries. */
export type MutationCaller = 'phantom' | 'coordinator' | 'worker';
export declare class MutationEngine {
    private repoRoot;
    private artifactsRoot;
    private mutations;
    constructor(deps: MutationEngineDeps);
    /**
     * Assert that the caller is authorized to mutate.
     * Governance layers (Synapse, Architects) must NOT call mutation methods.
     */
    static assertNotFromGovernance(caller: string): void;
    /** Record a mutation (file create/modify/delete). */
    recordMutation(record: MutationRecord, caller?: MutationCaller): void;
    /** Apply mutations in a worktree. */
    applyInWorktree(_worktreeId: string, _mutations: MutationRecord[], caller?: MutationCaller): Promise<{
        applied: number;
        errors: string[];
    }>;
    /** Rollback mutations in a worktree. */
    rollback(_worktreeId: string, caller?: MutationCaller): Promise<{
        rolledBack: number;
    }>;
    /** Get all recorded mutations for a run. */
    getMutations(): MutationRecord[];
}
