import type { RelayConfigSchema } from '../schema/types.js'; export declare function generatePassphrase(wordCount?: number): string; export interface RelaySession { sessionId: string; keyPair: CryptoKeyPair; passphrase: string; relayUrl: string; } export declare function createSession(relayBaseUrl: string, serverName: string, schema: RelayConfigSchema): Promise; export declare function pollForResult(relayBaseUrl: string, session: RelaySession, intervalMs?: number, timeoutMs?: number): Promise>; export declare function sendMessage(relayBaseUrl: string, sessionId: string, message: { type: string; text: string; data?: Record; }): Promise; export declare function pollForResponses(relayBaseUrl: string, sessionId: string, messageId: string, intervalMs?: number, timeoutMs?: number): Promise; /** * Notify the browser that relay setup is complete, then clean up the session. * * The browser polls ``/api/sessions/:id/messages`` every 2s and stops on the * first ``type:'complete'`` message. If the caller deletes the session before * that poll lands, the browser sees 404 on its next fetch and the UI stalls * on "Waiting for server...". This helper sends the ``complete`` message, * then schedules the DELETE after a grace period long enough to cover a few * poll cycles, and unref's the cleanup timer so it doesn't block process * shutdown. If the process exits before the timer fires, the relay server's * 10-minute TTL reclaims the session. * * Errors from ``sendMessage`` are logged via ``console.error`` and swallowed * — the helper is a best-effort post-setup notification and must not fail * the caller's primary flow. */ export declare function notifyComplete(relayBaseUrl: string, sessionId: string, text?: string, options?: { gracePeriodMs?: number; }): Promise; //# sourceMappingURL=client.d.ts.map