/** * Codex Conversation Parser for MCP integration. * * This parser reads conversation history from Codex's storage location * (~/.codex/sessions) and converts it to the same format as ConversationParser. * * Codex stores conversations in a date-hierarchical structure: * ~/.codex/sessions/YYYY/MM/DD/rollout-{timestamp}-{uuid}.jsonl * * Each line in a Codex session file has the structure: * { * timestamp: string, * type: "session_meta" | "response_item" | "event_msg" | "turn_context", * payload: { ... } * } * * @example * ```typescript * const parser = new CodexConversationParser(); * const result = parser.parseSessions('/Users/username/.codex'); * console.error(`Parsed ${result.conversations.length} Codex sessions`); * ``` */ import type { ParseResult } from "./ConversationParser.js"; /** * Parser for Codex conversation history. * * Converts Codex session files into the same format as ConversationParser * so they can be stored in the same database and searched together. */ export declare class CodexConversationParser { private cwdCache; private resolveProjectPath; private findCwd; /** * Parse all Codex sessions. * * Recursively scans the sessions directory for JSONL files and parses them. * * @param codexPath - Path to Codex home directory (default: ~/.codex) * @param sessionId - Optional specific session ID to parse * @returns ParseResult with all extracted entities */ parseSession(codexPath: string, sessionId?: string, lastIndexedMs?: number): ParseResult; /** * Recursively find all .jsonl session files. */ private findSessionFiles; /** * Parse a single Codex session file. */ private parseSessionFile; } //# sourceMappingURL=CodexConversationParser.d.ts.map