Skip to content

HTTP API

Generated from the OpenAPI document that GET /-/commons/v1/openapi.json serves, by pnpm api:reference; do not edit it by hand. The specification is docs/mvp1-spec.md: this file says what the routes take and answer, and points to the section that defines each. With this file and the formats of that specification, an account’s own tooling can enrol, claim a namespace, register a grant, obtain a certificate and a session, and publish.

  • It is public. Any HTTP client may call it. The service’s address is the instance’s service URL (https://commons.example below); every path here is relative to it.
  • It is stable within v1 (4.1). A change may add a route, add an optional request field or add a response field. It never removes or renames anything or changes a meaning; anything else is v2.
  • It is described. The OpenAPI document at /-/commons/v1/openapi.json is generated from the schemas of @commons/core, which the service validates with, so it cannot drift from the service; this file is written from it.
  • It is bounded. Every route that reads a body has a limit (24 MiB for publish, 64 KiB for every other), enrolments are limited by client address, and an account’s calls count against its quotas (9.11).

Responses are open to the reader (4.2). Ignore a field you do not know: a later v1 may add one. Requests are closed: an unknown field in a body is a 400. Signed objects (grants, certificates, statements, records) are closed everywhere.

  • Bodies are JSON (Content-Type: application/json) unless a route says otherwise. The service reads a body as JSON whatever its Content-Type says; a body that is not JSON is a 400. A query parameter a route does not know is ignored. A method a path does not serve is a 404 not_found, as an unmatched path is. HEAD is answered as GET, without the body. A GET sent with a body ignores it.

  • Formats (PoC 2, 4.6). A timestamp is UTC with exactly three fractional digits, 2026-12-01T10:00:00.000Z. A digest is sha256: and 64 lowercase hex characters. Base64 is the standard alphabet with padding, never base64url, and a public key only in its canonical spelling: 44 characters, the base64 of the 32 raw key bytes (CORE-79). A key ID is the digest of those 32 bytes. An account name and an agent name are 1 to 39 characters of a-z, 0-9 and -, not starting with -. A namespace is written without @ in paths and with it in package names (4.6).

  • Keys are Ed25519.

  • Errors (12.5) are one body, whatever the route and status:

    { "error": { "code": "not_found", "message": "Not found." } }

    details is added for the two codes that define it (quota_exceeded, namespace_not_registrable). The exceptions are a rejected publish (422, a PublishResult), the pages of the browser routes (HTML), and the 404 of npm’s endpoints and of every path outside /-/commons/, which is { "error": "Not found" }, as the npm registry’s. Every route can also answer 500 internal. The table of codes is at the end.

  • No account holder appears in any answer or example (9.3): an account is a name, a key and the provider it signed in with.

How a request is signed (4.4, 9.6 to 9.8, PoC 7.2)

Section titled “How a request is signed (4.4, 9.6 to 9.8, PoC 7.2)”

Every call that creates or changes something is authenticated by a signature in its body, not by a header. The body is { "<name>": <envelope> }, the name being request, grant or statement as the route says.

  1. Build the payload: the object the route names (its fields are in Formats, under …Body). Serialise it with JSON.stringify and keep those exact bytes: nobody re-serialises a payload.

  2. Compute PAE(payloadType, bytes): the bytes "DSSEv1" SP LEN(type) SP type SP LEN(body) SP body, where SP is one space, LEN is the length in bytes in ASCII decimal with no leading zeros, type is the UTF-8 of payloadType and body is the raw payload bytes.

  3. Sign it with Ed25519 and make the envelope (a DsseEnvelope):

    { "payloadType": "application/vnd.commons.agent-grant+json",
    "payload": "<base64 of the payload bytes>",
    "signatures": [ { "keyid": "<key ID of the signing key>", "sig": "<base64 of the signature>" } ] }

    There is exactly one signature, and no other field. The envelope’s ID (a grant’s, a certificate’s, an attestation’s) is the digest of its PAE bytes.

  4. The payload carries audience, which must equal the service URL exactly (localhost and 127.0.0.1 are different services), requestedAt, which must be within 300 seconds of the service’s clock, and, where the route says so, a nonce of 32 lowercase hex characters from a random source, used once per signer in that window. Use a new nonce for every request.

Who signs With Payload type Routes
The new account key (9.2) the key being enrolled application/vnd.commons.enrollment-request+json POST /enrollments
The account key (9.4) the account’s current key …namespace-request+json, …agent-grant+json, …status-statement+json POST /namespaces, POST /agents, the two /status routes
The agent key (9.9) the key the grant names …certificate-request+json, …session-request+json POST /certificates, POST /sessions
A certified ephemeral key (9.7) the key a certificate certifies application/vnd.in-toto+json attestations in POST /publish (8)

(Payload types abbreviated; each is application/vnd.commons.<name> as the route says.) A certificate request also carries possession: the ephemeral key’s own signature, in base64, over the UTF-8 bytes of the six lines commons-certificate-request/v1, account, agent, audience, requestedAt and nonce, each followed by one LF (9.7).

  1. Enrol (9.2). Make an account key. POST /-/commons/v1/enrollments with the signed enrolment request; show the person verification.url and verification.userCode; poll GET /-/commons/v1/enrollments/{id} with the poll token every interval seconds until state is verified. The answer holds the account’s record and its log proof.
  2. Claim a namespace (9.5). POST /-/commons/v1/namespaces with a signed namespace request. A plain name answers 201 at once. A domain answers 202 with a DNS TXT record to create; poll GET /-/commons/v1/namespace-claims/{id} until claimed.
  3. Register a grant (9.6). Make the agent key; sign a grant with the account key; POST /-/commons/v1/agents. A grant lasts one hour to 90 days.
  4. Obtain a certificate (9.7) for each key that will sign attestations: make an ephemeral key, POST /-/commons/v1/certificates with a request signed by the agent key and carrying possession. The certificate lasts ten minutes and is logged.
  5. Open a session (9.8). POST /-/commons/v1/sessions, signed by the agent key; keep the token for ten minutes at most.
  6. Pack, attest and publish (6, 7, 8). Pack the tarball and the source bundle; sign the attestations with the certified keys; POST /-/commons/v1/publish with Authorization: Bearer cms_…. published and unchanged are 200; a rejection is 422 with the rejections and how to fix each. Read the version back with GET /-/commons/v1/packages/npm/{namespace}/{name}/{version} and check it as 11 describes.
Route Authentication Body limit Errors
GET /healthz none none none
GET /-/commons/v1/policy none none none
GET /-/commons/v1/openapi.json none none none
POST /-/commons/v1/enrollments account-key 64 KiB bad_request, unauthorized, request_expired, account_name_reserved, account_name_taken, provider_unavailable, quota_exceeded, payload_too_large
GET /-/commons/v1/enrollments/{id} poll-token none not_found, unauthorized
GET /-/commons/v1/enroll/{id} browser none pages
POST /-/commons/v1/enroll/{id} browser 64 KiB pages, payload_too_large
GET /-/commons/v1/enroll/callback/{provider} browser none pages
GET /-/commons/v1/accounts none none none
GET /-/commons/v1/accounts/{account} none none not_found
GET /-/commons/v1/accounts/{account}/agents none none not_found
GET /-/commons/v1/accounts/{account}/namespaces none none not_found
POST /-/commons/v1/accounts/{account}/status account-key 64 KiB bad_request, unauthorized, unknown_account, account_suspended, request_expired, request_replayed, not_found, payload_too_large
POST /-/commons/v1/namespaces account-key 64 KiB bad_request, unknown_account, account_suspended, unauthorized, request_expired, request_replayed, namespace_invalid, namespace_not_registrable, namespace_reserved, namespace_taken, quota_exceeded, payload_too_large
GET /-/commons/v1/namespace-claims/{id} poll-token none not_found, unauthorized
GET /-/commons/v1/namespaces/{namespace} none none not_found
POST /-/commons/v1/agents account-key 64 KiB bad_request, unknown_account, account_suspended, grant_invalid, grant_expired, quota_exceeded, agent_exists, payload_too_large
POST /-/commons/v1/agents/{account}/{agent}/status account-key 64 KiB bad_request, unauthorized, unknown_account, request_expired, request_replayed, not_found, payload_too_large
POST /-/commons/v1/certificates agent-key 64 KiB bad_request, unauthorized, request_expired, request_replayed, account_suspended, agent_suspended, grant_superseded, grant_expired, key_already_certified, quota_exceeded, payload_too_large
POST /-/commons/v1/sessions agent-key 64 KiB bad_request, unauthorized, request_expired, request_replayed, account_suspended, agent_suspended, grant_superseded, grant_expired, quota_exceeded, payload_too_large
GET /-/commons/v1/whoami session none unauthorized, session_expired, account_suspended, agent_suspended
POST /-/commons/v1/publish session 24 MiB unauthorized, session_expired, account_suspended, agent_suspended, bad_request, quota_exceeded, payload_too_large
GET /-/commons/v1/search none none bad_request
GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name} none none not_found
GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name}/{version} none none not_found
GET /-/commons/v1/trust-root none none none
GET /-/commons/v1/log/checkpoint none none not_found
GET /-/commons/v1/log/tile/{tilePath} none none not_found
GET /-/commons/v1/log/entries/{index} none none not_found
GET /@{namespace}/{name} none none 404 (npm’s body)
GET /@{scopedName} none none 404 (npm’s body)
GET /-/tarballs/sha256/{file} none none 404 (npm’s body)
GET /-/bundles/sha256/{file} none none 404 (npm’s body)
GET /-/attestations/sha256/{file} none none 404 (npm’s body)
GET / none none none
GET /privacy none none none
GET /terms none none none

Whether the service is up. Answers { "status": "ok" } while the process can answer.

  • Authentication. None.
  • Specification. 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The service is up. application/json Health

Errors (12.5; every route can also answer 500 internal)

Status Codes

The policy layers beneath a package’s own. floor is always the platform floor; platform is the operator’s layer, or null.

  • Authentication. None.
  • Specification. 12.2, 8.7
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The layers. application/json PlatformPolicyResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes

This document. The OpenAPI document, built once when the service starts. Its servers entry is the instance’s service URL.

  • Authentication. None.
  • Specification. 12.1, 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The OpenAPI document. application/json object

Errors (12.5; every route can also answer 500 internal)

Status Codes

Start enrolling an account. Creates a pending enrolment for an account name and a new account key, authenticated by the key’s signature over the request in the body (9.2 step 1). The person then opens verification.url in a browser and signs in; the CLI polls GET /-/commons/v1/enrollments/{id}. Counted against enrollments_per_address (9.11). The answer carries Cache-Control: no-store.

  • Authentication. The account key’s signature on the payload in the body (9.4). No header.
  • Specification. 12.2, 9.2, 9.11
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. { request: <envelope> }: a DSSE envelope of payload type application/vnd.commons.enrollment-request+json, whose payload is an EnrollmentRequestBody signed by the new key. Body: CreateEnrollmentRequest.

Field Required Value
request yes EnrollmentRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
201 The pending enrolment. Headers: Cache-Control: no-store. application/json EnrollmentResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request, provider_unavailable
401 unauthorized, request_expired
409 account_name_reserved, account_name_taken
413 payload_too_large
429 quota_exceeded

Poll an enrolment. Authenticated by the enrolment’s poll token, sent as Authorization: Bearer <token>. failure is set when the state is failed, and account when it is verified. An expired enrolment answers 200 with the state expired. Carries Cache-Control: no-store.

  • Authentication. The poll token, as Authorization: Bearer cmp_… (the one the creating call returned).
  • Specification. 12.2, 9.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
id path yes an enrolment ID: enr_ and 16 lowercase hex characters The enrolment’s ID: enr_ and 16 lowercase hex characters.

Answers

Status Meaning Body
200 The enrolment’s state. Headers: Cache-Control: no-store. application/json EnrollmentState

Errors (12.5; every route can also answer 500 internal)

Status Codes
401 unauthorized
404 not_found

The enrolment page (a browser). The page of 9.2 step 4: the account name, the key ID and the code, with a button. For the person’s browser, not for a client. It sets a cookie for the enrolment. Every page carries Cache-Control: no-store and a restrictive Content-Security-Policy. A failure is a page (HTML), not a 12.5 body.

  • Authentication. The person’s browser: the page’s cookie and form value (9.2). Not for a client.
  • Specification. 12.2, 9.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
id path yes an enrolment ID: enr_ and 16 lowercase hex characters The enrolment’s ID.

Answers

Status Meaning Body
200 The enrolment page, or the page of a verified enrolment. text/html; charset=utf-8 string
400 A page: the provider is not enabled, or a callback cannot be accepted (9.2). text/html; charset=utf-8 string
403 A page: the button was pressed without the page’s cookie, or the sign-in’s identity does not match (9.2). text/html; charset=utf-8 string
404 A page: no such enrolment, or no such provider (9.2). text/html; charset=utf-8 string
409 A page: the sign-in identity or the account name is taken (9.2). text/html; charset=utf-8 string
410 A page: the enrolment has expired (enrollment_expired, 9.2). text/html; charset=utf-8 string
502 A page: the provider could not be reached or failed (9.2). text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes
400, 403, 404, 409, 410, 502 A page (HTML), not a 12.5 body: see the answers above

The enrolment page’s button (a browser). Posted by the page’s form, application/x-www-form-urlencoded with the field token that the page holds, which must equal the page’s cookie. Answers 303 to the provider. A refusal is a page.

  • Authentication. The person’s browser: the page’s cookie and form value (9.2). Not for a client.
  • Specification. 12.2, 9.2
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Parameters

Name In Required Value Meaning
id path yes an enrolment ID: enr_ and 16 lowercase hex characters The enrolment’s ID.

Request. application/x-www-form-urlencoded. The form of the enrolment page: one field, token. Body: object.

Field Required Value
token yes string

The object is open to the reader: ignore a field not listed (4.2).

Answers

Status Meaning Body
303 To the provider’s sign-in. Location is the provider’s URL. Headers: Location: the provider’s authorisation URL. none
400 A page: the provider is not enabled, or a callback cannot be accepted (9.2). text/html; charset=utf-8 string
403 A page: the button was pressed without the page’s cookie, or the sign-in’s identity does not match (9.2). text/html; charset=utf-8 string
404 A page: no such enrolment, or no such provider (9.2). text/html; charset=utf-8 string
409 A page: the sign-in identity or the account name is taken (9.2). text/html; charset=utf-8 string
410 A page: the enrolment has expired (enrollment_expired, 9.2). text/html; charset=utf-8 string
502 A page: the provider could not be reached or failed (9.2). text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes
400, 403, 404, 409, 410, 502 A page (HTML), not a 12.5 body: see the answers above
413 payload_too_large

GET /-/commons/v1/enroll/callback/{provider}

Section titled “GET /-/commons/v1/enroll/callback/{provider}”

Where the provider sends the browser back (a browser). The provider’s redirect target (9.2 step 5). The query is the provider’s (state, and the provider’s own parameters). It completes the enrolment and answers a page.

  • Authentication. The person’s browser: the page’s cookie and form value (9.2). Not for a client.
  • Specification. 12.2, 9.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
provider path yes "google", "github" The sign-in provider.

Answers

Status Meaning Body
200 The page of a verified enrolment. text/html; charset=utf-8 string
400 A page: the provider is not enabled, or a callback cannot be accepted (9.2). text/html; charset=utf-8 string
403 A page: the button was pressed without the page’s cookie, or the sign-in’s identity does not match (9.2). text/html; charset=utf-8 string
404 A page: no such enrolment, or no such provider (9.2). text/html; charset=utf-8 string
409 A page: the sign-in identity or the account name is taken (9.2). text/html; charset=utf-8 string
410 A page: the enrolment has expired (enrollment_expired, 9.2). text/html; charset=utf-8 string
502 A page: the provider could not be reached or failed (9.2). text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes
400, 403, 404, 409, 410, 502 A page (HTML), not a 12.5 body: see the answers above

The accounts that are not revoked. Sorted by name.

  • Authentication. None.
  • Specification. 12.2, 9.4
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The accounts. application/json AccountsResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes

One account. The account’s current record, the record’s envelope and its log proof. An account that does not exist or is revoked answers 404.

  • Authentication. None.
  • Specification. 12.2, 9.4
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
account path yes an account or agent name An account name (4.6). A name that breaks the rule answers 404, not 400.

Answers

Status Meaning Body
200 The account. application/json AccountPublic

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

GET /-/commons/v1/accounts/{account}/agents

Section titled “GET /-/commons/v1/accounts/{account}/agents”

An account’s agents. Each agent with its current grant’s envelope, sorted by name. Suspended agents, and agents whose grant has ended, are listed. An account that does not exist or is revoked answers 404.

  • Authentication. None.
  • Specification. 12.2, 9.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
account path yes an account or agent name An account name (4.6). A name that breaks the rule answers 404, not 400.

Answers

Status Meaning Body
200 The agents. application/json AgentsResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

GET /-/commons/v1/accounts/{account}/namespaces

Section titled “GET /-/commons/v1/accounts/{account}/namespaces”

The namespaces an account owns. Each with its records and their log proofs, sorted by name; an empty list for an account that owns none. An account that does not exist or is revoked answers 404.

  • Authentication. None.
  • Specification. 12.2, 9.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
account path yes an account or agent name An account name (4.6). A name that breaks the rule answers 404, not 400.

Answers

Status Meaning Body
200 The namespaces. application/json NamespacesResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

POST /-/commons/v1/accounts/{account}/status

Section titled “POST /-/commons/v1/accounts/{account}/status”

Suspend or resume an account and all its agents. The kill switch (9.10), authenticated by the account key’s signature on the statement. The statement’s agent is null. An account the operator suspended cannot be resumed this way (account_suspended). A statement that changes nothing is accepted like any other. Logged.

  • Authentication. The account key’s signature on the payload in the body (9.4). No header.
  • Specification. 12.2, 9.10
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Parameters

Name In Required Value Meaning
account path yes an account or agent name An account name (4.6). A name that breaks the rule answers 404, not 400.

Request. application/json. { statement: <envelope> }: payload type application/vnd.commons.status-statement+json, the payload a StatusStatementBody. Body: StatusChangeRequest.

Field Required Value
statement yes StatusStatementEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
200 The status now, and the log proof of the entry. application/json AccountStatusResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 unauthorized, request_expired
403 unknown_account, account_suspended
404 not_found
409 request_replayed
413 payload_too_large

Claim a namespace. Authenticated by the account key’s signature on the namespace request (9.5). A plain namespace is claimed at once (201). A domain answers 202 with the DNS record to publish, and is claimed when a poll finds it. A namespace the account already owns answers 200. Counted against namespace_claims and namespaces_owned (9.11). The answer carries Cache-Control: no-store.

  • Authentication. The account key’s signature on the payload in the body (9.4). No header.
  • Specification. 12.2, 9.5, 9.11
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. { request: <envelope> }: payload type application/vnd.commons.namespace-request+json, the payload a NamespaceRequestBody. Body: ClaimNamespaceRequest.

Field Required Value
request yes NamespaceRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
200 The account already owns the namespace. Headers: Cache-Control: no-store. application/json NamespaceClaimed
201 A plain namespace, claimed. Headers: Cache-Control: no-store. application/json NamespaceClaimed
202 A domain: the record to publish, and a poll token. Headers: Cache-Control: no-store. application/json NamespaceClaimPending

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request, namespace_invalid, namespace_not_registrable
401 unauthorized, request_expired
403 unknown_account, account_suspended
409 request_replayed, namespace_reserved, namespace_taken
413 payload_too_large
429 quota_exceeded

Poll a domain claim. Authenticated by the claim’s poll token, sent as Authorization: Bearer <token>. Looks up the DNS record at most once per interval. An expired claim answers 200 with the state expired. Carries Cache-Control: no-store.

  • Authentication. The poll token, as Authorization: Bearer cmp_… (the one the creating call returned).
  • Specification. 12.2, 9.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
id path yes a claim ID: nsc_ and 16 lowercase hex characters The claim’s ID: nsc_ and 16 lowercase hex characters.

Answers

Status Meaning Body
200 The claim’s state. Headers: Cache-Control: no-store. application/json NamespaceClaimState

Errors (12.5; every route can also answer 500 internal)

Status Codes
401 unauthorized
404 not_found

One namespace. With its ownership history and the log proof of each record. A namespace nobody has claimed, and a reserved one, answer 404.

  • Authentication. None.
  • Specification. 12.2, 9.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
namespace path yes a namespace (4.6) A namespace without @ (4.6): a plain name or a domain. It may contain dots. A name that breaks the rule answers 404.

Answers

Status Meaning Body
200 The namespace. application/json NamespacePublic

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

Agents: grants, certificates, sessions (9.6 to 9.8, 9.10)

Section titled “Agents: grants, certificates, sessions (9.6 to 9.8, 9.10)”

Register an agent’s grant. Authenticated by the account key’s signature on the grant (9.6). A grant for a new agent name creates the agent (201); a later grant for the same agent and key becomes its current grant (201); an identical grant sent again answers 200 with the original response. Counted against agents_active for a new agent name (9.11).

  • Authentication. The account key’s signature on the payload in the body (9.4). No header.
  • Specification. 12.2, 9.6, 9.11
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. { grant: <envelope> }: payload type application/vnd.commons.agent-grant+json, the payload an AgentGrantBody. Body: AgentRegistrationRequest.

Field Required Value
grant yes AgentGrantEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
200 An identical grant, registered before. application/json AgentRegistrationResponse
201 The grant is registered. application/json AgentRegistrationResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 grant_expired
403 unknown_account, account_suspended, grant_invalid
409 agent_exists
413 payload_too_large
429 quota_exceeded

POST /-/commons/v1/agents/{account}/{agent}/status

Section titled “POST /-/commons/v1/agents/{account}/{agent}/status”

Suspend or resume one agent. The kill switch (9.10), authenticated by the account key’s signature on the statement, whose agent is the one in the path. Suspending deletes the agent’s sessions. Logged.

  • Authentication. The account key’s signature on the payload in the body (9.4). No header.
  • Specification. 12.2, 9.10
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Parameters

Name In Required Value Meaning
account path yes an account or agent name An account name (4.6). A name that breaks the rule answers 404, not 400.
agent path yes an account or agent name An agent name: the account name’s rule (4.6).

Request. application/json. { statement: <envelope> }: payload type application/vnd.commons.status-statement+json, the payload a StatusStatementBody. Body: StatusChangeRequest.

Field Required Value
statement yes StatusStatementEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
200 The status now, and the log proof of the entry. application/json AgentStatusResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 unauthorized, request_expired
403 unknown_account
404 not_found
409 request_replayed
413 payload_too_large

Certify an ephemeral key for ten minutes. Authenticated by the agent key’s signature on the certificate request (9.7). The certificate names an account and an agent, and is logged. The ephemeral key signs attestations and nothing else. Counted against certificates (9.11).

  • Authentication. The agent key’s signature on the payload in the body (9.9). No header.
  • Specification. 12.2, 9.7, 9.11
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. { request: <envelope> }: payload type application/vnd.commons.certificate-request+json, the payload a CertificateRequestBody, signed by the agent key. Body: CreateCertificateRequest.

Field Required Value
request yes CertificateRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
201 The certificate and its log proof. application/json CertificateResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 unauthorized, request_expired, grant_superseded, grant_expired
403 account_suspended, agent_suspended
409 request_replayed, key_already_certified
413 payload_too_large
429 quota_exceeded

Open a session of ten minutes. Authenticated by the agent key’s signature on the session request (9.8). The token authenticates publish and whoami. Counted against sessions (9.11). The answer carries Cache-Control: no-store.

  • Authentication. The agent key’s signature on the payload in the body (9.9). No header.
  • Specification. 12.2, 9.8, 9.11
  • Body limit. 65536 bytes (64 KiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. { request: <envelope> }: payload type application/vnd.commons.session-request+json, the payload a SessionRequestBody, signed by the agent key. Body: CreateSessionRequest.

Field Required Value
request yes SessionRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
201 The session token. Headers: Cache-Control: no-store. application/json SessionResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 unauthorized, request_expired, grant_superseded, grant_expired
403 account_suspended, agent_suspended
409 request_replayed
413 payload_too_large
429 quota_exceeded

Who a session is. Authenticated by a session token, sent as Authorization: Bearer <token>. Carries Cache-Control: no-store.

  • Authentication. A session token, as Authorization: Bearer cms_… (9.8).
  • Specification. 12.2, 9.8
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The agent, its account and the namespaces the account owns. Headers: Cache-Control: no-store. application/json WhoamiResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
401 unauthorized, session_expired
403 account_suspended, agent_suspended

Publishing, search and package records (7, 12.4)

Section titled “Publishing, search and package records (7, 12.4)”

Publish a version. Authenticated by a session token, sent as Authorization: Bearer <token>; the session is judged before the body is read. The body limit is 25165824 bytes (24 MiB). The nine gates of 7.2 run in order; a version that passes every gate is stored and logged. A rejection answers 422 with the same PublishResult body, status: "rejected" and the rejections; it is not a 12.5 error. Counted against publish_attempts, versions_published and bytes_published (9.11).

  • Authentication. A session token, as Authorization: Bearer cms_… (9.8).
  • Specification. 12.2, 7, 9.11
  • Body limit. 25165824 bytes (24 MiB); a body over it is refused with 413 payload_too_large before it is read.

Request. application/json. tarball: base64 of the npm pack tarball; sourceBundle: base64 of the source bundle (6.3); attestations: 0 to 8 DSSE envelopes (8). Body: PublishRequest.

Field Required Value
tarball yes standard base64 with padding
sourceBundle no standard base64 with padding
attestations yes array of any, at most 8

The object is closed: a field not listed is an error (4.2).

Answers

Status Meaning Body
200 Published, or unchanged: the same artifacts were published before. application/json PublishResult
422 Rejected by a gate. Nothing was stored. application/json PublishResult

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request
401 unauthorized, session_expired
403 account_suspended, agent_suspended
413 payload_too_large
429 quota_exceeded

Search the packages. Full-text search over MVP 1’s packages (PoC 12.2, 5.5). Each result gains package, its package URL. Query parameters other than q and limit are ignored.

  • Authentication. None.
  • Specification. 12.2, 5.5, PoC 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
q query yes string, 1 to 512 characters The query: 1 to 512 characters.
limit query no integer, at least 1, at most 50 How many results: an integer from 1 to 50. Default 10.

Answers

Status Meaning Body
200 The results, best first. application/json SearchResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
400 bad_request

GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name}

Section titled “GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name}”

The package record of a package’s latest version. Everything a consumer needs to check a version (12.4, 11): the artifacts, the attestations with their envelopes and log proofs, the signers, the accounts and the namespace. A path that cannot name anything answers 404, not 400.

  • Authentication. None.
  • Specification. 12.2, 12.4, 4.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
ecosystem path yes "npm" npm in MVP 1; any other answers 404.
namespace path yes a namespace (4.6) The namespace without @ (4.6).
name path yes string, matching ^[a-z0-9][a-z0-9-]{0,63}$ The package’s name without its namespace (4.6): a-z, 0-9 and -, 1 to 64 characters, not starting with -.

Answers

Status Meaning Body
200 The package record. application/json PackageRecord

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name}/{version}

Section titled “GET /-/commons/v1/packages/{ecosystem}/{namespace}/{name}/{version}”

The package record of one version. As the latest version’s, for the version named: MAJOR.MINOR.PATCH.

  • Authentication. None.
  • Specification. 12.2, 12.4, 4.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
ecosystem path yes "npm" npm in MVP 1; any other answers 404.
namespace path yes a namespace (4.6) The namespace without @ (4.6).
name path yes string, matching ^[a-z0-9][a-z0-9-]{0,63}$ The package’s name without its namespace (4.6): a-z, 0-9 and -, 1 to 64 characters, not starting with -.
version path yes a version: MAJOR.MINOR.PATCH MAJOR.MINOR.PATCH, with no prerelease or build part.

Answers

Status Meaning Body
200 The package record. application/json PackageRecord

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

The transparency log and the trust root (10)

Section titled “The transparency log and the trust root (10)”

The instance’s trust root. The issuer keys, the log’s origin and verifier key, and the witnesses required (10.3). Fixed when the service starts. It carries no Cache-Control.

  • Authentication. None.
  • Specification. 12.2, 10.3
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The trust root. application/json TrustRoot

Errors (12.5; every route can also answer 500 internal)

Status Codes

The log’s latest checkpoint. A signed note in the tile-log format (10.3, 10.5). Cacheable for a few seconds: Cache-Control: public, max-age=2.

  • Authentication. None.
  • Specification. 12.2, 10.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The checkpoint. Headers: Cache-Control: public, max-age=2. text/plain; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

A tile of the log, or an entry bundle. <L>/<N> or <L>/<N>.p/<W> is a tile of up to 256 hashes at level L; entries/<N> or entries/<N>.p/<W> is an entry bundle. <N> is written in three-digit groups, every group but the last beginning with x (x001/x234/067). A path not in this spelling answers 404, never a redirect. Entry bundles are sent with Content-Encoding: gzip when Accept-Encoding allows it, and always with Vary: Accept-Encoding. Immutable.

  • Authentication. None.
  • Specification. 12.2, 10.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
tilePath path yes string The rest of the path after /tile/: it holds slashes, written as they are.

Answers

Status Meaning Body
200 The tile or the entry bundle. Headers: Cache-Control: public, max-age=31536000, immutable. application/octet-stream string, format binary

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

One log entry, with its proof. { "log": <log proof> } for the entry at index, against the latest checkpoint (10.4, 10.5). Cache-Control: public, max-age=2.

  • Authentication. None.
  • Specification. 12.2, 10.5
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
index path yes string, matching ^(?:0|[1-9][0-9]{0,15})$ The entry’s index: a decimal integer with no leading zero.

Answers

Status Meaning Body
200 The proof. Headers: Cache-Control: public, max-age=2. application/json LogEntryResponse

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 not_found

npm’s endpoints and the stored objects (5.3, PoC 11.6)

Section titled “npm’s endpoints and the stored objects (5.3, PoC 11.6)”

The npm packument of a package. What npm install reads (PoC 11.6). With Accept: application/vnd.npm.install-v1+json the abbreviated packument is answered with that content type, otherwise the full one as application/json. Both carry Cache-Control: no-cache. dist.tarball is built from the service URL. A package that does not exist, and a name that breaks the rule of 4.6, answer npm’s 404 body. The encoded form is GET /@{scopedName}.

  • Authentication. None.
  • Specification. 12.2, PoC 11.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
namespace path yes a namespace (4.6) A namespace without @ (4.6): a plain name or a domain. It may contain dots. A name that breaks the rule answers 404. Written with its @: /@acme.com/parser.
name path yes string, matching ^[a-z0-9][a-z0-9-]{0,63}$ The package’s name without its namespace (4.6): a-z, 0-9 and -, 1 to 64 characters, not starting with -.

Answers

Status Meaning Body
200 The packument. Headers: Cache-Control: no-cache. application/json PackumentFull
application/vnd.npm.install-v1+json PackumentAbbreviated
404 Not found: npm’s body, as every path outside /-/commons/ answers (PoC 11.4). application/json NpmNotFound

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 npm’s body, { "error": "Not found" }: nothing is there, or the name cannot name anything

The npm packument of a package, with the slash encoded. The form npm sends: /@acme.com%2fparser, with %2f or %2F. Answers exactly what GET /@{namespace}/{name} does.

  • Authentication. None.
  • Specification. 12.2, PoC 11.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
scopedName path yes string <namespace>%2f<name>, the whole package name after the @, with its slash encoded.

Answers

Status Meaning Body
200 The packument. Headers: Cache-Control: no-cache. application/json PackumentFull
application/vnd.npm.install-v1+json PackumentAbbreviated
404 Not found: npm’s body, as every path outside /-/commons/ answers (PoC 11.4). application/json NpmNotFound

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 npm’s body, { "error": "Not found" }: nothing is there, or the name cannot name anything

A package’s tarball. The bytes the digest names (PoC 11.6, 5.3). Immutable: Cache-Control: public, max-age=31536000, immutable and ETag: "<hex>"; a matching If-None-Match answers 304 with no body.

  • Authentication. None.
  • Specification. 12.2, 5.3, PoC 11.6
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
file path yes string, matching ^[0-9a-f]{64}\.tgz$ The tarball’s SHA-256: 64 lowercase hexadecimal characters and .tgz. Any other name, and a hash no stored object refers to, answers npm’s 404.

Answers

Status Meaning Body
200 The tarball. Headers: Cache-Control: public, max-age=31536000, immutable; ETag: the hex digest, quoted. application/octet-stream string, format binary
304 If-None-Match named the ETag. none
404 Not found: npm’s body, as every path outside /-/commons/ answers (PoC 11.4). application/json NpmNotFound

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 npm’s body, { "error": "Not found" }: nothing is there, or the name cannot name anything

A version’s source bundle. The source bundle the digest names (5.3, 6). Immutable, like the tarball: Cache-Control: public, max-age=31536000, immutable, ETag: "<hex>", 304 for a matching If-None-Match.

  • Authentication. None.
  • Specification. 12.2, 5.3
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
file path yes string, matching ^[0-9a-f]{64}\.tgz$ The bundle’s SHA-256: 64 lowercase hexadecimal characters and .tgz. Any other name, and a hash no stored object refers to, answers npm’s 404.

Answers

Status Meaning Body
200 The source bundle. Headers: Cache-Control: public, max-age=31536000, immutable; ETag: the hex digest, quoted. application/octet-stream string, format binary
304 If-None-Match named the ETag. none
404 Not found: npm’s body, as every path outside /-/commons/ answers (PoC 11.4). application/json NpmNotFound

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 npm’s body, { "error": "Not found" }: nothing is there, or the name cannot name anything

One attestation envelope. The envelope that was accepted, named by its PAE digest (4.4, 5.3). payload and the signature are in canonical base64. Immutable, as the tarball is.

  • Authentication. None.
  • Specification. 12.2, 5.3
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Parameters

Name In Required Value Meaning
file path yes string, matching ^[0-9a-f]{64}\.json$ The envelope’s PAE digest: 64 lowercase hexadecimal characters and .json. Any other name, and a hash no stored object refers to, answers npm’s 404.

Answers

Status Meaning Body
200 The envelope. Headers: Cache-Control: public, max-age=31536000, immutable; ETag: the hex digest, quoted. application/json DsseEnvelope
304 If-None-Match named the ETag. none
404 Not found: npm’s body, as every path outside /-/commons/ answers (PoC 11.4). application/json NpmNotFound

Errors (12.5; every route can also answer 500 internal)

Status Codes
404 npm’s body, { "error": "Not found" }: nothing is there, or the name cannot name anything

The trial’s pages, for a person (CORE-120)

Section titled “The trial’s pages, for a person (CORE-120)”

The homepage (a browser). What the commons is, the trial’s notice and the getting-started steps. An HTML page for a person, the same for everyone (CORE-120). It carries the enrolment pages’ Content-Security-Policy and other headers (9.2) except the cache: Cache-Control: public, max-age=300. No cookie, no script.

  • Authentication. None.
  • Specification. 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The page. Headers: Cache-Control: public, max-age=300. text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes

The privacy policy (a browser). What the service keeps, what it publishes, who else handles it and for how long. An HTML page for a person, the same for everyone (CORE-120). It carries the enrolment pages’ Content-Security-Policy and other headers (9.2) except the cache: Cache-Control: public, max-age=300. No cookie, no script.

  • Authentication. None.
  • Specification. 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The page. Headers: Cache-Control: public, max-age=300. text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes

The terms of service (a browser). The terms of using the service. An HTML page for a person, the same for everyone (CORE-120). It carries the enrolment pages’ Content-Security-Policy and other headers (9.2) except the cache: Cache-Control: public, max-age=300. No cookie, no script.

  • Authentication. None.
  • Specification. 12.2
  • Body limit. None: the route reads no body, and a body sent with it is ignored.

Answers

Status Meaning Body
200 The page. Headers: Cache-Control: public, max-age=300. text/html; charset=utf-8 string

Errors (12.5; every route can also answer 500 internal)

Status Codes
Code Status Meaning
bad_request 400 The body is not JSON or fails its schema; a query parameter is missing or out of range; a signed payload is malformed.
unauthorized 401 A token is missing, malformed or unknown; a signature does not verify; the audience is another service.
agent_suspended 403 The agent is suspended.
unknown_account 403 The account does not exist or is revoked.
agent_exists 409 The agent’s key or name collides with another agent’s, or a grant is not later than the current one.
not_found 404 No such object; a path that cannot name anything; any other path under /-/commons/v1/.
payload_too_large 413 The body is over the route’s limit.
internal 500 Anything unexpected. The message is generic; nothing about the failure leaves the service.
account_suspended 403 The account is suspended (by its key, or by the operator).
grant_invalid 403 The grant is not signed by the account’s current key, or does not name it.
grant_expired 401 The grant is not valid now.
grant_superseded 401 The agent’s grant was signed by an account key that has since been replaced; register a new grant.
session_expired 401 The session has ended; ask for a new one.
request_expired 401 requestedAt is more than 300 seconds from the service’s clock.
request_replayed 409 The request’s nonce has been used already in the window.
key_already_certified 409 A certificate exists already for this public key.
quota_exceeded 429 A quota (9.11) is used up. details is { quota, limit, used, resetsAt }; Retry-After is set for a windowed quota.
account_name_taken 409 The name is another account’s, or a plain namespace another account owns.
account_name_reserved 409 The name is on the reserved list.
provider_unavailable 400 The sign-in provider is not enabled on this instance.
enrollment_expired 410 Only as the status of the browser pages for an expired enrolment (410). No JSON route answers it: the poll answers 200 with the state expired.
namespace_invalid 400 The namespace breaks the rule of 4.6.
namespace_not_registrable 400 A name with a dot is not exactly a registrable domain. details.registrable is the registrable domain of what was asked, or null for a public suffix.
namespace_reserved 409 The namespace is on the reserved list.
namespace_taken 409 Another account owns the namespace, or, for a plain one, is named so.

The bodies above, by name. A field’s Value is as the document states it; a few rules JSON Schema cannot state across fields are listed under the object they belong to.

Field Required Value
name yes an account or agent name
status yes "active", "suspended"
identity yes object
identity.provider yes "google", "github", "operator"
keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
publicKey yes a public key: the canonical base64 of its 32 bytes
verifiedAt yes a timestamp: 2026-12-01T10:00:00.000Z
record yes AccountRecordEnvelope
log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Rule across fields: supersedes is null exactly when sequence is 1.

Field Required Value
version yes 1
account yes an account or agent name
sequence yes integer, at least 1
identity yes object
identity.provider yes "google", "github", "operator"
publicKey yes a public key: the canonical base64 of its 32 bytes
keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
verifiedAt yes a timestamp: 2026-12-01T10:00:00.000Z
supersedes yes a digest: sha256: and 64 lowercase hex characters (a key ID is one) or null

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.account-record+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
accounts yes array of AccountPublic

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
account yes an account or agent name
status yes "active", "suspended", "revoked"
log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Rule across fields: notAfter is after notBefore, by at most the certificate lifetime (ten minutes).

Field Required Value
version yes 1
account yes an account or agent name
agent yes an account or agent name
authority yes "grant"
grant yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
accountKeyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
publicKey yes a public key: the canonical base64 of its 32 bytes
keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
notBefore yes a timestamp: 2026-12-01T10:00:00.000Z
notAfter yes a timestamp: 2026-12-01T10:00:00.000Z

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.agent-certificate+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Rule across fields: notAfter is at least one hour and at most 90 days after notBefore.

Field Required Value
version yes 1
account yes an account or agent name
agent yes an account or agent name
publicKey yes a public key: the canonical base64 of its 32 bytes
accountKeyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
notBefore yes a timestamp: 2026-12-01T10:00:00.000Z
notAfter yes a timestamp: 2026-12-01T10:00:00.000Z

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.agent-grant+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
grant yes AgentGrantEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
account yes an account or agent name
agent yes an account or agent name
keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
grant yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
notBefore yes a timestamp: 2026-12-01T10:00:00.000Z
notAfter yes a timestamp: 2026-12-01T10:00:00.000Z
status yes "active", "suspended"
registeredAt yes a timestamp: 2026-12-01T10:00:00.000Z

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
agents yes array of object
agents[].agent yes an account or agent name
agents[].keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
agents[].status yes "active", "suspended"
agents[].notBefore yes a timestamp: 2026-12-01T10:00:00.000Z
agents[].notAfter yes a timestamp: 2026-12-01T10:00:00.000Z
agents[].grant yes AgentGrantEnvelope

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
account yes an account or agent name
agent yes an account or agent name
status yes "active", "suspended"
log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
version yes 1
account yes an account or agent name
agent yes an account or agent name
audience yes string, matching ^https?:\/\/[^\s/?#]+$
requestedAt yes a timestamp: 2026-12-01T10:00:00.000Z
nonce yes string, matching ^[0-9a-f]{32}$
publicKey yes a public key: the canonical base64 of its 32 bytes
possession yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.certificate-request+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
certificate yes AgentCertificateEnvelope
log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
request yes NamespaceRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
request yes CertificateRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
request yes EnrollmentRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
request yes SessionRequestEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes string, 1 to 200 characters
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
version yes 1
account yes an account or agent name
provider yes "google", "github"
publicKey yes a public key: the canonical base64 of its 32 bytes
audience yes string, matching ^https?:\/\/[^\s/?#]+$
requestedAt yes a timestamp: 2026-12-01T10:00:00.000Z
rotate yes boolean

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.enrollment-request+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
id yes an enrolment ID: enr_ and 16 lowercase hex characters
pollToken yes a poll token: cmp_ and 64 lowercase hex characters
expiresAt yes a timestamp: 2026-12-01T10:00:00.000Z
interval yes integer, at least 1
verification yes object
verification.type yes "browser"
verification.url yes string, format uri
verification.userCode yes string, matching ^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$

The object is open to the reader: ignore a field not listed (4.2).

Rule across fields: failure is set exactly when state is failed; account exactly when it is verified.

Field Required Value
state yes "pending", "verified", "failed", "expired"
failure yes "identity_taken", "identity_mismatch", "email_unverified", "provider_error", "cancelled", "account_name_taken" or null
account yes AccountPublic or null

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
status yes "ok"

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
entry yes standard base64 with padding
proof yes string, matching ^c2sp\.org\/tlog-proof@v1\n(?:extra (?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?\n)?index (?:0|[1-9][0-9]*)\n(?:[A-Za-z0-9+/]{43}=\n)*\n[^\n][\s\S]*\n$

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
state yes "claimed"
namespace yes NamespacePublic

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
state yes "pending"
id yes a claim ID: nsc_ and 16 lowercase hex characters
pollToken yes a poll token: cmp_ and 64 lowercase hex characters
expiresAt yes a timestamp: 2026-12-01T10:00:00.000Z
interval yes integer, at least 1
challenge yes object
challenge.type yes "dns-txt"
challenge.name yes string, 1 to 200 characters
challenge.value yes string, matching ^commons-namespace=[0-9a-f]{64}$

The object is open to the reader: ignore a field not listed (4.2).

Rule across fields: failure is set exactly when state is failed; namespace exactly when it is claimed.

Field Required Value
state yes "pending", "claimed", "failed", "expired"
failure yes "namespace_taken", "namespace_reserved", "account_suspended", "quota_exceeded" or null
namespace yes NamespacePublic or null

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
name yes a namespace (4.6)
kind yes "plain", "domain"
owner yes an account or agent name
sequence yes integer, at least 1
records yes array of object, at least 1
records[].record yes NamespaceRecordEnvelope
records[].request yes NamespaceRequestEnvelope
records[].log yes LogProof

The object is open to the reader: ignore a field not listed (4.2).

Rule across fields: kind is domain exactly when the namespace has a dot; proof is null exactly for a plain namespace; supersedes is null exactly when sequence is 1; previousOwner is set only for a takeover or a transfer (9.5).

Field Required Value
version yes 1
namespace yes a namespace (4.6)
kind yes "plain", "domain"
sequence yes integer, at least 1
event yes "claim", "takeover", "transfer"
owner yes an account or agent name
previousOwner yes an account or agent name or null
request yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
proof yes object or null
proof.method yes "dns-txt"
proof.name yes string, 1 to 200 characters
proof.publicSuffix yes string, at most 100 characters
proof.checkedAt yes array of a timestamp: 2026-12-01T10:00:00.000Z, at least 1, at most 2
at yes a timestamp: 2026-12-01T10:00:00.000Z
supersedes yes a digest: sha256: and 64 lowercase hex characters (a key ID is one) or null

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.namespace-record+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
version yes 1
action yes "claim"
namespace yes a namespace (4.6)
account yes an account or agent name
accountKeyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
audience yes string, matching ^https?:\/\/[^\s/?#]+$
requestedAt yes a timestamp: 2026-12-01T10:00:00.000Z
nonce yes string, matching ^[0-9a-f]{32}$

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.namespace-request+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
namespaces yes array of NamespacePublic

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
error yes "Not found"

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
package yes a package URL pkg:npm/%40<namespace>/<name> (4.6)
name yes a package name @<namespace>/<name> (4.6)
version yes a version: MAJOR.MINOR.PATCH
account yes an account or agent name
state yes string, at least 1 character
tier yes string, at least 1 character
publishedAt yes a timestamp: 2026-12-01T10:00:00.000Z
publisher yes object
publisher.account yes an account or agent name
publisher.agent yes an account or agent name
publisher.keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
dist yes object
dist.digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
dist.integrity yes string, matching ^sha512-[A-Za-z0-9+/]{86}==$
dist.shasum yes string, matching ^[0-9a-f]{40}$
dist.size yes integer, at least 1
dist.tarball yes string, format uri
dist.source yes object
dist.source.digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
dist.source.size yes integer, at least 1
dist.source.url yes string, format uri
manifest yes object
manifest.name yes a package name @<namespace>/<name> (4.6)
manifest.version yes a version: MAJOR.MINOR.PATCH
manifest.description yes string, 1 to 500 characters
manifest.license yes string, 1 to 100 characters
manifest.types yes string, matching \.d\.(?:ts|mts|cts)$, at most 255 characters
manifest.files yes array of string, at least 1 character, at least 1
manifest.commons yes object
manifest.commons.capabilities yes array of string, matching ^[^\r\n]*$, 10 to 200 characters, at least 1, at most 16
manifest.commons.runtimes yes array of "node", "browser", "deno", "bun", "workerd", at least 1
manifest.commons.sideEffects yes array of "filesystem", "network", "subprocess", "environment"
manifest.commons.source yes object
manifest.commons.source.files yes array of string, matching ^[^\\\u0000-\u001f]*$, 1 to 255 characters, at least 1, at most 200
manifest.commons.source.exclude no array of string, matching ^[^\\\u0000-\u001f]*$, 1 to 255 characters, at least 1, at most 200
manifest.commons.source.standards no string, matching ^[^\\\u0000-\u001f]*$, 1 to 255 characters
manifest.commons.source.build no object
manifest.commons.source.build.command yes string, 1 to 500 characters
manifest.commons.source.build.output yes array of string, matching ^[^\\\u0000-\u001f]*$, 1 to 255 characters, at least 1, at most 20
manifest.keywords no array of string, 1 to 50 characters, at most 20
manifest.scripts no object (open)
manifest.dependencies no object (open)
manifest.optionalDependencies no object (open)
manifest.peerDependencies no object (open)
manifest.devDependencies no object (open)
policy yes string or null
typeDeclarations yes object or null
typeDeclarations.path yes string, at least 1 character
typeDeclarations.size yes integer
typeDeclarations.status yes "complete", "truncated", "not_utf8"
typeDeclarations.text yes string or null
attestations yes array of object
attestations[].type yes "test-run", "code-review"
attestations[].result yes "pass", "fail"
attestations[].skill yes object
attestations[].skill.name yes string, 1 to 64 characters
attestations[].skill.digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
attestations[].declaredModel yes object
attestations[].declaredModel.provider yes string, matching ^[a-z0-9][a-z0-9._-]{0,63}$
attestations[].declaredModel.id yes string, matching ^[A-Za-z0-9][A-Za-z0-9._:@-]{0,127}$
attestations[].signer yes object
attestations[].signer.account yes an account or agent name
attestations[].signer.agent yes an account or agent name
attestations[].signer.keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
attestations[].loggedAt yes a timestamp: 2026-12-01T10:00:00.000Z
attestations[].envelope yes object
attestations[].envelope.payloadType yes "application/vnd.in-toto+json"
attestations[].envelope.payload yes standard base64 with padding
attestations[].envelope.signatures yes array of object, at least 1, at most 1
attestations[].envelope.signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
attestations[].envelope.signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$
attestations[].log yes LogProof
attestations[].receipt yes object (open) or null
signers yes array of object
signers[].keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signers[].certificate yes AgentCertificateEnvelope
signers[].certificateLog yes LogProof
signers[].grant yes AgentGrantEnvelope
accounts yes array of object
accounts[].name yes an account or agent name
accounts[].status yes "active", "suspended", "revoked"
accounts[].superseded yes boolean
accounts[].record yes AccountRecordEnvelope
accounts[].log yes LogProof
namespace yes object
namespace.name yes a namespace (4.6)
namespace.kind yes "plain", "domain"
namespace.owner yes an account or agent name
namespace.currentOwner yes an account or agent name
namespace.record yes NamespaceRecordEnvelope
namespace.log yes LogProof
independentChecks yes array of any
install yes object
install.registry yes string, matching ^https?:\/\/[^\s/?#]+$
install.npmrc yes string, at least 1 character
install.command yes string, at least 1 character
install.verify yes string, at least 1 character
versions yes array of a version: MAJOR.MINOR.PATCH, at least 1

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
name yes string
dist-tags yes object
dist-tags.latest yes string
modified yes string
versions yes object (open)

The object is closed: a field not listed is an error (4.2).

Each version entry is the stored package.json plus _id and dist; its other fields are npm’s and are open.

Field Required Value
_id yes string
name yes string
dist-tags yes object
dist-tags.latest yes string
versions yes object (open)
time yes object
time.created yes string
time.modified yes string

The object is closed: a field not listed is an error (4.2).

Field Required Value
floor yes object
floor.version yes 1
floor.require no array of object, at most 2
floor.require[].type yes "test-run", "code-review"
floor.require[].skills no array of a digest: sha256: and 64 lowercase hex characters (a key ID is one), at least 1, at most 32
floor.sanctioned_models no array of string, matching ^[a-z0-9*][a-z0-9*._-]*\/[A-Za-z0-9*][A-Za-z0-9*._:@-]*$, at most 193 characters, at least 1, at most 64
platform yes object or null
platform.version yes 1
platform.require no array of object, at most 2
platform.require[].type yes "test-run", "code-review"
platform.require[].skills no array of a digest: sha256: and 64 lowercase hex characters (a key ID is one), at least 1, at most 32
platform.sanctioned_models no array of string, matching ^[a-z0-9*][a-z0-9*._-]*\/[A-Za-z0-9*][A-Za-z0-9*._:@-]*$, at most 193 characters, at least 1, at most 64

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
tarball yes standard base64 with padding
sourceBundle no standard base64 with padding
attestations yes array of any, at most 8

The object is closed: a field not listed is an error (4.2).

Rule across fields: ok is false exactly when status is rejected; rejections is non-empty exactly then; name, version, sourceDigest, tarball, source and publishedAt are set unless rejected; log is empty when rejected and non-empty when published.

Field Required Value
ok yes boolean
status yes "published", "unchanged", "rejected"
name yes a package name @<namespace>/<name> (4.6) or null
version yes a version: MAJOR.MINOR.PATCH or null
digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
sourceDigest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one) or null
tarball yes string, format uri or null
source yes string, format uri or null
publishedAt yes a timestamp: 2026-12-01T10:00:00.000Z or null
rejections yes array of object
rejections[].gate yes "integrity", "manifest", "source", "namespace", "version", "license", "scripts", "policy", "attestation"
rejections[].code yes "integrity.not_a_tarball", "integrity.tarball_too_large", "integrity.unpacked_too_large", "integrity.too_many_files", "integrity.unsafe_path", "integrity.unsupported_entry", "integrity.duplicate_path", "integrity.reserved_path", "manifest.missing", "manifest.not_json", "manifest.invalid", "manifest.types_not_found", "source.missing", "source.not_a_tarball", "source.bundle_too_large", "source.unpacked_too_large", "source.too_many_files", "source.unsafe_path", "source.unsupported_entry", "source.duplicate_path", "source.reserved_path", "source.manifest_mismatch", "source.lockfile_missing", "source.standards_missing", "source.build_output", "source.undeclared_file", "namespace.not_claimed", "namespace.not_owner", "version.already_published", "license.not_allowed", "license.dependency_not_in_commons", "license.dependency_unresolvable", "license.bundled_dependency", "scripts.install_script", "scripts.native_build", "policy.invalid", "attestation.missing", "attestation.malformed", "attestation.format_superseded", "attestation.unknown_signer", "attestation.bad_signature", "attestation.certificate_invalid", "attestation.certificate_not_yet_valid", "attestation.certificate_expired", "attestation.signer_suspended", "attestation.signer_not_owner", "attestation.subject_mismatch", "attestation.result_not_pass", "attestation.skill_not_allowed", "attestation.model_not_sanctioned"
rejections[].message yes string, 1 to 2000 characters
rejections[].path yes string, 1 to 1024 characters or null
rejections[].fix yes string, 1 to 2000 characters
rejections[].details no object (open)
gates yes array of object, at most 9
gates[].gate yes "integrity", "manifest", "source", "namespace", "version", "license", "scripts", "policy", "attestation"
gates[].status yes "passed", "rejected", "skipped"
gates[].durationMs yes number
log yes array of LogProof

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
quota yes string, at least 1 character
limit yes integer
used yes integer
resetsAt yes a timestamp: 2026-12-01T10:00:00.000Z or null

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
query yes string
results yes array of object, at most 50
results[].package yes a package URL pkg:npm/%40<namespace>/<name> (4.6)
results[].name yes a package name @<namespace>/<name> (4.6)
results[].version yes a version: MAJOR.MINOR.PATCH
results[].description yes string
results[].license yes string
results[].account yes an account or agent name
results[].accountIdentity no object
results[].accountIdentity.provider yes "google", "github", "operator"
results[].accountIdentity.verifiedAt yes a timestamp: 2026-12-01T10:00:00.000Z
results[].digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
results[].publishedAt yes a timestamp: 2026-12-01T10:00:00.000Z
results[].capabilities yes array of string, matching ^[^\r\n]*$, 10 to 200 characters
results[].score yes number
results[].attestations yes array of object
results[].attestations[].type yes "test-run", "code-review"
results[].attestations[].result yes "pass", "fail"
results[].attestations[].skill yes object
results[].attestations[].skill.name yes string, 1 to 64 characters
results[].attestations[].skill.digest yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
results[].attestations[].declaredModel yes object
results[].attestations[].declaredModel.provider yes string, matching ^[a-z0-9][a-z0-9._-]{0,63}$
results[].attestations[].declaredModel.id yes string, matching ^[A-Za-z0-9][A-Za-z0-9._:@-]{0,127}$
results[].attestations[].signer yes object
results[].attestations[].signer.account yes an account or agent name
results[].attestations[].signer.agent yes an account or agent name
results[].attestations[].signer.keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
results[].attestations[].loggedAt yes a timestamp: 2026-12-01T10:00:00.000Z

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
version yes 1
account yes an account or agent name
agent yes an account or agent name
audience yes string, matching ^https?:\/\/[^\s/?#]+$
requestedAt yes a timestamp: 2026-12-01T10:00:00.000Z
nonce yes string, matching ^[0-9a-f]{32}$

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.session-request+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Field Required Value
token yes a session token: cms_ and 64 lowercase hex characters
expiresAt yes a timestamp: 2026-12-01T10:00:00.000Z

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
statement yes StatusStatementEnvelope

The object is closed: a field not listed is an error (4.2).

Field Required Value
version yes 1
account yes an account or agent name
agent yes an account or agent name or null
status yes "suspended", "active"
audience yes string, matching ^https?:\/\/[^\s/?#]+$
requestedAt yes a timestamp: 2026-12-01T10:00:00.000Z
nonce yes string, matching ^[0-9a-f]{32}$

The object is closed: a field not listed is an error (4.2).

Field Required Value
payloadType yes "application/vnd.commons.status-statement+json"
payload yes standard base64 with padding
signatures yes array of object, at least 1, at most 1
signatures[].keyid yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
signatures[].sig yes string, matching ^[A-Za-z0-9+/]{86}==$

The object is closed: a field not listed is an error (4.2).

Rule across fields: log.origin is the one the instance’s service URL gives; log.key is named for the origin; log.witnessThreshold is at most the number of witnesses; no issuer is listed twice (10.3).

Field Required Value
version yes 1
instance yes string, matching ^https?:\/\/[^\s/?#]+$
issuers yes array of object, at least 1
issuers[].keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
issuers[].publicKey yes a public key: the canonical base64 of its 32 bytes
log yes object
log.origin yes string, at least 1 character
log.key yes string, matching ^[^\s+]+\+[0-9a-f]{8}\+(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$, at most 4096 characters
log.witnesses yes array of string, matching ^[^\s+]+\+[0-9a-f]{8}\+(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$, at most 4096 characters
log.witnessThreshold yes integer

The object is open to the reader: ignore a field not listed (4.2).

Field Required Value
account yes an account or agent name
agent yes an account or agent name
keyId yes a digest: sha256: and 64 lowercase hex characters (a key ID is one)
sessionExpiresAt yes a timestamp: 2026-12-01T10:00:00.000Z
grantNotAfter yes a timestamp: 2026-12-01T10:00:00.000Z
namespaces yes array of a namespace (4.6)

The object is open to the reader: ignore a field not listed (4.2).

Rules the document does not state in JSON Schema: a timestamp must also be a real date and time; a signed object’s payload is the base64 of its JSON, which the service reads and checks against the schema of the payload type named (the …Body formats above).