/**
 * Build output records from wake cycles, optionally enriched with
 * SDK transcript data.
 */
import type { WakeCycle, SDKSessionTurn, OutputRecord } from "./types.js";
import { type ArchiveEntry, type ImageCache, type RecoveryStats } from "./image-recovery.js";
/**
 * Read `session_id` from a Claude SDK or Pi synthetic system init object.
 */
export declare function sessionIdFromSystemMessage(systemMessage: unknown): string | undefined;
/**
 * When the output record has `system_message.session_id` but no top-level
 * `session_id`, copy it up so Viewer / export see a consistent field.
 */
export declare function applyTopLevelSessionId(record: OutputRecord): void;
/** Copy the log wake entry timestamp onto the output record. */
export declare function applyWakeCycleId(record: OutputRecord, wakeTimestamp: string): void;
/**
 * Set top-level and system_message session_id to the matched transcript session.
 */
export declare function alignRecordSessionId(record: OutputRecord, sessionId: string): void;
export declare function buildRecord(cycle: WakeCycle, sdkTurn?: SDKSessionTurn, sidecarIndex?: Map<string, ArchiveEntry> | null, stats?: RecoveryStats, cache?: ImageCache): Promise<OutputRecord>;
/**
 * Build a record for a session-switch turn (not the primary wake-event turn).
 * These have no log-level prompt/interrupts — the "prompt" is the session
 * switch context itself, extracted from the SDK turn's first message.
 */
export declare function buildSessionSwitchRecord(sdkTurn: SDKSessionTurn, sidecarIndex?: Map<string, ArchiveEntry> | null, stats?: RecoveryStats, cache?: ImageCache): Promise<OutputRecord>;
//# sourceMappingURL=record-builder.d.ts.map