@penguinharness/browser-automation · plugins/browser-automation/src/server/module.ts:95

BrowserExtensionGate

interface

Where the extension's WebSocket hands its socket: it asks what the token may do before upgrading (an unknown one is refused 401), then gives the live socket over. The contributed endpoint uses it in-process; a runtime older than the WebSocket slot looks it up by this name (BuiltinBrowserModule / BrowserExtensionGate) and does the handshake itself.

API

@Interface()
export abstract class BrowserExtensionGate {
  abstract admit(token: string): BrowserExtensionAdmission;
  abstract connect(token: string, socket: Opaque<"ExtensionSocket", ExtensionSocket>): void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use
@Moduleexported by
@Provideprovided by

Members (2)

admit

admit(token: string): BrowserExtensionAdmission
@paramtokenstring
@returnsBrowserExtensionAdmission

connect

connect(token: string, socket: Opaque<"ExtensionSocket", ExtensionSocket>): void
@paramtokenstring
@paramsocketOpaque<"ExtensionSocket", ExtensionSocket>
@returnsvoid