import type { Catalog } from './types.js'; /** * Validates a package selection against the catalog: every id must be known, * duplicates are collapsed, and an exclusive group may hold at most one member. * * @param {string[]} selection * @param {Catalog} catalog * @return {string[]} - the validated, de-duplicated selection */ export declare function validateSelection(selection: string[], catalog: Catalog): string[]; /** * Parses a --packages flag value into ids. Returns null when the flag was not * provided at all, and [] when explicitly negated (--no-packages). * * @param {any} flag * @return {string[] | null} */ export declare function parsePackagesFlag(flag: any): string[] | null; /** * Interactively prompts for package selection: a single-choice list per * exclusive group and a checkbox for each free group, pre-selected from the * given defaults. * * @param {Catalog} catalog * @param {string[]} defaults - ids to pre-select * @param {Record} [notes] - extra line per group id, shown above * its list; used to say why something * is preselected * @param {Record} [recommended] - member id per group id to mark * as recommended * @return {Promise} */ export declare function promptPackages(catalog: Catalog, defaults: string[], notes?: Record, recommended?: Record): Promise; /** * Resolves the final package selection using precedence: * flag (--packages/--no-packages) -> per-service -> global -> prompt -> none, * then validates it against the catalog. * * When a fleet root is given, every exclusive group the fleet can answer for is * preselected from what its services already use — the ORM and the tracing * backend today. A group nothing in the fleet uses preselects nothing. * * That applies to the PROMPT only. A non-interactive run with no flag and no * configured packages still selects nothing: a proposal a user can decline is * one thing, and quietly adding a database dependency to an automated run is * another. * * @param {any} flag - raw --packages flag value * @param {string[] | undefined} service - per-service packages * @param {string[] | undefined} global - global-config packages * @param {Catalog} catalog * @param {boolean} interactive * @param {string} [fleetRoot] - directory holding the sibling services * @return {Promise} */ export declare function resolvePackages(flag: any, service: string[] | undefined, global: string[] | undefined, catalog: Catalog, interactive: boolean, fleetRoot?: string): Promise;