PluginManager.upgrade copied the new version's claude-flow hooks and
commands straight into the manifest, so hooks withheld at install were
registered on upgrade, and an upgrade to a version declaring elevated
permissions was never gated. It also kept running npm lifecycle scripts
for any install recorded with scriptsRun:true (including legacy entries),
even though that flag can come from unverified registry vouching.
- Re-run applyTrustPolicy on the upgraded package.json; record trust,
permissions, withheld hooks/commands and verification like install does.
- Install the new version with --ignore-scripts unless --trust is passed for
this upgrade; the original install's trust is not carried over.
- `plugins upgrade` gains --verify/--no-verify and --trust, and reports
skipped scripts and withheld hooks.