@norskvideo/moq-net 0.1.8 → 0.2.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 (286) hide show
  1. package/README.md +2 -2
  2. package/announce.d.ts +7 -0
  3. package/announce.d.ts.map +1 -0
  4. package/announce.js +8 -0
  5. package/announce.js.map +1 -0
  6. package/announced.d.ts +49 -91
  7. package/announced.d.ts.map +1 -1
  8. package/announced.js +21 -156
  9. package/announced.js.map +1 -1
  10. package/bandwidth.d.ts +163 -0
  11. package/bandwidth.d.ts.map +1 -0
  12. package/bandwidth.js +304 -0
  13. package/bandwidth.js.map +1 -0
  14. package/bandwidth_api.d.ts +7 -0
  15. package/bandwidth_api.d.ts.map +1 -0
  16. package/bandwidth_api.js +8 -0
  17. package/bandwidth_api.js.map +1 -0
  18. package/broadcast.d.ts +44 -35
  19. package/broadcast.d.ts.map +1 -1
  20. package/broadcast.js +104 -60
  21. package/broadcast.js.map +1 -1
  22. package/connection/accept.d.ts +16 -1
  23. package/connection/accept.d.ts.map +1 -1
  24. package/connection/accept.js +52 -28
  25. package/connection/accept.js.map +1 -1
  26. package/connection/browser.d.ts.map +1 -1
  27. package/connection/browser.js +9 -7
  28. package/connection/browser.js.map +1 -1
  29. package/connection/connect.d.ts +30 -6
  30. package/connection/connect.d.ts.map +1 -1
  31. package/connection/connect.js +110 -54
  32. package/connection/connect.js.map +1 -1
  33. package/connection/established.d.ts +17 -21
  34. package/connection/established.d.ts.map +1 -1
  35. package/connection/established.js.map +1 -1
  36. package/connection/forward.d.ts +2 -0
  37. package/connection/forward.d.ts.map +1 -0
  38. package/connection/forward.js +173 -0
  39. package/connection/forward.js.map +1 -0
  40. package/connection/handshake.d.ts +1 -0
  41. package/connection/handshake.d.ts.map +1 -1
  42. package/connection/handshake.js +5 -2
  43. package/connection/handshake.js.map +1 -1
  44. package/connection/index.d.ts +5 -5
  45. package/connection/index.d.ts.map +1 -1
  46. package/connection/index.js +4 -5
  47. package/connection/index.js.map +1 -1
  48. package/connection/pool.d.ts +186 -0
  49. package/connection/pool.d.ts.map +1 -0
  50. package/connection/pool.js +361 -0
  51. package/connection/pool.js.map +1 -0
  52. package/connection/reload.d.ts +14 -93
  53. package/connection/reload.d.ts.map +1 -1
  54. package/connection/reload.js +217 -81
  55. package/connection/reload.js.map +1 -1
  56. package/connection/stats.d.ts +3 -26
  57. package/connection/stats.d.ts.map +1 -1
  58. package/connection/stats.js.map +1 -1
  59. package/connection/transport.d.ts +0 -7
  60. package/connection/transport.d.ts.map +1 -1
  61. package/consume.d.ts +1 -43
  62. package/consume.d.ts.map +1 -1
  63. package/consume.js +1 -1
  64. package/consume.js.map +1 -1
  65. package/error.d.ts +180 -29
  66. package/error.d.ts.map +1 -1
  67. package/error.js +331 -16
  68. package/error.js.map +1 -1
  69. package/errors.d.ts +7 -0
  70. package/errors.d.ts.map +1 -0
  71. package/errors.js +8 -0
  72. package/errors.js.map +1 -0
  73. package/group.d.ts +9 -43
  74. package/group.d.ts.map +1 -1
  75. package/group.js +284 -69
  76. package/group.js.map +1 -1
  77. package/hop.d.ts +115 -0
  78. package/hop.d.ts.map +1 -0
  79. package/hop.js +119 -0
  80. package/hop.js.map +1 -0
  81. package/ietf/adapter.d.ts +5 -1
  82. package/ietf/adapter.d.ts.map +1 -1
  83. package/ietf/adapter.js +105 -60
  84. package/ietf/adapter.js.map +1 -1
  85. package/ietf/aliases.d.ts +1 -78
  86. package/ietf/aliases.d.ts.map +1 -1
  87. package/ietf/cluster.d.ts +9 -123
  88. package/ietf/cluster.d.ts.map +1 -1
  89. package/ietf/cluster.js +84 -44
  90. package/ietf/cluster.js.map +1 -1
  91. package/ietf/connection.d.ts +6 -72
  92. package/ietf/connection.d.ts.map +1 -1
  93. package/ietf/connection.js +62 -56
  94. package/ietf/connection.js.map +1 -1
  95. package/ietf/error.d.ts +11 -0
  96. package/ietf/error.d.ts.map +1 -0
  97. package/ietf/error.js +193 -0
  98. package/ietf/error.js.map +1 -0
  99. package/ietf/fetch.d.ts +7 -20
  100. package/ietf/fetch.d.ts.map +1 -1
  101. package/ietf/fetch.js +52 -22
  102. package/ietf/fetch.js.map +1 -1
  103. package/ietf/filter.d.ts +2 -0
  104. package/ietf/filter.d.ts.map +1 -1
  105. package/ietf/filter.js +10 -1
  106. package/ietf/filter.js.map +1 -1
  107. package/ietf/goaway.d.ts.map +1 -1
  108. package/ietf/goaway.js +22 -5
  109. package/ietf/goaway.js.map +1 -1
  110. package/ietf/hidden.d.ts +2 -0
  111. package/ietf/hidden.d.ts.map +1 -0
  112. package/ietf/hidden.js +30 -0
  113. package/ietf/hidden.js.map +1 -0
  114. package/ietf/index.d.ts +2 -0
  115. package/ietf/index.d.ts.map +1 -1
  116. package/ietf/index.js +2 -0
  117. package/ietf/index.js.map +1 -1
  118. package/ietf/object.d.ts +15 -8
  119. package/ietf/object.d.ts.map +1 -1
  120. package/ietf/object.js +51 -36
  121. package/ietf/object.js.map +1 -1
  122. package/ietf/parameters.d.ts +14 -2
  123. package/ietf/parameters.d.ts.map +1 -1
  124. package/ietf/parameters.js +97 -29
  125. package/ietf/parameters.js.map +1 -1
  126. package/ietf/properties.d.ts +1 -0
  127. package/ietf/properties.d.ts.map +1 -1
  128. package/ietf/properties.js +14 -0
  129. package/ietf/properties.js.map +1 -1
  130. package/ietf/publish.d.ts +19 -2
  131. package/ietf/publish.d.ts.map +1 -1
  132. package/ietf/publish.js +40 -6
  133. package/ietf/publish.js.map +1 -1
  134. package/ietf/publish_namespace.d.ts +25 -0
  135. package/ietf/publish_namespace.d.ts.map +1 -1
  136. package/ietf/publish_namespace.js +63 -0
  137. package/ietf/publish_namespace.js.map +1 -1
  138. package/ietf/publisher.d.ts +1 -82
  139. package/ietf/publisher.d.ts.map +1 -1
  140. package/ietf/publisher.js +483 -235
  141. package/ietf/publisher.js.map +1 -1
  142. package/ietf/solicit.d.ts +1 -40
  143. package/ietf/solicit.d.ts.map +1 -1
  144. package/ietf/subscribe.d.ts +8 -6
  145. package/ietf/subscribe.d.ts.map +1 -1
  146. package/ietf/subscribe.js +33 -27
  147. package/ietf/subscribe.js.map +1 -1
  148. package/ietf/subscribe_namespace.d.ts +8 -2
  149. package/ietf/subscribe_namespace.d.ts.map +1 -1
  150. package/ietf/subscribe_namespace.js +18 -8
  151. package/ietf/subscribe_namespace.js.map +1 -1
  152. package/ietf/subscriber.d.ts +1 -65
  153. package/ietf/subscriber.d.ts.map +1 -1
  154. package/ietf/subscriber.js +337 -123
  155. package/ietf/subscriber.js.map +1 -1
  156. package/ietf/token.d.ts +2 -0
  157. package/ietf/token.d.ts.map +1 -0
  158. package/ietf/token.js +99 -0
  159. package/ietf/token.js.map +1 -0
  160. package/ietf/track.d.ts +4 -0
  161. package/ietf/track.d.ts.map +1 -1
  162. package/ietf/track.js +6 -20
  163. package/ietf/track.js.map +1 -1
  164. package/ietf/version.d.ts +12 -1
  165. package/ietf/version.d.ts.map +1 -1
  166. package/ietf/version.js +13 -0
  167. package/ietf/version.js.map +1 -1
  168. package/index.d.ts +12 -7
  169. package/index.d.ts.map +1 -1
  170. package/index.js +10 -5
  171. package/index.js.map +1 -1
  172. package/internal.d.ts +115 -1
  173. package/internal.d.ts.map +1 -1
  174. package/internal.js +108 -0
  175. package/internal.js.map +1 -1
  176. package/lite/announce.d.ts +60 -10
  177. package/lite/announce.d.ts.map +1 -1
  178. package/lite/announce.js +176 -31
  179. package/lite/announce.js.map +1 -1
  180. package/lite/connection.d.ts +9 -59
  181. package/lite/connection.d.ts.map +1 -1
  182. package/lite/connection.js +34 -35
  183. package/lite/connection.js.map +1 -1
  184. package/lite/datagram.d.ts +3 -2
  185. package/lite/datagram.d.ts.map +1 -1
  186. package/lite/datagram.js +7 -8
  187. package/lite/datagram.js.map +1 -1
  188. package/lite/fetch.d.ts +15 -1
  189. package/lite/fetch.d.ts.map +1 -1
  190. package/lite/fetch.js +39 -7
  191. package/lite/fetch.js.map +1 -1
  192. package/lite/goaway.d.ts.map +1 -1
  193. package/lite/goaway.js +7 -1
  194. package/lite/goaway.js.map +1 -1
  195. package/lite/group.d.ts +30 -12
  196. package/lite/group.d.ts.map +1 -1
  197. package/lite/group.js +68 -26
  198. package/lite/group.js.map +1 -1
  199. package/lite/message.d.ts +2 -2
  200. package/lite/message.d.ts.map +1 -1
  201. package/lite/message.js +14 -5
  202. package/lite/message.js.map +1 -1
  203. package/lite/priority.d.ts +1 -61
  204. package/lite/priority.d.ts.map +1 -1
  205. package/lite/priority.js +4 -5
  206. package/lite/priority.js.map +1 -1
  207. package/lite/publisher.d.ts +1 -69
  208. package/lite/publisher.d.ts.map +1 -1
  209. package/lite/publisher.js +630 -262
  210. package/lite/publisher.js.map +1 -1
  211. package/lite/setup.d.ts +8 -8
  212. package/lite/setup.d.ts.map +1 -1
  213. package/lite/setup.js +33 -30
  214. package/lite/setup.js.map +1 -1
  215. package/lite/subscribe.d.ts +71 -17
  216. package/lite/subscribe.d.ts.map +1 -1
  217. package/lite/subscribe.js +205 -53
  218. package/lite/subscribe.js.map +1 -1
  219. package/lite/subscriber.d.ts +15 -56
  220. package/lite/subscriber.d.ts.map +1 -1
  221. package/lite/subscriber.js +451 -247
  222. package/lite/subscriber.js.map +1 -1
  223. package/lite/track.d.ts +4 -10
  224. package/lite/track.d.ts.map +1 -1
  225. package/lite/track.js +34 -29
  226. package/lite/track.js.map +1 -1
  227. package/lite/version.d.ts +42 -6
  228. package/lite/version.d.ts.map +1 -1
  229. package/lite/version.js +126 -10
  230. package/lite/version.js.map +1 -1
  231. package/origin.d.ts +256 -29
  232. package/origin.d.ts.map +1 -1
  233. package/origin.js +1427 -37
  234. package/origin.js.map +1 -1
  235. package/package.json +8 -3
  236. package/path.d.ts +25 -7
  237. package/path.d.ts.map +1 -1
  238. package/path.js +5 -3
  239. package/path.js.map +1 -1
  240. package/stream.d.ts +73 -14
  241. package/stream.d.ts.map +1 -1
  242. package/stream.js +372 -141
  243. package/stream.js.map +1 -1
  244. package/tail.d.ts +18 -0
  245. package/tail.d.ts.map +1 -0
  246. package/tail.js +167 -0
  247. package/tail.js.map +1 -0
  248. package/time.d.ts +15 -2
  249. package/time.d.ts.map +1 -1
  250. package/time.js +28 -9
  251. package/time.js.map +1 -1
  252. package/track.d.ts +211 -83
  253. package/track.d.ts.map +1 -1
  254. package/track.js +816 -205
  255. package/track.js.map +1 -1
  256. package/util/abort.d.ts +2 -0
  257. package/util/abort.d.ts.map +1 -0
  258. package/util/abort.js +20 -0
  259. package/util/abort.js.map +1 -0
  260. package/util/log.d.ts +5 -0
  261. package/util/log.d.ts.map +1 -0
  262. package/util/log.js +17 -0
  263. package/util/log.js.map +1 -0
  264. package/util/u64.d.ts +39 -0
  265. package/util/u64.d.ts.map +1 -0
  266. package/util/u64.js +83 -0
  267. package/util/u64.js.map +1 -0
  268. package/util/varint.d.ts +29 -0
  269. package/util/varint.d.ts.map +1 -0
  270. package/util/varint.js +198 -0
  271. package/util/varint.js.map +1 -0
  272. package/varint.d.ts +10 -6
  273. package/varint.d.ts.map +1 -1
  274. package/varint.js +40 -237
  275. package/varint.js.map +1 -1
  276. package/wire.d.ts +80 -0
  277. package/wire.d.ts.map +1 -0
  278. package/wire.js +32 -0
  279. package/wire.js.map +1 -0
  280. package/zod.d.ts +1 -1
  281. package/zod.d.ts.map +1 -1
  282. package/zod.js.map +1 -1
  283. package/mock.d.ts +0 -66
  284. package/mock.d.ts.map +0 -1
  285. package/mock.js +0 -243
  286. package/mock.js.map +0 -1
package/track.d.ts CHANGED
@@ -6,10 +6,10 @@
6
6
  import { type GetPromise, type Getter } from "@norskvideo/moq-signals";
7
7
  import type { Datagram } from "./datagram";
8
8
  import { type Frame, type Consumer as GroupConsumer, Producer as GroupProducer } from "./group";
9
- import { Timescale, type Timestamp } from "./time";
9
+ import { Milli, Timescale, type Timestamp } from "./time";
10
10
  export type { Datagram } from "./datagram";
11
- /** Default {@link Info.latencyMax} window (milliseconds) when the publisher does not set one. */
12
- export declare const DEFAULT_LATENCY_MAX_MS = 5000;
11
+ /** Default {@link Info.maxAge} window (milliseconds) when the publisher does not set one. */
12
+ export declare const DEFAULT_MAX_AGE_MS: Milli;
13
13
  /** A position within a track: a group's sequence and a frame's index inside it. */
14
14
  export interface Location {
15
15
  /** The group's sequence number within the track. */
@@ -32,39 +32,59 @@ export interface Info {
32
32
  */
33
33
  timescale: Timescale;
34
34
  /**
35
- * Publisher Max Latency: the maximum age (milliseconds) of a non-latest group before
35
+ * Publisher Max Age: the maximum age (milliseconds) of a non-latest group before
36
36
  * the publisher evicts it. Reported in TRACK_INFO (Lite05+) so relays re-serve with the
37
37
  * same bound. The publisher-side half of the budget a subscriber sets for itself.
38
+ * Rounded up to a whole millisecond by {@link infoDefaults}, which refuses a negative
39
+ * or non-finite value and a result past `Number.MAX_SAFE_INTEGER`.
38
40
  */
39
- latencyMax: number;
40
- /** Tie-break priority between subscriptions of equal subscriber priority. */
41
+ maxAge: Milli;
42
+ /** Tie-break priority between subscriptions of equal subscriber priority (`0..=255`, higher first). Defaults to `127`. */
41
43
  priority: number;
42
- /**
43
- * Whether groups are prioritized in sequence order. Groups may always arrive
44
- * out-of-order (or not at all) over the network. Defaults to `false` (newest-first).
45
- */
46
- ordered: boolean;
47
44
  }
48
45
  /** Fill in any unset {@link Info} fields with their defaults. */
49
46
  export declare function infoDefaults(info?: Partial<Info>): Info;
47
+ /** An explicitly included or excluded group sequence. */
48
+ export type Bound = {
49
+ included: number;
50
+ excluded?: never;
51
+ } | {
52
+ excluded: number;
53
+ included?: never;
54
+ };
55
+ /** Group limits; an omitted endpoint is unbounded. */
56
+ export interface Groups {
57
+ /** The first group boundary. */
58
+ start?: Bound;
59
+ /** The last group boundary. */
60
+ end?: Bound;
61
+ }
50
62
  /**
51
63
  * Per-subscription options, requested when a subscription opens and adjustable later via
52
64
  * {@link Subscriber.update}. Mirrors the Rust `Subscription`.
53
65
  */
54
66
  export interface Subscription {
55
- /** Delivery priority relative to this session's other subscriptions. Defaults to `0`. */
67
+ /** Delivery priority relative to this session's other subscriptions (`0..=255`). Defaults to `0`. */
56
68
  priority?: number;
57
- /** Whether groups are prioritized in sequence order. Defaults to `false` (newest-first). */
58
- ordered?: boolean;
59
- /** Maximum age (milliseconds) of a non-latest group before it is skipped. Defaults to `0`. */
60
- latencyMax?: number;
61
- /** First group the publisher should deliver, or omit to start at the latest group. */
62
- startGroup?: number;
63
- /** Last group the publisher should deliver (inclusive), or omit for no end. */
64
- endGroup?: number;
69
+ /**
70
+ * Maximum age (milliseconds) of a non-latest group before it is skipped. Defaults to `0`.
71
+ * Rounded up to a whole millisecond, so a value derived from a measurement is never
72
+ * shortened. A negative or non-finite value, or one past `Number.MAX_SAFE_INTEGER`
73
+ * after rounding, is refused.
74
+ */
75
+ maxAge?: Milli;
76
+ /**
77
+ * The lowest group the publisher may deliver (a floor), or omit for none.
78
+ *
79
+ * A floor, not a request: only {@link maxAge} asks for data, and the floor bounds how
80
+ * far back it may reach. Omitting it and a floor of 0 mean the same thing, and a floor
81
+ * above the live edge simply waits there (a resumed subscription naming where it left
82
+ * off).
83
+ */
84
+ groups?: Groups;
65
85
  }
66
86
  /**
67
- * A request for a track the peer wants, yielded by `Broadcast.Producer.requested`.
87
+ * A request for a track the peer wants, delivered to the publishing wire layer.
68
88
  *
69
89
  * Created internally by the broadcast when a subscription (or info lookup) needs a track
70
90
  * served; answer it with {@link accept} or {@link reject}.
@@ -89,21 +109,13 @@ export declare class Request {
89
109
  export interface FetchGroupOptions {
90
110
  /** Delivery priority for the fetch stream. Defaults to `0`. */
91
111
  priority?: number;
92
- }
93
- /**
94
- * The per-track operations a lazy {@link Consumer} delegates to the broadcast it came from.
95
- *
96
- * Implemented by `broadcast.Producer` / `broadcast.Consumer` (and the wire-layer subclasses
97
- * that resolve them over the network), so a track handle holds a reference to its broadcast
98
- * and calls methods on it rather than capturing a bag of callbacks.
99
- */
100
- export interface Broadcast {
101
- /** Open a live subscription to the named track. */
102
- subscribe(name: string, options?: Subscription): Subscriber;
103
- /** Resolve the named track's immutable info. */
104
- resolveTrackInfo(name: string): Promise<Info>;
105
- /** Fetch a single group of the named track by sequence. */
106
- fetchGroup(name: string, sequence: number, options?: FetchGroupOptions): Promise<GroupConsumer>;
112
+ /**
113
+ * Abandons this fetch, rejecting with the signal's reason. Concurrent fetches of the same
114
+ * group share one stream, cancelled only once every caller has left. An already-aborted
115
+ * signal rejects before anything is sent, and aborting after the group resolves has no
116
+ * effect; close the group instead.
117
+ */
118
+ signal?: AbortSignal;
107
119
  }
108
120
  /**
109
121
  * A lazy handle to a track on a consumed broadcast.
@@ -114,8 +126,15 @@ export declare class Consumer {
114
126
  #private;
115
127
  /** The track name. */
116
128
  readonly name: string;
117
- constructor(name: string, broadcast: Broadcast);
118
- /** Open a live subscription to the track. */
129
+ private constructor();
130
+ /**
131
+ * Open a live subscription to the track.
132
+ *
133
+ * The cursor starts at the group the subscription named (its floor), or 0.
134
+ * {@link Subscription.maxAge} is what asks for data: delivery skips everything above
135
+ * the floor that the budget convicts, so the default budget of zero delivers only the
136
+ * latest group and a larger one reaches back over what it can still use.
137
+ */
119
138
  subscribe(options?: Subscription): Subscriber;
120
139
  /** Fetch the track's immutable publisher properties without subscribing. */
121
140
  info(): Promise<Info>;
@@ -129,7 +148,7 @@ export declare class Consumer {
129
148
  * subscription the publisher serves from it) gets an independent
130
149
  * {@link Subscriber} that receives a full copy of the groups, each with its own
131
150
  * read cursor. Groups are mirrored into every live subscriber and retained for the
132
- * track's `latencyMax` window so a late subscriber replays the recent groups.
151
+ * track's `maxAge` window so a late subscriber replays the recent groups.
133
152
  *
134
153
  * Obtained from {@link Request.accept} (the wire asks the application for a track to
135
154
  * serve) or constructed directly for an in-process track.
@@ -144,6 +163,13 @@ export declare class Producer {
144
163
  * Rejects if the track is closed before the properties are known.
145
164
  */
146
165
  info(): Promise<Info>;
166
+ /**
167
+ * Publisher priority from the committed {@link Info}, or the default before {@link accept}.
168
+ *
169
+ * Higher is served first. Hang publishers set this from `Catalog.PRIORITY` so
170
+ * audio outranks video on the wire and in the bandwidth allocator.
171
+ */
172
+ get priority(): number;
147
173
  /**
148
174
  * Settles once the track closes: `null` on a clean close, or the abort {@link Error}.
149
175
  * Peek it synchronously (`undefined` while open), observe it reactively, or `await` it.
@@ -156,7 +182,14 @@ export declare class Producer {
156
182
  get subscription(): Getter<Subscription | undefined>;
157
183
  /** Commit the immutable publisher properties, resolving {@link info}. Returns `this`. */
158
184
  accept(info?: Partial<Info>): this;
159
- /** An independent {@link Subscriber} receiving a full copy of this track's groups. */
185
+ /**
186
+ * An independent {@link Subscriber} reading this track's groups.
187
+ *
188
+ * Its cursor starts at the group the subscription named (its floor), or 0.
189
+ * {@link Subscription.maxAge} is what asks for data: delivery skips everything above
190
+ * the floor that the budget convicts, so the default budget of zero delivers only the
191
+ * latest group and a larger one reaches back over what it can still use.
192
+ */
160
193
  subscribe(options?: Subscription): Subscriber;
161
194
  /**
162
195
  * Whether the track currently has any subscribers.
@@ -189,18 +222,38 @@ export declare class Producer {
189
222
  * keep datagram payloads small (e.g. a single audio frame). Datagrams are never delivered
190
223
  * over IETF moq-transport or stream-only transports (the WebSocket fallback). A payload over
191
224
  * 65535 bytes (the QUIC datagram frame ceiling) throws. An origin publisher uses this; a
192
- * relay preserving upstream numbering uses {@link writeDatagram}.
225
+ * relay preserving upstream numbering uses {@link insertDatagram}.
193
226
  */
194
227
  appendDatagram(timestamp: Timestamp, payload: Uint8Array): number;
195
228
  /**
196
- * Write a datagram with an explicit sequence number.
229
+ * Insert a datagram with an explicit sequence number.
197
230
  *
198
231
  * Preserves the supplied sequence (advancing the shared counter if needed) so a relay can
199
232
  * forward a datagram without renumbering it. The size limits of {@link appendDatagram}
200
233
  * apply. Most origin publishers want {@link appendDatagram} instead.
201
234
  */
202
- writeDatagram(datagram: Datagram): void;
203
- /** Close the track and every subscriber, mirroring the abort to their groups. Idempotent. */
235
+ insertDatagram(sequence: number, timestamp: Timestamp, payload: Uint8Array): void;
236
+ /**
237
+ * Declare the track's exclusive end, possibly ahead of the live edge, mirroring the Rust
238
+ * `finish_at`.
239
+ *
240
+ * `final` is the first sequence that will never be produced, so a track whose last group
241
+ * is 89 finishes at 90. Groups and datagrams below it are still accepted; anything at or
242
+ * above it is refused. Unlike {@link close} it is not terminal: call `close()` once the
243
+ * remaining groups are written. Throws if the track is closed, already has an end, or
244
+ * `final` is at or below a sequence already produced.
245
+ */
246
+ finishAt(final: number): void;
247
+ /**
248
+ * Close the track and every subscriber, mirroring the abort to their groups. Idempotent.
249
+ *
250
+ * A clean close keeps the end {@link finishAt} declared, or declares one past the highest
251
+ * sequence produced; an abort ends without one. Subscribers still draining get the
252
+ * finished groups first, then the end or the abort. An abort after the declared end
253
+ * settled (reached, with every group below it finished) is a clean close. The groups
254
+ * left behind still age out after the track's `maxAge`, so a stale subscriber can't pin
255
+ * them.
256
+ */
204
257
  close(abort?: Error): void;
205
258
  /** Append a frame as its own single-frame group. */
206
259
  writeFrame(frame: Frame): void;
@@ -237,6 +290,23 @@ export declare class Subscriber {
237
290
  get subscription(): Getter<Subscription | undefined>;
238
291
  /** Return the latest group sequence observed on this track, if any. */
239
292
  latest(): number | undefined;
293
+ /**
294
+ * The track's exclusive final boundary: the end {@link Producer.finishAt} declared, which
295
+ * can be ahead of the live edge, or one past the highest sequence produced once the
296
+ * producer closes cleanly (0 for a track that produced none). Groups and datagrams share
297
+ * the sequence namespace, so this can exceed `latest() + 1`. Undefined until declared,
298
+ * and after an abort that declared none.
299
+ */
300
+ final(): number | undefined;
301
+ /**
302
+ * Resolve with the track's exclusive final boundary once it is known, mirroring the Rust
303
+ * `finished`.
304
+ *
305
+ * Resolves as soon as the end is declared, which may be ahead of the live edge, so it
306
+ * says nothing about every group having arrived: read until the cursor returns
307
+ * `undefined` for that. Rejects with the abort, or if the track closes without an end.
308
+ */
309
+ finished(): Promise<number>;
240
310
  /**
241
311
  * The newest frame this track has produced, or `undefined` while it has none.
242
312
  *
@@ -246,39 +316,33 @@ export declare class Subscriber {
246
316
  * left can no longer say where the edge is.
247
317
  */
248
318
  largest(): Location | undefined;
319
+ /** Limit subsequent reads to these groups and return this reader for chaining. */
320
+ withGroups(groups: Groups): this;
249
321
  /**
250
- * An independent subscriber to the same track, with its own cursor and its own replay of
251
- * the retained window.
252
- *
253
- * Reads here do not consume anything this one would deliver, which is what lets a
254
- * publisher read the cache alongside the cursor it is serving from. Resolving the track
255
- * again through the broadcast would not do: a dynamic serve is one request per peer
256
- * subscription, so that mints a second producer the application has to answer separately.
257
- *
258
- * @internal Wire layers only.
259
- */
260
- fork(options?: Subscription): Subscriber;
261
- /** Start this subscriber's local read cursor at `sequence`, without changing its wire request. */
262
- startAt(sequence: number): void;
263
- /**
264
- * Cap {@link nextGroup} and {@link recvGroup} at `sequence` inclusively, or omit it to
265
- * remove the cap. Groups above the cap remain buffered and become readable if the cap
266
- * is raised. This local cursor does not change the subscription's wire request.
322
+ * Limit subsequent reads without rewinding read progress or changing the wire request.
323
+ * An omitted start preserves the current floor; an omitted end removes the cap.
324
+ * Raising the end makes unread buffered groups available again.
267
325
  */
268
- endAt(sequence?: number): void;
326
+ setGroups(groups: Groups): void;
269
327
  /** Close the track (optionally with an error), closing any pending groups. Idempotent. */
270
328
  close(abort?: Error): void;
271
329
  /**
272
330
  * Receive every group on this track exactly once, as it becomes available.
273
331
  *
274
332
  * Groups may arrive out of order or with gaps due to network conditions; unlike
275
- * {@link nextGroup}, one that arrives after a newer group was already returned is
276
- * still delivered. When several groups are buffered, the lowest sequence is
333
+ * {@link Ordered.nextGroup}, one that arrives after a newer group was already returned
334
+ * is still delivered. When several groups are buffered, the lowest sequence is
277
335
  * returned first.
278
336
  *
279
- * Honors the floor set by {@link startAt} and the cap set by {@link endAt}: a group
337
+ * Honors the range set by {@link setGroups}: a group
280
338
  * beyond the cap stays buffered (not dropped) and is offered once the cap rises, even
281
339
  * after a clean close, without blocking in-range groups that arrive behind it.
340
+ * A group whose presentation time is further behind the live edge than this
341
+ * subscriber's `maxAge` is skipped. The default of zero takes the live edge.
342
+ * The budget remains attached after return, so a pending frame read rejects if a stalled
343
+ * group becomes stale while newer data advances.
344
+ *
345
+ * The first call commits this track to arrival order: {@link ordered} throws afterwards.
282
346
  */
283
347
  recvGroup(): Promise<GroupConsumer | undefined>;
284
348
  /**
@@ -287,7 +351,7 @@ export declare class Subscriber {
287
351
  *
288
352
  * Returns `undefined` when nothing is deliverable right now, which is not by itself the
289
353
  * end of the track: a group may still arrive, or one may be parked beyond the
290
- * {@link endAt} cap. Use it to drain what the retained window already holds, where
354
+ * {@link setGroups} cap. Use it to drain what the retained window already holds, where
291
355
  * waiting for a sequence nothing will republish would park forever.
292
356
  */
293
357
  tryRecvGroup(): GroupConsumer | undefined;
@@ -297,40 +361,104 @@ export declare class Subscriber {
297
361
  * Datagrams are a separate best-effort channel from groups (see
298
362
  * {@link Producer.appendDatagram}); they share only the sequence namespace. A consumer
299
363
  * that falls too far behind silently loses the oldest datagrams. Read this alongside
300
- * {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently. Returning
301
- * a datagram advances {@link nextGroup} past that sequence.
364
+ * {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently.
365
+ * The two cursors are independent: a datagram never moves the group cursor.
302
366
  */
303
367
  recvDatagram(): Promise<Datagram | undefined>;
304
368
  /**
305
- * Return the next group with a strictly-greater sequence number than the last returned.
369
+ * Read this track's groups in sequence order instead of arrival order.
370
+ *
371
+ * Both cursors draw from the same buffer, so a track is read one way or the other: this
372
+ * hands the subscription to the returned {@link Ordered} and leaves this handle inert.
373
+ * {@link recvGroup} and {@link recvDatagram} throw afterwards. Throws once a
374
+ * {@link recvGroup} call has already committed the track to arrival order.
306
375
  *
307
- * Late arrivals (sequence at or below the last returned) are silently skipped.
308
- * Use {@link recvGroup} to see every group in arrival order instead.
376
+ * Datagrams come along: they are a separate cursor either way, so the choice of group
377
+ * order says nothing about them, and reading them commits nothing.
309
378
  */
310
- nextGroup(): Promise<GroupConsumer | undefined>;
379
+ ordered(): Ordered;
311
380
  /**
312
- * Reads the next frame across all groups, discarding older groups.
313
- * Treat the returned frame bytes as read-only; they are shared with other consumers.
381
+ * Update this subscription's options (e.g. priority), triggering a SUBSCRIBE_UPDATE to the
382
+ * publisher. Mirrors the Rust `Subscriber::update`.
314
383
  */
315
- readFrame(): Promise<Frame | undefined>;
384
+ update(options: Subscription): void;
385
+ }
386
+ /**
387
+ * A {@link Subscriber} that reads groups in sequence order.
388
+ *
389
+ * Created by {@link Subscriber.ordered}, which takes the subscription over: the two
390
+ * cursors draw from one buffer, so a track is read one way or the other and never both.
391
+ * Every group this returns has a higher sequence than the last, so a late arrival is
392
+ * skipped rather than delivered out of turn.
393
+ *
394
+ * `maxAge` applies as this cursor reads, exactly as it does on the arrival cursor: a
395
+ * group is skipped once its reach, where its immediate successor begins, is that far
396
+ * behind the newest frame on the track. Nothing weaker convicts it, since the reach is
397
+ * the only proof that every frame it could still hold is past the budget, so a backlog
398
+ * inside the budget is still delivered whole, as a burst in order. The budget follows a
399
+ * group already handed out too: a stalled group's pending frame read rejects once newer
400
+ * content has pulled that far ahead.
401
+ */
402
+ export declare class Ordered {
403
+ #private;
404
+ /** The track name. */
405
+ readonly name: string;
406
+ private constructor();
407
+ /** Resolve this track's immutable publisher properties; see {@link Subscriber.info}. */
408
+ info(): Promise<Info>;
409
+ /** Settles once the track closes; see {@link Producer.closed}. */
410
+ get closed(): GetPromise<Error | null>;
411
+ /** This subscriber's current options, including defaults and the last {@link update}. */
412
+ get subscription(): Getter<Subscription | undefined>;
413
+ /** The latest group sequence observed on this track, if any. */
414
+ latest(): number | undefined;
415
+ /** The track's exclusive final boundary; see {@link Subscriber.final}. */
416
+ final(): number | undefined;
417
+ /** Resolve with the track's exclusive final boundary once known; see {@link Subscriber.finished}. */
418
+ finished(): Promise<number>;
419
+ /** Limit subsequent reads to these groups and return this reader for chaining. */
420
+ withGroups(groups: Groups): this;
421
+ /** Limit subsequent reads to these groups; see {@link Subscriber.setGroups}. */
422
+ setGroups(groups: Groups): void;
423
+ /** Update this subscription's options; see {@link Subscriber.update}. */
424
+ update(options: Subscription): void;
425
+ /** Close the track (optionally with an error), closing any pending groups. Idempotent. */
426
+ close(abort?: Error): void;
316
427
  /**
317
- * Reads the next frame along with its group and frame sequence numbers.
428
+ * Return the next group with a strictly-greater sequence number than the last returned.
429
+ *
430
+ * Late arrivals (sequence at or below the last returned) are silently skipped, as is a
431
+ * group whose every frame is further behind the live edge than `maxAge` (the default of
432
+ * zero keeps only what nothing newer has superseded). Honors the bounds set by
433
+ * {@link setGroups}.
434
+ */
435
+ nextGroup(): Promise<GroupConsumer | undefined>;
436
+ /**
437
+ * Read the next frame across groups, in sequence order, with its group and frame numbers.
438
+ *
439
+ * Rides the same cursor as {@link nextGroup} and shares this handle's contract: a
440
+ * buffered backlog is drained in full up to the point `maxAge` proves it useless.
318
441
  * Treat the returned frame bytes as read-only; they are shared with other consumers.
319
442
  */
320
- readFrameSequence(): Promise<({
443
+ readFrame(): Promise<({
321
444
  group: number;
322
445
  frame: number;
323
446
  } & Frame) | undefined>;
324
- /** Reads the next frame and decodes it as a UTF-8 string. */
447
+ /** Read the next frame and decode it as a UTF-8 string. */
325
448
  readString(): Promise<string | undefined>;
326
- /** Reads the next frame and parses it as JSON. */
449
+ /** Read the next frame and parse it as JSON. */
327
450
  readJson(): Promise<unknown | undefined>;
328
- /** Reads the next frame and decodes it as a one-byte boolean, throwing on a malformed frame. */
451
+ /** Read the next frame and decode it as a one-byte boolean, throwing on a malformed frame. */
329
452
  readBool(): Promise<boolean | undefined>;
330
453
  /**
331
- * Update this subscription's options (e.g. priority), triggering a SUBSCRIBE_UPDATE to the
332
- * publisher. Mirrors the Rust `Subscriber::update`.
454
+ * Receive the next datagram in arrival order.
455
+ *
456
+ * Datagrams are a separate best-effort channel from groups (see
457
+ * {@link Producer.appendDatagram}); they share only the sequence namespace, and
458
+ * neither cursor moves the other. Unordered by construction, so this behaves
459
+ * identically on either handle; it is here so a track carrying both channels needs
460
+ * one subscription rather than two.
333
461
  */
334
- update(options: Subscription): void;
462
+ recvDatagram(): Promise<Datagram | undefined>;
335
463
  }
336
464
  //# sourceMappingURL=track.d.ts.map
package/track.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../src/track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,IAAI,aAAa,EAAE,QAAQ,IAAI,aAAa,EAAU,MAAM,YAAY,CAAC;AAE3G,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtD,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAqB3C,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACxB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,IAAI;IACpB;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,GAAE,OAAO,CAAC,IAAI,CAAM,GAAG,IAAI,CAO3D;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8FAA8F;IAC9F,U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