/**
 * OpenAI Codex CLI observer — proves the integration registry generalizes
 * beyond Claude Code.
 *
 * Codex persists each session as JSONL at
 *   $CODEX_HOME/sessions/YYYY/MM/DD/rollout-*.jsonl   (CODEX_HOME ~ ~/.codex)
 * — the same file-tailing shape as Claude Code, so this adapter mirrors that
 * watcher's structure: scan + fs.watch the sessions tree, derive state from
 * each file's tail, normalize to AgentSession.
 *
 * PRIVACY: identical contract to claude-code — only structural metadata
 * (entry `type`/`role`, error flags, file mtime). Never message content.
 *
 * NOTE: Codex's exact rollout schema varies by version; the state parse is
 * deliberately tolerant (unknown shapes → "unknown") and the integration is
 * DISABLED by default (opt in via ~/.lisa/agents.json). It graceful-no-ops
 * when $CODEX_HOME/sessions is absent.
 */
import { EventEmitter } from "node:events";
import type { AgentIntegrationConfig, AgentObserver, AgentSession, AgentSessionState } from "../types.js";
export declare class CodexObserver extends EventEmitter implements AgentObserver {
    readonly agent = "codex";
    private sessionsRoot;
    private sessions;
    private watcher;
    private pending;
    private emitFn;
    constructor(cfg: AgentIntegrationConfig);
    start(emit: (s: AgentSession) => void): Promise<void>;
    list(): AgentSession[];
    stop(): Promise<void>;
    private scan;
    private attach;
    private record;
}
/** Recursively collect rollout-*.jsonl under root. Empty array if absent. */
export declare function walkRollouts(root: string): Promise<string[]>;
/**
 * Tolerant state derivation from a Codex rollout tail. Codex schema differs
 * by version; we look for the last entry's role/type and any error flag.
 * Unknown shapes → "unknown". Structural fields only.
 */
export declare function parseCodexState(filePath: string): Promise<{
    state: AgentSessionState;
    reason: string;
    cwd?: string;
}>;
//# sourceMappingURL=observer.d.ts.map