import { type CommandSpec, type PlanContext } from "../internals/plan.js"; import type { Check } from "../internals/verify.js"; /** * `aih pack status` / `aih pack validate` — slice 1 of packs: the READ-ONLY join * that answers "is each curated pack approved and installed?". It is the packs' * analog of `skillInventory`: pure fs (plan-purity floor, #35) over three * committed/on-disk truths — the `aih-packs.json` manifest, the * `aih-skills.lock.json` approvals (the PIN AUTHORITY the manifest refs are * cross-checked against), and the on-disk skill inventory. It never re-derives * state a write command already recorded, and it never writes. */ /** * The approval axis for one pack ref, judged against the lock entry of the same * name. `pin-mismatch` = a lock entry EXISTS but its source or commit disagrees * with the manifest ref — the fail-closed cross-check signal (the lock is the * pin authority; a disagreeing manifest is stale or tampered, never a new pin). */ export type PackRefApproval = "approved" | "missing-approval" | "pin-mismatch"; /** The install axis for one pack ref, from the on-disk inventory rows of that name. */ export type PackRefInstall = "installed" | "not-installed" | "quarantined" | "stale-pin"; /** One pack skill ref, graded on the two ORTHOGONAL axes (approval × install). */ export interface PackSkillStatus { name: string; source: string; commit: string; approval: PackRefApproval; install: PackRefInstall; } export interface PackStatus { name: string; description?: string; requiredChecks?: string[]; /** `ready` = every ref approved; `blocked` = any pin-mismatch or missing-approval. */ rollup: "ready" | "blocked"; counts: { skills: number; approved: number; installed: number; }; skills: PackSkillStatus[]; } /** One coded validation finding; `pack` names the flagged pack (unset = manifest-wide). */ export interface PackFinding { pack?: string; check: Check; } export interface PackStatusReport { /** Whether `aih-packs.json` exists at all (absent ⇒ friendly empty, never a finding). */ manifestPresent: boolean; packs: PackStatus[]; findings: PackFinding[]; } /** * The pure join: manifest × committed approvals × on-disk inventory. Per pack, * per ref, two orthogonal axes (approval, install) plus coded findings for * `validate`. No spawns, no git, no writes — reused by both commands. */ export declare function packStatus(ctx: PlanContext, packName?: string): PackStatusReport; export declare const packStatusCommand: CommandSpec; export declare const packValidateCommand: CommandSpec;