import type { DiscoveredCatalog, DiscoveredLooseIndex, DiscoveredAirJson, CatalogType } from "./discover-indexes.js"; /** Shape of the entries we write — loose indexes get a type, catalogs get the catalogs[] slot. */ export interface AirJsonAddition { kind: "catalog" | "loose" | "airJson"; /** Path or URI string written to air.json. */ value: string; /** For loose/airJson entries, the artifact type slot the value was written to. */ type?: CatalogType; /** Short human-readable summary used by the acceptance output. */ label: string; } export interface EditAirJsonOptions { /** Override the default air.json path. */ path?: string; /** Entries already persisted into air.json become no-ops. Default: true. */ idempotent?: boolean; } export interface EditAirJsonResult { /** Absolute path to the air.json that was read/written. */ airJsonPath: string; /** Entries that were newly added. */ added: AirJsonAddition[]; /** Entries that were already present and therefore skipped. */ skipped: AirJsonAddition[]; /** True if the scaffold was created because no air.json existed. */ createdScaffold: boolean; } /** * Check whether `candidate` (an absolute path or URI) is already present in the * given list of air.json entries. Performs path normalization so absolute, * `./relative`, and `../relative` forms of the same file all collide. */ export declare function entryAlreadyListed(candidateAbsOrUri: string, list: string[] | undefined, airJsonDir: string): boolean; export interface AddDiscoveredEntries { catalogs?: DiscoveredCatalog[]; looseIndexes?: DiscoveredLooseIndex[]; airJsons?: DiscoveredAirJson[]; } /** * Add discovered entries to the user's air.json. * * Catalogs go into `catalogs[]`. Loose indexes go into the matching per-type * array (`skills[]`, `mcp[]`, …). Nested `air.json` files land in * `catalogs[]` because they describe a full composition at their location — * the user can further edit the reference later. All additions are * idempotent: an entry already present in air.json is not duplicated. * * If the target air.json does not exist, a minimal scaffold is written * (no local index files — for a full workspace scaffold use `initConfig`). */ export declare function addDiscoveredToAirJson(entries: AddDiscoveredEntries, options?: EditAirJsonOptions): EditAirJsonResult; /** * Inspect whether a discovered candidate is already registered in air.json. * Used by the discovery filter to drop items that are already composed. */ export interface RegisteredChecker { catalog(absPath: string): boolean; loose(type: CatalogType, absPath: string): boolean; airJson(absPath: string): boolean; } export declare function buildRegisteredChecker(airJsonPath: string | null): RegisteredChecker; //# sourceMappingURL=edit-air-json.d.ts.map