feat: add IRC-style message protocol JSON schemas (draft 2020-12)

Add JSON Schema definitions for all message types:
- Base message envelope (message.schema.json)
- C2S: PRIVMSG, NOTICE, JOIN, PART, QUIT, NICK, MODE, TOPIC, KICK, PING, PUBKEY
- S2C: named commands + numeric reply codes (001, 002, 322, 353, 366, 372, 375, 376, 401, 403, 433)
- S2S: RELAY, LINK, UNLINK, SYNC, PING, PONG
- Schema index (schema/README.md)

All messages use IRC command names and numeric codes from RFC 1459/2812.
Bodies are always objects or arrays (never raw strings) to support
deterministic canonicalization (RFC 8785 JCS) and message signing.
This commit is contained in:
clawbot
2026-02-10 10:26:32 -08:00
parent 4645be5f20
commit 909da3cc99
72 changed files with 1166 additions and 770 deletions

View File

@@ -0,0 +1,24 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.eeqj.de/sneak/chat/schema/s2c/376.schema.json",
"title": "376 RPL_ENDOFMOTD (S2C)",
"description": "End of MOTD",
"$ref": "../message.schema.json",
"properties": {
"command": {
"const": "376"
},
"body": {
"type": "array",
"items": {
"type": "string"
},
"description": "Response lines"
}
},
"required": [
"command",
"to",
"body"
]
}