import type { VersionEntry } from "../version-history/types.js";
/** Return value of {@link useSkillVersions}. */
export interface UseSkillVersionsReturn {
    /** Version entries mapped to the generic timeline format (newest first). */
    readonly versions: readonly VersionEntry[];
    /** `true` when no versions are available (RPC unimplemented or empty response). */
    readonly isEmpty: boolean;
    /** `true` while the initial fetch is in flight. */
    readonly isLoading: boolean;
    /** Error from the last failed request (excludes UNIMPLEMENTED), or `null`. */
    readonly error: Error | null;
    /** Discard cached data and re-fetch from the server. */
    readonly refetch: () => void;
    /**
     * Look up the artifact storage key for a version by its hash.
     * Used by diff flows to fetch historical artifacts via `getArtifact()`.
     * Returns `null` if the version hash is not found or has no artifact key.
     */
    readonly getArtifactKey: (versionHash: string) => string | null;
}
/**
 * Data hook that fetches version history for a skill.
 *
 * Calls the `listVersions` RPC via the SDK client and maps the response
 * to generic {@link VersionEntry} objects for the `VersionTimeline`
 * component.
 *
 * **Graceful degradation**: If the backend returns UNIMPLEMENTED (the
 * RPC handler hasn't been deployed yet), the hook treats it as an empty
 * response — `versions` is `[]` and `isEmpty` is `true`. No error is
 * surfaced to the consumer. This enables the frontend to ship ahead of
 * the backend without visual breakage.
 *
 * Pass `null` for `org` or `slug` to skip fetching (stable no-op).
 *
 * @example
 * ```tsx
 * const { versions, isEmpty, isLoading } = useSkillVersions("acme", "code-style-guide");
 *
 * if (!isEmpty) {
 *   return <VersionTimeline entries={versions} />;
 * }
 * ```
 */
export declare function useSkillVersions(org: string | null, slug: string | null): UseSkillVersionsReturn;
//# sourceMappingURL=useSkillVersions.d.ts.map