/** * `opensip-cli.config.yml` parsing + validation for the `fit` command. * * Wraps `loadSignalersConfig` and `loadTargetsConfig` so that * `executeFit` gets a single resolve-or-error step. A missing/invalid * config is a HARD error — otherwise file-based checks silently produce * zero findings, the exact failure mode the CLI exists to prevent. */ import { loadTargetsConfig } from '../../targets/index.js'; import type { SignalersConfig } from '../../signalers/types.js'; import type { ErrorResult, FitOptions } from '@opensip-cli/contracts'; export interface LoadedFitConfig { signalersConfig: SignalersConfig; targetsConfig: ReturnType['config']; targetRegistry: ReturnType['registry']; } /** * Resolve `signalersConfig` + `targetsConfig` for this run. Scope-first * (ADR-0023 one-reader): on CLI paths both loaders project from the * host-validated `scope.configDocument`; the file read is the scope-less * fallback (programmatic use, unit tests). Returns an `ErrorResult` instead * of throwing so the caller maps it directly to the public failure shape — a * missing/invalid config is a HARD error (otherwise file-based checks * silently produce zero findings). */ export declare function loadFitConfig(args: FitOptions): LoadedFitConfig | { error: ErrorResult; }; /** * Warn loudly when the targets config declares a `languages:` tag that is * neither backed by a content-filter adapter NOR a recognized non-code * format — i.e. a likely typo. Silent acceptance would let users ship * configs whose files match no check and skip filtering with no signal. * * `languages:` is a *matching dimension* (it routes files to checks via * `findByScope`). A subset of those tags have a registered * {@link LanguageAdapter} that strips strings/comments; another set are * recognized non-code formats (JSON, YAML, Markdown, …) that are valid * matching tags but intentionally have no adapter — files in those scan * raw, which is correct, so they are NOT warned about. Only genuinely * unrecognized tags (e.g. `pythonn`) warn. * * Returns warning strings (one per unknown-language batch) rather than * writing to stderr — stderr writes during the Ink live view desync the * renderer's frame tracking. `executeFit` collects these and threads * them into the run warnings the live renderer surfaces. * * Async only because `currentScope` is imported via dynamic import to * keep the executeFit body free of fitness↔core import arrows beyond * the kernel barrel. The scope is bound by the CLI pre-action-hook. * * @throws {Error} When called outside `runWithScope(...)` (no current scope). */ export declare function validateLanguagesAgainstAdapters(targetRegistry: LoadedFitConfig['targetRegistry']): Promise; //# sourceMappingURL=config-loader.d.ts.map