import { MirrorConfig } from "./canonical_mirror.js";
export interface GitCommitEntityChange {
    entity_type: string;
    slug: string;
    field_count?: number;
}
export interface GitCommitRelationshipChange {
    relationship_type: string;
    key: string;
}
export interface GitCommitObservation {
    observation_id: string;
    source_id?: string | null;
    source_priority?: number | null;
    observed_at?: string | null;
}
export type MirrorTrigger = "store" | "correct" | "interpret" | "relationships" | "sources" | "schemas" | "rebuild";
export interface MirrorCommitBatch {
    trigger: MirrorTrigger;
    entities?: GitCommitEntityChange[];
    relationships?: GitCommitRelationshipChange[];
    observations?: GitCommitObservation[];
    kinds?: string[];
    author?: {
        name?: string;
        email?: string;
    };
}
export interface GitCommitResult {
    committed: boolean;
    reason?: "git_disabled" | "empty_diff" | "no_repo";
    commit_hash?: string;
    file_count?: number;
}
/**
 * Initialize a git repo at the mirror root on enable. Idempotent: skips if
 * `.git` already exists. Does NOT commit here; the first rebuild creates the
 * initial commit.
 */
export declare function initMirrorRepo(cfg?: MirrorConfig): Promise<{
    initialized: boolean;
}>;
/**
 * Build the deterministic commit message body per the plan spec:
 *
 *   update: <n> file(s) across <kinds> via <trigger>
 *
 *   entities:
 *     - <entity_type>/<slug> (<n> field(s))
 *   relationships:
 *     - <relationship_type>/<key>
 *   observations:
 *     - <observation_id> source=<source_id> priority=<p> observed_at=<ts>
 *   trigger: <store|correct|interpret|relationships|sources|schemas>
 *   author: <agent|user>
 */
export declare function buildCommitMessage(batch: MirrorCommitBatch, fileCount: number): string;
/**
 * Stage all pending changes and commit them once with a deterministic message.
 * Empty-diff commits are skipped (content-hash no-op in Phase 2 already
 * prevents spurious file writes, but this is a safety net for index-only
 * rewrites that touched mtime but not content).
 */
export declare function commitMirrorBatch(batch: MirrorCommitBatch, cfg?: MirrorConfig): Promise<GitCommitResult>;
/**
 * Initial commit after `neotoma mirror rebuild` so subsequent batch commits
 * have a parent. Idempotent: no-ops when the repo already has at least one
 * commit.
 */
export declare function ensureInitialCommit(cfg?: MirrorConfig): Promise<GitCommitResult>;
//# sourceMappingURL=canonical_mirror_git.d.ts.map