import { type RecoveryFsIdentity, type RecoveryFsRoot } from "@gajae-code/natives"; export declare const CODEX_PROVIDER_ID = "openai-codex"; export declare const CODEX_CONVERTER_VERSION = 1; export declare const CODEX_IMPORT_BATCH_LIMIT = 256; export declare const CODEX_SANITIZER_VERSION = 2; export declare const CODEX_MAPPING_VERSION = 3; interface CodexWorkspaceIdentity { dev: string; ino: string; } export interface CodexSessionSource { id: string; path: string; cwd: string; timestamp: string; title?: string; cliVersion?: string; modelProvider?: string; identity?: RecoveryFsIdentity; workspaceIdentity?: CodexWorkspaceIdentity; authority?: { root: RecoveryFsRoot; relativePath: string; }; } export type CodexMappedEvent = { kind: "user"; timestamp: string; text: string; } | { kind: "assistant"; timestamp: string; text: string; } | { kind: "tool_call"; timestamp: string; callId: string; name: string; arguments: Record; } | { kind: "tool_result"; timestamp: string; callId: string; output: string; }; export interface CodexQuarantineRecord { line: number; timestamp?: string; eventType: string; reason: string; payload: unknown; } export interface CodexConversion { source: CodexSessionSource; sourceSha256: string; sourceBytes: number; mapped: CodexMappedEvent[]; quarantine: CodexQuarantineRecord[]; quarantineTruncated: boolean; counts: { input: number; mapped: number; quarantined: number; dropped: number; redacted: number; }; } export declare class CodexImportError extends Error { readonly code: "source_not_found" | "source_untrusted" | "source_changed" | "malformed_source" | "content_too_large"; readonly phase: "discovery" | "source" | "source_line" | "source_event" | "quarantine"; readonly limitBytes?: number | undefined; readonly observedBytes?: number | undefined; constructor(code: "source_not_found" | "source_untrusted" | "source_changed" | "malformed_source" | "content_too_large", phase: "discovery" | "source" | "source_line" | "source_event" | "quarantine", message: string, limitBytes?: number | undefined, observedBytes?: number | undefined); } export type CodexMappedEventSink = (event: CodexMappedEvent) => void | Promise; export declare function sanitizeImportedString(value: string): { value: string; redacted: number; }; export declare function sanitizeImportedValue(value: unknown, depth?: number): { value: unknown; redacted: number; }; export declare function assertCodexWorkspaceIdentity(source: CodexSessionSource): Promise; export declare function discoverCodexSessions(cwd: string, requestedIds: readonly string[], codexHome?: string, retainSourceAuthority?: boolean): Promise; export declare function closeCodexSessionAuthorities(sources: readonly CodexSessionSource[]): Promise; export declare function convertCodexSession(source: CodexSessionSource, mappedEventSink?: CodexMappedEventSink): Promise; export {};