import { type SkillHome, type SkillPackument, type SkillPublishResponse, type SkillReportedProvenance, type SkillSearchResponse, type SkillSearchSort, type SkillToken, type SkillTokenCreated, type SkillVersionManifest } from "@oh-my-pi/pi-wire/skillshare"; /** A registry failure: HTTP status plus the server's `{error}` message (or a local auth failure as 401). */ export declare class SkillshareError extends Error { readonly status: number; constructor(status: number, message: string); } export interface SkillSpec { scope: string; name: string; /** Exact version, semver range, or dist-tag; absent when the spec has no `@…` suffix. */ range?: string; } /** Parse `@scope/name[@range]`; null when the spec is not a registry package id. */ export declare function parseSkillSpec(spec: string): SkillSpec | null; export interface SkillshareClientOptions { /** Registry base URL; defaults to the `skills.registryUrl` setting, then {@link DEFAULT_SKILLS_URL}. */ registryUrl?: string; /** Mutations may authenticate with a `SKILLS_TOKEN` publish token instead of the Stencil login. */ forPublish?: boolean; } export interface PublishOptions { /** Dist-tag to point at the new version (server default: `latest` for stable, none for prereleases). */ tag?: string; provenance?: SkillReportedProvenance; /** GitHub Actions OIDC token requested with audience `SKILLS_OIDC_AUDIENCE`. */ githubOidc?: string; } export interface CreateTokenRequest { name: string; /** `@scope/name` packages the token may publish; omitted = every package the creator manages. */ packages?: string[]; expiresInDays?: number; } /** HTTP client for a Skillshare registry (`skills.omp.sh`). */ export declare class SkillshareClient { #private; /** Normalized registry base URL (no trailing slash). */ readonly registryUrl: string; private constructor(); static create(options?: SkillshareClientOptions): Promise; /** * The bearer mutations send: `SKILLS_TOKEN` when publishing and set, else * the Stencil credential. Null when neither is available. */ authToken(): Promise; home(): Promise; search(query: string, options?: { sort?: SkillSearchSort; page?: number; }): Promise; packument(scope: string, name: string): Promise; version(scope: string, name: string, versionOrTag: string): Promise; /** Download the `.tgz`, following the 302 to storage. Integrity is the installer's job. */ tarball(scope: string, name: string, version: string): Promise; publish(scope: string, name: string, version: string, tgz: Uint8Array, options?: PublishOptions): Promise; setTag(scope: string, name: string, tag: string, version: string): Promise; removeTag(scope: string, name: string, tag: string): Promise; yank(scope: string, name: string, version: string, yanked: boolean): Promise; /** Set (string) or clear (null) the deprecation message of one version. */ deprecate(scope: string, name: string, version: string, message: string | null): Promise; addOwner(scope: string, name: string, username: string): Promise; removeOwner(scope: string, name: string, username: string): Promise; createToken(request: CreateTokenRequest): Promise; listTokens(): Promise; revokeToken(id: string): Promise; /** Upload a Claude `.skill` zip; the server converts and publishes it. */ importSkill(zip: Uint8Array): Promise; close(): void; }