/** * Shared registry lookup and formatting helpers for the download commands. * * These helpers are cli-free: anything that needs cli-layer context (config, * command names) is passed in by the caller as plain values or callbacks. */ import type { Packument } from "../api/registrar.js"; /** * Result of searching for a package in a registry */ export type RegistrySearchResult = { registryUrl: string; packument: Packument; authToken?: string | null; }; /** * Error information from a failed search */ export type RegistrySearchError = { registryUrl: string; isNetworkError: boolean; message: string; }; /** * Search a specific registry for a package. * * The public registry is queried without auth. Private registries require an * auth token; when `getAuthToken` is null (no credentials configured) the * search reports "not found" rather than failing. * * @param args - The search parameters * @param args.registryUrl - The registry URL to search * @param args.fetchPackument - Fetches the packument from a registry * @param args.getAuthToken - Resolves an auth token for private registries, or null when no auth is configured * * @returns Object with result (if found) and/or error (if failed) */ export declare const searchSpecificRegistry: (args: { registryUrl: string; fetchPackument: (fetchArgs: { registryUrl: string; authToken?: string | null; }) => Promise; getAuthToken: (() => Promise) | null; }) => Promise<{ result: RegistrySearchResult | null; error: RegistrySearchError | null; }>; /** * Format the list of available versions for a package * @param args - The format parameters * @param args.packageName - The package name * @param args.packument - The packument containing version information * @param args.registryUrl - The registry URL * @param args.downloadCommand - The full download command hint (e.g. "nori-skillsets download") * * @returns Formatted version list message */ export declare const formatVersionList: (args: { packageName: string; packument: Packument; registryUrl: string; downloadCommand: string; }) => string; /** * Format the error message shown when a package name matches in multiple registries * @param args - The format parameters * @param args.packageName - The package name that was searched * @param args.results - The search results from multiple registries * @param args.entityLabel - The plural entity label (e.g. "packages", "skills", "subagents") * @param args.downloadCommand - The full download command hint (e.g. "nori-skillsets download") * * @returns Formatted error message */ export declare const formatMultipleMatchesError: (args: { packageName: string; results: Array; entityLabel: string; downloadCommand: string; }) => string; //# sourceMappingURL=registryLookup.d.ts.map