import type { RillConfigFile } from '@rcrsr/rill-config'; import { ConfigNotFoundError } from '@rcrsr/rill-config'; export { ConfigNotFoundError }; export interface ConfigSnapshot { readonly path: string; readonly rawText: string; readonly parsed: RillConfigFile; } /** * Thrown when writing rill-config.json to disk fails. * Wraps the underlying I/O error message. */ export declare class ConfigWriteError extends Error { constructor(configPath: string, cause: unknown); } /** * Reads /rill-config.json and returns a snapshot of the raw text * and parsed structure. * * @throws {ConfigNotFoundError} when the file does not exist (ENOENT). */ export declare function readConfigSnapshot(projectDir: string): Promise; /** * Applies a mount add/overwrite/remove edit to the config file on disk, then * validates the result via loadProject. On validation failure the original * rawText is written back byte-for-byte and the original error is re-thrown. * * @throws {ConfigWriteError} when the disk write itself fails (EC-30). * @throws {MountValidationError | NamespaceCollisionError} on validation * failure after rollback (EC-29). */ export declare function applyMountEdit(snapshot: ConfigSnapshot, edit: { kind: 'add' | 'overwrite' | 'remove'; mount: string; value?: string; }, prefix: string, options?: { skipValidation?: boolean; }): Promise; /** * Returns true when the snapshot contains a mount entry for the given path. */ export declare function hasMount(snapshot: ConfigSnapshot, mount: string): boolean;