UNPKG

@kinetixarts/server-craft-it

Version:

Craft IT - Model Context Protocol (MCP) compliant Server for AI-Powered Asset Generation using Gemini

36 lines (35 loc) 1.32 kB
/** * Find the user's Desktop directory with fallbacks for different OS and locales * @returns Path to the user's Desktop directory */ export declare function findDesktopPath(): string; export declare const DESKTOP_PATH: string; export declare const DEFAULT_IMAGE_PATH: string; export interface AssetStoreEntry { base64: string; mimeType: string; filePath?: string; } export declare const assetStore: Record<string, AssetStoreEntry>; /** * Ensure the directory exists, create it if it doesn't * @param dirPath Directory path to check/create */ export declare function ensureDirectoryExists(dirPath: string): Promise<void>; /** * Save base64 image data to a file * @param base64Data Base64 encoded image data * @param mimeType MIME type of the image * @param storagePath Directory path to save the file */ export declare function saveImageToFile(base64Data: string, mimeType: string, storagePath?: string): Promise<string>; /** * Store an asset both in memory and on disk * @param id Unique identifier for the asset * @param asset Asset data (base64 and mimeType) * @param storagePath Optional storage path, falls back to environment or default */ export declare function storeAsset(id: string, asset: { base64: string; mimeType: string; }, storagePath?: string): Promise<AssetStoreEntry>;