place.hud.getWorkspaceEvents

The person's workspace, live: an open stream of server-sent events (text/event-stream), one covering every canvas they have open as a tab, which follows the tabs as they open and close. Each event's data is one JSON object, typed by its $type: place.hud.defs#tileEvent (a tile of an open canvas changed), #presenceEvent (who is on an open canvas: first for each as the stream opens, then as people come and go) or #canvasesEvent (the workspace changed: read getWorkspace again). A comment, ping, comes every 25 seconds when nothing else does. It is a query, not an XRPC subscription: subscriptions are WebSocket with DAG-CBOR frames, sequenced for backfill from a cursor, and this keeps no history to backfill from (what happened while no stream was open is read again from getWorkspace and getCanvas), while a browser's EventSource sends the session's cookie and reconnects by itself. It ends when the session does, or when the reader falls too far behind: connect again and read afresh. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.

Repository @lexicons.hud.place did:plc:3tzbz4pml36u4mkresb6pdhv not from the namespace authority
Details · query
Kindquery
Authorityhud.place
Commit rev3n3jbjeejz3ju
Indexed
cid bafyreic6jysvp2cwqt53hgjiwncnpkxs2h7zd4cdvjdcu6vzocsjpkorfe

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The person's workspace, live: an open stream of server-sent events (text/event-stream), one covering every canvas they have open as a tab, which follows the tabs as they open and close. Each event's data is one JSON object, typed by its $type: place.hud.defs#tileEvent (a tile of an open canvas changed), #presenceEvent (who is on an open canvas: first for each as the stream opens, then as people come and go) or #canvasesEvent (the workspace changed: read getWorkspace again). A comment, ping, comes every 25 seconds when nothing else does. It is a query, not an XRPC subscription: subscriptions are WebSocket with DAG-CBOR frames, sequenced for backfill from a cursor, and this keeps no history to backfill from (what happened while no stream was open is read again from getWorkspace and getCanvas), while a browser's EventSource sends the session's cookie and reconnects by itself. It ends when the session does, or when the reader falls too far behind: connect again and read afresh. Requires auth: the workspace's web session (its cookie, with X-HUD: 1 and the server's own Origin on a procedure) or a HUD access token as Bearer.",
      "errors": [
        {
          "description": "No live web session or HUD access token: sign in.",
          "name": "AuthRequired"
        }
      ],
      "output": {
        "encoding": "text/event-stream"
      },
      "type": "query"
    }
  },
  "description": "The signed-in person's workspace, live, as server-sent events.",
  "id": "place.hud.getWorkspaceEvents",
  "lexicon": 1
}