export declare function bridgePeersFile(): string; export interface BridgePeer { peerId: string; tokenId: string; /** Empty means deny every agent. */ agents: string[]; workspaceId: string; /** * poll does not notify, even when a URL and key are stored. * webhook notifies only when both are present. * Omitted on old files: both present means webhook, otherwise poll. */ callbackMode?: 'poll' | 'webhook' | 'mcp_events'; /** Stored webhook target. Ignored while callbackMode is poll. */ callbackUrl: string | null; /** Raw key for Authorization: Bearer. Ignored while callbackMode is poll. */ signingSecret: string | null; enabled: boolean; /** In-flight inbound runs for this peer. Default 1. */ maxConcurrent: number; /** * Optional exact hostname that may be private or loopback. * Must equal the callback URL host. This is the per-peer exception; * it is not the global private-webhook switch. */ callbackPinnedHost: string | null; } /** Caller-side record of a remote production bridge. The raw token stays in this file only. */ export interface BridgeOutboundTarget { peerId: string; /** Production bridge origin, no path. Example: https://agim.example */ baseUrl: string; token: string; /** Null when this caller only polls. */ signingSecret: string | null; agents: string[]; } export declare class BridgePeerError extends Error { constructor(message: string); } export declare function loadBridgePeers(): BridgePeer[]; export declare function findPeerByTokenId(tokenId: string): BridgePeer | null; /** How this caller is notified. Old files with both a URL and a key are webhook. */ export declare function effectiveCallbackMode(peer: { callbackMode?: string | null; callbackUrl?: string | null; signingSecret?: string | null; }): 'poll' | 'webhook' | 'mcp_events'; export declare function findPeerById(peerId: string): BridgePeer | null; /** * Check a callback URL the way the bridge is allowed to: the schedule * helpers, with the global private-webhook switch forced off for the * duration of the call. A pinned hostname is the only private exception. */ export declare function validateBridgeCallbackUrl(raw: string, pinnedHost: string | null): Promise<{ ok: true; } | { ok: false; reason: string; }>; export declare function loadOutboundTargets(): BridgeOutboundTarget[]; export declare function findOutboundTarget(peerId: string): BridgeOutboundTarget | null; export declare function saveOutboundTargets(targets: BridgeOutboundTarget[]): void; export declare function saveBridgePeers(peers: BridgePeer[]): Promise; //# sourceMappingURL=bridge-peers.d.ts.map