chore: freeze EventEnvelope v0 byte contract

This commit is contained in:
sovereign
2025-12-18 00:14:03 +00:00
parent d361122ec0
commit 1830e0f673
9 changed files with 282 additions and 40 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## V0.7.3 Envelope Canonicalization
- Added `format` and `schema` to `EventEnvelope` for stable codec/semantics pinning.
- Renamed `body``payload` in the comms event API (server still accepts `body` as an alias).
- Canonicalization enforced before persistence/broadcast:
- Timestamps truncated to RFC3339 UTC `Z` with seconds precision
- `payload` object keys recursively sorted (arrays preserve order)
- `events.jsonl` now stores one canonical `EventEnvelope` per line.
## V0.7.2 Communication Layer
### Unified Event API
@@ -32,7 +41,7 @@
# Post a note
curl -X POST http://127.0.0.1:8088/api/events \
-H "Content-Type: application/json" \
-d '{"kind":"note","node_id":"uuid","author":"operator","body":{"text":"Test","severity":"info"}}'
-d '{"kind":"note","node_id":"uuid","author":"operator","payload":{"text":"Test","severity":"info"}}'
# Query events
curl "http://127.0.0.1:8088/api/events?since=2025-01-01T00:00:00Z&kind=note"