/** * The `http.route` every server request is recorded under, on the * `http.server.request.duration` metric and the `http.server` span. * * Every value comes from a closed set, because each distinct value mints a * full histogram series per method and status code: * * - a template from `FRAMEWORK_HTTP_ROUTES` for the framework's own endpoints * (`:name` is one path segment, a trailing `*` is any remainder); * - `"/_agent-native/*"`, `"/mcp/*"`, or `"/.well-known/*"` for a path in * one of those namespaces that no template covers; * - the template of the app's own Nitro file route (`/api/clips/:id`), * which is bounded by the app's route files; * - `"/api/*"` for any other app API path; * - `"static"` for a request for a file (`/assets/…`, `*.js`, `favicon.ico`); * - `"page"` for any other GET or HEAD: documents and `.data` loader requests; * - `"other"` for everything else. * * Trusted action routes resolve before this, in `http-response-telemetry.ts`, * to the template the action declared. Never return a raw path from here. */ export declare const HTTP_ROUTE_FRAMEWORK_OTHER = "/_agent-native/*"; export declare const HTTP_ROUTE_MCP_OTHER = "/mcp/*"; export declare const HTTP_ROUTE_WELL_KNOWN_OTHER = "/.well-known/*"; export declare const HTTP_ROUTE_API_OTHER = "/api/*"; export declare const HTTP_ROUTE_STATIC = "static"; export declare const HTTP_ROUTE_PAGE = "page"; export declare const HTTP_ROUTE_OTHER = "other"; /** * Framework endpoints, mirroring the mounts in `core-routes-plugin.ts`, * `auth.ts`, `agent-chat-plugin.ts`, `a2a/server.ts`, `mcp/`, and * `integrations/plugin.ts`. A mount handles its whole subtree, so most * entries end in `*`; a deeper entry exists only where one endpoint inside a * mount needs its own series. An endpoint missing from this list is still * recorded, under its namespace's `/*` bucket. */ export declare const FRAMEWORK_HTTP_ROUTES: readonly ["/_agent-native/auth/session", "/_agent-native/auth/login", "/_agent-native/auth/logout", "/_agent-native/auth/desktop-exchange", "/_agent-native/auth/ba/*", "/_agent-native/auth/*", "/_agent-native/google/*", "/_agent-native/identity/*", "/_agent-native/oauth/*", "/_agent-native/org/*", "/_agent-native/poll", "/_agent-native/events", "/_agent-native/poll-events", "/_agent-native/realtime-token", "/_agent-native/can-see", "/_agent-native/collab/*", "/_agent-native/application-state", "/_agent-native/application-state/compose/*", "/_agent-native/application-state/:key", "/_agent-native/actions/:action", "/_agent-native/actions/*", "/_agent-native/webmcp/*", "/_agent-native/extensions/*", "/_agent-native/tools/*", "/_agent-native/slots/*", "/_agent-native/agent-chat", "/_agent-native/agent-chat/runs/:runId/events", "/_agent-native/agent-chat/runs/*", "/_agent-native/agent-chat/threads/*", "/_agent-native/agent-chat/_process-run", "/_agent-native/agent-chat/*", "/_agent-native/agent-chat-stream", "/_agent-native/agent-teams/*", "/_agent-native/agent-engine/*", "/_agent-native/agents/*", "/_agent-native/runs/*", "/_agent-native/a2a", "/_agent-native/a2a/approvals/*", "/_agent-native/a2a/_process-task", "/.well-known/agent-card.json", "/mcp", "/mcp/directory", "/mcp/oauth/*", "/mcp/connect/*", "/mcp/tool/:action", "/_agent-native/mcp", "/_agent-native/mcp/oauth/*", "/_agent-native/mcp/connect/*", "/_agent-native/mcp/approvals/:id", "/_agent-native/mcp/servers/*", "/_agent-native/mcp/hub/*", "/_agent-native/mcp/*", "/.well-known/oauth-protected-resource/*", "/.well-known/oauth-authorization-server/*", "/_agent-native/integrations/:platform/webhook", "/_agent-native/integrations/remote/poll", "/_agent-native/integrations/remote/heartbeat", "/_agent-native/integrations/remote/*", "/_agent-native/integrations/process-task", "/_agent-native/integrations/*", "/_agent-native/connections/*", "/_agent-native/builder/*", "/_agent-native/resources/*", "/_agent-native/secrets/*", "/_agent-native/settings/*", "/_agent-native/notifications/*", "/_agent-native/onboarding/*", "/_agent-native/avatar/*", "/_agent-native/creative-context/*", "/_agent-native/file-upload/*", "/_agent-native/automations/*", "/_agent-native/jobs/*", "/_agent-native/observability/*", "/_agent-native/usage", "/_agent-native/transcribe-voice", "/_agent-native/transcribe-stream/*", "/_agent-native/voice-providers/*", "/_agent-native/realtime-voice/*", "/_agent-native/speak", "/_agent-native/open", "/_agent-native/embed/*", "/_agent-native/ping", "/_agent-native/health/*", "/_agent-native/track", "/_agent-native/speculation-rules.json", "/_agent-native/og-image.png", "/_agent-native/recap-image/*"]; /** Every value `httpRouteForRequest` can return besides an app file route. */ export declare const HTTP_ROUTE_BUCKETS: readonly ["/_agent-native/*", "/mcp/*", "/.well-known/*", "/api/*", "static", "page", "other"]; export interface HttpRouteRequest { method: string; pathname: string; /** Nitro's matched file-route template (`event.context.matchedRoute.route`). */ matchedRoute?: unknown; } export declare function httpRouteForRequest(request: HttpRouteRequest): string;