import { z } from "zod"; declare const routeConfigSchema: z.ZodObject<{ params: z.ZodOptional>; routes: z.ZodOptional>>; headers: z.ZodOptional>; query: z.ZodOptional>; abandonAfterMs: z.ZodOptional; abandonFrom: z.ZodOptional>; }, z.core.$strict>; export type RouteConfig = z.infer; export declare class RouteConfigError extends Error { constructor(message: string); } export declare const ROUTE_CONFIG_FILE = "next-leak.config.json"; /** Missing file → empty config. Present but invalid → loud failure. */ export declare function loadRouteConfig(appDir: string): Promise; export type DynamicSegment = { name: string; /** `[...slug]` — the value may span several path segments. */ catchAll: boolean; /** `[[...slug]]` — the segment can be omitted entirely. */ optional: boolean; }; /** * The dynamic segments of a route template, in order. * * Exported so guidance and resolution read the same grammar: a skeleton that * named parameters the resolver does not recognise would be worse than none. */ export declare function dynamicSegmentsOf(routeTemplate: string): DynamicSegment[]; /** * Sample values may contain `{n}`, which the load phase replaces with a * per-request counter. Leaks keyed by URL (route caches, LRUs, bot traffic * with unique tails) are invisible when every request hits the same path. */ export declare const UNIQUE_MARKER = "{n}"; /** The bound in a sample value, or null when it carries none. */ export declare function boundedMarkerOf(value: string): { marker: string; bound: number; } | null; /** * Whether a request path mixes both load markers across its segments. * * A single sample value carrying both is rejected when the config loads, but * two params of the same route can each carry a different one, and the mix has * no coherent meaning: the load phase resolves the bounded marker per request * and leaves `{n}` in the path as a literal, so every request asks for a URL * with `%7Bn%7D` in it. The route is refused rather than measured that way. */ export declare function mixesMarkers(requestPath: string): boolean; /** * A concrete path to ask for on behalf of a request path that still carries * load markers. * * The readiness probe has to ask for what the load will ask for, but expanding * the markers belongs to the load phase. Sent as they are, the probe requests a * literal `/posts/post-%7Bn%7D` — a key no request of the run will ever revisit, * planted in the route's cache before the baseline snapshot is taken. * * `0` is the value the build is most likely to have prerendered already, and it * is one the bounded sequence visits anyway. */ export declare function probeRequestPath(requestPath: string): string; /** * Substitutes sample values into a dynamic route template and returns a * URL-safe request path (or null when a param has no configured value; * optional catch-alls without a value are dropped instead). * * Percent-encoding is not cosmetic: an unencoded `#` silently truncated the * path (a different route got measured) and unencoded non-ASCII produced * requests that never completed — both verified against a real server. */ export declare function resolveRoutePath(routeTemplate: string, config: RouteConfig): string | null; export {};