Upload a definition file
Streams the body, at most the Tenant's skill limit (/v1/tenant/skills, default 2 GiB: one file may be as large as a whole skill), to the SHA-256 the path names; a body with another hash stores nothing (400). A file the Tenant holds already is kept as it is (200).
applicationKeyAuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
file*stringsha256: and the SHA-256 of the file's bytes, 64 lowercase hex digits
Nylorun-Protocol*stringThe protocol version, 18
The file's bytes
body*fileapplication/octet-streambinaryThe Tenant held the file already
application/json- response
sha256*string^sha256:[0-9a-f]{64}$size*integer0 <= valueimport { createClient } from "@nylorun/agents";const client = await createClient();const file = await client.files.upload(bytes);{ "sha256": "string", "size": 0}Compare two versions' folders GET
The files added, removed and changed from version `from`'s source to version `to`'s, by path, a file changed when its SHA-256 differs (feature `agent-folders`). Each list is sorted by path. A version saved as JSON has no source (`404`).
Whether the Runtime holds a definition file HEAD
`200` when the Tenant holds the file, `404` when it does not: upload it.