import { Packument, RegistryOptions } from './registry'; export interface FetchReleaseOptions extends RegistryOptions { /** npm package that ships the skills, e.g. `@constructive-io/skills`. */ pkg: string; /** * Version pin: exact version, semver range, or dist-tag. Ranges resolve to * the highest satisfying published version. */ pin: string; /** Root directory releases unpack into: `//`. */ skillsRoot: string; /** Path of the skills tree inside the package (default `.agents/skills`). */ packageSubdir?: string; } export interface FetchedRelease { version: string; /** Directory containing `/SKILL.md` folders, ready for DirectorySkillSource. */ skillsDir: string; /** True when the release was already on disk and no download happened. */ fromCache: boolean; } export declare function resolvePin(packument: Packument, pin: string): string; /** * Ensure a skills release is unpacked under `//` and * return its skills directory. Downloads at most once per version: an already * unpacked release is reused without touching the network, so a previously * fetched version keeps working offline. */ export declare function fetchSkillsRelease(options: FetchReleaseOptions): Promise; /** Newest already-downloaded version under `skillsRoot`, or null. */ export declare function latestLocalRelease(skillsRoot: string, subdir?: string): FetchedRelease | null;