Commit Graph

7 Commits

Author SHA1 Message Date
clawbot
1a6e929f56 docs: update README API spec for unified command endpoint
- Document all C2S commands with required/optional fields table
- Remove separate join/part/nick/topic endpoint docs
- Update /channels/all to /channels
- Update /register to /session
2026-02-10 17:53:48 -08:00
clawbot
ab70f889a6 refactor: structured body (array|object, never string) for canonicalization
Message bodies are always arrays of strings (text lines) or objects
(structured data like PUBKEY). Never raw strings. This enables:
- Multiline messages without escape sequences
- Deterministic JSON canonicalization (RFC 8785 JCS) for signing
- Structured data where needed

Update all schemas: body fields use array type with string items.
Update message.json envelope: body is oneOf[array, object], id is UUID.
Update README: message envelope table, examples, and canonicalization docs.
Update schema/README.md: field types, examples with array bodies.
2026-02-10 10:36:02 -08:00
clawbot
dfb1636be5 refactor: model message schemas after IRC RFC 1459/2812
Replace c2s/s2c/s2s taxonomy with IRC-native structure:
- schema/commands/ — IRC command schemas (PRIVMSG, NOTICE, JOIN, PART,
  QUIT, NICK, TOPIC, MODE, KICK, PING, PONG)
- schema/numerics/ — IRC numeric reply codes (001-004, 322-323, 332,
  353, 366, 372-376, 401, 403, 433, 442, 482)
- schema/message.json — base envelope mapping IRC wire format to JSON

Messages use 'command' field with IRC command names or 3-digit numeric
codes. 'body' is a string (IRC trailing parameter), not object/array.
'from'/'to' map to IRC prefix and first parameter.

Federation uses the same IRC commands (no custom RELAY/LINK/SYNC).

Update README message format, command tables, and examples to match.
2026-02-10 10:31:26 -08:00
clawbot
02acf1c919 docs: document IRC message protocol, signing, and canonicalization
- Add IRC command/numeric mapping tables (C2S, S2C, S2S)
- Document structured message bodies (array/object, never raw strings)
- Document RFC 8785 JCS canonicalization for deterministic hashing
- Document Ed25519 signing/verification flow with TOFU key distribution
- Document PUBKEY message type for public key announcement
- Update message examples to use IRC command format
- Update curl examples to use command-based messages
- Note web client as convenience UI; primary interface is IRC-style clients
- Add schema/ to project structure
2026-02-10 10:26:32 -08:00
user
6483670dc7 docs: emphasize API-first design, add curl examples, note web client as reference impl 2026-02-10 10:21:10 -08:00
user
16e08c2839 docs: update README with IRC-inspired unified API design
- Document simplified endpoint structure
- Single message stream (GET /messages) for all message types
- Unified send (POST /messages) with 'to' field
- GET /state replaces separate /me and /channels
- GET /history for scrollback
- Update project status
2026-02-10 10:20:13 -08:00
clawbot
f8a43dbb79 Initial spec: HTTP-based IRC replacement 2026-02-09 12:05:48 -08:00