import { type Action } from "../../../internals/plan.js"; import type { BindingLockForRemoval, BindingOwnershipEntry } from "../../lock.js"; /** * Conservative D18 removal for the Claude project-scope host. For each owned entry * in the lock it re-reads the CURRENT state and decides: * - the slot still equals the applied value → schedule a targeted removal * (restore the pre-existing value, or prune the AIH-added key / strip the fence * / delete the file); * - the slot drifted (user-modified) → PRESERVE it and report the drift; * - the slot is already gone → no-op (idempotent). * * Unrelated content is untouched by construction: shared JSON files are merge- * written with targeted key prunes/restores (a whole shared JSON file is NEVER * replaced), and the CLAUDE.md fence is stripped in place. Plan/apply stay separate * (D14) — this returns Actions; the caller runs `executePlan`. */ /** A drifted owned entry: preserved, never silently deleted, and reported. */ export interface ClaudeDriftEntry { kind: BindingOwnershipEntry["kind"]; target: string; reason: string; } export interface ClaudeRemovalPlan { actions: Action[]; drift: ClaudeDriftEntry[]; } /** * The pure, READ-ONLY D18 settings-drift half of {@link planClaudeRemoval} (W7 * §B.7). Returns the owned entries whose live value diverged from the applied * value since bind — the ones conservative removal PRESERVES rather than deletes — * in lock-ownership order. `planClaudeRemoval` CALLS this for its `drift`, so the * removal planner and the doctor's read-only settings-drift probe cannot disagree. */ type RemovalLock = Pick; export declare function readClaudeSettingsDrift(root: string, lock: RemovalLock): ClaudeDriftEntry[]; export declare function planClaudeRemoval(root: string, lock: RemovalLock): ClaudeRemovalPlan; export {};