/** * YouTube metadata generation — title / description / tags / chapters. * * One LLM call, transcript in, complete metadata out. The LLM is * instructed to derive chapters from REAL topic shifts (not fabricated * ones) and to keep titles ≤70 chars (YouTube truncates above that on * mobile). */ import type { Transcript } from "./whisper.js"; export interface YouTubeChapter { atSec: number; title: string; } export interface YouTubeMetadata { titles: string[]; description: string; tags: string[]; chapters: YouTubeChapter[]; hashtags: string[]; } export interface MetadataOptions { apiKey?: string; model?: string; channelStyle?: string; videoTopic?: string; signal?: AbortSignal; } export declare function generateMetadata(t: Transcript, opts?: MetadataOptions): Promise; /** * Robust parser. Tolerates prose around the JSON, missing keys, mistyped * arrays. Mirrors `parseHookVisionResponse` in spirit. */ export declare function parseMetadataResponse(content: string): YouTubeMetadata; /** * Apply the hard constraints we promise downstream: * - titles: max 3, each truncated to 70 chars * - tags: exactly 15 (slice or pad — pad with empty filtered out) * - chapters: drop if duration < 5 min; first must be at 00:00; adjacent ≥30s * - hashtags: 3-5 entries * * Pure — exported for testing. */ export declare function enforceMetadataConstraints(m: YouTubeMetadata, durationSec: number): YouTubeMetadata; //# sourceMappingURL=youtube-metadata.d.ts.map