@indiegems/gem-web-sdk 7.4.2 → 7.5.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.
@@ -205,6 +205,33 @@
205
205
  "maxLength": 2048,
206
206
  "format": "origin",
207
207
  "$comment": "The parent's own origin, so the frame can check who is embedding it."
208
+ },
209
+ "unbidden": {
210
+ "kind": "boolean",
211
+ "optional": true,
212
+ "$comment": [
213
+ "True when the parent started this game WITHOUT the player asking — it",
214
+ "autoplays on an information page, say — rather than because the player",
215
+ "pressed Play. Absent or false is an ordinary launch.",
216
+ "",
217
+ "ON THE HANDSHAKE because it must reach the frame before anything the frame",
218
+ "counts: the SDK opens its play session the moment the handshake lands, and",
219
+ "a fact that arrived on any later message would arrive after the session it",
220
+ "is about. A per-launch FIELD rather than a capability, because a",
221
+ "capability is a deployment-wide fact about what a peer implements and this",
222
+ "is a fact about one launch.",
223
+ "",
224
+ "Sent to every frame, since the parent cannot know which grammar a frame",
225
+ "speaks before it answers; a frame that predates the field ignores it, as a",
226
+ "receiver ignores any unknown field. What a frame that understands it does —",
227
+ "holds every analytics event that would count a play until the first real",
228
+ "input inside the frame, and then sends `gem.engaged` — it says by",
229
+ "advertising `engagement` in `gem.handshake.accept`.",
230
+ "",
231
+ "A presentation and measurement fact, NOT AN AUTHORIZATION CONTROL: nothing",
232
+ "may be granted or withheld on it, and a frame cannot use it to tell a",
233
+ "player apart from anyone else."
234
+ ]
208
235
  }
209
236
  },
210
237
  "rateLimit": { "perMinute": 30 }
@@ -2022,6 +2049,40 @@
2022
2049
  "rateLimit": { "perMinute": 5 }
2023
2050
  },
2024
2051
 
2052
+ {
2053
+ "type": "gem.engaged",
2054
+ "direction": "frameToParent",
2055
+ "transport": "port",
2056
+ "$comment": [
2057
+ "The player has given this frame its first REAL input: a pointer press, a",
2058
+ "key press or a gamepad button press that the browser itself reported",
2059
+ "(`isTrusted`). Focus, hover, wheel and synthetic events do not count. Sent",
2060
+ "once per frame document, and only to a parent that advertised",
2061
+ "`engagement`.",
2062
+ "",
2063
+ "WHY THE FRAME SAYS IT. Input inside a cross-origin frame never reaches the",
2064
+ "parent's own listeners, so a parent can only guess at engagement from focus",
2065
+ "and blur — which a game autoplaying on an information page defeats, since",
2066
+ "nothing about watching it moves focus. The frame is the only party that",
2067
+ "sees the press.",
2068
+ "",
2069
+ "SENT ON EVERY LAUNCH, not only an unbidden one: the first input is a fact",
2070
+ "whatever started the game, and a parent that already knows (the player",
2071
+ "pressed its Play) is free to ignore it. On an unbidden launch it is also",
2072
+ "the moment the SDK releases the analytics it held, so it marks where the",
2073
+ "play session it reports begins.",
2074
+ "",
2075
+ "NO FIELDS, AND IT SHOULD STAY THAT WAY. Which key, where on screen, how",
2076
+ "long after load — none of it is the parent's business, and a field here",
2077
+ "would be one a game could fill with anything. Its occurrence is the whole",
2078
+ "message, like `gem.ready`. A cooperative signal from untrusted code, so",
2079
+ "NOT AN AUTHORIZATION CONTROL: a parent may stop autoplay-related chrome",
2080
+ "and count the launch as engaged on it, and must grant nothing."
2081
+ ],
2082
+ "fields": {},
2083
+ "rateLimit": { "perMinute": 5 }
2084
+ },
2085
+
2025
2086
  {
2026
2087
  "type": "gem.progress",
2027
2088
  "direction": "frameToParent",
@@ -123,6 +123,12 @@
123
123
  "gem.frameStats"
124
124
  ]
125
125
  },
126
+ "engagement": {
127
+ "implemented": true,
128
+ "gates": [
129
+ "gem.engaged"
130
+ ]
131
+ },
126
132
  "viewport": {
127
133
  "implemented": true,
128
134
  "gates": [