[docs] F20: merge feature/protocol-http — PROTOCOL.md section 8, the v0 routes
ci / check (push) Has been cancelled
ci / check (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
# Review — `feature/protocol-http` (PROTOCOL.md §8, the v0 routes)
|
||||
|
||||
2026-11-14. Documents only. Mark approved adding the routes on 2026-11-14.
|
||||
|
||||
**F1 — the routes match the code.** The table repeats `.agents/features/relay.md` §2 as built and
|
||||
tested in F20 (`crates/relay/tests/relay.rs`, 17 tests). No route, limit or status is new here.
|
||||
|
||||
**F2 — privacy.** §8 adds no stored field (§5 is unchanged) and loosens no promise. Two choices are
|
||||
written down as protocol commitments:
|
||||
- the uniform bare 404;
|
||||
- acknowledging by SHA-256 instead of an id.
|
||||
|
||||
**F3 — what is not here.** No quotas yet (`relay.md` §4). A future change to §8 is a version bump,
|
||||
like any change to this file.
|
||||
@@ -61,3 +61,25 @@ The platform facts above are Claude's understanding, to be verified in `.agents/
|
||||
- A delivered blob is gone; an undelivered blob is gone after the TTL (clock injected).
|
||||
- Parsers are fuzzed (`cargo fuzz`) for every message type.
|
||||
- Every check in `VERIFY.md` §1 has a CI job or a documented manual procedure.
|
||||
|
||||
## 8. The wire (v0) — approved 2026-11-08, routes added 2026-11-14
|
||||
HTTP/1.1 behind TLS (the reverse proxy, F23). Ids and tokens are unpadded base64url of a fixed length
|
||||
with one canonical spelling: ids are 16 bytes, and tokens and hashes are 32. JSON bodies refuse
|
||||
unknown fields. A blob is at most 256 KiB, and a KeyPackage at most 16 KiB.
|
||||
|
||||
| Method and path | Auth (`Authorization: Bearer`) | Effect |
|
||||
|:--|:--|:--|
|
||||
| `POST /v0/mailboxes` `{id, postTokenHash, fetchTokenHash}` | none | creates a mailbox. The owner sends **hashes**, so the relay never holds a token |
|
||||
| `POST /v0/mailboxes/{id}/blobs` (bytes) | post token | stores the blob with its size and the hour it arrived |
|
||||
| `GET /v0/mailboxes/{id}/blobs` | fetch token | the waiting blobs, oldest first, at most 100. Fetching deletes nothing |
|
||||
| `DELETE /v0/mailboxes/{id}/blobs/{sha256}` | fetch token | acknowledges: deletes that mailbox's blob with this SHA-256. §5 has no blob id, and a sequential id would leak how busy the relay is |
|
||||
| `PUT /v0/mailboxes/{id}/post-token` `{postTokenHash}` | fetch token | blocks: the old post token is refused from now on |
|
||||
| `POST /v0/invites` `{id, secretHash, keyPackage}` | none | stores an invite. It expires after 7 days, rounded up to the hour |
|
||||
| `GET /v0/invites/{id}` | invite secret | returns the KeyPackage once, then deletes the invite |
|
||||
| `GET /version` | none | the protocol and relay versions |
|
||||
|
||||
- A wrong token, an unknown id and a malformed id all give the same bare **404**, so nobody can probe
|
||||
what exists.
|
||||
- A refusal has no body.
|
||||
- The relay prints no request.
|
||||
- Tests: `crates/relay/tests/relay.rs`, `crates/protocol/tests/wire.rs`.
|
||||
|
||||
Reference in New Issue
Block a user