# Sources

> Where Count Patchula looks up versions: npm, crates.io, the Go proxy, PyPI, container registries, Helm, Terraform, Maven and more.

A source is where versions come from. Each dependency has one, chosen by its manager, and rules can select by it.

| Source | Package identity | Where versions come from |
| - | - | - |
| `npm` | package name | the npm registry, full metadata for publication times, dist-tags and deprecations |
| `crates` | crate name | the crates.io sparse index, with publication times; yanked releases are skipped |
| `go` | module path | the Go module proxy (`@v/list`, and `.info` once for each version it has not dated yet) |
| `pypi` | normalised name | the PyPI JSON API, falling back to the PEP 691 simple API |
| `docker` | image | registry v2 tags and manifests on Docker Hub, GHCR and other registries |
| `oci` | `registry/chart` | OCI registry tags for Helm charts |
| `helm` | `https://repo\|chart` | the repository’s `index.yaml` |
| `terraform` | `namespace/provider` or `namespace/module/system` | the public Terraform registry |
| `github-releases`, `github-tags` | `owner/repo` | GitHub, through mise-versions when it can |
| `github-runners` | runner family | a catalog of GitHub-hosted runner labels |
| `forge-tags` | `host/path` | GitLab and Gitea/Forgejo tags, for pre-commit hooks and GitLab CI includes and components |
| `mise` | tool name, as written in `mise.toml` | `mise ls-remote --json`, run by the Count’s pinned mise ([mise lookups](#mise-lookups)) |
| `maven` | `group:artifact` | `maven-metadata.xml` on Maven Central, Google Maven or the Gradle plugin portal; each POM’s `Last-Modified`, read once per version, dates it |
| `nuget` | package ID | the nuget.org flat container and every registration page, for dates and unlisted and deprecated flags |
| `rubygems` | gem name | the RubyGems versions API |
| `packagist` | `vendor/name` | Packagist’s p2 metadata |

## Fetching less

Every response is stored with its validators, and every repeat request is conditional. Unauthenticated registries honour their declared `max-age`. Go proxy lists and validator-free OCI tag pages get a one-hour local freshness floor (`http.goFreshnessSecs` and `http.registryFreshnessSecs` in the [settings](https://count-patchula.sweepy.dev/reference/settings/); `0` restores upstream behaviour), because those endpoints would otherwise be read on every run. OSV advisory listings get the same: `http.advisoryFreshnessSecs` (one hour by default) keeps a version’s listed advisories local, so only stale or missing queries are posted. A new advisory for a version already in use can go unseen until the listing expires; `0` asks OSV on every run.

GitHub histories are read in pieces:

- A cold release history is fetched through batched GraphQL queries, sixteen sources at a time.
- A warm one starts with a conditional REST read of the newest releases. Only the fields that matter (tag, date, draft, prerelease) feed the fingerprint, so a download counter changing does not trigger a refetch.
- When the head did change, history is read newest first and merged into the cache until a known release turns up.
- Tags use one conditional read of the matching refs, then hydrate only new or moved tags.

A history-head check cannot see a release deleted or edited behind an unchanged head. Webhook invalidation or periodic reconciliation covers that.

## mise lookups

A `mise` dependency’s versions are what `mise ls-remote --json --prerelease <tool>` prints, so every backend mise reads release metadata from works, and the Count keeps no copy of mise’s registry or backend rules. mise lists a version, its date, whether it is a prerelease and, for GitHub-hosted tools, a release URL. Backends leave out what they do not know: Node lists a date only, and some `go:` versions have no date and so no release-age wait. Prereleases are listed, and the Count’s [prerelease rules](https://count-patchula.sweepy.dev/guide/lookup-policy/) decide whether to offer them. A version mise marks `prerelease`, such as a GitHub release flagged as one, counts as a prerelease even when it looks stable, just as it does for `github-releases`.

The Count runs mise the way he runs the lockfile tools, and more strictly:

- With his own pinned mise from the [tool store](https://count-patchula.sweepy.dev/guide/lockfiles/#the-tool-store), not yours.
- From a new, empty directory for each lookup, with a scratch `HOME` and nothing inherited from the Count’s environment. mise loads no configuration (`MISE_NO_CONFIG`), env templates (`MISE_NO_ENV`) or hooks (`MISE_NO_HOOKS`), so neither your global configuration nor a repository’s `mise.toml` can apply.
- With the tool’s options passed on as mise reads them, in brackets on the tool argument: the options in its table, sorted and written one way, or the brackets on its name as written (an entry with both is refused). mise applies them as it does when it installs; nothing installs, so options that only matter then never run. mise does not merge a tool’s options across configuration files (the highest-precedence file’s entry replaces the others whole), so each entry goes with its own. Every version in an array goes with the first one’s options, as mise lists the tool with them. A task’s tool is refused when it or the tool’s `[tools]` entry has options in a table, since mise layers the two by version in a way the Count does not reproduce; brackets on a task tool’s name are part of the tool and pass.
- With tool names and options validated first: no leading `-` in the name or in any option key or string value, no `@` outside an npm scope, no `@version` selector, length limits, and options only in the Count’s own form (`key="value"` pairs joined by `,`) or mise’s plain `key=value` one, whose values must not read as numbers, booleans or dates.
- With options that point mise at any host followed, apart from cloud instance-metadata endpoints: a URL whose host is, or resolves to, a link-local address (169.254.0.0/16, fe80::/10), AWS’s `fd00:ec2::254`, `metadata.google.internal` or `metadata` is refused, since those hand out the credentials of the machine the Count runs on and the answer would become versions in a pull request. A host that does not resolve is refused too. mise resolves the name again and follows redirects, so a host that changes its answer or redirects there is not caught; block the metadata endpoint in the network where that matters.
- With no AWS credentials for mise’s s3 backend: no `AWS_*` variable is inherited, its config and credential files are in the scratch home, and `AWS_EC2_METADATA_DISABLED` stops it fetching the machine’s own.
- With the backends `asdf` and `vfox` disabled (`MISE_DISABLE_BACKENDS`), and names for them refused before mise starts. A backend prefix mise does not know fails in mise, which runs no plugin for it. Nothing installs during a lookup (`MISE_AUTO_INSTALL=0`).
- With a GitHub token as `MISE_GITHUB_TOKEN`, only when he talks to github.com, and no other credential: mise’s `gh` login, credential command and Git credential helper lookups are off. As a GitHub App (`patchula serve`, `--all-repos` with App credentials, or an Action run on several repositories) the token is a read-only one he mints for the repository the lookup is for, so a repository’s `mise.toml` sees only that repository and public tools, never another private repository the App can read. Release notes for a mise tool look it up the same way. With a personal token, or the token of an Action run on its own repository, mise gets that token. A tool’s options can send mise elsewhere (`api_url` for a GitHub Enterprise server, say), and the token goes with them, as it does when mise installs the tool: it is the token of a repository whose own entry wrote those options, never another’s.
- With a three-minute limit per lookup and at most four running at once.

What happens to a listing:

- It is cached for an hour, per tool, options, mirror setting and who may see it. A tool released from another repository, or from a package registry, lists public data, which every repository shares. A tool released from the repository itself, or one whose source the Count cannot tell (a `go:` or `http:` tool, or any tool with options) in a private repository, is listed for that repository alone. A listing made without a token is public. A manual retry, or a failed lookup, asks mise again.
- The Node LTS line comes from `mise ls-remote node lts`. When that listing fails or is empty, the catalog stays whole without LTS evidence, so only a dependency on the LTS channel reports it.
- A tool installed from a Git ref (`cargo:` with a Git URL) lists only `HEAD`, which the Count reports as having no release versions.
- Any other listing is kept. Versions that do not order are never proposed, and a pin that does not order is reported as one the Count cannot classify.
- Where there is no release URL, release notes find a tool’s repository from the backend mise picks for it when that is npm, PyPI or crates.io. A tool whose listing and backend name no repository has no release notes.

### Package backends and the project’s settings

The sandbox lists versions without the project’s configuration, but mise installs a tool with it. A tool whose backend installs from a package registry (`npm`, `pypi` and `pipx`, `cargo`, `gem`, `dotnet`, explicitly or through mise’s registry, as `aws-cdk` is `npm:aws-cdk`) fails its lookup where committed settings could send it elsewhere: registry variables in a mise configuration’s `[env]` (`NPM_CONFIG_*`, `PIP_*`, `UV_*`, `CARGO_*` and the like, or variables loaded from files through `_.file` or `_.source`), or the project’s own `.npmrc` or `.yarnrc.yml` mentioning a registry, any `pip.conf` or `pip.ini`, Python index settings, Cargo registry settings, or NuGet feeds other than nuget.org’s, in the tool’s folder, above it or below it. Every tool fails its lookup where a mise configuration there holds anything but `tools`, `tasks`, `task_config`, `vars`, `env`, `settings`, `min_version`, `redactions` and `wrappers`, sets a `MISE_*` variable, or sets anything but a few plain settings such as `experimental` and `lockfile`; where a `.miserc.toml`, `.miserc.local.toml` or `.config/miserc.toml` exists; or where the Count cannot read the configuration. Options on the tool’s own entry do not fail it: they go to mise with the lookup.

A mise configuration is a file under a name mise reads one by, and no other: `mise.toml`, `.mise.toml` and `.config/mise.toml`; `config.toml` in a `mise/`, `.mise/` or `.config/mise/` folder; `.config/mise/mise.toml`; any TOML file directly in one of those folders’ `conf.d/` that is not hidden; and `mise.toml` in a folder inside `conf.d/`. Each counts with its `.local`, environment and environment `.local` variants (`mise.local.toml`, `mise/config.prod.toml`, `.mise.ci.local.toml`). Other TOML files in those folders, such as the `Cargo.toml` of a crate in `crates/mise/`, are not configuration.

## mise-versions host

By default (`useVersionsHost = true`), public GitHub repositories that appear in mise’s registry are read from the public [mise-versions](https://mise-versions.jdx.dev) mirror instead of the GitHub API: `releases.json` and `tags.json`, validated by ETag. The mirror dates a tag only by its release, so when a `github-tags` lookup finds a tag without one, which may be an annotated tag with a tagger date, that repository’s tags are read from GitHub instead. Repositories outside the registry, including private ones, go straight to GitHub. If the mirror fails with a transport error, 429 or 5xx, the Count falls back to GitHub; a 403, 404 or empty list does not, and a truncated list is reported as an incomplete lookup. mise tools do not use this path: mise reads the mirror itself, and `useVersionsHost = false` turns that off too (`MISE_USE_VERSIONS_HOST=0`). Set it to read everything upstream.

## Registries and limits

Docker Hub, GHCR and GitLab registries use anonymous registry tokens, cached until shortly before they expire. A token comes from the registry’s own origin, except Docker Hub’s from `auth.docker.io/token`, and a GitLab registry’s (`registry.gitlab.com`, or `registry.<instance>` when self-hosted) from its GitLab instance’s `/jwt/auth`, including a self-hosted registry on a port of the instance (`gitlab.example.com:5050`). A token service anywhere else is refused before any request reaches it. That includes a token service on another port of the registry’s host, such as `registry:2` with cesanta/docker_auth on `:5001`, which therefore does not work. Authenticated pulls, Docker Hub’s included, use a [private registry](#private-registries) entry. When Docker Hub’s `ratelimit-remaining` hits zero, queued reads stop. A 429 shares a cooldown across the host and retries at most three times, honouring `Retry-After`. If the wait is too long, the last cached response is used and marked stale in the report; a cold miss is still an error.

Redirects are followed up to five times, HTTPS only, with credentials stripped when the origin changes.

## Private registries

The operator [settings](https://count-patchula.sweepy.dev/reference/settings/) hold credentials for private registries, keyed by an https URL prefix. Repository configs never name credentials: a `patchula.pkl` can point a dependency at any URL, so in the server it could otherwise read another organisation’s registry. As hygiene, a repository that commits a credential anyway is refused outright: the repository’s report is an error and nothing runs for it. Move the credential to the operator’s `registries` settings; `${VAR}`-style environment references and `$()` command substitutions stay allowed, since the secret lives outside the file.

The refusal is hygiene, not a security boundary — only the settings a tool or a registry lookup reads as a credential are checked, with each format’s parser so escapes cannot hide one: `_authToken`, `_auth` and `_password` keys in `.npmrc` or `pnpm-workspace.yaml` with literal values; `npmAuthToken` and `npmAuthIdent` in `.yarnrc.yml`; Composer `config` auth keys (`http-basic`, `bearer`, `github-oauth`, `gitlab-oauth`, `gitlab-token`, `bitbucket-oauth`, `forgejo-oauth`/`forgejo-token`, `gitea-oauth`/`gitea-token`); `Password` and `ClearTextPassword` in a `nuget.config` `packageSourceCredentials` (`%VAR%` references allowed); Poetry `http-basic` and `pypi-token` literals in `poetry.toml` or `pyproject.toml`; a Cargo registry `token` in `.cargo/config*`; and a URL carrying a user **and** password in a field that names a registry, index or source URL — `.npmrc` `registry`/`@scope:registry`, `.yarnrc.yml` `npmRegistryServer`, pyproject/uv/poetry index and source URLs, Composer `repositories[].url`, `nuget.config` `packageSources`, pip index URLs, Gemfile `source` lines, and Cargo registry `index` values.

Everything else is left alone: a database DSN in a test script, a user-only userinfo like `https://user@bitbucket.org`, `.bundle/config` `BUNDLE_*` keys (no tool of the Count’s reads them), empty values, lockfile `resolved` URLs and CI workflows — none of those is a credential a tool reads, so none refuses a repository.

```pkl
amends "PatchulaSettings.pkl"

registries {
  ["https://acme.jfrog.io/artifactory/api/helm/charts"] {
    auth = "bearer"
    secret { env = "ARTIFACTORY_TOKEN" }
  }
  ["https://acme.jfrog.io"] {
    auth = "basic"
    username = "ci-bot"
    secret { file = "/run/secrets/artifactory" }
  }
  ["https://registry-1.docker.io"] {
    auth = "basic"
    username = "acme"
    secret { env = "DOCKERHUB_TOKEN" }
  }
}
```

- A request whose URL is under a prefix, matched by whole path segments on the same origin, carries that entry’s credentials. The longest prefix wins.
- `bearer` sends the secret as a bearer token. `basic` sends the username and the secret to the URLs under the prefix, including a container registry’s first request. When a registry with an entry answers with a token service instead, the Count exchanges credentials there for a pull token: the registry’s own at a token service on its origin, Docker Hub’s `auth.docker.io`, or `gitlab.com` for `registry.gitlab.com`, and otherwise only a token service’s own entry. A self-hosted GitLab registry needs entries for both the registry and its GitLab’s `/jwt/auth`. A registry without an entry only ever gets anonymous tokens. Tokens issued to an account stay in memory, and within the entry’s prefix.
- A secret comes from an environment variable or a file, never the settings file. The server reads secrets again for every batch, so a rotated secret applies without a restart; one it cannot read is logged, and requests under that prefix carry no credentials, not even a broader entry’s. The CLI stops with a usage error instead.
- Responses read with credentials are cached under their entry and a one-way digest of its credentials, so a read without that entry, or after the secret or account changes, never sees them.
- In the server, an entry’s `allowedInstallations` limits which installations use it. For any other installation, requests under its prefix carry no credentials.
- A redirect carries credentials only to a URL an entry covers, and only from a request that sent some: a request without credentials never gains any on a redirect. A token issued under an entry stays within that entry’s prefix.

A dependency’s source decides where its versions come from. Helm repositories, OCI and Docker registries, Maven repositories and GitLab, Gitea or Forgejo tags carry their URL, so a private one works with an entry. npm and Python dependencies can name their own [package registry](#package-registries). The other package registries still read their public registry, or its mirror. Lockfile tools get registry credentials only from entries that set `tools = true`; see [lockfiles](https://count-patchula.sweepy.dev/guide/lockfiles/#private-registries-in-lockfile-tools) for the forms each tool takes and what that exposes.

### Package registries

A dependency can come from a registry of its own instead of its source’s public one. The repository says which, and the report shows it as the dependency’s `registry`:

- npm reads `.npmrc` files at or above each `package.json`: `@scope:registry=` for a scope, else `registry=` for every package, each from the nearest file that sets it. Yarn Berry’s `npmRegistryServer` in `.yarnrc.yml`, at the top level and under `npmScopes`, works the same and wins over `.npmrc` in the same directory. A file that names no registry does not hide one further up. Packages only a lockfile records get the same registry as a declared one would. `packageManager` stays on the public registry, since Corepack does not read `.npmrc`.

- Ruby gems come from what `Gemfile.lock` records and what the Gemfile says. A Gemfile is Ruby, so the Count reads it only when every line is a plain `source`, `gem`, `group`, `platforms`, `gemspec`, `ruby` or `end` with literal values. Then each gem comes from its `source:` option, else the `source` block around it, else the one top-level `source`, and where `Gemfile.lock` records the gem too, the two must agree. A Gemfile with any other line, such as a condition, a `git_source`, an `eval_gemfile` or a `gem` continued onto a second line, or with several top-level sources, leaves it to the `remote:` the lock records. A gem neither settles fails its lookup, saying it could come from several sources: commit `Gemfile.lock`. A project `.bundle/config` with a setting that could move gems, such as a mirror or `BUNDLE_GEMFILE`, fails every lookup. Gems from git, a path or GitHub are listed as skipped. Private gem sources are not read yet, so their gems’ lookups fail rather than read RubyGems.

- PHP packages come from what `composer.lock` records. Composer marks a package from a Composer registry with the registry’s `notification-url`, Packagist’s being `https://packagist.org/downloads/`; a package with another registry’s mark fails its lookup, since private Composer repositories are not read yet. Packages from a `path`, VCS, inline `package` or artifact repository are listed as skipped. A package the lock does not record comes from Packagist only when `composer.json` configures no other repository, leaves Packagist on without filters such as `exclude`, and uses no merge plugin, and the lock holds no Composer plugin, since plugins can add repositories; otherwise its lookup fails: commit `composer.lock`. With `config.lock` set to false, Composer and the Count ignore the lock. A `composer.json` with comments, which Composer does not read, or a lock the Count cannot read, fails every lookup.

- NuGet packages come from nuget.org only when NuGet could not take them from anywhere else. `packages.lock.json` does not record a package’s source, and with several sources NuGet takes a package from whichever answers, so the `nuget.config` files from the project’s folder up to the repository root decide. Every source they add counts, even one a closer config clears or disables, along with the nuget.org source NuGet adds by default. With nuget.org alone, every package comes from it. With another source, `packageSourceMapping` must say which source serves each package, from one config alone: its most specific pattern (an exact ID, else the longest prefix) decides. Mappings in several configs, which NuGet merges in ways the Count does not follow, fail every lookup. A package mapped to nuget.org alone comes from there; any other fails its lookup, since private NuGet feeds are not read yet. A `dotnet-tools.json` manifest counts every folder below it with a config of its own, and a shared MSBuild file such as `Directory.Packages.props`, which can be imported from anywhere, counts every folder with one. Anything NuGet could read differently fails every lookup it could affect: a config the Count cannot read, with a section it does not know such as `fallbackPackageFolders`, with `remove`, or with a pattern other than an ID or a prefix ending in its only `*`; a config spelled other than `nuget.config`, `NuGet.config` or `NuGet.Config`; a source or mapping key with spaces around it or outside ASCII; and an MSBuild file that sets `RestoreSources`, `RestoreAdditionalProjectSources`, `RestoreConfigFile`, `RestoreFallbackFolders`, `RestoreRootConfigDirectory` or `RestoreSolutionDirectory`, or that the Count cannot read.

- Crates come from crates.io unless a dependency names another registry, since Cargo never looks a crate up anywhere else; one from an alternate registry, git or a path is listed as skipped. A `.cargo/config.toml` or `.cargo/config` in the crate’s folder or above that replaces crates.io with another source fails its crates.io lookups, since `Cargo.lock` records crates.io for a replaced crate all the same; a vendored `directory` source, as `cargo vendor` sets up, keeps crates.io’s crates and is fine. Cargo reads configuration from wherever it runs, so one anywhere in the crate’s workspace counts. A configuration the Count cannot read, or one that includes others, fails them too, and so does a `[patch]` or `[replace]` entry taking a crate from another registry, in the crate’s manifest, any manifest above it or an applying configuration, since it can stand for any crate under any name Cargo takes for it.

- Go modules are looked up on `proxy.golang.org`. A module path names the place its code is served from, so the proxy cannot serve someone else’s code under a private path; which paths are private is `GOPRIVATE` in the environment, which no committed file sets, so a private module’s path does reach the proxy in its lookup. Modules a `replace` directive names are skipped; see [Go](https://count-patchula.sweepy.dev/guide/managers/).

- Maven and Gradle artifacts come from Maven Central (or Google’s Maven repository for Android groups, and the Gradle Plugin Portal for plugins) only when no build file in the repository could take them from anywhere else. Neither tool records which repository served an artifact, and both try repositories in order, so the Count does not work out which one an artifact comes from: any other repository anywhere fails every lookup of that build system, since private Maven repositories are not read yet. For Maven, that is a `repository`, `pluginRepository` or `mirror` other than Central’s or Google’s in any POM or profile (including POMs a `<module>`, a parent’s `<relativePath>` or `.mvn/maven.config` names), or in any file named `*settings.xml` in the repository or named by `.mvn/maven.config`; one in `distributionManagement` does not count. For Gradle, the Count reads every script, the sources in `buildSrc`, `build-logic`, `build-conventions` and `gradle/plugins`, and everything the settings include and the scripts apply. `mavenCentral()`, `google()`, `gradlePluginPortal()` and `jcenter()` are fine, without a body, while `maven`, `ivy`, `flatDir`, `mavenLocal`, `exclusiveContent` or a custom `ArtifactRepository` outside a `publishing` block fails every lookup — the Count does not weigh `content` filters or `exclusiveContent`, so even a repository bounded to named groups fails them all — as do `repositories.all` and `repositories.add`, build logic the Count cannot read, an `includeBuild` outside the settings or with a computed name, and an `apply from` other than a plain path, `file(…)`, `rootProject.file(…)`, or a path under `$rootDir` or `$projectDir`. A build whose lookups fail says so once, in a warning naming the file and, where the Count reads it, the repository’s address, rather than once per dependency. Repositories that a Gradle plugin, a Maven build extension, an init script or a CI machine’s own settings add are not in the repository’s files, so the Count does not see them; Maven Central and the Gradle Plugin Portal check who owns a group or plugin ID, which keeps someone else from publishing your coordinates there.

- Python packages come from what the project’s lockfile records. The Count does not work out which index uv or Poetry would pick from their settings; the tool already did, and wrote it down:

  - `uv.lock` records each package’s index; uv reads the one at its workspace root (the nearest whose `members` name the project and whose `exclude` leaves it in), or the project’s own outside a workspace.
  - `poetry.lock` records each package’s source, and nothing for PyPI.
  - A lock above the project that belongs to another one does not count, nor does a workspace member’s own `uv.lock`. A package whose entries disagree, within one lockfile or between `uv.lock` and `poetry.lock`, is ambiguous.

  A package no lockfile records is PyPI’s only when the project configures no index at all: no index, `index-url`, `extra-index-url`, `find-links`, `no-index` or `torch-backend` in any `uv.toml` or `[tool.uv]` (its `[pip]` table included) at or above it, no index pins in `[tool.uv.sources]`, no override naming a URL, and no Poetry source or dependency pinned to one. Otherwise its lookup fails, saying it could come from several registries: commit a lockfile that records it. That is how a public package could otherwise stand in for a private one of the same name.

  A lockfile can be stale, recording PyPI for a package the project now takes from a private index. The update itself then runs the real `uv lock` or `poetry lock` with the project’s settings, which resolves from the index the tool actually uses, so it never installs the public package in its place.

  A package from git, a path, a URL or a workspace member, by `[tool.uv.sources]`, a Poetry dependency, a `name @ url` requirement or the lockfile, is not looked up at all: its name on PyPI may be someone else’s. It is reported as skipped instead.

  Everything the Count cannot read fails closed, for every package, locked or not. Every setting uv accepts is either one that configures an index or known not to, and every key a Poetry source or dependency may have is known; tests check both lists against uv and Poetry themselves. A key the Count does not know, a section that does not fit, a `pyproject.toml`, `uv.toml` or lockfile that does not parse, a settings file it cannot read (such as one behind a symlink), or workspace globs it might read differently from uv make every lookup fail. So do index settings of tools the Count cannot check against the tool, in any `pyproject.toml` at or above the project or in `pdm.toml`, `pixi.toml` or `hatch.toml`: PDM sources and overrides, Rye sources, Pixi PyPI options, and Hatch installer flags or `PIP_*` and `UV_*` variables. Indexes come only from these files, never from `pip.conf`, `PIP_*` or `UV_*` variables, Dockerfiles or CI workflows. Private indexes are read through their simple API, as PEP 691 JSON or PEP 503 HTML; HTML gives no upload times, so no release-age wait.

  pip requirements files are not maintained at all; see [managers](https://count-patchula.sweepy.dev/guide/managers/#python).

- An npm or PyPI [custom extractor](https://count-patchula.sweepy.dev/guide/configuration/#custom-extractors) can set `registry`, a template such as `"{registry}"`; an empty or unmatched capture means the public registry. Without it, npm packages follow `.npmrc` like a `package.json` beside them.

`.npmrc` and `.yarnrc.yml` are read whenever npm, Bun or an npm extractor is enabled, and every `pyproject.toml`, `uv.toml`, `uv.lock` and `poetry.lock` whenever pyproject is, with `pdm.toml`, `pixi.toml` and `hatch.toml`. `files` and `exclude` do not limit these. Bun’s `bunfig.toml` and Yarn 1’s `.yarnrc` are not read yet: a registry set only there is not used.

npm’s, Yarn’s and PyPI’s public registries (`registry.npmjs.org`, `registry.yarnpkg.com`, `pypi.org`, over https or plain http) count as none. A value the Count cannot read from, such as a `${VAR}` npm would take from the environment or a plain-http URL, is recorded instead: that package’s lookup fails, rather than reading the public package of its name, which may be someone else’s. Any user, password, query or fragment is removed from it first, and a URL that does not parse cleanly is recorded only as `<unreadable URL>`. A token in the path of a URL, as some hosted registries issue, looks like any other path and is recorded; keep such URLs in the operator’s registry settings rather than the repository.

A repository naming a registry never brings credentials: requests to it carry an operator entry’s, when one covers its URL, and nothing otherwise. Two packages with the same name from different registries are separate dependencies, with separate lookups and branches. A package from its own registry gets no [advisories](https://count-patchula.sweepy.dev/guide/security/) and no release notes, since the public package of that name is a different package.

### Mirrors

Where the public registries are out of reach, or should only be read through a proxy such as an Artifactory remote repository or a Nexus proxy, an entry can stand in for one with `mirrorOf`:

```pkl
registries {
  ["https://acme.jfrog.io/artifactory/api/npm/npm-remote"] {
    auth = "bearer"
    secret { env = "ARTIFACTORY_TOKEN" }
    mirrorOf = "https://registry.npmjs.org"
  }
  ["https://nexus.acme.dev/repository/go-proxy"] {
    mirrorOf = "https://proxy.golang.org"
  }
}
```

- A request under the `mirrorOf` prefix goes to the entry’s prefix instead, with the rest of the URL unchanged, and carries the entry’s credentials if it has `auth`. An entry without `auth` sends none.
- There is no fallback: when the mirror fails, the lookup fails.
- Dependencies keep their public identity, so branches, rules and the dashboard do not change when a mirror is added or removed. Responses are cached under the mirror’s entry.
- The mirror must serve the same paths as the registry it stands in for. A mirror that serves only part of an API, such as PyPI’s simple index but not its JSON API, covers only the prefix it names; the rest is still read from the public registry.
- Container registries are not mirrored: their token services belong to the registry’s own host.
- Release notes and advisories come from GitHub and OSV.dev, not the registry, and are not mirrored.

## Dates and release age

Publication dates feed the [release-age wait](https://count-patchula.sweepy.dev/guide/lookup-policy/). Go dates releases through the proxy’s `.info` documents, only for the 20 newest on a cold lookup, since a module can list hundreds and older releases are outside any wait; versions the proxy lists but cannot describe are dropped. npm, crates, PyPI, RubyGems, NuGet and Packagist report them directly. Maven Central’s search API lags by months, so Maven uses each POM’s `Last-Modified` header, for the ten newest versions only. GitHub tags are dated [as the release-age wait describes](https://count-patchula.sweepy.dev/guide/lookup-policy/#the-release-age-wait). mise tools use the date mise lists, which is a backend’s own release or publication date. GitLab tags use the annotated tag’s date. Lightweight GitLab tags, Gitea and Forgejo tags, and hosted runner labels are undated and have no wait.

Where release notes look for each dependency’s repository is under [finding the upstream](https://count-patchula.sweepy.dev/guide/release-notes/#finding-the-upstream).
