/** * Codeep skill marketplace — CLI ↔ codeep.dev/api/skills bridge. * * Talks to the REST endpoints in `Codeep-web/src/app/api/skills/`: * GET /api/skills?q=&mine=1 → browse * POST /api/skills → publish (auth required) * GET /api/skills/:owner/:slug → fetch one (auth req for private) * DELETE /api/skills/:owner/:slug → unpublish (owner only) * * Auth uses the same `x-sync-token` header `codeepCloud.ts` already sends * for /api/tasks and friends. */ import { type SkillBundle } from './skillBundles.js'; export interface RemoteSkill { id: number; github_id: string; owner_username: string | null; slug: string; name: string; description: string; body: string; version: string | null; visibility: 'public' | 'private'; install_count: number; updated_at: string; } /** * Publish a skill bundle to codeep.dev. The bundle may be project-scoped * (`/.codeep/skills//SKILL.md`) or global * (`~/.codeep/skills//SKILL.md`) — either is publishable. The * `--public` flag (translated into `opts.isPublic`) is the user's * explicit consent gate; we don't gate further on bundle scope. If both * exist with the same slug, the project copy wins (mirrors the rest of * the bundle-loading flow). */ export declare function publishBundle(workspaceRoot: string, slug: string, opts?: { isPublic?: boolean; }): Promise<{ ok: boolean; skill?: RemoteSkill; error?: string; }>; /** * Install a skill from the marketplace into the project's * `.codeep/skills//SKILL.md`. `idOrPath` may be either * `/` (preferred) or a numeric id. */ export declare function installBundle(workspaceRoot: string, idOrPath: string): Promise<{ ok: boolean; name?: string; error?: string; }>; /** List public skills (or own when `mine=true`). Returns up to 100. */ export declare function browseSkills(opts?: { query?: string; mine?: boolean; }): Promise<{ ok: boolean; skills?: RemoteSkill[]; error?: string; }>; /** Unpublish a skill (owner only). */ export declare function unpublishBundle(idOrPath: string): Promise<{ ok: boolean; error?: string; }>; /** * Re-serialise a loaded SkillBundle back into the SKILL.md text format. * Used by publish so the round-trip is lossless (sort of — we drop * unknown frontmatter keys for now to keep the published format stable). */ export declare function serialiseSkillMd(bundle: SkillBundle): string; /** Read raw SKILL.md from disk — used when we want the unmodified bytes. */ export declare function readRawSkillMd(workspaceRoot: string, slug: string): string | null; /** Delete the local copy of an installed skill bundle (for /skills uninstall). */ export declare function uninstallLocalBundle(workspaceRoot: string, slug: string): boolean;