/** The config file the running gateway watches; edits are hot-reloaded within ~1s. */ export declare const GATEWAY_CONFIG_PATH: string; export interface GatewayRouteSpec { /** Endpoint section (URL segment after the mode): `/m//`. */ endpoint: string; /** Mode name (billing/route selector). */ mode: string; base_url: string; auth_style: string; /** Managed upstream keys. Empty means the gateway forwards the caller's own key. */ keys: string[]; passthrough: boolean; } /** The stored route config, or null when that endpoint/mode pair is absent. */ export declare function readGatewayRoute(gatewayPath: string, endpoint: string, mode: string): Record | null; /** * Write one route, replacing it if it already exists. This is the update path the discovery merge * deliberately lacks — `mergeGatewayConfig` is add-only so it can never clobber hand-maintained * routes, which also means it can never edit one. */ export declare function upsertGatewayRoute(gatewayPath: string, route: GatewayRouteSpec): void; /** Remove one route, dropping the endpoint section once its last mode is gone. */ export declare function removeGatewayRoute(gatewayPath: string, endpoint: string, mode: string): boolean;