# 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, or the sparse index of the alternate registry a dependency names, with publication times; yanked releases are skipped |
| `go` | module path | the Go module proxy (`@v/list`, and `.info` once for each candidate 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, or the registry on the host a source address names, found through its `.well-known/terraform.json` |
| `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` in the [repositories the build declares](#package-registries), the first that lists the artifact answering, or on Maven Central, Google Maven or the Gradle plugin portal; each candidate’s POM `Last-Modified`, read once per version, dates it |
| `nuget` | package ID | the nuget.org flat container and the registration pages that may hold a candidate, for dates and unlisted and deprecated flags; any other v3 feed’s, from its service index |
| `rubygems` | gem name | the RubyGems versions API; any other gem source’s compact index (`info/<gem>`) |
| `packagist` | `vendor/name` | Packagist’s p2 metadata; any other Composer repository’s `metadata-url`, or the packages its `packages.json` lists and includes |
| `nix` | the flake input’s root URL, such as `https://github.com/NixOS/nixpkgs` | `nix flake prefetch` on the reference it was written with, run by the Count’s pinned nix ([Nix](https://count-patchula.sweepy.dev/guide/managers/#nix)) |
| `pkl` | the package URI without `package://` and the version, such as `pkg.pkl-lang.org/pkl-pantry/pkl.toml` | the GitHub releases of the repository that publishes it, only those tagged as this package; each repository is read once per run. A package on any other host, or a URI that pins a checksum, keeps only the newer releases whose metadata the host serves, each with that metadata’s checksum ([Pkl](https://count-patchula.sweepy.dev/guide/managers/#pkl)) |

## 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, OCI tag pages and OCI referrers lists get a one-hour local freshness floor, even when they carry an ETag or Last-Modified (`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 annotated tags, for their tagger date and commit. A lightweight tag’s ref already names its commit and it has no tagger date, so it is never hydrated.

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`). [`mise lock`](https://count-patchula.sweepy.dev/guide/lockfiles/) runs with the same backends disabled and the same name and option checks, including the instance-metadata one, on every tool it locks.
- 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`, `go`, `dotnet`, explicitly or through mise’s registry, as `aws-cdk` is `npm:aws-cdk`) is looked up where the project’s configuration sends it, or fails its lookup where the Count cannot follow. Of the project’s own files only NuGet feeds other than nuget.org’s, in the tool’s folder, above it or below it, move a tool. mise 2026.12.0 runs every other installer outside the project: npm tools install in the tool’s own folder (its embedded aube, aube’s binary, Bun) or globally (npm, pnpm), and uv, pipx and `cargo install` run in the tool’s install folder, where uv’s tool commands read only user and system configuration, pip has no project configuration and Cargo reads no `.cargo/config.toml` of the project. So the project’s `.npmrc`, `.yarnrc.yml`, `bunfig.toml`, `pip.conf`, `uv.toml`, `pyproject.toml` and `.cargo/config.toml` move no tool.

A variable in a mise configuration’s `[env]` moves a tool only when it can change where that tool comes from, for the installers that see `[env]`: `PIP_*`, `UV_*` and `PIPX_*` for pypi and pipx tools, `CARGO_*` for cargo, `GEM_*` and `GEMRC` for gem, `NUGET_*` and `DOTNET_*` for dotnet, `GO*` for go, `GIT_*` for spm, and the homes each reads its user configuration from; `PYTHON_BUILD_DEFINITIONS`, `PYTHON_BUILD_ROOT`, `RUBY_BUILD_DEFINITIONS` and `RUBY_BUILD_ROOT` for core Python and Ruby, which add definitions to the version list python-build and ruby-build print; and `RUSTUP_*` and `CARGO_HOME` for core Rust. python-build’s and ruby-build’s other variables, such as their mirrors, change only where a compiled version’s source archive downloads from, so they move nothing. `gem install` runs without Bundler, so `BUNDLE_*` moves nothing either. The package sources the Count follows (below) move the tool to that source; any other of these variables fails its lookup. A variable that only runs code in the project’s own install, such as `LD_PRELOAD`, changes nothing the Count looks up. Any variable fails a tool whose backend the Count does not know, including a vfox or asdf plugin a short name’s registry entry lists first, since the plugin’s code can read anything. `core:` names, `nodejs` and `golang` count as the core tools they are. mise downloads every other tool itself, out of `[env]`’s reach.

npm tools follow a registry that `[env]` names. npm, pnpm, Bun and `aube_cli` run as their own process and see every variable; mise’s default, its embedded aube, reads `[env]` wherever mise exports it (`mise exec`, tasks, an activated shell), though a plain `mise install` leaves it out. The Count reads the registry key the way the installer mise runs reads it:

- npm, aube and pnpm 10 or older: `NPM_CONFIG_REGISTRY` or `npm_config_registry` (the rest of the name in any case) for every package, and `"npm_config_@scope:registry"` for a scope, which wins there.
- Bun: the same keys for every package.
- pnpm 11 and later: only `PNPM_CONFIG_REGISTRY` or `pnpm_config_registry`, for every package. They read no npm spelling and no scoped registry from the environment.

pnpm’s version is the one the governing mise configurations pin pnpm to, `latest` counting as 11 or later. Without a pin the Count reads both spellings, and the lookup fails unless they name the same registry.

The tool is then looked up in that registry, as an npm dependency from its own [package registry](#package-registries) is, and listed as mise lists an npm tool: without deprecated versions unless every version is. A short name counts when the first backend mise’s registry lists for it is npm, as `aws-cdk` is `npm:aws-cdk`. A `mise.lock` beside it is regenerated from the same registry: `mise lock` runs on a tools-only configuration without the project’s `[env]`, so the Count hands it the registry, and the operator’s [credentials](#private-registries) for it, in a user configuration.

The lookup fails instead when the Count cannot reproduce the registry: a value that is a template (`{{…}}`), not a plain string, a URL with a `$` variable, or anything but `https`; a mise configuration that loads variables from files; another spelling of the name, such as `Npm_Config_Registry` or `PNPM_CONFIG_registry`; a scope with `_`, which npm reads as `-`; a scoped registry under Bun; a registry for a tool whose npm backend is only a fallback; any other variable that chooses where an installer that runs as its own process fetches from (`NPM_CONFIG_*`, `PNPM_CONFIG_*`, `AUBE_*`, `YARN_*`, `COREPACK_*`, `BUN_*`, or the homes its user `.npmrc` is read from: `HOME`, `USERPROFILE`, `APPDATA`, `XDG_CONFIG_HOME`); and configurations or installers that disagree on the registry depending on where mise runs, such as a folder below the tool’s that names another registry, sets none where the tool’s own folder sees none, or pins a pnpm that reads another spelling. A variable that only runs code in the project’s own install, such as `LD_PRELOAD` or `NODE_OPTIONS`, changes nothing the Count looks up, and choosing the installer moves nothing by itself.

For pip, uv, Cargo and Go the Count follows the package source the same way: the tool is looked up there, by the Count rather than mise, as that ecosystem’s packages are (see [package registries](#package-registries)), and listed as mise lists the backend’s tools. A short name counts when the first backend mise’s registry lists for it is the backend, as `ansible` is `pypi:ansible`. A Git source or URL takes no source, so any of these settings fails it.

- **pypi and pipx tools.** mise lists a tool from `pypi.registry_url` (PyPI by default) and hands that index’s simple form to uv as `UV_INDEX` and to pip as `PIP_INDEX_URL`, over whatever `[env]` sets, so those two move nothing. uv, which mise runs when it is installed and `pypi.uvx` is not `false`, asks that index first, then `UV_EXTRA_INDEX_URL`’s, then the default index (`UV_DEFAULT_INDEX`, else `UV_INDEX_URL`, else PyPI), and installs from the first that has the package, or across them as `UV_INDEX_STRATEGY` says. With `pypi.uvx = false` only pip runs, which takes the best version across mise’s index and `PIP_EXTRA_INDEX_URL`’s. The Count lists the versions the installer takes from those indexes: with uv’s default `first-index`, those of the first index that has the tool; with `unsafe-first-match`, `unsafe-best-match` or pip, every index’s versions together. An index lacks the tool when it answers as uv reads a missing package: 404, and under `first-index` also 403 from `download.pytorch.org`, under the unsafe strategies also 401, 403, 407 or 511 from any index; any other failure fails the lookup. `mise ls-remote` and `mise outdated` list from the first index alone, but `mise install` and `mise lock` take a pinned version from wherever the installer finds it, so the Count offers what they install. `PIP_EXTRA_INDEX_URL` fails a tool uv may install, since which of the two runs depends on whether uv is installed; so do `pipx.*` settings, any other `pypi.*` setting, and the tool’s own `registry_url`, `uvx` or index options beside the project’s settings. Versions every file of which is yanked are left out, as mise leaves them.
- **cargo tools.** `cargo install` takes the crate from the registry `cargo.registry_name` names (mise passes it as `--registry`), else `CARGO_REGISTRY_DEFAULT`’s, else crates.io, and cargo-binstall reads the same. The Count reads the registry’s index from `CARGO_REGISTRIES_<NAME>_INDEX` over Cargo’s sparse protocol (`sparse+https://…`). A registry whose index `[env]` does not set fails, since Cargo then reads it from a configuration outside the repository; so does a Git index, which the Count does not read, and `CARGO_SOURCE_*`, which Cargo applies only to a source a configuration file defines. Yanked versions are left out.
- **go tools.** mise lists a go tool from the module proxies `GOPROXY` names, trying each module path the package may be in, deepest first, and the Count does the same: `,` moves on past a 404 or 410, `|` past any failure, `direct` is skipped and `off` ends the list. Where no proxy serves the tool and the list goes on to `direct`, mise would list it from version control, which the Count does not read, so the lookup fails; so does a list with `direct` before every proxy, from which go installs through version control first, and a tool one of whose module paths `GOPRIVATE` or `GONOPROXY` matches, which go fetches from version control. Those patterns match as go matches them: comma-separated, each without one trailing `/` but with any spaces, and a `GONOPROXY` that is not empty replaces `GOPRIVATE`. A proxy that is a local `file://` cache fails too. Versions are listed without their `v`, as mise lists them, and dated through each version’s `.info`.

The Count reads these values from `[env]` and `[settings]` the way mise merges them where it runs, a deeper folder’s configuration winning, and mise may install the tool from its own folder or from any folder below it whose configuration governs it. Every one of those places must come to the same source; configurations that disagree fail the lookup, and so do two configurations of one folder that set a value differently. A value that is a template (`{{…}}`), not a plain string, a URL with a `$` variable or credentials, or anything but `https` fails as for npm. A `mise.lock` beside a followed tool is regenerated from the same source, as for npm; see [lockfiles](https://count-patchula.sweepy.dev/guide/lockfiles/) for what `mise lock` is handed.

Every tool fails its lookup where a mise configuration there holds anything but `tools`, `tasks`, `task_config`, `vars`, `env`, `settings`, `min_version`, `redactions`, `wrappers` and `dotfiles`, sets a `MISE_*` variable or loads variables from files (`_.file`, `_.source`), or sets anything but a few plain settings such as `experimental`, `lockfile`, `dotfiles` and `minimum_release_age`; 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.

A file mise never loads as configuration is a tool list only: one that [`files`](https://count-patchula.sweepy.dev/guide/configuration/#choosing-files-and-managers) gives the mise manager under any other name, which is not `.tool-versions` and which no configuration includes with `task_config.includes`. No `mise install` reads its tools with the project’s configuration, so the settings and variables of the configurations around it and the project’s registry files don’t hold them back. The package registries and indexes the Count follows ([above](#package-backends-and-the-projects-settings)) still apply to them as to any tool, so configurations that name different ones still fail the lookup. A `.miserc.toml` that may govern its folder can rename the files mise reads as configuration, so there it answers to everything a configuration does. A file you load another way, through `MISE_DEFAULT_CONFIG_FILENAME` or `MISE_OVERRIDE_CONFIG_FILENAMES` in your own environment, is not one the Count can see as loaded: give it a configuration’s name instead.

## 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. A `pkl` package’s repository is read the same way. The mirror dates a tag only by its release, so when a `github-tags` lookup finds a [candidate](#dates-and-release-age) tag without one, which may be an annotated tag with a tagger date, that repository’s tags are read from GitHub instead. An undated tag that is no candidate, such as a floating `v3` below the `v4` a workflow uses, keeps the mirror’s answer and is left unchecked. 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. Docker Hub and GHCR anonymous tokens are fetched before the first read of an image, rather than after the registry refuses it. Docker Hub lists an image’s tags in one request of up to 50,000; other registries are read 1,000 tags a page.

An image or OCI catalog keeps only the tags some versioning scheme could read: past any leading `v`, `V` or whitespace, the tag starts with a digit. Tags such as `latest`, `main`, `pr-123` or `commit-<sha>` are dropped as each page is read, so an image with hundreds of thousands of CI tags costs no more memory than its releases. No scheme reads them as versions, whatever a custom extractor sets, and floating tags like `latest` are still pinned and followed through their manifests. A dependency whose extractor has an `extract` pattern is the exception: the pattern may turn any tag into a version (`release-1.2.3` into `1.2.3`), so its lookup keeps every tag.

GHCR lists an image’s tags in the order they were first pushed. Pushing a tag again leaves it where it was, so floating tags like `main` stay near the start, but a tag deleted and pushed again moves to the end. After the first full read the Count remembers the last tag listed, the tag listed just before it, and the version tags read so far. The next lookup asks for the tags after that earlier tag and checks that the answer starts with the remembered last tag, which shows neither has moved, then keeps the tags after it. That is usually a single request where a full read of a large image is hundreds. It reads every page again when the answer starts with any other tag or none (either tag deleted, or deleted and pushed again, whatever its manifest), and when a page repeats a tag already known, which would mean GHCR no longer lists in that order. An image with a single tag is read in full each time. There is no periodic full read: a tag deleted before the remembered one stays in the catalog until the next full read, and a pull request proposing it fails visibly when its digest is fetched. One sequence goes unseen: if both remembered tags are deleted and pushed again, the earlier one first and nothing in between, they end up adjacent at the end again, and a tag pushed before that is skipped until something else forces a full read. A lookup with an `extract` pattern always reads every page.

Authenticated pulls, Docker Hub’s included, use a [private registry](#private-registries) entry. When Docker Hub’s pull quota runs out, manifest reads wait out its window; tag lists and HEAD requests carry on. 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`; a registry `token` or `password` in `bunfig.toml` (`$VAR` references allowed); 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`, `bunfig.toml` `install.registry` and `install.scopes`, 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. Bun’s `bunfig.toml` works the same and wins over both, as Bun reads it after `.npmrc`: `[install] registry` for every package and `[install.scopes]` for a scope, each a URL string or a table of `url` with `token`, `username` or `password`. A registry table without a `url` is Bun’s default, the public registry. It counts for the manifests at or below it whether `npm` or `bun` owns them. 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`.

  The Count reads `bunfig.toml` strictly, so a file Bun could read differently fails every lookup at or below it, with a warning naming the file: one that is not TOML, an `[install]` key Bun does not read (Bun’s own keys such as `exact` or `linker` are fine), a registry that is neither a string nor a table of those keys, a value that is not a string, or a scope with no `url`. Other tables, such as `[test]` or `[run]`, are ignored.

- A mise npm, pypi, pipx, cargo or go tool comes from the source its installer reads from the mise configuration’s `[env]` and settings; see [package backends](#package-backends-and-the-projects-settings).

- 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. A gem source other than RubyGems is read through the compact index Bundler reads (`info/<gem>`); a server without one fails the lookup.

- PHP packages come from what `composer.lock` records, else from where Composer would find them. Composer marks a package from a Composer registry with the registry’s `notification-url`, Packagist’s being `https://packagist.org/downloads/`: a package with Packagist’s mark comes from Packagist, and one with another registry’s mark is looked up in the repositories `composer.json` configures, as below but without Packagist. A package the lock does not record is looked up as Composer looks it up: in the `repositories` in the order they are listed (an object’s keys in their order in the file), then Packagist, unless `"packagist.org": false` turns it off or a Composer repository on packagist.org or one of its subdomains takes its place. An entry keyed `packagist.org` replaces Packagist at the end, and `"name": false` turns off only an entry of that name that comes after it in the file, as Composer merges them. A repository whose `only` or `exclude` patterns leave the package out is skipped. The first canonical repository (`canonical` is true unless set to false) that has the package is the last one asked; a non-canonical one adds its versions and the search goes on, an earlier repository’s version winning over a later one’s. A Composer repository is read the way Composer 2 reads it: its `packages.json`, then its `metadata-url` for the package when it has one (asked only for the packages its `available-packages` and `available-package-patterns` list, when either list is not empty), else the versions it and every file it `includes` list, together, as Satis writes them. An included file’s own includes are read too. Only the metadata document’s entry for the package counts; a document without one, or one that is not there, means the repository does not have the package. A `packages.json` or included file that cannot be fetched, even one that is not there, fails the lookup, as it fails `composer update`. Composer fetches every include from the repository’s URL, less a trailing `/<file>.json`, then a `/` and the name as written, even one that is a URL of its own, and so does the Count. Composer 1’s provider protocol, a root that lists a package beside a `metadata-url`, and includes that include each other, which Composer reads without end, fail the lookup. A package a `path` or inline `package` repository provides before any other repository is listed as skipped; the Count reads the `name` in each `composer.json` a path or its `*` pattern reaches. A VCS or artifact repository, a path that leaves the repository or reaches nothing the Count read, a repository with `options`, and one of a type the Count does not know may provide any package, so a lookup that reaches one fails: give it `only` patterns, or commit `composer.lock`. A Composer plugin in the lock and the merge plugin can add repositories the Count does not see, so a package the lock does not record fails its lookup. With `config.lock` set to false, Composer and the Count ignore the lock. A `composer.json` with comments, which Composer does not read, one whose `repositories` is neither a list nor an object, which Composer’s schema refuses, or a lock the Count cannot read, fails every lookup.

- NuGet packages come from every package source a restore would read, since `packages.lock.json` does not record a package’s source and NuGet takes a version from any source that has it. The sources are the ones NuGet merges from the `nuget.config` files that apply, over nuget.org from its default user config: each config from the repository root down to the project’s folder adds its sources, a key added again takes the closer value, `<clear />` drops the sources (or disabled sources) above it, and `disabledPackageSources` turns sources off. A package’s versions are those every enabled source lists together, the first source’s entry winning for a version two list; a source that fails fails the lookup, and one that does not have the package adds nothing. With `packageSourceMapping`, from one config alone, only the enabled sources its most specific pattern (an exact ID, else the longest prefix) maps the package to count, and a package it maps nowhere fails its lookup. Mappings in several configs, which NuGet merges in ways the Count does not follow, fail every lookup. A source is a v3 feed when it says `protocolVersion="3"` or its URL ends in `.json`; the Count reads its service index, the flat container it names, and its registrations when it has them, for dates and unlisted and deprecated flags. A v2 feed or a local folder fails the lookups that would read it. 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; where those folders’ sources differ, the lookup fails. 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`, a `clear` anywhere but first, a key twice in one section, or 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.

- Terraform providers and registry modules come from the host their address names: `app.terraform.io/acme/cloud` from `app.terraform.io`’s registry, which the Count finds as Terraform does, through the host’s `.well-known/terraform.json`. An address without a host, or on `registry.terraform.io` or `registry.opentofu.org`, is the public registry’s. A module address on `github.com` or `bitbucket.org` is a Git repository to Terraform and is not looked up.

- Crates come from crates.io unless a dependency names another registry, since Cargo never looks a crate up anywhere else; one from git or a path is listed as skipped. One from an alternate registry (`registry = "<name>"`) is looked up in that registry’s sparse index, which a `[registries.<name>]` table in a `.cargo/config.toml` or `.cargo/config` in the manifest’s folder or above names (where Cargo looks when it runs there; a sibling member’s configuration does not count), or that `registry-index` gives outright, and its `Cargo.lock` entry from that registry resolves it. Its lookup fails when no configuration in the repository defines the registry (Cargo would read it from the user’s own configuration or the environment), two define it differently, a `[source]` table replaces it, or its index is a Git index, which the Count does not read (`sparse+https://…` only). Updating its `Cargo.lock` entry needs an operator [registries](#private-registries) entry with `tools = true` for the index: Cargo runs outside the repository, and that is how it learns the registry. 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 that is a symlink to a file inside the repository, directly or through other links, is read from that file, as Cargo reads it. A configuration the Count cannot read, such as a symlink leading out of the repository, 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 are looked up in the repositories the build declares, in the order Maven or Gradle tries them. The first repository whose `maven-metadata.xml` lists the artifact answers, with its own versions and dates; the repositories after it are not asked, and their lists are not merged in. A repository that does not have the artifact (404) is passed over. One that refuses the request (401, 403, a server error), or that the Count cannot request (a URL from a variable or property it cannot resolve, plain `http`, a local folder, an Ivy or flat directory layout), fails the lookup once the lookup reaches it, rather than let a later repository answer with what may be someone else’s artifact of those coordinates. Requests go through the operator’s [`registries`](#private-registries), so an entry’s credentials reach only the hosts it covers, and a repository that needs credentials no entry gives fails as refused. When the only repository an artifact can reach is the one the Count looks it up in by default (Google’s for Android groups, the Plugin Portal for plugins, and Central for the rest), it looks it up as before; any other list, public repositories alone included, is tried as declared. Answers are kept under the list of repositories they came from.

  - **Maven**, as Maven 3.9 does: a module tries its active profiles’ repositories, the last active profile first, then its own, then its parent’s (read the same way), then the super POM’s Central; a repository whose id is already in the list adds nothing, so a module’s own `central` replaces Central. The settings that `.mvn/maven.config` names with `-s` or `-gs` add their active profiles’ repositories in front of the module’s, and those of the profiles `<activeProfiles>` names behind Central too. Profiles count when `activeByDefault` (in a POM, only while no other profile of it is active), named by `-P` or `<activeProfiles>` (which name a POM’s profiles as well as the settings’), and not turned off with `-P !id`. Maven reads one `.mvn/maven.config`: the one in the nearest folder holding `.mvn` at or above the top of the multi-module project, where it runs; a module’s own does nothing. Each of its lines is one argument, as written: `-s settings.xml` on one line names the file `settings.xml`, which Maven and the Count fail on, while `-s` with the file on the next line works. Plugins and build extensions use `pluginRepositories` the same way. A `<parent>` resolves, for the POM and for every module below it, from the repositories of that module and the POMs up to this one, and fails when they differ. A mirror in those settings stands in for each repository it matches — an exact id first, then the first matching `*`, `external:*` (all but exactly `localhost` and `127.0.0.1`, and `file:`), `external:http:*` (plain HTTP and WebDAV over it) or list with `!id` — and repositories one mirror takes become one entry. A repository with releases disabled serves no release. `${…}` in a URL comes from the module’s, its profiles’, its parents’ and the settings profiles’ properties and `-D` in `.mvn/maven.config`. A parent is the POM where `relativePath` points (`../pom.xml` by default) with the same group, artifact and version, or another POM of the build with them. Any other parent is fetched before extraction, in every build, as Maven fetches it, from the repositories of the POMs read so far and then Central, and joins the chain like a local one: its repositories and its active profiles’ come after the child’s, its properties yield to the child’s, and its own parent is fetched in turn, even one with the coordinates of a POM in the repository, which Maven does not take from the build either. A build whose POMs, settings and fetched parents name only public repositories (a Spring Boot parent, say) is looked up as before, profiles on a JDK, OS, property or file condition included: whether they activate, a public repository answers. Its parents are fetched from those profiles’ repositories too. A parent that is no fixed release (a `-SNAPSHOT`, a range, a `${…}` version), that no repository has, or that could not be fetched fails the lookups that need it; a fetch that failed is tried again on the next run. A dependency or plugin a parent declares is resolved by every module that inherits it, and fails when they would resolve it from different repositories.
  - **Gradle**, as Gradle 9 does: a project tries what each project above it adds to it, the root first, each in its script’s order (`allprojects { repositories }` and `subprojects { repositories }`), then its own `repositories` and `allprojects { repositories }` and those of the scripts it applies with `apply from`, in its order. A project that declares none uses the settings’ `dependencyResolutionManagement { repositories }`, and under `repositoriesMode` `PREFER_SETTINGS` or `FAIL_ON_PROJECT_REPOS` every project does. A project the settings `include` without a build script of its own (`include 'a:lib'` makes `:a` too) tries what the projects above it add; where the settings include projects in a way the Count cannot read (a loop, a condition, `includeFlat`), it takes such a project to be possible below any project. A script the settings apply with `apply from` is settings too: its `include`, `pluginManagement` and `dependencyResolutionManagement` count where it is applied, and one applied inside a block or a condition counts as an `include` the Count cannot read. `plugins {}` use the settings’ `pluginManagement { repositories }`, or the Gradle Plugin Portal when it declares none, and `buildscript { dependencies }` the script’s own `buildscript { repositories }`. `content {}` and `mavenContent {}` filters (`include`/`exclude` `Group`, `GroupByRegex`, `GroupAndSubgroups`, `Module` and `ModuleByRegex`, and `snapshotsOnly()`) decide which repositories a module reaches, and `exclusiveContent` gives the modules its filter matches to its repository alone. `mavenLocal()` counts as a declared repository but serves nothing, as on a fresh CI runner. A version catalog entry, a version in a variable, or anything else any project may use takes its repositories from every project that could, and fails when they differ.
  - **What fails every lookup of the build:** a file the Count cannot read or a POM, settings file, build or script one names that it does not read; a settings file with a repository or mirror other than the public ones that no `.mvn/maven.config` names, since `mvn -s` in a workflow may or may not use it; a Maven profile that adds a repository on a condition the Count does not evaluate (JDK, OS, property, file) to a build with a repository other than the public ones; a script the Gradle settings apply inside a block or a condition that adds repositories; and Gradle build logic that adds repositories anywhere but the places above — a convention plugin or plugin source in `buildSrc`, `build-logic`, `build-conventions` or `gradle/plugins`, `afterEvaluate`, `repositories.add`, a repository call or type the Count does not read (a plugin’s `s3 {}`, say), a script applied inside a string template, a `pluginManagement` `resolutionStrategy`, a `repositoriesMode` it does not read. The Count reads every script, those build-logic folders, everything the settings include and the scripts apply, and never runs any of it. A build whose lookups fail says so once, in a warning naming the file. 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.

- 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.
  - `pylock.toml` records each package’s `index`.
  - `pdm.lock` records no index. A project PDM locks takes a package from the indexes PDM searches for it, and no others: each `[[tool.pdm.source]]`, filled in from the project’s `pdm.toml` by name, and, unless `pdm.toml` sets `pypi.ignore_stored_index`, the sources `pdm.toml` stores and the default index (`pypi.url`, PyPI unless set), which a source named `pypi` takes the place of. With more than one, the lookup is ambiguous. `include_packages` and `exclude_packages` are not weighed: the source counts for every package.
  - 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, no Poetry source or dependency pinned to one, no PDM source (in `[tool.pdm]` or `pdm.toml`) or override that is not a version or specifier (`===` with any string counts as one), no Rye source, no Pixi `index-url`, `extra-index-urls`, `find-links` or dependency `index` in any feature or target, and no Hatch environment variable that gives pip or uv an index (`PIP_INDEX_URL`, `PIP_EXTRA_INDEX_URL`, `PIP_FIND_LINKS`, `UV_INDEX_URL`, `UV_DEFAULT_INDEX`, `UV_EXTRA_INDEX_URL`, `UV_INDEX`, `UV_FIND_LINKS`), in an `env-vars` table or an override’s `{ key, value }` entry. An index PDM, Rye, Pixi or Hatch names is a candidate like a uv index, whichever tool installs the project. 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, and the keys of a PDM source and PDM’s `pypi` settings against PDM’s own. A Rye source has the keys Rye documents, and Pixi’s `pypi-options` the keys Pixi accepts. A key the Count does not know, a section that does not fit, a `pyproject.toml`, `uv.toml`, `pdm.toml`, `pixi.toml`, `hatch.toml` or lockfile that does not parse, PDM’s legacy `.pdm.toml` (which PDM reads over `pdm.toml` in a way the Count does not reproduce), a settings file it cannot read (such as one behind a symlink), workspace globs it might read differently from uv, a `PIP_*` or `UV_*` variable in a Hatch environment that the Count does not know to be harmless, or Hatch `pip-install-flags` make every lookup fail. Pixi’s conda channels are not read, since the Count looks up no conda package. Indexes come only from these files, never from `pip.conf`, `PIP_*` or `UV_*` variables outside Hatch’s settings, 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, PyPI, Packagist, NuGet, RubyGems or Terraform [custom extractor](https://count-patchula.sweepy.dev/guide/configuration/#custom-extractors) can set `registry`, a template such as `"{registry}"`: the registry’s https URL (a Composer repository, a NuGet v3 service index, a gem source, or a Terraform registry’s host as `https://host`). An empty or unmatched capture means the public registry. Without it, npm packages follow `.npmrc` like a `package.json` beside them.

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

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. Without any entry for Docker Hub, the Count reads public Docker Hub manifests and blobs addressed by digest from `mirror.gcr.io` first, checking every byte against the digest. An entry covering Docker Hub, with or without credentials, or a `mirrorOf` for it turns that off, so Google never sees the names of images read under an entry.
- 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/). Sources that date one version per request date only the candidates: every release newer than the version a dependency is on, wherever it sorts, so a patch release on an older line is dated like a new major, with prereleases among them only when the dependency is on one or a `permitted` filter is set. When several dependencies share a package, the candidates are the union of theirs. A dependency whose current value is no version (a dist-tag, `latest`), or that an `extractVersion` pattern or a runtime toolchain range reads, makes every version a candidate. Older versions are listed unchecked; they can never be proposed. Each answer is kept, so a later lookup from an older version asks only about the versions it adds.

Go dates each candidate once through the proxy’s `.info` documents and keeps the answer, so a warm lookup asks only about versions it has not seen; versions the proxy lists but cannot describe are dropped. npm, crates, PyPI, RubyGems and Packagist report dates directly; a gem source’s compact index dates a version where the server records when it was pushed, and a Composer repository where it records a `time`. NuGet reads them from the registration pages, skipping a page whose versions all sit at or below the version every dependency on the package is on. Maven Central’s search API lags by months, so Maven dates each candidate once by its POM’s `Last-Modified` header and keeps the answer; the POM is read from the repository that listed the version, the way the metadata is, through an operator [mirror](#private-registries) when one stands in. Repository managers send the header as Central does; a repository that sends none leaves its releases undated. A date request that fails, a 429 the retries do not clear included, leaves its version unchecked, so a positive wait holds it until a later lookup reads the date. 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).
