export type JsoncFormat = "json" | "jsonc" | "none"; export interface JsoncFile { path: string; format: JsoncFormat; } /** Detect an existing {name}.jsonc or {name}.json next to a base directory. */ export declare function detectJsoncFile(configDir: string, baseName: string): JsoncFile; /** Parse a JSONC file; returns null on missing file or unreadable content. */ export declare function readJsoncFile(path: string): { value: Record | null; error?: string; }; /** * Write a JSON/JSONC file, preserving comments when possible. Creates parent * directories. When `format === "jsonc"` and the value was produced by * `comment-json`'s `parse`, embedded comments are retained via `stringifyJsonc`. */ export declare function writeJsoncFile(path: string, value: Record, format?: JsoncFormat): void; /** Canonical URL of the published AFT config schema. */ export declare const AFT_SCHEMA_URL = "https://raw.githubusercontent.com/cortexkit/aft/main/assets/aft.schema.json"; export type AftSchemaAction = "added" | "updated" | "unchanged"; /** * Ensure `aft.jsonc` (or `aft.json`) contains a top-level `$schema` field * pointing at the published AFT JSON Schema. Editor tooling (VS Code, Cursor, * etc.) uses this for autocomplete and validation. * * Creates the file with `{"$schema": "..."}` if missing. Preserves existing * comments and field ordering when the file exists. * * `format` follows the harness adapter contract: `"none"` means no file * existed before — written as `.json` by default so editors that don't grok * JSONC still parse it. Pass `"jsonc"` to keep existing JSONC files as JSONC. */ export declare function ensureAftSchemaUrl(path: string, format: JsoncFormat): { action: AftSchemaAction; message: string; }; //# sourceMappingURL=jsonc.d.ts.map