/**
 * Extract the `version` field from YAML frontmatter in SKILL.md content.
 * Returns the version string if it is valid semver, otherwise undefined.
 */
export declare function extractFrontmatterVersion(content: string): string | undefined;
/**
 * Increment the patch component of a semver string.
 * Returns "1.0.1" if the input is not valid semver.
 */
export declare function bumpPatch(version: string): string;
/**
 * Resolve the version to record in the lockfile.
 *
 * Priority chain: server > frontmatter > auto-patch > "1.0.0"
 */
export declare function resolveVersion(opts: {
    serverVersion?: string;
    frontmatterVersion?: string;
    currentVersion?: string;
    hashChanged: boolean;
    isFirstInstall: boolean;
}): string;
/**
 * Set or insert the `version:` field inside SKILL.md frontmatter.
 *
 * Behavior:
 *  - If frontmatter exists and contains `version:` → replace its value.
 *  - If frontmatter exists but has no `version:` → insert as the first field.
 *  - If no frontmatter at all → prepend a minimal `---\nversion: "X"\n---` block.
 *
 * The version is always emitted quoted to match the convention used by
 * skill-create-routes' buildSkillMd emitter and to keep YAML parsers happy
 * for non-numeric semver strings.
 */
export declare function setFrontmatterVersion(content: string, version: string): string;
