Skip to content

Identify the service and negotiate the protocol major.

API version mission-write unreleased

GET
/handshake

Returns the protocol majors the service speaks, its version, the instance id it wrote to the endpoint file and the identity of the clone it serves. It needs the bearer token but not the Spec-Kitty-Write-Protocol header, so a client can call it before it knows a common major. It writes nothing.

Authorizations

Responses

200

The identity of the service.

Media type application/json
Handshake

What the running service is. The client reads it after the endpoint file and before any write: instanceId must equal the file’s instance_id and repositoryId the client’s own digest of its git common dir, or the client refuses to write; it then sends the highest major both sides speak.

object
instanceId
required

The ULID the service minted at start and wrote to its endpoint file.

string
/^[0-9A-HJKMNP-TV-Z]{26}$/
protocolVersions
required

The protocol majors the service speaks, ascending.

Array<integer>
>= 1 items unique items
repositoryId
required

The lowercase hex SHA-256 of the real path of the git common dir the service serves.

string
/^[0-9a-f]{64}$/
serviceVersion
required

The version of the service build.

string
>= 1 characters <= 64 characters /^[0-9A-Za-z][0-9A-Za-z.+_-]{0,63}$/

401

The bearer token is missing or wrong (401, WRITE_TOKEN_INVALID). The body never echoes the token.

Media type application/problem+json
WriteRefusal

The body of every refused write-service request: the shared Problem with a code from WriteRefusalCode and the status that code fixes. A guard refusal also carries type, a WriteRefusalReason URN; every other refusal omits type (about:blank). The body never echoes the bearer token, a host path or row content. A refused batch names the unit that failed in instance, as the JSON pointer #/units/ of the request. Consumers branch on code, never on title.

object
code
required

A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies this occurrence of the problem.

string
status
required

The HTTP status code of this occurrence.

integer
>= 400 <= 599
title
required

A short, human-readable summary of the kind of problem. It does not change between occurrences.

string
type

A URI reference that identifies the kind of problem. Absent means about:blank.

string
code
required
One of:
WriteRefusalCode
  1. The lane state machine or one of its guards refused the transition. The type names the reason, including stale_from_lane for a stale unit whose from_lane is not the work package’s current lane. The CLI’s orchestrator-api code for a TransitionError.
string
Allowed value: TRANSITION_REJECTED
type
One of:
WriteRefusalReason

The from or to status lane is not one of the 11 persisted Lane values.

string
Allowed value: urn:spec-kitty:write-refusal:unknown_lane

Headers

WWW-Authenticate
string

The bearer challenge (RFC 9110), Bearer with no parameters.

403

The Host, Origin or Sec-Fetch-Site guard refused the request (403, REQUEST_REFUSED).

Media type application/problem+json
WriteRefusal

The body of every refused write-service request: the shared Problem with a code from WriteRefusalCode and the status that code fixes. A guard refusal also carries type, a WriteRefusalReason URN; every other refusal omits type (about:blank). The body never echoes the bearer token, a host path or row content. A refused batch names the unit that failed in instance, as the JSON pointer #/units/ of the request. Consumers branch on code, never on title.

object
code
required

A stable machine-readable code for the problem, such as the name of a refusal reason. Consumers branch on it, never on the title.

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies this occurrence of the problem.

string
status
required

The HTTP status code of this occurrence.

integer
>= 400 <= 599
title
required

A short, human-readable summary of the kind of problem. It does not change between occurrences.

string
type

A URI reference that identifies the kind of problem. Absent means about:blank.

string
code
required
One of:
WriteRefusalCode
  1. The lane state machine or one of its guards refused the transition. The type names the reason, including stale_from_lane for a stale unit whose from_lane is not the work package’s current lane. The CLI’s orchestrator-api code for a TransitionError.
string
Allowed value: TRANSITION_REJECTED
type
One of:
WriteRefusalReason

The from or to status lane is not one of the 11 persisted Lane values.

string
Allowed value: urn:spec-kitty:write-refusal:unknown_lane