import type { Envelope } from '../types/envelope.ts'; import { Node, type NodeLike } from '../types/node.ts'; import type { Session } from '../types/session.ts'; import type { Authentication } from './security.ts'; import { OpenConnectionSender } from './sender.ts'; export type ConnectionSession = { id: string; localNode: Node; remoteNode: Node; scheme: Authentication['scheme']; }; export declare class SessionNegotiator { private readonly sender; private readonly sendSession; state: Session['state'] | 'present'; session: ConnectionSession | null; private presencePromise; private currentSessionResolver; constructor(sender: OpenConnectionSender, sendSession: (session: Session) => void); negotiate(options: { node: NodeLike; authentication: Authentication; }): Promise; handleEnvelope(envelope: Envelope): void; ensurePresence(currentCommandUri?: string): Promise; finish(): void; get negotiating(): boolean; private waitForSessionResponse; } //# sourceMappingURL=sessionnegotiator.d.ts.map