/** * Resolve public origins and asset URL prefixes for view documents and CSP. * * **Server origin** (`resolveServerOrigin`): MCP endpoint / API base — OAuth * resource identity, `connectDomains`, dev HMR websocket host. * * **Assets base** (`resolveAssetsBase`): prefix for view JS/CSS and * `public/` URLs — may include a path (CDN bucket prefix). */ /** * Resolve origin from forwarded headers or the request URL (no env override). */ export declare function resolveRequestOriginFromHeaders(request: Request): string; /** * Server public origin — `MCP_URL` when valid, else forwarded/request origin. * * Uses `.origin` only (path suffix on `MCP_URL` is ignored). */ export declare function resolveServerOrigin(request: Request): string; /** * Resolve the public MCP endpoint used for Claude's sandbox identity. * An origin-only `MCP_URL` uses `basePath`; a URL with a path is already an * endpoint and is kept verbatim. Otherwise use the request path and query * with the forwarded/request origin. Asset URLs never identify the endpoint. * * @internal */ export declare function resolveMcpEndpoint(request: Request | undefined, basePath: string): string | undefined; /** * Normalize an authored HTTP(S) view URL to an origin, without changing * legacy host-specific domain strings. This is not host submission validation. * * @internal */ export declare function normalizeViewDomain(domain: string): string; /** * Extract the origin from an assets URL prefix (origin + optional path). */ export declare function originFromAssetsBase(assetsBase: string): string; /** * Assets URL prefix for view JS/CSS and `public/` — `MCP_ASSETS_URL` when set, * else server origin from {@link resolveServerOrigin}. */ export declare function resolveAssetsBase(request: Request): string; /** * Whether `MCP_ASSETS_URL` is explicitly configured (distinct from server). */ export declare function hasExplicitAssetsBase(): boolean;