import type { Hono } from "hono"; import type { Reporter } from "../observability/reporter.js"; import type { VoyantBindings, VoyantExecutionContext, VoyantVariables } from "../types.js"; /** Shape of the deployment-supplied auth sub-app (see `VoyantAuthIntegration.handler`). */ type AuthAppFactory = (env: TBindings) => { fetch: (req: Request, env: TBindings, ctx?: VoyantExecutionContext) => Response | Promise; }; /** * Mount the app-owned auth handler at `/auth/*`, forwarding requests into the * deployment's auth sub-app. Two observability concerns are handled here so the * sub-app — which renders its own error responses and never reaches the outer * `onError` — stays consistent with the rest of the app (RFC voyant#1553): * * 1. The outer correlation id is injected into the forwarded request, so the * sub-app reuses it instead of minting a second, uncorrelated id. * 2. A 5xx response from the sub-app is bridged into the reporter with that same * id, so auth faults aren't an observability blind spot. */ export declare function mountAuthForwarding(app: Hono<{ Bindings: TBindings; Variables: VoyantVariables; }>, authHandler: AuthAppFactory, options: { reporter: Reporter; appName: string; }): void; export {};