import type { CTPDocument } from '@/lib/ctp/schema'; export interface AnalysisInput { bpm: number; duration: number; // seconds title?: string; artist?: string; mbid?: string | null; contributed_by: string; ollamaModel?: string; // required when provider id is "ollama" confirmedBpm?: number | null; // from MusicBrainz tags or other reliable source confirmedTimeSigNum?: number | null; // time signature numerator if confirmed } export interface ProviderInfo { id: string; label: string; type: 'cloud-ai' | 'local-ai' | 'algorithmic'; available: boolean; unavailableReason?: string; // present only when available === false ollamaBaseUrl?: string; // present only for the ollama provider } export interface AnalysisProvider { id: string; label: string; type: 'cloud-ai' | 'local-ai' | 'algorithmic'; /** Returns true if this provider is configured and reachable. Must not throw. */ isAvailable(): Promise<{ available: boolean; reason?: string }>; generateCTP(input: AnalysisInput): Promise; }