/** Formatting and resolution helpers. */ import type { AniListDate, AniListMedia, ScoreFormat } from "./types.js"; /** Best available title, respecting ANILIST_TITLE_LANGUAGE preference */ export declare function getTitle(title: AniListMedia["title"]): string; /** Whether NSFW/adult content is enabled via env var (default: false) */ export declare function isNsfwEnabled(): boolean; /** Resolve common abbreviations to full titles */ export declare function resolveAlias(query: string): string; /** Truncate to max length, breaking at word boundary. Strips residual HTML. */ export declare function truncateDescription(text: string | null, maxLength?: number): string; /** Resolve username from the provided arg or the configured default */ export declare function getDefaultUsername(provided?: string): string; /** Re-throw as a UserError so MCP clients see isError: true */ export declare function throwToolError(error: unknown, action: string): never; /** Pagination footer for multi-page results */ export declare function paginationFooter(page: number, limit: number, total: number, hasNextPage: boolean): string; /** Format a media entry as a compact multi-line summary */ export declare function formatMediaSummary(media: AniListMedia): string; /** Construct full trailer URL from site + video ID */ export declare function trailerUrl(trailer: AniListMedia["trailer"]): string | null; /** Detect score format from env override or API fallback */ export declare function detectScoreFormat(fetchFormat: () => Promise): Promise; /** Fetch score format for a user (by username) or the authenticated viewer */ export declare function getScoreFormat(username?: string): Promise; /** Sort direction map for browse/seasonal tools */ export declare const BROWSE_SORT_MAP: Record; /** Resolve season and year, defaulting to current if not provided */ export declare function resolveSeasonYear(season?: string, year?: number): { season: string; year: number; }; /** Convert an AniListDate to Unix epoch seconds, or null if year is missing */ export declare function dateToEpoch(date: AniListDate): number | null; /** Display a normalized 0-10 score in the user's preferred format */ export declare function formatScore(score10: number, format: ScoreFormat): string;