Skip to content
Uno Docs

KitService

KitService reads and changes kit repos. Its RPCs carry the names of the kit operations.

Private content requires owner authentication. The account comes from the bearer token, never from the request. No RPC returns more than the inline Cat limit of content bytes, except the proof material of Prove. Conventions and error codes: see common.proto.

A write acts only in the caller's namespace. A write names its repo with a plain repo name, not with RepoRef. The server signs every commit and tag with the account's key.

Cat

POST/rpc/uno.kit.v1.KitService/Cat

Reads one file. The response holds the content inline up to the inline limit, and a URL above it. A signed URL expires at url_expires_at. Maps the MCP tool kit_cat.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

A revision.

path
string
deferUrl
boolean

When true, a file that the server would serve by a content URL comes back with neither inline_content nor url, and the server mints no grant. These are the files above 51200 bytes that lie as one raw blob in the pack. The caller signs on demand through GetObjectUrl. Every other answer stays as it is. False keeps the answer of earlier clients.

Responses

DeleteRef

POST/rpc/uno.kit.v1.KitService/DeleteRef

Deletes a branch when its current id equals expected_old_id. The change is public. A ref_name outside refs/heads/ fails with invalid_argument. Nested branch names under refs/heads/ are valid. Maps the MCP tool kit_ref_delete.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string
refName
string
expectedOldId
string

The id that the ref must have now. A mismatch fails with failed_precondition.

idempotencyKey
string

Responses

DeleteRepo

POST/rpc/uno.kit.v1.KitService/DeleteRepo

Deletes a repo in the caller's namespace. Only the owner can call it, and a delegated credential needs the kits:write scope, checked live. The delete is soft: every ref goes (each branch head with its packmap in one step), the repo turns private (which revokes public URL tokens), it leaves the owner's listings and Discover, cached public responses are purged, and the owner's usage loses the repo's stored bytes. The response includes the retention notice: object bytes remain for at least 30 days. Unshared bytes then become eligible for cleanup, with a further 16-day restore safety delay. Shared content and held evidence stay protected. The name stays blocked from reuse while the delete settles. The delete is final; a repo with the same name later starts empty. Maps the MCP tool kit_repo_delete.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string

The repo name in the caller's namespace.

idempotencyKey
string

Responses

Diff

POST/rpc/uno.kit.v1.KitService/Diff

Lists the file changes between two revisions. The response holds no content. Maps the MCP tool kit_diff.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

baseRevision
string
headRevision
string
pathPrefix
string

Lists only paths that start with this prefix. Empty lists all paths.

pageSize
integer <int32>
pageToken
string

Responses

GetFileLayout

POST/rpc/uno.kit.v1.KitService/GetFileLayout

Returns how kit stores one file: as a single blob, or as a chunked blob with a paged list of chunks. The response holds no content.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

A revision.

path
string

Fails with not_found when the path is not a file.

pageSize
integer <int32>

The server uses 256 when page_size is 0. The server refuses a page_size above 1000 and names the maximum.

pageToken
string

Responses

GetObjectUrl

POST/rpc/uno.kit.v1.KitService/GetObjectUrl

Returns an expiring signed URL for one object. A private repo grants that URL only to its owner, with any owner credential: an account session, an account key or an owner delegation. Maps the MCP tool kit_object_url.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

objectId
string
displayMaster
boolean

True asks for the capped display master of an image in a private repository, not the original. Only the owner gets it, and the call makes no copy of the original. A public repository fails with failed_precondition.

Responses

GetReadGate

POST/rpc/uno.kit.v1.KitService/GetReadGate

Gives a cache the facts under which a read of the Public view may repeat. The answer never changes what a read returns. A cache may reuse a read only when cacheable is true, and only under the same facts.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

Responses

ListRefs

POST/rpc/uno.kit.v1.KitService/ListRefs

Lists the refs of a repo, sorted by name. Maps the MCP tool kit_ref_list.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

prefix
string

Returns only refs whose name starts with this prefix. Empty returns all refs.

pageSize
integer <int32>
pageToken
string

Responses

ListRepos

POST/rpc/uno.kit.v1.KitService/ListRepos

Lists the repos of one owner, most recently updated first. Maps the MCP tool kit_repo_list.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
namespace
string
handle
string

The username, without "@".

pageSize
integer <int32>
pageToken
string

Responses

Log

POST/rpc/uno.kit.v1.KitService/Log

Lists the commits reachable from a revision, newest first. Maps the MCP tool kit_log.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

The revision where the walk starts. Paging requires a full ref, such as refs/heads/main. A raw commit id returns page one without a continuation.

pageSize
integer <int32>

Commits per page. Zero selects 10. A value above 100 is refused with a failed_precondition that names the maximum. A page can hold fewer commits than requested when the call reaches its work budget, because each commit costs storage reads. Follow next_page_token to read more history.

pageToken
string

Responses

Prove

POST/rpc/uno.kit.v1.KitService/Prove

Returns a kit disclosure bundle that proves one path at a commit. The engine builds it with kit_core::verify::build_disclosure_from. The bytes equal kit_core::verify::build_disclosure over the same objects. A client verifies the bundle with verify_disclosure from the npm package @officialunofficial/kit-wasm, without further calls. The format is KDPB, in SPEC-DISCLOSURE.md section 3. Maps the MCP tool kit_prove.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

A revision.

path
string

The path to prove. Empty proves the root tree.

Responses

ReadRef

POST/rpc/uno.kit.v1.KitService/ReadRef

Reads one ref. Maps the MCP tool kit_ref_read.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

refName
string

Responses

Remix

POST/rpc/uno.kit.v1.KitService/Remix

Copies a commit of any public repo into a new repo in the caller's namespace. The copy runs as a job and is public. Poll it with StagingService.GetJobStatus. An OAuth delegation cannot remix a public repo: the call fails with failed_precondition, because a copy has the privacy of its source and an agent cannot publish. Maps the MCP tool kit_remix.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
source
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

sourceCommitId
string

The commit to copy.

repo
string

The name of the new repo in the caller's namespace. A name in use fails with already_exists.

idempotencyKey
string
sourceRef
string

Optional published source branch. Remix preflight resolves an empty value.

Responses

RemixPreflight

POST/rpc/uno.kit.v1.KitService/RemixPreflight

Resolves a published source tip and estimates its full-history bytes. This read creates no job. Fork admission sets the authoritative charge.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
source
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

sourceCommitId
string

The tip of a published source branch.

sourceRef
string

Optional full refs/heads/... name. Empty prefers matching main, then one unique branch.

Responses

Revert

POST/rpc/uno.kit.v1.KitService/Revert

Starts a job that reverses a single-parent commit on a branch. A changed current tree conflicts. Poll with StagingService.GetJobStatus. Maps the MCP tool kit_revert.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string
refName
string

The branch to add the revert commit to.

commitId
string

The commit to reverse.

expectedHead
string

The id that the branch must have now. A mismatch fails with failed_precondition. A revert that conflicts also fails with failed_precondition.

message
string

Empty selects a default message. Otherwise the text must contain a non-whitespace character. At most 65536 UTF-8 bytes; NUL is forbidden. Whitespace follows Unicode White_Space. Accepted text stays unchanged. Invalid text fails with invalid_argument before admission.

idempotencyKey
string

Responses

SetVisibility

POST/rpc/uno.kit.v1.KitService/SetVisibility

Only the owner can change a repo's visibility in either direction. Repos are public by default. Making a repo private returns a warning because public content may already have been copied. An OAuth delegation (an agent) cannot make a repo public: the call fails with permission_denied, and the owner must approve with an account session. A delegation can make a repo private.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string

The repo name in the caller's namespace.

visibility
string

A repo is public by default. Its owner can change visibility unless a private-origin lock prevents public visibility.

Values
REPO_VISIBILITY_UNSPECIFIEDREPO_VISIBILITY_PUBLICREPO_VISIBILITY_PRIVATE
idempotencyKey
string

Responses

Show

POST/rpc/uno.kit.v1.KitService/Show

Shows a commit and its tree, or a tree alone. Maps the MCP tool kit_show.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

A revision, or a tree id.

path
string

A directory path inside the tree. Empty selects the root tree.

recursive
boolean

Lists every entry below the tree, not only its direct entries.

pageSize
integer <int32>
pageToken
string
includeSizes
boolean

Fills TreeEntry.size_bytes for the files of the returned page. The server omits size_bytes by default, and Show costs fewer storage reads. Cat and GetFileLayout report the size of one file without this flag.

Responses

Tag

POST/rpc/uno.kit.v1.KitService/Tag

Creates a signed tag. Fails with already_exists when the tag exists. The tag is public. Maps the MCP tool kit_tag.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string
name
string

The short tag name. The server creates refs/tags/.

target
string

A revision.

message
string

Empty selects a default message. Otherwise the text must contain a non-whitespace character. At most 65536 UTF-8 bytes; NUL is forbidden. Whitespace follows Unicode White_Space. Accepted text stays unchanged. Invalid text fails with invalid_argument before admission.

idempotencyKey
string

Responses

UpdateRef

POST/rpc/uno.kit.v1.KitService/UpdateRef

Moves a branch when its current id equals expected_old_id. The change is public. A ref_name outside refs/heads/ fails with invalid_argument. Nested branch names under refs/heads/ are valid. Tags are immutable, and the engine owns refs/kit/. Maps the MCP tool kit_ref_update.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
string

The repo name in the caller's namespace.

refName
string
expectedOldId
string

The id that the ref must have now. Empty requires that the ref does not exist. A mismatch fails with failed_precondition.

newId
string
idempotencyKey
string

Responses

Verify

POST/rpc/uno.kit.v1.KitService/Verify

Checks the signatures of the signed objects that a revision leads to: each tag on the way, then the commit or remix. For each object it gives three separate answers (see ObjectVerification): whether the signature is valid, whether the signer was an authorized keyring member when the server accepted the object, and whether a later revocation reaches back to that time. The membership and revocation answers are attested by Uno. Maps the MCP tool kit_verify.

Header Parameters

Connect-Protocol-Version
number·const 1

Define the version of the Connect protocol

Example1
Connect-Timeout-Ms
number

Define the timeout, in ms

Example1000

Request Body

application/json
repo
object

Names one repo. Reads may name any owner. Writes never use this message for the target repo, because a write acts only in the caller's namespace.

At most one of namespace, handle may be set.

revision
string

A revision. A tag ref selects the tagged commit.

Responses