/** * Multi-source catalog resolver (v0.8). * * Flow: * 1. Build the effective source list via `loadEffectiveSources()` * 2. Fetch each enabled source with per-source fallback * cache → remote → stale → failed * The bundled source skips fetching and always succeeds. * 3. Merge via `mergeCatalogStack()` which handles `replace` floors and * N-way extend-style layering. * * Backward compatibility: * - `ResolveCatalogOptions.catalogUrl` / `catalogMode` still work — they're * synthesized into a CLI adhoc source at priority 999. * - When the effective source set is only [bundled, official], the result * shape matches v0.7 (source: 'remote' | 'cache' | 'bundled'). */ import type { CatalogMode, CatalogSource, ResolvedCatalog } from '../types/index.js'; export interface ResolveCatalogOptions { forceRefresh?: boolean; silent?: boolean; catalogUrl?: string; catalogMode?: CatalogMode; projectRoot?: string; /** * Optionally inject an explicit source list. When provided, bypasses * `loadEffectiveSources()` entirely — used by tests and by the * `catalog source test` command. */ sources?: CatalogSource[]; } export declare function resolveCatalog(options?: ResolveCatalogOptions): Promise;