import type { AgentInfo, ClientToHubMessage, DeliverMessage } from './shared.js'; type DeliverHandler = (msg: DeliverMessage) => void | Promise; type PresenceHandler = (agents: AgentInfo[]) => void; export interface PendingInboundAsk { from: string; content: string; receivedAt: number; } export interface Connection { agent: AgentInfo; send(msg: ClientToHubMessage): void; onDeliver(handler: DeliverHandler): () => void; onPresence(handler: PresenceHandler): () => void; waitForResponse(correlationId: string, timeoutMs: number): Promise; getCurrentAgents(): AgentInfo[]; setPendingInboundAsk(correlationId: string, ask: PendingInboundAsk): void; getPendingInboundAsk(correlationId: string): PendingInboundAsk | undefined; getPendingInboundAsks(): Map; removePendingInboundAsk(correlationId: string): void; close(): void; } export interface LazyConnectionHandle { connection: Connection; resolve(real: Connection): void; } export declare function createLazyConnection(name: string): LazyConnectionHandle; export declare function connect(opts: { hubUrl: string; name: string; repo?: string; token?: string; capabilities?: string[]; }): Promise; export {}; //# sourceMappingURL=connect.d.ts.map