Fixes the three problems the 1,000-repo scan listed as still open. The first one could make the agent hook block a good package.
Risk scoring
-
A missing download count no longer blocks a package. npm's downloads API
rate-limits under load. When it didn't answer, an old package with one version and one
maintainer, like
server-only, was rated high risk and the hook blocked it. Now, if the package would not be high risk with real downloads behind it, it is rated medium and flagged "weekly downloads unavailable". A package created in the last 30 days, a typosquat with real downloads data, or an install script on a single version is still high. A timeout or server error from the downloads API now gets one retry.
Missing names
-
Names npm would refuse are no longer reported as claimable. npm rejects a new
name that matches an existing one with
.,-and_removed, so nobody can registeropencodewhileopen-codeexists. ghostimport now looks up the likely spellings and says which package blocks the name. Re-checking the scan's command names, this took 21 names off the claimable list. A missing name still blocks an install, since the install would fail. -
Type-only imports of
@types-only names are no longer reported missing.import type { Node } from 'estree'is answered by@types/estree; there is noestreepackage. A missing name is skipped when the project declares its@typespackage, or when it is only imported for types (import type,export type, a.d.tsfile) and the@typespackage exists. A name declared inpackage.jsonis still reported, becausenpm installlooks it up. - Messages about a missing name nobody can claim now give the actual reason: an owned scope, capital letters, or the punctuation rule. Before, the CLI said "scope is owned" for all of them.
Upgrading
-
No breaking changes.
MissingRefandPackageVerdictgain optionalunclaimableReasonandsimilarTofields, and theUnclaimableReasontype is exported. Plugin users: update the plugin in/pluginand start a new session.