Jeden/Docs

CLI command

jeden relay serve

Run the encrypted collaboration-room relay used by interactive collaboration commands.

Exact invocation#

Shell
jeden relay serve <addr>

Inputs and options#

  • Required: the address to listen on, host:port. No address or port is assumed; jeden relay serve without one is refused with relay serve takes the address to listen on: jeden relay serve &lt;host:port&gt;.
  • 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=&lt;seq&gt; to start after an event, or nothing to start at the room's first; next is the room's last sequence, null for 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), a since that 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_URL is absent, not Unicode, or its direct connection fails, /health and reads answer HTTP 500 with the configuration, connection or migration cause in error; 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) exits 69; any other refusal or failure exits 1. A refusal a functionality declares ends with fix: … and cause: &lt;operation&gt;.&lt;cause&gt;, and jeden errors show &lt;operation&gt; lists every cause of that functionality.