@moqtap/codec 0.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.
Files changed (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -0
  3. package/dist/chunk-23YG7F46.js +764 -0
  4. package/dist/chunk-2NARXGVA.cjs +194 -0
  5. package/dist/chunk-3BSZ55L3.cjs +307 -0
  6. package/dist/chunk-5WFXFLL4.cjs +1185 -0
  7. package/dist/chunk-DC4L6ZIT.js +307 -0
  8. package/dist/chunk-GDRGWFEK.cjs +498 -0
  9. package/dist/chunk-IQPDRQVC.js +1185 -0
  10. package/dist/chunk-QYG6KGOV.cjs +101 -0
  11. package/dist/chunk-UOBWHJA5.js +101 -0
  12. package/dist/chunk-WNTXF3DE.cjs +764 -0
  13. package/dist/chunk-YBSEOSSP.js +194 -0
  14. package/dist/chunk-YPXLV5YK.js +498 -0
  15. package/dist/codec-CTvFtQQI.d.cts +86 -0
  16. package/dist/codec-qPzfmLNu.d.ts +86 -0
  17. package/dist/draft14-session.cjs +6 -0
  18. package/dist/draft14-session.d.cts +8 -0
  19. package/dist/draft14-session.d.ts +8 -0
  20. package/dist/draft14-session.js +6 -0
  21. package/dist/draft14.cjs +121 -0
  22. package/dist/draft14.d.cts +96 -0
  23. package/dist/draft14.d.ts +96 -0
  24. package/dist/draft14.js +121 -0
  25. package/dist/draft7-session.cjs +7 -0
  26. package/dist/draft7-session.d.cts +7 -0
  27. package/dist/draft7-session.d.ts +7 -0
  28. package/dist/draft7-session.js +7 -0
  29. package/dist/draft7.cjs +60 -0
  30. package/dist/draft7.d.cts +72 -0
  31. package/dist/draft7.d.ts +72 -0
  32. package/dist/draft7.js +60 -0
  33. package/dist/index.cjs +40 -0
  34. package/dist/index.d.cts +40 -0
  35. package/dist/index.d.ts +40 -0
  36. package/dist/index.js +40 -0
  37. package/dist/session-types-B9NIf7_F.d.ts +101 -0
  38. package/dist/session-types-CCo-oA-d.d.cts +101 -0
  39. package/dist/session.cjs +27 -0
  40. package/dist/session.d.cts +24 -0
  41. package/dist/session.d.ts +24 -0
  42. package/dist/session.js +27 -0
  43. package/dist/types-CIk5W10V.d.cts +249 -0
  44. package/dist/types-CIk5W10V.d.ts +249 -0
  45. package/dist/types-ClXELFGN.d.cts +241 -0
  46. package/dist/types-ClXELFGN.d.ts +241 -0
  47. package/package.json +84 -0
  48. package/src/core/buffer-reader.ts +107 -0
  49. package/src/core/buffer-writer.ts +91 -0
  50. package/src/core/errors.ts +1 -0
  51. package/src/core/session-types.ts +103 -0
  52. package/src/core/types.ts +363 -0
  53. package/src/drafts/draft07/announce-fsm.ts +2 -0
  54. package/src/drafts/draft07/codec.ts +874 -0
  55. package/src/drafts/draft07/index.ts +70 -0
  56. package/src/drafts/draft07/messages.ts +44 -0
  57. package/src/drafts/draft07/parameters.ts +12 -0
  58. package/src/drafts/draft07/rules.ts +75 -0
  59. package/src/drafts/draft07/session-fsm.ts +353 -0
  60. package/src/drafts/draft07/session.ts +21 -0
  61. package/src/drafts/draft07/subscription-fsm.ts +3 -0
  62. package/src/drafts/draft07/varint.ts +23 -0
  63. package/src/drafts/draft14/codec.ts +1330 -0
  64. package/src/drafts/draft14/index.ts +132 -0
  65. package/src/drafts/draft14/messages.ts +76 -0
  66. package/src/drafts/draft14/rules.ts +70 -0
  67. package/src/drafts/draft14/session-fsm.ts +480 -0
  68. package/src/drafts/draft14/session.ts +26 -0
  69. package/src/drafts/draft14/types.ts +365 -0
  70. package/src/index.ts +85 -0
  71. package/src/session.ts +58 -0
@@ -0,0 +1,365 @@
1
+ // Draft-14 specific message types
2
+ // Field names use snake_case to match test vector JSON
3
+
4
+ // Parameter types for draft-14
5
+ export interface UnknownParam {
6
+ readonly id: string; // e.g. "0x21"
7
+ readonly length: number;
8
+ readonly raw_hex: string; // e.g. "deadbeef"
9
+ }
10
+
11
+ export interface Draft14Params {
12
+ role?: bigint;
13
+ path?: string;
14
+ max_request_id?: bigint;
15
+ unknown?: UnknownParam[];
16
+ }
17
+
18
+ // Draft-14 message type tag union
19
+ export type Draft14MessageType =
20
+ | 'client_setup'
21
+ | 'server_setup'
22
+ | 'subscribe'
23
+ | 'subscribe_ok'
24
+ | 'subscribe_update'
25
+ | 'subscribe_error'
26
+ | 'unsubscribe'
27
+ | 'publish'
28
+ | 'publish_ok'
29
+ | 'publish_error'
30
+ | 'publish_done'
31
+ | 'publish_namespace'
32
+ | 'publish_namespace_ok'
33
+ | 'publish_namespace_error'
34
+ | 'publish_namespace_done'
35
+ | 'publish_namespace_cancel'
36
+ | 'subscribe_namespace'
37
+ | 'subscribe_namespace_ok'
38
+ | 'subscribe_namespace_error'
39
+ | 'unsubscribe_namespace'
40
+ | 'fetch'
41
+ | 'fetch_ok'
42
+ | 'fetch_error'
43
+ | 'fetch_cancel'
44
+ | 'track_status'
45
+ | 'track_status_ok'
46
+ | 'track_status_error'
47
+ | 'goaway'
48
+ | 'max_request_id'
49
+ | 'requests_blocked';
50
+
51
+ // Base
52
+ export interface Draft14BaseMessage {
53
+ readonly type: Draft14MessageType;
54
+ }
55
+
56
+ // Setup
57
+ export interface Draft14ClientSetup extends Draft14BaseMessage {
58
+ readonly type: 'client_setup';
59
+ readonly supported_versions: bigint[];
60
+ readonly parameters: Draft14Params;
61
+ }
62
+
63
+ export interface Draft14ServerSetup extends Draft14BaseMessage {
64
+ readonly type: 'server_setup';
65
+ readonly selected_version: bigint;
66
+ readonly parameters: Draft14Params;
67
+ }
68
+
69
+ // Subscribe
70
+ export interface Draft14Subscribe extends Draft14BaseMessage {
71
+ readonly type: 'subscribe';
72
+ readonly request_id: bigint;
73
+ readonly track_namespace: string[];
74
+ readonly track_name: string;
75
+ readonly subscriber_priority: bigint;
76
+ readonly group_order: bigint;
77
+ readonly forward: bigint;
78
+ readonly filter_type: bigint;
79
+ readonly start_group?: bigint;
80
+ readonly start_object?: bigint;
81
+ readonly end_group?: bigint;
82
+ readonly parameters: Draft14Params;
83
+ }
84
+
85
+ export interface Draft14SubscribeOk extends Draft14BaseMessage {
86
+ readonly type: 'subscribe_ok';
87
+ readonly request_id: bigint;
88
+ readonly track_alias: bigint;
89
+ readonly expires: bigint;
90
+ readonly group_order: bigint;
91
+ readonly content_exists: bigint;
92
+ readonly largest_group?: bigint;
93
+ readonly largest_object?: bigint;
94
+ readonly parameters: Draft14Params;
95
+ }
96
+
97
+ export interface Draft14SubscribeUpdate extends Draft14BaseMessage {
98
+ readonly type: 'subscribe_update';
99
+ readonly request_id: bigint;
100
+ readonly start_group: bigint;
101
+ readonly start_object: bigint;
102
+ readonly end_group: bigint;
103
+ readonly subscriber_priority: bigint;
104
+ readonly forward: bigint;
105
+ readonly parameters: Draft14Params;
106
+ }
107
+
108
+ export interface Draft14SubscribeError extends Draft14BaseMessage {
109
+ readonly type: 'subscribe_error';
110
+ readonly request_id: bigint;
111
+ readonly error_code: bigint;
112
+ readonly reason_phrase: string;
113
+ }
114
+
115
+ export interface Draft14Unsubscribe extends Draft14BaseMessage {
116
+ readonly type: 'unsubscribe';
117
+ readonly request_id: bigint;
118
+ }
119
+
120
+ // Publish
121
+ export interface Draft14Publish extends Draft14BaseMessage {
122
+ readonly type: 'publish';
123
+ readonly request_id: bigint;
124
+ readonly track_namespace: string[];
125
+ readonly track_name: string;
126
+ readonly forward: bigint;
127
+ readonly parameters: Draft14Params;
128
+ }
129
+
130
+ export interface Draft14PublishOk extends Draft14BaseMessage {
131
+ readonly type: 'publish_ok';
132
+ readonly request_id: bigint;
133
+ readonly track_alias: bigint;
134
+ readonly forward: bigint;
135
+ readonly parameters: Draft14Params;
136
+ }
137
+
138
+ export interface Draft14PublishError extends Draft14BaseMessage {
139
+ readonly type: 'publish_error';
140
+ readonly request_id: bigint;
141
+ readonly error_code: bigint;
142
+ readonly reason_phrase: string;
143
+ }
144
+
145
+ export interface Draft14PublishDone extends Draft14BaseMessage {
146
+ readonly type: 'publish_done';
147
+ readonly request_id: bigint;
148
+ readonly status_code: bigint;
149
+ readonly reason_phrase: string;
150
+ }
151
+
152
+ // Namespace
153
+ export interface Draft14PublishNamespace extends Draft14BaseMessage {
154
+ readonly type: 'publish_namespace';
155
+ readonly request_id: bigint;
156
+ readonly track_namespace: string[];
157
+ readonly parameters: Draft14Params;
158
+ }
159
+
160
+ export interface Draft14PublishNamespaceOk extends Draft14BaseMessage {
161
+ readonly type: 'publish_namespace_ok';
162
+ readonly request_id: bigint;
163
+ readonly parameters: Draft14Params;
164
+ }
165
+
166
+ export interface Draft14PublishNamespaceError extends Draft14BaseMessage {
167
+ readonly type: 'publish_namespace_error';
168
+ readonly request_id: bigint;
169
+ readonly error_code: bigint;
170
+ readonly reason_phrase: string;
171
+ }
172
+
173
+ export interface Draft14PublishNamespaceDone extends Draft14BaseMessage {
174
+ readonly type: 'publish_namespace_done';
175
+ readonly request_id: bigint;
176
+ readonly status_code: bigint;
177
+ readonly reason_phrase: string;
178
+ }
179
+
180
+ export interface Draft14PublishNamespaceCancel extends Draft14BaseMessage {
181
+ readonly type: 'publish_namespace_cancel';
182
+ readonly request_id: bigint;
183
+ }
184
+
185
+ export interface Draft14SubscribeNamespace extends Draft14BaseMessage {
186
+ readonly type: 'subscribe_namespace';
187
+ readonly request_id: bigint;
188
+ readonly namespace_prefix: string[];
189
+ readonly parameters: Draft14Params;
190
+ }
191
+
192
+ export interface Draft14SubscribeNamespaceOk extends Draft14BaseMessage {
193
+ readonly type: 'subscribe_namespace_ok';
194
+ readonly request_id: bigint;
195
+ readonly parameters: Draft14Params;
196
+ }
197
+
198
+ export interface Draft14SubscribeNamespaceError extends Draft14BaseMessage {
199
+ readonly type: 'subscribe_namespace_error';
200
+ readonly request_id: bigint;
201
+ readonly error_code: bigint;
202
+ readonly reason_phrase: string;
203
+ }
204
+
205
+ export interface Draft14UnsubscribeNamespace extends Draft14BaseMessage {
206
+ readonly type: 'unsubscribe_namespace';
207
+ readonly request_id: bigint;
208
+ }
209
+
210
+ // Fetch
211
+ export interface Draft14Fetch extends Draft14BaseMessage {
212
+ readonly type: 'fetch';
213
+ readonly request_id: bigint;
214
+ readonly track_namespace: string[];
215
+ readonly track_name: string;
216
+ readonly start_group: bigint;
217
+ readonly start_object: bigint;
218
+ readonly end_group: bigint;
219
+ readonly parameters: Draft14Params;
220
+ }
221
+
222
+ export interface Draft14FetchOk extends Draft14BaseMessage {
223
+ readonly type: 'fetch_ok';
224
+ readonly request_id: bigint;
225
+ readonly track_alias: bigint;
226
+ readonly end_of_track: bigint;
227
+ readonly parameters: Draft14Params;
228
+ }
229
+
230
+ export interface Draft14FetchError extends Draft14BaseMessage {
231
+ readonly type: 'fetch_error';
232
+ readonly request_id: bigint;
233
+ readonly error_code: bigint;
234
+ readonly reason_phrase: string;
235
+ }
236
+
237
+ export interface Draft14FetchCancel extends Draft14BaseMessage {
238
+ readonly type: 'fetch_cancel';
239
+ readonly request_id: bigint;
240
+ }
241
+
242
+ // Track Status
243
+ export interface Draft14TrackStatus extends Draft14BaseMessage {
244
+ readonly type: 'track_status';
245
+ readonly request_id: bigint;
246
+ readonly track_namespace: string[];
247
+ readonly track_name: string;
248
+ readonly parameters: Draft14Params;
249
+ }
250
+
251
+ export interface Draft14TrackStatusOk extends Draft14BaseMessage {
252
+ readonly type: 'track_status_ok';
253
+ readonly request_id: bigint;
254
+ readonly status_code: bigint;
255
+ readonly largest_group?: bigint;
256
+ readonly largest_object?: bigint;
257
+ readonly parameters: Draft14Params;
258
+ }
259
+
260
+ export interface Draft14TrackStatusError extends Draft14BaseMessage {
261
+ readonly type: 'track_status_error';
262
+ readonly request_id: bigint;
263
+ readonly error_code: bigint;
264
+ readonly reason_phrase: string;
265
+ }
266
+
267
+ // Session Control
268
+ export interface Draft14GoAway extends Draft14BaseMessage {
269
+ readonly type: 'goaway';
270
+ readonly new_session_uri: string;
271
+ }
272
+
273
+ export interface Draft14MaxRequestId extends Draft14BaseMessage {
274
+ readonly type: 'max_request_id';
275
+ readonly request_id: bigint;
276
+ }
277
+
278
+ export interface Draft14RequestsBlocked extends Draft14BaseMessage {
279
+ readonly type: 'requests_blocked';
280
+ readonly request_id: bigint;
281
+ }
282
+
283
+ // Union of all draft-14 control messages
284
+ export type Draft14Message =
285
+ | Draft14ClientSetup
286
+ | Draft14ServerSetup
287
+ | Draft14Subscribe
288
+ | Draft14SubscribeOk
289
+ | Draft14SubscribeUpdate
290
+ | Draft14SubscribeError
291
+ | Draft14Unsubscribe
292
+ | Draft14Publish
293
+ | Draft14PublishOk
294
+ | Draft14PublishError
295
+ | Draft14PublishDone
296
+ | Draft14PublishNamespace
297
+ | Draft14PublishNamespaceOk
298
+ | Draft14PublishNamespaceError
299
+ | Draft14PublishNamespaceDone
300
+ | Draft14PublishNamespaceCancel
301
+ | Draft14SubscribeNamespace
302
+ | Draft14SubscribeNamespaceOk
303
+ | Draft14SubscribeNamespaceError
304
+ | Draft14UnsubscribeNamespace
305
+ | Draft14Fetch
306
+ | Draft14FetchOk
307
+ | Draft14FetchError
308
+ | Draft14FetchCancel
309
+ | Draft14TrackStatus
310
+ | Draft14TrackStatusOk
311
+ | Draft14TrackStatusError
312
+ | Draft14GoAway
313
+ | Draft14MaxRequestId
314
+ | Draft14RequestsBlocked;
315
+
316
+ // Data stream types (no type+length wrapper)
317
+ export interface ObjectPayload {
318
+ readonly type: 'object';
319
+ readonly objectId: bigint;
320
+ readonly payloadLength: number;
321
+ readonly payload: Uint8Array;
322
+ }
323
+
324
+ export interface SubgroupStream {
325
+ readonly type: 'subgroup';
326
+ readonly trackAlias: bigint;
327
+ readonly groupId: bigint;
328
+ readonly subgroupId: bigint;
329
+ readonly publisherPriority: number;
330
+ readonly objects: ObjectPayload[];
331
+ }
332
+
333
+ export interface DatagramObject {
334
+ readonly type: 'datagram';
335
+ readonly trackAlias: bigint;
336
+ readonly groupId: bigint;
337
+ readonly objectId: bigint;
338
+ readonly payloadLength: number;
339
+ readonly payload: Uint8Array;
340
+ }
341
+
342
+ export interface FetchStream {
343
+ readonly type: 'fetch';
344
+ readonly subscribeRequestId: bigint;
345
+ readonly objects: ObjectPayload[];
346
+ }
347
+
348
+ export type Draft14DataStream = SubgroupStream | DatagramObject | FetchStream;
349
+
350
+ // Streaming data stream decoder types
351
+ export interface SubgroupStreamHeader {
352
+ readonly type: 'subgroup_header';
353
+ readonly trackAlias: bigint;
354
+ readonly groupId: bigint;
355
+ readonly subgroupId: bigint;
356
+ readonly publisherPriority: number;
357
+ }
358
+
359
+ export interface FetchStreamHeader {
360
+ readonly type: 'fetch_header';
361
+ readonly subscribeRequestId: bigint;
362
+ }
363
+
364
+ export type DataStreamHeader = SubgroupStreamHeader | FetchStreamHeader;
365
+ export type DataStreamEvent = DataStreamHeader | ObjectPayload;
package/src/index.ts ADDED
@@ -0,0 +1,85 @@
1
+ /**
2
+ * @moqtap/codec — MoQT wire-format codec
3
+ *
4
+ * This is the root entry point. It re-exports shared types and the
5
+ * `createCodec()` factory which requires an explicit draft version.
6
+ *
7
+ * For direct access to a specific draft, use subpath imports:
8
+ * import { createDraft07Codec } from '@moqtap/codec/draft7';
9
+ * import { createDraft14Codec } from '@moqtap/codec/draft14';
10
+ *
11
+ * A default (versionless) codec will be available once the MoQT
12
+ * specification reaches RFC status. Until then, always specify a draft.
13
+ */
14
+
15
+ import type { Codec, BaseCodec, CodecOptions, Draft } from './core/types.js';
16
+ import { createDraft07Codec } from './drafts/draft07/codec.js';
17
+ import { createDraft14Codec } from './drafts/draft14/codec.js';
18
+ import type { Draft14Codec } from './drafts/draft14/codec.js';
19
+
20
+ const DRAFT_ALIASES: Record<string, Draft> = {
21
+ '07': 'draft-ietf-moq-transport-07',
22
+ 'draft-ietf-moq-transport-07': 'draft-ietf-moq-transport-07',
23
+ '14': 'draft-ietf-moq-transport-14',
24
+ 'draft-ietf-moq-transport-14': 'draft-ietf-moq-transport-14',
25
+ };
26
+
27
+ /**
28
+ * Create a codec for draft-07 (returns full Codec with stream decoder).
29
+ */
30
+ export function createCodec(options: CodecOptions & { draft: 'draft-ietf-moq-transport-07' | '07' }): Codec;
31
+ /**
32
+ * Create a codec for draft-14 (returns Draft14Codec with data stream support).
33
+ */
34
+ export function createCodec(options: CodecOptions & { draft: 'draft-ietf-moq-transport-14' | '14' }): Draft14Codec;
35
+ /**
36
+ * Create a codec for the specified draft version.
37
+ *
38
+ * A draft must always be specified — there is no default while the
39
+ * MoQT specification is still in draft stage.
40
+ */
41
+ export function createCodec(options: CodecOptions): Codec | Draft14Codec;
42
+ export function createCodec(options: CodecOptions): Codec | Draft14Codec {
43
+ const draft = DRAFT_ALIASES[options.draft];
44
+ if (!draft) {
45
+ throw new Error(
46
+ `Unsupported draft: "${options.draft}". ` +
47
+ `Use a draft-scoped import instead:\n` +
48
+ ` import { createDraft07Codec } from '@moqtap/codec/draft7'\n` +
49
+ ` import { createDraft14Codec } from '@moqtap/codec/draft14'\n` +
50
+ `Supported draft values: ${Object.keys(DRAFT_ALIASES).join(', ')}`,
51
+ );
52
+ }
53
+
54
+ switch (draft) {
55
+ case 'draft-ietf-moq-transport-07':
56
+ return createDraft07Codec();
57
+ case 'draft-ietf-moq-transport-14':
58
+ return createDraft14Codec();
59
+ default:
60
+ throw new Error(`Unsupported draft: ${draft}`);
61
+ }
62
+ }
63
+
64
+ // Re-export shared types
65
+ export type {
66
+ Codec, BaseCodec, CodecOptions, Draft, DraftShorthand,
67
+ MoqtMessage, MoqtMessageType, DecodeResult, DecodeErrorCode,
68
+ ClientSetup, ServerSetup, Subscribe, SubscribeOk, SubscribeError,
69
+ SubscribeDone, SubscribeUpdate, Unsubscribe, Announce, AnnounceOk, AnnounceError,
70
+ AnnounceCancel, Unannounce, TrackStatusRequest, TrackStatus,
71
+ ObjectStream, ObjectDatagram, StreamHeaderTrack, StreamHeaderGroup,
72
+ StreamHeaderSubgroup, GoAway, SubscribeAnnounces, SubscribeAnnouncesOk,
73
+ SubscribeAnnouncesError, UnsubscribeAnnounces, MaxSubscribeId,
74
+ Fetch, FetchOk, FetchError, FetchCancel,
75
+ FilterType, GroupOrderValue,
76
+ } from './core/types.js';
77
+ export { DecodeError } from './core/types.js';
78
+
79
+ // Re-export draft-14 types
80
+ export type { Draft14Codec } from './drafts/draft14/codec.js';
81
+ export type {
82
+ Draft14Message,
83
+ Draft14Params,
84
+ Draft14DataStream,
85
+ } from './drafts/draft14/types.js';
package/src/session.ts ADDED
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @moqtap/codec/session — MoQT session state machine
3
+ *
4
+ * Requires a codec instance (which carries the draft version).
5
+ * For direct access, use draft-scoped imports:
6
+ * import { createDraft07SessionState } from '@moqtap/codec/draft7/session';
7
+ * import { createDraft14SessionState } from '@moqtap/codec/draft14/session';
8
+ */
9
+
10
+ import type { SessionState, SessionStateOptions } from './core/session-types.js';
11
+ import { createDraft07SessionState } from './drafts/draft07/session.js';
12
+ import { createDraft14SessionState } from './drafts/draft14/session.js';
13
+
14
+ /**
15
+ * Create a session state machine for the given draft version.
16
+ *
17
+ * For type-safe access with draft-specific message types, use the
18
+ * draft-scoped factory functions directly:
19
+ * import { createDraft07SessionState } from '@moqtap/codec/draft7/session';
20
+ * import { createDraft14SessionState } from '@moqtap/codec/draft14/session';
21
+ */
22
+ export function createSessionState(options: SessionStateOptions): SessionState<unknown, string> {
23
+ const draft = options.codec.draft;
24
+
25
+ switch (draft) {
26
+ case 'draft-ietf-moq-transport-07':
27
+ return createDraft07SessionState(options);
28
+ case 'draft-ietf-moq-transport-14':
29
+ return createDraft14SessionState(options) as SessionState<unknown, string>;
30
+ default:
31
+ throw new Error(
32
+ `Unsupported draft for session: "${draft}". ` +
33
+ `Use a draft-scoped import instead:\n` +
34
+ ` import { createDraft07SessionState } from '@moqtap/codec/draft7/session'\n` +
35
+ ` import { createDraft14SessionState } from '@moqtap/codec/draft14/session'`,
36
+ );
37
+ }
38
+ }
39
+
40
+ // Re-export all session types
41
+ export type {
42
+ SessionState,
43
+ SessionStateOptions,
44
+ SessionPhase,
45
+ SubscriptionState,
46
+ SubscriptionPhase,
47
+ AnnounceState,
48
+ AnnouncePhase,
49
+ PublishState,
50
+ PublishPhase,
51
+ FetchState,
52
+ FetchPhase,
53
+ TransitionResult,
54
+ ValidationResult,
55
+ ProtocolViolation,
56
+ ProtocolViolationCode,
57
+ SideEffect,
58
+ } from './core/session-types.js';