CLI command
jeden relay serve
Run the encrypted collaboration-room relay used by interactive collaboration commands.
Exact invocation#
jeden relay serve <addr>Inputs and options#
- Required: the address to listen on,
host:port. No address or port is assumed;jeden relay servewithout one is refused withrelay serve takes the address to listen on: jeden relay serve <host:port>. - Required:
JEDEN_RELAY_MAX_BLOB_BYTES, the largest request body the relay accepts, a positive whole number of bytes. Unset or malformed, startup is refused naming the variable and the value it held. - Room payloads are opaque, client-encrypted blobs; mutation requests carry the room write token and role. A read names
since=<seq>to start after an event, or nothing to start at the room's first;nextis the room's last sequence,nullfor a room without events.
Output and state effect#
Binds an HTTP relay, keeps rooms, their role tokens and their blobs in the fleet database jeden (tables relay_rooms, relay_room_tokens, relay_events), so relays on every host serve the same rooms, prints the bound address and that location, and serves until stopped. A durable room has no fixed event-count ceiling: authorized writes continue with monotonically increasing sequence numbers. Storage failures retain their cause rather than being reported as a full room. GET /health reports backend: fleet-postgres with room, event and token counts.
Refusals and boundaries#
- Bind failures stop startup.
- The relay refuses missing or invalid write tokens, empty bodies, bodies over the stated
JEDEN_RELAY_MAX_BLOB_BYTES(413), bodies without a declared length (411), asincethat is not a sequence (400), unsupported methods, invalid roles, and unknown routes with explicit HTTP errors. A sequence outside the database or host integer representation is refused before persistence. - When
JEDEN_DATABASE_URLis absent, not Unicode, or its direct connection fails,/healthand reads answer HTTP 500 with the configuration, connection or migration cause inerror; unreadable URL bytes are not echoed and no Skarbiec credential is consulted. - A command line of the wrong form (an unknown command or option, a missing, unexpected or invalid argument, a missing confirmation) prints the error and the usage and exits
2; a refusal that retrying unchanged can help (a dependency down or not answering, a rate limit) exits69; any other refusal or failure exits1. A refusal a functionality declares ends withfix: …andcause: <operation>.<cause>, andjeden errors show <operation>lists every cause of that functionality.