import type { ZodTypeAny, TypeOf } from 'zod'; /** * Read and validate a JSON file. Returns undefined when the file is absent. * Generic over the schema so the return type is the schema's OUTPUT type (with * zod defaults applied), not its input type. A malformed or invalid file throws * a typed ConfigError (which the CLI renders cleanly) instead of a raw crash. */ export declare function readJsonFile(file: string, schema: S): TypeOf | undefined; /** * Atomically write JSON owner-only: write a unique temp file then rename over the * target, so a crash mid-write never leaves a half-written file, concurrent * writers do not collide on the temp path, and the bytes are never world-readable. */ export declare function writeJsonFile(file: string, data: unknown): void;