/** * Image viewer service for handling system image display and caching. */ import { Cache, type CacheStats } from "./cache.js"; export declare enum ErrorCode { InvalidRequest = "INVALID_REQUEST", InternalError = "INTERNAL_ERROR", UnsupportedFormat = "UNSUPPORTED_FORMAT" } export declare class McpError extends Error { code: ErrorCode; constructor(code: ErrorCode, message: string); } export declare const IMAGE_MIME_TYPES: { readonly "image/jpeg": readonly [".jpg", ".jpeg"]; readonly "image/png": readonly [".png"]; readonly "image/gif": readonly [".gif"]; readonly "image/webp": readonly [".webp"]; }; export type ImageFormat = keyof typeof IMAGE_MIME_TYPES; interface ImageMetadata { format: ImageFormat; url: string; localPath?: string; width?: number; height?: number; } export declare const imageCache: Cache; export declare class ImageViewer { private static instance; private constructor(); /** * Get singleton instance of ImageViewer */ static getInstance(): ImageViewer; /** * Display an image in the system's default web browser */ displayImage(url: string): Promise; /** * Fetch metadata for an image URL */ private fetchImageMetadata; /** * Open an image URL in the system's default web browser */ private openInBrowser; /** * Clear the image cache */ clearCache(): void; /** * Get statistics about the image cache */ getCacheStats(): CacheStats; } export {};