@langwatch/scenario
    Preparing search index...

    Interface ExternalUpgradeRequest

    The minimal request shape TwilioWebhookServer.receiveExternalUpgrade needs to complete a WebSocket handshake: ws's own handleUpgrade reads only .headers and .method on the no-verifyClient path this server uses (it never touches .socket, .url beyond what this class itself parses). A REAL http.IncomingMessage cannot travel across a process boundary — only the raw net.Socket handle can (via ChildProcess.send(msg, socket)) — so a host platform that accepts the upgrade in a separate process reconstructs this minimal shape from the request line + headers it read before handing the socket off.

    interface ExternalUpgradeRequest {
        headers: Record<string, string | string[] | undefined>;
        method?: string;
        url?: string;
    }
    Index
    headers: Record<string, string | string[] | undefined>
    method?: string

    method and url are optional so a real http.IncomingMessage is assignable to this shape: Node declares both as optional on that class, and the one upgrade path here already tolerates a missing url. A host platform reconstructing this shape by hand should still set both.

    url?: string