/** * Skill store — install/uninstall skill từ npm registry vào ~/.redai/skills//. * * Khác bản cũ: * - Không còn `--save` vào `/node_modules` hay `~/.redai/skill-store/node_modules`. * - Pipeline: `npm pack` → extract tarball → copy SKILL.md + resource dirs vào * ~/.redai/skills//. Resolver chỉ scan 3 tầng "manual"-style, * không phân biệt nguồn npm/manual. * - Uninstall = xoá thư mục skill. Marker file `_install.json` giúp phân biệt * skill do `redai skill install` tạo vs. skill user viết tay. */ export interface InstallResult { ok: boolean; durationMs: number; /** Stderr/stdout từ npm pack — show cho user khi fail. */ output: string; /** Tên skill đã cài (parse từ SKILL.md / package.json). */ installed: { packageName: string; skillName: string; version?: string; }[]; /** Reason fail nếu có. */ errors: { packageName: string; reason: string; }[]; } export interface UninstallResult { ok: boolean; removed: string[]; errors: { name: string; reason: string; }[]; } /** Cài 1 hoặc nhiều skill package từ npm registry. */ export declare function installSkillPackage(pkgs: string[], opts?: { force?: boolean; onLine?: (line: string) => void; }): Promise; /** Gỡ skill — chỉ chấp nhận skill do install (có marker file). */ export declare function uninstallSkillPackage(names: string[], opts?: { onLine?: (line: string) => void; }): Promise; /** Search npm registry cho skill package theo keyword + query. Không đổi. */ export declare function searchSkillPackages(query: string, opts?: { onLine?: (line: string) => void; }): Promise<{ ok: boolean; raw: string; }>;