/** * @fileoverview Permissive reader for the top-level `schemaVersion:` * field of opensip-tools.config.yml + a compatibility classifier. * * The CLI's pre-action-hook calls these BEFORE any tool's strict loader * runs, so the reader must tolerate every "couldn't determine" case * (missing file, malformed YAML, missing field, non-integer field) and * treat them all as v1. Forward compat for existing user configs * written before the field existed. * * Lives in `core/lib/` alongside `paths.ts` because version detection * is a kernel-level concern; every tool's loader benefits. */ /** * The schema version this CLI binary knows how to load. Bumped when * the project config structure changes in a way that requires * migration. */ export declare const CLI_SUPPORTED_SCHEMA_VERSION: 1; /** Outcome of `checkSchemaCompat`. */ export type SchemaCompat = { readonly kind: 'ok'; readonly configVersion: number; } | { readonly kind: 'older'; readonly configVersion: number; readonly cliVersion: number; } | { readonly kind: 'cli-too-old'; readonly configVersion: number; readonly cliVersion: number; }; /** * Read the top-level `schemaVersion:` field. Returns 1 for any * "couldn't read it" outcome, by design. */ export declare function readConfigSchemaVersion(configPath: string): number; /** * Classify a config's declared version against the CLI's supported version. * * - 'ok' — versions match; proceed silently. * - 'older' — config is older than CLI; CLI can read it (today). * Future: `opensip-tools migrate` updates it. For * now the CLI runs it as-is. * - 'cli-too-old' — config is newer than CLI knows. CLI cannot safely * load it. User must upgrade the CLI. */ export declare function checkSchemaCompat(configVersion: number): SchemaCompat; //# sourceMappingURL=config-version.d.ts.map