/**
 * Instance index — a reconciled CACHE of all installed instances on the host.
 *
 * Lives at <kiciRoot>/instances.json, where kiciRoot is the name-agnostic
 * config root (~/.config/kici/ for user-level, /etc/kici/ for system). The
 * index is convenience: discovery is authoritative against the init system
 * (see resolve.ts#listInstances which reconciles this file against scans).
 *
 * Corrupt index → warn and treat as empty; the next install/uninstall
 * rewrites it cleanly.
 */
import type { Component, IndexEntry } from './types.js';
/** Resolve <kiciRoot>/instances.json. */
export declare function indexPath(kiciRoot: string): string;
/** Read the index. Missing or corrupt → []. */
export declare function readIndex(kiciRoot: string): IndexEntry[];
/** Overwrite the index. */
export declare function writeIndex(kiciRoot: string, entries: IndexEntry[]): void;
/**
 * Append an entry. Idempotent for an exact (component,name,instanceDir) match.
 * Throws on a (component,name) collision with a different instanceDir — the
 * caller must use a different name or pass --force to overwrite.
 */
export declare function appendIndexEntry(kiciRoot: string, entry: IndexEntry): void;
/** Remove the matching entry (no-op when absent). */
export declare function removeIndexEntry(kiciRoot: string, key: {
    component: Component;
    name: string;
}): void;
//# sourceMappingURL=index-file.d.ts.map