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:
@@ -2,7 +2,8 @@
|
||||
|
||||
JSON Schema (draft 2020-12) definitions for the IRC-style message protocol.
|
||||
|
||||
All messages share a common envelope defined in [`message.schema.json`](message.schema.json).
|
||||
All messages share a common envelope defined in
|
||||
[`message.schema.json`](message.schema.json).
|
||||
|
||||
## Base Envelope
|
||||
|
||||
@@ -30,7 +31,7 @@ All messages share a common envelope defined in [`message.schema.json`](message.
|
||||
| MODE | [`c2s/mode.schema.json`](c2s/mode.schema.json) | Set/query modes |
|
||||
| TOPIC | [`c2s/topic.schema.json`](c2s/topic.schema.json) | Set/query topic |
|
||||
| KICK | [`c2s/kick.schema.json`](c2s/kick.schema.json) | Kick user |
|
||||
| PING | [`c2s/ping.schema.json`](c2s/ping.schema.json) | Client ping |
|
||||
| PING | [`c2s/ping.schema.json`](c2s/ping.schema.json) | Client keepalive |
|
||||
| PUBKEY | [`c2s/pubkey.schema.json`](c2s/pubkey.schema.json) | Announce public key |
|
||||
|
||||
## Server-to-Client (S2C)
|
||||
|
||||
Reference in New Issue
Block a user