import type { UiAiThread, UiAiThreadDraft } from '@histoire/shared';
import type { ThreadFileCodec } from '../comments/file.js';
/** Server-side draft: client fields plus the derived title. */
export type AiThreadDraftInput = UiAiThreadDraft & Pick<UiAiThread, 'title'>;
/**
 * First non-empty line of the first message, shortened for the thread list.
 * @param body First user message.
 */
export declare function aiThreadTitle(body: string): string;
/**
 * Project client-writable fields and derive the title; lifecycle never trusts the browser.
 * @param value Untrusted draft.
 */
export declare function validateAiThreadDraft(value: unknown): AiThreadDraftInput;
/**
 * Corrupt persisted data is reported without overwriting the original bytes.
 * @param value Persisted record.
 */
export declare function validateAiThread(value: unknown): UiAiThread;
/** AI threads in `.histoire/threads.json`. */
export declare const aiThreadsCodec: ThreadFileCodec<UiAiThread>;
/** Project-relative file of every conversation, pinned or not. */
export declare const THREADS_FILE = ".histoire/threads.json";
//# sourceMappingURL=validate.d.ts.map