import { type NoFollowPathIdentity } from "./no-follow-file.js"; import { type NativeProjectReadRootContext, type NativeProjectReadTreeEntry } from "./native-project-read.js"; type DirectoryReservation = { readonly descriptor: number; readonly identity: NoFollowPathIdentity; readonly path: string; }; export type ProjectReadFile = { readonly bytes: Buffer; readonly identity: NoFollowPathIdentity; }; export type FreshBootstrapPersonaFile = { readonly bytes: Buffer; readonly relativePath: string; }; export type ProjectReadTreeEntry = { readonly identity: NoFollowPathIdentity; readonly kind: "directory"; readonly path: string; } | { readonly bytes: Buffer; readonly identity: NoFollowPathIdentity; readonly kind: "file"; readonly path: string; }; export type ProjectReadTreeOptions = { readonly excludedRoots: readonly string[]; readonly maxEntries: number; readonly maxFileBytes: number; readonly maxTotalBytes: number; }; export declare class BootstrapWriteBoundaryError extends Error { constructor(); } export declare class ProjectReadBoundaryError extends Error { readonly code: string; constructor(code?: string); } export declare class ProjectReadBoundaryLimitError extends Error { constructor(); } export declare class BootstrapWriteBoundary { #private; constructor(project: DirectoryReservation, persona: DirectoryReservation, workflow: DirectoryReservation); close(): void; assert(): void; withCapturedProject(operation: () => T): T; assertSafePersonaFile(relativePath: string): void; assertSafeWorkflowFile(name: string): void; writePersonaFile(relativePath: string, text: string): void; writeWorkflowFile(name: string, text: string): void; writeRootFile(relativePath: string, bytes: Buffer): boolean; writeProjectFile(relativePath: string, content: string | Buffer): boolean; writeProjectFileAtomically(relativePath: string, content: string | Buffer): boolean; readProjectFile(relativePath: string): Buffer | undefined; projectFileExists(relativePath: string): boolean; assertSafeProjectDirectoryPath(relativePath: string): void; listProjectRegularFiles(relativeRoots: readonly string[], suffix: string, maxEntries: number): readonly string[]; } export declare class ProjectReadBoundary { #private; constructor(projectPath: string, project: NoFollowPathIdentity, entries: readonly NativeProjectReadTreeEntry[], rootContext?: NativeProjectReadRootContext); close(): void; assert(): void; projectIdentity(): NoFollowPathIdentity; workspaceIdentity(): { readonly dev: string; readonly ino: string; readonly realpath: string; }; runFixedGit(args: readonly string[]): { readonly available: boolean; readonly diagnosticCode: string; readonly status: number; readonly stdout: string; }; runFixedGradle(command: "build" | "test", timeoutMs: number): import("./native-project-read-protocol.js").NativeProjectReadCommandResult; withCapturedProject(operation: () => T): T; readProjectFile(relativePath: string, maxBytes?: number): Buffer | undefined; readProjectFileWithIdentity(relativePath: string, maxBytes?: number): ProjectReadFile | undefined; readProjectDirectoryIdentity(relativePath: string): NoFollowPathIdentity | undefined; readProjectTree(options: ProjectReadTreeOptions): readonly ProjectReadTreeEntry[]; readProjectTreeAt(relativePath: string, options: ProjectReadTreeOptions): readonly ProjectReadTreeEntry[] | undefined; readGeneratedProjectTreeAt(relativePath: string, options: ProjectReadTreeOptions): readonly ProjectReadTreeEntry[] | undefined; assertSafeProjectDirectoryPath(relativePath: string): void; } export declare function reserveProjectReadBoundary(projectDir: string, selectedProjectIdentity?: NoFollowPathIdentity, suppliedRootContext?: NativeProjectReadRootContext): ProjectReadBoundary; export declare function reserveBootstrapWriteBoundary(projectDir: string): BootstrapWriteBoundary; export declare function reserveExistingBootstrapWriteBoundary(projectDir: string): BootstrapWriteBoundary; export declare function materializeFreshBootstrapWriteBoundary(projectDir: string, files: readonly FreshBootstrapPersonaFile[]): BootstrapWriteBoundary; export {};