import type { CodexPlanUpdate } from "./codex-protocol.js"; type AgentHistoryMessage = { id: string; itemId: string; threadId: string; turnId: string; role: "user" | "assistant" | "tool" | "error"; title?: string; text: string; detail?: unknown; activityItems?: Record; }; export type CodexSupplementalHistoryItem = { threadId: string; turnId: string; itemId: string; sequence?: number; item: Record; }; export type CodexSupplementalHistoryTurn = { threadId: string; turnId: string; turn: Record; }; export type CodexSupplementalHistory = { items: CodexSupplementalHistoryItem[]; turns: CodexSupplementalHistoryTurn[]; }; /** 将 Codex 线程转换为列表展示所需的摘要。 */ export declare function summarizeCodexThread(thread: unknown): { id: string; sessionId: string; preview: string; name: string | null; cwd: string; status: string; source: unknown; threadSource: unknown; createdAt: number; updatedAt: number; }; /** 返回已经终结、可由持久化历史作为权威内容的 turn。 */ export declare function settledTurnIds(thread: unknown, supplementalHistory?: CodexSupplementalHistory): string[]; /** 将 Codex turn items 转换为网页聊天历史。 */ export declare function threadMessages(thread: unknown, planUpdates?: CodexPlanUpdate[], supplementalHistory?: CodexSupplementalHistory): AgentHistoryMessage[]; export {};