import type { Command } from "commander"; import { type CommandSpec } from "../internals/plan.js"; import { type Runner } from "../internals/proc.js"; /** * `aih pack install` / `aih pack plan` — slice 3 of packs: drive the EXISTING * two-phase gated acquisition pipeline (`workspace add`'s fetch → scan → gate → * promote) once per SOURCE the pack curates, promoting ONLY the pack's refs * (`selectSkills` subset through {@link workspaceAddPhase2Plan}). Three * fail-closed properties define the command: * * 1. APPROVAL-DRIVEN AT EVERY POSTURE — `packStatus` is the entry gate: any ref * with a `missing-approval` or `pin-mismatch` refuses BEFORE any fetch. * Installing from a curation manifest without clean approvals is a * contradiction, so vibe's advisory ladder deliberately does not apply. * 2. PINS COME FROM THE LOCK — each github ref resolves `owner/repo` pinned to * its `aih-skills.lock.json` commit (the pin authority); local refs resolve * the recorded path. The manifest never invents a pin. * 3. GATE ALL SOURCES BEFORE PROMOTING ANY — phase A runs fetch+scan+capture * for EVERY source (sequential, one quarantine at a time on the wire); * phase B promotes only when every source cleared. One poisoned source * blocks the whole pack; quarantines are cleaned in `finally` either way. * * `aih pack plan` is the read-only preview of the same resolution + gate: it * never fetches and never writes (a remote scan is fetch-blocked in dry-run * anyway). `pack install` without `--apply` behaves exactly like `plan`. */ interface PackInstallDeps { run?: Runner; env?: NodeJS.ProcessEnv; write?: (text: string) => void; now?: () => Date; newRunId?: () => string; } /** * The install runner — mirrors `runWorkspaceAdd`'s shape (context → phase 1 → * gate → phase 2 → summaries + support), looped per source with the gate-all * ordering documented on the module. Registered with a dedicated commander * action (like `workspace add`) because one invocation composes several plans. */ export declare function runPackInstall(command: Command, deps?: PackInstallDeps): Promise; export declare const packPlanCommand: CommandSpec; export declare const packInstallCommand: CommandSpec; export {};