External servicesWriting and publishing packages
The registry protocol
The protocol is what the jadpo tool and the registry application are each
built against. It is served at https://jadpo.dev/registry/v1/ as JSON,
with failures in the failure envelope, and is versioned by
its path. Reads need no sign-in. The jadpo tool never signs in: nothing
it can send makes a release live.
| Request | Answers |
|---|---|
GET packages/@{publisher}/{name} |
The package: description, kind, code name and label, publisher (verified, official), maintained or its successor, and each release's version, digest, time, and whether it is yanked or urgent |
GET packages/@{publisher}/{name}/releases/{version} |
One release: repository, tag, commit, digest, its surface.jadpo_record, facts, change record, written account, compatible Jadpo releases and its index in the log |
GET archives/{digest} |
The release's files as a tar archive whose files, unpacked, have that digest, as the lock computes it |
GET log/head |
The log's size and root hash |
GET log/signed-head |
The log's size and root hash, with the key that signed them and its signature |
GET log/proof/{digest}?size= |
The release's log entry, its index and the hashes that prove it is in the log of that size |
GET log/consistency?from=&to= |
The hashes that prove the log of size to extends the log of size from |
GET search?q=&from=&to=&kind= |
Ranked results, the standard library's first, each naming a package and declaration, with why it matched |
POST advisories/query |
Given installed packages and versions, the advisories against them, each naming its declarations, versions and the packages carrying copies |
POST fingerprints/query |
Given prefixes, each the first five hex digits of a source fingerprint, every public function and action of a release that isn't yanked whose source fingerprint starts with one: its package, version (the newest with that fingerprint), declaration and source |
POST decode-failures |
Given a package, version, operation and the shape of an answer its scheduled contract run couldn't decode, keeps the report and answers its id |
POST releases |
Given a repository, a tag, dry_run and optionally publisher, starts a release (or a dry run) and answers its id |
GET releases/{id} |
Its state (verifying, failed with the bar's rows, pending, cancelled, live), with its facts and change record once checked |
- The log is an append-only Merkle tree of releases, hashed as RFC
6962 does with SHA-256. Each leaf is one line,
@acme/postcodes 2.1.0 sha256:…, so a logged digest can't stand for another package's or version's release.addandupdatekeep the last head they saw in.jadpo/registry_head, asklog/consistencyfrom its size to the new head's and refuse a head the proof doesn't show extends it, then asklog/proofat the new head's size and refuse a release it doesn't show is in the log. Proofs are made by RFC 6962's definitions and checked by RFC 9162's algorithms; the root is never sent with a proof, since a client checks it against the head it holds. - A head can be signed.
GET log/signed-head'ssignatureis an Ed25519 signature over the one linejadpo-log-head {size} {root}, its root as 64 hex digits, written as aBytesis, and itskeythePublicKeyit verifies against. A registry keeps its signing keys as data and signs withcrypto.sign, so it can change them.jadpoholds the public registry's keys; when it holds any for the registry it asks, it asks for this row instead oflog/headand refuses a head with no signature, a signature that isn't its key's, or a key it doesn't hold (install.not_proved).JADPO_REGISTRY_KEYgives a stand-in's keys, comma-separated. - A placeholder fills a whole segment, so
{publisher}is the handle with its@:GET packages/@acme/postcodesispackages/{publisher}/{name}withpublisher@acme. Each part of a scoped name is lower-case letters and digits, starting with a letter, with single-s between them, at most 39 characters. - Every answer's field is always sent,
nullwhere it has no value, as a Jadpo application writes an output; sizes and indexes are JSON numbers. A release's facts are the table in What a release shows, less the Jadpo releases it works with, which are the release's own field since they grow after it is checked.publisheris the handlepackage.jadponames,nullwhere it names none, which only a release that failed can have. A change record's entry is itsdeclaration, itskind(function,type,provider),change(added,removed,retyped,new_failure,new_host,personal_data_sent,behaviour_changed),detailandwhy. - A release refused for its publisher is
failedwith a bar row whosecheckispublisherand whosedetailsays why, whichjadpo package publishshows aspublish.publisher_mismatch. An optionalpublisheronPOST releaseslets the registry refuse at once, asrepository_refused, a repository another publisher releases from (recorded 2026-11-07). - Its failures are
package_not_found,release_not_found,archive_not_foundandrelease_request_not_found(404),not_in_log(404, also for a release logged after the size asked about),size_past_head(422, a size past the head or sizes the wrong way round) andrepository_refused(422, not a repository reached over HTTPS).POST releasesandPOST decode-failuresanswer 202, the others 200. POST fingerprints/queryis howjadpo suggestfinds an app's copy of a published function (Functions that already exist). It sends prefixes, at most 1,000 a request and each five lower-case hex digits, never a fingerprint, and the registry answers each prefix's whole bucket, so it learns nothing of which function an app holds; a prefix of another length, or more than 1,000, is 422invalid_input. The fingerprints are thesourceonesjadpo package verifywrites for each release (recorded 2026-11-08).POST decode-failuresholds a shape and never a value.shapeis a list of at most 1,000 members, each apathof at most 256 bytes from the answer's root,$.data[].id, and itskind:object,list,text,number,boolornull. A member name stands for itself only when it is letters,_and-of at most 64 bytes, starting with a letter; any other, a map keyed by a customer's id for instance, is*, so a value can't leave as a name. Anything else is 422invalid_input.- The lock's
registrysource records the scoped name:package Postcodes.v2 version 2.1.0 registry @acme/postcodes digest sha256:…. - The registry application's served OpenAPI is checked against this
table by a conformance test,
jadpo package protocol <document>(Tooling), also run against a local registry built from the same table, so neither side drifts. Every row must be served below/registry/v1/with its placeholders, query members, body, status, answer and failures, open to a caller who hasn't signed in, and nothing else butopenapi.json; shapes are compared through any$ref, and what a Jadpo application adds that the table doesn't constrain (the runtime's shared failures,x-jadpo-keywords, anIdempotency-Keyheader) is left alone.
Markdown for agents: /docs/the-registry-protocol.md.Built from Jadpo's main branch at commit 9080dc3.