import { type PortableSkillOptions } from "./portable-skills.js"; import type { SkillKind } from "./registry-types.js"; /** * The slice of RemoteSkillsClient that `pullSkills` needs. Narrowed to an interface so a * test can inject a fake and the real HTTP client (which satisfies it structurally) is * only constructed on the production path. */ export interface SkillPullClient { listSkills(): Promise; getSkill(slug: string): Promise; getSkillMd(slug: string): Promise; } export interface PullSkillsOptions extends PortableSkillOptions { /** Explicit skill names to pull. Ignored when `all` is set. */ names?: string[]; /** Pull every skill the instance serves. */ all?: boolean; /** * Client override. `undefined` (the default) resolves one from configuration; * `null` models "no credential available" so the null-handling path stays testable. */ client?: SkillPullClient | null; } export interface PulledSkillResult { name: string; success: boolean; path?: string; kind?: SkillKind; version?: string; /** True when the pull created the corpus entry, false when it updated an existing one. */ created?: boolean; error?: string; } export interface PullSkillsResult { results: PulledSkillResult[]; } export declare class PullSkillError extends Error { readonly detail?: string[] | undefined; constructor(message: string, detail?: string[] | undefined); } export declare function pullSkills(options?: PullSkillsOptions): Promise;