Aller au contenu
login
arrow_backRetour aux issues
rlaope/oh-my-hermes #1068

Profile-aware uninstall: omh uninstall leaves OMH registered in bot-profile homes

ecoDébutant help wanted area/setup

descriptionDescription

**Contributions welcome — separable safety design with a clear pattern to follow.** ## Context PR #1067 made `omh setup`/`omh update` register OMH into every Hermes bot profile (`~/.hermes/profiles/`, each an independent Hermes home). The reverse is deliberately not symmetric yet: `omh uninstall` targets only the primary home, so after a full uninstall the bot profiles keep their `plugins/omh` directories and their `skills.external_dirs` rows pointing at a removed `~/.omh/skills` (harmless at runtime, but stale). ## Why it was split out Per-profile plugin removal must go through the same manifest-checked removal discipline `uninstall_skill_pack` applies to the primary (`src/install/installer.py`, `managed_plugin=True` targets) — a bare `shutil.rmtree` on a profile's plugin dir would bypass the drift checks that make uninstall refuse to delete files OMH did not put there. ## Task - Add a per-profile pass to `cmd_uninstall` (`src/commands/setup.py`): for each dir from `_hermes_profile_dirs`, unregister the config (`remove_external_dir`), and for `remove_all` scopes also remove the profile's widget/skin/plugin artifacts through the manifest-checked helpers — never a raw rmtree. - Respect `--registration-only` and `--dry-run` per profile, mirroring the sync statuses. - Contract tests next to `HermesProfileSyncTests` in `tests/test_plugin_distribution.py`: full uninstall clears profile registration + artifacts; registration-only leaves plugin dirs (which the sync guard then treats as deliberate opt-out — assert that round-trip). - Update the INSTALLATION **Bot Profiles** section. ## Acceptance - Full suite + docs byte gates green; uninstall refuses drifted files per profile exactly as it does for the primary.
codeOuvre sur GitHub