import { AgentMessage, AgentMessageType, CommunicationChannel, CommunicationStats, MessageHandlerContext } from './types'; import { AgentIdentity } from '../types'; import { AgentIdentityManager } from '../agent-identity'; import { DelegationManager } from '../delegation-manager'; import { DelegationPolicyEngine } from '../delegation-policy-engine'; import { ActivityLogger } from '../activity/activity-logger'; export interface CommunicationManagerOptions { enableEncryption?: boolean; defaultMessageTTL?: number; maxRetries?: number; retryDelay?: number; enableStats?: boolean; } export declare class CommunicationManager { private agentIdentity; private channels; private messageHandlers; private stats; private options; private pendingMessages; constructor(agentIdentity: AgentIdentity, agentManager: AgentIdentityManager, delegationManager: DelegationManager, policyEngine: DelegationPolicyEngine, activityLogger: ActivityLogger, options?: CommunicationManagerOptions); /** * Adds a communication channel */ addChannel(channel: CommunicationChannel): void; /** * Removes a communication channel */ removeChannel(channelId: string): Promise; /** * Connects all channels */ connectAll(): Promise; /** * Disconnects all channels */ disconnectAll(): Promise; /** * Sends a message through the best available channel */ sendMessage(message: AgentMessage, preferredChannelId?: string): Promise; /** * Sends a delegation request to another agent */ requestDelegation(targetAgentDID: string, requestedScopes: string[], options?: { serviceDID?: string; duration?: number; purpose?: string; channelId?: string; }): Promise; /** * Queries another agent's status */ queryAgentStatus(targetAgentDID: string, options?: { includeChain?: boolean; includeScopes?: boolean; includeMetrics?: boolean; channelId?: string; }): Promise; /** * Pings another agent */ pingAgent(targetAgentDID: string, channelId?: string): Promise; /** * Registers a custom message handler */ registerMessageHandler(type: AgentMessageType, handler: (message: AgentMessage, context: MessageHandlerContext) => Promise): void; /** * Gets communication statistics */ getStats(channelId?: string): CommunicationStats | Map; /** * Gets list of connected channels */ getConnectedChannels(): string[]; /** * Retries failed messages */ retryFailedMessages(): Promise; private handleIncomingMessage; private selectChannel; private sendThroughChannel; private updateStats; private initializeStats; } //# sourceMappingURL=communication-manager.d.ts.map