Follow felis-web-gateway#3: felis-json v1 envelope, input shape, list rows #8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
felis-web-gateway#3 followed felis core to
6da5620dand the WebSocket contract the browser half decodes changed shape. This component is still pinned at felis32775067and reads the pre-felis-jsonenvelope, so the two halves do not talk until it follows.docs/broker.mdandREADME.mdin felis-web-gateway carry the current contract; the authoritative payload schema is feliscrates/felis-grid/schemas/felis-json-v1.schema.json.What changes
{"kind":"Grid"|"Image"|"Control","msg":…}. Now felis's own, verbatim:{"felis_json":1,"kind":"grid"|"image"|"conn"|"session","msg":…}. Refuse an unknownfelis_jsonbefore readingmsg; ignore unknown keys inside v1. The oldControlbucket splits intoconnandsession(both still non-renderable).sidsits beside felis's keys:{"sid":2,"felis_json":1,"kind":"grid","msg":…}.msgpayloads are the v1 DTOs, not derived serde of the Rust enums: family enums internally tagged{"type":"…"}insnake_case;RowJsonis{row, cells}withcellstagged{"encoding":"rle", graphemes, attr_runs, sized_cells, soft_wrap_continued};GraphemeJsontagged{"type":…}; session ids are 32-digit lowercase hex.theme_coloris{"channel":…,"action":{"action":"set","rgb":{r,g,b}}}or{"action":"reset"};connwelcomecarriesidentity(typed) where it carriedbuild_id.{"KeyBytes":[…]}. Now the v1Inputpayload alone (no envelope):{"type":"key_bytes","bytes":[…]},{"type":"resize","dims":{rows,cols,pixel_w,pixel_h}},{"type":"next_grid_frame"}, … On the broker still{"sid":2,"input":{…}}. Malformed input is dropped without a reply; a request whoserecan be read always gets it.listrows. NowSessionInfoJson+host:session→id,rows/cols→dims.{rows,cols,pixel_w,pixel_h}, plusattachmentsandsequence(the daemon's creation order; sort tabs on it).last_notificationis{notification:{title,body,urgency}, age_seconds}.{"ev":"notify"}.notificationis{title, body, urgency}with lowercase urgency.{"ev":"closed"}now also fires with"reason":"undecodable daemon frame"when the gateway cannot encode a frame of a consumed family; offer re-attach.attach,destroy,tagaccept 1–32 hex digits; the daemon resolves them; ambiguity is an error.Unchanged: attach header and
attach/createokshape, control verb request shapes, subprotocol and token negotiation, keepalive.Available, not required:
{"type":"key",…}(InputMsg::Key) lets the browser send logical keys and have the daemon encode them against the keyboard modes it owns, instead of encoding bytes in JS.Also: felis-fcast#2 moved
.fcastto envelope v3 (frames carry the same felis-json v1msg; header hasfelis_jsoninstead ofproto_major/proto_minor/encoding), so the replay fixtures here are pre-v3.