import type { AgentState } from "@oh-my-pi/pi-agent-core";
import type { SessionEntry, SessionHeader } from "../../session/session-entries.js";
import { SessionManager } from "../../session/session-manager.js";
/** Compose the standalone export template: minified CSS, tool renderers, and viewer JS inlined. */
export declare function getTemplate(): string;
export interface ExportOptions {
    outputPath?: string;
    /**
     * Which color palette the export ships with.
     * - `"web"` (default) — the omp brand identity (collab-web pink/purple),
     *   so public HTML exports and the `/s/<id>` share viewer match the live
     *   `my.omp.sh` client. See `web-palette.ts`.
     * - `"theme"` — derive from `themeName` (or the active TUI theme), preserving
     *   the pre-15.12 behavior where an export mirrored the user's terminal.
     */
    palette?: "web" | "theme";
    /**
     * TUI theme to derive colors from when `palette: "theme"`. Ignored for the
     * default `"web"` palette. Resolves to the active TUI theme when omitted.
     */
    themeName?: string;
    /** Embed subagent session transcripts found next to the session file (default true). */
    includeSubSessions?: boolean;
}
/**
 * Generate CSS custom properties for the export `:root`.
 *
 * Two call shapes:
 *   • `generateThemeVars("web" | "theme", themeName?)` — explicit palette.
 *     `"web"` (the default for public artifacts) returns the fixed omp brand
 *     palette from `web-palette.ts` — collab-web pink/purple identity, shared
 *     with the live `my.omp.sh` client, so exports and the share viewer render
 *     identically to it. `"theme"` derives from the TUI theme via
 *     `getResolvedThemeColors(themeName)` plus the three
 *     `export.{pageBg,cardBg,infoBg}` surface overrides.
 *   • `generateThemeVars(themeName)` — legacy single-arg form: derive from the
 *     named TUI theme. Kept so existing callers (and the theme-islight test)
 *     keep working; equivalent to `generateThemeVars("theme", themeName)`.
 *
 * Exported for the share-viewer build script.
 */
export declare function generateThemeVars(palette?: "web" | "theme" | (string & {}), themeName?: string): Promise<string>;
/** Embedded subagent session transcript, keyed by slash-joined agent path in `SessionData.subSessions`. */
export interface SubSession {
    /** Bare agent id (session file stem), e.g. "ToolAsk". */
    agentId: string;
    /** Key of the parent sub-session, or null when spawned by the main session. */
    parent: string | null;
    header: SessionHeader | null;
    entries: SessionEntry[];
    leafId: string | null;
}
export interface SessionData {
    header: SessionHeader | null;
    entries: SessionEntry[];
    leafId: string | null;
    systemPrompt?: string;
    tools?: {
        name: string;
        description: string;
    }[];
    subSessions?: Record<string, SubSession>;
}
/** Snapshot the session (plus optional agent state) into the JSON shape the viewer renders. */
export declare function buildSessionData(sm: SessionManager, state?: AgentState): SessionData;
/**
 * Collect subagent session transcripts stored next to a session file.
 *
 * A session at `<dir>/<name>.jsonl` keeps its subagent sessions at `<dir>/<name>/<AgentId>.jsonl`;
 * each subagent's own children nest the same way under `<dir>/<name>/<AgentId>/`. Keys in the
 * returned record are slash-joined ids relative to the main session ("ToolAsk", "ToolAsk/Helper").
 * Corrupt or empty files are skipped silently.
 */
export declare function collectSubSessions(sessionFile: string): Promise<Record<string, SubSession>>;
/** Export session to HTML using SessionManager and AgentState. */
export declare function exportSessionToHtml(sm: SessionManager, state?: AgentState, options?: ExportOptions | string): Promise<string>;
/** Export session file to HTML (standalone). */
export declare function exportFromFile(inputPath: string, options?: ExportOptions | string): Promise<string>;
