@vincentt-xr/harness 1.2.0 → 1.4.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.
- package/dist/client/HarnessProvider.d.ts +4 -5
- package/dist/client/HarnessProvider.js +47 -16
- package/dist/client/annotate.d.ts +75 -6
- package/dist/client/annotate.js +428 -32
- package/dist/client/channel.d.ts +47 -0
- package/dist/client/channel.js +135 -0
- package/dist/client/consoleOrigin.d.ts +16 -0
- package/dist/client/consoleOrigin.js +39 -0
- package/dist/client/index.d.ts +5 -1
- package/dist/client/index.js +5 -1
- package/dist/client/previewOrigin.d.ts +50 -0
- package/dist/client/previewOrigin.js +76 -0
- package/dist/client/share.d.ts +15 -29
- package/dist/client/share.js +18 -43
- package/dist/shared/channel.d.ts +60 -0
- package/dist/shared/channel.js +45 -0
- package/dist/shared/events.d.ts +39 -0
- package/package.json +1 -1
package/dist/shared/events.d.ts
CHANGED
|
@@ -129,6 +129,20 @@ export interface RelayQuery {
|
|
|
129
129
|
* debugging rather than for "whose phone".
|
|
130
130
|
*/
|
|
131
131
|
viewer?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Ask the relay to also report how many connections are attached RIGHT NOW.
|
|
134
|
+
*
|
|
135
|
+
* An OPTIONAL BOOLEAN and not a `kind` value: `kind` is a `DiagEventKind`
|
|
136
|
+
* event-type FILTER shared with `DiagEvent.kind`, so a "presence" member there
|
|
137
|
+
* would invent a meaningless event type. It is also not an `op` discriminator,
|
|
138
|
+
* which would imply a mode the type never had and need a default — a version
|
|
139
|
+
* branch by another name.
|
|
140
|
+
*
|
|
141
|
+
* An unknown field is IGNORED by a relay that predates this, so an old relay
|
|
142
|
+
* answers a valid envelope with no counts and the caller reads none. That is
|
|
143
|
+
* the whole of the version negotiation: there is none.
|
|
144
|
+
*/
|
|
145
|
+
presence?: boolean;
|
|
132
146
|
}
|
|
133
147
|
export interface RelayResult {
|
|
134
148
|
events: DiagEvent[];
|
|
@@ -171,6 +185,31 @@ export interface RelayResult {
|
|
|
171
185
|
* set rather than remembering one.
|
|
172
186
|
*/
|
|
173
187
|
viewers: string[];
|
|
188
|
+
/**
|
|
189
|
+
* How many connections are attached RIGHT NOW. Present only when the query
|
|
190
|
+
* asked for presence, and only from a relay that understands the field.
|
|
191
|
+
*
|
|
192
|
+
* ⚠ THIS IS NOT `viewers.length`, AND THE TWO SIT IN THE SAME OBJECT.
|
|
193
|
+
* `viewers`/`testers` are EVER-SEEN sets that are never pruned by design, so
|
|
194
|
+
* they answer "who has ever connected to this run". A caller that falls back
|
|
195
|
+
* to them when this field is absent prints a phone that closed its tab twenty
|
|
196
|
+
* minutes ago as still watching. ABSENT MEANS UNKNOWN, and the only correct
|
|
197
|
+
* response to unknown is to say nothing.
|
|
198
|
+
*
|
|
199
|
+
* The source is the relay's live socket set, so a socket that closes leaves
|
|
200
|
+
* it. Counts CONNECTIONS, not devices or people: one tab opens several under
|
|
201
|
+
* HTTP/1.1, which is why every surface that prints this says "connections".
|
|
202
|
+
*/
|
|
203
|
+
liveConnections?: number;
|
|
204
|
+
/**
|
|
205
|
+
* Distinct resolved testers among the currently-open connections. Present
|
|
206
|
+
* under the same condition as `liveConnections`.
|
|
207
|
+
*
|
|
208
|
+
* A connection whose key missed the grammar resolves to no tester, so it
|
|
209
|
+
* counts toward `liveConnections` and not toward this — correct, because it
|
|
210
|
+
* is a real attached connection of an unknown tab.
|
|
211
|
+
*/
|
|
212
|
+
liveTesters?: number;
|
|
174
213
|
}
|
|
175
214
|
/** A freehand stroke over the frame, in normalized [0,1] frame coordinates. */
|
|
176
215
|
export interface AnnotationStroke {
|