{
"id": "tech.lenooby09.kvcs.patch",
"defs": {
"main": {
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"patchId",
"patchCbor",
"jws"
],
"properties": {
"jws": {
"type": "string",
"maxLength": 8192,
"description": "Detached compact JWS over patchCbor, identical to the local SignedPatch.jws field. 8192 chars covers Ed25519 / ES256 / ES256K compact-JWS sizes with a comfortable margin."
},
"patchId": {
"type": "string",
"maxLength": 128,
"description": "Lower-case hex multihash of the canonical CBOR — matches kvcs's PatchId. 128 chars covers the longest hashes in current use (BLAKE3, SHA-512, etc.)."
},
"patchCbor": {
"type": "string",
"maxLength": 20480,
"description": "Base64url-encoded canonical CBOR of the signed patch. Capped at 20 KiB (20480 chars) — the largest a Lexicon string field can be without triggering goat's `large-string` lint, which recommends using blob refs for anything bigger. Patches whose base64 form exceeds this cap should be split or migrated to a blob-based record schema; in practice, atproto PDSes already enforce a tight per-record size limit well below 1 MiB."
}
}
},
"description": "A signed kvcs patch envelope record. Carries the canonical CBOR of the patch and its detached compact JWS, indexed by the patch's hex multihash id."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "A signed kvcs patch envelope, addressable on the author's atproto PDS. The rkey is the patch id in hex."
}