import { type Stats } from 'node:fs'; export interface CodexThreadRecord { version: 1; sessionKey: string; keyHash: string; threadId: string; model: string; cwd: string; systemPromptFingerprint: string; mcpConfigFingerprint: string; createdAt: string; lastUsedAt: string; } export type CodexThreadRecordInput = Omit; interface CodexThreadRegistryOptions { rootDir: string; fileSystem?: Partial; platform?: NodeJS.Platform; } interface CodexThreadRegistryFileSystem { open(path: string, flags: number, mode?: number): number; close(descriptor: number): void; stat(descriptor: number): Stats; chmod(descriptor: number, mode: number): void; sync(descriptor: number): void; read(descriptor: number): string; write(descriptor: number, value: string): void; lstat(path: string): Stats | undefined; mkdir(path: string): void; rename(source: string, destination: string, validateBoundary: () => void): void; unlink(path: string, validateBoundary: () => void): void; userId(): number | undefined; } export declare function fingerprintText(value: string): string; export declare class CodexThreadRegistry { private readonly rootDir; private readonly parentDir; private readonly fileSystem; private readonly platform; constructor(options: CodexThreadRegistryOptions); load(sessionKey: string): CodexThreadRecord | undefined; save(input: CodexThreadRecordInput): CodexThreadRecord; remove(sessionKey: string): void; private recordPath; private withRootDirectory; private withDirectory; private assertBoundary; private assertDirectoryIdentity; private openRecordForRead; private ensureSafeRecord; private assertRecordIdentity; private assertRecordPathNotSymlink; private assertOpenedRecordPath; private ensureTrustedParent; private directoryOpenFlags; private recordReadFlags; private recordWriteFlags; private withDescriptor; private syncDirectory; private removeTemporaryFileBestEffort; } export {}; //# sourceMappingURL=codex-thread-registry.d.ts.map