import { type Action, type CommandSpec, type PlanContext } from "../internals/plan.js"; import { type SkillInventoryRow } from "./inventory.js"; import { type SkillsLock } from "./lockfile.js"; /** * The OTHER discovered skills whose directories live INSIDE `row`'s directory — the * collateral set a whole-subtree move would take along. Shared by `skill remove` and * `skill quarantine`, whose engines both move the directory atomically. */ export declare function nestedChildSkills(skills: readonly SkillInventoryRow[], row: SkillInventoryRow): SkillInventoryRow[]; /** * Manual-review advisory lines for loader files that EXIST and mention the skill * `name` — mirrors prune's `advisoryLines` disposition (aih can't tell its own entry * from the user's, so it refuses to edit and only reports). Pure fs (read-only). * Shared with `skill quarantine` (a disabled skill's loader refs deserve the same * manual-review surfacing). */ export declare function loaderAdvisories(ctx: PlanContext, name: string): string[]; /** The shared advisory tail for the remove/orphan/quarantine digest variants. */ export declare function advisoryTail(advisories: string[]): string[]; /** * The summary one member's removal produces — every digest input, minus the digest * itself, so `skill remove` renders its per-command digest and `pack uninstall` * renders one per-member row from the same facts. */ export type SkillRemovalSummary = { kind: "installed"; name: string; status: SkillInventoryRow["status"]; root: string; /** Repo-relative POSIX dir the remove action targets. */ from: string; hardDelete: boolean; droppedApproval: boolean; cardRemoved: boolean; advisories: string[]; } | { kind: "orphaned-approval"; name: string; cardRemoved: boolean; advisories: string[]; }; export interface SkillRemoval { /** The engine actions (dir move, lockfile rewrite, card removal) — digest-free. */ actions: Action[]; summary: SkillRemovalSummary; /** The lock AFTER this removal — thread it into the next member's removal so a * composed plan's sequential lockfile writes accumulate instead of resurrecting * an earlier member's dropped entry. */ lock: SkillsLock; } /** * ONE skill's guarded removal: {@link resolveTarget}'s fail-closed guards, then the * engine actions `skillRemovePlan` has always emitted — the atomic dir move (or an * orphaned approval's no-move variant), the lockfile drop, the committed-card * removal — plus the summary the caller's digest is built from. `lock` is the * working lockfile state (defaults to the on-disk read); composed callers thread * each member's returned `lock` into the next call. */ export declare function skillRemovalActions(ctx: PlanContext, name: string, hardDelete: boolean, lock?: SkillsLock): SkillRemoval; export declare const skillRemoveCommand: CommandSpec;