mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-16 00:21:55 +02:00
Two problems found in review, both from deleting without checking what we actually wrote: `agent remove` called remove_dir_all on the whole tree, discarding files the user had edited or added. Install goes out of its way to preserve those, so uninstall throwing them away was inconsistent and lossy. It now deletes only tracked files whose contents still match the manifest, prunes empty directories, and reports anything it kept. `agent install` never reconciled against the previous manifest, so a file an older CLI shipped but a newer one drops would linger and could feed an agent stale guidance. Unshipped files are now removed when unmodified, and left alone (and untracked) when the user has edited them.