import type { ExternalPluginCompatibility } from "../../packages/plugin-package-contract/src/index.js"; export type ClawHubPackageFamily = "skill" | "code-plugin" | "bundle-plugin"; export type ClawHubPackageChannel = "official" | "community" | "private"; export type ClawHubPackageCompatibility = ExternalPluginCompatibility; export type ClawHubPackageListItem = { name: string; displayName: string; family: ClawHubPackageFamily; runtimeId?: string | null; channel: ClawHubPackageChannel; isOfficial: boolean; summary?: string | null; ownerHandle?: string | null; createdAt: number; updatedAt: number; latestVersion?: string | null; capabilityTags?: string[]; executesCode?: boolean; verificationTier?: string | null; }; export type ClawHubPackageDetail = { package: (ClawHubPackageListItem & { tags?: Record; compatibility?: ClawHubPackageCompatibility | null; capabilities?: { executesCode?: boolean; runtimeId?: string; capabilityTags?: string[]; bundleFormat?: string; hostTargets?: string[]; pluginKind?: string; channels?: string[]; providers?: string[]; hooks?: string[]; bundledSkills?: string[]; } | null; verification?: { tier?: string; scope?: string; summary?: string; sourceRepo?: string; sourceCommit?: string; hasProvenance?: boolean; scanStatus?: string; } | null; }) | null; owner?: { handle?: string | null; displayName?: string | null; image?: string | null; } | null; }; export type ClawHubPackageVersion = { package: { name: string; displayName: string; family: ClawHubPackageFamily; } | null; version: { version: string; createdAt: number; changelog: string; distTags?: string[]; files?: unknown; compatibility?: ClawHubPackageCompatibility | null; capabilities?: ClawHubPackageDetail["package"] extends infer T ? T extends { capabilities?: infer C; } ? C : never : never; verification?: ClawHubPackageDetail["package"] extends infer T ? T extends { verification?: infer C; } ? C : never : never; } | null; }; export type ClawHubPackageSearchResult = { score: number; package: ClawHubPackageListItem; }; export type ClawHubSkillSearchResult = { score: number; slug: string; displayName: string; summary?: string; version?: string; updatedAt?: number; }; export type ClawHubSkillDetail = { skill: { slug: string; displayName: string; summary?: string; tags?: Record; createdAt: number; updatedAt: number; } | null; latestVersion?: { version: string; createdAt: number; changelog?: string; } | null; metadata?: { os?: string[] | null; systems?: string[] | null; } | null; owner?: { handle?: string | null; displayName?: string | null; image?: string | null; } | null; }; export type ClawHubSkillListResponse = { items: Array<{ slug: string; displayName: string; summary?: string; tags?: Record; latestVersion?: { version: string; createdAt: number; changelog?: string; } | null; metadata?: { os?: string[] | null; systems?: string[] | null; } | null; createdAt: number; updatedAt: number; }>; nextCursor?: string | null; }; export type ClawHubDownloadResult = { archivePath: string; integrity: string; cleanup: () => Promise; }; type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise; export declare class ClawHubRequestError extends Error { readonly status: number; readonly requestPath: string; readonly responseBody: string; constructor(params: { path: string; status: number; body: string; }); } export declare function resolveClawHubAuthToken(): Promise; export declare function resolveClawHubBaseUrl(baseUrl?: string): string; export declare function formatSha256Integrity(bytes: Uint8Array): string; export declare function parseClawHubPluginSpec(raw: string): { name: string; version?: string; baseUrl?: string; } | null; export declare function fetchClawHubPackageDetail(params: { name: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; }): Promise; export declare function fetchClawHubPackageVersion(params: { name: string; version: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; }): Promise; export declare function searchClawHubPackages(params: { query: string; family?: ClawHubPackageFamily; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; limit?: number; }): Promise; export declare function searchClawHubSkills(params: { query: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; limit?: number; }): Promise; export declare function fetchClawHubSkillDetail(params: { slug: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; }): Promise; export declare function listClawHubSkills(params: { baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; limit?: number; }): Promise; export declare function downloadClawHubPackageArchive(params: { name: string; version?: string; tag?: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; }): Promise; export declare function downloadClawHubSkillArchive(params: { slug: string; version?: string; tag?: string; baseUrl?: string; token?: string; timeoutMs?: number; fetchImpl?: FetchLike; }): Promise; export declare function resolveLatestVersionFromPackage(detail: ClawHubPackageDetail): string | null; export declare function isClawHubFamilySkill(detail: ClawHubPackageDetail | ClawHubSkillDetail): boolean; export declare function satisfiesPluginApiRange(pluginApiVersion: string, pluginApiRange?: string | null): boolean; export declare function satisfiesGatewayMinimum(currentVersion: string, minGatewayVersion?: string | null): boolean; export {};