/** * Is a newer release published, and is this copy behind it? * * A NETWORK CALL THIS PACKAGE DOES NOT MAKE ON ITS OWN. It runs from `doctor`, * which a person typed, and from nowhere on the MCP request path: a version * check that fires when a client starts the server turns every session into a * request to a third party the user did not ask for, and it would sit on the * cold handshake path where it can only make startup slower. * * IT ASKS FOR ONE MANIFEST, NOT THE PACKUMENT. `//latest` returns the * single published manifest; `/` returns every version ever published * with its full metadata, which for this package is already hundreds of * kilobytes and grows with every release. * * NOTHING ABOUT THE USER GOES OUT. The request carries a URL and an Accept * header. No machine id, no version of ours, no query string -- so unlike the * telemetry beacon this is not a report, and `DO_NOT_TRACK` is still honoured * because a person who set it has said they do not want unprompted requests. */ /** How long the registry gets before the answer is "we do not know". */ export declare const REGISTRY_TIMEOUT_MS = 4000; /** The answer, which is either a version or the reason there is not one. */ export type LatestLookup = { readonly version: string; readonly refused?: undefined; } | { readonly version?: undefined; readonly refused: string; }; /** The registry to ask, honouring an npm mirror if one is configured. */ export declare function registryBase(env?: NodeJS.ProcessEnv): string; /** Where the single latest manifest for a scoped name lives. */ export declare function latestUrl(name?: string, env?: NodeJS.ProcessEnv): string; /** * The published `latest` version, or why we do not know it. * * `fetcher` is injected so the tests never reach the network: a test that * depends on npm being up is a test that reports a red build when npm has a * bad afternoon. */ export declare function latestVersion(options?: { readonly env?: NodeJS.ProcessEnv; readonly fetcher?: typeof fetch; readonly timeoutMs?: number; }): Promise; /** * -1, 0 or 1, as semver orders them, or null when either side is not a version. * * WRITTEN OUT RATHER THAN DEPENDED ON. `semver` would be a runtime dependency * shipped to every user so that a diagnostic can compare two strings, and the * ordering rules that matter here are the two below. */ export declare function compareVersions(left: string, right: string): number | null; //# sourceMappingURL=latest.d.ts.map