import type { Static, TSchema } from "typebox"; import type { Dirent } from "node:fs"; type JsonFailureKind = "syntax" | "shape" | "field"; type MalformedJsonMessage = (detail: string, kind: JsonFailureKind) => string; export declare function ensureDirExists(dir: string): void; export declare function ensurePrivateDirExists(dir: string): void; export declare function readTextFileNoFollowIfExists(path: string): string | undefined; export interface PinnedDirectory { pathOf(name: string): string; entries(): Dirent[]; close(): void; } export declare function pinDirectoryNoFollow(dir: string): PinnedDirectory; export declare function appendFileNoFollow(path: string, content: string): void; export declare function readTextFileIfExists(path: string): string | undefined; export declare function readJsonFileIfExists(path: string, validate: (value: unknown) => value is T, malformedMessage: MalformedJsonMessage): T | undefined; export declare function readJsonSchemaFileIfExists(path: string, schema: T, malformedMessage: MalformedJsonMessage): Static | undefined; export declare function parseJsonValue(raw: string, validate: (value: unknown) => value is T, malformedMessage: MalformedJsonMessage): T; export declare function parseJsonSchemaValue(raw: string, schema: T, malformedMessage: MalformedJsonMessage): Static; export declare function atomicWritePrivateFile(targetPath: string, content: string): void; export declare function assertStateDirOutsideWorkspace(stateDir: string, workingDir: string, sandboxType: string): void; export {}; //# sourceMappingURL=file-guards.d.ts.map