/** * T11181 — Version SSoT: canonical version identifiers. * * Single source of truth for doc version identifiers. Previously versions were * derived from counting JSONL audit log lines; now they are stored directly on * the attachments DB row as `owner_version` (CLEO release version) and * `doc_version` (sequential per-slug counter). * * @task T11181 * @epic T10518 * @saga T10516 */ /** Result of auditing version fields across the codebase. */ export interface VersionAuditResult { /** Whether the audit passed (all version fields consistent). */ ok: boolean; /** List of findings from the audit. */ findings: string[]; /** Number of rows that have an owner_version mismatch. */ mismatchedRows: number; /** Number of rows audited. */ totalRows: number; } /** SQL migration statements for version SSoT initialization. */ export declare const VERSION_SSOT_MIGRATION_SQL: string; /** * Get the canonical CLEO version from the project's package.json. * * @param projectRoot - Optional project root override. * @returns The version string from package.json, or `0.0.0` when unavailable. */ export declare function getCanonicalCleoVersion(projectRoot?: string): string; /** * Compare two CLEO calver version strings. * * @param a - First version string. * @param b - Second version string. * @returns `-1` if `a < b`, `0` if equal, `1` if `a > b`. */ export declare function compareCleoVersions(a: string, b: string): number; /** * Check whether a version is within an inclusive range. * * @param version - The version to check. * @param min - Minimum version, inclusive. * @param max - Maximum version, inclusive. * @returns True if the version is in range. */ export declare function versionInRange(version: string, min?: string, max?: string): boolean; /** Resolution strategy for version disambiguation. */ export type VersionResolutionStrategy = 'canonical' | 'latest' | 'exact'; /** * Resolve a version identifier using the given strategy. * * @param version - The version to resolve. * @param strategy - Resolution strategy. * @param candidates - Optional candidate versions for `latest` strategy. * @returns The resolved version string. */ export declare function resolveVersion(version: string, strategy?: VersionResolutionStrategy, candidates?: string[]): string; /** * Audit version fields across doc records for drift. * * @param canonicalVersion - The canonical version to compare against. * @param projectRoot - Project root containing the tasks database. * @returns Audit result with findings. */ export declare function auditVersionFields(canonicalVersion: string, projectRoot: string): Promise; //# sourceMappingURL=version-ssot.d.ts.map