import type { SessionMeta } from './types.js';
export interface SessionHtmlOptions {
    /** Whether the Markdown was rendered with redaction on — shown in the footer. */
    redacted?: boolean;
}
/** One metadata chip in the page header. */
interface Chip {
    label: string;
    value: string;
}
export declare function escapeHtml(text: string): string;
/**
 * Lift every folded reasoning block out of the Markdown, leaving a sentinel.
 *
 * `renderer.html` escapes raw HTML unconditionally — the transcript body is model
 * and tool output, so nothing in it may round-trip as markup. That also escaped
 * the `<details>` wrapper `--reasoning fold` emits, which is why the disclosure
 * element has to be reconstructed here instead of allowlisted through.
 *
 * Allowlisting was tried twice and is the wrong shape: marked hands the same
 * markup over as several different raw strings depending on context (a whole-token
 * gate passed the opening tag and escaped the closing one in a real document), and
 * a bare `<details>` in ordinary prose is a complete INLINE html token — so prose
 * that merely mentions the tag would emit a live, unclosed element that swallows
 * every later turn into it. Reconstructing both ends here makes the pairing
 * structural: it cannot be unbalanced by anything the transcript contains.
 */
export declare function liftFoldBlocks(markdown: string): {
    text: string;
    blocks: string[];
};
/** Human duration — "13 minutes", never "12m 49s". */
export declare function formatDuration(ms: number): string;
/**
 * The chips shown under the title.
 *
 * Deliberately excludes `account` (an email — the publish-time sensitive-content
 * scan rejects those, and correctly), `cwd`, and `machine`: a published transcript
 * should not carry the operator's identity or local paths in its chrome. Host and
 * repo already ride in the share object's provenance metadata, which is the right
 * home for them.
 */
export declare function buildChips(session: SessionMeta): Chip[];
/**
 * The page's `<title>` — `deriveLabel()` reads this as the share's gallery label.
 *
 * The document heading is derived from the session's first prompt, which in a real
 * session is routinely a pasted URL plus a file path plus the actual request. Left
 * whole it renders as a three-line wall above the transcript and an unreadable
 * gallery row, so it is collapsed to one line and cut at a word boundary. `--label`
 * overrides it outright.
 */
export declare function sessionPageTitle(session: SessionMeta, markdown: string): string;
export declare function renderSessionHtmlDocument(session: SessionMeta, markdown: string, options?: SessionHtmlOptions): string;
export {};
