claude-gemini-multimodal-bridge
Version:
Enterprise-grade AI integration bridge connecting Claude Code, Gemini CLI, and Google AI Studio with intelligent routing and advanced multimodal processing capabilities
87 lines • 3.58 kB
TypeScript
import { AudioAnalysisResult, AudioGenOptions, ImageAnalysisResult, ImageAnalysisType, ImageGenOptions, LayerInterface, LayerResult, MediaGenResult, MultimodalFile, MultimodalResult } from '../core/types.js';
export declare class AIStudioLayer implements LayerInterface {
private readonly instanceId;
private authVerifier;
private genAI;
private geminiLayer?;
private mcpServerProcess?;
private persistentMCPProcess?;
private mcpProcessStartTime;
private readonly MCP_PROCESS_TTL;
private isInitialized;
private isLightweightInitialized;
private lastAuthCheck;
private readonly AUTH_CACHE_TTL;
private readonly DEFAULT_TIMEOUT;
private readonly MAX_RETRIES;
private readonly MAX_FILES;
private readonly MAX_FILE_SIZE;
private readonly MAX_DOCUMENT_PAGES;
private readonly TOKENS_PER_PAGE;
private readonly SUPPORTED_FILE_TYPES;
constructor(geminiLayer?: any);
initializeLightweight(): Promise<void>;
initialize(): Promise<void>;
isAvailable(): Promise<boolean>;
canHandle(task: any): boolean;
execute(task: any): Promise<LayerResult>;
processMultimodal(files: MultimodalFile[], instructions: string): Promise<MultimodalResult>;
convertPDFToMarkdown(pdfPath: string): Promise<string>;
analyzeImage(imagePath: string, analysisType: ImageAnalysisType): Promise<ImageAnalysisResult>;
transcribeAudio(audioPath: string): Promise<string>;
generateImage(prompt: string, options?: Partial<ImageGenOptions>): Promise<MediaGenResult>;
generateAudio(text: string, options?: Partial<AudioGenOptions>): Promise<MediaGenResult>;
generateAudioWithScript(prompt: string, options?: any): Promise<MediaGenResult>;
analyzeAudioAdvanced(audioPath: string): Promise<AudioAnalysisResult>;
private downloadGeneratedMedia;
private getFileExtension;
private calculateGenerationCost;
getCapabilities(): string[];
getCost(task: any): number;
private estimateCost;
getEstimatedDuration(task: any): number;
private analyzeDocuments;
private convertFiles;
private canUseDirectAPI;
private executeDirectAPI;
private calculateOptimizedTimeout;
private processGeneral;
private resolveMCPServerPath;
private getPersistentMCPProcess;
private executeMCPCommandOptimized;
private executeMCPCommand;
private getAIStudioApiKey;
private validateApiKeyFormat;
private setupGhostLogDetection;
private testMCPServerConnection;
private validateFileTypes;
private normalizeInputPath;
private prepareFilesForProcessing;
private getTaskTimeout;
private estimateTokensUsed;
private calculateCost;
isFileTypeSupported(filePath: string): boolean;
getSupportedFileTypes(): typeof this.SUPPORTED_FILE_TYPES;
getProcessingLimits(): {
maxFiles: number;
maxFileSize: number;
maxFileSizeMB: number;
};
private createManualWavHeader;
private isImageGenerationRequest;
private isVideoGenerationRequest;
private isAudioGenerationRequest;
private isImageGenerationCommand;
private isVideoGenerationCommand;
private getAspectRatio;
private saveGeneratedImage;
private saveGeneratedAudio;
processDocuments(documents: string[], analysisType?: string, options?: any): Promise<any>;
private validateDocuments;
private buildDocumentInstructions;
private estimateDocumentTokens;
private selectOptimalModel;
private getModelConfig;
private processMultiplePDFs;
}
//# sourceMappingURL=AIStudioLayer.d.ts.map