Skip to content

Documentation / @agentick/mcp / AppHostTransport

Interface: AppHostTransport ​

Defined in: client/browser-app-host.ts:56

Transport abstraction. Consumers implement this over their gateway/WS/etc. Publish sends an event to the server session. Subscribe receives events the server publishes on this channel (e.g., via SSE/WS stream).

Methods ​

publish() ​

publish(channel, event): void | Promise<void>

Defined in: client/browser-app-host.ts:58

Send an event to the server-side channel.

Parameters ​

channel ​

string

event ​

AppHostChannelEvent

Returns ​

void | Promise<void>


subscribe() ​

subscribe(channel, handler): () => void

Defined in: client/browser-app-host.ts:61

Subscribe to a server channel. Returns unsubscribe function.

Parameters ​

channel ​

string

handler ​

(event) => void

Returns ​

(): void

Returns ​

void

Released under the ISC License.