ModelConnector/schemas/transport_envelope.json
Meta Vens a0a6ccbf0d connector-contract-v3: the decoder refuses every dialect the wire does not name; the ciphertext is published as binary
wire_decode accepts a document only when its MessagePack value equals the
named form wire_encode writes for the decoded value (key order, integer width
and an absent optional field aside), so a positional envelope or invocation, an
integer-array ciphertext, an enum sent as its index and bytes after the
document are refused Encoding through the real carriage. The schema describes
the ciphertext as binary, and a test pins schema and wire agreeing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:03:57 +01:00

53 lines
1 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TransportEnvelope",
"type": "object",
"properties": {
"caller_runtime_id": {
"type": "string"
},
"ciphertext": {
"description": "MessagePack bin: the raw ciphertext bytes, never an array of integers",
"type": "string",
"format": "binary"
},
"message_kind": {
"$ref": "#/$defs/EnvelopeKind"
},
"nonce": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"maximum": 255,
"minimum": 0
},
"maxItems": 12,
"minItems": 12
},
"request_id": {
"type": "string"
},
"schema_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"schema_id",
"caller_runtime_id",
"request_id",
"message_kind",
"nonce",
"ciphertext"
],
"$defs": {
"EnvelopeKind": {
"type": "string",
"enum": [
"Invocation",
"Result"
]
}
}
}