import { type JsonObject, type JsonValue } from "./json-path.js";
import type { SyncedSetting } from "./registry.js";
import { MutationFloorDivergenceError } from "./stryker-thresholds-ownership.js";
/** What sync did (or would do, in dry-run) for one setting. */
export type SyncActionKind = "absorbed-artifact" | "populated-default" | "filled-missing" | "default-evolved" | "artifact-synced" | "divergence-honoured";
/** One reportable sync action. */
export interface SyncAction {
    /** Config key the action applies to */
    readonly key: string;
    /** What happened */
    readonly kind: SyncActionKind;
    /** Human-readable detail (e.g. which artifact file was involved) */
    readonly detail: string;
}
/** Read-only project inputs consumed by the sync planner. */
export interface SyncReadDependencies {
    readonly readJson: (relativePath: string) => Promise<unknown | null>;
    readonly pathExists: (relativePath: string) => Promise<boolean>;
}
/** Accumulated state threaded through the sync pass. */
export interface SyncState {
    readonly committed: JsonObject;
    readonly actions: readonly SyncAction[];
    readonly artifactWrites: ReadonlyMap<string, JsonObject>;
    /**
     * Refusal recorded when the config-owned mutation floor and the floor on
     * disk disagree. Held rather than thrown at the point of discovery so the
     * pass still completes and nothing at all is persisted.
     */
    readonly divergence: MutationFloorDivergenceError | undefined;
}
/**
 * Apply an entry's optional executable value contract.
 * @param entry - Registry entry owning the value
 * @param value - Untrusted effective value
 * @returns Validated or unchanged JSON value
 */
export declare function validateEntryValue(entry: SyncedSetting, value: JsonValue): JsonValue;
/**
 * Queue artifact writes for one entry (sync direction: config wins). Only
 * files that already exist on disk are written — sync never scaffolds
 * artifacts into stacks that do not use them.
 * @param state - Current sync state
 * @param entry - Registry entry
 * @param local - Local config overlay
 * @param reads - Project input readers
 * @returns Updated state
 */
export declare function syncArtifacts(state: SyncState, entry: SyncedSetting, local: JsonObject, reads: SyncReadDependencies): Promise<SyncState>;
//# sourceMappingURL=artifact-sync.d.ts.map