/** * Detect which SoloSquad version layout a directory corresponds to. * Returns the source version string, or null if the directory is not a * recognizable SoloSquad workspace. */ export declare function detectWorkspaceVersion(workspace: string): string | null; /** * Walk up from a starting directory to find the nearest workspace root * (v0.2.2 = has .solosquad/; v0.1.x = has agents/+routines/+core/). * Returns the absolute path or null. */ export declare function findWorkspaceRoot(start: string): string | null; /** Matcher: does a migration's "from" spec match the detected version? * * v1.0.3 fix — `X.Y.Z.x` patterns must match exact `X.Y.Z` too. Pre-v1.0.3 * the matcher sliced off only the trailing `x`, leaving `"1.0.0."` as the * startsWith prefix — so `"1.0.0"` (without trailing dot) silently missed, * breaking patch-level migrations. Both ".x" patterns now match: * - "0.1.x" → matches "0.1" exact AND "0.1.0"/"0.1.5"/... * - "1.0.0.x" → matches "1.0.0" exact AND "1.0.0.5"/... (4-segment is * unused in semver but pattern preserved for legacy migrations) */ export declare function versionMatches(spec: string, detected: string): boolean;