Expand description
The reference static registry and bynk add (packaging slice 4a, #2274,
decisions H and I).
A static registry is a directory any static host can serve:
<dir>/config.json protocol, id, auth, the key chain
<dir>/<org>/<package> one signed JSON line per version (append-only)
<dir>/dl/sha256/<hex> each version's archive, named by tree checksumbynk registry init writes config.json and a signing key (never inside
the directory); bynk registry add packs a package, signs its line and
appends it; bynk registry yank flips a line’s yanked, which the
signature doesn’t cover, so nothing is re-signed and nothing is deleted.
bynk registry withdraw (#2330) is the takedown: it yanks a line, records
why in its unsigned withdrawn, and deletes its archive.
Enums§
- Archive
Outcome - #2330 (D): what
bynk registry withdrawdid to the archive.
Functions§
- add
bynk registry add: pack the package atpackage_dir, sign its line with the key inkey_file, and append it to the registry atdir. Returnsorg/package version.- add_
dependency bynk add: addpackage(org/package, optionally@range) to the manifest atproject, choosing the highest version its registry offers. Returns the line written.- default_
key_ path - The default key path for registry
id:./<id>.key. - delegate
bynk registry delegate(#2316): a new key that may sign index lines, delegated by the chain key inkey_file. Returns the new key.- init
bynk registry init: a new static registry atdirwith idid, its signing key written tokey_out. Returns thekey = "…"line consumers pin.- resign
bynk registry resign(#2316): re-sign every index line with the key inkey_file(the newest chain key, or a valid delegate). Returns the number of lines re-signed. Onlysigchanges.- revoke
bynk registry revoke(#2316): revoke the delegatetarget, signed by the chain key inkey_file. Refuses, unlessforce, when a line would be left with no valid signer. Returns how many lines it signed.- rotate
bynk registry rotate(#2316): append a chain link — a new key, signed by the current (newest) chain key inkey_file. Returns the new key.- withdraw
- #2330 (D):
bynk registry withdraw— the takedown ofpackageversionon the registry atdir. Setsyankedandwithdrawn(reason) on its line, re-signing nothing, then deletes its archive unless another line names the same tree. Final: a withdrawn version is refused here (unless an interrupted withdrawal left its archive behind, which is then deleted), byadd, by the publish API and by an un-yank. - yank
bynk registry yank: set (or, withundo, clear)yankedon one line.