@indiegems/gem-web-sdk 20.0.0 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1790,8 +1790,11 @@
1790
1790
  "deliberately: a frame that took its JWKS endpoint from a relayed message",
1791
1791
  "would let the parent choose the keys it verifies peers against.",
1792
1792
  "",
1793
- "The nine events are the whole vocabulary; an unrecognised p2p_* type is",
1794
- "a drop at the parent, not a passthrough.",
1793
+ "The nine events are the whole vocabulary of this message; an",
1794
+ "unrecognised p2p_* type is a drop at the parent, not a passthrough. The",
1795
+ "relay drain notice is the one further push the parent relays, and it",
1796
+ "crosses as its own type, gem.relayDraining: this enum is closed, so a",
1797
+ "tenth value would be refused by every frame already shipped.",
1795
1798
  "",
1796
1799
  "PARENT TO FRAME ONLY. gem.signal is the other direction."
1797
1800
  ],
@@ -1824,6 +1827,68 @@
1824
1827
  "rateLimit": { "perMinute": 1800 }
1825
1828
  },
1826
1829
 
1830
+ {
1831
+ "type": "gem.relayDraining",
1832
+ "direction": "parentToFrame",
1833
+ "transport": "port",
1834
+ "$comment": [
1835
+ "A TURN relay this player's P2P match may be using is going away, relayed",
1836
+ "from gem-api's `p2p_relay_draining`. Gated by the `p2pRelayDrain`",
1837
+ "capability; the mapping lives in schema/capabilities.json and nowhere",
1838
+ "else.",
1839
+ "",
1840
+ "A HINT, AND ONE THE FRAME COULD SURVIVE WITHOUT. It tells the frame to",
1841
+ "re-lease and, where its selected candidate pair runs through one of",
1842
+ "these relays, to restart ICE on the connection it already has, so the",
1843
+ "match moves before the relay stops rather than after. The control is",
1844
+ "the relay's own: a draining relay refuses new allocations whatever",
1845
+ "this message says, and a connection on it fails over by the ordinary",
1846
+ "path when it stops. A parent that rewrites this can cost a frame a",
1847
+ "renegotiation; it cannot move a connection anywhere.",
1848
+ "",
1849
+ "ITS OWN TYPE, NOT A TENTH VALUE IN gem.signalEvent'S ENUM: the",
1850
+ "generated validator rejects an unknown enum value, and every frame",
1851
+ "already shipped would answer `invalid_message`. A parent sends this",
1852
+ "only to a frame that advertised the capability and drops it otherwise.",
1853
+ "",
1854
+ "SCOPED BY MATCH, NOT BY GAME. gem-api stamps the push with no game id,",
1855
+ "as it does `p2p_error`, so the parent relays it only for a match this",
1856
+ "player's socket or this frame has already named.",
1857
+ "",
1858
+ "PARENT TO FRAME ONLY. A frame-authored drain notice would let a game",
1859
+ "tell the parent a relay is going away."
1860
+ ],
1861
+ "fields": {
1862
+ "matchId": {
1863
+ "kind": "string",
1864
+ "maxLength": 64,
1865
+ "$comment": "The match whose relays are draining. The frame acts only for the live session on this match."
1866
+ },
1867
+ "clusterTargetId": {
1868
+ "kind": "string",
1869
+ "maxLength": 64,
1870
+ "$comment": "The cluster the draining relays belong to. It decides nothing on the frame: the re-lease asks the cluster the session already leases from."
1871
+ },
1872
+ "relayIps": {
1873
+ "kind": "array",
1874
+ "maxItems": 16,
1875
+ "items": { "kind": "string", "maxLength": 64 },
1876
+ "$comment": "The draining relays' public addresses — the hosts in the lease's `turn:` URLs, and what a selected candidate pair names. A lease names at most three relays."
1877
+ },
1878
+ "drainingSince": {
1879
+ "kind": "string",
1880
+ "maxLength": 40,
1881
+ "$comment": "RFC 3339. When the relays began draining."
1882
+ },
1883
+ "deadline": {
1884
+ "kind": "string",
1885
+ "maxLength": 40,
1886
+ "$comment": "RFC 3339. When the relays stop relaying. A link still on one by then is dropped and re-dialled; one this side cannot parse is read as the drain ceiling, thirty minutes."
1887
+ }
1888
+ },
1889
+ "rateLimit": { "perMinute": 60 }
1890
+ },
1891
+
1827
1892
  {
1828
1893
  "type": "gem.dedicatedEvent",
1829
1894
  "direction": "parentToFrame",
@@ -308,6 +308,12 @@
308
308
  "gates": [
309
309
  "gem.menuStyle"
310
310
  ]
311
+ },
312
+ "p2pRelayDrain": {
313
+ "implemented": true,
314
+ "gates": [
315
+ "gem.relayDraining"
316
+ ]
311
317
  }
312
318
  }
313
319
  }