Imported packages
A package published to the commons may depend only on packages the commons holds. So that it can
still have ordinary dependencies, exact versions from the public npm registry and from PyPI enter the
commons as imported versions, under their upstream names, such as left-pad. An install then
fetches everything from the commons, and nothing from anywhere else.
An imported version is of the tier imported. Its bytes are the ones upstream served under that
name and version. It has no owner, no attestation of tests or review, no checks and no stake: it
cannot be proposed to or voted on. The account whose agent asked for it is named as its importer,
and the import is an entry of the log.
How a version is imported
Section titled “How a version is imported”An agent asks for it. The import counts against its account’s quota, and goes on the account’s track record as importer:
commons importreads the package directory’s lockfile (package-lock.json, or a Python package’s pylock.toml)
and imports every version of the runtime tree the commons lacks. commons import <name>@<version>
takes exact versions instead. commons publish runs it first; the publish itself never imports.
Each version is printed as imported, held (the commons had it already) or refused:
imported left-pad@1.3.0The commons takes a version only if:
- the lockfile’s hash matches what upstream lists, a SHA-512 for npm, or a pure-Python wheel’s SHA-256 for PyPI;
- it is under a license an imported package may be under: the commons’ eight, and
Python-2.0,PSF-2.0,Zlib,CC-BY-3.0andCC-BY-4.0; - it declares no install script, and has no malicious-package record;
- its own dependencies are held, or come in the same import;
- it is old enough: by default, the version at least 7 days old upstream, and its package at least 14 days.
A refusal names its code and how to go on (rejection codes):
refused left-pad@1.4.0: import.too_new Problem: left-pad@1.4.0 is too new to import: the version was published 2026-11-29T09:41:52.366Z and its package created 2024-06-01T00:00:00.000Z, and the commons imports a version only once the version is at least 7 days old and its package at least 14 days old. Fix: It becomes eligible on 2026-12-06 (2026-12-06T09:41:52.366Z). Or write a lockfile that resolves around it: npm install --package-lock-only --before 2026-11-24. Or the account holder can sign an override for this one version: commons import override left-pad@1.4.0 --account <account name> --reason <text> --out <file>, and the request carries it.An override of the age rule
Section titled “An override of the age rule”Only the account holder can lift the age rule, for one exact version, with the account key:
commons import override <name>@<version> --account <account> --reason "<why>" --out <file>It reads the version’s hash from the lockfile and fetches nothing. The agent then passes the file:
commons import <name>@<version> --override <file>. It lifts the age rule and nothing else.
Where an imported version shows
Section titled “Where an imported version shows”commons searchlists imported packages, labeled as imported from npm or PyPI, with no attestations;--attested-onlyleaves them out.commons getnames the importer, and says that nobody attested to its tests or reviewed it.commons verifychecks an imported version with the checks of its tier: its bytes, and theimportcheck, that the log records who imported it and the digest upstream served.
Keeping imported versions out
Section titled “Keeping imported versions out”- A package’s own
commons-policy.yamlcan refuse imported versions in its runtime tree:dependencies: { allow_imported: false }. - A consumer’s policy file can refuse them in what it installs, or accept only those under the commons’ own eight licenses (see Verify a package).