export interface AppRoute { readonly name: string; readonly origin: string; readonly url: string | null; readonly hosts: ReadonlySet } export interface AppAnswer { readonly status: number; readonly headers: Record; readonly body: string } export function instanceServices(instanceFile: string | undefined): Readonly>; readonly external?: { readonly discoveredEnv?: Readonly> } }>>; export interface InstanceEndpoint { readonly host: string; readonly port: number; readonly kind: 'door' | 'service'; readonly name: string; readonly url: string } export function sameListenerHost(dialed: string, recorded: string): boolean; export function instanceEndpoints(instanceFile: string | undefined): InstanceEndpoint[]; export function instanceEndpointAt(instanceFile: string | undefined, host: string, port: number): { readonly kind: 'door' | 'service'; readonly name: string } | null; export function appRouteFor(instanceFile: string | undefined, host: string, twins?: Readonly>, claimedAppHosts?: ReadonlySet | null): AppRoute | null; export function appHostMatch(hosts: ReadonlySet, host: string): boolean; export function appForwardHeaders(url: URL): Record; export function appDestination(value: string | URL, env?: Readonly>): AppRoute | null; export function deliverToApp(route: AppRoute, value: string | URL, init?: { method?: string; headers?: Record; body?: string | Uint8Array | null; /** Infinity: no deadline of its own */ timeoutMs?: number; signal?: AbortSignal }): Promise; export function appFetch(value: string | URL, init?: RequestInit): Promise; export function followRedirects(value: string | URL, init: RequestInit, send: (url: URL, init: RequestInit) => Promise, extraDropped?: string[]): Promise;