{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.eeqj.de/sneak/chat/schema/message.schema.json", "title": "Chat Message Envelope", "description": "Base message envelope. Bodies MUST be objects or arrays (never raw strings) for deterministic canonicalization (RFC 8785 JCS) and signing.", "type": "object", "required": [ "command" ], "properties": { "id": { "type": "string", "format": "uuid", "description": "Server-assigned UUID" }, "ts": { "type": "string", "format": "date-time", "description": "Server-assigned timestamp (ISO 8601)" }, "command": { "type": "string", "description": "IRC command name or numeric reply code" }, "from": { "type": "string", "description": "Sender nick or server name" }, "to": { "type": "string", "description": "Destination: channel (#foo) or nick" }, "params": { "type": "array", "items": { "type": "string" }, "description": "Additional IRC-style parameters" }, "body": { "oneOf": [ { "type": "array" }, { "type": "object" } ], "description": "Message body (array or object, never raw string)" }, "meta": { "type": "object", "description": "Extensible metadata", "properties": { "sig": { "type": "string", "description": "Cryptographic signature (base64)" }, "alg": { "type": "string", "description": "Signature algorithm (e.g. ed25519)" } } } }, "additionalProperties": false }