UNPKG

gemini-flow

Version:

🧠 Gemini Flow - AI-Powered Development Orchestration with Google Gemini API Integration

89 lines 2.54 kB
/** * Coordination Engine - Multi-Agent Koordination für Gemini Sessions * Verwaltet Agent-übergreifende Kommunikation und Synchronisation */ import { EventEmitter } from 'events'; import { AgentSession, Decision, AgentCommunication, CoordinationPoint, SharedMemory, SwarmConfig } from '../types/gemini.js'; export declare class CoordinationEngine extends EventEmitter { private agents; private sharedMemory; private syncPoints; private coordinationPoints; private messageQueue; private config; constructor(config: SwarmConfig); /** * Registriere Agent in der Koordination */ registerAgent(agent: AgentSession): void; /** * Entferne Agent aus Koordination */ unregisterAgent(agentId: string): void; /** * Sende Nachricht zwischen Agents */ sendMessage(communication: AgentCommunication): void; /** * Broadcast Nachricht an alle Agents */ broadcastMessage(communication: Omit<AgentCommunication, 'to'> & { to?: string[]; }): void; /** * Registriere Entscheidung eines Agents */ registerDecision(decision: Decision): void; /** * Erstelle Koordinationspunkt */ createCoordinationPoint(point: Omit<CoordinationPoint, 'id' | 'timestamp'>): string; /** * Synchronisiere Agents an einem Punkt */ synchronizeAgents(participants: string[], data?: any): Promise<void>; /** * Hole Shared Memory */ getSharedMemory(): SharedMemory; /** * Aktualisiere Shared Context */ updateSharedContext(key: string, value: any): void; /** * Hole Koordinationsstatistiken */ getCoordinationStats(): { swarmId: string; agentCount: number; totalDecisions: number; totalMessages: number; activeCoordinationPoints: number; pendingSyncs: number; }; /** * Private: Bestimme Agent-Rolle basierend auf Typ und Topologie */ private determineAgentRole; /** * Private: Verarbeite Message Queue */ private processMessageQueue; /** * Private: Liefere Nachricht an Zielagents */ private deliverMessage; /** * Private: Warte auf Synchronisation */ private waitForSync; /** * Private: Starte Koordinations-Loop */ private startCoordinationLoop; /** * Private: Führe regelmäßige Koordinationsaufgaben aus */ private performCoordinationTasks; } //# sourceMappingURL=coordination-engine.d.ts.map