/** * Engine ⇄ repo-artifact compatibility helpers. * * Repos pin harness artifacts locally (descriptors + workflow scripts), but the * engine (`pi-dynamic-workflows`) is loaded at whatever version is installed. These * helpers guard *engine behavior* the way `schemaVersion` guards *data shape*: * an optional `engine.min` floor on a descriptor warns + skips on load when the * running engine is older, mirroring the `schemaVersion` warn+skip gate. * * Discipline: additive-only in minors; rename/remove only at a major bump paired * with a `schemaVersion` bump. See docs/harness-engine-compat.md. */ export interface Semver { major: number; minor: number; patch: number; /** Pre-release identifier (e.g. "rc.1"); a pre-release is lower than the same major.minor.patch release. */ prerelease?: string; } /** Parse a strict `major.minor.patch` with optional pre-release/build suffix (no trailing junk). */ export declare function parseSemver(input: unknown): Semver | null; export declare function stringifySemver(version: Semver): string; /** Returns -1 / 0 / 1. A pre-release is lower than the same major.minor.patch release. */ export declare function compareSemver(a: Semver, b: Semver): number; export interface EngineFloorResult { ok: boolean; reason?: string; engineVersion?: Semver; floor?: Semver; } /** * Check a declared `engine.min` floor against the running engine version. * A missing/empty floor is always ok (the field is optional). */ export declare function checkEngineFloor(floorInput: unknown, engineVersion: Semver): EngineFloorResult; /** Read the engine version from a package.json file (best-effort; null on any failure). */ export declare function readEngineVersionFromFile(packageJsonPath: string): Semver | null;