import { type Server } from 'node:http'; import type { PreviewAccess } from './access.js'; export type PreviewEndpoint = { kind: 'static'; root: string; spa?: boolean; } | { kind: 'server'; port: number; upstreamHost?: string; }; /** A Host authority only: never a URL or a client-selected TCP destination. */ export declare function validateUpstreamHost(value: unknown): asserts value is string; export declare function containedFile(root: string, relative: string): Promise; /** One route-to-file rule for static delivery, readiness and default revision tracking. */ export declare function staticPreviewFile(endpoint: Extract, decodedPath: string): Promise; export interface PreviewDeliveryOptions { access: PreviewAccess; endpoint: PreviewEndpoint; /** Optional instrumentation of navigation HTML, excluding explicit fetch/XHR. */ transformHTML?: (html: string, file: string) => string; /** Reserved, trusted runtime assets supplied by the gateway. */ assets?: Record string); type: string; }>; /** Revalidate registration, worktree and process ownership before every request. */ isLive?: () => Promise; /** Dedicated development-app key, configured by the owner; never a viewer header. */ upstreamApiKey?: string; /** Current admin + namespace keys; absent means app auth cannot be forwarded safely. */ gatewayApiKeys?: () => readonly string[]; } export declare function attachPreviewDelivery(server: Server, opts: PreviewDeliveryOptions): () => void; //# sourceMappingURL=delivery.d.ts.map