/**
 * codex-cli-transcript — Daemon-side built-in native history adapter for codex-cli.
 *
 * Reads Codex CLI rollout JSONL session files directly without shelling out to a JS override.
 * Files are stored at ~/.codex/sessions/<uuid>[-<slug>].jsonl.
 *
 * Format — each line is a JSON object of one of these types:
 *   { type: 'session_meta', timestamp: number, payload: { id: string, cwd: string, ... } }
 *   { type: 'response_item', timestamp: number, payload: { type: 'message', role: 'user'|'assistant', content: ... } }
 *   { type: 'response_item', timestamp: number, payload: { type: 'function_call' | 'custom_tool_call', name?: string, arguments?: string, input?: unknown } }
 *   { type: 'response_item', timestamp: number, payload: { type: 'function_call_output' | 'custom_tool_call_output', output?: string, result?: string } }
 *
 * watchPath (from provider.v1.json): ~/.codex/sessions
 *
 * OSS code (AGPL-3.0). Must not import from packages/ (proprietary).
 */
export type NativeHistoryRole = 'user' | 'assistant' | 'system';
export type NativeHistoryKind = 'standard' | 'tool' | 'session_start';
export interface NativeHistoryMessage {
    ts: string;
    receivedAt: number;
    role: NativeHistoryRole;
    content: string;
    kind: NativeHistoryKind;
    senderName?: string;
    agent: 'codex-cli';
    historySessionId: string;
    workspace?: string;
    /** Stable per-message identity (v2 contract). */
    providerUnitKey?: string;
}
export interface NativeHistorySession {
    messages: NativeHistoryMessage[];
    providerSessionId: string;
    source: 'provider-native';
    sourcePath: string;
    sourceMtimeMs: number;
    nativeHistoryCoverage: 'full';
    workspace?: string;
}
export interface NativeHistorySessionMeta {
    historySessionId: string;
    sessionId: string;
    sourcePath: string;
    sourceMtimeMs: number;
    messageCount: number;
    firstMessageAt: number;
    lastMessageAt: number;
    sessionTitle?: string;
    preview?: string;
    workspace?: string;
    agent: 'codex-cli';
    source: 'provider-native';
    nativeHistoryCoverage: 'full';
}
/**
 * Read a single Codex CLI session by its JSONL file path.
 *
 * `sessionPath` is the absolute path to a `<uuid>[-<slug>].jsonl` file
 * under ~/.codex/sessions/.
 * Returns `null` when the file is missing, empty, or yields no parseable messages.
 */
export declare function readSession(sessionPath: string): NativeHistorySession | null;
/**
 * List all Codex CLI sessions under the given watchPath base dir.
 *
 * `watchPath` is the value from provider.v1.json (`~/.codex/sessions`).
 * Expands the home directory and scans the directory recursively,
 * collecting all `.jsonl` files.
 *
 * Returns summary metadata for each session, sorted by most recently updated first.
 */
export declare function listSessions(watchPath: string): Promise<NativeHistorySessionMeta[]>;
