import { type PreparedRunArtifactPaths } from "./run-paths.js"; interface FileIdentity { readonly birthtimeNs: bigint; readonly dev: bigint; readonly ino: bigint; } export interface PreparedSelectedOutputDirectory { readonly identity: FileIdentity; readonly parentRun?: PreparedRunArtifactPaths; readonly physicalPath: string; readonly requestedPath: string; } export interface PreparedSelectedOutputFile { readonly parentIdentity: FileIdentity; readonly physicalParent: string; readonly physicalPath: string; readonly requestedPath: string; } export type PreparedOutputDirectory = PreparedSelectedOutputDirectory | PreparedRunArtifactPaths; export type PreparedOutputRoot = PreparedOutputDirectory; /** * Prepare an arbitrary caller-selected output directory without changing the * caller's resolution contract. Relative values resolve against baseDir; * absolute values keep their authority. Every spelling is caller authority: * existing aliases in the selected directory or its parents are canonicalized * once, then bound by physical path and directory identity. Managed defaults * must use a strict storage preparer instead. */ export declare function prepareSelectedOutputDirectory(baseDir: string, selectedPath: string): Promise; /** Prepare a strict `.humanish`-managed directory, then bind its identity. */ export declare function prepareManagedHumanishOutputDirectory(cwd: string, ...segments: string[]): Promise; /** Bind an existing strict `.humanish` directory without creating storage. */ export declare function bindExistingManagedHumanishOutputDirectory(cwd: string, ...segments: string[]): Promise; /** Prepare an arbitrary caller-selected output file whose parent is independent. */ export declare function prepareSelectedOutputFile(baseDir: string, selectedPath: string): Promise; export declare function assertPreparedSelectedOutputDirectory(prepared: PreparedSelectedOutputDirectory): Promise; export declare function assertPreparedSelectedOutputFile(prepared: PreparedSelectedOutputFile): Promise; export declare function writePreparedSelectedOutputFile(prepared: PreparedSelectedOutputFile, data: string | Uint8Array, encoding?: BufferEncoding): Promise; /** Atomically write the sibling latest pointer bound by a prepared run token. */ export declare function writePreparedRunLatestPointer(prepared: PreparedRunArtifactPaths, data: string | Uint8Array, encoding?: BufferEncoding): Promise; export declare function prepareContainedOutputDirectory(rootInput: PreparedOutputRoot, relativePath: string): Promise; /** Prepare and identity-bind a generated child directory under a prepared root. */ export declare function prepareContainedOutputDirectoryRoot(rootInput: PreparedOutputDirectory, relativePath: string): Promise; export declare function prepareContainedOutputFile(rootInput: PreparedOutputRoot, relativePath: string): Promise; export declare function writeContainedOutputFile(rootInput: PreparedOutputRoot, relativePath: string, data: string | Uint8Array, encoding?: BufferEncoding): Promise; /** Read one regular file only when both lexical and physical paths stay in root. */ export declare function readContainedRegularFile(rootInput: PreparedOutputRoot, relativePath: string): Promise; export declare function assertSafeOutputPathSegment(value: string, label?: string): void; export {};