/** * @fileoverview Uninstall target collection + display formatting. * * Extracted from `commands/uninstall.ts` so the executor there stays * focused on the user/project mode dispatch and removal flow. Owns: * * - The `Target` / `TargetBucket` types * - `collectTargets` (user mode + project mode bucketing) * - The pre-prompt print helpers (`printUserModeTargets`, * `printProjectDefault`, `printProjectPurge`) and supporting * formatters (`formatBytes`, `formatKeepLine`). */ /** * Bucket classification per target: * - 'runtime' — opensip-cli/.runtime/. Rebuildable. Removed by default. * - 'active-cache' — generation-bound user-cache entry. Removed by default. * - 'legacy-cache' — pre-v2 / path-only cache entry. Removed by default. * - 'user-content' — anything else under opensip-cli/. User-authored. * Preserved unless --purge. * - 'config' — opensip-cli.config.yml. Preserved unless --purge. * - 'user-level' — ~/.opensip-cli/ in user mode. */ export type TargetBucket = 'runtime' | 'active-cache' | 'legacy-cache' | 'user-content' | 'config' | 'user-level'; /** Discrete target to remove (a file or a directory). */ export interface Target { readonly path: string; readonly kind: 'file' | 'dir'; readonly sizeBytes: number; readonly bucket: TargetBucket; /** For user-content children: human label (e.g. 'fit/checks', 'notes'). */ readonly displayLabel?: string; /** For user-content child directories: count of files inside (recursive). */ readonly fileCount?: number; } export type UninstallMode = 'user' | 'project'; /** * Build the bucketed list of targets that currently exist for the given mode. * * Project mode: * - .runtime/ → bucket 'runtime' * - active user-cache generation → bucket 'active-cache' * - legacy user-cache (if present) → bucket 'legacy-cache' * - everything else under opensip-cli/ (per top-level entry) * → bucket 'user-content' (one entry each) * - opensip-cli.config.yml → bucket 'config' * * Cache candidates come from `inspectEphemeralRuntimeCandidates` — never from * marker `projectDir` fields. The user-content invariant is "everything under * opensip-cli/ minus .runtime/" — NOT an enumeration of known subdirs. */ export declare function collectTargets(mode: UninstallMode, userRoot: string, projectDir: string): Target[]; export declare function printUserModeTargets(write: (s: string) => void, targets: readonly Target[]): void; export declare function printProjectDefault(write: (s: string) => void, toDelete: readonly Target[], toKeep: readonly Target[], projectRoot: string): void; export declare function printProjectPurge(write: (s: string) => void, toDelete: readonly Target[], projectRoot: string): void; //# sourceMappingURL=targets.d.ts.map