/** * SkillHub marketplace helpers (https://skillhub.cn). * * Used by agent tools (`skillhub_search` / `skillhub_install`) and the Soul * CLI path. All subprocess work goes through `runProcess` (AbortSignal + * timeout) — never `execFileSync` on the tool path. */ import { type RunProcessResult } from '../utils/run-process.js'; declare const SKILLHUB_INSTALLER_URL = "https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh"; declare const SKILLHUB_KIT_URL = "https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/latest.tar.gz"; export { SKILLHUB_INSTALLER_URL, SKILLHUB_KIT_URL }; export interface SkillHubSearchHit { slug: string; name: string; description: string; version?: string; source?: string; } export declare function resolveSkillHubCommand(): string; /** True when the resolved command is an absolute path that exists on disk. */ export declare function skillHubCliAvailable(): boolean; export declare function skillHubInstallHint(): string; /** Reset ensure attempt flag — for tests only. */ export declare function resetSkillHubEnsureForTests(): void; /** * Ensure the SkillHub CLI is on disk (https://skillhub.cn/install/skillhub.md). * * When missing on non-Windows hosts, downloads and runs the official * `--cli-only` installer once per process, then re-probes. Injected `run` is * for tests. Never uses execFileSync — all work goes through runProcess. */ export declare function ensureSkillHubCli(options?: { force?: boolean; timeoutMs?: number; abortSignal?: AbortSignal; run?: (command: string, args: string[], opts?: { timeout?: number; signal?: AbortSignal; }) => Promise; }): Promise<{ ok: true; command: string; installed: boolean; } | { ok: false; message: string; }>; export declare function workspaceSkillsDir(workspaceDir: string): string; export declare function skillHubSearch(query: string, options?: { limit?: number; timeoutMs?: number; abortSignal?: AbortSignal; run?: (command: string, args: string[], opts?: { timeout?: number; signal?: AbortSignal; }) => Promise; }): Promise<{ ok: true; hits: SkillHubSearchHit[]; raw?: string; } | { ok: false; message: string; }>; export declare function skillHubInstall(slug: string, options: { workspaceDir: string; force?: boolean; timeoutMs?: number; abortSignal?: AbortSignal; run?: (command: string, args: string[], opts?: { timeout?: number; signal?: AbortSignal; }) => Promise; }): Promise<{ ok: true; dir: string; message: string; } | { ok: false; message: string; }>; //# sourceMappingURL=skillhub.d.ts.map