neoopensource agent API (v1)
<!-- Generated from crates/jit-api/src/registry.rs and types.rs. Do not edit by hand:
run cargo xtask docs (or JIT_UPDATE_DOCS=1 cargo test -p jit-api api_md). A test fails when this file is stale. -->
The same information is served by a running instance: /llms.txt (a guide for agents), /v1/openapi.json (OpenAPI
3.1) and GET /v1 (the endpoint list). Wire conventions (the envelope, limits in every answer, bounded lists,
cursors, errors, idempotency, events) are in docs/contracts/jit-api.md section 2 and are not repeated per endpoint.
Note: Idempotency-Key answers are kept in memory only and do not survive a restart or a crash (every deploy
restarts the server); for a write that must not happen twice, use the conditional fields (expect on commits).
Budgets are p50/p99 on a single warm node, measured by cargo xtask bench (see docs/BENCHMARKS.md); a regression
fails CI.
Endpoints
| Endpoint | What it answers | Scope | Budget p50/p99 |
|---|
GET /v1/health | Liveness and version. | none | 1/5 ms |
GET /v1 | What this service is: every endpoint with its scope and budget, and links to the guide. | none | 1/5 ms |
GET /v1/openapi.json | OpenAPI 3.1 description of this API, generated from the same table as the routes. | none | 1/5 ms |
GET /v1/whoami | Who the token is, for whom it acts, what it may do, and its limits. | none | 2/10 ms |
POST /v1/principals | Make a principal's public key known to this instance, so tokens it mints are accepted. | admin | 10/50 ms |
PUT /v1/grants/{principal} | Set what a principal may do instance-wide (creating repositories needs admin here). | admin | 10/50 ms |
PUT /v1/repos/{repo}/grants/{principal} | Set what a principal may do on one repository. | admin | 10/50 ms |
POST /v1/repos/{repo}/tokens | Mint a runner's token: one principal, this repository only, read + change_write (push only if asked). | admin | 10/50 ms |
POST /v1/repos/{repo}/tokens/revoke | Revoke a runner token of this repository by its revocation id: it and what was narrowed from it stop at once. | admin | 10/50 ms |
POST /v1/tokens/revoke | Needs a token. Revoke this request's token (no body), or as instance admin any token by revocation id; add "unseen": true for an id never seen here. | none | 10/50 ms |
POST /v1/repos | Create a repository. | admin | 10/50 ms |
GET /v1/repos | List repositories the caller can read; owner for one account's (u-…/…). | read | 5/25 ms |
GET /v1/repos/{repo} | One repository: default branch, head commit, clone URL, event cursor, ref-log size. | read | 2/10 ms |
POST /v1/repos/{repo}/withhold | Instance admin only: take part of a repository down, deleting nothing. refs covers the names and what only they reach, not what others reach; record, not its commits. | admin | 10/50 ms |
POST /v1/repos/{repo}/restore | Instance admin only: lift one withholding by its withheld entry's seq, as a signed restored entry. Others stay in force: lifting a narrower one serves nothing a wider one covers. | admin | 10/50 ms |
GET /v1/repos/{repo}/withholdings | The withholdings in force here, oldest first: seq, scope, reason, reference. Readable under any withholding, like the log. Lists every signer's; binding marks this host's, the only ones it enforces. | read | 10/50 ms |
GET /v1/admin/accounts/{account} | Instance admin only (an unnarrowed token): an account's state, handle and counts. No identity. Alive whatever JIT_SIGNUP says. | admin | 5/25 ms |
POST /v1/admin/accounts/{account}/suspend | Instance admin only: suspend an account. Its tokens are refused from the next request; its keys are retired for good. | admin | 10/50 ms |
POST /v1/admin/accounts/{account}/restore | Instance admin only: lift a suspension. No session, key or token comes back. | admin | 10/50 ms |
GET /v1/repos/{repo}/refs | List refs, optionally under a prefix. | read | 2/10 ms |
GET /v1/repos/{repo}/refs/{name} | Read one ref. | read | 2/10 ms |
GET /v1/repos/{repo}/commit | Read one commit. | read | 2/10 ms |
GET /v1/repos/{repo}/log | History from a revision, newest first, optionally only commits touching a path. | read | 10/50 ms |
GET /v1/repos/{repo}/tree | List a directory at a revision. | read | 5/25 ms |
GET /v1/repos/{repo}/blob | Read a file at a revision. | read | 5/25 ms |
GET /v1/repos/{repo}/diff | Diff two revisions. | read | 10/50 ms |
GET /v1/repos/{repo}/files | Read a directory with its files and their content. | read | 10/50 ms |
POST /v1/repos/{repo}/commits | Commit up to 1000 files to a branch without a clone: one commit on base; the branch is set to it. | push | 50/200 ms |
POST /v1/repos/{repo}/changes | Propose a change: a stable id over an evolving stack of commits. | change_write | 10/50 ms |
GET /v1/repos/{repo}/changes | List changes. | read | 10/50 ms |
GET /v1/repos/{repo}/changes/{change} | The state of a change in one answer: revisions, diff stat, checks, reviews, conflicts, queue. | read | 10/50 ms |
POST /v1/repos/{repo}/changes/{change}/revisions | Add a revision to a change (what a force-push becomes). Earlier revisions stay readable. | change_write | 10/50 ms |
PUT /v1/repos/{repo}/changes/for/{branch} | The open change for a branch, or open one: revised when the branch moved, never retitled. Idempotent. | change_write | 10/50 ms |
GET /v1/repos/{repo}/changes/{change}/interdiff | What changed between two revisions of a change. | read | 10/50 ms |
POST /v1/repos/{repo}/changes/{change}/checks | Report a check result on a revision of a change (the same name again replaces it). | change_write | 10/50 ms |
POST /v1/repos/{repo}/claims | Claim a task or a set of paths for a while, so others see it before they start. | claim | 5/25 ms |
GET /v1/repos/{repo}/claims | Active claims. | read | 5/25 ms |
POST /v1/repos/{repo}/claims/{claim}/renew | Extend a claim's lease. | claim | 5/25 ms |
DELETE /v1/repos/{repo}/claims/{claim} | Release a claim before it expires. | claim | 5/25 ms |
GET /v1/repos/{repo}/sync | What changed since a cursor, folded into state: moved refs, touched changes, active claims. | read | 10/50 ms |
GET /v1/repos/{repo}/work | What the caller could do next: its changes needing action, reviews it could give, claims to avoid. | read | 10/50 ms |
GET /v1/repos/{repo}/events | The repository's ordered event stream (SSE), resumable from a cursor; or one JSON page with wait_ms. | read | 5/25 ms |
GET /v1/events | The firehose: events of every repository the token can read, in one ordered stream. | read | 5/25 ms |
GET /v1/repos/{repo}/reflog/head | The signed head (checkpoint) of the repository's append-only ref log. | read | 5/25 ms |
GET /v1/repos/{repo}/reflog | Entries of the signed ref log, oldest first: who moved which ref, for whom, with which token. | read | 5/25 ms |
GET /v1/repos/{repo}/reflog/proof | Proof that one entry is in the signed log: its RFC 9162 audit path; readable whatever is withheld. | read | 10/50 ms |
GET /v1/repos/{repo}/reflog/consistency | Proof that the signed log only grew between two sizes (RFC 9162); readable whatever is withheld. | read | 10/50 ms |
GET /v1/repos/{repo}/bundle | The repository as one signed bundle file, verifiable offline. | read | 10/50 ms |
GET /v1/repos/{repo}/queue | One target's landing queue: who is in line, and the candidates being checked. | read | 10/50 ms |
GET /v1/repos/{repo}/queue/candidates | Candidates that still need a check, front first: what a rule's reporter runs next. | read | 10/50 ms |
POST /v1/repos/{repo}/queue/candidates/{candidate}/checks | Report a rule's check on a candidate; passed lands it in its turn. | change_write | 10/50 ms |
GET /v1/repos/{repo}/landing-rules | The repository's landing rules: which changes land by themselves, and on which check. | read | 5/25 ms |
PUT /v1/repos/{repo}/landing-rules | Replace the repository's landing rules (the whole list). | admin | 5/25 ms |
DELETE /v1/repos/{repo}/landing-rules | Remove every landing rule of the repository: nothing lands by itself any more. | admin | 5/25 ms |
POST /v1/feedback | Send feedback about this instance: stores the text, CLI version and diagnostics if sent, and the token's principal. Its id is the only way to read its status. | none | 10/50 ms |
GET /v1/feedback/{id} | What became of one feedback item: its state, kind, the change it led to and a one-line reply. | none | 5/25 ms |
GET /v1/admin/feedback | Feedback items, oldest first. Needs instance review (feedback triage) or instance admin. | review | 5/25 ms |
GET /v1/admin/feedback/{id} | One feedback item in full. Needs instance review (feedback triage) or instance admin. | review | 5/25 ms |
PATCH /v1/admin/feedback/{id} | Triage a feedback item: state, kind, the change it led to, a reply. Needs instance review (feedback triage) or instance admin. | review | 10/50 ms |
DELETE /v1/admin/feedback/{id} | Delete a feedback item for good: its id names nothing from then on. Instance admin only. | admin | 10/50 ms |
POST /v1/batch | Up to 32 reads in one round trip. | none | 10/50 ms |
POST /v1/session/start | Only when sign-up is on. Start a login: a state for the login page and a nonce for the browser's cookie. | none | 5/25 ms |
POST /v1/session/exchange | Only when sign-up is on. Finish a login: its state and nonce and Privy's two tokens become a session. | none | 20/100 ms |
POST /v1/session/end | Sign out: end this session, or with everywhere every session of the account. Exists in every sign-up mode. | none | 10/50 ms |
GET /v1/account | Only when sign-up is on. The signed-in account: handle, state, how many keys and repositories. | none | 2/10 ms |
POST /v1/pairings | Only when sign-up is on. Pair a machine: its ed25519 key and a name get a code to type on the account page. | none | 10/50 ms |
POST /v1/pairings/lookup | Only when sign-up is on. What a typed code pairs: the machine's name and its key's fingerprint. | none | 5/25 ms |
POST /v1/pairings/approve | Only when sign-up is on. Approve a code for the key with the fingerprint the page showed: it becomes a key of the account. | none | 10/50 ms |
GET /v1/pairings/{pairing} | Only when sign-up is on. A pairing's state, asked by the machine with Authorization: JitKey <poll> signed by its key. | none | 5/25 ms |
GET /v1/account/keys | Only when sign-up is on. The machine keys of the signed-in account. | none | 5/25 ms |
DELETE /v1/account/keys/{id} | Only when sign-up is on. Take a machine key away from the account: its tokens are refused from the next request. | none | 10/50 ms |
Sign-up routes and JIT_SIGNUP
The sign-up routes (docs/contracts/accounts.md) exist only as the server's JIT_SIGNUP setting says. A route that
does not exist answers exactly what an unknown path answers (404 not_found), and is left out of GET /v1,
/v1/openapi.json and /llms.txt on that instance. Every other endpoint exists in every mode. The per-address
limits of these routes are kept in memory and start again at a restart.
| Endpoint | off | preview | privy |
|---|
POST /v1/session/start | no | yes | yes |
POST /v1/session/exchange | no | yes | yes |
POST /v1/session/end | yes | yes | yes |
GET /v1/account | no | yes | yes |
POST /v1/pairings | no | yes | yes |
POST /v1/pairings/lookup | no | yes | yes |
POST /v1/pairings/approve | no | yes | yes |
GET /v1/pairings/{pairing} | no | yes | yes |
GET /v1/account/keys | no | yes | yes |
DELETE /v1/account/keys/{id} | no | yes | yes |
health
GET /v1/health
Liveness and version.
- Answer (
data): Health. Status, version, backend, uptime. Also served at /healthz without the envelope's cost. - Scope: none (works without a token)
- Budget: p50 1 ms, p99 5 ms
- CLI:
neo health
index
GET /v1
What this service is: every endpoint with its scope and budget, and links to the guide.
- Answer (
data): Index. The endpoint list (bounded by the size of the API). - Scope: none (works without a token)
- Budget: p50 1 ms, p99 5 ms
- CLI:
neo api GET /v1
openapi
GET /v1/openapi.json
OpenAPI 3.1 description of this API, generated from the same table as the routes.
- Answer (
data): OpenApi. A bare OpenAPI document (not wrapped in the envelope). - Scope: none (works without a token)
- Budget: p50 1 ms, p99 5 ms
- CLI:
neo api GET /v1/openapi.json
whoami
GET /v1/whoami
Who the token is, for whom it acts, what it may do, and its limits.
- Answer (
data): WhoAmI. Principal, owner, scopes, expiry. Limits are in meta.limits as in every answer. - Scope: none (works without a token)
- Budget: p50 2 ms, p99 10 ms
- CLI:
neo whoami
principals.register
POST /v1/principals
Make a principal's public key known to this instance, so tokens it mints are accepted.
- Request body:
RegisterPrincipal - Answer (
data): PrincipalInfo. The principal record. Registering the same id again updates its name. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo principal register <id> --name N
grants.instance
PUT /v1/grants/{principal}
Set what a principal may do instance-wide (creating repositories needs admin here).
| Parameter | In | Type | Required | Meaning |
|---|
principal | path | string | yes | Principal id (jp_…). |
- Request body:
SetGrant - Answer (
data): GrantInfo. The grant as it now stands. Applies from the next request, also to tokens already issued. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo grant set <principal> --scopes S,…
grants.repo
PUT /v1/repos/{repo}/grants/{principal}
Set what a principal may do on one repository.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
principal | path | string | yes | Principal id (jp_…). |
- Request body:
SetGrant - Answer (
data): GrantInfo. The grant as it now stands. An empty scopes removes it. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo grant set <principal> --repo R --scopes S,…
tokens.runner
POST /v1/repos/{repo}/tokens
Mint a runner's token: one principal, this repository only, read + change_write (push only if asked).
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
MintRunnerToken - Answer (
data): RunnerToken. The token, once: not stored. Revoke by revocation_id (POST …/tokens/revoke) or by itself (POST /v1/tokens/revoke). - Scope:
admin - Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, a repeated Idempotency-Key is refused (409) and never replayed, and a malformed body is not echoed. - Budget: p50 10 ms, p99 50 ms
- CLI:
jit-runner setup <setup.json>
tokens.revoke_repo
POST /v1/repos/{repo}/tokens/revoke
Revoke a runner token of this repository by its revocation id: it and what was narrowed from it stop at once.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
RevokeToken - Answer (
data): TokenRevoked. Idempotent. The revocation is an entry in the repository's signed log, by the caller. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api POST /v1/repos/<repo>/tokens/revoke --json …
tokens.revoke
POST /v1/tokens/revoke
Needs a token. Revoke this request's token (no body), or as instance admin any token by revocation id; add "unseen": true for an id never seen here.
- Request body:
RevokeAnyToken - Answer (
data): TokenRevoked. Idempotent; tokens narrowed from it stop too. Unseen, by CLI: neo admin revoke <revocation id> --unseen. - Scope: none (works without a token)
- Budget: p50 10 ms, p99 50 ms
- CLI:
neo --token-file LEAKED api POST /v1/tokens/revoke
repos.create
POST /v1/repos
Create a repository.
- Request body:
CreateRepo - Answer (
data): Repo. The repository, including its identity (id), clone URL and event cursor. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo repo create <name>
repos.list
GET /v1/repos
List repositories the caller can read; owner for one account's (u-…/…).
| Parameter | In | Type | Required | Meaning |
|---|
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
owner | query | string | no | An account's handle (u-…): only its repositories, <handle>/<name>. |
- Answer (
data): Listed<Repo>. A page of repositories ordered by name. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo repo list
repos.get
GET /v1/repos/{repo}
One repository: default branch, head commit, clone URL, event cursor, ref-log size.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer (
data): Repo. One record. - Scope:
read (public repositories: no token needed) - Budget: p50 2 ms, p99 10 ms
- CLI:
neo repo get <repo>
repos.withhold
POST /v1/repos/{repo}/withhold
Instance admin only: take part of a repository down, deleting nothing. refs covers the names and what only they reach, not what others reach; record, not its commits.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
Withhold - Answer (
data): LogEntry. The withheld entry. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin withhold <repo> (--repository | --refs PATTERN… | --record KIND ID) --reason R [--reference TEXT]
repos.restore
POST /v1/repos/{repo}/restore
Instance admin only: lift one withholding by its withheld entry's seq, as a signed restored entry. Others stay in force: lifting a narrower one serves nothing a wider one covers.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
Restore - Answer (
data): LogEntry. The restored entry; not_found if none is in force at seq. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin restore <repo> SEQ
repos.withholdings
GET /v1/repos/{repo}/withholdings
The withholdings in force here, oldest first: seq, scope, reason, reference. Readable under any withholding, like the log. Lists every signer's; binding marks this host's, the only ones it enforces.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
after | query | string | no | Sequence number to list after; absent for the first. |
limit | query | integer | no | Page size, default 100, max 1000. |
- Answer (
data): Listed<Withholding>. A page; restore takes an item's seq. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin withholdings <repo>
accounts.admin_get
GET /v1/admin/accounts/{account}
Instance admin only (an unnarrowed token): an account's state, handle and counts. No identity. Alive whatever JIT_SIGNUP says.
| Parameter | In | Type | Required | Meaning |
|---|
account | path | string | yes | The account's principal id (jp_…) or handle (u-…). |
- Answer (
data): AdminAccount. reason and suspended_ms while suspended. - Scope:
admin - Budget: p50 5 ms, p99 25 ms
- CLI:
neo admin account show <account>
accounts.suspend
POST /v1/admin/accounts/{account}/suspend
Instance admin only: suspend an account. Its tokens are refused from the next request; its keys are retired for good.
| Parameter | In | Type | Required | Meaning |
|---|
account | path | string | yes | The account's principal id (jp_…) or handle (u-…). |
- Request body:
SuspendAccount - Answer (
data): AccountChanged. The account, changed, keys_retired. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin account suspend <account> --reason R [--reference TEXT]
accounts.restore
POST /v1/admin/accounts/{account}/restore
Instance admin only: lift a suspension. No session, key or token comes back.
| Parameter | In | Type | Required | Meaning |
|---|
account | path | string | yes | The account's principal id (jp_…) or handle (u-…). |
- Answer (
data): AccountChanged. The account, changed. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin account restore <account>
refs.list
GET /v1/repos/{repo}/refs
List refs, optionally under a prefix.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
prefix | query | string | no | Only refs whose full name starts with this, e.g. refs/heads/. The landing queue's refs are left out under any prefix. |
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Listed<Ref>. A page of refs ordered by name. The landing queue's refs (refs/queue, refs/queue/…) are never listed, for any prefix or caller, and the page is as if they did not exist; see queue.get. - Scope:
read (public repositories: no token needed) - Budget: p50 2 ms, p99 10 ms
- CLI:
neo refs <repo> [--prefix P]
refs.get
GET /v1/repos/{repo}/refs/{name}
Read one ref.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
name | path | string | yes | Full ref name (refs/heads/main) or a short branch or tag name (main). |
- Answer (
data): Ref. The ref's full name and the object id it points at. The landing queue's refs (refs/queue, refs/queue/…) are not_found, as if they did not exist, and are no revision on any route; see queue.get. - Scope:
read (public repositories: no token needed) - Budget: p50 2 ms, p99 10 ms
- CLI:
neo refs <repo> <name>
commit.get
GET /v1/repos/{repo}/commit
Read one commit.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
rev | query | string | no | A commit id, a full ref name, or a branch or tag name. Default: the default branch. |
- Answer (
data): Commit. Ids, parents, author, committer and message (message capped at 64 KiB). - Scope:
read (public repositories: no token needed) - Budget: p50 2 ms, p99 10 ms
- CLI:
neo commit <repo> <rev>
log
GET /v1/repos/{repo}/log
History from a revision, newest first, optionally only commits touching a path.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
rev | query | string | no | A commit id, a full ref name, or a branch or tag name. Default: the default branch. |
path | query | string | no | Only commits that changed this path or anything under it. |
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Listed<Commit>. A page of commits; next continues the walk. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo log <repo> [--rev R] [--path P] [--limit N]
tree
GET /v1/repos/{repo}/tree
List a directory at a revision.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
rev | query | string | no | A commit id, a full ref name, or a branch or tag name. Default: the default branch. |
path | query | string | no | Directory path; empty or absent for the root. |
recursive | query | boolean | no | List everything under the path, files only. |
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Tree. A page of entries ordered by name, each with kind, id and size. recursive=true lists the subtree. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo tree <repo> [--rev R] [path]
blob
GET /v1/repos/{repo}/blob
Read a file at a revision.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
rev | query | string | no | A commit id, a full ref name, or a branch or tag name. Default: the default branch. |
path | query | string | yes | File path. |
range | query | string | no | Byte range start-end (end exclusive). Default: the first 1 MiB. |
- Answer (
data): Blob. Content inline (UTF-8, or base64 when binary), at most 1 MiB per answer; range reads further. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo blob <repo> <path> [--rev R] [--raw]
diff
GET /v1/repos/{repo}/diff
Diff two revisions.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
base | query | string | yes | Revision to diff from. |
head | query | string | yes | Revision to diff to. |
patch | query | boolean | no | Include patches. Default true. |
max_bytes | query | integer | no | Total patch bytes, default 262144, max 4194304. |
path | query | string | no | Only this path or anything under it. |
- Answer (
data): Diff. Per-file stats (complete up to 5000 files) and unified patches bounded by max_bytes. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo diff <repo> <base> <head>
files
GET /v1/repos/{repo}/files
Read a directory with its files and their content.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
rev | query | string | no | A commit id, a full ref name, or a branch or tag name. Default: the default branch. |
path | query | string | no | Directory path; empty or absent for the root. |
known | query | string | no | A commit you already have, or the tree of an earlier answer. |
glob | query | string | no | Only matching files: *.lean, src/**/*.rs; comma-separated. |
max_bytes | query | integer | no | Total inline content, default 1048576, max 8388608. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Files. Files recursively, content inline up to max_bytes in total. With known: unchanged: true and no files if the directory is the same in both commits. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo files <repo> [path] [--rev R] [--known C] [--glob G]
commits.create
POST /v1/repos/{repo}/commits
Commit up to 1000 files to a branch without a clone: one commit on base; the branch is set to it.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
CommitFiles - Answer (
data): Committed. The new commit, its tree and parent, the branch and what it pointed at before (expect makes it conditional). - Scope:
push - Budget: p50 50 ms, p99 200 ms
- CLI:
neo write <repo> <branch> PATH=TEXT… -m MSG
changes.create
POST /v1/repos/{repo}/changes
Propose a change: a stable id over an evolving stack of commits.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
CreateChange - Answer (
data): ChangeSummary. The change summary, as changes.get returns it. - Scope:
change_write - Budget: p50 10 ms, p99 50 ms
- CLI:
neo change create <repo> --title T --head REV
changes.list
GET /v1/repos/{repo}/changes
List changes.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
state | query | string | no | open (default), queued, merged, abandoned or all. |
author | query | string | no | Only changes by this principal. |
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Listed<ChangeBrief>. A page of change briefs, most recently updated first; under a withholding, a page may be short. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo change list <repo>
changes.get
GET /v1/repos/{repo}/changes/{change}
The state of a change in one answer: revisions, diff stat, checks, reviews, conflicts, queue.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
change | path | string | yes | Change id. |
- Answer (
data): ChangeSummary. One summary; its lists are bounded (50 revisions, 200 paths) with true counts alongside. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo change get <repo> <change>
changes.revise
POST /v1/repos/{repo}/changes/{change}/revisions
Add a revision to a change (what a force-push becomes). Earlier revisions stay readable.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
change | path | string | yes | Change id. |
- Request body:
AddRevision - Answer (
data): ChangeSummary. The updated change summary. - Scope:
change_write - Budget: p50 10 ms, p99 50 ms
- CLI:
neo change update <repo> <change> --head REV
changes.upsert
PUT /v1/repos/{repo}/changes/for/{branch}
The open change for a branch, or open one: revised when the branch moved, never retitled. Idempotent.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
branch | path | string | yes | The head branch's short name; slashes allowed, not encoded. |
- Request body:
UpsertChange - Answer (
data): Upserted. The change summary, with created and revised saying what this call did. - Scope:
change_write - Budget: p50 10 ms, p99 50 ms
- CLI:
neo propose <repo> <branch> --title T
changes.interdiff
GET /v1/repos/{repo}/changes/{change}/interdiff
What changed between two revisions of a change.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
change | path | string | yes | Change id. |
from | query | integer | yes | Earlier revision number. |
to | query | integer | no | Later revision number. Default: the latest. |
patch | query | boolean | no | Include patches. Default true. |
max_bytes | query | integer | no | Total patch bytes, default 262144, max 4194304. |
- Answer (
data): Diff. A diff, bounded like diff. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo change interdiff <repo> <change> --from N [--to M]
checks.report
POST /v1/repos/{repo}/changes/{change}/checks
Report a check result on a revision of a change (the same name again replaces it).
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
change | path | string | yes | Change id. |
- Request body:
ReportCheck - Answer (
data): ChangeSummary. The change summary. precondition_failed (details.head) if head is stale; log max 256 KiB. - Scope:
change_write - Budget: p50 10 ms, p99 50 ms
- CLI:
neo check report <repo> <change> --name N --state S
claims.create
POST /v1/repos/{repo}/claims
Claim a task or a set of paths for a while, so others see it before they start.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
CreateClaim - Answer (
data): Claim. The claim. 409 conflict with the holder in details if an overlapping claim is held by another. - Scope:
claim - Budget: p50 5 ms, p99 25 ms
- CLI:
neo claim create <repo> --paths P [--task T] [--ttl-ms N]
claims.list
GET /v1/repos/{repo}/claims
Active claims.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
limit | query | integer | no | Page size, default 100, max 1000. |
after | query | string | no | The next cursor of the previous page. |
- Answer (
data): Listed<Claim>. A page of unexpired claims, soonest to expire first. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo claim list <repo>
claims.renew
POST /v1/repos/{repo}/claims/{claim}/renew
Extend a claim's lease.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
claim | path | string | yes | Claim id. |
- Request body:
RenewClaim - Answer (
data): Claim. The claim with its new expiry. - Scope:
claim - Budget: p50 5 ms, p99 25 ms
- CLI:
neo claim renew <repo> <claim>
claims.release
DELETE /v1/repos/{repo}/claims/{claim}
Release a claim before it expires.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
claim | path | string | yes | Claim id. |
- Answer (
data): Claim. The released claim. - Scope:
claim - Budget: p50 5 ms, p99 25 ms
- CLI:
neo claim release <repo> <claim>
sync
GET /v1/repos/{repo}/sync
What changed since a cursor, folded into state: moved refs, touched changes, active claims.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
since | query | string | yes | An event cursor from an earlier answer; 0 for everything. |
- Answer (
data): RepoSync. One object; folds at most 10000 events per call and says so in truncated. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo sync <repo> --since CURSOR
work
GET /v1/repos/{repo}/work
What the caller could do next: its changes needing action, reviews it could give, claims to avoid.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer (
data): Work. Four bounded lists: needs_you from the caller's 20 most recently updated open changes, the others at most 50 each (claims 200). - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo next <repo>
events.repo
GET /v1/repos/{repo}/events
The repository's ordered event stream (SSE), resumable from a cursor; or one JSON page with wait_ms.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
cursor | query | string | no | Resume after this event cursor; 0 is the beginning. Default: now. |
wait_ms | query | integer | no | Answer JSON instead of a stream: return as soon as there is an event, or after this long (max 30000). |
limit | query | integer | no | Page size, default 100, max 1000. |
- Answer (
data): EventPage. text/event-stream with id: = cursor, ending with event: bye {cursor, reason}; with wait_ms, an EventPage of at most limit events. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo events <repo> [--cursor C] [--follow]
events.all
GET /v1/events
The firehose: events of every repository the token can read, in one ordered stream.
| Parameter | In | Type | Required | Meaning |
|---|
cursor | query | string | no | Resume after this event cursor; 0 is the beginning. Default: now. |
wait_ms | query | integer | no | Answer JSON instead of a stream: return as soon as there is an event, or after this long (max 30000). |
limit | query | integer | no | Page size, default 100, max 1000. |
- Answer (
data): EventPage. As events.repo; cursors of this stream are its own and are not valid on a repository stream. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo events [--cursor C] [--follow]
reflog.head
GET /v1/repos/{repo}/reflog/head
The signed head (checkpoint) of the repository's append-only ref log.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer (
data): LogHead. Size, Merkle root, signer and signature: what a mirror or auditor pins. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo reflog <repo> --head
reflog.entries
GET /v1/repos/{repo}/reflog
Entries of the signed ref log, oldest first: who moved which ref, for whom, with which token.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
after | query | string | no | Sequence number to read after; absent for the beginning. |
limit | query | integer | no | Page size, default 100, max 1000. |
raw | query | boolean | no | Include each entry's canonical bytes (base64). |
- Answer (
data): Listed<LogEntry>. A page of entries; raw=true adds the canonical signed bytes for local verification. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo reflog <repo> [--after N]
reflog.proof
GET /v1/repos/{repo}/reflog/proof
Proof that one entry is in the signed log: its RFC 9162 audit path; readable whatever is withheld.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
seq | query | integer | yes | The entry's sequence number; below size. |
size | query | integer | no | The tree size to prove against (a signed head's size). Default: the current head's. |
- Answer (
data): LogProof. About log2(size) hashes; verify as LogProof says (leaf from reflog?raw=true, verify_inclusion). - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo verify <repo> --entry N --since SIZE:ROOT
reflog.consistency
GET /v1/repos/{repo}/reflog/consistency
Proof that the signed log only grew between two sizes (RFC 9162); readable whatever is withheld.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
old | query | integer | yes | The size of the checkpoint you kept; at most new. |
new | query | integer | no | The size to prove against (a signed head's size). Default: the current head's. |
- Answer (
data): LogConsistency. Keep a verified head's size and root; pass it as old. A smaller head or a failing proof: the log was rewritten. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo verify <repo>
repos.bundle
GET /v1/repos/{repo}/bundle
The repository as one signed bundle file, verifiable offline.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer: The file, not the envelope:
ETag (one per log position), X-Bundle-Sha256, X-Bundle-Log-Size, -Root; one Range with If-Range. 503 + Retry-After while it is written, 413 over the cap, 451 if the whole repository is withheld. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo bundle <repo> -o FILE
queue.get
GET /v1/repos/{repo}/queue
One target's landing queue: who is in line, and the candidates being checked.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
target | query | string | no | Branch; default main. |
- Answer (
data): Queue. At most 200 entries, 200 waiting, 64 candidates (truncated). - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api GET /v1/repos/<repo>/queue
queue.candidates
GET /v1/repos/{repo}/queue/candidates
Candidates that still need a check, front first: what a rule's reporter runs next.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
check | query | string | yes | The check's name. |
target | query | string | no | Only this branch's queue. |
- Answer (
data): Candidates. At most 64; commit is what to check and what would land. A plain read. - Scope:
read (public repositories: no token needed) - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api GET /v1/repos/<repo>/queue/candidates?check=<name>
queue.report
POST /v1/repos/{repo}/queue/candidates/{candidate}/checks
Report a rule's check on a candidate; passed lands it in its turn.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
candidate | path | string | yes | Candidate id, from queue.candidates. |
- Request body:
ReportCandidate - Answer (
data): CandidateReported. What landed and was put out. conflict reasons: candidate_gone, stale_run, run_finished. - Scope:
change_write - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api POST /v1/repos/<repo>/queue/candidates/<id>/checks --json JSON
landing_rules.get
GET /v1/repos/{repo}/landing-rules
The repository's landing rules: which changes land by themselves, and on which check.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer (
data): LandingRules. Every rule: a change whose changed paths are exactly a rule's lands, squashed, when the rule's check passes. - Scope:
read (public repositories: no token needed) - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api GET /v1/repos/<repo>/landing-rules
landing_rules.set
PUT /v1/repos/{repo}/landing-rules
Replace the repository's landing rules (the whole list).
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Request body:
LandingRules - Answer (
data): LandingRules. The rules as stored. 400 bad_request with the reason for a malformed rule (no globs). - Scope:
admin - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api PUT /v1/repos/<repo>/landing-rules --json JSON
landing_rules.delete
DELETE /v1/repos/{repo}/landing-rules
Remove every landing rule of the repository: nothing lands by itself any more.
| Parameter | In | Type | Required | Meaning |
|---|
repo | path | string | yes | Repository name or id. An account's repository is <handle>/<name> (u-…/proofs), in two segments or with the / as %2F (decision 0089). |
- Answer (
data): LandingRules. The now empty list. - Scope:
admin - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api DELETE /v1/repos/<repo>/landing-rules
feedback.create
POST /v1/feedback
Send feedback about this instance: stores the text, CLI version and diagnostics if sent, and the token's principal. Its id is the only way to read its status.
- Request body:
CreateFeedback - Answer (
data): FeedbackReceipt. The id. 409 conflict (details.reason: feedback_full) while 20 of the sender's items wait. Never replayed by Idempotency-Key. - Scope: none (works without a token)
- Budget: p50 10 ms, p99 50 ms
- CLI:
neo feedback "text"
feedback.get
GET /v1/feedback/{id}
What became of one feedback item: its state, kind, the change it led to and a one-line reply.
| Parameter | In | Type | Required | Meaning |
|---|
id | path | string | yes | The id POST /v1/feedback answered. |
- Answer (
data): FeedbackStatus. The status only: no text, diagnostics or principal. An unknown or deleted id is the same 404. - Scope: none (works without a token)
- Budget: p50 5 ms, p99 25 ms
- CLI:
neo feedback status <id>
feedback.admin_list
GET /v1/admin/feedback
Feedback items, oldest first. Needs instance review (feedback triage) or instance admin.
| Parameter | In | Type | Required | Meaning |
|---|
state | query | string | no | received or triaged. |
kind | query | string | no | bug, idea, question, duplicate or not_planned. |
limit | query | integer | no | Page size, default 50, max 100. |
cursor | query | string | no | The next of the previous page. |
- Answer (
data): Listed<FeedbackItem>. A page of whole items; pass next as cursor. - Scope:
review - Budget: p50 5 ms, p99 25 ms
- CLI:
neo admin feedback list
feedback.admin_get
GET /v1/admin/feedback/{id}
One feedback item in full. Needs instance review (feedback triage) or instance admin.
| Parameter | In | Type | Required | Meaning |
|---|
id | path | string | yes | Feedback id (fb_…). |
- Answer (
data): FeedbackItem. The item. Its text is any UTF-8 a stranger wrote: escape it before showing it. - Scope:
review - Budget: p50 5 ms, p99 25 ms
- CLI:
neo admin feedback show <id>
feedback.admin_set
PATCH /v1/admin/feedback/{id}
Triage a feedback item: state, kind, the change it led to, a reply. Needs instance review (feedback triage) or instance admin.
| Parameter | In | Type | Required | Meaning |
|---|
id | path | string | yes | Feedback id (fb_…). |
- Request body:
SetFeedback - Answer (
data): FeedbackItem. The item now. A field left out stays; null clears it; a kind makes it triaged. - Scope:
review - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin feedback set <id> --kind bug --reply "..." --change "..."
feedback.admin_delete
DELETE /v1/admin/feedback/{id}
Delete a feedback item for good: its id names nothing from then on. Instance admin only.
| Parameter | In | Type | Required | Meaning |
|---|
id | path | string | yes | Feedback id (fb_…). |
- Answer (
data): FeedbackDeleted. deleted: true; 404 when there was no such item. - Scope:
admin - Budget: p50 10 ms, p99 50 ms
- CLI:
neo admin feedback delete <id>
batch
POST /v1/batch
Up to 32 reads in one round trip.
- Request body:
BatchRequest - Answer (
data): BatchAnswer. One envelope per request, in order. Costs one request per part. - Scope: none (works without a token)
- Budget: p50 10 ms, p99 50 ms
- CLI:
neo api POST /v1/batch --json '{"requests":[{"path":"/v1/repos/x"}]}'
session.start
POST /v1/session/start
Only when sign-up is on. Start a login: a state for the login page and a nonce for the browser's cookie.
- Answer (
data): LoginStarted. state and nonce (64 hex each) and expires_ms (10 minutes). No credential; limited per client address. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api POST /v1/session/start
session.exchange
POST /v1/session/exchange
Only when sign-up is on. Finish a login: its state and nonce and Privy's two tokens become a session.
- Request body:
SessionExchange - Answer (
data): SessionExchanged. A session token (8 h), its expiry, fresh_until_ms, created, the account. Any failed token, state or nonce: 401 sign_in_again. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 20 ms, p99 100 ms
- CLI:
neo api POST /v1/session/exchange --json JSON
session.end
POST /v1/session/end
Sign out: end this session, or with everywhere every session of the account. Exists in every sign-up mode.
- Request body:
EndSession - Answer (
data): SessionEnded. {"ended": true}. Only an unnarrowed session token: anything else is 403 session_required. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api POST /v1/session/end
account.get
GET /v1/account
Only when sign-up is on. The signed-in account: handle, state, how many keys and repositories.
- Answer (
data): AccountInfo. One record; fresh_until_ms only for a session. A session token or a machine key's token. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 2 ms, p99 10 ms
- CLI:
neo api GET /v1/account
pairings.begin
POST /v1/pairings
Only when sign-up is on. Pair a machine: its ed25519 key and a name get a code to type on the account page.
- Request body:
BeginPairing - Answer (
data): PairingBegun. The pairing id, the code (XXXX-XXXX, 10 minutes), the instance's key, its origin (compare with what you dialed) and the page (null: <JIT_URL>/pair). No credential. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 10 ms, p99 50 ms
- CLI:
neo login
pairings.lookup
POST /v1/pairings/lookup
Only when sign-up is on. What a typed code pairs: the machine's name and its key's fingerprint.
- Request body:
LookupPairing - Answer (
data): PairingFound. Name, fingerprint (16 hex), where (started_from) and when it started, expiry. 404 no_such_code for an unknown, used or expired code alike. A session only. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api POST /v1/pairings/lookup --json JSON
pairings.approve
POST /v1/pairings/approve
Only when sign-up is on. Approve a code for the key with the fingerprint the page showed: it becomes a key of the account.
- Request body:
ApprovePairing - Answer (
data): PairingApproved. The new key. A fresh session only (403 fresh_login_required); 404 no_such_code; 409 key_limit (5 keys). - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api POST /v1/pairings/approve --json JSON
pairings.status
GET /v1/pairings/{pairing}
Only when sign-up is on. A pairing's state, asked by the machine with Authorization: JitKey <poll> signed by its key.
| Parameter | In | Type | Required | Meaning |
|---|
pairing | path | string | yes | Pairing id (32 hex), from POST /v1/pairings. |
- Answer (
data): PairingStatus. pending or approved (with the account and its handle). One refusal, 404 no_such_pairing, for an unknown or expired pairing and a poll that does not verify. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 5 ms, p99 25 ms
- CLI:
neo login
account.keys
GET /v1/account/keys
Only when sign-up is on. The machine keys of the signed-in account.
- Answer (
data): AccountKeys. At most 5 keys, each with id, name, fingerprint and when it was approved. A session only. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 5 ms, p99 25 ms
- CLI:
neo api GET /v1/account/keys
account.keys.remove
DELETE /v1/account/keys/{id}
Only when sign-up is on. Take a machine key away from the account: its tokens are refused from the next request.
| Parameter | In | Type | Required | Meaning |
|---|
id | path | string | yes | The key's id (jp_…), from GET /v1/account/keys. |
- Answer (
data): KeyRemoved. {"removed": true}. A session only; no fresh login needed. - Scope: none (works without a token)
- Secret: the request or answer carries a credential: answers are
Cache-Control: no-store, an Idempotency-Key is ignored and nothing is ever replayed, it is not answered inside a batch, and a malformed body is not echoed. - Budget: p50 10 ms, p99 50 ms
- CLI:
neo api DELETE /v1/account/keys/<id>
Types
Listed<T> is {"items": [T], "next": string | null, "truncated": boolean}. Fields marked optional may be absent in requests; answers always carry every field unless noted.
AccountBrief
An account as a session's answer shows it.
| Field | Type | Required | Meaning |
|---|
handle | string | yes | u-…, given by the instance. |
principal | string | yes | jp_…. |
state | AccountState | yes | |
AccountChanged
What a suspension or a restoration answers: the account after it, whether this request changed it, and for a suspension the machine keys it retired (for good: restoring brings none back).
| Field | Type | Required | Meaning |
|---|
account | AdminAccount | yes | |
changed | boolean | yes | false when the account already was in that state: nothing was done, nothing was recorded. |
keys_retired | integer | null | no | Suspension only: keys this request took away and retired. The person pairs their machines again. |
AccountInfo
GET /v1/account.
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
fresh_until_ms | integer | null | no | For a session only: until when its login counts as fresh. |
handle | string | yes | |
keys | integer | yes | Machine keys of the account (at most 5). |
principal | string | yes | |
repositories | integer | yes | Repositories the account made (at most 10). |
state | AccountState | yes | |
AccountKey
A machine key of an account.
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
fingerprint | string | yes | |
id | string | yes | jp_…: the key is a principal, an agent of the account. |
name | string | yes | |
AccountKeys
GET /v1/account/keys.
| Field | Type | Required | Meaning |
|---|
items | [AccountKey] | yes | |
AccountState
What the account is: active, or suspended by an administrator.
One of: "active" | "suspended"
AddRevision
| Field | Type | Required | Meaning |
|---|
expect_revision | integer | null | no | Fail with precondition_failed unless the change is currently at this revision number. |
head | string | yes | The new top of the stack. A force-push is just a new revision; every earlier one stays readable. |
note | string | no | |
AdminAccount
GET /v1/admin/accounts/{account}: an account as an instance administrator sees it. No identity: the provider's subject is never answered.
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
handle | string | yes | |
keys | integer | yes | Machine keys of the account (at most 5). A suspension retires them all. |
principal | string | yes | |
reason | SuspendReason | null | no | While suspended: why. |
repositories | integer | yes | Repositories the account made (at most 10). |
state | AccountState | yes | |
suspended_ms | integer | null | no | While suspended: since when. |
ApiError
| Field | Type | Required | Meaning |
|---|
code | ErrorCode | yes | |
details | any | no | |
hint | string | null | no | What to do next, in one sentence. |
message | string | yes | |
retry_after_ms | integer | null | no | Set on rate_limited and unavailable. |
ApprovePairing
POST /v1/pairings/approve: the fingerprint the page showed; approval binds to that key and no other.
| Field | Type | Required | Meaning |
|---|
code | string | yes | |
fingerprint | string | yes | |
BatchAnswer
| Field | Type | Required | Meaning |
|---|
answers | [BatchPart] | yes | One entry per request: the HTTP status it would have had and its full envelope. |
BatchItem
| Field | Type | Required | Meaning |
|---|
method | string | no | Only GET is accepted. |
path | string | yes | Path and query, starting with /v1/. |
BatchPart
| Field | Type | Required | Meaning |
|---|
body | any | yes | |
status | integer | yes | |
BatchRequest
| Field | Type | Required | Meaning |
|---|
requests | [BatchItem] | yes | Up to 32 reads, answered in order. |
BeginPairing
POST /v1/pairings: what neo login sends.
| Field | Type | Required | Meaning |
|---|
name | string | yes | 1 to 64 characters, no control characters: shown on the account page and in the key list. |
public_key | string | yes | The machine's ed25519 public key, 64 hex digits. Its secret never leaves the machine. |
Blob
| Field | Type | Required | Meaning |
|---|
binary | boolean | yes | |
commit | string | yes | |
content | string | yes | |
encoding | Encoding | yes | |
oid | string | yes | |
path | string | yes | |
range_end | integer | yes | |
range_start | integer | yes | The byte range in content: [start, end). |
size | integer | yes | Size of the whole file in bytes. |
truncated | boolean | yes | True when content is not the whole file; ask again with range=start-end. |
Candidate
One commit that would land, and what the rule's check says of it so far.
| Field | Type | Required | Meaning |
|---|
base | string | yes | What it is built on: the target's tip, or the candidate ahead. |
change | string | yes | |
check | string | yes | The check the rule wants on it. |
commit | string | yes | The commit to check (readable by id: tree, blob, files at rev=<commit>). If the check passes, the target moves to exactly this. |
id | string | yes | |
number | integer | yes | |
revision | integer | yes | |
rule | string | yes | The landing rule it is a candidate of. |
run_seq | integer | yes | |
state | CheckState | yes | pending: nobody has reported on it yet. |
target | string | yes | |
CandidateReported
What a report on a candidate did.
| Field | Type | Required | Meaning |
|---|
candidate | Candidate | null | no | The candidate as it is now; absent once it landed or its change was put out. |
ejected | [QueueEjected] | yes | The changes it put out of the queue. |
landed | [string] | yes | The changes this report landed, in order (its own, and passed ones that were waiting behind it). |
Candidates
The candidates that still need a check, front of each queue first (at most 64).
| Field | Type | Required | Meaning |
|---|
items | [Candidate] | yes | |
ChangeBrief
A change as a list item.
| Field | Type | Required | Meaning |
|---|
author | string | yes | |
base | string | yes | |
head | string | yes | |
id | string | yes | |
number | integer | no | Per-repository number, from 1, never reused; {change} in a path accepts it as well as the id. |
revision | integer | yes | |
state | ChangeState | yes | |
title | string | yes | |
updated_ms | integer | yes | |
ChangeState
One of: "open" | "queued" | "merged" | "abandoned"
ChangeSummary
Everything needed to act on a change, in one answer.
| Field | Type | Required | Meaning |
|---|
author | string | yes | |
base | string | yes | Target branch (full ref name). |
checks | [Check] | yes | |
created_ms | integer | yes | |
cursor | string | yes | Cursor of the last event about this change. |
description | string | yes | |
head | string | yes | The current revision's head commit. |
id | string | yes | |
landing | [RuleVerdict] | no | What each landing rule for the change's target says about it now: whether it lands on a green check, and exactly what stands in the way. Empty: no rule applies, or the change is closed. |
mergeability | Mergeability | yes | |
number | integer | no | Per-repository number, from 1, never reused; {change} in a path accepts it as well as the id. |
on_behalf_of | string | null | no | On whose behalf the author acts. |
overlapping_claims | [Claim] | yes | Active claims that overlap this change's paths and are held by someone else. |
parent_change | string | null | no | |
paths | [string] | yes | Changed paths of the current revision (bounded: the first 200; stat.files is the true count). |
queue | QueueEntry | null | no | |
repo | string | yes | |
reviews | [Review] | yes | |
revisions | [Revision] | yes | Every revision, oldest first (bounded: the latest 50). |
stat | DiffStat | yes | Diff stat of the current revision against its base. |
state | ChangeState | yes | |
title | string | yes | |
updated_ms | integer | yes | |
Check
| Field | Type | Required | Meaning |
|---|
head | string | null | no | The head the reporter said it checked (always the revision's). Absent: the report named none, and no landing rule counts it. |
name | string | yes | |
revision | integer | yes | The revision the check ran against. |
run_seq | integer | no | The run this result is from (0: the reporter numbers no runs). |
state | CheckState | yes | |
summary | string | yes | |
updated_ms | integer | yes | |
CheckState
One of: "pending" | "running" | "passed" | "failed" | "skipped"
Claim
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
expires_ms | integer | yes | |
holder | string | yes | |
id | string | yes | |
note | string | yes | |
on_behalf_of | string | null | no | |
paths | [string] | yes | |
repo | string | yes | |
task | string | null | no | |
Commit
| Field | Type | Required | Meaning |
|---|
author | Signature | yes | |
committer | Signature | yes | |
message | string | yes | The whole message, at most 64 KiB. |
oid | string | yes | |
parents | [string] | yes | |
subject | string | yes | First line of the message. |
tree | string | yes | |
CommitFiles
POST /v1/repos/{repo}/commits: one commit on top of base with these files written or deleted, and branch set to it.
| Field | Type | Required | Meaning |
|---|
base | string | null | no | The new commit's parent: a revision. Default: the default branch's head. |
branch | string | yes | The branch to set: a short name (work/x) or a full name under refs/heads/. Created if absent, moved if present, whatever it pointed at before (see expect). |
expect | string | null | no | Absent: set the branch whatever it points at. A commit id: the branch must point at exactly that commit now. null: the branch must not exist yet. Otherwise precondition_failed with details.current. |
files | [FileWrite] | yes | At most 1000 entries, each path at most once. |
message | string | yes | The commit message. A final newline is added when missing, as git does. |
Committed
What POST /v1/repos/{repo}/commits made.
| Field | Type | Required | Meaning |
|---|
branch | string | yes | The branch's full name, now pointing at commit. |
commit | string | yes | The new commit. |
created | boolean | yes | True when the branch did not exist before. |
parent | string | yes | Its parent: base, resolved. |
previous | string | null | no | What the branch pointed at before; null when it was created. |
tree | string | yes | Its root tree. |
CreateChange
| Field | Type | Required | Meaning |
|---|
base | string | null | no | The branch this change targets; defaults to the repository's default branch. |
description | string | no | |
head | string | yes | The commit (or ref) at the top of the stack being proposed. |
parent_change | string | null | no | The change this one is stacked on, if any. |
title | string | yes | |
CreateClaim
| Field | Type | Required | Meaning |
|---|
note | string | no | |
paths | [string] | no | Path prefixes being worked on, for example crates/jit-api/. |
task | string | null | no | A task id, free text: "issue 12", "fix flaky test x". |
ttl_ms | integer | null | no | Lease length. Default 15 minutes, max 24 hours. The claim disappears when it expires. |
CreateFeedback
POST /v1/feedback.
| Field | Type | Required | Meaning |
|---|
cli_version | string | null | no | The sender's CLI version, at most 64 bytes. |
diagnostics | FeedbackDiagnostics | null | no | |
text | string | yes | 1 to 8192 bytes of UTF-8. |
CreateRepo
| Field | Type | Required | Meaning |
|---|
default_branch | string | null | no | Defaults to main. |
description | string | no | |
name | string | yes | [a-z0-9][a-z0-9._-]{0,63}, unique on this instance. A label: the identity is id. Not u, not starting with u- (an account's handle), and not one of the reserved words (decision 0083). |
public | boolean | null | no | Public repositories can be read and mirrored without a token. Absent means true. false needs an instance admin (the instance-wide admin right); anyone else gets 403 private_repos_disabled. |
Diff
| Field | Type | Required | Meaning |
|---|
base | string | yes | |
files | [FileDiff] | yes | Per-file stats are always complete up to 5000 files; patches are bounded by max_bytes. |
head | string | yes | |
stat | DiffStat | yes | |
truncated | boolean | yes | True when any patch was cut or the file list was capped. |
DiffStat
| Field | Type | Required | Meaning |
|---|
additions | integer | yes | |
deletions | integer | yes | |
files | integer | yes | |
Encoding
One of: "utf8" | "base64"
EndSession
POST /v1/session/end. An empty body ends this session.
| Field | Type | Required | Meaning |
|---|
everywhere | boolean | null | no | End every session of the account ("sign out everywhere"). |
EndpointBrief
| Field | Type | Required | Meaning |
|---|
budget_p50_ms | integer | yes | |
budget_p99_ms | integer | yes | |
method | string | yes | |
path | string | yes | |
scope | Scope | null | no | |
summary | string | yes | |
EntryKind
One of: "file" | "dir" | "symlink" | "submodule"
ErrorCode
Stable machine-readable error codes. The HTTP status follows the code.
One of: "bad_request" | "unknown_field" | "unauthorized" | "forbidden" | "not_found" | "conflict" | "precondition_failed" | "too_large" | "rate_limited" | "unavailable" | "internal" | "private_repos_disabled" | "withheld" | "sign_in_again" | "signup_closed" | "suspended" | "signups_exhausted" | "keys_stale" | "session_required" | "fresh_login_required" | "no_such_code" | "no_such_pairing" | "key_limit" | "bad_key" | "repository_limit" | "pairings_exhausted"
Event
One entry of a repository's ordered event log.
| Field | Type | Required | Meaning |
|---|
actor | string | yes | |
cursor | string | yes | Position in the stream it was read from; resume with it. |
data | any | yes | Type-specific fields; always an object. |
on_behalf_of | string | null | no | |
repo | string | yes | |
time_ms | integer | yes | |
type | string | yes | repo.created, ref.updated, change.created, change.revised, change.state, check.updated, review.created, claim.created, claim.renewed, claim.released, claim.expired, queue.updated. |
EventPage
The JSON form of the event stream (wait_ms given, or Accept: application/json).
| Field | Type | Required | Meaning |
|---|
cursor | string | yes | Pass this as cursor next time. Equal to the request's cursor when nothing happened. |
events | [Event] | yes | |
truncated | boolean | yes | True when more events were already available than limit. |
FeedbackDeleted
| Field | Type | Required | Meaning |
|---|
deleted | boolean | yes | |
id | string | yes | |
FeedbackDiagnostics
What the sender chose to add about its machine and last command. Each field is one it was shown before sending.
| Field | Type | Required | Meaning |
|---|
arch | string | null | no | |
last_command | string | null | no | The name of the last command, not its arguments. |
last_exit | integer | null | no | |
os | string | null | no | |
repo | string | null | no | A repository's name, if the sender named one. |
FeedbackItem
One item, as an instance administrator reads it.
| Field | Type | Required | Meaning |
|---|
change | string | null | no | |
cli_version | string | null | no | |
created_ms | integer | yes | |
diagnostics | FeedbackDiagnostics | null | no | |
id | string | yes | |
kind | FeedbackKind | null | no | |
principal | string | null | no | The principal of the token it was sent with; null when sent without one. |
reply | string | null | no | |
server_version | string | yes | The version of the server that stored it. |
state | FeedbackState | yes | |
text | string | yes | As sent: any UTF-8, control characters included. Escape it before showing it. |
updated_ms | integer | yes | |
FeedbackKind
One of: "bug" | "idea" | "question" | "duplicate" | "not_planned"
FeedbackReceipt
What POST /v1/feedback stored. Keep id: it is the only way to read the item's status.
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
id | string | yes | fb_ and 32 hex digits. |
state | FeedbackState | yes | |
FeedbackState
One of: "received" | "triaged"
FeedbackStatus
What became of an item: all its sender is told.
| Field | Type | Required | Meaning |
|---|
change | string | null | no | A reference to the change that came of it. |
created_ms | integer | yes | |
id | string | yes | |
kind | FeedbackKind | null | no | Null until someone says what it is. |
reply | string | null | no | One line for the sender. |
state | FeedbackState | yes | |
updated_ms | integer | yes | |
FileContent
One file of a Files answer.
| Field | Type | Required | Meaning |
|---|
content | string | yes | The whole file; empty when truncated. |
encoding | Encoding | yes | |
oid | string | yes | |
path | string | yes | |
size | integer | yes | Size of the whole file in bytes. |
truncated | boolean | yes | True when the file did not fit in max_bytes: read it with blob (and range). |
FileDiff
| Field | Type | Required | Meaning |
|---|
additions | integer | yes | |
binary | boolean | yes | |
deletions | integer | yes | |
old_path | string | null | no | |
patch | string | null | no | Unified diff of this file; null when not requested, binary, or cut by max_bytes (then truncated). |
path | string | yes | |
status | FileStatus | yes | |
truncated | boolean | yes | |
FileStatus
One of: "added" | "modified" | "deleted" | "renamed"
FileWrite
One file to write or delete in POST /v1/repos/{repo}/commits. Give content, or delete: true.
| Field | Type | Required | Meaning |
|---|
content | string | null | no | The whole new content of the file, in encoding. |
delete | boolean | null | no | True: delete the file (it must exist); a directory left empty disappears. Not together with content. |
encoding | Encoding | null | no | How content is written: utf8 (the default) or base64 (any bytes). |
path | string | yes | Path from the repository root, /-separated: no leading slash, no empty, ., .. or .git segment, no backslash or NUL. Directories are created as needed. |
Files
A directory with the files below it and their content.
| Field | Type | Required | Meaning |
|---|
commit | string | yes | The commit the directory was read at (resolved from rev): send it back as known next time. |
files | [FileContent] | yes | Recursively, in path order. |
next | string | null | no | Pass as after to continue a listing that was cut. |
path | string | yes | |
tree | string | yes | The id of the directory itself at commit: also accepted as known. |
truncated | boolean | yes | |
unchanged | boolean | yes | True when the directory is the tree known names, or the same in the commit it names: then files is empty. |
GrantInfo
| Field | Type | Required | Meaning |
|---|
principal | string | yes | |
repo | string | null | no | The repository the grant is on; null for an instance-wide grant. |
scopes | [Scope] | yes | |
Health
| Field | Type | Required | Meaning |
|---|
backend | string | yes | mem (in-memory stub) or real. |
status | string | yes | |
time_ms | integer | yes | |
uptime_ms | integer | yes | |
version | string | yes | |
Index
GET /v1: what this service is and where to read more.
| Field | Type | Required | Meaning |
|---|
api | string | yes | |
endpoints | [EndpointBrief] | yes | |
events | string | yes | |
guide | string | yes | |
openapi | string | yes | |
service | string | yes | |
version | string | yes | |
KeyRemoved
| Field | Type | Required | Meaning |
|---|
removed | boolean | yes | Always true. |
LandingRule
"A change to target whose changed paths are exactly paths lands by itself, squashed under title, when check is green on its latest revision as reported by reporter."
| Field | Type | Required | Meaning |
|---|
allow_executable | boolean | no | Optional: let an executable file (mode 100755) at a listed path land. Default false: only plain files (mode 100644) do, and an executable is refused as not_a_plain_file. Symbolic links and submodules never land by rule. |
check | string | yes | The check that must have passed on the change's latest revision. |
delete_branch | boolean | no | Optional: delete the change's head branch when the rule lands it (if it still points at the landed head). Default false: the branch is left. |
head_branch | string | null | no | Optional: the head branch the change must have been pushed by, a short name that may contain {name} once, e.g. prover/{name} (the same name its paths give). Absent: any branch, or none. |
name | string | yes | Unique in the repository; it is in the events. |
paths | [RulePath] | yes | The exact set of changed paths: each with its status, nothing else. No globs. |
protect_target | boolean | no | The rule's target branch moves only by a landing or by an admin of the repository: a push or a commit to it from anyone else is forbidden (message starting protected_branch:); push a branch and open a change instead. Default true. False leaves the target as open as any other branch. |
queue | QueueOptions | null | no | Optional: changes that fit this rule need not sit on the target's tip. They wait in the target's queue, the server builds for each the commit that would land on top of the ones ahead (a candidate), the rule's reporter checks candidates (queue.candidates, queue.report) and a passing candidate lands in order as exactly that commit. Absent: a change lands only while it is built on the tip. |
reporter | string | yes | The only principal whose report of that check counts, and the only one allowed to report it (jp_…). |
target | string | yes | The branch changes must target, e.g. main (stored as refs/heads/main). |
title | string | yes | The squash commit's title; may use {name}, {change} and {number}. |
LandingRules
A repository's landing rules: the body of PUT …/landing-rules and the answer of all three calls.
| Field | Type | Required | Meaning |
|---|
rules | [LandingRule] | yes | |
Limits
The bucket that binds first for this caller. A request with a token is charged, all or nothing, to the token's own bucket and to its authenticated principal's, shared by all its tokens and 16 times larger (a server constant); this reports whichever has fewer requests left. Without a token, or with one that does not authenticate: the client address's bucket (or, while the server holds too many addresses, the shared shard a new address is charged to). There are no other limits.
| Field | Type | Required | Meaning |
|---|
cost | integer | yes | What this request cost. |
limit | integer | yes | Bucket capacity: the largest burst. |
remaining | integer | yes | Requests that can be made right now. |
reset_ms | integer | yes | Milliseconds until the bucket is full again. |
streams | StreamLimits | yes | |
window_ms | integer | yes | The bucket refills limit requests per window_ms, continuously. |
LogConsistency
That the log of new entries extends the log of old entries without changing any of them: the consistency proof of RFC 9162 (section 2.1.4). Keep the checkpoint you verified (its size and root); next time ask for old=<kept size>&new=<the size of a new signed head> and check jit_trust::verify_consistency(old_root, new_root, &ConsistencyProof { old_size: old, new_size: new, path }) against the new head's root: the log only grew. A new head smaller than the kept size, or a proof that does not verify, means the log was rewritten. old == new and old == 0 answer an empty path (nothing to prove: the roots must be equal, or the old one the empty tree's).
| Field | Type | Required | Meaning |
|---|
new | integer | yes | jit-trust's new_size. |
old | integer | yes | jit-trust's old_size. |
path | [string] | yes | The hashes, 64 lower-case hex digits each, in the order verify_consistency reads them. |
LogEntry
| Field | Type | Required | Meaning |
|---|
actor | string | yes | |
kind | string | yes | genesis, ref_update, record, set_signer, withheld, restored, or runner_token (a runner token was minted: actor is the administrator who asked) or token_revoked (actor revoked it). |
on_behalf_of | string | null | no | |
prev | string | yes | Hash of the previous entry, hex. |
raw | string | null | no | The canonical signed bytes, base64, for clients that verify. |
refs | [RefMove] | yes | Ref movements of a ref_update entry. |
revocation_id | string | null | no | On a runner_token or token_revoked entry: the revocation id of the token minted or revoked. |
seq | integer | yes | |
signature | string | yes | |
signer | string | yes | |
time_ms | integer | yes | |
token_id | string | null | no | |
withheld | WithheldInfo | null | no | On a withheld entry: what this host stopped serving, why, and the reference; on a restored entry: the sequence number of the withheld entry it lifts. Absent on every other kind. |
LogHead
The signed head of a repository's append-only ref log (jit-trust's checkpoint).
| Field | Type | Required | Meaning |
|---|
repo | string | yes | |
root | string | yes | Merkle root over the first size entries, hex. |
signature | string | yes | |
signer | string | yes | |
size | integer | yes | |
time_ms | integer | yes | |
LogProof
That the entry at seq is in the log of size entries: the audit path of RFC 9162 (section 2.1.3), from the leaf up. Verify: decode the entry's raw bytes (GET …/reflog?raw=true), its leaf is SignedEntry::from_bytes(raw)?.leaf_hash() (RFC 9162's leaf hash of those bytes), then jit_trust::verify_inclusion(leaf, &InclusionProof { seq, size, path }, root) with the root of a signed checkpoint of this size (GET …/reflog/head: pass its size).
| Field | Type | Required | Meaning |
|---|
path | [string] | yes | The sibling hashes, 64 lower-case hex digits each (the form of LogHead.root), about log2(size) of them. |
seq | integer | yes | |
size | integer | yes | The tree size the path is for. |
LoginStarted
POST /v1/session/start: a login in flight, for 10 minutes.
| Field | Type | Required | Meaning |
|---|
expires_ms | integer | yes | |
nonce | string | yes | 64 hex digits: the front end keeps it in the browser's __Host-neo_login cookie. |
state | string | yes | 64 hex digits: sent to the login page, which sends it back with Privy's tokens. |
LookupPairing
POST /v1/pairings/lookup: the code is in the body, never in a URL.
| Field | Type | Required | Meaning |
|---|
code | string | yes | |
MergeState
One of: "clean" | "conflicted" | "unknown"
Mergeability
| Field | Type | Required | Meaning |
|---|
behind | integer | yes | How many commits the base has gained since this revision's merge base. |
conflicts | [string] | yes | Paths that conflict with the base, when state is conflicted. |
state | MergeState | yes | |
Present in every answer.
| Field | Type | Required | Meaning |
|---|
limits | Limits | yes | The caller's limits after this request. |
request_id | string | yes | Echo this when reporting a problem. |
took_us | integer | yes | Server-side time spent on the request, microseconds. |
MintRunnerToken
POST /v1/repos/{repo}/tokens: a token for a runner on this one repository.
| Field | Type | Required | Meaning |
|---|
consent | string | yes | The principal's own agreement: its key's signature (128 hex digits) over this repository's id, this host's log signing key (both in GET …/reflog/head: repo, signer) and consent_ms (jit_trust::RunnerConsent; jit-runner setup makes it). Without it an administrator could be issued a token that acts as anyone; with the host in it, one host's cannot be used at another. |
consent_ms | integer | yes | When consent was signed, Unix milliseconds. Accepted for one hour. |
principal | string | yes | The runner's own principal (jp_…), already registered. Give a runner a principal of its own: a landing rule names it as the only reporter whose check counts. |
scopes | array | null | no | What the token may do: read always, and of change_write and push what is listed. Default ["read", "change_write"]: enough to read the repository and report a check, and not push. Ask for push only for a runner that commits; never for one that reports the check of a landing rule, because the command it runs is code from the changes it checks. |
ttl_ms | integer | null | no | How long the token lasts, in milliseconds. Default 24 hours; at most 30 days. |
PairingApproved
| Field | Type | Required | Meaning |
|---|
key | AccountKey | yes | |
PairingBegun
| Field | Type | Required | Meaning |
|---|
code | string | yes | XXXX-XXXX (Crockford's base 32): typed on the account page. Never put it in a link. |
expires_ms | integer | yes | |
instance_key | string | yes | The instance's key, 64 hex digits: what the machine's polls are signed for. |
origin | string | yes | This instance's origin (JIT_PUBLIC_URL, normalized: scheme://host[:port]). The machine compares it with the origin it dialed before it shows the code, and stops on a mismatch; it never signs this one. |
page | string | null | no | Where to type the code (<JIT_WEB_URL>/pair), or null: then <JIT_URL>/pair. |
pairing | string | yes | 32 hex digits: what the machine polls (GET /v1/pairings/{pairing}). |
PairingFound
| Field | Type | Required | Meaning |
|---|
expires_ms | integer | yes | |
fingerprint | string | yes | 16 hex digits: the first 8 bytes of SHA-256 of the machine's key. |
name | string | yes | The name the machine gave. |
started_from | string | yes | The client address the pairing was started from, as the per-address limits key it (an IPv4 address, an IPv6 /64). Kept only with the pairing; shown only here, to the session that typed the code. |
started_ms | integer | yes | |
PairingState
One of: "pending" | "approved"
PairingStatus
GET /v1/pairings/{pairing}.
| Field | Type | Required | Meaning |
|---|
account | string | null | no | Once approved: the account (jp_…). |
handle | string | null | no | Once approved: the account's handle. |
status | PairingState | yes | |
PathChange
How a landing rule expects one of its paths to have changed.
One of: "added" | "modified" | "deleted"
PathMerge
How a landing rule's queue merges a path.
One of: "union"
PrincipalInfo
| Field | Type | Required | Meaning |
|---|
created_ms | integer | yes | |
id | string | yes | |
kind | PrincipalKind | yes | |
name | string | yes | |
PrincipalKind
One of: "person" | "org"
Queue
One target's queue. At most 200 entries, 200 waiting changes and 64 candidates are listed; truncated says when there are more.
| Field | Type | Required | Meaning |
|---|
candidates | [Candidate] | yes | Front first. |
entries | [QueuedChange] | yes | In landing order. |
target | string | yes | |
tip | string | null | no | |
truncated | boolean | yes | |
waiting | [string] | yes | Changes that fit the rule and wait for one of their owner's places, in order. |
QueueEjected
| Field | Type | Required | Meaning |
|---|
change | string | yes | |
reason | any | yes | {reason, ...}: checks_failed {batch, summary}, merge_conflict {paths}, not_as_the_rule {rule, paths}, superseded, dequeued, abandoned, parent_not_landed {parent}. |
QueueEntry
A change's own place in a queue, on its summary (ChangeSummary.queue). The whole queue of a target, with every change in it, is Queue (queue.get), whose entries are QueuedChange.
| Field | Type | Required | Meaning |
|---|
batch | string | null | no | |
enqueued_ms | integer | yes | |
position | integer | yes | |
QueueOptions
How a landing rule's queue runs.
| Field | Type | Required | Meaning |
|---|
depth | integer | no | Candidates that exist at once, each built on the one ahead: 1 to 16, default 4. 1 is a serial queue (nothing is ever checked twice); more lets a reporter that runs several checks at once land that many per check duration, and a failure costs a re-check of those behind it. |
max_per_owner | integer | no | Changes of one owner in the queue at once: 1 to 64, default 2. Its others wait their turn behind everyone already in line. |
QueuedChange
A change in a landing rule's queue (queue.get): where it stands and which candidate is built for it. Not QueueEntry, which is the same change's place as its own summary shows it (ChangeSummary.queue).
| Field | Type | Required | Meaning |
|---|
author | string | yes | |
candidate | string | null | no | The candidate built for it, if one is. |
change | string | yes | |
head | string | yes | |
number | integer | yes | |
position | integer | yes | 0 is the front. |
revision | integer | yes | |
Ref
| Field | Type | Required | Meaning |
|---|
name | string | yes | Full name, for example refs/heads/main. |
oid | string | yes | |
RefMove
| Field | Type | Required | Meaning |
|---|
name | string | yes | |
new | string | null | no | Null when the ref was deleted. |
old | string | null | no | Null when the ref was created. |
RegisterPrincipal
| Field | Type | Required | Meaning |
|---|
id | string | yes | The principal's identity: its public key in text form, jp_ followed by 64 hex digits. |
kind | PrincipalKind | null | no | Defaults to person. |
name | string | yes | A label; it can differ between instances. |
RenewClaim
| Field | Type | Required | Meaning |
|---|
ttl_ms | integer | null | no | |
Repo
| Field | Type | Required | Meaning |
|---|
clone_url | string | yes | |
created_by | string | yes | |
created_ms | integer | yes | |
cursor | string | yes | Cursor of the newest event; pass it to sync or events to hear only what comes after. |
default_branch | string | yes | |
description | string | yes | |
head | string | null | no | Commit the default branch points at; null while the repository is empty. |
id | string | yes | The repository's identity (its key); survives renames and hosts. |
log_size | integer | yes | Number of entries in the signed ref log. |
name | string | yes | |
public | boolean | yes | |
RepoSync
GET …/sync?since=: what changed in a repository since a cursor, already folded into state.
| Field | Type | Required | Meaning |
|---|
changes | [ChangeBrief] | yes | Changes created or touched in the interval, in their current state. |
claims | [Claim] | yes | Claims active now. |
cursor | string | yes | Pass as since next time. |
events | integer | yes | Number of events folded into this answer. |
refs | [RefMove] | yes | Net movement of each ref over the interval (one entry per ref, however many times it moved). |
since | string | yes | |
truncated | boolean | yes | True when the interval held more than the server folds at once; call again with cursor. |
ReportCandidate
A reporter's word on a candidate.
| Field | Type | Required | Meaning |
|---|
head | string | yes | The commit that was checked. Required: precondition_failed unless it is the candidate's commit. |
log | string | null | no | The check's output, at most 256 KiB; its last 64 KiB are kept on the change's revision. |
name | string | yes | The rule's check. |
run_seq | integer | null | no | The run, as in checks.report: a lower one than the server holds is conflict with details.reason stale_run; a different verdict for a finished run is run_finished. |
state | CheckState | yes | |
summary | string | no | |
ReportCheck
A check result on a revision of a change. A second report of the same name on the same revision replaces the first.
| Field | Type | Required | Meaning |
|---|
head | string | null | no | The commit the check ran on. precondition_failed (with details.head, the revision's head) unless it is that revision's head. A landing rule counts a passed check only if its report named the head. |
log | string | null | no | The check's output as text, at most 256 KiB. |
name | string | yes | The check's name, e.g. test. |
revision | integer | null | no | The revision checked. Default: the latest. |
run_seq | integer | null | no | Which run of the check this is: the same number for a run's running and its verdict, a higher one for a later run (the time the run started, in milliseconds, serves). Absent is run 0. Per (change, revision, name) the server keeps the highest: a report of a lower run is conflict with details.reason stale_run; for a check a landing rule or the queue names, a different verdict for a run that already has one is conflict with details.reason run_finished (the same verdict again is accepted). details.run_seq is the run the server holds. A reporter that never sends it reports one run per revision: its first verdict stands. |
state | CheckState | yes | |
summary | string | no | |
Restore
Lift a withholding.
| Field | Type | Required | Meaning |
|---|
seq | integer | yes | The sequence number of the withheld entry (seq in the answer of withhold, or of that entry in GET …/reflog). |
Review
| Field | Type | Required | Meaning |
|---|
by | string | yes | |
created_ms | integer | yes | |
id | string | yes | |
open_comments | integer | yes | Comments not yet resolved; each may carry a patch that applies in one call. |
revision | integer | yes | |
summary | string | yes | |
verdict | ReviewVerdict | yes | |
ReviewVerdict
One of: "approve" | "request_changes" | "comment"
Revision
| Field | Type | Required | Meaning |
|---|
base | string | yes | |
created_by | string | yes | |
created_ms | integer | yes | |
head | string | yes | |
note | string | yes | |
number | integer | yes | |
RevokeAnyToken
POST /v1/tokens/revoke: no body (or {}) revokes the token this request carries; with revocation_id, an instance administrator revokes any token by the id of one of its blocks.
| Field | Type | Required | Meaning |
|---|
revocation_id | string | null | no | Which token: the revocation id of one of its blocks (64 hex digits). Without unseen, it must be an id this instance knows (one already revoked, a runner token's, or a block of a token presented since the server started): any other is bad_request, since it would stop no token. Absent: the token this request carries. |
unseen | boolean | null | no | true: revoke revocation_id although this instance has never seen it, on the administrator's word (a token that leaked and was never presented here, or not since a restart). Instance administrators only (admin on the instance, through a token not narrowed below it: what "instance root" means here). It is explicit and never a fallback: a wrong id sent as unseen is recorded as revoked and stops nothing. Only with revocation_id; false is the same as leaving it out. |
RevokeToken
POST /v1/repos/{repo}/tokens/revoke: a runner token of that repository.
| Field | Type | Required | Meaning |
|---|
revocation_id | string | null | no | Which token: the revocation id of one of its blocks (64 hex digits), from a runner token's answer or its mint entry in the signed log. Required. |
RulePath
One path a landing rule lists.
| Field | Type | Required | Meaning |
|---|
merge | PathMerge | null | no | Optional: union merges this path by line union in the rule's queue (decision 0078): a change may only add lines, and they go after what landed, without the ones already there. Only on a modified path without {name}, in a rule with queue. Absent: the ordinary merge. |
path | string | yes | From the repository root; may contain {name} once (one identifier, shared by every path that uses it). |
status | PathChange | yes | |
RuleVerdict
What one landing rule says about a change now.
| Field | Type | Required | Meaning |
|---|
lands | boolean | yes | True when nothing stands in the way: the next passing report of the rule's check lands the change. |
refusals | [any] | yes | What stands in the way, one object each: reason plus its fields. check_missing {check}, check_not_passed {check, status, conclusion?}, wrong_reporter {check, reporter, wanted}, unexpected_paths {paths}, missing_paths {paths}, head_branch {branch, wanted}, behind_target, bad_name, stacked, not_open, conflict {paths}, check_not_pinned {check} (its report named no head), queued {position?, candidate?} (the rule has a queue and the change is in line: nothing to do but wait), ejected {why} (the queue put this revision out; why as in queue.report), withheld {reference} (this host withholds the change's head branch or its target: no rule lands it while that stands), not_a_plain_file {entries: [{path, kind}]} (kind: executable, symlink, submodule, other). |
rule | string | yes | |
warnings | [any] | no | What stands in nobody's way but should be known, one object each: union_path_filling {path, bytes} (the union-merged file was past three quarters of its bound at the push: an administrator should rotate or compact it; decision 0086). Never counted as a refusal. |
RunnerToken
A runner's token, answered once and never stored: keep it in a file only the runner can read. Its Debug leaves the token out, so a log line or a failed assertion cannot carry it.
| Field | Type | Required | Meaning |
|---|
not_after_ms | integer | yes | |
principal | string | yes | |
repo | string | yes | The repository's id (jr_…). |
revocation_id | string | no | What revokes it: POST /v1/repos/{repo}/tokens/revoke with this id (or POST /v1/tokens/revoke carrying the token itself). It and everything narrowed from it stop; the token it was narrowed from goes on. Not a secret; it is also in the signed log's entry of this mint. Empty from a server older than revocation by id. |
scopes | [Scope] | yes | What it may do: read and change_write unless push was asked for. Nothing else, ever. |
token | string | yes | The bearer token (jt_…). It works on this repository only, for scopes only. |
token_id | string | yes | Its id, as it appears in the signed ref log on every write made with it. |
Scope
What a token may do. Mirrors jit-trust's operations.
One of: "read" | "push" | "change_write" | "review" | "claim" | "merge" | "admin"
SessionEnded
| Field | Type | Required | Meaning |
|---|
ended | boolean | yes | Always true. |
SessionExchange
POST /v1/session/exchange. Its Debug shows no value: every field is a credential or binds one.
| Field | Type | Required | Meaning |
|---|
access_token | string | yes | Privy's access token. |
identity_token | string | yes | Privy's identity token (of the same person: the subjects must match). |
nonce | string | yes | The login's nonce, from the browser's cookie. |
state | string | yes | From POST /v1/session/start. |
SessionExchanged
A session (8 hours) for the account.
| Field | Type | Required | Meaning |
|---|
account | AccountBrief | yes | |
created | boolean | yes | The account was made by this exchange. |
expires_ms | integer | yes | |
fresh_until_ms | integer | yes | Until when the login counts as fresh (approving a key needs that): ten minutes after Google last verified the person, never after expires_ms; may be in the past. |
session | string | yes | The session token. Shown once; the front end keeps it in the browser's __Host-neo_session cookie. |
SetFeedback
PATCH /v1/admin/feedback/{id}. A field left out is left as it is; null clears it (not state).
| Field | Type | Required | Meaning |
|---|
change | string | null | no | A reference to the change that came of it: one line, at most 200 bytes. |
kind | FeedbackKind | null | no | |
reply | string | null | no | One line for the sender, at most 512 bytes. |
state | FeedbackState | null | no | A kind makes the item triaged unless state says otherwise; received with a kind is refused. |
SetGrant
| Field | Type | Required | Meaning |
|---|
scopes | [Scope] | yes | What the principal may do in this scope from now on. An empty list removes the grant. |
Signature
| Field | Type | Required | Meaning |
|---|
email | string | yes | |
name | string | yes | |
time_ms | integer | yes | |
StreamLimits
Concurrent event streams: the token's or its principal's count, whichever has fewer slots left.
| Field | Type | Required | Meaning |
|---|
limit | integer | yes | |
open | integer | yes | |
SuspendAccount
POST /v1/admin/accounts/{account}/suspend.
| Field | Type | Required | Meaning |
|---|
reason | SuspendReason | yes | |
reference | string | null | no | What the administrator can follow up on (a case or ticket number). At most 512 bytes, no control characters. It goes to the server's log line only: it is not stored and never answered. |
SuspendReason
Why an instance administrator suspended an account: jit-trust's ReasonCode, nothing else.
One of: "abuse" | "spam" | "legal" | "security" | "owner_request"
TokenRevoked
| Field | Type | Required | Meaning |
|---|
logged_in | string | null | no | The repository whose signed log carries the entry: a runner token's own revocation is written in its repository's log. Null for everything else (a token of no repository, and a token narrowed from a runner's revoking itself: those are in the revocation table only). |
newly | boolean | yes | False when it was revoked already: nothing changed and nothing was written. |
revocation_id | string | yes | |
unseen | boolean | null | no | true when the request said "unseen": true; absent otherwise. |
Tree
| Field | Type | Required | Meaning |
|---|
commit | string | yes | The commit the tree was read at (resolved from the rev in the request). |
entries | Listed5 | yes | |
path | string | yes | |
TreeEntry
| Field | Type | Required | Meaning |
|---|
kind | EntryKind | yes | |
mode | integer | yes | |
name | string | yes | |
oid | string | yes | |
path | string | yes | |
size | integer | null | no | Bytes; null for directories and submodules. |
UpsertChange
PUT /v1/repos/{repo}/changes/for/{branch}: make sure an open change proposes this branch.
| Field | Type | Required | Meaning |
|---|
base | string | null | no | The branch a new change targets. Default: the default branch. Ignored for an existing change. |
description | string | null | no | Used only when a change is opened; an existing change keeps its description. |
title | string | yes | Used only when a change is opened; an existing change keeps its title. |
Upserted
The open change for a branch, and what the call did to get it.
| Field | Type | Required | Meaning |
|---|
change | ChangeSummary | yes | The change, as changes.get answers it. |
created | boolean | yes | True when the change was opened by this call. |
revised | boolean | yes | True when this call added a revision (the branch had moved since the change's latest revision). |
WhoAmI
GET /v1/whoami.
| Field | Type | Required | Meaning |
|---|
anonymous | boolean | yes | |
expires_ms | integer | null | no | |
on_behalf_of | string | null | no | Whose authority the principal acts under, when it is not its own. |
principal | string | yes | The authenticated principal: who every write is attributed to. anonymous without a token. |
scopes | [Scope] | yes | |
token_id | string | null | no | |
via | string | null | no | The sub-agent the token names as its holder, if any. A label for display, not proven and not an identity: everything is attributed to principal. |
WithheldInfo
The withholding a withheld or restored log entry is about.
| Field | Type | Required | Meaning |
|---|
reason | WithheldReason | null | no | withheld entries only. |
reference | string | null | no | withheld entries only; may be empty. |
scope | WithheldScopeInfo | null | no | withheld entries only. |
seq | integer | yes | The sequence number of the withheld entry: on a withheld entry its own, on a restored entry the one it lifts. This is what POST …/restore takes. |
WithheldKind
What a withholding covers.
One of: "repository" | "refs" | "record"
WithheldReason
Why a host withholds content, as a class; the particulars go in reference.
One of: "legal" | "policy" | "security" | "owner"
WithheldScopeInfo
A withholding's scope as the log states it.
| Field | Type | Required | Meaning |
|---|
id | string | null | no | record: the record's id when it is text (as jit-collab's ids are). |
id_hex | string | null | no | record: the record's id in lowercase hex when it is not text (then id is absent). |
kind | WithheldKind | yes | |
patterns | array | null | no | refs: the patterns (exact, or a prefix ending in *). |
record | string | null | no | record: the record's kind. |
Withhold
Take part of a repository down at this host (instance administrators only). What each scope covers, and does not: WithholdScope.
| Field | Type | Required | Meaning |
|---|
include_queue | boolean | null | no | A refs pattern that covers refs/queue or anything under refs/queue/ (the merge queue's candidate pins, e.g. refs/* or refs/queue/*) is refused unless this is true: withholding them stops the queue from serving its candidates. Only for a refs scope. Default false. |
reason | WithheldReason | yes | |
reference | string | null | no | What a reader can follow up on: a case or notice number, a URL, a policy section. At most 1024 bytes, no control characters. It is public: it is in the signed log, which anyone who may read the repository reads. Default empty. |
scope | WithholdScope | yes | |
WithholdScope
The scope of a POST /v1/repos/{repo}/withhold: kind and the fields of that kind only (any other field is refused). {"kind":"repository"} covers every ref's content and every record: API reads of the repository answer 451 withheld and clone and fetch serve nothing; what stays readable is the repository's record, its signed log and GET …/withholdings. {"kind":"refs","patterns":["refs/heads/leak","refs/heads/topic/*"]} covers the refs whose NAMES match and the content only they reach. It does NOT cover content that another served ref, a change's refs/changes/… pin or a queue pin also reaches: that stays served, by that ref and by id (decision 0070); cover those refs too, or withhold the repository. Ref names stay listed (they are in the signed log). {"kind":"record","record":"revision","id":"<change id>/2"} covers one record jit-collab anchors in the log: the API refuses or leaves out a change one of whose revisions, reviews or landing is withheld, and bundles and mirrors leave the record out. It does NOT cover the git content the record names: withhold its refs for that. The log itself is always served, and states every withholding.
| Field | Type | Required | Meaning |
|---|
id | string | null | no | record only, required: the record's id as jit-collab writes it in the log and the API shows it: a revision <change id>/<revision number>, a review <change id>/<review id>, a landing <change id>, landing rules and a target override their decimal number. The record must exist (not_found). Exactly that spelling: another (/01, /+1, upper case, a change's number for its id) is bad_request naming the one to send, since the log compares ids byte for byte. |
kind | WithheldKind | yes | |
patterns | array | null | no | refs only, required: 1 to 1024 patterns, each under refs/, exact or a prefix ending in * (a * anywhere else is refused: it would match only that literal name). Each must be able to match a ref: an exact pattern a valid ref name (git's rules; it may name a ref that does not exist yet, which withholds the name in advance), a prefix the beginning of one (refs/heads/topic/ without * is refused). |
record | string | null | no | record only, required: the record's kind as jit-collab anchors it in the log: revision, review, landing, landing_rules or target_override. |
Withholding
A withholding in force: a withheld entry that no restored entry has lifted (GET …/withholdings).
| Field | Type | Required | Meaning |
|---|
at_ms | integer | yes | When the entry was written, Unix ms. |
binding | boolean | yes | Whether this host enforces it: signed by this host's own log key. false for one stated by an earlier host of the repository (it came with the log): it says what that host did not serve, and binds nobody here. |
reason | WithheldReason | yes | |
reference | string | yes | May be empty. |
scope | WithheldScopeInfo | yes | In the form a withhold body takes, plus id_hex for a record id that is not text. |
seq | integer | yes | The withheld entry's sequence number: what POST …/restore takes, and where it is in GET …/reflog. |
signer | string | yes | The log key that signed it (64 hex digits). |
Work
GET …/work: what the caller could usefully do next in this repository.
| Field | Type | Required | Meaning |
|---|
cursor | string | yes | |
needs_you | [WorkItem] | yes | The caller's open changes that need action from the caller: failing checks, requested changes, conflicts. |
taken | [Claim] | yes | Claims held by others: paths and tasks to stay away from. |
to_review | [WorkItem] | yes | Others' open changes waiting for a review the caller could give. |
your_claims | [Claim] | yes | The caller's own claims, soonest to expire first. |
WorkItem
| Field | Type | Required | Meaning |
|---|
change | ChangeBrief | yes | |
reasons | [string] | yes | Why it is listed: checks_failed, changes_requested, conflicted, needs_review, behind_base. |