runServerless
Handle a single serverless invocation by routing the platform’s event through the agent’s
HTTP app, and return the platform’s response. This is the explicit serverless path:
run() calls it when it detects a serverless platform, and you call it yourself from a
handler file to opt in deliberately.
The routing is done by a ServerlessAdapter for the given platform. On
CGI with no event, the request is read from the CGI environment and standard input, and the
response is written to standard output.
Parameters
event
The platform’s invocation event, such as a Lambda event or a Cloud Functions request.
context
The platform’s invocation context. Accepted for the handler signature; the base agent doesn’t use it.
platform
Serverless platform. auto detects it from the environment.
Returns
Promise<ServerlessResponse> — The normalized response for the platform.