Adds an auth policy to the router. This is used to allow unauthenticated or cookie based access to parts of a plugin's API.
Registers a WebSocket upgrade handler at an exact plugin-relative path.
Paths must start with /. Matching is case-sensitive, ignores the query
string, and treats a trailing slash as significant. Patterns are not supported.
The handler receives the raw upgrade request, socket, and buffered data.
The framework waits for plugin startup and authenticates before invoking the
handler, rejecting upgrades during shutdown. The handler owns the handshake
or forwarding, including protocol selection. HTTP middleware, including
rate limiting and request logging, and path-based auth policies do not apply,
even when the route uses authPolicy: 'unauthenticated'. Existing upgrade
handlers that rely on Express routing must migrate to registered routes.
The framework destroys upgraded sockets when the backend shuts down.
Registers an Express request handler under the plugin's base router. This
typically makes its base path /api/<plugin-id>.
Allows plugins to register HTTP routes.
See the service documentation for more details.