import type { ForeignSessionView } from '@claude2dsh/core'; /** Claude Code project directory slug: every non-alphanumeric byte becomes `-`. */ export declare function slugifyClaudeCwd(cwd: string): string; export interface ClaudeSerializeOptions { /** UUID factory for deterministic tests; defaults to randomUUID. */ readonly uuid?: () => string; /** Fixed Claude-side session id; defaults to one uuid() value. */ readonly sessionUuid?: string; /** Timestamp fallback when an event has no `time`. */ readonly now?: number; } export interface ClaudeSerializeResult { readonly jsonl: string; readonly recordCount: number; readonly toolCalls: number; readonly toolResults: number; readonly droppedToolResults: number; readonly skippedInjectedMessages: number; readonly skippedBlocks: number; readonly title?: string; } /** * Serialize DSH surface events as a Claude Code JSONL transcript. * * The returned text starts with `mode`/`permission-mode` records, keeps the * `parentUuid` chain contiguous for normal records, and parents every * `tool_result` record on the assistant record that declared the call, exactly * like Claude Code's own transcripts. */ export interface ClaudeSerializeTailResult extends ClaudeSerializeResult { readonly lastUuid: string | null; readonly eventsCount: number; readonly turnCount: number; readonly droppedIncompleteTurn: boolean; } /** * Serialize DSH surface events as a Claude Code JSONL transcript. * * The returned text starts with `mode`/`permission-mode` records, keeps the * `parentUuid` chain contiguous for normal records, and parents every * `tool_result` record on the assistant record that declared the call, exactly * like Claude Code's own transcripts. */ export declare function serializeClaudeJsonl(session: ForeignSessionView, options?: ClaudeSerializeOptions): ClaudeSerializeResult; /** * Serialize the complete-turn suffix of a DSH log as a headless Claude Code * append batch. The first emitted record continues `anchorUuid`; `sessionUuid` * must be the existing Claude-side session id. */ export declare function serializeClaudeJsonlTail(session: ForeignSessionView, options: { fromSeq: number; sessionUuid: string; anchorUuid: string | null; uuid?: () => string; }): ClaudeSerializeTailResult;