Add the git dependency
Until Hex publishing, pin the Git dependency explicitly.
[dependencies]dewdrop = { git = "https://github.com/tylerbutler/dewdrop", ref = "main" }Fluid protocol surface for Gleam
dewdrop sits between windsock's transport primitives and the full Fluid protocol model. It names the canonical events, keeps their positional payloads visible, and gives client and server runtimes a narrow adapter boundary.

Fluid events over a narrow transport boundary.
connect_document(payload) -> 42["connect_document", payload]windsock owns the raw event envelope.connect_document lives in dewdrop/events.dewdrop keeps event arguments positional and explicit.Add the pre-1.0 git dependency, encode and decode Fluid event names through windsock, import the shared vocabulary, and use the beryl server codec when tests need the same adapter boundary.
Until Hex publishing, pin the Git dependency explicitly.
[dependencies]dewdrop = { git = "https://github.com/tylerbutler/dewdrop", ref = "main" }Fluid meaning comes from the event name and positional args.
import dewdropimport gleam/json
pub fn connect_frame() { dewdrop.encode_connect( json.object([#("id", json.string("doc-123"))]) )}
// 42["connect_document",{"id":"doc-123"}]Operation messages stay in the ordered argument list.
import dewdropimport gleam/json
pub fn submit_frame() { dewdrop.encode_submit_op( json.string("c1"), json.preprocessed_array([]), )}
// 42["submitOp","c1",[]]beryl can decode and encode the same Fluid event stream.
import dewdrop/server
pub fn codec() { server.server_codec()}Each layer owns one kind of knowledge. Transport envelopes, Fluid event names, protocol semantics, and server behavior stay separate.
Owns the lower-level event envelope and heartbeat packets that dewdrop builds on.
Names the Fluid event vocabulary and exposes client/server adapters over windsock.
Owns typed Fluid messages, sequencing/session rules, summaries, signals, nacks, and JWT validation above the event adapter.
Consumes the protocol layers to run Fluid-compatible collaboration services in Gleam.
The constants live in dewdrop/events so protocol packages can share names without pulling in aquamarine or beryl. The groups below mirror the collaboration lifecycle instead of forcing you to reconstruct it from one flat list.
| Event | Direction | Purpose |
|---|---|---|
| Connection | ||
connect_document | client → server | Begin collaboration for a document. |
connect_document_success | server → client | Acknowledge a successful document connection. |
connect_document_error | server → client | Reject a document connection attempt. |
close | either | Close the document connection. |
| Operations | ||
submitOp | client → server | Submit operation messages for sequencing. |
op | server → client | Deliver sequenced operations back to clients. |
nack | server → client | Reject submitted operations explicitly. |
| Signals | ||
submitSignal | client → server | Send non-persistent collaboration signals. |
signal | server → client | Broadcast non-persistent collaboration signals. |
| Summaries | ||
submitSummary | client → server | Submit a summary for the document. |
summaryAck | server → client | Acknowledge an accepted summary. |
summaryNack | server → client | Reject a submitted summary. |