import { type AgentId } from '../agents/registry'; export interface SkillsInstallOptions { source: string; skills: string[]; agents: AgentId[]; cwd: string; global: boolean; copy: boolean; dryRun: boolean; /** Suppress inherited stdio; capture stdout/stderr instead (use in --json mode). */ quiet: boolean; /** Reconcile and record the base skill inventory. Defaults to true. Content * installs use their own lock namespace and must remain additive. */ reconcileBaseSkills?: boolean; } export interface SkillsRunResult { ran: boolean; command: string; argv: string[]; exitCode: number; /** Final install path used when npx failed but bundled skills were copied. */ fallbackUsed?: boolean; /** Original npx exit code when bundled fallback recovered the install. */ primaryExitCode?: number; fallbackDirs?: string[]; /** Captured output — only populated when quiet:true. */ stdout?: string; stderr?: string; /** Last diagnostic bytes from spawn errors or captured child stdout/stderr. */ stderrTail?: string; /** Skill names removed via `npx skills remove` because they were in * the previous run's lock but absent from this run's skills.yaml. */ removedSkills?: string[]; /** Soft warnings — orphan removal failures, partial state, etc. */ warnings?: string[]; } /** * Pure: assemble the argv that would be handed to `npx`. * Kept separate so it can be unit-tested without spawning anything. */ export declare function buildSkillsArgv(opts: Omit): string[]; /** * A `source` is a local directory when it begins with `./`, `../`, `/`, a * backslash, or a Windows drive letter. Anything else (e.g. `owner/repo`, * `https://…`, `git@…`) is a remote source routed to `npx skills`. */ export declare function isLocalSkillsDir(source: string): boolean; /** * Local-dir install: copy `//**` into each agent's `skillsDir`, * skipping `npx skills` entirely. * * - `['*']` installs every immediate subdirectory of source that has SKILL.md. * - explicit names must each exist with SKILL.md, else exit 1. * * Agents that share `.agents/skills` are deduped. Each destination skill dir is * replaced atomically (rm + cp) so stale files don't leak. `--global` is not * supported here (warned, install proceeds); `--copy` is a no-op (always copies). */ export declare function installSkillsFromLocalDir(opts: SkillsInstallOptions): SkillsRunResult; export declare function installSkills(opts: SkillsInstallOptions): SkillsRunResult;