Adds runSelfUpdate({ packageName, currentVersion, header?, registry?, check? })
so any npm-distributed consuming CLI can offer an update/install-latest command
without re-implementing the registry query, version compare, and global install.
No oclif dependency -- callable from a plain dispatcher (e.g. quoin) as readily
as from a BaseCommand. Renders via ix-ui-cli and returns { updated, latest }.
Registry defaults to the ambient npm config (mirrors however the caller was
installed); a registry override is applied as the scope-specific
--<scope>:registry= flag for scoped packages, because a plain --registry is
silently ignored for a scoped package when an npmrc pins a @scope:registry.
Adds FR-023 + tests.md traceability.
Co-authored-by: Agent IX <agent@agent-ix.dev>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>