import type { CliContext } from '../context/create-context.js'; import type { RouteManifest, RouteManifestInput } from './manifest-store.js'; export type RouteManifestConflict = { /** The manifest that already claims these ports. */ manifest: RouteManifest; ports: number[]; }; export type ReserveRouteManifestOptions = { /** * Builds the manifest for attempt `attempt` (0-based), each one claiming a different port * range. Return undefined once no range is left to try. */ buildManifest: (attempt: number) => RouteManifestInput | undefined; }; /** * The active manifests whose reserved ports overlap the ports of `candidate`. Manifests with the * same name are ignored: that one is the candidate itself (a previous attempt of this same run). */ export declare function findRouteManifestConflicts(context: CliContext, candidate: RouteManifestInput): Promise; /** * Claim a port range for this process by writing a route manifest for it. * * Ranges are tried in the order `buildManifest` produces them, and a range is only claimed when * both checks pass: no active manifest reserves any of its ports, and every port can actually be * bound right now (which also covers processes that never wrote a manifest). The manifest is * written first and verified afterwards, so two processes that pick the same free range at the * same time do not both keep it: the one that started later removes its manifest and moves on. */ export declare function reserveRouteManifest(context: CliContext, options: ReserveRouteManifestOptions): Promise; //# sourceMappingURL=route-reservation.d.ts.map