/**
 * ClawHub API client.
 *
 * Talks to the public ClawHub v1 API (clawhub.ai) to browse,
 * search, and download skills and packages.
 *
 * All read endpoints are public — no auth required.
 */
export interface ClawHubSearchResult {
    slug?: string;
    displayName?: string;
    summary?: string | null;
    version?: string | null;
    score: number;
    updatedAt?: number;
}
export interface ClawHubSkillListItem {
    slug: string;
    displayName: string;
    summary?: string | null;
    tags?: unknown;
    stats?: {
        downloads?: number;
        stars?: number;
        versions?: number;
        comments?: number;
    };
    createdAt: number;
    updatedAt: number;
    latestVersion?: {
        version: string;
        createdAt: number;
        changelog: string;
    };
}
export interface ClawHubSkillDetail {
    skill: {
        slug: string;
        displayName: string;
        summary?: string | null;
        stats?: {
            downloads?: number;
            stars?: number;
        };
    } | null;
    latestVersion: {
        version: string;
        createdAt: number;
        changelog: string;
    } | null;
    owner: {
        handle: string | null;
        displayName?: string | null;
        image?: string | null;
    } | null;
}
export interface ClawHubPackageListItem {
    name?: string;
    displayName?: string;
    description?: string;
    version?: string;
    type?: string;
    author?: string;
    downloads?: number;
}
export declare class ClawHubClient {
    private baseUrl;
    constructor(registryUrl?: string);
    /** Vector search for skills. */
    searchSkills(query: string, limit?: number): Promise<ClawHubSearchResult[]>;
    /** Browse skills with sorting. */
    listSkills(opts?: {
        sort?: "newest" | "downloads" | "installs" | "installsAllTime" | "trending";
        limit?: number;
        cursor?: string;
    }): Promise<{
        items: ClawHubSkillListItem[];
        nextCursor: string | null;
    }>;
    /** Get a single skill detail. */
    getSkill(slug: string): Promise<ClawHubSkillDetail>;
    /** Download skill zip. Returns raw bytes. */
    downloadSkill(slug: string, version?: string): Promise<ArrayBuffer>;
    /** List packages (plugins). */
    listPackages(opts?: {
        limit?: number;
    }): Promise<ClawHubPackageListItem[]>;
    private get;
}
/**
 * Extract a zip buffer into a destination directory.
 * Uses platform-native tools (tar on Windows, unzip on *nix).
 */
export declare function extractZip(zipBuffer: ArrayBuffer, destDir: string): Promise<void>;
/**
 * Write origin metadata for a ClawHub-installed skill.
 * Stored as `<skillDir>/.clawhub/origin.json` to match ClawHub CLI convention.
 */
export declare function writeOrigin(skillDir: string, meta: {
    slug: string;
    version: string;
    registry: string;
    installedAt: number;
}): Promise<void>;
//# sourceMappingURL=client.d.ts.map