export declare const RUNS_RELATIVE_ROOT: string; export declare const LATEST_RUN_RELATIVE_PATH: string; export interface RunArtifactPaths { absoluteRunRoot: string; relativeRunRoot: string; absoluteLatestPointer: string; relativeLatestPointer: string; } export interface PreparedRunArtifactPaths extends RunArtifactPaths { readonly physicalLatestPointer: string; readonly physicalRunRoot: string; readonly physicalRunsRoot: string; readonly runRootIdentity: FileIdentity; readonly runsRootIdentity: FileIdentity; } interface FileIdentity { readonly birthtimeNs: bigint; readonly dev: bigint; readonly ino: bigint; } export interface LatestRunPathPointer { runId: string; path: string; } /** * Run ids are directory names, not paths. Keep the accepted grammar broad so * existing runs remain readable while rejecting every path-shaped input. */ export declare function isSafeRunIdSegment(runId: string): boolean; export declare function resolveRunsRoot(cwdInput: string): string; export declare function resolveRunDirectory(cwdInput: string, runId: string): string; export declare function tryResolveRunDirectory(cwdInput: string, runId: string): string | null; export declare function resolveRunArtifactPaths(cwdInput: string, runId: string): RunArtifactPaths; export declare function prepareRunArtifactPaths(cwdInput: string, runId: string): Promise; export declare function validatePreparedRunArtifactPaths(prepared: PreparedRunArtifactPaths): Promise; /** Cheap revalidation for repeated contained reads/writes within one prepared run. */ export declare function validatePreparedRunRootIdentity(prepared: PreparedRunArtifactPaths): Promise; /** Bind an already-existing safe run as a new identity; this is not prior-preparation proof. */ export declare function bindExistingRunArtifactPaths(cwdInput: string, runId: string): Promise; export declare function resolveExistingRunDirectory(cwdInput: string, runId: string): Promise; /** * A latest pointer is valid only when both fields identify the same direct * child of .humanish/runs. Callers must never use pointer.path directly. */ export declare function resolveLatestRunDirectory(cwdInput: string, pointer: LatestRunPathPointer): string | null; export declare function resolveExistingLatestRunDirectory(cwdInput: string, pointer: LatestRunPathPointer): Promise; export declare function isRegularHumanishStorageFile(cwdInput: string, ...segments: string[]): Promise; export declare function prepareHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise; export declare function prepareReusableHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise; export declare function prepareExclusiveHumanishStorageDirectories(cwdInput: string, segmentSets: string[][]): Promise; export declare function prepareExclusiveHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise; export declare function prepareHumanishStorageFile(cwdInput: string, ...segments: string[]): Promise; export declare function resolveHumanishStorageDirectory(cwdInput: string, ...segments: string[]): string; export declare function resolveExistingHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise; export declare function isPathInside(rootInput: string, candidateInput: string): boolean; export {};