import type { ExecAllowlistEntry, ExecApprovalsKoi, ExecApprovalsFile, ExecApprovalsSnapshot } from "./exec-approvals-types.js";
export declare const DEFAULT_FILE = "~/.skykoi/exec-approvals.json";
export declare const DEFAULT_SOCKET = "~/.skykoi/exec-approvals.sock";
export declare function hashExecApprovalsRaw(raw: string | null): string;
export declare function expandHome(value: string): string;
/** Returns the expanded filesystem path to the exec-approvals JSON file. */
export declare function resolveExecApprovalsPath(): string;
/** Returns the expanded filesystem path to the exec-approvals Unix socket. */
export declare function resolveExecApprovalsSocketPath(): string;
export declare function normalizeAllowlistPattern(value: string | undefined): string | null;
export declare function mergeLegacyKoi(current: ExecApprovalsKoi, legacy: ExecApprovalsKoi): ExecApprovalsKoi;
export declare function ensureDir(filePath: string): void;
export declare function coerceAllowlistEntries(allowlist: unknown): ExecAllowlistEntry[] | undefined;
/**
 * Normalizes an exec-approvals file: merges legacy "default" koi into the
 * main koi, coerces string allowlist entries into objects, and assigns UUIDs.
 */
export declare function normalizeExecApprovals(file: ExecApprovalsFile): ExecApprovalsFile;
/**
 * Reads the exec-approvals file from disk and returns a normalized snapshot
 * with a content hash for optimistic-concurrency writes.
 */
export declare function readExecApprovalsSnapshot(): ExecApprovalsSnapshot;
/** Loads and normalizes the exec-approvals file, returning defaults on any error. */
export declare function loadExecApprovals(): ExecApprovalsFile;
/** Writes the exec-approvals file to disk with restrictive permissions (0o600). */
export declare function saveExecApprovals(file: ExecApprovalsFile): void;
/**
 * Loads the exec-approvals file, ensures socket path and auth token exist,
 * writes it back, and returns the complete file. Idempotent bootstrap call.
 */
export declare function ensureExecApprovals(): ExecApprovalsFile;
