import type { Context, JsonValue, ServiceCall, ServiceProviderUpdate } from "@earendil-works/chord"; import type { RpcTarget, SessionTarget } from "@earendil-works/pi-protocol"; import type { ServerHost, SessionMetadata } from "./types.ts"; interface SessionRouterOptions { host: ServerHost; serverId: string; isClosing: () => boolean; publishAttachment(client: object, attachment: SessionTarget | undefined, context: Context): Promise; reportError: (error: unknown) => void; } export declare class SessionRouter { private readonly options; private readonly hostedSessions; private readonly openingSessions; private readonly attachmentsByClient; private readonly disconnectedClients; private readonly clientOperations; private closePromise?; constructor(options: SessionRouterOptions); executeServiceCall(call: ServiceCall, target: RpcTarget, client: object, publish: (subscriptionId: string, update: ServiceProviderUpdate, context: Context) => Promise, context: Context): Promise; attachClient(client: object, sessionId: string, context: Context): Promise; detachClient(client: object, context: Context): Promise; removeSession(sessionId: string, context: Context): Promise; disconnect(client: object, context: Context): Promise; close(context: Context): Promise; private closeInternal; private runForClient; private attachClientNow; private startServiceCall; private trackOperation; private requireAttachment; private releaseAttachment; private clearAttachment; private acquire; private open; private invalidate; } export {}; //# sourceMappingURL=session-router.d.ts.map