import { requestSessionProtocolFrame } from "./sessionProtocolCommands.mjs"; import { HomeRequest } from "@agimon-ai/po-core/sessionProtocol"; //#region src/web/lib/transport.d.ts type Frame = Record; /** Owns one host binding and its connection listeners. */ export declare function createDashboardTransport(hostId?: string): { bindTransport: (sender: (frame: object) => void, pluginInvoker?: ((call: { mount: { scope: 'host'; } | { scope: 'workspace'; workspaceId: string; } | { scope: 'session'; sessionId: string; }; service: string; method: string; input: unknown; }) => Promise) | undefined, threadWatcher?: ((sessionId: string, threadId: string) => () => void) | undefined, readHome?: ((request: HomeRequest, signal?: AbortSignal) => Promise) | undefined) => void; releaseTransport: () => void; sendFrame: (sessionId: string, frame: Frame) => void; sendFrameWithAck: (sessionId: string, frame: Frame) => ReturnType; sendHubFrame: (frame: object) => void; watchHubThread: (sessionId: string, threadId: string) => (() => void) | undefined; invokeServerMethod: (call: Parameters Promise) | undefined>>[0]) => Promise; readHome: (request: HomeRequest, signal?: AbortSignal) => Promise; onHubConnected: (listener: () => void) => () => void; notifyHubConnected: () => void; }; type DashboardTransport = ReturnType; /** A host-bound handle also resolves global plugin calls without ambient focus. */ export declare function transportForHost(hostId: string): DashboardTransport; /** Releasing an old connection cannot release a replacement connection. */ export declare function bindHostTransport(hostId: string, ...binding: Parameters): () => void; export declare const bindTransport: (sender: (frame: object) => void, pluginInvoker?: ((call: { mount: { scope: 'host'; } | { scope: 'workspace'; workspaceId: string; } | { scope: 'session'; sessionId: string; }; service: string; method: string; input: unknown; }) => Promise) | undefined, threadWatcher?: ((sessionId: string, threadId: string) => () => void) | undefined, readHome?: ((request: HomeRequest, signal?: AbortSignal) => Promise) | undefined) => void, releaseTransport: () => void, onHubConnected: (listener: () => void) => () => void, notifyHubConnected: () => void; /** The page's own host reads through the default binding; another host through its own. */ export declare function readHostHome(hostId: string | undefined, request: HomeRequest, signal?: AbortSignal): Promise; export declare function onHostConnected(hostId: string | undefined, listener: () => void): () => void; export declare function sendFrame(sessionId: string, frame: Frame): void; export declare function sendFrameWithAck(sessionId: string, frame: Frame): ReturnType; export declare function sendHubFrame(frame: object): void; export declare function watchHubThread(sessionId: string, threadId: string): (() => void) | undefined; export declare function invokeServerMethod(call: Parameters[0]): Promise; //#endregion export {}; //# sourceMappingURL=transport.d.mts.map