You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: teach AGENTS.md how to check for and bump package updates
Document the _meta.releases field in the schema, add a new section
explaining how to check individual or all packages for upstream
updates using the releases URL, and how to bump versions.
@@ -35,6 +35,7 @@ Each package directory has a `data.json` with version entries and a `_meta` key:
35
35
```
36
36
37
37
-**`_meta.default`**: Which version is the default (used by `nix build .#<pkg>.default`)
38
+
-**`_meta.releases`**: URL to the upstream releases page (e.g., GitHub releases, official download page). Used by the docs generator to link package names, and by agents to check for new versions.
38
39
-**Version keys**: Semantic version strings (e.g., `"1.25.6"`, `"0.52.0"`)
39
40
-**`sha256`**: SRI hash of the source archive
40
41
-**`vendorHash`**: (Go packages) SRI hash of vendored dependencies
Each package's `data.json` has a `_meta.releases` URL pointing to its upstream releases page. Use this to discover whether newer versions are available.
244
+
245
+
### Checking a single package
246
+
247
+
1. Read `packages/<pkg>/data.json` to find `_meta.releases` and `_meta.default` (the current default version).
248
+
2. Fetch the releases URL to find the latest available version(s).
249
+
-**GitHub releases pages** (`github.com/<owner>/<repo>/releases`): use the GitHub API for structured data:
250
+
```bash
251
+
gh api repos/<owner>/<repo>/releases/latest --jq '.tag_name'
252
+
```
253
+
Or to list recent releases:
254
+
```bash
255
+
gh api repos/<owner>/<repo>/releases --jq '.[].tag_name'| head -10
256
+
```
257
+
- **Non-GitHub pages** (e.g., `go.dev/dl/`, `nodejs.org`, `static.rust-lang.org`): fetch the page and extract version information from it.
258
+
3. Compare the latest upstream version against `_meta.default`. Note that some packages use a `v` prefix in their version keys (e.g., `"v1.5.1"`) — match the convention already used in that package's `data.json`.
259
+
260
+
### Checking all packages for updates
261
+
262
+
To scan the entire registry for outdated packages:
263
+
264
+
1. Iterate over every `packages/*/data.json`.
265
+
2. For each, extract `_meta.releases` and `_meta.default`.
266
+
3. Fetch the upstream releases URL and compare.
267
+
4. Report which packages have newer versions available, showing current vs. latest.
268
+
269
+
### Bumping a package to a new version
270
+
271
+
Once you've identified that a newer version exists:
272
+
273
+
1. Follow the steps in"Adding a New Version of an Existing Package" above.
274
+
2. Use the URL patterns in the package's `default.nix` to construct the correct download URL for the new version — this tells you how to compute the source hash.
0 commit comments