import { AgentTool, CAIPMessage, CAIPHandshake, CAIPChannel, AgentBoostPacket, CrossAgentBus } from '../types.js'; /** * Cross-Agent Intelligence Protocol — the hub that makes all coding agents talk to each other. * * Transport: * Primary: WebSocket on port 7344 (CAIP bus) * Fallback: Shared filesystem at ~/.shadow-brain-caip/ (polling every 2s) * * Protocol: * 1. Handshake — each agent sends identity, version, capabilities * 2. Channels — broadcast (all), pair (two agents), team (subset) * 3. Boost Packet — high-value insight shared to all connected agents * 4. Deduplication — message hash ring prevents infinite loops */ export declare class CrossAgentProtocol { private wss; private clients; private bus; private messageHashes; private boostHandlers; private filePollTimer; private running; constructor(); /** Start the CAIP WebSocket server + filesystem fallback */ start(): Promise; /** Stop the CAIP server */ stop(): Promise; /** Register an agent via handshake */ connect(handshake: CAIPHandshake): Promise; /** Broadcast a message to all connected agents */ broadcast(from: AgentTool, payload: unknown, priority?: CAIPMessage['priority']): Promise; /** Send a boost packet — high-value insights shared across agents */ sendBoostPacket(packet: AgentBoostPacket): Promise; /** Send targeted message to specific agent */ sendDirect(from: AgentTool, to: AgentTool, payload: unknown): Promise; /** Subscribe to boost packets from a specific agent */ subscribeToBoosts(agent: AgentTool, handler: (packet: AgentBoostPacket) => void): void; /** Get all connected agents */ getConnectedAgents(): AgentTool[]; /** Get bus statistics */ getBusStats(): CrossAgentBus; private handleMessage; private deliverMessage; private writeFileMessage; private startFilePolling; private hashMessage; } //# sourceMappingURL=cross-agent-protocol.d.ts.map