@moq/net 0.4.8 → 0.22.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/README.md +7 -1
- package/announce.d.ts +1 -1
- package/announce.d.ts.map +1 -1
- package/announce.js +1 -1
- package/announce.js.map +1 -1
- package/announced.d.ts +51 -47
- package/announced.d.ts.map +1 -1
- package/announced.js +183 -31
- package/announced.js.map +1 -1
- package/announced.test-util.d.ts +2 -0
- package/announced.test-util.d.ts.map +1 -0
- package/announced.test-util.js +27 -0
- package/announced.test-util.js.map +1 -0
- package/auth.d.ts +64 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +20 -0
- package/auth.js.map +1 -0
- package/auth_gate.d.ts +2 -0
- package/auth_gate.d.ts.map +1 -0
- package/auth_gate.js +24 -0
- package/auth_gate.js.map +1 -0
- package/auth_session.d.ts +49 -0
- package/auth_session.d.ts.map +1 -0
- package/auth_session.js +1097 -0
- package/auth_session.js.map +1 -0
- package/bandwidth.d.ts +129 -25
- package/bandwidth.d.ts.map +1 -1
- package/bandwidth.js +410 -138
- package/bandwidth.js.map +1 -1
- package/bandwidth_api.d.ts +1 -1
- package/bandwidth_api.d.ts.map +1 -1
- package/bandwidth_api.js +1 -1
- package/bandwidth_api.js.map +1 -1
- package/broadcast.d.ts +62 -36
- package/broadcast.d.ts.map +1 -1
- package/broadcast.js +556 -172
- package/broadcast.js.map +1 -1
- package/cache.d.ts +103 -0
- package/cache.d.ts.map +1 -0
- package/cache.js +254 -0
- package/cache.js.map +1 -0
- package/claim.test-util.d.ts +5 -0
- package/claim.test-util.d.ts.map +1 -0
- package/claim.test-util.js +13 -0
- package/claim.test-util.js.map +1 -0
- package/connection/accept.d.ts +20 -12
- package/connection/accept.d.ts.map +1 -1
- package/connection/accept.js +97 -129
- package/connection/accept.js.map +1 -1
- package/connection/browser.d.ts.map +1 -1
- package/connection/browser.js +28 -19
- package/connection/browser.js.map +1 -1
- package/connection/connect.d.ts +119 -23
- package/connection/connect.d.ts.map +1 -1
- package/connection/connect.js +535 -216
- package/connection/connect.js.map +1 -1
- package/connection/dials.d.ts +45 -0
- package/connection/dials.d.ts.map +1 -0
- package/connection/dials.js +109 -0
- package/connection/dials.js.map +1 -0
- package/connection/endpoint.d.ts +60 -0
- package/connection/endpoint.d.ts.map +1 -0
- package/connection/endpoint.js +114 -0
- package/connection/endpoint.js.map +1 -0
- package/connection/forward.d.ts +7 -1
- package/connection/forward.d.ts.map +1 -1
- package/connection/forward.js +265 -80
- package/connection/forward.js.map +1 -1
- package/connection/goaway.d.ts +16 -9
- package/connection/goaway.d.ts.map +1 -1
- package/connection/goaway.js +22 -108
- package/connection/goaway.js.map +1 -1
- package/connection/handshake.d.ts +32 -6
- package/connection/handshake.d.ts.map +1 -1
- package/connection/handshake.js +97 -20
- package/connection/handshake.js.map +1 -1
- package/connection/index.d.ts +3 -6
- package/connection/index.d.ts.map +1 -1
- package/connection/index.js +1 -2
- package/connection/index.js.map +1 -1
- package/connection/liveness.d.ts +14 -0
- package/connection/liveness.d.ts.map +1 -0
- package/connection/liveness.js +30 -0
- package/connection/liveness.js.map +1 -0
- package/connection/pool.d.ts +137 -58
- package/connection/pool.d.ts.map +1 -1
- package/connection/pool.js +281 -117
- package/connection/pool.js.map +1 -1
- package/connection/reload.d.ts +60 -12
- package/connection/reload.d.ts.map +1 -1
- package/connection/reload.js +859 -233
- package/connection/reload.js.map +1 -1
- package/connection/session.d.ts +91 -0
- package/connection/session.d.ts.map +1 -0
- package/connection/session.js +2 -0
- package/connection/session.js.map +1 -0
- package/connection/stats.d.ts +20 -11
- package/connection/stats.d.ts.map +1 -1
- package/connection/stats.js +64 -8
- package/connection/stats.js.map +1 -1
- package/connection/ticker.d.ts +4 -0
- package/connection/ticker.d.ts.map +1 -0
- package/connection/ticker.js +66 -0
- package/connection/ticker.js.map +1 -0
- package/connection/tokens.d.ts +2 -0
- package/connection/tokens.d.ts.map +1 -0
- package/connection/tokens.js +404 -0
- package/connection/tokens.js.map +1 -0
- package/connection/transport.d.ts.map +1 -1
- package/connection/transport.js +4 -4
- package/connection/transport.js.map +1 -1
- package/connection/withdrawal.d.ts +2 -0
- package/connection/withdrawal.d.ts.map +1 -0
- package/connection/withdrawal.js +23 -0
- package/connection/withdrawal.js.map +1 -0
- package/consume.js +213 -46
- package/consume.js.map +1 -1
- package/cover.d.ts +59 -0
- package/cover.d.ts.map +1 -0
- package/cover.js +375 -0
- package/cover.js.map +1 -0
- package/datagram.d.ts +70 -11
- package/datagram.d.ts.map +1 -1
- package/datagram.js +317 -1
- package/datagram.js.map +1 -1
- package/datagram_stream.d.ts +18 -0
- package/datagram_stream.d.ts.map +1 -0
- package/datagram_stream.js +67 -0
- package/datagram_stream.js.map +1 -0
- package/defined.test-util.d.ts +2 -0
- package/defined.test-util.d.ts.map +1 -0
- package/defined.test-util.js +7 -0
- package/defined.test-util.js.map +1 -0
- package/delivered.d.ts +75 -0
- package/delivered.d.ts.map +1 -0
- package/delivered.js +228 -0
- package/delivered.js.map +1 -0
- package/demand.d.ts +173 -0
- package/demand.d.ts.map +1 -0
- package/demand.js +582 -0
- package/demand.js.map +1 -0
- package/drops.d.ts +93 -0
- package/drops.d.ts.map +1 -0
- package/drops.js +283 -0
- package/drops.js.map +1 -0
- package/error.d.ts +120 -21
- package/error.d.ts.map +1 -1
- package/error.js +230 -37
- package/error.js.map +1 -1
- package/errors.d.ts +2 -2
- package/errors.d.ts.map +1 -1
- package/errors.js +2 -2
- package/errors.js.map +1 -1
- package/fill.d.ts +174 -0
- package/fill.d.ts.map +1 -0
- package/fill.js +760 -0
- package/fill.js.map +1 -0
- package/flate/decoder.d.ts +2 -0
- package/flate/decoder.d.ts.map +1 -0
- package/flate/decoder.js +63 -0
- package/flate/decoder.js.map +1 -0
- package/flate/encoder.d.ts +2 -0
- package/flate/encoder.d.ts.map +1 -0
- package/flate/encoder.js +64 -0
- package/flate/encoder.js.map +1 -0
- package/flate/group.d.ts +34 -0
- package/flate/group.d.ts.map +1 -0
- package/flate/group.js +140 -0
- package/flate/group.js.map +1 -0
- package/frame.d.ts +80 -0
- package/frame.d.ts.map +1 -0
- package/frame.js +296 -0
- package/frame.js.map +1 -0
- package/frame.test-util.d.ts +5 -0
- package/frame.test-util.d.ts.map +1 -0
- package/frame.test-util.js +9 -0
- package/frame.test-util.js.map +1 -0
- package/group.d.ts +108 -45
- package/group.d.ts.map +1 -1
- package/group.js +1616 -307
- package/group.js.map +1 -1
- package/group_api.d.ts +7 -0
- package/group_api.d.ts.map +1 -0
- package/group_api.js +7 -0
- package/group_api.js.map +1 -0
- package/hop.d.ts +62 -76
- package/hop.d.ts.map +1 -1
- package/hop.js +92 -64
- package/hop.js.map +1 -1
- package/identity.d.ts +39 -0
- package/identity.d.ts.map +1 -0
- package/identity.js +47 -0
- package/identity.js.map +1 -0
- package/ietf/active_count.d.ts +2 -0
- package/ietf/active_count.d.ts.map +1 -0
- package/ietf/active_count.js +30 -0
- package/ietf/active_count.js.map +1 -0
- package/ietf/aliases.js +69 -35
- package/ietf/aliases.js.map +1 -1
- package/ietf/cluster.d.ts +3 -3
- package/ietf/cluster.js +14 -62
- package/ietf/cluster.js.map +1 -1
- package/ietf/connection.d.ts +1 -31
- package/ietf/connection.d.ts.map +1 -1
- package/ietf/connection.js +305 -143
- package/ietf/connection.js.map +1 -1
- package/ietf/datagram.d.ts +60 -0
- package/ietf/datagram.d.ts.map +1 -0
- package/ietf/datagram.js +152 -0
- package/ietf/datagram.js.map +1 -0
- package/ietf/error.d.ts +3 -3
- package/ietf/error.js +82 -100
- package/ietf/error.js.map +1 -1
- package/ietf/fetch.d.ts +91 -35
- package/ietf/fetch.d.ts.map +1 -1
- package/ietf/fetch.js +172 -93
- package/ietf/fetch.js.map +1 -1
- package/ietf/filter.d.ts +20 -30
- package/ietf/filter.d.ts.map +1 -1
- package/ietf/filter.js +140 -171
- package/ietf/filter.js.map +1 -1
- package/ietf/goaway.d.ts +11 -9
- package/ietf/goaway.d.ts.map +1 -1
- package/ietf/goaway.js +22 -35
- package/ietf/goaway.js.map +1 -1
- package/ietf/hidden.js +1 -1
- package/ietf/hidden.js.map +1 -1
- package/ietf/index.d.ts +2 -14
- package/ietf/index.d.ts.map +1 -1
- package/ietf/index.js +4 -14
- package/ietf/index.js.map +1 -1
- package/ietf/join.d.ts +7 -0
- package/ietf/join.d.ts.map +1 -0
- package/ietf/join.js +234 -0
- package/ietf/join.js.map +1 -0
- package/ietf/message.d.ts +18 -2
- package/ietf/message.d.ts.map +1 -1
- package/ietf/message.js +60 -40
- package/ietf/message.js.map +1 -1
- package/ietf/message.test-util.d.ts +6 -0
- package/ietf/message.test-util.d.ts.map +1 -0
- package/ietf/message.test-util.js +13 -0
- package/ietf/message.test-util.js.map +1 -0
- package/ietf/namespace.d.ts +17 -3
- package/ietf/namespace.d.ts.map +1 -1
- package/ietf/namespace.js +78 -26
- package/ietf/namespace.js.map +1 -1
- package/ietf/object.d.ts +194 -32
- package/ietf/object.d.ts.map +1 -1
- package/ietf/object.js +405 -178
- package/ietf/object.js.map +1 -1
- package/ietf/parameters.d.ts +22 -42
- package/ietf/parameters.d.ts.map +1 -1
- package/ietf/parameters.js +260 -472
- package/ietf/parameters.js.map +1 -1
- package/ietf/priority.d.ts +17 -2
- package/ietf/priority.d.ts.map +1 -1
- package/ietf/priority.js +19 -4
- package/ietf/priority.js.map +1 -1
- package/ietf/properties.d.ts +5 -4
- package/ietf/properties.d.ts.map +1 -1
- package/ietf/properties.js +78 -48
- package/ietf/properties.js.map +1 -1
- package/ietf/publish.d.ts +22 -30
- package/ietf/publish.d.ts.map +1 -1
- package/ietf/publish.js +45 -139
- package/ietf/publish.js.map +1 -1
- package/ietf/publish_namespace.d.ts +46 -69
- package/ietf/publish_namespace.d.ts.map +1 -1
- package/ietf/publish_namespace.js +66 -184
- package/ietf/publish_namespace.js.map +1 -1
- package/ietf/publisher.js +1800 -600
- package/ietf/publisher.js.map +1 -1
- package/ietf/range.d.ts +2 -0
- package/ietf/range.d.ts.map +1 -0
- package/ietf/range.js +222 -0
- package/ietf/range.js.map +1 -0
- package/ietf/request.d.ts +3 -27
- package/ietf/request.d.ts.map +1 -1
- package/ietf/request.js +41 -78
- package/ietf/request.js.map +1 -1
- package/ietf/request_stream.d.ts +1 -6
- package/ietf/request_stream.d.ts.map +1 -1
- package/ietf/request_stream.js +306 -16
- package/ietf/request_stream.js.map +1 -1
- package/ietf/session.d.ts +41 -0
- package/ietf/session.d.ts.map +1 -0
- package/ietf/session.js +65 -0
- package/ietf/session.js.map +1 -0
- package/ietf/setup.d.ts +4 -29
- package/ietf/setup.d.ts.map +1 -1
- package/ietf/setup.js +6 -117
- package/ietf/setup.js.map +1 -1
- package/ietf/setup_options.d.ts +31 -0
- package/ietf/setup_options.d.ts.map +1 -0
- package/ietf/setup_options.js +138 -0
- package/ietf/setup_options.js.map +1 -0
- package/ietf/solicit.js +4 -14
- package/ietf/solicit.js.map +1 -1
- package/ietf/subscribe.d.ts +48 -41
- package/ietf/subscribe.d.ts.map +1 -1
- package/ietf/subscribe.js +118 -239
- package/ietf/subscribe.js.map +1 -1
- package/ietf/subscribe_namespace.d.ts +13 -76
- package/ietf/subscribe_namespace.d.ts.map +1 -1
- package/ietf/subscribe_namespace.js +30 -201
- package/ietf/subscribe_namespace.js.map +1 -1
- package/ietf/subscriber.js +1839 -536
- package/ietf/subscriber.js.map +1 -1
- package/ietf/token.js +105 -27
- package/ietf/token.js.map +1 -1
- package/ietf/track.d.ts +25 -22
- package/ietf/track.d.ts.map +1 -1
- package/ietf/track.js +48 -61
- package/ietf/track.js.map +1 -1
- package/ietf/version.d.ts +13 -42
- package/ietf/version.d.ts.map +1 -1
- package/ietf/version.js +22 -48
- package/ietf/version.js.map +1 -1
- package/implementation.d.ts +2 -0
- package/implementation.d.ts.map +1 -0
- package/implementation.js +5 -0
- package/implementation.js.map +1 -0
- package/index.d.ts +25 -10
- package/index.d.ts.map +1 -1
- package/index.js +19 -6
- package/index.js.map +1 -1
- package/internal.d.ts +1512 -64
- package/internal.d.ts.map +1 -1
- package/internal.js +557 -79
- package/internal.js.map +1 -1
- package/ledger.d.ts +23 -0
- package/ledger.d.ts.map +1 -0
- package/ledger.js +247 -0
- package/ledger.js.map +1 -0
- package/listing.d.ts +132 -0
- package/listing.d.ts.map +1 -0
- package/listing.js +486 -0
- package/listing.js.map +1 -0
- package/lite/announce.d.ts +124 -63
- package/lite/announce.d.ts.map +1 -1
- package/lite/announce.js +384 -158
- package/lite/announce.js.map +1 -1
- package/lite/announce_stream.d.ts +2 -0
- package/lite/announce_stream.d.ts.map +1 -0
- package/lite/announce_stream.js +92 -0
- package/lite/announce_stream.js.map +1 -0
- package/lite/answer.d.ts +22 -0
- package/lite/answer.d.ts.map +1 -0
- package/lite/answer.js +301 -0
- package/lite/answer.js.map +1 -0
- package/lite/auth.d.ts +45 -0
- package/lite/auth.d.ts.map +1 -0
- package/lite/auth.js +204 -0
- package/lite/auth.js.map +1 -0
- package/lite/compat.d.ts +31 -0
- package/lite/compat.d.ts.map +1 -0
- package/lite/compat.js +86 -0
- package/lite/compat.js.map +1 -0
- package/lite/connection.d.ts +1 -45
- package/lite/connection.d.ts.map +1 -1
- package/lite/connection.js +360 -77
- package/lite/connection.js.map +1 -1
- package/lite/datagram-end.d.ts +26 -0
- package/lite/datagram-end.d.ts.map +1 -0
- package/lite/datagram-end.js +30 -0
- package/lite/datagram-end.js.map +1 -0
- package/lite/datagram.d.ts +73 -8
- package/lite/datagram.d.ts.map +1 -1
- package/lite/datagram.js +144 -9
- package/lite/datagram.js.map +1 -1
- package/lite/duration.d.ts +6 -0
- package/lite/duration.d.ts.map +1 -0
- package/lite/duration.js +14 -0
- package/lite/duration.js.map +1 -0
- package/lite/error.d.ts +9 -0
- package/lite/error.d.ts.map +1 -0
- package/lite/error.js +24 -0
- package/lite/error.js.map +1 -0
- package/lite/fills.d.ts +162 -0
- package/lite/fills.d.ts.map +1 -0
- package/lite/fills.js +486 -0
- package/lite/fills.js.map +1 -0
- package/lite/fit.d.ts +49 -0
- package/lite/fit.d.ts.map +1 -0
- package/lite/fit.js +305 -0
- package/lite/fit.js.map +1 -0
- package/lite/goaway.d.ts +1 -1
- package/lite/goaway.d.ts.map +1 -1
- package/lite/goaway.js +5 -13
- package/lite/goaway.js.map +1 -1
- package/lite/group.d.ts +64 -13
- package/lite/group.d.ts.map +1 -1
- package/lite/group.js +108 -30
- package/lite/group.js.map +1 -1
- package/lite/identity.d.ts +25 -0
- package/lite/identity.d.ts.map +1 -0
- package/lite/identity.js +79 -0
- package/lite/identity.js.map +1 -0
- package/lite/index.d.ts +2 -1
- package/lite/index.d.ts.map +1 -1
- package/lite/index.js +2 -1
- package/lite/index.js.map +1 -1
- package/lite/message.d.ts +9 -1
- package/lite/message.d.ts.map +1 -1
- package/lite/message.js +28 -44
- package/lite/message.js.map +1 -1
- package/lite/priority.d.ts +9 -2
- package/lite/priority.d.ts.map +1 -1
- package/lite/priority.js +11 -105
- package/lite/priority.js.map +1 -1
- package/lite/probe.d.ts.map +1 -1
- package/lite/probe.js +9 -0
- package/lite/probe.js.map +1 -1
- package/lite/publisher.d.ts +10 -1
- package/lite/publisher.d.ts.map +1 -1
- package/lite/publisher.js +2548 -437
- package/lite/publisher.js.map +1 -1
- package/lite/routed.d.ts +59 -0
- package/lite/routed.d.ts.map +1 -0
- package/lite/routed.js +564 -0
- package/lite/routed.js.map +1 -0
- package/lite/session.d.ts +1 -27
- package/lite/session.d.ts.map +1 -1
- package/lite/session.js +0 -99
- package/lite/session.js.map +1 -1
- package/lite/setup.d.ts +29 -2
- package/lite/setup.d.ts.map +1 -1
- package/lite/setup.js +95 -21
- package/lite/setup.js.map +1 -1
- package/lite/stream.d.ts +5 -11
- package/lite/stream.d.ts.map +1 -1
- package/lite/stream.js +5 -1
- package/lite/stream.js.map +1 -1
- package/lite/subscribe.d.ts +475 -75
- package/lite/subscribe.d.ts.map +1 -1
- package/lite/subscribe.js +1373 -142
- package/lite/subscribe.js.map +1 -1
- package/lite/subscriber.d.ts +7 -44
- package/lite/subscriber.d.ts.map +1 -1
- package/lite/subscriber.js +3290 -515
- package/lite/subscriber.js.map +1 -1
- package/lite/track.d.ts +24 -9
- package/lite/track.d.ts.map +1 -1
- package/lite/track.js +116 -37
- package/lite/track.js.map +1 -1
- package/lite/tracks.d.ts +55 -0
- package/lite/tracks.d.ts.map +1 -0
- package/lite/tracks.js +114 -0
- package/lite/tracks.js.map +1 -0
- package/lite/version.d.ts +132 -24
- package/lite/version.d.ts.map +1 -1
- package/lite/version.js +378 -33
- package/lite/version.js.map +1 -1
- package/meta.d.ts +77 -0
- package/meta.d.ts.map +1 -0
- package/meta.js +130 -0
- package/meta.js.map +1 -0
- package/meta_api.d.ts +7 -0
- package/meta_api.d.ts.map +1 -0
- package/meta_api.js +7 -0
- package/meta_api.js.map +1 -0
- package/mint.d.ts +28 -0
- package/mint.d.ts.map +1 -0
- package/mint.js +66 -0
- package/mint.js.map +1 -0
- package/open.d.ts +63 -0
- package/open.d.ts.map +1 -0
- package/open.js +250 -0
- package/open.js.map +1 -0
- package/origin.d.ts +392 -140
- package/origin.d.ts.map +1 -1
- package/origin.js +2533 -686
- package/origin.js.map +1 -1
- package/package.json +8 -13
- package/path.d.ts +51 -51
- package/path.d.ts.map +1 -1
- package/path.js +210 -57
- package/path.js.map +1 -1
- package/payload.d.ts +33 -0
- package/payload.d.ts.map +1 -0
- package/payload.js +65 -0
- package/payload.js.map +1 -0
- package/prefix.d.ts +152 -0
- package/prefix.d.ts.map +1 -0
- package/prefix.js +349 -0
- package/prefix.js.map +1 -0
- package/priority.d.ts +8 -0
- package/priority.d.ts.map +1 -0
- package/priority.js +185 -0
- package/priority.js.map +1 -0
- package/queue.d.ts +2 -0
- package/queue.d.ts.map +1 -0
- package/queue.js +46 -0
- package/queue.js.map +1 -0
- package/ranges.d.ts +36 -0
- package/ranges.d.ts.map +1 -0
- package/ranges.js +312 -0
- package/ranges.js.map +1 -0
- package/rescale.d.ts +24 -0
- package/rescale.d.ts.map +1 -0
- package/rescale.js +39 -0
- package/rescale.js.map +1 -0
- package/resume.d.ts +55 -0
- package/resume.d.ts.map +1 -0
- package/resume.js +4173 -0
- package/resume.js.map +1 -0
- package/resume.test-util.d.ts +2 -0
- package/resume.test-util.d.ts.map +1 -0
- package/resume.test-util.js +25 -0
- package/resume.test-util.js.map +1 -0
- package/skips.d.ts +48 -0
- package/skips.d.ts.map +1 -0
- package/skips.js +182 -0
- package/skips.js.map +1 -0
- package/stream.d.ts +75 -37
- package/stream.d.ts.map +1 -1
- package/stream.js +236 -92
- package/stream.js.map +1 -1
- package/subscription.test-util.d.ts +2 -0
- package/subscription.test-util.d.ts.map +1 -0
- package/subscription.test-util.js +49 -0
- package/subscription.test-util.js.map +1 -0
- package/tail.d.ts +23 -14
- package/tail.d.ts.map +1 -1
- package/tail.js +224 -97
- package/tail.js.map +1 -1
- package/time.d.ts +41 -102
- package/time.d.ts.map +1 -1
- package/time.js +129 -91
- package/time.js.map +1 -1
- package/timed.d.ts +21 -0
- package/timed.d.ts.map +1 -0
- package/timed.js +2 -0
- package/timed.js.map +1 -0
- package/track.d.ts +577 -245
- package/track.d.ts.map +1 -1
- package/track.js +7306 -771
- package/track.js.map +1 -1
- package/track_api.d.ts +7 -0
- package/track_api.d.ts.map +1 -0
- package/track_api.js +7 -0
- package/track_api.js.map +1 -0
- package/util/abort.d.ts +1 -0
- package/util/abort.d.ts.map +1 -1
- package/util/abort.js +23 -1
- package/util/abort.js.map +1 -1
- package/util/announce.d.ts +4 -0
- package/util/announce.d.ts.map +1 -0
- package/util/announce.js +11 -0
- package/util/announce.js.map +1 -0
- package/util/bigint.d.ts +3 -0
- package/util/bigint.d.ts.map +1 -0
- package/util/bigint.js +8 -0
- package/util/bigint.js.map +1 -0
- package/util/change.d.ts +12 -0
- package/util/change.d.ts.map +1 -0
- package/util/change.js +18 -0
- package/util/change.js.map +1 -0
- package/util/deadline.d.ts +2 -0
- package/util/deadline.d.ts.map +1 -0
- package/util/deadline.js +108 -0
- package/util/deadline.js.map +1 -0
- package/util/decode_error.d.ts +3 -0
- package/util/decode_error.d.ts.map +1 -0
- package/util/decode_error.js +11 -0
- package/util/decode_error.js.map +1 -0
- package/util/demand.d.ts +8 -0
- package/util/demand.d.ts.map +1 -0
- package/util/demand.js +24 -0
- package/util/demand.js.map +1 -0
- package/util/given_up.d.ts +2 -0
- package/util/given_up.d.ts.map +1 -0
- package/util/given_up.js +101 -0
- package/util/given_up.js.map +1 -0
- package/util/hex.d.ts +6 -0
- package/util/hex.d.ts.map +1 -1
- package/util/hex.js +19 -4
- package/util/hex.js.map +1 -1
- package/util/key.d.ts +15 -0
- package/util/key.d.ts.map +1 -0
- package/util/key.js +38 -0
- package/util/key.js.map +1 -0
- package/util/limits.d.ts +2 -0
- package/util/limits.d.ts.map +1 -0
- package/util/limits.js +76 -0
- package/util/limits.js.map +1 -0
- package/util/observed.d.ts +23 -0
- package/util/observed.d.ts.map +1 -0
- package/util/observed.js +122 -0
- package/util/observed.js.map +1 -0
- package/util/sorted.d.ts +2 -0
- package/util/sorted.d.ts.map +1 -0
- package/util/sorted.js +149 -0
- package/util/sorted.js.map +1 -0
- package/util/timeout.d.ts +2 -1
- package/util/timeout.d.ts.map +1 -1
- package/util/timeout.js +13 -9
- package/util/timeout.js.map +1 -1
- package/util/timer.d.ts +2 -0
- package/util/timer.d.ts.map +1 -0
- package/util/timer.js +19 -0
- package/util/timer.js.map +1 -0
- package/util/utf8.d.ts +2 -0
- package/util/utf8.d.ts.map +1 -1
- package/util/utf8.js +7 -1
- package/util/utf8.js.map +1 -1
- package/util/varint.d.ts.map +1 -1
- package/util/varint.js +8 -1
- package/util/varint.js.map +1 -1
- package/util/watch.d.ts +8 -0
- package/util/watch.d.ts.map +1 -0
- package/util/watch.js +38 -0
- package/util/watch.js.map +1 -0
- package/util/yield.d.ts +2 -0
- package/util/yield.d.ts.map +1 -0
- package/util/yield.js +31 -0
- package/util/yield.js.map +1 -0
- package/varint.d.ts +0 -29
- package/varint.d.ts.map +1 -1
- package/varint.js +7 -28
- package/varint.js.map +1 -1
- package/varint_api.d.ts +7 -0
- package/varint_api.d.ts.map +1 -0
- package/varint_api.js +7 -0
- package/varint_api.js.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +4 -0
- package/version.js.map +1 -0
- package/window.d.ts +570 -0
- package/window.d.ts.map +1 -0
- package/window.js +1677 -0
- package/window.js.map +1 -0
- package/wire.d.ts +145 -30
- package/wire.d.ts.map +1 -1
- package/wire.js +27 -0
- package/wire.js.map +1 -1
- package/connection/established.d.ts +0 -53
- package/connection/established.d.ts.map +0 -1
- package/connection/established.js +0 -2
- package/connection/established.js.map +0 -1
- package/ietf/adapter.d.ts +0 -75
- package/ietf/adapter.d.ts.map +0 -1
- package/ietf/adapter.js +0 -699
- package/ietf/adapter.js.map +0 -1
- package/lite/datagram_stream.d.ts +0 -8
- package/lite/datagram_stream.d.ts.map +0 -1
- package/lite/datagram_stream.js +0 -43
- package/lite/datagram_stream.js.map +0 -1
- package/lite/fetch.d.ts +0 -28
- package/lite/fetch.d.ts.map +0 -1
- package/lite/fetch.js +0 -78
- package/lite/fetch.js.map +0 -1
- package/util/log.d.ts +0 -5
- package/util/log.d.ts.map +0 -1
- package/util/log.js +0 -16
- package/util/log.js.map +0 -1
- package/zod.d.ts +0 -13
- package/zod.d.ts.map +0 -1
- package/zod.js +0 -18
- package/zod.js.map +0 -1
package/lite/subscriber.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../src/lite/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE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AE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC;SAC7F,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,4FAA4F;IAC5F,iCAAiC;IACxB,KAAK;QACb,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9E,CAAC;CACD","sourcesContent":["import { race, Signal } from \"@moq/signals\";\nimport * as announce from \"../announced.ts\";\nimport * as broadcast from \"../broadcast.ts\";\nimport type { Probe as ProbeStats } from \"../connection/stats.ts\";\nimport { BroadcastCache } from \"../consume.ts\";\nimport { controlTimeout, error, ProtocolViolation, reason, StreamCode, StreamError, sessionCause } from \"../error.ts\";\nimport * as netGroup from \"../group.ts\";\nimport { Cost, type Hop, MAX_HOPS, type Route, randomHop, routesEqual, stampHops, UNKNOWN_HOP } from \"../hop.ts\";\nimport { groupBounds, hiddenBelow, scopeCaptures, scopeHead, scopeOverlaps } from \"../internal.ts\";\nimport * as Path from \"../path.ts\";\nimport { type OpenOptions, type Reader, Stream } from \"../stream.ts\";\nimport { TAIL_GRACE_MS, Tail } from \"../tail.ts\";\nimport * as Time from \"../time.ts\";\nimport type * as track from \"../track.ts\";\nimport { untilAborted } from \"../util/abort.ts\";\nimport { TimeoutError, withTimeout } from \"../util/timeout.ts\";\nimport { overrideBroadcastWire, wireOf } from \"../wire.ts\";\nimport {\n\tAnnounceHistory,\n\tAnnounceInit,\n\tAnnounceOk,\n\tAnnounceRequest,\n\tdecodeAnnounceBroadcastMaybe,\n} from \"./announce.ts\";\nimport { Datagram as DatagramMessage } from \"./datagram.ts\";\nimport * as DatagramStream from \"./datagram_stream.ts\";\nimport { Fetch as FetchMessage } from \"./fetch.ts\";\nimport { frameDecoder, type Group as GroupMessage, readFrames } from \"./group.ts\";\nimport { sendOrder } from \"./priority.ts\";\nimport { Probe } from \"./probe.ts\";\nimport { ProbeLevel, type Setup } from \"./setup.ts\";\nimport { StreamId } from \"./stream.ts\";\nimport {\n\tdecodeSubscribeResponse,\n\tdecodeSubscribeResponseMaybe,\n\tEMPTY_RANGE,\n\temptyRange,\n\texclusiveGroupEnd,\n\tinclusiveGroupEnd,\n\tSubscribe,\n\tSubscribeUpdate,\n} from \"./subscribe.ts\";\nimport { TrackInfo, Track as TrackMessage } from \"./track.ts\";\nimport {\n\thasAnnounceId,\n\thasAnnounceOk,\n\thasDatagrams,\n\thasProbeRtt,\n\thasStreamCount,\n\tresolvesStart,\n\trestartSupported,\n\tVersion,\n} from \"./version.ts\";\n\n// Bound on how long stream-open plus the first response (SUBSCRIBE_OK on older\n// drafts, or TRACK_INFO on lite-05+) may take. Browsers cap concurrent QUIC streams\n// (Chrome ~100) and we open with waitUntilAvailable, so past the cap the open blocks\n// until the peer frees a slot. The timeout turns a stall into a clear error.\nconst SUBSCRIBE_SETUP_TIMEOUT_MS = 10_000;\n\n// The TRACK stream and implicit SUBSCRIBE acceptance are lite-05+.\nfunction supportsTrackStream(version: Version): boolean {\n\tswitch (version) {\n\t\tcase Version.DRAFT_01:\n\t\tcase Version.DRAFT_02:\n\t\tcase Version.DRAFT_03:\n\t\tcase Version.DRAFT_04:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn true;\n\t}\n}\n\ninterface SubscribeEntry {\n\t// The write side: incoming GROUP streams are routed here. The application reads\n\t// the matching track.Subscriber it got from broadcast.Consumer.subscribe.\n\ttrack: track.Producer;\n\t// Per-frame timestamp scale (0 = none). undefined until it's known (from TRACK_INFO\n\t// on lite-05+, or implicit defaults on older drafts). A non-zero value means each\n\t// frame on the group stream is prefixed with a zigzag-delta timestamp varint that\n\t// runGroup must consume to stay in sync; group streams block on it before decoding,\n\t// since a group's QUIC stream can race ahead of the subscribe stream.\n\ttimescale: Signal<number | undefined>;\n\t// The group streams received, so the subscription can wait for the ones still owed\n\t// after the publisher ends it.\n\ttail: Tail;\n\t// The first group the SUBSCRIBE asked for, if any.\n\trequested?: number;\n\t// The first group the publisher serves (SUBSCRIBE_START) and the track's exclusive end\n\t// (SUBSCRIBE_END), once it declares them.\n\tstart?: number;\n\tend?: number;\n\t// Group streams opened by the publisher, when SUBSCRIBE_END carries the count.\n\tstreams?: number;\n}\n\n/**\n * Handles subscribing to broadcasts and managing their lifecycle.\n *\n * @internal\n */\n// What we close a session with on a protocol violation.\n//\n// The draft names the condition but assigns no numbers, so this is the Rust\n// implementation's code for `Error::ProtocolViolation`: matching it is what makes the\n// two report the same thing, where the default 0 would tell the peer it closed cleanly.\nconst PROTOCOL_VIOLATION_CODE = 15;\n\n// WebTransport rejects a close reason over 1024 bytes of UTF-8 by throwing, so a reason\n// built from peer-supplied data has to be bounded before it gets there. A broadcast path\n// is peer-supplied and long enough to reach this on its own.\nconst MAX_CLOSE_REASON = 1024;\n\n// The longest prefix of `text` that fits a close reason. `encodeInto` stops on a whole\n// code point, so `read` never lands mid-character the way slicing bytes would.\nfunction closeReason(text: string): string {\n\tconst encoder = new TextEncoder();\n\tconst buf = new Uint8Array(MAX_CLOSE_REASON);\n\tconst { read } = encoder.encodeInto(text, buf);\n\treturn text.slice(0, read);\n}\n\nexport class Subscriber {\n\t#quic: WebTransport;\n\n\t// The version of the connection.\n\treadonly version: Version;\n\n\t// Shared with the Publisher so reflected announces can be dropped on receipt.\n\treadonly hop: Hop;\n\n\t// Our subscribed tracks. `timescale` resolves once known (from TRACK_INFO on\n\t// lite-05+, or implicit defaults on older drafts); group streams block on it\n\t// before decoding any frame, since a group's QUIC stream can race ahead.\n\t#subscribes = new Map<bigint, SubscribeEntry>();\n\t#subscribeNext = 0n;\n\n\t// Dedup consumed broadcasts per path: repeat consume() calls share one subscription.\n\t#consumes = new BroadcastCache();\n\n\t// A random Hop ID of this connection's own, written as the first hop of any chain that\n\t// names no publisher, so a publisher that reconnects reads as a new one.\n\t#stamp: Hop;\n\n\t// Dedup in-flight one-shot fetches, keyed by [broadcast, track, sequence]. Concurrent (or\n\t// repeat, while still open) fetchGroup() calls for the same group share one FETCH stream and\n\t// each get an independent mirror; the entry is evicted once the group closes.\n\t#fetches = new Map<string, { group: netGroup.Producer; accepted: Promise<void> }>();\n\n\t// The peer's PROBE estimates, written as they arrive (Lite03+ only).\n\t#probe?: Signal<ProbeStats>;\n\n\t// The peer's SETUP (lite-05+), undefined until it arrives. Gates opening the PROBE\n\t// stream on the peer having advertised Probe >= Report.\n\t#peerSetup?: Signal<Setup | undefined>;\n\n\t// Distinguishes failures from streams torn down by Subscriber.close().\n\t#closed = new AbortController();\n\t/**\n\t * Creates a new Subscriber instance.\n\t * @param quic - The WebTransport session to use\n\t * @param version - The protocol version\n\t * @param origin - Hop id shared with the Publisher\n\t * @param probe - Optional sink for the peer's PROBE estimates\n\t * @param peerSetup - Optional peer SETUP slot for capability gating (lite-05+)\n\t *\n\t * @internal\n\t */\n\tconstructor(\n\t\tquic: WebTransport,\n\t\tversion: Version,\n\t\thop: Hop,\n\t\tprobe?: Signal<ProbeStats>,\n\t\tpeerSetup?: Signal<Setup | undefined>,\n\t) {\n\t\tthis.#quic = quic;\n\t\tthis.version = version;\n\t\tthis.hop = hop;\n\t\tthis.#stamp = randomHop();\n\t\tthis.#probe = probe;\n\t\tthis.#peerSetup = peerSetup;\n\t}\n\n\t/**\n\t * Subscribe to broadcast announcements matching `scope`. Paths are relative\n\t * to the session, not the scope.\n\t *\n\t * Reflected announces (those whose hop chain already includes this\n\t * connection) are always dropped: moq-lite-06 has none to keep, and older\n\t * versions stay consistent with that.\n\t *\n\t * Hidden routes (a `.`-prefixed segment below the scope's head) are left out unless\n\t * `options.hidden` opts in. The opt-in rides the request on lite-07+; an older peer\n\t * never hides anything, so the rule is also applied here.\n\t */\n\tannounced(scope: Path.Pattern = Path.Pattern.all(), options?: announce.Options): announce.Consumer {\n\t\tconst announced = new announce.Producer();\n\t\t// The wire speaks announce interest by prefix, and echoes suffixes beneath it.\n\t\tvoid this.#runAnnounced(announced, scopeHead(scope), scope, options?.hidden ?? false);\n\t\treturn announced.consume();\n\t}\n\n\tasync #runAnnounced(\n\t\tannounced: announce.Producer,\n\t\tprefix: Path.Valid,\n\t\tscope: Path.Pattern,\n\t\thidden: boolean,\n\t): Promise<void> {\n\t\tconsole.debug(`announced: prefix=${prefix}`);\n\t\t// Lite04/05: send our own session-level Hop ID so the peer can skip announces\n\t\t// whose hop chain already passed through us. Encoding drops it on every other\n\t\t// version, where we drop the reflected announce on receipt instead. Matches the\n\t\t// Rust subscriber's `exclude_hop: self.self_origin.id` in `run_announce_prefix`.\n\t\tconst msg = new AnnounceRequest(prefix, this.hop, hidden);\n\t\tconst visible = (path: Path.Valid) => scopeOverlaps(scope, path) && (hidden || !hiddenBelow(prefix, path));\n\n\t\t// Opened outside the try so the catch can reach it: a protocol violation below has\n\t\t// to reset the stream, not just close our side of it.\n\t\tlet stream: Stream;\n\t\ttry {\n\t\t\tstream = await Stream.open(this.#quic, { version: this.version });\n\t\t} catch (err: unknown) {\n\t\t\tannounced.close(error(err));\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// Send the announce interest.\n\t\t\tawait stream.writer.u53(StreamId.Announce);\n\t\t\tawait msg.encode(stream.writer, this.version);\n\n\t\t\t// Lite05+: the publisher reports its own Hop ID before any announces.\n\t\t\t// It no longer stamps itself onto each hop chain, so we append it here to\n\t\t\t// keep the reflected-announce loop check seeing the full chain.\n\t\t\tlet responderOrigin: Hop | undefined;\n\t\t\tif (hasAnnounceOk(this.version)) {\n\t\t\t\tconst ok = await AnnounceOk.decode(stream.reader, this.version);\n\t\t\t\t// Keep a withheld 0: it names nobody for loop detection, but it is the\n\t\t\t\t// anonymous mark and must travel the reconstructed chain. Assigned identities\n\t\t\t\t// stay off this hop and are never forwarded.\n\t\t\t\tresponderOrigin = ok.hop;\n\t\t\t}\n\n\t\t\t// Every advertisement the peer currently has live, keyed by suffix (at most one\n\t\t\t// per path is current, and every announce on this stream shares `prefix`).\n\t\t\t//\n\t\t\t// An advertisement skipped locally as a reflected loop is recorded with\n\t\t\t// `publisher: undefined` and `live: false`: the peer numbered it and will retract\n\t\t\t// it regardless of what we made of it, so its path is not free. Dropping it from\n\t\t\t// the map instead would let a later announce take the path, and the skipped one's\n\t\t\t// `endedId` would then retract that one's state.\n\t\t\t//\n\t\t\t// `publisher` is what lets a restart tell a route change (same publisher) from a\n\t\t\t// new publisher on the route, whose content the next consume must not share\n\t\t\t// with the old one's.\n\t\t\ttype Advertisement = {\n\t\t\t\tpublisher: Hop | undefined;\n\t\t\t\tlive: boolean;\n\t\t\t\troute: Route;\n\t\t\t\tcaptures: Path.Pattern[] | undefined;\n\t\t\t};\n\t\t\tconst advertised = new Map<Path.Valid, Advertisement>();\n\n\t\t\tswitch (this.version) {\n\t\t\t\tcase Version.DRAFT_01:\n\t\t\t\tcase Version.DRAFT_02: {\n\t\t\t\t\t// Receive ANNOUNCE_INIT first\n\t\t\t\t\tconst init = await AnnounceInit.decode(stream.reader, this.version);\n\n\t\t\t\t\t// Process initial announcements. These are advertisements like any other, so\n\t\t\t\t\t// they go on record and obey the same one-per-path rule: the initial set\n\t\t\t\t\t// naming a path twice is the same violation as two ANNOUNCE_STARTs for it,\n\t\t\t\t\t// and the record is what catches either. Draft01/02 carry no hop ids and no\n\t\t\t\t\t// ANNOUNCE_OK, so this connection's stamp names the publisher.\n\t\t\t\t\tfor (const suffix of init.suffixes) {\n\t\t\t\t\t\tconst path = Path.join(prefix, suffix);\n\t\t\t\t\t\tif (advertised.has(path)) {\n\t\t\t\t\t\t\tthrow new ProtocolViolation(`duplicate announce for ${path}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst route = { hops: [this.#stamp, UNKNOWN_HOP], cost: Cost.zero };\n\t\t\t\t\t\tconst live = visible(path);\n\t\t\t\t\t\tconst captures = scopeCaptures(scope, path);\n\t\t\t\t\t\tadvertised.set(path, { publisher: this.#stamp, live, route, captures });\n\t\t\t\t\t\tif (!live) continue;\n\t\t\t\t\t\tconsole.debug(`announced: broadcast=${path} active=true`);\n\t\t\t\t\t\tannounced.append({ prefix: path, captures, kind: \"announced\", route });\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\t// Draft03+: no AnnounceInit, initial state comes via Announce messages.\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Lite06+: announce ids. Each received `active` implicitly assigns the next\n\t\t\t// per-stream ordinal; `endedId`/`restart` reference it, and lite-07 bases copy\n\t\t\t// from it. Tracked even for announces we skip as reflected, since the sender\n\t\t\t// doesn't know we skipped.\n\t\t\tconst history = new AnnounceHistory();\n\n\t\t\t// Receive announce updates (for Draft03, this includes initial state)\n\t\t\tfor (;;) {\n\t\t\t\tconst announce = await race([\n\t\t\t\t\tdecodeAnnounceBroadcastMaybe(stream.reader, this.version),\n\t\t\t\t\tannounced.closed,\n\t\t\t\t]);\n\t\t\t\t// undefined: the stream ended. null: the consumer closed cleanly.\n\t\t\t\tif (!announce) break;\n\t\t\t\tif (announce instanceof Error) throw announce;\n\n\t\t\t\tlet path: Path.Valid;\n\t\t\t\tlet active: boolean;\n\t\t\t\t// Present on active/restart; ended messages never carry hops worth checking.\n\t\t\t\tlet hops: Hop[] | undefined;\n\t\t\t\tlet cost: Cost | undefined;\n\n\t\t\t\tswitch (announce.status) {\n\t\t\t\t\tcase \"active\": {\n\t\t\t\t\t\tconst resolved = hasAnnounceId(this.version) ? history.start(announce) : announce;\n\t\t\t\t\t\t// The wire names the suffix beneath the interest prefix; the consumer\n\t\t\t\t\t\t// sees the covered path from the session root.\n\t\t\t\t\t\tpath = Path.join(prefix, resolved.suffix);\n\t\t\t\t\t\tactive = true;\n\t\t\t\t\t\thops = resolved.hops;\n\t\t\t\t\t\tcost = announce.cost;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"ended\":\n\t\t\t\t\t\tpath = Path.join(prefix, announce.suffix);\n\t\t\t\t\t\tactive = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"endedId\":\n\t\t\t\t\t\t// Resolve and retire the id; an unknown or retired id is a protocol violation.\n\t\t\t\t\t\tpath = Path.join(prefix, history.end(announce.id));\n\t\t\t\t\t\tactive = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"restart\": {\n\t\t\t\t\t\t// Resolve the id; it stays live (the replacement reuses it).\n\t\t\t\t\t\tconst resolved = history.update(announce);\n\t\t\t\t\t\tpath = Path.join(prefix, resolved.suffix);\n\t\t\t\t\t\tactive = true;\n\t\t\t\t\t\thops = resolved.hops;\n\t\t\t\t\t\tcost = announce.cost;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"skipped\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// One current advertisement per path per stream, decided before anything below\n\t\t\t\t// can skip this announcement. A second ANNOUNCE_START for a path the peer\n\t\t\t\t// already advertised is a violation whether or not its route would be usable\n\t\t\t\t// here, and whether or not we kept the first; letting a skip pre-empt it would\n\t\t\t\t// retract the live route and leave the stream open on a peer already out of\n\t\t\t\t// spec.\n\t\t\t\t//\n\t\t\t\t// lite-05 alone is exempt, where a duplicate ANNOUNCE *is* the replacement\n\t\t\t\t// idiom. lite-06 gave that its own message and older versions never had one, so\n\t\t\t\t// a duplicate means the same thing on both sides of it. Mirrors the branch the\n\t\t\t\t// Rust announce loop takes before `start_announce`.\n\t\t\t\tconst duplicateIsRestart = restartSupported(this.version) && !hasAnnounceId(this.version);\n\t\t\t\tif (announce.status === \"active\" && !duplicateIsRestart && advertised.has(path)) {\n\t\t\t\t\tthrow new ProtocolViolation(`duplicate announce for ${path}`);\n\t\t\t\t}\n\n\t\t\t\t// Retract the path: forget the advertisement, drop the shared consume entry so a\n\t\t\t\t// later announce subscribes fresh rather than cloning the dead generation's tracks,\n\t\t\t\t// and tell the consumer. A no-op for an advertisement never surfaced, which is\n\t\t\t\t// what an id retiring a skipped announce resolves to.\n\t\t\t\tconst retract = () => {\n\t\t\t\t\tconst previous = advertised.get(path);\n\t\t\t\t\tadvertised.delete(path);\n\t\t\t\t\tif (!previous?.live) return;\n\t\t\t\t\tthis.#consumes.evict(path);\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} active=false`);\n\t\t\t\t\tannounced.append({\n\t\t\t\t\t\tprefix: path,\n\t\t\t\t\t\tcaptures: previous.captures,\n\t\t\t\t\t\tkind: \"retracted\",\n\t\t\t\t\t\troute: previous.route,\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\t// In Lite05+ the sender's origin arrives via AnnounceOk, not in each hop\n\t\t\t\t// list, so fold it back in before checking.\n\t\t\t\tif (hops !== undefined) {\n\t\t\t\t\tconst full = responderOrigin !== undefined ? [...hops, responderOrigin] : hops;\n\t\t\t\t\tif (full.includes(this.hop)) {\n\t\t\t\t\t\t// A reflected restart means the peer's remaining route loops back through\n\t\t\t\t\t\t// us, so the route is gone even though the message says active. The\n\t\t\t\t\t\t// advertisement stays live: the peer still holds the path and its id still\n\t\t\t\t\t\t// resolves here.\n\t\t\t\t\t\tretract();\n\t\t\t\t\t\tadvertised.set(path, {\n\t\t\t\t\t\t\tpublisher: undefined,\n\t\t\t\t\t\t\tlive: false,\n\t\t\t\t\t\t\troute: { hops: full, cost: Cost.zero },\n\t\t\t\t\t\t\tcaptures: undefined,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!active) {\n\t\t\t\t\tretract();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// The first hop identifies the original publisher; an empty chain means the\n\t\t\t\t// peer itself originated it. One that names nobody (lite-01..03, or a peer\n\t\t\t\t// reporting 0) gets this connection's stamp in front of its 0.\n\t\t\t\tconst fullHops = stampHops(\n\t\t\t\t\thops !== undefined && responderOrigin !== undefined\n\t\t\t\t\t\t? [...hops, responderOrigin]\n\t\t\t\t\t\t: [...(hops ?? [])],\n\t\t\t\t\tthis.#stamp,\n\t\t\t\t);\n\t\t\t\t// Appending a withheld AnnounceOk(0) onto a 32-entry list is the same\n\t\t\t\t// drop Rust's Hops::push makes: do not expose an overlong chain.\n\t\t\t\tif (fullHops === undefined || fullHops.length > MAX_HOPS) {\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} dropped (hop chain at MAX_HOPS)`);\n\t\t\t\t\tadvertised.set(path, {\n\t\t\t\t\t\tpublisher: undefined,\n\t\t\t\t\t\tlive: false,\n\t\t\t\t\t\troute: { hops: [], cost: Cost.zero },\n\t\t\t\t\t\tcaptures: undefined,\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst publisher = fullHops[0];\n\t\t\t\tconst route: Route = { hops: fullHops, cost: cost ?? Cost.zero };\n\t\t\t\tconst captures = scopeCaptures(scope, path);\n\t\t\t\tif (!visible(path)) {\n\t\t\t\t\tadvertised.set(path, { publisher, live: false, route, captures });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// A second advertisement for a path we already carry is a restart: either an\n\t\t\t\t// explicit ANNOUNCE_UPDATE, or (lite-05) a duplicate ANNOUNCE. It updates the\n\t\t\t\t// route in place, so a forwarder re-prices without retracting.\n\t\t\t\tconst previous = advertised.get(path);\n\t\t\t\tif (previous?.live) {\n\t\t\t\t\t// A different publisher took the path. Subscriptions already open drain\n\t\t\t\t\t// the old copy, but the next consume starts fresh rather than reusing the\n\t\t\t\t\t// old publisher's cached track info.\n\t\t\t\t\tif (previous.publisher !== publisher) this.#consumes.evict(path);\n\t\t\t\t\tadvertised.set(path, { publisher, live: true, route, captures });\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} rerouted`);\n\t\t\t\t\tif (!routesEqual(previous.route, route)) {\n\t\t\t\t\t\tannounced.append({ prefix: path, captures, kind: \"updated\", route });\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tadvertised.set(path, { publisher, live: true, route, captures });\n\n\t\t\t\tconsole.debug(`announced: broadcast=${path} active=true`);\n\t\t\t\tannounced.append({ prefix: path, captures, kind: \"announced\", route });\n\t\t\t}\n\n\t\t\tannounced.close();\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\t// Reaches here on a protocol violation the peer committed (a second\n\t\t\t// advertisement for a live path, an unknown announce id) as well as on a\n\t\t\t// transport failure. Either way the peer has to be told: closing only our side\n\t\t\t// would leave it announcing into a stream nobody reads.\n\t\t\tstream.abort(e);\n\t\t\tannounced.close(e);\n\t\t\t// A violation ends the session, not just this stream, so a nonconforming peer\n\t\t\t// cannot repeat it on the next one. Matches `ietf::Subscriber` and the Rust\n\t\t\t// lite subscriber, where the announce half only ever ends the session on error.\n\t\t\tif (e instanceof ProtocolViolation) {\n\t\t\t\tthis.#quic.close({ closeCode: PROTOCOL_VIOLATION_CODE, reason: closeReason(reason(e)) });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Consumes a broadcast from the connection.\n\t *\n\t * Deduplicated per path: repeat calls for the same still-live path share one reference-counted\n\t * broadcast (and one upstream subscription). The shared broadcast closes once every caller has\n\t * closed its handle, so callers close normally.\n\t *\n\t * @param name - The name of the broadcast to consume\n\t * @returns A Broadcast instance\n\t */\n\tconsume(path: Path.Valid): broadcast.Consumer {\n\t\treturn this.#consumes.get(path) ?? this.#consumes.insert(path, this.#createConsume(path));\n\t}\n\n\t#createConsume(path: Path.Valid): broadcast.Consumer {\n\t\t// A consumed broadcast resolves info() and fetchGroup() over the wire by reaching\n\t\t// back into this Subscriber (see ConsumeBroadcast below), rather than the wire\n\t\t// installing callbacks on the broadcast.\n\t\tconst consumer = new ConsumeBroadcast(this, path);\n\n\t\tvoid (async () => {\n\t\t\tfor (;;) {\n\t\t\t\tconst request = await wireOf(consumer).requested();\n\t\t\t\tif (!request) break;\n\t\t\t\tvoid this.#runSubscribe(path, request);\n\t\t\t}\n\t\t})();\n\n\t\treturn consumer;\n\t}\n\n\tasync #runSubscribe(broadcast: Path.Valid, request: track.Request) {\n\t\tconst id = this.#subscribeNext++;\n\t\tconst subscription = request.subscription;\n\t\tconst initialBounds = groupBounds(subscription.groups);\n\t\tif (emptyRange({ startGroup: initialBounds.start, endGroup: initialBounds.end })) {\n\t\t\trequest.reject(new Error(EMPTY_RANGE));\n\t\t\treturn;\n\t\t}\n\n\t\t// `timescale` stays undefined until TRACK_INFO (or, on older drafts,\n\t\t// implicit defaults) resolves it; runGroup blocks on it before decoding.\n\t\tconst timescale = new Signal<number | undefined>(undefined);\n\n\t\tconsole.debug(`subscribe start: id=${id} broadcast=${broadcast} track=${request.name}`);\n\t\tconst bounds = groupBounds(subscription.groups);\n\n\t\tconst msg = new Subscribe({\n\t\t\tid,\n\t\t\tbroadcast,\n\t\t\ttrack: request.name,\n\t\t\tpriority: subscription.priority ?? 0,\n\t\t\tmaxAge: subscription.maxAge,\n\t\t\tstartGroup: subscription.groups?.start === undefined ? undefined : bounds.start,\n\t\t\tendGroup: inclusiveGroupEnd(bounds.end),\n\t\t});\n\n\t\t// Open the stream under a timeout. The stream handle flows back via `state`\n\t\t// so the timeout path can abort it if it finishes opening after the deadline.\n\t\tconst state: { stream?: Stream } = {};\n\t\tconst setup = this.#openSubscribe(state, msg, request, id, timescale);\n\n\t\tlet opened: { stream: Stream; entry: SubscribeEntry };\n\t\ttry {\n\t\t\topened = await withTimeout(\n\t\t\t\tsetup,\n\t\t\t\tSUBSCRIBE_SETUP_TIMEOUT_MS,\n\t\t\t\t`subscribe timed out after ${SUBSCRIBE_SETUP_TIMEOUT_MS}ms waiting for the first response (browser stream limit reached?)`,\n\t\t\t);\n\t\t\tconsole.debug(`subscribe ok: id=${id} broadcast=${broadcast} track=${request.name}`);\n\t\t} catch (err) {\n\t\t\t// The setup outlived its deadline waiting for the first response: a control\n\t\t\t// timeout, not content that arrived late.\n\t\t\tconst e = err instanceof TimeoutError ? controlTimeout(err) : await sessionCause(this.#quic, err);\n\t\t\trequest.reject(e);\n\t\t\tthis.#subscribes.delete(id);\n\t\t\tconsole.warn(`subscribe error: id=${id} broadcast=${broadcast} track=${request.name} error=${reason(e)}`);\n\t\t\t// If the stream eventually opens after the timeout, abort it so we\n\t\t\t// don't leak it. Cover both branches: setup may resolve late, or it\n\t\t\t// may reject (e.g. encode/decode failure) after the stream is open.\n\t\t\tsetup.then(\n\t\t\t\t() => state.stream?.abort(e),\n\t\t\t\t() => state.stream?.abort(e),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst { stream, entry } = opened;\n\t\tconst producer = entry.track;\n\t\ttry {\n\t\t\t// Watch for subscription changes and send SUBSCRIBE_UPDATE. Lite01/Lite02\n\t\t\t// don't carry SUBSCRIBE_UPDATE on the wire, so skip the watcher there\n\t\t\t// and just wait on the stream/track like before.\n\t\t\t//\n\t\t\t// On lite-05+ the publisher sends SUBSCRIBE_START/END/DROP on this stream until\n\t\t\t// its FIN; older drafts just close it. Either way group streams can still be in\n\t\t\t// flight, so the track ends only once the tail is accounted for. A reset rejects\n\t\t\t// instead, so the track ends with that error rather than a clean tail.\n\t\t\tconst responses = supportsTrackStream(this.version)\n\t\t\t\t? this.runResponses(stream, entry)\n\t\t\t\t: stream.reader.closed;\n\t\t\tconst closed = responses.then(() => this.#settleTail(entry));\n\t\t\t// A reset that lands after the race below settled is moot; the race observes one before.\n\t\t\tclosed.catch(() => {});\n\t\t\tconst subscriptionUpdates =\n\t\t\t\tthis.version === Version.DRAFT_01 || this.version === Version.DRAFT_02\n\t\t\t\t\t? undefined\n\t\t\t\t\t: this.#runSubscriptionUpdates(id, broadcast, entry, msg, stream);\n\n\t\t\t// Terminal conditions (stream end, track close, a failed subscription update) settle at most\n\t\t\t// once; race them into one stable promise so the demand loop doesn't re-subscribe each pass.\n\t\t\t// Updates stop quietly at the FIN, which can land before the responses ahead of it are\n\t\t\t// decoded, so only their failure is terminal on its own.\n\t\t\tconst terminal: PromiseLike<unknown>[] = [closed, producer.closed];\n\t\t\tif (subscriptionUpdates !== undefined) terminal.push(subscriptionUpdates.then(() => closed));\n\t\t\tconst done = race(terminal);\n\n\t\t\t// Serve until a terminal condition fires or the last local subscriber leaves. The unused\n\t\t\t// wake is level-triggered: re-check demand so a subscriber that returns before we tear\n\t\t\t// down (e.g. a quickly unmuted tile) resumes on the same subscription.\n\t\t\tconst idle = Symbol(\"idle\");\n\t\t\tfor (;;) {\n\t\t\t\tconst reason = await race([done, producer.unused().then(() => idle)]);\n\t\t\t\tif (reason === idle && producer.closed.peek() === undefined && producer.used.peek()) continue;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tproducer.close();\n\t\t\tstream.close();\n\t\t\tconsole.debug(`subscribe close: id=${id} broadcast=${broadcast} track=${request.name}`);\n\t\t} catch (err) {\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\tproducer.close(e);\n\t\t\tconsole.warn(`subscribe error: id=${id} broadcast=${broadcast} track=${request.name} error=${reason(e)}`);\n\t\t\tstream.abort(e);\n\t\t} finally {\n\t\t\tthis.#subscribes.delete(id);\n\t\t}\n\t}\n\n\t// Determine the track's immutable properties, accept the request (so the\n\t// application's track.Subscriber resolves and incoming groups have a producer to\n\t// write into), register it, then open the subscribe stream. `state.stream` is\n\t// populated as soon as the subscribe stream opens so the caller can clean it up\n\t// on timeout even before this promise settles.\n\t//\n\t// On lite-05+ the properties come from a TRACK stream opened first, and the\n\t// SUBSCRIBE is accepted implicitly (no SUBSCRIBE_OK). Older drafts carry no\n\t// per-track properties, so they resolve to defaults and just drain SUBSCRIBE_OK.\n\tasync #openSubscribe(\n\t\tstate: { stream?: Stream },\n\t\tmsg: Subscribe,\n\t\trequest: track.Request,\n\t\tid: bigint,\n\t\ttimescale: Signal<number | undefined>,\n\t): Promise<{ stream: Stream; entry: SubscribeEntry }> {\n\t\tlet producer: track.Producer;\n\t\tlet drainOk = false;\n\n\t\tif (supportsTrackStream(this.version)) {\n\t\t\t// Fetch the immutable properties once via the TRACK stream.\n\t\t\tconst info = await this.#trackInfo(msg.broadcast, msg.track);\n\t\t\tproducer = request.accept(this.#toModelInfo(info));\n\t\t\ttimescale.set(info.timescale);\n\t\t} else {\n\t\t\t// Older drafts negotiate nothing per-track: verbatim frames, no timescale.\n\t\t\tproducer = request.accept();\n\t\t\ttimescale.set(0);\n\t\t\tdrainOk = true;\n\t\t}\n\n\t\t// Register before opening SUBSCRIBE so a racing GROUP stream finds the entry.\n\t\tconst entry: SubscribeEntry = {\n\t\t\ttrack: producer,\n\t\t\ttimescale,\n\t\t\t// The effective max age is the stopgap grace: the wrong clock (it bounds\n\t\t\t// presentation-time drift), but it is how long the subscriber was willing to wait\n\t\t\t// for a late group anyway. Already the smaller of the subscriber's and the track's.\n\t\t\ttail: new Tail({\n\t\t\t\tgrace: () => {\n\t\t\t\t\tconst maxAge = producer.subscription.peek()?.maxAge ?? Time.Milli.zero;\n\t\t\t\t\treturn maxAge > 0 ? maxAge : TAIL_GRACE_MS;\n\t\t\t\t},\n\t\t\t}),\n\t\t\trequested: msg.startGroup,\n\t\t};\n\t\tthis.#subscribes.set(id, entry);\n\n\t\tstate.stream = await Stream.open(this.#quic, { version: this.version });\n\t\tawait state.stream.writer.u53(StreamId.Subscribe);\n\t\tawait msg.encode(state.stream.writer, this.version);\n\n\t\tif (drainOk) {\n\t\t\t// The first response MUST be a SUBSCRIBE_OK (older drafts only).\n\t\t\tconst resp = await decodeSubscribeResponse(state.stream.reader, this.version);\n\t\t\tif (!(\"ok\" in resp)) {\n\t\t\t\tthrow new Error(\"first subscribe response must be SUBSCRIBE_OK\");\n\t\t\t}\n\t\t}\n\n\t\treturn { stream: state.stream, entry };\n\t}\n\n\t// Opens a TRACK stream, reads the single TRACK_INFO, and FINs. Lite-05+ only.\n\tasync #trackInfo(broadcast: Path.Valid, track: string): Promise<TrackInfo> {\n\t\treturn this.#exchange({ version: this.version }, async (stream) => {\n\t\t\tawait stream.writer.u53(StreamId.Track);\n\t\t\tawait new TrackMessage(broadcast, track).encode(stream.writer, this.version);\n\t\t\tconst info = await TrackInfo.decode(stream.reader, this.version);\n\t\t\t// The publisher FINs after TRACK_INFO; FIN our side too.\n\t\t\tstream.close();\n\t\t\treturn info;\n\t\t});\n\t}\n\n\t// Opens a stream and runs a request/response exchange on it, resetting the stream if `run`\n\t// fails. Subscriber.close() also resets it while `run` is pending, so a peer that never\n\t// answers cannot hold it open, and a stream that opens after the close is reset at once.\n\tasync #exchange<T>(options: OpenOptions, run: (stream: Stream) => Promise<T>): Promise<T> {\n\t\tconst closed = this.#closed.signal;\n\t\tclosed.throwIfAborted();\n\t\tconst stream = await Stream.open(this.#quic, options);\n\t\tconst abort = () => stream.abort(error(closed.reason));\n\t\tclosed.addEventListener(\"abort\", abort);\n\t\ttry {\n\t\t\tclosed.throwIfAborted();\n\t\t\treturn await run(stream);\n\t\t} catch (err) {\n\t\t\tstream.abort(error(err));\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tclosed.removeEventListener(\"abort\", abort);\n\t\t}\n\t}\n\n\t// Map the wire TRACK_INFO onto the model track.Info a producer/consumer holds.\n\t#toModelInfo(info: TrackInfo): track.Info {\n\t\treturn {\n\t\t\ttimescale: Time.Timescale(info.timescale),\n\t\t\t// Publisher Max Age rides on the wire, so the local retention window\n\t\t\t// matches what the upstream advertises (relays re-serve with the same bound).\n\t\t\tmaxAge: Time.Milli(info.maxAge),\n\t\t\tpriority: info.priority,\n\t\t};\n\t}\n\n\t// Resolve a track's immutable model info via a TRACK stream (lite-05+), for the\n\t// ConsumeBroadcast backing track.Consumer.query(). On older drafts there's no TRACK\n\t// stream, so this rejects rather than fabricating defaults.\n\tasync resolveTrackInfo(broadcast: Path.Valid, track: string): Promise<track.Info> {\n\t\tif (!supportsTrackStream(this.version)) {\n\t\t\tthrow new Error(\"track info requires moq-lite-05 or newer\");\n\t\t}\n\t\treturn this.#toModelInfo(await this.#trackInfo(broadcast, track));\n\t}\n\n\t// Open a FETCH stream for one group and stream its bare frames into a group, for the\n\t// ConsumeBroadcast backing track.Consumer.fetchGroup() (lite-05+).\n\tasync fetchGroup(\n\t\tbroadcast: Path.Valid,\n\t\ttrack: string,\n\t\tsequence: number,\n\t\toptions: track.FetchGroupOptions = {},\n\t): Promise<netGroup.Consumer> {\n\t\toptions.signal?.throwIfAborted();\n\n\t\t// Coalesce onto a still-open fetch of the same group so we don't open a second FETCH\n\t\t// stream (and re-download it); each caller reads an independent mirror.\n\t\t//\n\t\t// Reserve each caller's mirror before the fetch starts or is awaited: the fetch watches\n\t\t// demand from the start, and a fast FIN cannot discard frames before these callers\n\t\t// receive their handles. An abort closes only this caller's mirror, so the stream is\n\t\t// cancelled once the last one leaves.\n\t\tconst key = JSON.stringify([broadcast, track, sequence]);\n\t\tlet entry = this.#fetches.get(key);\n\t\tlet consumer: netGroup.Consumer;\n\t\tif (entry && !entry.group.isClosed) {\n\t\t\tconsumer = entry.group.mirror();\n\t\t} else {\n\t\t\tconst group = new netGroup.Producer(sequence);\n\t\t\tconsumer = group.mirror();\n\t\t\tentry = { group, accepted: this.#runFetch(broadcast, track, sequence, options.priority ?? 0, group) };\n\t\t\tthis.#fetches.set(key, entry);\n\t\t\tvoid group.closed.then(() => {\n\t\t\t\tif (this.#fetches.get(key)?.group === group) this.#fetches.delete(key);\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tawait untilAborted(entry.accepted, options.signal);\n\t\t\treturn consumer;\n\t\t} catch (err) {\n\t\t\tconsumer.close();\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t// Open the FETCH stream and pump the response into the shared group. Setup errors close the\n\t// group, evict the entry, and reject every caller waiting for acceptance. A setup every caller\n\t// has abandoned is cancelled the same way.\n\tasync #runFetch(\n\t\tbroadcast: Path.Valid,\n\t\ttrack: string,\n\t\tsequence: number,\n\t\tpriority: number,\n\t\tgroup: netGroup.Producer,\n\t): Promise<void> {\n\t\ttry {\n\t\t\tif (!supportsTrackStream(this.version)) {\n\t\t\t\tthrow new Error(\"fetch group requires moq-lite-05 or newer\");\n\t\t\t}\n\n\t\t\t// Lite has no FETCH_OK, so a publisher that never answers would hold the setup forever.\n\t\t\t// Subscriber.close() closing the group releases every caller at any stage, and resets\n\t\t\t// the streams the setup opened.\n\t\t\tconst setup = this.#fetchSetup(broadcast, track, sequence, priority, group);\n\t\t\tlet accepted: { stream: Stream; info: TrackInfo };\n\t\t\ttry {\n\t\t\t\taccepted = await untilAbandoned(group, setup);\n\t\t\t} catch (err: unknown) {\n\t\t\t\t// A setup that finishes just after the close hands back a stream nobody will read.\n\t\t\t\tvoid setup.then(\n\t\t\t\t\t({ stream }) => stream.abort(error(err)),\n\t\t\t\t\t() => void 0,\n\t\t\t\t);\n\t\t\t\tthrow err;\n\t\t\t}\n\n\t\t\tvoid this.#runFetchResponse(accepted.stream, group, Time.Timescale(accepted.info.timescale));\n\t\t} catch (err: unknown) {\n\t\t\tgroup.close(error(err));\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t// Resolve the track's timescale, then open the FETCH stream and wait for it to be accepted.\n\t// Closing the group during that wait resets the stream.\n\tasync #fetchSetup(\n\t\tbroadcast: Path.Valid,\n\t\ttrack: string,\n\t\tsequence: number,\n\t\tpriority: number,\n\t\tgroup: netGroup.Producer,\n\t): Promise<{ stream: Stream; info: TrackInfo }> {\n\t\tconst info = await untilClosed(group, this.#trackInfo(broadcast, track));\n\t\treturn this.#exchange({ sendOrder: sendOrder({ priority }), version: this.version }, async (stream) => {\n\t\t\tawait stream.writer.u53(StreamId.Fetch);\n\t\t\tawait new FetchMessage({ broadcast, track, priority, group: sequence }).encode(stream.writer, this.version);\n\t\t\t// A byte or an empty-group FIN accepts the fetch; a reset rejects it.\n\t\t\t// done() buffers that byte so the response pump can decode it normally.\n\t\t\tawait untilClosed(group, stream.reader.done());\n\t\t\treturn { stream, info };\n\t\t});\n\t}\n\n\t// Read the FETCH response (bare zigzag-delta-timestamped frames) into the group, then\n\t// FIN. A stream-level failure aborts the group so its reader observes the gap.\n\tasync #runFetchResponse(stream: Stream, group: netGroup.Producer, timescale: Time.Timescale): Promise<void> {\n\t\ttry {\n\t\t\tconst decode = frameDecoder(timescale);\n\n\t\t\t// Serve until the stream FINs, the group closes, or every reader leaves. A group can\n\t\t\t// stay open indefinitely (a catalog or JSON stream), so an abandoned fetch is stopped by\n\t\t\t// demand, not by the stream ending. `unused` is watched across frames as one stable\n\t\t\t// promise; the check is level-triggered, so a coalesced fetch that arrives before we\n\t\t\t// cancel re-arms and resumes.\n\t\t\tconst idle: unique symbol = Symbol(\"idle\");\n\t\t\tlet unused = group.unused().then((): typeof idle => idle);\n\t\t\t// A decode consumes its frame whenever it lands, so one outstanding across a re-arm is\n\t\t\t// kept and awaited again rather than abandoned with its frame.\n\t\t\tlet pending: Promise<netGroup.Frame | undefined> | undefined;\n\t\t\tfor (;;) {\n\t\t\t\t// Buffered frames are written without an await, as in a group stream.\n\t\t\t\tlet frame = pending === undefined ? stream.reader.tryDecode(decode) : undefined;\n\t\t\t\tif (!frame) {\n\t\t\t\t\tpending ??= stream.reader.decodeMaybe(decode);\n\t\t\t\t\tconst next = await race([pending, group.closed, unused]);\n\t\t\t\t\tif (next === idle) {\n\t\t\t\t\t\tif (group.isClosed) break;\n\t\t\t\t\t\tif (group.used.peek()) {\n\t\t\t\t\t\t\tunused = group.unused().then((): typeof idle => idle);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Abandoned mid-group: the truncated group must never end clean.\n\t\t\t\t\t\tthrow new StreamError(StreamCode.Cancel, { message: \"cancel\" });\n\t\t\t\t\t}\n\t\t\t\t\tpending = undefined;\n\t\t\t\t\tif (!next || next instanceof Error) break;\n\t\t\t\t\tframe = next;\n\t\t\t\t}\n\t\t\t\tgroup.writeFrame(frame);\n\t\t\t}\n\n\t\t\tgroup.close();\n\t\t\tstream.close();\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\tgroup.close(e);\n\t\t\tstream.abort(e);\n\t\t}\n\t}\n\n\t// Reads SUBSCRIBE_START/END/DROP on the subscribe stream until FIN (lite-05+), recording\n\t// the range the tail is accounted against. SUBSCRIBE_END declares the track's end right\n\t// away, so a consumer learns it before the last groups arrive. The publisher must declare\n\t// the end before FIN unless we cancelled locally; resets and malformed responses reject.\n\tprivate async runResponses(stream: Stream, entry: SubscribeEntry): Promise<void> {\n\t\tfor (;;) {\n\t\t\tconst resp = await decodeSubscribeResponseMaybe(stream.reader, this.version);\n\t\t\tif (!resp) {\n\t\t\t\tif (entry.end === undefined && entry.track.closed.peek() === undefined)\n\t\t\t\t\tthrow new ProtocolViolation(\"subscribe stream ended without SUBSCRIBE_END\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\"start\" in resp) {\n\t\t\t\tentry.start = resp.start.group;\n\t\t\t\t// The groups the SUBSCRIBE asked for below it are not waited for, whatever the\n\t\t\t\t// demand asks later. One that still arrives is delivered.\n\t\t\t\tif (entry.requested !== undefined) entry.tail.account(entry.requested, entry.start);\n\t\t\t} else if (\"end\" in resp) {\n\t\t\t\tif (entry.end !== undefined) throw new ProtocolViolation(\"duplicate SUBSCRIBE_END\");\n\t\t\t\tentry.end = resp.end.group;\n\t\t\t\tif (hasStreamCount(this.version)) entry.streams = resp.end.streams;\n\t\t\t\t// A local close can win the race with the response; there is nothing left to end.\n\t\t\t\tif (entry.track.closed.peek() !== undefined) continue;\n\t\t\t\ttry {\n\t\t\t\t\tentry.track.finishAt(entry.end);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// lite-05 specified an inclusive end, and @moq/net 0.1.3 to 0.1.9 sent one, so\n\t\t\t\t\t// there an end below a received group only costs the early boundary: the FIN\n\t\t\t\t\t// still finishes the track. Later drafts made it exclusive.\n\t\t\t\t\tif (this.version !== Version.DRAFT_05) {\n\t\t\t\t\t\tthrow new ProtocolViolation(`invalid SUBSCRIBE_END: ${reason(error(err))}`);\n\t\t\t\t\t}\n\t\t\t\t\tconsole.warn(`invalid SUBSCRIBE_END: ${reason(error(err))}`);\n\t\t\t\t}\n\t\t\t} else if (\"drop\" in resp) {\n\t\t\t\tentry.tail.account(resp.drop.start, resp.drop.end + 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Wait for the group streams the publisher still owes once it has ended the subscription.\n\t//\n\t// lite-07 counts streams, so skipped sequences owe nothing. Older drafts account for\n\t// the range using received headers and SUBSCRIBE_DROP. A counted stream reset before\n\t// its header leaves no trace, so the grace still bounds that wait. Streams whose\n\t// headers arrived keep reading until their own FIN or reset.\n\t#settleTail(entry: SubscribeEntry): Promise<void> {\n\t\tconst { tail, track } = entry;\n\n\t\tconst complete = () => {\n\t\t\tif (entry.streams !== undefined) return tail.streams >= entry.streams;\n\t\t\t// Without SUBSCRIBE_END (older drafts) nothing says which groups are owed.\n\t\t\tif (entry.end === undefined) return false;\n\t\t\t// Without SUBSCRIBE_START the publisher served no group at all.\n\t\t\tif (entry.start === undefined) return true;\n\t\t\t// Owed from the floor the demand last asked for, which an update can move either\n\t\t\t// way, or where SUBSCRIBE_START resolved a live-edge one. The groups the SUBSCRIBE\n\t\t\t// asked for below its SUBSCRIBE_START were accounted for when it arrived.\n\t\t\tconst groups = track.subscription.peek()?.groups;\n\t\t\tconst bounds = groupBounds(groups ?? {});\n\t\t\tconst start = groups?.start === undefined ? entry.start : bounds.start;\n\t\t\tconst end = bounds.end === undefined ? entry.end : Math.min(entry.end, bounds.end);\n\t\t\treturn tail.covers(start, end);\n\t\t};\n\n\t\treturn tail.settle(complete, track.closed);\n\t}\n\n\t/**\n\t * Send SUBSCRIBE_UPDATE messages whenever the track's aggregate subscription changes.\n\t *\n\t * Resolves cleanly when the stream or track closes, so the caller can include\n\t * this in a race without leaving a dangling pending write that would\n\t * become an unhandled rejection if the user calls update after close.\n\t *\n\t * Peeks the signal at the top of every iteration so that updates which landed\n\t * before SubscribeOk arrived (or between iterations, before .next() registered\n\t * its listener) aren't lost.\n\t */\n\tasync #runSubscriptionUpdates(\n\t\tid: bigint,\n\t\tbroadcast: Path.Valid,\n\t\tentry: SubscribeEntry,\n\t\tmsg: Subscribe,\n\t\tstream: Stream,\n\t): Promise<void> {\n\t\tconst track = entry.track;\n\t\tconst stopped: Promise<null> = race([track.closed, stream.reader.closed]).then(() => null);\n\t\tlet lastSent: track.Subscription = {\n\t\t\tpriority: msg.priority,\n\t\t\tmaxAge: Time.Milli(msg.maxAge),\n\t\t\tgroups: {\n\t\t\t\tstart: msg.startGroup === undefined ? undefined : { included: msg.startGroup },\n\t\t\t\tend: msg.endGroup === undefined ? undefined : { excluded: exclusiveGroupEnd(msg.endGroup) ?? 0 },\n\t\t\t},\n\t\t};\n\n\t\tfor (;;) {\n\t\t\tconst current = track.subscription.peek();\n\t\t\tif (current === undefined || this.#sameSubscription(current, lastSent)) {\n\t\t\t\t// Nothing new to send; wait for a change or termination.\n\t\t\t\tconst next = await race([track.subscription.changed(), stopped]);\n\t\t\t\tif (next === null) return;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Demand collapsing to nothing is refused the same way an initial empty\n\t\t\t// request is: the error closes the track, so every local subscriber sees it.\n\t\t\tconst bounds = groupBounds(current.groups);\n\t\t\tif (emptyRange({ startGroup: bounds.start, endGroup: bounds.end })) throw new Error(EMPTY_RANGE);\n\n\t\t\t// A lowered floor owes groups nobody asked for until now.\n\t\t\tif (current.groups?.start !== undefined) {\n\t\t\t\tconst floor = lastSent.groups?.start === undefined ? entry.start : groupBounds(lastSent.groups).start;\n\t\t\t\tentry.tail.demand(bounds.start, floor ?? Number.POSITIVE_INFINITY);\n\t\t\t}\n\n\t\t\t// Round-trip the other Subscribe parameters so the publisher doesn't\n\t\t\t// interpret SUBSCRIBE_UPDATE as a reset of ordered/maxAge/etc.\n\t\t\tconst update = new SubscribeUpdate({\n\t\t\t\tpriority: current.priority ?? 0,\n\t\t\t\tmaxAge: current.maxAge,\n\t\t\t\tstartGroup: current.groups?.start === undefined ? undefined : bounds.start,\n\t\t\t\tendGroup: inclusiveGroupEnd(bounds.end),\n\t\t\t});\n\t\t\tawait update.encode(stream.writer, this.version);\n\t\t\tlastSent = { ...current };\n\t\t\tconsole.debug(`subscribe update: id=${id} broadcast=${broadcast} track=${track.name}`);\n\t\t}\n\t}\n\n\t#sameSubscription(a: track.Subscription, b: track.Subscription): boolean {\n\t\tconst ag = groupBounds(a.groups);\n\t\tconst bg = groupBounds(b.groups);\n\t\t// `groupBounds` reads an omitted start as 0. A pre-06 wire tells them apart: omitted\n\t\t// joins at the publisher's start, and 0 is group 0. Lite-06 encodes both as 0.\n\t\tconst sameStart =\n\t\t\tresolvesStart(this.version) || (a.groups?.start === undefined) === (b.groups?.start === undefined);\n\t\treturn (\n\t\t\t(a.priority ?? 0) === (b.priority ?? 0) &&\n\t\t\t(a.maxAge ?? 0) === (b.maxAge ?? 0) &&\n\t\t\tsameStart &&\n\t\t\tag.start === bg.start &&\n\t\t\tag.end === bg.end\n\t\t);\n\t}\n\n\t/**\n\t * Handles a group message.\n\t * @param group - The group message\n\t * @param stream - The stream to read frames from\n\t *\n\t * @internal\n\t */\n\tasync runGroup(group: GroupMessage, stream: Reader) {\n\t\tconst entry = this.#subscribes.get(group.subscribe);\n\t\tif (!entry) {\n\t\t\tif (group.subscribe >= this.#subscribeNext) {\n\t\t\t\tthrow new Error(`unknown subscription: id=${group.subscribe}`);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// This reader cannot preserve a partial group's frame indices, so refuse it before\n\t\t// publishing anything that would number its first received frame as zero.\n\t\tif (group.frameStart !== 0) {\n\t\t\tthrow new ProtocolViolation(`group ${group.sequence} starts at frame ${group.frameStart}`);\n\t\t}\n\n\t\tconst { track, timescale, tail } = entry;\n\t\tconst producer = new netGroup.Producer(group.sequence);\n\t\tconst read = tail.open(group.sequence);\n\n\t\ttry {\n\t\t\t// The publisher contradicted its own end, which no later group can repair. lite-05\n\t\t\t// specified an inclusive end, so its last group lands on it: the write below drops\n\t\t\t// only that group there.\n\t\t\tif (entry.end !== undefined && group.sequence >= entry.end && this.version !== Version.DRAFT_05) {\n\t\t\t\tconst violation = new ProtocolViolation(\n\t\t\t\t\t`group ${group.sequence} is at or past the declared end ${entry.end}`,\n\t\t\t\t);\n\t\t\t\ttrack.close(violation);\n\t\t\t\tthrow violation;\n\t\t\t}\n\t\t\ttrack.writeGroup(producer);\n\n\t\t\t// Block until the timescale is known; the group's stream can arrive before\n\t\t\t// TRACK_INFO (or implicit defaults) resolves it on the subscribe stream.\n\t\t\tlet scale = timescale.peek();\n\t\t\twhile (scale === undefined) {\n\t\t\t\tif (track.closed.peek() !== undefined) {\n\t\t\t\t\t// Subscription ended before the scale resolved; nothing to decode.\n\t\t\t\t\tproducer.close();\n\t\t\t\t\tstream.stop(new StreamError(StreamCode.Cancel, { message: \"cancel\" }));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tawait Signal.race(timescale, track.closed);\n\t\t\t\tscale = timescale.peek();\n\t\t\t}\n\n\t\t\tawait readFrames(stream, producer, scale);\n\n\t\t\tproducer.close();\n\t\t\tstream.stop(new StreamError(StreamCode.Cancel, { message: \"cancel\" }));\n\t\t} catch (err: unknown) {\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\tproducer.close(e);\n\t\t\tstream.stop(e);\n\t\t} finally {\n\t\t\tread();\n\t\t}\n\t}\n\n\t/**\n\t * Receives QUIC datagrams and routes each to its subscription's track producer (lite-05 §6.4).\n\t *\n\t * Returns immediately on a non-datagram transport or pre-lite-05 version. A decode error or an\n\t * unknown subscribe id drops that datagram without tearing down the session (best-effort); the\n\t * loop ends only when the datagram stream closes.\n\t *\n\t * @internal\n\t */\n\tasync runDatagrams(): Promise<void> {\n\t\tif (!hasDatagrams(this.version) || DatagramStream.maxDatagramSize(this.#quic) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Never reject: this loop is awaited alongside the connection's other tasks, so a\n\t\t// datagram-stream failure must not tear the whole session down (it's best-effort).\n\t\tconst reader = DatagramStream.datagramReader(this.#quic);\n\t\tif (!reader) return;\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tfor (;;) {\n\t\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\t\tif (done) break;\n\t\t\t\t\tif (!value) continue;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.#routeDatagram(value);\n\t\t\t\t\t} catch (err: unknown) {\n\t\t\t\t\t\tconsole.debug(`dropping datagram: ${reason(err)}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\treader.releaseLock();\n\t\t\t}\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\tif (e.message === \"The session is closed.\") {\n\t\t\t\tconsole.debug(`datagram receive stopped: ${e.message}`);\n\t\t\t} else {\n\t\t\t\tconsole.warn(\"datagram stream error\", err);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Decode one datagram body and hand it to the matching subscription's producer. Drops the\n\t// datagram (best-effort) if the subscription is unknown/closed or its timescale isn't resolved.\n\tasync #routeDatagram(payload: Uint8Array): Promise<void> {\n\t\tconst dg = await DatagramMessage.decode(payload, this.version);\n\n\t\tconst entry = this.#subscribes.get(dg.subscribe);\n\t\tif (!entry) return; // Unknown or already-closed subscription.\n\n\t\t// Datagrams are lite-05+, which always negotiates a timescale; if it hasn't resolved\n\t\t// yet (the datagram raced ahead of TRACK_INFO), drop rather than guess.\n\t\tconst scale = entry.timescale.peek();\n\t\tif (!scale) return;\n\n\t\tconst timestamp = new Time.Timestamp(dg.timestamp, Time.Timescale(scale));\n\t\t// A datagram's sequence is never owed a stream, so it never holds the tail open.\n\t\tentry.tail.account(dg.sequence, dg.sequence + 1);\n\t\tentry.track.insertDatagram(dg.sequence, timestamp, dg.payload);\n\t}\n\n\t/**\n\t * Opens a PROBE bidi stream to receive bandwidth estimates from the publisher.\n\t * Returns immediately if recv bandwidth is not supported.\n\t *\n\t * Probe is best-effort telemetry: a stream-level failure (peer reset, FIN,\n\t * missing peer support, transport hiccup) is caught and logged, never\n\t * propagated to the connection. On exit the bandwidth/RTT signals are\n\t * cleared so consumers see them as stale.\n\t *\n\t * @internal\n\t */\n\t// Await the peer's advertised probe level, blocking until its SETUP arrives. The peer\n\t// MUST send exactly one SETUP, so this resolves once that stream is read.\n\tasync #peerProbeLevel(peerSetup: Signal<Setup | undefined>): Promise<ProbeLevel> {\n\t\tlet setup = peerSetup.peek();\n\t\twhile (setup === undefined) {\n\t\t\tsetup = await peerSetup.changed();\n\t\t}\n\t\treturn setup.probe;\n\t}\n\n\tasync runProbe(): Promise<void> {\n\t\tif (!this.#probe) return;\n\t\tif (this.version === Version.DRAFT_01 || this.version === Version.DRAFT_02) return;\n\n\t\t// Lite-05+ gates the PROBE stream on the peer advertising Probe >= Report in its\n\t\t// SETUP. Wait for the SETUP, then bail if the peer can't report bitrate. Older\n\t\t// drafts have no SETUP, so they keep probing unconditionally.\n\t\tif (this.#peerSetup) {\n\t\t\tconst probe = await this.#peerProbeLevel(this.#peerSetup);\n\t\t\tif (probe < ProbeLevel.Report) return;\n\t\t}\n\n\t\t// Probe is best-effort: any failure (stream reset by peer, missing peer support,\n\t\t// transport hiccup) MUST NOT tear down the connection. On error, drop the\n\t\t// estimates so consumers know they're stale.\n\t\ttry {\n\t\t\tconst stream = await Stream.open(this.#quic, { version: this.version });\n\t\t\tawait stream.writer.u53(StreamId.Probe);\n\n\t\t\tfor (;;) {\n\t\t\t\tconst probe = await Probe.decodeMaybe(stream.reader, this.version);\n\t\t\t\tif (!probe) break;\n\t\t\t\t// lite-03 carries no RTT field, so an absent value there means \"not\n\t\t\t\t// carried\" and the last reading stands. From lite-04 the field is\n\t\t\t\t// always present and 0 explicitly means unknown, so undefined is the\n\t\t\t\t// peer retracting a value we would otherwise hold forever.\n\t\t\t\tconst prev = this.#probe.peek();\n\t\t\t\tconst rtt = probe.rtt !== undefined ? Time.Milli(probe.rtt) : undefined;\n\t\t\t\tthis.#probe.set({\n\t\t\t\t\t// `undefined` is the peer reporting \"unknown\", not an estimate of\n\t\t\t\t\t// zero; letting it through would become a real 0 bps ABR target.\n\t\t\t\t\testimatedRecvRate: probe.bitrate,\n\t\t\t\t\trtt: hasProbeRtt(this.version) ? rtt : (rtt ?? prev.rtt),\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (err: unknown) {\n\t\t\tif (!this.#closed.signal.aborted) {\n\t\t\t\tconsole.warn(\"probe stream error\", err);\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.#probe.set({});\n\t\t}\n\t}\n\n\t/**\n\t * Ends every subscribed track: cleanly for a deliberate close, or with `err` when the\n\t * session died, since those tracks were cut off rather than ended.\n\t */\n\tclose(err?: Error) {\n\t\t// A fetch or setup exchange cut off by the session is incomplete even on a deliberate\n\t\t// close, so it always ends with an error.\n\t\tconst cut = err ?? new StreamError(StreamCode.SessionClosed, { message: \"session closed\" });\n\t\tthis.#closed.abort(cut);\n\n\t\tfor (const { track } of this.#subscribes.values()) {\n\t\t\ttrack.close(err);\n\t\t}\n\n\t\tthis.#subscribes.clear();\n\n\t\t// This also releases callers still awaiting acceptance.\n\t\tfor (const { group } of this.#fetches.values()) {\n\t\t\tgroup.close(cut);\n\t\t}\n\t}\n}\n\n// Settles with `step`, or rejects with the group's error once it closes first. A publisher\n// may never answer a FETCH, so Subscriber.close() closing the group is what releases it.\nasync function untilClosed<T>(group: netGroup.Producer, step: Promise<T>): Promise<T> {\n\tconst value = await race([step, group.closed]);\n\tconst closed = group.closed.peek();\n\tif (closed !== undefined) throw closed ?? new Error(\"fetch closed before it was accepted\");\n\treturn value as T;\n}\n\n// Like untilClosed, but also cancels once every reader has left. Demand is level-triggered, so a\n// caller that coalesces onto the group before the check re-arms it.\nasync function untilAbandoned<T>(group: netGroup.Producer, step: Promise<T>): Promise<T> {\n\tconst idle: unique symbol = Symbol(\"idle\");\n\tfor (;;) {\n\t\tconst value = await untilClosed(group, race([step, group.unused().then((): typeof idle => idle)]));\n\t\tif (value !== idle) return value as T;\n\t\tif (!group.used.peek()) throw new StreamError(StreamCode.Cancel, { message: \"cancel\" });\n\t}\n}\n\n/**\n * A broadcast consumed from a lite session. It resolves `track.Consumer.query()` and\n * `.fetchGroup()` over the wire (lite-05+ TRACK / FETCH streams) by reaching into the\n * {@link Subscriber} it was opened from, the way the Rust `BroadcastConsumer` holds its\n * session. Live subscribes still flow through the inherited requested() queue.\n */\nclass ConsumeBroadcast extends broadcast.Consumer {\n\t#subscriber: Subscriber;\n\t#path: Path.Valid;\n\n\tconstructor(subscriber: Subscriber, path: Path.Valid, state?: never) {\n\t\tsuper(state);\n\t\toverrideBroadcastWire(this, {\n\t\t\tresolveTrackInfo: (name) => subscriber.resolveTrackInfo(path, name),\n\t\t\tfetchGroup: (name, sequence, options) => subscriber.fetchGroup(path, name, sequence, options),\n\t\t});\n\t\tthis.#subscriber = subscriber;\n\t\tthis.#path = path;\n\t}\n\n\t// Preserve the subclass (and its wire-backed info/fetchGroup) when the consume cache shares\n\t// this broadcast across callers.\n\toverride clone(): ConsumeBroadcast {\n\t\treturn new ConsumeBroadcast(this.#subscriber, this.#path, this.shareState());\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"subscriber.js","sourceRoot":"","sources":["../../src/lite/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAgB,MAAM,EAAgC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtG,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAG5C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,UA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,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAClD,IAAI,GAAG,CAAC,KAAK;QAAE,OAAO,GAAG,CAAC,QAAQ,CAAC;IACnC,OAAO,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["import { Duration, yieldNow } from \"@moq/clock\";\nimport { type Dispose, Effect, type GetPromise, type Getter, Once, race, Signal } from \"@moq/signals\";\nimport * as announce from \"../announced.ts\";\nimport type { Grant } from \"../auth.ts\";\nimport type { AuthSession } from \"../auth_session.ts\";\nimport * as broadcast from \"../broadcast.ts\";\nimport type { Goaway as Received } from \"../connection/goaway.ts\";\nimport type { Probe as ProbeStats } from \"../connection/stats.ts\";\nimport { BroadcastCache } from \"../consume.ts\";\nimport type * as datagram from \"../datagram.ts\";\nimport * as DatagramStream from \"../datagram_stream.ts\";\nimport type { JoinAsk } from \"../demand.ts\";\nimport { samePlaced } from \"../demand.ts\";\nimport {\n\tcloseError,\n\terror,\n\tfromTransport,\n\tNotFound,\n\tProtocolViolation,\n\treason,\n\tSessionCode,\n\tSessionError,\n\tStreamCode,\n\tStreamError,\n\tsessionCause,\n\tunauthorized,\n} from \"../error.ts\";\nimport * as netGroup from \"../group.ts\";\nimport { Cost, type Hop, MAX_HOPS, routesEqual, UNKNOWN_HOP, type WireRoute } from \"../hop.ts\";\nimport * as Identity from \"../identity.ts\";\nimport {\n\ttype Arriving,\n\thiddenBelow,\n\thooks,\n\tinsertRun,\n\tNO_MAX_DELAY,\n\ttype Run,\n\tremoveRun,\n\trunGaps,\n\tstaleHole,\n} from \"../internal.ts\";\nimport { GRACE } from \"../ledger.ts\";\nimport type { Kind, Lister } from \"../listing.ts\";\nimport * as Mint from \"../mint.ts\";\nimport * as Path from \"../path.ts\";\nimport { sendOrder } from \"../priority.ts\";\nimport { type OpenOptions, type Reader, Stream, Writer } from \"../stream.ts\";\nimport { type Counted, Tail } from \"../tail.ts\";\nimport * as Time from \"../time.ts\";\nimport type * as track from \"../track.ts\";\nimport { raceAborted, untilAborted } from \"../util/abort.ts\";\nimport { closeUnwanted } from \"../util/announce.ts\";\nimport { toNumber } from \"../util/bigint.ts\";\nimport { Deadline } from \"../util/deadline.ts\";\nimport { isAbandoned, unwanted } from \"../util/demand.ts\";\nimport { max, min, RESERVED, UNBOUNDED } from \"../util/key.ts\";\nimport { LIMITS, type Limits, SlotMap, Slots } from \"../util/limits.ts\";\nimport { Sorted } from \"../util/sorted.ts\";\nimport { Budget } from \"../util/yield.ts\";\nimport {\n\tAT_KEYS,\n\tEMPTY,\n\tlatestAt,\n\ttype Policy,\n\tplacedAsTimes,\n\trangesPolicy,\n\trangesStart,\n\tsameRanges,\n\tspan,\n\tWindow,\n\twidest,\n\twireHeld,\n\twireRanges,\n\twireSpan,\n} from \"../window.ts\";\nimport { overrideBroadcastWire, wireOf } from \"../wire.ts\";\nimport {\n\ttype AnnounceBroadcast,\n\tAnnounceHistory,\n\tAnnounceInit,\n\tAnnounceOk,\n\tAnnounceRequest,\n\tdecodeAnnounceBroadcastMaybe,\n} from \"./announce.ts\";\nimport { AnnounceStream } from \"./announce_stream.ts\";\nimport { Datagram as DatagramMessage, Datagrams, DatagramsInfo, DatagramsUpdate } from \"./datagram.ts\";\nimport { closeViolation } from \"./error.ts\";\nimport {\n\tdropped,\n\tpassing,\n\tRangeFills,\n\ttype RecoveryHandle,\n\ttype Refusal,\n\ttype Refused,\n\trefuseRun,\n\tStall,\n\tscoped,\n\tstale,\n} from \"./fills.ts\";\nimport * as Fit from \"./fit.ts\";\nimport { type Group as GroupMessage, readFrames } from \"./group.ts\";\nimport { Probe } from \"./probe.ts\";\nimport { Routed } from \"./routed.ts\";\nimport { ProbeLevel, type Setup } from \"./setup.ts\";\nimport { StreamId } from \"./stream.ts\";\nimport {\n\tdecodeSubscribeResponse,\n\tdecodeSubscribeResponseMaybe,\n\tEMPTY_RANGE,\n\tinclusiveGroupEnd,\n\tLiveRanges,\n\ttype RangeKind,\n\ttype Retune,\n\trequestedRange,\n\tSubscribe,\n\ttype SubscribeStart,\n\tSubscribeUpdate,\n\tstartBuffered,\n\ttoWireRanges,\n\ttype WireAnchor,\n\ttype WireRange,\n\twithPolicy,\n} from \"./subscribe.ts\";\nimport { TrackInfo, Track as TrackMessage } from \"./track.ts\";\nimport { decodeTracksEventMaybe, Tracks as TracksMessage } from \"./tracks.ts\";\nimport {\n\tfillsFromStart,\n\thasAnnounceId,\n\thasAnnounceOk,\n\thasDatagrams,\n\thasDatagramTracks,\n\thasGroupEnd,\n\thasIdentity,\n\thasLengthFirst,\n\thasMeta,\n\thasOrder,\n\thasProbeRtt,\n\thasRanges,\n\thasRefresh,\n\thasRouteCost,\n\thasRoutes,\n\thasSetupStream,\n\thasSkip,\n\thasSynced,\n\thasTrackStream,\n\thasTracks,\n\tkeepsSubscribeOpen,\n\tresolvesStart,\n\tupdateSupported,\n\tVersion,\n\twaitsForSubscriberFin,\n\twireTimescale,\n} from \"./version.ts\";\n\n// A peer's buffered TRACKS events decode without reaching a task boundary, and a flood of adds\n// and removals of one name never reaches the announces cap: yield so it cannot starve the host.\nconst listingBudget = new Budget();\nconst datagramBudget = new Budget();\n// The datagrams held for unanswered subscriptions at once, as many as a Rust pass holds: past it,\n// one is dropped and counted rather than stalling the receive queue, which would hold up other\n// tracks' datagrams behind their ends.\nconst HELD_DATAGRAMS = 32;\n\n/** Our price and rank for a session's link. */\nexport interface Link {\n\t/** What crossing it costs, winning over the peer's SETUP price; unset takes the peer's. */\n\tcost?: Cost;\n\t/** Its rank, which every route through it carries at most. */\n\tpriority: number;\n}\n\n// What a subscription has set up so far, so a revocation (or abandonment) can reach it at\n// any stage.\ninterface SubscribeSetup {\n\tconsumer?: broadcast.Consumer;\n\tconsumedId?: number;\n\tlegacyKey?: string;\n\tstream?: Stream;\n\ttrack?: Stream;\n\tproducer?: track.Producer;\n\t// Ends a setup still running once it failed, nobody wants it, or the grant was revoked.\n\tcancel: AbortController;\n\t// Set once our grant stops covering the broadcast.\n\trevoked?: Error;\n}\n\n/**\n * What a consumed broadcast captured when it was opened: the identity it pins, and its own id.\n * Fetches are shared only within one consume, so a fresh consume for a replaced stream never\n * reads a fetch the old one opened.\n */\ninterface Consumed {\n\treadonly identity?: Identity.Valid;\n\treadonly id?: number;\n\treadonly valid?: AbortSignal;\n\t// Aborted once another stream takes the path, which may answer a request without an identity\n\t// still unanswered. A withdrawal alone leaves the peer to answer it.\n\treadonly answering?: AbortSignal;\n}\n\n// What a request names to pin it: the serving identity, and on lite-07 its publisher node and the\n// depth of the route's prefix.\ninterface Pin {\n\treadonly identity?: Identity.Valid;\n\treadonly node?: bigint;\n\treadonly depth?: number;\n}\n\ninterface DatagramEntry {\n\tproducer: datagram.Producer;\n\ttimescale?: Time.Timescale;\n\t// Set once the publisher ended the track, while the datagrams received with the end route:\n\t// a session close meanwhile finishes it rather than cutting it off.\n\tended?: boolean;\n}\n\n/** The ranges a SUBSCRIBE asks for and the live joins placed among them; see `wireHeld`. */\ninterface Asked {\n\tranges: readonly track.Range[];\n\tplaced: ReadonlyMap<number, bigint>;\n}\n\ninterface SubscribeEntry {\n\tdatagrams?: DatagramEntry;\n\t/** Release the stream demand held by readers of the legacy datagram track. */\n\tdatagramDemand?: Dispose;\n\tlegacyKey?: string;\n\t// The write side: incoming GROUP streams are routed here. The application reads\n\t// the matching track.Subscriber it got from broadcast.Consumer.subscribe.\n\ttrack: track.Producer;\n\t// Whether it fills the track's metadata copy, asking with a metadata subscription for each\n\t// frame's header alone.\n\tmeta: boolean;\n\tcompress: boolean;\n\t// Per-frame timestamp scale (0 = none), resolved before this entry is registered.\n\ttimescale: number;\n\t// The track's timescale as its model declares it, which a time anchor counts in.\n\tscale?: Time.Timescale;\n\t// The group streams received, so the subscription can wait for the ones still owed\n\t// after the publisher ends it.\n\ttail: Tail;\n\t// The original lite-07 feed may close while the copy still serves recoveries.\n\tfeedEnded?: Once<\"ended\">;\n\t// The first group the SUBSCRIBE asked for, if any.\n\trequested?: bigint;\n\t// Pre-07: an update had the publisher place its join afresh, which its START predates.\n\trestated?: boolean;\n\t// The first group the publisher serves, once SUBSCRIBE_START says: null when it starts no\n\t// range. And the track's exclusive end, once SUBSCRIBE_END declares it.\n\tstart?: bigint | null;\n\tend?: bigint;\n\t// The ranges on the wire by Range ID (lite-07), which each update edits.\n\tlive: LiveRanges;\n\t// Where each live range's SUBSCRIBE_START says it starts on lite-07, by Range\n\t// ID, undefined for one with nothing to deliver.\n\tstarts: Map<bigint, bigint | undefined>;\n\t// The greatest intervening group known for each unanswered Time start, by Range ID.\n\ttimeFloors?: Map<bigint, bigint>;\n\t// The tick the copy recorded each live join range's answer at, by Range ID (see\n\t// `hooks.answerJoin`): one with none is still unanswered.\n\tjoinTicks: Map<bigint, number>;\n\t// The narrowest max in milliseconds asked for each Range ID through its answer, or ever\n\t// for a placed range. That max may have bounded the relay's own copy, so its answer\n\t// places only readers within it.\n\tjoinBudgets: Map<bigint, number>;\n\t// The first group the ranges last sent ask for, which a lite-07 declaration answers.\n\tfloor?: bigint;\n\t// What `#declareFeed` last declared, so an unchanged one is not declared again.\n\tdeclared?: { start?: bigint | null; requested?: bigint; feed: readonly Run[] };\n\t// The exclusive group end every live range the SUBSCRIBE and each SUBSCRIBE_UPDATE asked ended at,\n\t// undefined once one followed the live edge or two ended apart: the cap a lite-07 stale drop is\n\t// recorded within, so a reader capped alike settles on it. The wire does not say which update a\n\t// drop crossed, so a cap that ever varied settles no capped reader.\n\tstaleCap: bigint | undefined;\n\t// The subscribe stream, from the setup that registered this entry to its end.\n\tstream: SubscribeStream;\n\t// How many SUBSCRIBE_UPDATEs went out, so a tail settling past SUBSCRIBE_END waits a fresh\n\t// grace for what one sent meanwhile asks for.\n\tsent: number;\n\t// The ranges the SUBSCRIBE asked for, as `wireRanges` gives them, and the group each live join\n\t// among them was placed at, by index (see `wireHeld`).\n\tasked: track.Range[];\n\taskedPlaced: ReadonlyMap<number, bigint>;\n\t// A recovery's own subscription. A time probe holds its group until it can place the reader\n\t// that wants it.\n\tfilling?: \"range\" | \"probe\";\n\t// Lite-07: the copy's fills of more than one group, which ask through this subscription.\n\tfills?: RangeFills;\n\t// The Range IDs of the fills' live ranges; with the probes', the rest are the demand's, which\n\t// alone say where the live feed starts.\n\tfillIds: Set<bigint>;\n\t// The Range IDs of the probes' live ranges: a range of its own from each time start the copy's\n\t// readers wait on, asking only where the publisher starts it, and one for each live join they\n\t// wait on that no unanswered range asks. Like a fill's, it says nothing of where the live feed is.\n\tprobeIds: Set<bigint>;\n\t// The groups the fills' ranges ask for, as last sent: widened with the demand's ranges until\n\t// they fit, so a run may cover more than the fills ask.\n\tfillGroups: readonly Run[];\n\t// Bumped as what the fills ask changes, for the update loop.\n\tfillsChanged: Signal<number>;\n\t// Until the SUBSCRIBE's first response (lite-05+); see `Unanswered`.\n\tunanswered?: Unanswered;\n\t// Lite-07: the hold each stream reading a group has on the subscription's end, with the group it\n\t// reads, one per stream, so stream credit bounds them. A browser can lose the reset of a stream\n\t// the publisher gave up on (Chromium drops one that reaches a stream before the page took it), and\n\t// the publisher names any group whose reset could lose its header in a drop, so the drop lets go\n\t// of the hold at once.\n\treading?: Map<Counted, bigint>;\n\t// Active subscription identity for D2 fetchGroup deduplication.\n\tbroadcast?: Path.Valid;\n\tconsumedId?: number;\n\t// Standalone one-shot SUBSCRIBE fetch target (lite-07 fetchGroup with no active subscription).\n\tfillGroup?: FetchTarget;\n}\n\n// The group a lite-07 one-shot fetch delivers into.\ninterface FetchTarget {\n\tproducer: netGroup.Producer;\n\ttaken: boolean;\n\tarrived: () => void;\n\t// How its stream failed without a code, as Firefox reports a reset that lost one: the drop the\n\t// publisher names the group in says why, which a reader needs to ask again after TOO_FAR_BEHIND.\n\tlost?: Error;\n\t// Why the publisher dropped the group, once it said: a stream for it arriving later is one whose\n\t// reset may never land, as Chromium loses one, so it is not taken.\n\tdropped?: Error;\n}\n\n// A subscribe stream's phases. Every SUBSCRIBE_UPDATE and our FIN go out on it.\ntype SubscribeStream =\n\t// Being set up: its responses are not read yet.\n\t| { kind: \"setup\" }\n\t// Its responses are read until the publisher's FIN or reset, which Subscriber.drain waits on.\n\t| { kind: \"reading\"; responses: Promise<void> }\n\t// Our side is FINned too, which lite-05+ does once the tail settles past the publisher's end.\n\t| { kind: \"fin\"; responses: Promise<void> }\n\t// The publisher's FIN finished the track, as only it does before lite-05, where our side\n\t// never FINs.\n\t| { kind: \"finished\"; responses: Promise<void> };\n\ninterface TimeProbe {\n\trecovery: RecoveryHandle & { arrived(): boolean };\n\tstart: Once<{ group: bigint | undefined }>;\n\tdone: Once<Refused[]>;\n}\n\n// A lite-05+ SUBSCRIBE waiting for its first response.\ninterface Unanswered {\n\t// The TRACK stream that answered, held open as interest in the track, so the publisher's\n\t// demand never lapses between the two.\n\theld: Stream;\n\t// Aborted at the first response. Until then a SUBSCRIBE without an identity may be answered\n\t// by whichever stream won the path, so a replacement refuses it.\n\tanswered: AbortController;\n}\n\n/**\n * The identity a session minted for each path a peer advertises without one (every version\n * before lite-07), shared by its announce streams: a peer serves one broadcast at a path at a\n * time, so the path advertised on two streams at once is one stream. The peer ending it on any\n * stream retires its identity, so the next advertisement is a new stream with a fresh one, even\n * while a lagging stream still holds the old: holders alone cannot tell a replacement from\n * continuity. A stream closing only lets go of it. Mirrors `Minted` in rs/moq-net.\n * @internal\n */\nexport class Minted {\n\t#paths = new Map<Path.Valid, { identity: Identity.Valid; holders: number }>();\n\n\tacquire(path: Path.Valid): Identity.Valid {\n\t\tlet entry = this.#paths.get(path);\n\t\tif (!entry) {\n\t\t\tentry = { identity: Mint.fresh(), holders: 0 };\n\t\t\tthis.#paths.set(path, entry);\n\t\t}\n\t\tentry.holders += 1;\n\t\treturn entry.identity;\n\t}\n\n\t/**\n\t * Let go of `identity`, retiring it if the peer `ended` its advertisement. A no-op once\n\t * another stream's end retired it.\n\t */\n\trelease(path: Path.Valid, identity: Identity.Valid, ended: boolean) {\n\t\tconst entry = this.#paths.get(path);\n\t\tif (entry?.identity !== identity) return;\n\t\tentry.holders -= 1;\n\t\tif (ended || entry.holders === 0) this.#paths.delete(path);\n\t}\n}\n\n// An announced suffix beneath its interest prefix. Each fits the limits alone, but together they\n// can pass them, which the draft makes a violation.\nfunction joinAnnounced(prefix: Path.Valid, suffix: Path.Valid): Path.Valid {\n\tconst path = (prefix === \"\" ? suffix : suffix === \"\" ? prefix : `${prefix}/${suffix}`) as Path.Valid;\n\t// The wire's own count, which bounds every `/` and so the segments `Path.join` checks too.\n\tconst error = Path.check(path);\n\tif (error) throw new ProtocolViolation(error);\n\treturn path;\n}\n\n/** The groups a fill's range asks for: absolute at both ends, as `RangeFills` asks them. */\nfunction fillRun(range: WireRange): Run | undefined {\n\tconst start = range.start?.absolute;\n\tconst end = range.end?.absolute;\n\treturn start === undefined || end === undefined ? undefined : { start, end };\n}\n\n// Whether two lists hold the same items in order: values by identity, flat records field by field.\nfunction sameList<T>(a: readonly T[], b: readonly T[], same: (x: T, y: T) => boolean = Object.is): boolean {\n\treturn a.length === b.length && a.every((x, i) => same(x, b[i]));\n}\n\nconst sameRun = (x: Run, y: Run) => x.start === y.start && x.end === y.end;\n\nconst sameJoin = (x: JoinAsk, y: JoinAsk) =>\n\tx.min === y.min && x.end === y.end && x.budget === y.budget && x.since === y.since;\n\n/** Subscribe to the peer and own its receive-side protocol tasks.\n * @internal\n */\nexport class Subscriber {\n\t#quic: WebTransport;\n\t// Advertisements the peer holds live across every announce stream on this session.\n\t#announces: Slots;\n\t// The identities minted for the paths the peer advertises without one, shared by every\n\t// announce stream on this session.\n\t#minted = new Minted();\n\n\t// The version of the connection.\n\treadonly version: Version;\n\n\t// Shared with the Publisher so reflected announces can be dropped on receipt.\n\treadonly hop: Hop;\n\n\t// Registered only after immutable TRACK_INFO or the older drafts' defaults resolve,\n\t// so every incoming group and datagram already knows its timestamp framing.\n\t#subscribes = new Map<bigint, SubscribeEntry>();\n\t#datagrams = new Map<bigint, DatagramEntry>();\n\t#legacyDatagrams = new Map<string, DatagramEntry>();\n\t#legacyRequests = new Map<string, datagram.Request>();\n\t// Lite-07 datagram requests sent and not yet answered.\n\t#unanswered = new Set<bigint>();\n\t// Datagrams for a subscription still awaiting its answer, in arrival order, routed a host task\n\t// later while the rest go on.\n\t#held: { subscribe: bigint; payload: Uint8Array }[] = [];\n\t#heldRouted?: Promise<void>;\n\t// Set while the receive loop yields to its budget, which may leave datagrams queued.\n\t#receiveYield?: Promise<void>;\n\t/** Datagrams received for a subscription with no datagram track; see `Stats.datagramsUnrouted`. */\n\tdatagramsUnrouted = 0;\n\t// A SUBSCRIBE sent alongside its TRACK, until its TRACK_INFO lands: settles with the\n\t// entry, or `undefined` if it never does.\n\t#pending = new Map<bigint, Promise<SubscribeEntry | undefined>>();\n\t#subscribeNext = 0n;\n\n\t// Lite-07: the claims the peer sends, shared by every `routes()` reader.\n\t#routed?: Routed;\n\t// Dedup consumed broadcasts per path: repeat consume() calls share one subscription.\n\t#consumes = new BroadcastCache();\n\t#consumeNext = 0;\n\n\t// Dedup in-flight one-shot fetches, keyed by [consume, broadcast, identity, track, key].\n\t// Concurrent (or repeat, while still open) fetchGroup() calls for the same group of one consume\n\t// share one SUBSCRIBE and each get an independent mirror; the entry is evicted once the\n\t// group closes.\n\t#fetches = new Map<string, { group: netGroup.Producer; accepted: Promise<void> }>();\n\n\t// The peer's PROBE estimates, written as they arrive (Lite03+ only).\n\t#probe?: Signal<ProbeStats>;\n\n\t// The peer's SETUP (lite-05+), undefined until it arrives. Gates opening the PROBE\n\t// stream on the peer having advertised Probe >= Report.\n\t#peerSetup?: Signal<Setup | undefined>;\n\n\t// Settles when the peer sends GOAWAY, ranking this session's routes last.\n\t#goaway?: GetPromise<Received>;\n\n\t// Our price and rank for this link; see {@link Link}.\n\t#link: Link;\n\t// What crossing this link adds to a route's cost, settled once known.\n\t#linkCost?: Promise<Cost>;\n\n\t// Distinguishes failures from streams torn down by Subscriber.close().\n\t#closed = new AbortController();\n\t// Shared signal set once `#quic.closed` settles so per-fetch waits can subscribe and dispose\n\t// without retaining closures on the session-lifetime promise.\n\t#quicClosed = new Signal(false);\n\n\t// Our grant: a subscription it stops covering is cancelled. Undefined until the peer\n\t// answers, and forever on a version without AUTH, which allows everything.\n\t#grant?: Getter<Grant | undefined>;\n\t#auth?: AuthSession;\n\n\t/**\n\t * Creates a new Subscriber instance.\n\t * @param quic - The WebTransport session to use\n\t * @param version - The protocol version\n\t * @param origin - Hop id shared with the Publisher\n\t * @param probe - Optional sink for the peer's PROBE estimates\n\t * @param peerSetup - Optional peer SETUP slot for capability gating (lite-05+)\n\t * @param goaway - Settles when the peer sends GOAWAY\n\t * @param grant - The union of our tokens' grants, which bounds what we subscribe to\n\t * @param limits - How many live requests the peer may hold\n\t * @param link - Our price and rank for this link\n\t *\n\t * @internal\n\t */\n\tconstructor(\n\t\tquic: WebTransport,\n\t\tversion: Version,\n\t\thop: Hop,\n\t\tprobe?: Signal<ProbeStats>,\n\t\tpeerSetup?: Signal<Setup | undefined>,\n\t\tgoaway?: GetPromise<Received>,\n\t\tgrant?: Getter<Grant | undefined>,\n\t\tlimits: Limits = LIMITS,\n\t\tauth?: AuthSession,\n\t\tlink: Link = { cost: Cost.link, priority: 0 },\n\t) {\n\t\tthis.#quic = quic;\n\t\tthis.#link = link;\n\t\tvoid quic?.closed?.then(\n\t\t\t() => this.#quicClosed.set(true),\n\t\t\t() => this.#quicClosed.set(true),\n\t\t);\n\t\tthis.#announces = new Slots(limits.announces, { quic, reason: \"too many announcements\" });\n\t\tthis.version = version;\n\t\tthis.hop = hop;\n\t\tthis.#probe = probe;\n\t\tthis.#peerSetup = peerSetup;\n\t\tthis.#goaway = goaway;\n\t\tthis.#grant = grant;\n\t\tthis.#auth = auth;\n\t\tif (hasRoutes(version)) {\n\t\t\tconst stream = AnnounceStream.of(quic, version);\n\t\t\tthis.#routed = new Routed({\n\t\t\t\tquic,\n\t\t\t\tversion,\n\t\t\t\tconsumes: this.#consumes,\n\t\t\t\tslots: this.#announces,\n\t\t\t\tdrained: (route) => this.#drained(route),\n\t\t\t\tcost: () => this.#cost(),\n\t\t\t\tpriority: link.priority,\n\t\t\t\tgoaway,\n\t\t\t\tgrant,\n\t\t\t\tsend: (msg) => stream.send(msg),\n\t\t\t});\n\t\t}\n\t}\n\n\t// What crossing this link adds to a route's cost: our own price, else the one the peer's\n\t// SETUP declares, else 1. A version whose announcements carry no cost charges nothing.\n\t// Waits for the peer's SETUP only when we set no price. Mirrors `poll_link_cost` in rs/moq-net.\n\t#cost(): Promise<Cost> {\n\t\tthis.#linkCost ??= (async () => {\n\t\t\tif (!hasRouteCost(this.version)) return Cost.zero;\n\t\t\tif (this.#link.cost !== undefined) return this.#link.cost;\n\t\t\tconst peerSetup = this.#peerSetup;\n\t\t\tif (!peerSetup) throw new Error(\"no peer SETUP to price the link\");\n\t\t\t// A transport that closes before the SETUP arrives ends the wait too, so a claim handler\n\t\t\t// waiting on it never holds up the session's teardown.\n\t\t\tlet setup = peerSetup.peek();\n\t\t\twhile (setup === undefined) {\n\t\t\t\tif (this.#quicClosed.peek()) throw new Error(\"session closed before the peer's SETUP\");\n\t\t\t\tawait untilAborted(Promise.resolve(Signal.race(peerSetup, this.#quicClosed)), this.#closed.signal);\n\t\t\t\tsetup = peerSetup.peek();\n\t\t\t}\n\t\t\treturn setup.cost ?? Cost.link;\n\t\t})();\n\t\treturn this.#linkCost;\n\t}\n\n\t// Whether the peer has sent GOAWAY. Requests keep opening here until a replacement\n\t// session's route outranks this one.\n\t#goingAway(): boolean {\n\t\treturn this.#goaway?.peek() !== undefined;\n\t}\n\n\t// A route ranks below every available one once the peer has asked us to leave. A later announce on a\n\t// draining session must not win selection, however cheap the path it advertises.\n\t#drained(route: WireRoute): WireRoute {\n\t\treturn this.#goingAway() ? { ...route, draining: true } : route;\n\t}\n\n\t// Whether our grant no longer lets us subscribe to `broadcast`.\n\t#denied(broadcast: Path.Valid): boolean {\n\t\tconst grant = this.#grant?.peek();\n\t\treturn grant !== undefined && !grant.subscribe.matches(broadcast);\n\t}\n\n\t/**\n\t * Subscribe to broadcast announcements at or beneath `prefix`. Paths are relative\n\t * to the session, not the prefix.\n\t *\n\t * Reflected announces (those whose hop chain already includes this\n\t * connection) are always dropped: moq-lite-06 has none to keep, and older\n\t * versions stay consistent with that.\n\t *\n\t * Hidden routes (a `.`-prefixed segment below the prefix) are left out unless\n\t * `options.hidden` opts in. The opt-in rides the request on lite-07+; an older peer\n\t * never hides anything, so the rule is also applied here.\n\t *\n\t * Only routes at or beneath `prefix` are reported, unless `options.covering` also asks for\n\t * those above it. A lite-07 stream reports the best claim at each path, or each identity's\n\t * with `options.claims`.\n\t */\n\troutes(prefix: Path.Valid = Path.empty(), options?: announce.RouteOptions): announce.Routes {\n\t\t// Refuse a prefix no request can carry before any reader registers for it.\n\t\tPath.Prefix.parse(prefix);\n\t\tPath.encode(prefix);\n\t\tconst announced = new announce.Producer();\n\t\t// The wire speaks announce interest by prefix, and echoes suffixes beneath it.\n\t\tconst consumer = announced.consume();\n\t\t// The last reader leaving ends the stream, which cancels the request.\n\t\tcloseUnwanted(announced);\n\t\tconst hidden = options?.hidden ?? false;\n\t\tconst covering = options?.covering ?? false;\n\t\tif (this.#routed) {\n\t\t\t// Lite-07: every reader shares the session's one Announce Stream.\n\t\t\tthis.#routed.attach(announced, { prefix, hidden, covering, claims: options?.claims ?? false });\n\t\t} else {\n\t\t\tvoid this.#runAnnounced(announced, prefix, hidden);\n\t\t}\n\t\treturn consumer;\n\t}\n\n\tasync #runAnnounced(announced: announce.Producer, prefix: Path.Valid, hidden: boolean): Promise<void> {\n\t\tconsole.debug(`announced: prefix=${prefix}`);\n\t\t// Lite04/05: send our own session-level Hop ID so the peer can skip announces\n\t\t// whose hop chain already passed through us. Encoding drops it on every other\n\t\t// version, where we drop the reflected announce on receipt instead. Matches the\n\t\t// Rust subscriber's `exclude_hop: self.self_origin.id` in `run_announce_prefix`.\n\t\tconst msg = new AnnounceRequest(prefix, this.hop);\n\t\t// Every path the peer sends lies beneath the prefix, so only hiding and a `*`, which no\n\t\t// origin accepts, filter it.\n\t\tconst visible = (path: Path.Valid) => !path.includes(\"*\") && (hidden || !hiddenBelow(prefix, path));\n\n\t\t// Opened outside the try so the catch can reach it: a protocol violation below has\n\t\t// to reset the stream, not just close our side of it.\n\t\tlet stream: Stream;\n\t\ttry {\n\t\t\t// The consumer leaving gives up the wait for a slot, so the next open takes it.\n\t\t\tconst left = new AbortController();\n\t\t\tvoid race([announced.closed]).then(() => left.abort());\n\t\t\tconst opened = await Stream.tryOpen(this.#quic, { version: this.version, signal: left.signal });\n\t\t\t// Handed a stream as the consumer left: give the slot back unused.\n\t\t\tif (!opened || announced.closed.peek() !== undefined) {\n\t\t\t\topened?.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tstream = opened;\n\t\t} catch (err: unknown) {\n\t\t\tannounced.close(error(err));\n\t\t\treturn;\n\t\t}\n\n\t\t// Every advertisement the peer currently has live, keyed by suffix (at most one\n\t\t// per path is current, and every announce on this stream shares `prefix`).\n\t\t//\n\t\t// An advertisement skipped locally as a reflected loop is recorded with\n\t\t// `live: false`: the peer numbered it and will retract it regardless of what we\n\t\t// made of it, so its path is not free. Dropping it from the map instead would let\n\t\t// a later announce take the path, and the skipped one's `endedId` would then\n\t\t// retract that one's state.\n\t\ttype Advertisement = {\n\t\t\tlive: boolean;\n\t\t\troute: WireRoute;\n\t\t};\n\t\t// Each holds one of the session's announce slots, reflected and hidden ones included.\n\t\tconst advertised = new SlotMap<Path.Valid, Advertisement>(this.#announces);\n\t\t// The paths this stream holds a session-minted identity for: a version before lite-07\n\t\t// names none, so each advertisement stands for one stream until it ends.\n\t\tconst minted = new Map<Path.Valid, Identity.Valid>();\n\t\tconst mint = (path: Path.Valid): Identity.Valid => {\n\t\t\tlet identity = minted.get(path);\n\t\t\tif (identity === undefined) {\n\t\t\t\tidentity = this.#minted.acquire(path);\n\t\t\t\tminted.set(path, identity);\n\t\t\t}\n\t\t\treturn identity;\n\t\t};\n\t\t// The peer ended the advertisement, which retires its identity.\n\t\tconst unmint = (path: Path.Valid) => {\n\t\t\tconst identity = minted.get(path);\n\t\t\tif (identity === undefined) return;\n\t\t\tminted.delete(path);\n\t\t\tthis.#minted.release(path, identity, true);\n\t\t};\n\n\t\tlet stopDrain: Dispose | undefined;\n\t\ttry {\n\t\t\t// Send the announce interest.\n\t\t\tawait stream.writer.u53(StreamId.Announce);\n\t\t\tawait msg.encode(stream.writer, this.version);\n\n\t\t\t// Lite05+: the publisher reports its own Hop ID before any announces.\n\t\t\t// It no longer stamps itself onto each hop chain, so we append it here to\n\t\t\t// keep the reflected-announce loop check seeing the full chain.\n\t\t\tlet responderOrigin: Hop | undefined;\n\t\t\t// The ANNOUNCEs still owed of the peer's initial set (lite-05+). Older versions\n\t\t\t// mark no boundary, so they sync once the request is out, as a best effort.\n\t\t\tlet initial = 0;\n\t\t\tlet waitingSynced = hasSynced(this.version);\n\t\t\tif (hasAnnounceOk(this.version)) {\n\t\t\t\tconst ok = await race([AnnounceOk.decode(stream.reader, this.version), announced.closed]);\n\t\t\t\t// A consumer that leaves before the peer answers ends the request now, not on the answer.\n\t\t\t\tif (!(ok instanceof AnnounceOk)) {\n\t\t\t\t\tstream.close();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Keep a withheld 0: it names nobody for loop detection, but it is the\n\t\t\t\t// anonymous mark and must travel the reconstructed chain. Assigned identities\n\t\t\t\t// stay off this hop and are never forwarded.\n\t\t\t\tresponderOrigin = ok.hop;\n\t\t\t\tinitial = ok.active;\n\t\t\t}\n\n\t\t\tswitch (this.version) {\n\t\t\t\tcase Version.DRAFT_01:\n\t\t\t\tcase Version.DRAFT_02: {\n\t\t\t\t\t// Receive ANNOUNCE_INIT first. Each suffix takes an announce slot, so a set past\n\t\t\t\t\t// what is left of the budget is refused before it is decoded.\n\t\t\t\t\tconst budget = this.#announces.available();\n\t\t\t\t\tconst init = await race([\n\t\t\t\t\t\tAnnounceInit.decode(stream.reader, this.version, budget),\n\t\t\t\t\t\tannounced.closed,\n\t\t\t\t\t]);\n\t\t\t\t\tif (!(init instanceof AnnounceInit)) {\n\t\t\t\t\t\tstream.close();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Process initial announcements. These are advertisements like any other, so\n\t\t\t\t\t// they go on record and obey the same one-per-path rule: the initial set\n\t\t\t\t\t// naming a path twice is the same violation as two ANNOUNCE_STARTs for it,\n\t\t\t\t\t// and the record is what catches either. Draft01/02 carry no hop ids and no\n\t\t\t\t\t// ANNOUNCE_OK, so nothing names the publisher.\n\t\t\t\t\tfor (const suffix of init.suffixes) {\n\t\t\t\t\t\tconst path = joinAnnounced(prefix, suffix);\n\t\t\t\t\t\tif (advertised.has(path)) {\n\t\t\t\t\t\t\tthrow new ProtocolViolation(`duplicate announce for ${path}`);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst route = this.#drained({\n\t\t\t\t\t\t\tidentity: mint(path),\n\t\t\t\t\t\t\tepoch: 0n,\n\t\t\t\t\t\t\thops: [UNKNOWN_HOP],\n\t\t\t\t\t\t\tcost: Cost.zero,\n\t\t\t\t\t\t\tpriority: this.#link.priority,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconst live = visible(path);\n\t\t\t\t\t\tadvertised.set(path, { live, route });\n\t\t\t\t\t\tif (!live) continue;\n\t\t\t\t\t\tthis.#consumes.announce(path, announced, route);\n\t\t\t\t\t\tconsole.debug(`announced: broadcast=${path} active=true`);\n\t\t\t\t\t\tannounced.append({ prefix: path, kind: \"start\", route });\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\t// Draft03+: no AnnounceInit, initial state comes via Announce messages.\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// A draining peer usually stops announcing, so rank its routes last from the GOAWAY\n\t\t\t// itself. Waiting for another message would leave the route primary until the\n\t\t\t// session closed. Idempotent: a route already draining emits nothing. A GOAWAY that\n\t\t\t// already arrived needs no listener, since `#drained()` marked every route above.\n\t\t\tconst drainAdvertised = () => {\n\t\t\t\tif (announced.closed.peek() !== undefined) return;\n\t\t\t\tfor (const [path, ad] of advertised) {\n\t\t\t\t\tif (!ad.live) continue;\n\t\t\t\t\tconst route = { ...ad.route, draining: true };\n\t\t\t\t\tif (routesEqual(ad.route, route)) continue;\n\t\t\t\t\tadvertised.set(path, { ...ad, route });\n\t\t\t\t\tthis.#consumes.announce(path, announced, route);\n\t\t\t\t\tannounced.append({ prefix: path, kind: \"update\", route });\n\t\t\t\t}\n\t\t\t};\n\t\t\tstopDrain = this.#goaway?.changed(() => drainAdvertised());\n\n\t\t\t// Lite06+: announce ids. Each received `active` implicitly assigns the next\n\t\t\t// per-stream ordinal; `endedId`/`update`/`restart` reference it, and lite-07 bases\n\t\t\t// copy from it. Tracked even for announces we skip as reflected, since the sender\n\t\t\t// doesn't know we skipped.\n\t\t\tconst history = new AnnounceHistory();\n\t\t\t// Only lite-07 refuses a forwarded path, and it never reaches here.\n\t\t\tconst known = (path: Path.Valid | undefined): Path.Valid => {\n\t\t\t\tif (path === undefined) throw new ProtocolViolation(\"a refused path before lite-07\");\n\t\t\t\treturn path;\n\t\t\t};\n\n\t\t\t// Receive announce updates (for Draft03+, this includes initial state)\n\t\t\tfor (;;) {\n\t\t\t\tif (initial === 0 && !waitingSynced) announced.synced();\n\n\t\t\t\tconst announce = await race([\n\t\t\t\t\tdecodeAnnounceBroadcastMaybe(stream.reader, this.version),\n\t\t\t\t\tannounced.closed,\n\t\t\t\t]);\n\t\t\t\t// undefined: the stream ended. null: the consumer closed cleanly.\n\t\t\t\tif (announce === undefined && (initial > 0 || waitingSynced)) {\n\t\t\t\t\tthrow new ProtocolViolation(\"announce stream ended inside the initial set\");\n\t\t\t\t}\n\t\t\t\tif (!announce) break;\n\t\t\t\tif (announce instanceof Error) throw announce;\n\t\t\t\tif (announce.status === \"synced\") {\n\t\t\t\t\tif (!waitingSynced) throw new ProtocolViolation(\"duplicate SYNCED\");\n\t\t\t\t\twaitingSynced = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// The counted initial set is ANNOUNCEs only, so anything else cuts it short. An\n\t\t\t\t// unknown message counts for nothing either way.\n\t\t\t\tif (initial > 0 && announce.status !== \"skipped\") {\n\t\t\t\t\tif (announce.status !== \"active\") {\n\t\t\t\t\t\tthrow new ProtocolViolation(`${announce.status} inside the initial set`);\n\t\t\t\t\t}\n\t\t\t\t\tinitial -= 1;\n\t\t\t\t}\n\n\t\t\t\tlet path: Path.Valid;\n\t\t\t\tlet active: boolean;\n\t\t\t\t// Present on active/update/restart; ended messages never carry hops worth checking.\n\t\t\t\tlet hops: Hop[] | undefined;\n\t\t\t\tlet cost: Cost | undefined;\n\t\t\t\t// Present on active and restart from lite-07; an update never changes them.\n\t\t\t\tlet identity: Identity.Valid | undefined;\n\t\t\t\tlet epoch: bigint | undefined;\n\t\t\t\t// The advertisement now serves another identity or epoch (lite-07).\n\t\t\t\tconst restart = false;\n\n\t\t\t\tswitch (announce.status) {\n\t\t\t\t\tcase \"active\": {\n\t\t\t\t\t\tconst suffix = hasAnnounceId(this.version) ? known(history.start(announce)) : announce.suffix;\n\t\t\t\t\t\t// The wire names the suffix beneath the interest prefix; the consumer\n\t\t\t\t\t\t// sees the covered path from the session root.\n\t\t\t\t\t\tpath = joinAnnounced(prefix, suffix);\n\t\t\t\t\t\tactive = true;\n\t\t\t\t\t\thops = announce.hops ?? [];\n\t\t\t\t\t\tcost = announce.cost;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"ended\":\n\t\t\t\t\t\tpath = joinAnnounced(prefix, announce.suffix);\n\t\t\t\t\t\tactive = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"endedId\":\n\t\t\t\t\t\t// Resolve and retire the id; an unknown or retired id is a protocol violation.\n\t\t\t\t\t\tpath = joinAnnounced(prefix, known(history.end(announce.id)));\n\t\t\t\t\t\tactive = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"update\":\n\t\t\t\t\t\t// Resolve the id; it stays live (the replacement reuses it).\n\t\t\t\t\t\tpath = joinAnnounced(prefix, history.get(announce.id));\n\t\t\t\t\t\tactive = true;\n\t\t\t\t\t\thops = announce.hops ?? [];\n\t\t\t\t\t\tcost = announce.cost;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"skipped\":\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// The restart and the route layer are lite-07's, on its Announce Stream.\n\t\t\t\t\t\tthrow new ProtocolViolation(`unexpected ${announce.status} before lite-07`);\n\t\t\t\t}\n\n\t\t\t\t// Each suffix fits the wire limits alone, but the interest prefix can push the\n\t\t\t\t// joined path past them, which the draft makes a violation too.\n\t\t\t\tconst error = Path.check(path);\n\t\t\t\tif (error) throw new ProtocolViolation(error);\n\n\t\t\t\t// One current advertisement per path per stream, decided before anything below\n\t\t\t\t// can skip this announcement. A second ANNOUNCE_START for a path the peer\n\t\t\t\t// already advertised is a violation whether or not its route would be usable\n\t\t\t\t// here, and whether or not we kept the first; letting a skip pre-empt it would\n\t\t\t\t// retract the live route and leave the stream open on a peer already out of\n\t\t\t\t// spec.\n\t\t\t\t//\n\t\t\t\t// lite-05 alone is exempt, where a duplicate ANNOUNCE *is* the replacement\n\t\t\t\t// idiom. lite-06 gave that its own message and older versions never had one, so\n\t\t\t\t// a duplicate means the same thing on both sides of it. Mirrors the branch the\n\t\t\t\t// Rust announce loop takes before `start_announce`.\n\t\t\t\tconst duplicateIsUpdate = updateSupported(this.version) && !hasAnnounceId(this.version);\n\t\t\t\tif (announce.status === \"active\" && !duplicateIsUpdate && advertised.has(path)) {\n\t\t\t\t\tthrow new ProtocolViolation(`duplicate announce for ${path}`);\n\t\t\t\t}\n\n\t\t\t\t// Retract this interest's advertisement so new consumes resolve the remaining\n\t\t\t\t// serving identity, and tell the consumer. A no-op for an advertisement never surfaced, which is\n\t\t\t\t// what an id retiring a skipped announce resolves to.\n\t\t\t\tconst retract = () => {\n\t\t\t\t\tconst previous = advertised.get(path);\n\t\t\t\t\tadvertised.delete(path);\n\t\t\t\t\tthis.#consumes.withdraw(path, announced);\n\t\t\t\t\tif (!previous?.live) return;\n\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} active=false`);\n\t\t\t\t\tannounced.append({\n\t\t\t\t\t\tprefix: path,\n\t\t\t\t\t\tkind: \"end\",\n\t\t\t\t\t\troute: previous.route,\n\t\t\t\t\t});\n\t\t\t\t};\n\n\t\t\t\tif (!active) {\n\t\t\t\t\tretract();\n\t\t\t\t\tunmint(path);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// An update keeps the identity its announcement named, even through a placeholder\n\t\t\t\t// below: a later update that is not reflected still names that stream. A version\n\t\t\t\t// before lite-07 names none, so the session mints one per advertisement.\n\t\t\t\tif (!restart) {\n\t\t\t\t\tconst previous = advertised.get(path)?.route;\n\t\t\t\t\tidentity ??= previous?.identity;\n\t\t\t\t\tepoch ??= previous?.epoch;\n\t\t\t\t}\n\t\t\t\tif (identity === undefined) {\n\t\t\t\t\tidentity = mint(path);\n\t\t\t\t\tepoch = 0n;\n\t\t\t\t}\n\n\t\t\t\t// In Lite05+ the sender's origin arrives via AnnounceOk, not in each hop\n\t\t\t\t// list, so fold it back in before checking.\n\t\t\t\tif (hops !== undefined) {\n\t\t\t\t\tconst full = responderOrigin !== undefined ? [...hops, responderOrigin] : hops;\n\t\t\t\t\tif (full.includes(this.hop)) {\n\t\t\t\t\t\t// A reflected update means the peer's remaining route loops back through\n\t\t\t\t\t\t// us, so the route is gone even though the message says active. The\n\t\t\t\t\t\t// advertisement stays live: the peer still holds the path and its id still\n\t\t\t\t\t\t// resolves here.\n\t\t\t\t\t\tretract();\n\t\t\t\t\t\tadvertised.set(path, {\n\t\t\t\t\t\t\tlive: false,\n\t\t\t\t\t\t\troute: { identity, epoch, hops: full, cost: Cost.zero },\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst fullHops =\n\t\t\t\t\thops !== undefined && responderOrigin !== undefined\n\t\t\t\t\t\t? [...hops, responderOrigin]\n\t\t\t\t\t\t: [...(hops ?? [])];\n\t\t\t\t// A received empty list is the anonymous mark, not a local announcement.\n\t\t\t\tif (fullHops.length === 0) fullHops.push(UNKNOWN_HOP);\n\t\t\t\t// Appending a withheld AnnounceOk(0) onto a 32-entry list is the same\n\t\t\t\t// drop Rust's Hops::push makes: do not expose an overlong chain.\n\t\t\t\tif (fullHops.length > MAX_HOPS) {\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} dropped (hop chain at MAX_HOPS)`);\n\t\t\t\t\tadvertised.set(path, {\n\t\t\t\t\t\tlive: false,\n\t\t\t\t\t\troute: { identity, epoch, hops: [], cost: Cost.zero },\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// What the peer advertised plus this link's price, ranked at this link's priority. The\n\t\t\t\t// price may wait on the peer's SETUP, which this reader stops waiting for once closed.\n\t\t\t\tconst link = await race([this.#cost(), announced.closed]);\n\t\t\t\tif (link instanceof Error) throw link;\n\t\t\t\tif (typeof link !== \"bigint\") break;\n\t\t\t\tconst route = this.#drained({\n\t\t\t\t\tidentity,\n\t\t\t\t\tepoch,\n\t\t\t\t\thops: fullHops,\n\t\t\t\t\tcost: Cost.charged(cost ?? Cost.zero, link),\n\t\t\t\t\tpriority: this.#link.priority,\n\t\t\t\t});\n\t\t\t\tif (!visible(path)) {\n\t\t\t\t\tadvertised.set(path, { live: false, route });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Another identity or epoch: whatever was consumed at the path may be stale, so the\n\t\t\t\t// next consume subscribes fresh, while the handles already out keep theirs.\n\t\t\t\tconst previous = advertised.get(path);\n\t\t\t\tif (restart && previous?.live) {\n\t\t\t\t\tadvertised.set(path, { live: true, route });\n\t\t\t\t\tthis.#consumes.announce(path, announced, route, true);\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} restart=true identity=${identity} epoch=${epoch}`);\n\t\t\t\t\tannounced.append({ prefix: path, kind: \"restart\", route });\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// A second advertisement for a path we already carry is an update: either an\n\t\t\t\t// explicit ANNOUNCE_UPDATE, or (lite-05) a duplicate ANNOUNCE. It updates the\n\t\t\t\t// route in place, so a forwarder re-prices without retracting.\n\t\t\t\tif (previous?.live) {\n\t\t\t\t\t// An update preserves the advertisement's identity.\n\t\t\t\t\tadvertised.set(path, { live: true, route });\n\t\t\t\t\tthis.#consumes.announce(path, announced, route);\n\t\t\t\t\tconsole.debug(`announced: broadcast=${path} rerouted`);\n\t\t\t\t\tif (!routesEqual(previous.route, route)) {\n\t\t\t\t\t\tannounced.append({ prefix: path, kind: \"update\", route });\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tadvertised.set(path, { live: true, route });\n\t\t\t\tthis.#consumes.announce(path, announced, route);\n\n\t\t\t\tconsole.debug(`announced: broadcast=${path} active=true identity=${identity}`);\n\t\t\t\tannounced.append({ prefix: path, kind: \"start\", route });\n\t\t\t}\n\n\t\t\tannounced.close();\n\t\t\t// Either side ending the interest ends the stream, or the peer keeps it open, still\n\t\t\t// discovering into it and holding a stream slot.\n\t\t\tstream.close();\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\t// Reaches here on a protocol violation the peer committed (a second\n\t\t\t// advertisement for a live path, an unknown announce id) as well as on a\n\t\t\t// transport failure. Either way the peer has to be told: closing only our side\n\t\t\t// would leave it announcing into a stream nobody reads.\n\t\t\tstream.abort(e);\n\t\t\tannounced.close(e);\n\t\t\t// A violation ends the session, not just this stream, so a nonconforming peer\n\t\t\t// cannot repeat it on the next one. Matches `ietf::Subscriber` and the Rust\n\t\t\t// lite subscriber, where the announce half only ever ends the session on error.\n\t\t\tcloseViolation(this.#quic, e);\n\t\t} finally {\n\t\t\t// Release only this interest's routes. Existing consumers remain pinned.\n\t\t\tfor (const path of advertised.keys()) this.#consumes.withdraw(path, announced);\n\t\t\tadvertised.clear();\n\t\t\t// The stream closing ends none of its advertisements, which another may still carry.\n\t\t\tfor (const [path, identity] of minted) this.#minted.release(path, identity, false);\n\t\t\tminted.clear();\n\t\t\tstopDrain?.();\n\t\t}\n\t}\n\n\t/**\n\t * Lite-07: one message the peer sent on its Announce Stream. Its routes and claims apply\n\t * here; its own ANNOUNCE_REQUEST only has to arrive outside a DEAD's updates.\n\t *\n\t * @internal\n\t */\n\tannounce(msg: AnnounceBroadcast): Promise<void> {\n\t\tif (!this.#routed) throw new ProtocolViolation(\"Announce Stream before lite-07\");\n\t\treturn this.#routed.receive(msg);\n\t}\n\n\t/**\n\t * Lite-07: the peer finished its Announce Stream, so it is leaving and its routes end.\n\t *\n\t * @internal\n\t */\n\tannounceFinished(): void {\n\t\tthis.#routed?.finish();\n\t}\n\n\t/**\n\t * Lite-07: this side finished its Announce Stream, so it asks the peer for nothing more.\n\t *\n\t * @internal\n\t */\n\tannounceSilenced(): void {\n\t\tthis.#routed?.silence();\n\t}\n\n\t/**\n\t * Consumes a broadcast from the connection.\n\t *\n\t * Deduplicated per serving identity: repeat calls for the same path share one reference-counted\n\t * broadcast (and one upstream subscription). The shared broadcast closes once every caller has\n\t * closed its handle, so callers close normally.\n\t *\n\t * @param name - The name of the broadcast to consume\n\t * @param pin - Consume only this identity, over its best route. A minted one names an\n\t * announcement rather than a stream, so it pins nothing on a wire that carries no identity.\n\t * @returns A Broadcast identity\n\t */\n\tconsume(path: Path.Valid, pin?: Identity.Valid): broadcast.Consumer {\n\t\tconst identity =\n\t\t\tpin !== undefined && (hasIdentity(this.version) || !Identity.isMinted(pin))\n\t\t\t\t? this.#consumes.pinned(path, pin)\n\t\t\t\t: this.#consumes.identity(path);\n\t\treturn this.#consumes.get(path, identity) ?? this.#createConsume(path, identity);\n\t}\n\n\t#createConsume(path: Path.Valid, identity: ReturnType<BroadcastCache[\"identity\"]>): broadcast.Consumer {\n\t\tconst consumed = {\n\t\t\tidentity: identity.route.identity,\n\t\t\tid: this.#consumeNext++,\n\t\t\tget valid() {\n\t\t\t\treturn identity.validity?.signal;\n\t\t\t},\n\t\t\tget answering() {\n\t\t\t\treturn identity.validity?.answering;\n\t\t\t},\n\t\t};\n\t\tconst consumer = new ConsumeBroadcast(this, path, consumed);\n\t\t// Registered before anyone can list the broadcast, so no reader syncs without the peer.\n\t\tvoid this.#runListing(path, consumed, wireOf(consumer).lister());\n\n\t\tvoid (async () => {\n\t\t\tfor (;;) {\n\t\t\t\tconst request = await wireOf(consumer).requested();\n\t\t\t\tif (!request) break;\n\t\t\t\tvoid this.#runSubscribe(path, consumed, request, consumer);\n\t\t\t}\n\t\t})();\n\n\t\tvoid (async () => {\n\t\t\tfor (;;) {\n\t\t\t\tconst request = await wireOf(consumer).requestedDatagrams();\n\t\t\t\tif (!request) return;\n\t\t\t\tvoid this.#runDatagramRequest(path, consumed, consumer, request);\n\t\t\t}\n\t\t})();\n\t\treturn this.#consumes.insert(path, identity, consumer);\n\t}\n\n\t// Each request owns its setup and subscription until it ends or loses its last reader.\n\tasync #runDatagramRequest(\n\t\tpath: Path.Valid,\n\t\tconsumed: Consumed,\n\t\tconsumer: broadcast.Consumer,\n\t\trequest: datagram.Request,\n\t): Promise<void> {\n\t\tconst cancel = new AbortController();\n\t\tconst signal = AbortSignal.any([\n\t\t\tcancel.signal,\n\t\t\tthis.#closed.signal,\n\t\t\t...(consumed.valid ? [consumed.valid] : []),\n\t\t]);\n\t\tlet producer: datagram.Producer | undefined;\n\t\tlet stream: Stream | undefined;\n\t\tconst id = this.#subscribeNext++;\n\t\tconst legacyKey =\n\t\t\thasDatagrams(this.version) && !hasDatagramTracks(this.version)\n\t\t\t\t? JSON.stringify([consumed.id, request.name])\n\t\t\t\t: undefined;\n\t\t// A stream answer can arrive while this request waits for authorization.\n\t\tif (legacyKey !== undefined) this.#legacyRequests.set(legacyKey, request);\n\t\tconst unused = async () => {\n\t\t\twhile (request.priority.peek() !== undefined && request.closed.peek() === undefined)\n\t\t\t\tawait Signal.race(request.priority, request.closed);\n\t\t\t// An accepted legacy producer belongs to the stream subscription, including gaps\n\t\t\t// between datagram readers. Its priority watcher releases only their extra demand.\n\t\t\tif (legacyKey !== undefined && this.#legacyDatagrams.has(legacyKey)) return;\n\t\t\tif (request.priority.peek() === undefined && (!producer || hooks.closeUnusedDatagrams(producer)))\n\t\t\t\tcancel.abort(new StreamError(StreamCode.Cancel));\n\t\t};\n\t\tvoid unused();\n\t\tconst grant = this.#grant?.subscribe(() => {\n\t\t\tif (this.#denied(path)) cancel.abort(unauthorized(path));\n\t\t});\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!hasDatagrams(this.version) ||\n\t\t\t\tDatagramStream.maxDatagramSize(this.#quic) === 0 ||\n\t\t\t\t!DatagramStream.canReceiveDatagrams(this.#quic)\n\t\t\t)\n\t\t\t\tthrow new Error(\"transport does not support datagram tracks\");\n\t\t\tconst ready = await this.#auth?.ready(path, \"subscribe\", {\n\t\t\t\tsignal,\n\t\t\t\tuntil: () => Promise.resolve(request.closed),\n\t\t\t});\n\t\t\tif (ready === false) throw new StreamError(StreamCode.Cancel);\n\t\t\tif (this.#denied(path)) throw unauthorized(path);\n\t\t\tsignal.throwIfAborted();\n\t\t\tif (!hasDatagramTracks(this.version)) {\n\t\t\t\tawait this.#legacyDatagramRequest(consumed, consumer, request, signal);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst deadline = new Deadline();\n\t\t\tlet priority = request.priority.peek() ?? 0;\n\t\t\tconst answered = await deadline.wait(\n\t\t\t\tthis.#exchange(\n\t\t\t\t\t{ version: this.version },\n\t\t\t\t\tasync (opened) => {\n\t\t\t\t\t\tstream = opened;\n\t\t\t\t\t\tthis.#unanswered.add(id);\n\t\t\t\t\t\tawait opened.writer.u53(StreamId.Datagrams);\n\t\t\t\t\t\tawait new Datagrams({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tbroadcast: path,\n\t\t\t\t\t\t\tidentity: consumed.identity,\n\t\t\t\t\t\t\ttrack: request.name,\n\t\t\t\t\t\t\tpriority,\n\t\t\t\t\t\t}).encode(opened.writer, this.version);\n\t\t\t\t\t\tconst info = await DatagramsInfo.decode(opened.reader, this.version);\n\t\t\t\t\t\treturn info;\n\t\t\t\t\t},\n\t\t\t\t\tsignal,\n\t\t\t\t\tdeadline,\n\t\t\t\t),\n\t\t\t);\n\t\t\tsignal.throwIfAborted();\n\t\t\tif (!stream) throw new Error(\"datagram stream was not opened\");\n\t\t\tproducer = request.accept(answered);\n\t\t\tconst route: DatagramEntry = { producer, timescale: answered.timescale };\n\t\t\tthis.#datagrams.set(id, route);\n\t\t\tthis.#unanswered.delete(id);\n\t\t\tconst opened = stream;\n\t\t\tconst receiving = producer;\n\t\t\t// The only thing following DATAGRAMS_INFO is the publisher's FIN. Its last datagram may\n\t\t\t// arrive alongside, so the datagrams already received route first.\n\t\t\tconst ended = opened.reader.done().then(async (done) => {\n\t\t\t\tif (!done) throw new ProtocolViolation(\"data after DATAGRAMS_INFO\");\n\t\t\t\troute.ended = true;\n\t\t\t\tawait this.#datagramsRouted(id);\n\t\t\t\treceiving.finish();\n\t\t\t});\n\t\t\tvoid ended.catch(() => {});\n\t\t\twhile (producer.closed.peek() === undefined) {\n\t\t\t\tconst next = producer.priority.peek();\n\t\t\t\tif (next === undefined && hooks.closeUnusedDatagrams(producer)) break;\n\t\t\t\tif (next !== undefined && next !== priority) {\n\t\t\t\t\tawait untilAborted(new DatagramsUpdate(next).encode(opened.writer, this.version), signal);\n\t\t\t\t\tpriority = next;\n\t\t\t\t\t// The priority may have changed again during the write, before the wait below.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tawait untilAborted(race([ended, Signal.race(producer.priority, producer.closed)]), signal);\n\t\t\t}\n\t\t\tconst closed = producer.closed.peek();\n\t\t\tif (closed instanceof Error) throw closed;\n\t\t\tstream.writer.close();\n\t\t} catch (err) {\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\tconst cause = error(err);\n\t\t\tcancel.abort(cause);\n\t\t\trequest.reject(cause);\n\t\t\tstream?.abort(cause);\n\t\t} finally {\n\t\t\tif (legacyKey !== undefined && this.#legacyRequests.get(legacyKey) === request)\n\t\t\t\tthis.#legacyRequests.delete(legacyKey);\n\t\t\tgrant?.();\n\t\t\tthis.#unanswered.delete(id);\n\t\t\tthis.#datagrams.delete(id);\n\t\t\tcancel.abort(new StreamError(StreamCode.Cancel));\n\t\t\tstream?.reader.stop(StreamCode.Cancel);\n\t\t}\n\t}\n\n\t// Lite-05/06: the shared producer holds stream demand while any datagram reader exists.\n\tasync #legacyDatagramRequest(\n\t\tconsumed: Consumed,\n\t\tconsumer: broadcast.Consumer,\n\t\trequest: datagram.Request,\n\t\tsignal: AbortSignal,\n\t): Promise<void> {\n\t\tconst key = JSON.stringify([consumed.id, request.name]);\n\t\tconst subscriber = wireOf(consumer).subscribe(request.name, latestAt(request.priority.peek() ?? 0));\n\t\ttry {\n\t\t\tawait untilAborted(subscriber.info(), signal);\n\t\t\tconst shared = this.#legacyDatagrams.get(key);\n\t\t\tif (!shared) throw new Error(\"stream subscription did not bind its datagram track\");\n\t\t\tconst producer = shared.producer;\n\t\t\t// Once registered, the shared producer owns demand regardless of which kind joined first.\n\t\t\tsubscriber.close();\n\t\t\tconst closed = await untilAborted(Promise.resolve(producer.closed), signal);\n\t\t\tif (closed instanceof Error) throw closed;\n\t\t} finally {\n\t\t\tsubscriber.close();\n\t\t}\n\t}\n\n\t// Answer listings of a consumed broadcast from the peer's TRACKS while anyone lists it, until\n\t// the broadcast closes. Every listing of the broadcast shares one TRACKS stream.\n\tasync #runListing(broadcast: Path.Valid, consumed: Consumed, lister: Lister) {\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\tif (lister.closed.peek() !== undefined || this.#closed.signal.aborted) return;\n\t\t\t\tif (!lister.wanted.peek()) {\n\t\t\t\t\tawait untilAborted(race([Signal.race(lister.wanted, lister.closed)]), this.#closed.signal).catch(\n\t\t\t\t\t\t() => {},\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!hasTracks(this.version)) {\n\t\t\t\t\t// An empty answer would claim the peer lists nothing.\n\t\t\t\t\tlister.abort(new Error(\"track listing requires moq-lite-07 or newer\"));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tawait this.#listTracks(broadcast, consumed, lister);\n\t\t\t}\n\t\t} finally {\n\t\t\tlister.close();\n\t\t}\n\t}\n\n\t// Forward the peer's TRACKS listing of `broadcast` into `lister` until the peer ends it, it\n\t// fails, our grant stops covering the broadcast, or nobody lists the broadcast any more.\n\t// Returns without answering when setup was cut short, for the caller to look again.\n\tasync #listTracks(broadcast: Path.Valid, consumed: Consumed, lister: Lister): Promise<void> {\n\t\t// The consumed identity must still be the selected one until the request is out, then\n\t\t// not replaced until the peer answers: a TRACKS request without an identity lists whichever\n\t\t// identity won the path when it arrived.\n\t\tconst valid = consumed.valid;\n\t\tif (valid?.aborted) {\n\t\t\tlister.abort(error(valid.reason));\n\t\t\treturn;\n\t\t}\n\t\tconst setup = valid ? AbortSignal.any([this.#closed.signal, valid]) : this.#closed.signal;\n\t\t// A listing is a subscribe: one opened before a token that covers it is answered would be\n\t\t// refused by the peer.\n\t\tconst ready = await this.#auth\n\t\t\t?.ready(broadcast, \"subscribe\", {\n\t\t\t\tsignal: setup,\n\t\t\t\tuntil: async () => {\n\t\t\t\t\twhile (lister.wanted.peek() && lister.closed.peek() === undefined) {\n\t\t\t\t\t\tawait Signal.race(lister.wanted, lister.closed);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t})\n\t\t\t.catch(() => false);\n\t\t// The readers may have left while the wait settled, before the unused watch below is armed.\n\t\tif (ready === false || setup.aborted || !lister.wanted.peek()) return;\n\n\t\t// Armed before the first check and held to the end, so a shrink is never missed.\n\t\tconst refused = unauthorized(broadcast);\n\t\tconst revoked = new AbortController();\n\t\tconst disposeGrant = this.#grant?.subscribe(() => {\n\t\t\tif (this.#denied(broadcast)) revoked.abort(refused);\n\t\t});\n\t\tif (this.#denied(broadcast)) {\n\t\t\tdisposeGrant?.();\n\t\t\tlister.abort(refused);\n\t\t\treturn;\n\t\t}\n\t\t// Each listed track holds an announces slot: discovery state the peer makes us hold. Each\n\t\t// kind is a namespace apart.\n\t\tconst listedTracks = new Set<string>();\n\t\tconst listedDatagrams = new Set<string>();\n\t\tconst listed = (type: Kind) => (type === \"datagrams\" ? listedDatagrams : listedTracks);\n\t\tconst unused = new AbortController();\n\t\tconst stop = AbortSignal.any([unused.signal, revoked.signal, this.#closed.signal]);\n\t\tconst disposeWanted = lister.wanted.subscribe((wanted) => {\n\t\t\tif (!wanted) unused.abort(new StreamError(StreamCode.Cancel, { message: \"listing unused\" }));\n\t\t});\n\t\tlet stream: Stream | undefined;\n\t\ttry {\n\t\t\tconst cut = valid ? AbortSignal.any([stop, valid]) : stop;\n\t\t\tstream = await Stream.tryOpen(this.#quic, { version: this.version, signal: cut });\n\t\t\t// Gave up, perhaps handed a stream as it did: the catch below hands back any stream.\n\t\t\tif (!stream || cut.aborted) throw cut.reason;\n\t\t\tawait stream.writer.u53(StreamId.Tracks);\n\t\t\tawait new TracksMessage(broadcast, consumed.identity).encode(stream.writer, this.version);\n\t\t\tlet synced = false;\n\t\t\tconst answering = consumed.answering;\n\t\t\tlet unanswered = answering ? AbortSignal.any([stop, answering]) : stop;\n\t\t\tfor (;;) {\n\t\t\t\tconst pause = listingBudget.poll();\n\t\t\t\tif (pause !== undefined) await untilAborted(pause, stop);\n\t\t\t\tconst event = await untilAborted(decodeTracksEventMaybe(stream.reader, this.version), unanswered);\n\t\t\t\tunanswered = stop;\n\t\t\t\tif (!event) {\n\t\t\t\t\t// The peer's broadcast ended, whether or not its retraction has arrived: end the\n\t\t\t\t\t// listing and let go of what it listed. FIN our half too, so the stream is done.\n\t\t\t\t\tstream.writer.close();\n\t\t\t\t\tlister.end();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (event.kind === \"added\") {\n\t\t\t\t\tif (listed(event.type).has(event.name))\n\t\t\t\t\t\tthrow new ProtocolViolation(`track listed twice: ${event.name}`);\n\t\t\t\t\tif (!this.#announces.tryAcquire()) {\n\t\t\t\t\t\tthrow new SessionError(SessionCode.TooManyRequests, { reason: \"too many listed tracks\" });\n\t\t\t\t\t}\n\t\t\t\t\tlisted(event.type).add(event.name);\n\t\t\t\t\tif (event.type === \"datagrams\") {\n\t\t\t\t\t\tconst info = { priority: event.info.priority, timescale: event.info.timescale ?? null };\n\t\t\t\t\t\tlister.add(event.name, { type: \"datagrams\", info });\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlister.add(event.name, { type: \"track\", info: this.#toModelInfo(event.info) });\n\t\t\t\t\t}\n\t\t\t\t} else if (event.kind === \"removed\" || event.kind === \"finished\") {\n\t\t\t\t\tif (!listed(event.type).delete(event.name))\n\t\t\t\t\t\tthrow new ProtocolViolation(`unlisted track removed: ${event.name}`);\n\t\t\t\t\tthis.#announces.release();\n\t\t\t\t\tif (event.kind === \"finished\") lister.finish(event.name, event.type);\n\t\t\t\t\telse lister.remove(event.name, event.type);\n\t\t\t\t} else {\n\t\t\t\t\tif (synced) throw new ProtocolViolation(\"duplicate SYNCED\");\n\t\t\t\t\tsynced = true;\n\t\t\t\t\t// Synced when the peer is, so a track listed after it is new upstream too.\n\t\t\t\t\tlister.synced();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tif (revoked.signal.aborted) {\n\t\t\t\t// Reset rather than cancel, so the peer reads a revocation instead of a routine end.\n\t\t\t\tconsole.debug(`tracks revoked: broadcast=${broadcast}`);\n\t\t\t\tstream?.abort(refused);\n\t\t\t\tlister.abort(refused);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (unused.signal.aborted) {\n\t\t\t\t// Nobody lists the broadcast any more: cancel the peer's listing.\n\t\t\t\tstream?.close();\n\t\t\t\tlister.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\tconsole.debug(`tracks failed: broadcast=${broadcast} error=${reason(e)}`);\n\t\t\tstream?.abort(e);\n\t\t\tlister.abort(e);\n\t\t} finally {\n\t\t\tdisposeGrant?.();\n\t\t\tdisposeWanted();\n\t\t\tthis.#announces.release(listedTracks.size + listedDatagrams.size);\n\t\t}\n\t}\n\n\tasync #runSubscribe(\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\trequest: track.Request,\n\t\tconsumer: broadcast.Consumer,\n\t) {\n\t\tconst id = this.#subscribeNext++;\n\t\tif (wireRanges(request.subscription.ranges ?? [{}]).length === 0) {\n\t\t\trequest.reject(new Error(EMPTY_RANGE));\n\t\t\treturn;\n\t\t}\n\t\tconst refused = unauthorized(broadcast);\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\tconst ready = await this.#auth?.ready(broadcast, \"subscribe\", {\n\t\t\t\t\tsignal: consumed.valid,\n\t\t\t\t\tuntil: () => unwanted(request.demand()),\n\t\t\t\t});\n\t\t\t\tif (ready !== false) break;\n\t\t\t\t// Demand returning before we commit is not abandonment, matching the serving loop.\n\t\t\t\tif (!isAbandoned(request.demand())) continue;\n\t\t\t\trequest.reject(new Error(\"subscribe abandoned before it was authorized\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\trequest.reject(error(err));\n\t\t\treturn;\n\t\t}\n\t\t// Armed before the first check and held to the end, so a shrink while the\n\t\t// subscription sets up is never missed: it resets whatever reached the wire.\n\t\tconst state: SubscribeSetup = {\n\t\t\tcancel: new AbortController(),\n\t\t\tconsumer,\n\t\t\tconsumedId: consumed.id,\n\t\t\tlegacyKey: JSON.stringify([consumed.id, request.name]),\n\t\t};\n\t\tconst disposeGrant = this.#grant?.subscribe(() => {\n\t\t\tif (state.revoked || !this.#denied(broadcast)) return;\n\t\t\tstate.revoked = refused;\n\t\t\tconsole.debug(`subscribe revoked: id=${id} broadcast=${broadcast} track=${request.name}`);\n\t\t\tstate.cancel.abort(refused);\n\t\t\tif (state.producer) hooks.abortTrack(state.producer, refused);\n\t\t\tstate.stream?.abort(refused);\n\t\t});\n\t\ttry {\n\t\t\tif (this.#denied(broadcast)) {\n\t\t\t\trequest.reject(refused);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait this.#serveSubscribe(id, broadcast, consumed, request, state);\n\t\t} finally {\n\t\t\tdisposeGrant?.();\n\t\t}\n\t}\n\n\tasync #serveSubscribe(\n\t\tid: bigint,\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\trequest: track.Request,\n\t\tstate: SubscribeSetup,\n\t) {\n\t\tconst { valid } = consumed;\n\t\tconst { ranges, placed } = wireHeld(request.subscription);\n\t\tconst msg = this.#subscribeMessage(id, broadcast, consumed, request, rangesPolicy(ranges), ranges, placed);\n\n\t\tconsole.debug(`subscribe start: id=${id} broadcast=${broadcast} track=${request.name}`);\n\n\t\t// The publisher's application may hold its answer, so the setup waits for it until the\n\t\t// last subscriber leaves, the broadcast goes, or the session ends. The stream handles\n\t\t// flow back via `state` so a failed setup can close them even if they open later, and\n\t\t// `cancel` ends a setup still running, resetting its TRACK stream.\n\t\tconst retire = this.#retirer(state, valid);\n\t\tvalid?.addEventListener(\"abort\", retire);\n\t\tif (valid?.aborted) retire();\n\t\tconst deadline = new Deadline();\n\t\tconst setup = this.#openSubscribe(state, consumed, msg, { ranges, placed }, request, id, deadline);\n\n\t\t// Subscribers and info lookups explicitly own setup, including the handoff from\n\t\t// metadata acceptance to reader attachment. Release it when the last owner leaves.\n\t\tconst left = new AbortController();\n\t\tconst demand = request.demand();\n\t\tlet unwatch: Dispose | undefined;\n\t\tconst watch = () => {\n\t\t\tif (isAbandoned(demand)) {\n\t\t\t\tleft.abort(\n\t\t\t\t\tnew StreamError(StreamCode.Cancel, { message: \"subscribe abandoned before it was accepted\" }),\n\t\t\t\t);\n\t\t\t\tstate.cancel.abort(left.signal.reason);\n\t\t\t} else {\n\t\t\t\tunwatch = Signal.race(demand.wanted, hooks.demandReleased(demand)).changed(watch);\n\t\t\t}\n\t\t};\n\t\twatch();\n\n\t\tlet opened: { stream: Stream; entry: SubscribeEntry };\n\t\ttry {\n\t\t\topened = await deadline.wait(untilAborted(untilAborted(setup, valid), left.signal));\n\t\t\tconsole.debug(`subscribe ok: id=${id} broadcast=${broadcast} track=${request.name}`);\n\t\t} catch (err) {\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\t// Local abandonment commits without yielding after the demand check. A revocation\n\t\t\t// says so instead.\n\t\t\tconst e = state.revoked ?? (left.signal.aborted ? left.signal.reason : await sessionCause(this.#quic, err));\n\t\t\tstate.cancel.abort(e);\n\t\t\tvalid?.removeEventListener(\"abort\", retire);\n\t\t\trequest.reject(e);\n\t\t\tthis.#subscribes.delete(id);\n\t\t\tconsole.warn(`subscribe error: id=${id} broadcast=${broadcast} track=${request.name} error=${reason(e)}`);\n\t\t\t// Close the streams open now, since a write blocked on flow control may never let\n\t\t\t// setup settle, and any that open later once it does. Cover both branches: setup\n\t\t\t// may resolve late, or it may reject (e.g. encode/decode failure) after a stream\n\t\t\t// is open.\n\t\t\tconst leave = () => {\n\t\t\t\tstate.stream?.abort(e);\n\t\t\t\tstate.track?.close();\n\t\t\t};\n\t\t\tleave();\n\t\t\tsetup.then(leave, leave);\n\t\t\treturn;\n\t\t} finally {\n\t\t\tunwatch?.();\n\t\t}\n\t\tvalid?.removeEventListener(\"abort\", retire);\n\n\t\tconst { stream, entry } = opened;\n\t\tawait this.#serveStream(id, broadcast, consumed, state, stream, entry, msg);\n\t}\n\n\t// The SUBSCRIBE of `target` (a metadata subscription for its metadata copy) asking for `ranges`,\n\t// its wire ranges in the model, at `policy` as a wire without a policy per range carries one, each\n\t// live join `placed` at a group by index starting there. Its own wire ranges wait for the track's\n\t// timescale when they name a time (see `#withRanges`).\n\t#subscribeMessage(\n\t\tid: bigint,\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\ttarget: { name: string; meta: boolean },\n\t\tpolicy: Policy,\n\t\tranges: readonly track.Range[],\n\t\tplaced: ReadonlyMap<number, bigint> = new Map(),\n\t): Subscribe {\n\t\tconst span = wireSpan(placedAsTimes(ranges, placed));\n\t\treturn new Subscribe({\n\t\t\tid,\n\t\t\tbroadcast,\n\t\t\tidentity: consumed.identity,\n\t\t\ttrack: target.name,\n\t\t\tpriority: policy.priority,\n\t\t\torder: policy.order,\n\t\t\tmaxDelay: maxAge(ranges),\n\t\t\tstartGroup: span.start,\n\t\t\tendGroup: inclusiveGroupEnd(span.end),\n\t\t\tmeta: target.meta,\n\t\t});\n\t}\n\n\t// Ends a subscription's setup once `signal` aborts: its streams, and the track it accepted.\n\t#retirer(state: SubscribeSetup, signal?: AbortSignal): () => void {\n\t\treturn () => {\n\t\t\tstate.cancel.abort(signal?.reason);\n\t\t\tif (state.producer) hooks.abortTrack(state.producer, error(signal?.reason));\n\t\t\tstate.stream?.abort(error(signal?.reason));\n\t\t};\n\t}\n\n\t// Serve one SUBSCRIBE stream into its track until it ends.\n\tasync #serveStream(\n\t\tid: bigint,\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\tstate: SubscribeSetup,\n\t\tstream: Stream,\n\t\tentry: SubscribeEntry,\n\t\tmsg: Subscribe,\n\t): Promise<void> {\n\t\tconst { answering } = consumed;\n\t\tconst producer = entry.track;\n\t\t// Sent but unanswered (lite-05+; older drafts already waited for SUBSCRIBE_OK), only a\n\t\t// replacement refuses it, since that identity may be the one answering.\n\t\tconst replaced = this.#retirer(state, answering);\n\t\tif (entry.unanswered && answering) {\n\t\t\tanswering.addEventListener(\"abort\", replaced, { signal: entry.unanswered.answered.signal });\n\t\t\tif (answering.aborted) replaced();\n\t\t}\n\t\ttry {\n\t\t\t// Watch for subscription changes and send SUBSCRIBE_UPDATE. Lite01/Lite02\n\t\t\t// don't carry SUBSCRIBE_UPDATE on the wire, so skip the watcher there\n\t\t\t// and just wait on the stream/track like before.\n\t\t\t//\n\t\t\t// The publisher sends responses on this stream until its FIN. Group streams can\n\t\t\t// still be in flight, so the track ends only once the tail is accounted for. A reset\n\t\t\t// rejects instead, so the track ends with that error rather than a clean tail.\n\t\t\tconst responses = this.#read(stream, entry);\n\t\t\tlet tailSettled = false;\n\t\t\tconst responsesEnded = new Once<null>();\n\t\t\tconst closed = responses.then(\n\t\t\t\tasync () => {\n\t\t\t\t\tif (entry.feedEnded?.peek()) return;\n\t\t\t\t\tawait this.#settleTail(entry);\n\t\t\t\t\ttailSettled = true;\n\t\t\t\t},\n\t\t\t\t(err: unknown) => {\n\t\t\t\t\t// After we acknowledge its tail, a reset ends only the original feed.\n\t\t\t\t\tif (entry.feedEnded?.peek() && err instanceof StreamError && !this.#quicClosed.peek()) return;\n\t\t\t\t\tthrow err;\n\t\t\t\t},\n\t\t\t);\n\t\t\tvoid responses.then(\n\t\t\t\t() => responsesEnded.set(null),\n\t\t\t\t() => responsesEnded.set(null),\n\t\t\t);\n\t\t\tvoid closed.catch((err: unknown) => {\n\t\t\t\tconst violation = closeViolation(this.#quic, err);\n\t\t\t\t// The finished copy can already be serving new requests by the time this arrives.\n\t\t\t\tif (entry.feedEnded?.peek() && hooks.trackReleased(producer).peek() === undefined)\n\t\t\t\t\thooks.abortTrack(producer, violation ?? error(err));\n\t\t\t});\n\t\t\tconst subscriptionUpdates =\n\t\t\t\tthis.version === Version.DRAFT_01 || this.version === Version.DRAFT_02\n\t\t\t\t\t? undefined\n\t\t\t\t\t: this.#runSubscriptionUpdates(id, broadcast, entry, msg, stream);\n\n\t\t\t// Terminal conditions (stream end, track close, a failed subscription update) settle at most\n\t\t\t// once; race them into one stable promise so the demand loop doesn't re-subscribe each pass.\n\t\t\t// Updates stop quietly at the FIN or a failed write, either of which can land before the\n\t\t\t// responses ahead of it are decoded, so only a refused update is terminal on its own.\n\t\t\tconst terminal: PromiseLike<unknown>[] = [closed, hooks.trackReleased(producer)];\n\t\t\tif (entry.feedEnded) terminal.push(entry.feedEnded);\n\t\t\tif (subscriptionUpdates !== undefined) terminal.push(subscriptionUpdates.then(() => closed));\n\t\t\tconst done = race(terminal);\n\n\t\t\t// Serve until a terminal condition fires or the last local subscriber leaves. The unused\n\t\t\t// wake is level-triggered: re-check demand so a subscriber that returns before we tear\n\t\t\t// down (e.g. a quickly unmuted tile) resumes on the same subscription.\n\t\t\tconst idle = Symbol(\"idle\");\n\t\t\tconst demand = producer.demand();\n\t\t\tlet reason_: unknown;\n\t\t\tfor (;;) {\n\t\t\t\treason_ = await race([done, unwanted(demand).then(() => idle)]);\n\t\t\t\tif (reason_ === idle && hooks.demandReleased(demand).peek() === undefined && demand.wanted.peek())\n\t\t\t\t\tcontinue;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttailSettled ||= entry.feedEnded?.peek() !== undefined;\n\n\t\t\t// A settled lite-05+ tail acknowledges completion with FIN, without cancelling\n\t\t\t// the publisher's already-finished receive half. On lite-07, a clean FIN means\n\t\t\t// \"no further updates; keep delivering\", so cancelling an unsettled subscription\n\t\t\t// must abort it instead.\n\t\t\tif (tailSettled && waitsForSubscriberFin(this.version)) this.#fin(stream, entry);\n\t\t\telse if (entry.stream.kind !== \"fin\") {\n\t\t\t\tif (keepsSubscribeOpen(this.version))\n\t\t\t\t\tstream.abort(new StreamError(StreamCode.Cancel, { message: \"cancel\" }));\n\t\t\t\telse stream.close();\n\t\t\t}\n\t\t\tconsole.debug(`subscribe close: id=${id} broadcast=${broadcast} track=${producer.name}`);\n\n\t\t\t// Only a received SUBSCRIBE_END, or before lite-05 a FIN, declares the track's end: a\n\t\t\t// subscription nobody wants anymore is a released copy, not finished content.\n\t\t\tif (tailSettled) {\n\t\t\t\tif (entry.feedEnded?.peek() === undefined) entry.feedEnded?.set(\"ended\");\n\t\t\t\tif (entry.stream.kind === \"finished\") producer.finish();\n\t\t\t\thooks.settleTail(producer);\n\t\t\t\tentry.fills?.finishFeed();\n\t\t\t\tif (entry.feedEnded || (entry.fills && !entry.fills.isEmpty())) {\n\t\t\t\t\tif (entry.datagrams) await this.#endDatagrams(id, entry, producer);\n\t\t\t\t\tawait this.#serveFinished(broadcast, consumed, entry, demand, responsesEnded);\n\t\t\t\t}\n\t\t\t}\n\t\t\thooks.releaseTrack(producer);\n\t\t} catch (err) {\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\thooks.abortTrack(producer, e);\n\t\t\tconsole.warn(`subscribe error: id=${id} broadcast=${broadcast} track=${producer.name} error=${reason(e)}`);\n\t\t\tstream.abort(e);\n\t\t} finally {\n\t\t\tanswering?.removeEventListener(\"abort\", replaced);\n\t\t\tif (entry.feedEnded?.peek()) stream.reader.stop(StreamCode.Cancel);\n\t\t\tentry.tail.close();\n\t\t\tentry.unanswered?.held.close();\n\t\t\tentry.datagramDemand?.();\n\t\t\tif (entry.datagrams) await this.#endDatagrams(id, entry, producer);\n\n\t\t\tthis.#subscribes.delete(id);\n\t\t}\n\t}\n\n\t// A finished lite-07 copy places unresolved time starts on separate subscriptions. Keep it\n\t// while readers or fills still need it, without changing the original feed's ranges after FIN.\n\tasync #serveFinished(\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\tentry: SubscribeEntry,\n\t\tdemand: track.Demand,\n\t\tresponsesEnded: Once<null>,\n\t) {\n\t\tconst requested = hooks.requested(entry.track);\n\t\tconst released = hooks.trackReleased(entry.track);\n\t\tconst scoped = hooks.hasScopedDrops(entry.track);\n\t\tconst probes = new Map<bigint, TimeProbe>();\n\t\tconst answers = new Map<bigint, bigint | undefined>();\n\t\ttry {\n\t\t\twhile (released.peek() === undefined) {\n\t\t\t\tif (this.#quicClosed.peek()) throw await closeError(this.#quic);\n\t\t\t\tconst read = entry.feedEnded !== undefined && !isAbandoned(demand);\n\t\t\t\tconst asks = new Set(read ? requested.asks() : []);\n\t\t\t\tconst readingProbe = read && [...probes.values()].some(({ recovery }) => recovery.reading());\n\t\t\t\tif (\n\t\t\t\t\t(entry.fills?.isEmpty() ?? true) &&\n\t\t\t\t\t!readingProbe &&\n\t\t\t\t\tasks.size === 0 &&\n\t\t\t\t\t!(read && (scoped || responsesEnded.peek() === undefined))\n\t\t\t\t)\n\t\t\t\t\treturn;\n\t\t\t\tconst current = requested.peek();\n\t\t\t\tconst priority = rangesPolicy(current === undefined ? [] : wireHeld(current).ranges).priority;\n\t\t\t\tlet moved = false;\n\t\t\t\tlet refused = false;\n\t\t\t\tfor (const time of answers.keys()) {\n\t\t\t\t\tif (!asks.has(time)) moved = answers.delete(time) || moved;\n\t\t\t\t}\n\t\t\t\tfor (const [time, probe] of probes) {\n\t\t\t\t\tif (!asks.has(time) && (!read || !probe.recovery.reading())) {\n\t\t\t\t\t\tprobe.recovery.cancel();\n\t\t\t\t\t\tprobes.delete(time);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst done = probe.done.peek();\n\t\t\t\t\tconst start = probe.start.peek();\n\t\t\t\t\tif (asks.has(time) && !answers.has(time)) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tstart &&\n\t\t\t\t\t\t\t(start.group === undefined || start.group > time || probe.recovery.arrived() || done)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tanswers.set(time, start.group);\n\t\t\t\t\t\t\tmoved = true;\n\t\t\t\t\t\t} else if (done) {\n\t\t\t\t\t\t\trequested.refuseTime(time, done[0]?.refusal.error ?? new NotFound(`time ${time}`));\n\t\t\t\t\t\t\trefused = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (done) probes.delete(time);\n\t\t\t\t}\n\t\t\t\t// A refused reader stops requesting all its starts.\n\t\t\t\tfor (const time of refused ? requested.asks() : asks) {\n\t\t\t\t\tif (answers.has(time) || probes.has(time)) continue;\n\t\t\t\t\tif (entry.end === 0n) {\n\t\t\t\t\t\t// The exclusive end proves every time is empty, even without a SUBSCRIBE_START.\n\t\t\t\t\t\tanswers.set(time, undefined);\n\t\t\t\t\t\tmoved = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (time >= RESERVED) {\n\t\t\t\t\t\trequested.refuseTime(time, new RangeError(\"time probe exceeds the last group key\"));\n\t\t\t\t\t\trefused = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst start = new Once<{ group: bigint | undefined }>();\n\t\t\t\t\tconst done = new Once<Refused[]>();\n\t\t\t\t\tconst recovery = this.#recover(broadcast, consumed, entry, { time, start }, priority);\n\t\t\t\t\tvoid recovery.done.then((refused) => done.set(refused));\n\t\t\t\t\tprobes.set(time, { recovery, start, done });\n\t\t\t\t}\n\t\t\t\tif (moved) hooks.timeStarts(entry.track, answers);\n\t\t\t\t// A refusal may leave other probes without readers. Recheck before parking.\n\t\t\t\tif (refused) continue;\n\t\t\t\tawait Signal.race(\n\t\t\t\t\trequested,\n\t\t\t\t\treleased,\n\t\t\t\t\tdemand.wanted,\n\t\t\t\t\tentry.fillsChanged,\n\t\t\t\t\tresponsesEnded,\n\t\t\t\t\tthis.#quicClosed,\n\t\t\t\t\t...[...probes.values()].flatMap(({ start, done, recovery }) => [\n\t\t\t\t\t\tstart,\n\t\t\t\t\t\tdone,\n\t\t\t\t\t\trecovery.readingChanged,\n\t\t\t\t\t]),\n\t\t\t\t);\n\t\t\t}\n\t\t} finally {\n\t\t\tfor (const probe of probes.values()) probe.recovery.cancel();\n\t\t}\n\t}\n\n\t// Lite-05/06: end the datagrams the subscription carried as its stream track ended, once.\n\tasync #endDatagrams(id: bigint, entry: SubscribeEntry, producer: track.Producer): Promise<void> {\n\t\tconst datagrams = entry.datagrams;\n\t\tif (!datagrams) return;\n\t\tentry.datagrams = undefined;\n\t\t// The stream track's end is its datagrams' end: those received with it route first.\n\t\tif (entry.end !== undefined && !(hooks.trackReleased(producer).peek() instanceof Error)) {\n\t\t\tdatagrams.ended = true;\n\t\t\tawait this.#datagramsRouted(id);\n\t\t}\n\t\tconst closed = hooks.trackReleased(producer).peek();\n\t\tif (closed instanceof Error) hooks.abortDatagrams(datagrams.producer, closed);\n\t\telse if (entry.end !== undefined) datagrams.producer.finish();\n\t\telse datagrams.producer.close();\n\t\tthis.#datagrams.delete(id);\n\t\tif (entry.legacyKey && this.#legacyDatagrams.get(entry.legacyKey) === datagrams)\n\t\t\tthis.#legacyDatagrams.delete(entry.legacyKey);\n\t}\n\n\t// Open the subscribe stream and accept the request (so the application's track.Subscriber\n\t// resolves and incoming groups have a producer to write into) with the track's immutable\n\t// properties. `state.stream` is populated as soon as it opens, and `state.track` once\n\t// answered, so the caller can clean them up once it gives up, even before this promise settles.\n\t//\n\t// On lite-05+ the properties come from a TRACK stream, held open until the SUBSCRIBE is\n\t// answered, and the SUBSCRIBE goes out alongside it rather than a round trip after: it is\n\t// accepted implicitly (no SUBSCRIBE_OK), and needs the info only to read what it receives.\n\t// A time anchor counts in the track's timescale, so a SUBSCRIBE naming one waits for the\n\t// info, as the Rust `pipeline` does. A group stream that beats the info waits on `#pending`,\n\t// unread. Older drafts carry no per-track properties, so they resolve to defaults and just\n\t// drain SUBSCRIBE_OK.\n\tasync #openSubscribe(\n\t\tstate: SubscribeSetup,\n\t\tconsumed: Consumed,\n\t\tmsg: Subscribe,\n\t\tasked: Asked,\n\t\trequest: track.Request,\n\t\tid: bigint,\n\t\tdeadline: Deadline,\n\t): Promise<{ stream: Stream; entry: SubscribeEntry }> {\n\t\tstate.cancel.signal.throwIfAborted();\n\n\t\tif (!hasTrackStream(this.version)) {\n\t\t\t// Older drafts negotiate nothing per-track: verbatim frames with no timeline.\n\t\t\tconst framing = { compress: false, timescale: 0, scale: undefined };\n\t\t\t// Nor a max age: no publisher limit, not the authored default.\n\t\t\tconst entry = this.#register(id, msg, asked, request.accept({ maxAge: null }), framing, state);\n\t\t\tconst stream = await this.#sendSubscribe(state, msg, deadline);\n\t\t\t// The first response MUST be a SUBSCRIBE_OK (older drafts only).\n\t\t\tconst resp = await decodeSubscribeResponse(stream.reader, this.version);\n\t\t\tif (!(\"ok\" in resp)) {\n\t\t\t\tthrow new Error(\"first subscribe response must be SUBSCRIBE_OK\");\n\t\t\t}\n\t\t\treturn { stream, entry };\n\t\t}\n\n\t\t// The TRACK opens first, then the SUBSCRIBE, which is waiting on before it is written.\n\t\t// The answered TRACK is held at once, so a cancellation while the SUBSCRIBE still opens\n\t\t// closes it rather than waiting on an open that may never finish.\n\t\tconst info = this.#trackInfo(msg.broadcast, msg, msg.track, state.cancel.signal, deadline).then((answered) => {\n\t\t\tstate.track = answered.stream;\n\t\t\t// Cancelled as it was answered: the caller may already have left.\n\t\t\tif (state.cancel.signal.aborted) answered.stream.close();\n\t\t\treturn answered;\n\t\t});\n\t\tlet settle: (entry: SubscribeEntry | undefined) => void = () => {};\n\t\tthis.#pending.set(\n\t\t\tid,\n\t\t\tnew Promise((resolve) => {\n\t\t\t\tsettle = resolve;\n\t\t\t}),\n\t\t);\n\t\tconst sending = this.#fitted(this.#withRanges(msg, asked.ranges, asked.placed)).then((msg) =>\n\t\t\tthis.#sendSubscribe(state, msg, deadline),\n\t\t);\n\t\ttry {\n\t\t\t// Either failing fails the subscription: a reset TRACK rejects the request, so the\n\t\t\t// origin can try another route, and the caller resets the SUBSCRIBE.\n\t\t\tconst [answered, stream] = await Promise.all([info, sending]);\n\t\t\t// The setup ended as TRACK_INFO landed: the request is already rejected, so don't\n\t\t\t// accept it again.\n\t\t\tstate.cancel.signal.throwIfAborted();\n\t\t\tconst model = this.#toModelInfo(answered.info);\n\t\t\tconst producer = request.accept(model);\n\t\t\tconst framing = {\n\t\t\t\tcompress: answered.info.compress,\n\t\t\t\ttimescale: wireTimescale(this.version, answered.info.timescale) ?? 0,\n\t\t\t\tscale: model.timescale ?? undefined,\n\t\t\t};\n\t\t\tconst entry = this.#register(id, msg, asked, producer, framing, state);\n\t\t\t// Asks upstream for what the copy's readers miss for as long as the copy lives, across every\n\t\t\t// subscription that feeds it. Its handler opens with the copy, so a fetch judged as soon as\n\t\t\t// the copy is accepted finds it.\n\t\t\tvoid this.#runFills(msg.broadcast, consumed, entry);\n\t\t\tentry.unanswered = { held: answered.stream, answered: new AbortController() };\n\t\t\tsettle(entry);\n\t\t\treturn { stream, entry };\n\t\t} catch (err) {\n\t\t\tsettle(undefined);\n\t\t\t// Whichever exchange outlived the other is no longer wanted.\n\t\t\tvoid info.then(\n\t\t\t\t({ stream }) => stream.abort(error(err)),\n\t\t\t\t() => {},\n\t\t\t);\n\t\t\tvoid sending.then(\n\t\t\t\t(stream) => stream.abort(error(err)),\n\t\t\t\t() => {},\n\t\t\t);\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tthis.#pending.delete(id);\n\t\t}\n\t}\n\n\t// `msg` asking for `ranges` on a wire that carries them, each at its own priority and order, and\n\t// each live join `placed` at a group by index as a Joined start there.\n\t#withRanges(msg: Subscribe, ranges: readonly track.Range[], placed?: ReadonlyMap<number, bigint>): Subscribe {\n\t\tif (hasRanges(this.version)) msg.ranges = toWireRanges(ranges, placed);\n\t\treturn msg;\n\t}\n\n\t// `msg` with its lite-07 ranges widened until they fit, as the Rust `pipeline` does: the union of\n\t// a relay's readers' ranges need not fit one message though each reader's does.\n\tasync #fitted(msg: Subscribe): Promise<Subscribe> {\n\t\tif (!msg.ranges || !hasRanges(this.version)) return msg;\n\t\tconst fields = await this.#subscribeFields(msg, msg);\n\t\tmsg.ranges = [...Fit.fit(msg.ranges, [], [], Fit.budget(fields, 0n, msg.ranges.length)).ranges];\n\t\treturn msg;\n\t}\n\n\t// The bytes a SUBSCRIBE like `msg` under `terms` takes besides its ranges, at the widest id,\n\t// measured with the smallest range, since it carries at least one. Mirrors the Rust\n\t// `subscribe_fields`.\n\tasync #subscribeFields(\n\t\tmsg: Subscribe,\n\t\tterms: { priority: number; order?: track.Order; maxDelay: number | null },\n\t): Promise<number> {\n\t\tconst widest = new Subscribe({\n\t\t\t...msg,\n\t\t\tpriority: terms.priority,\n\t\t\torder: terms.order,\n\t\t\tmaxDelay: terms.maxDelay,\n\t\t\tid: (1n << 64n) - 1n,\n\t\t\tranges: [{}],\n\t\t});\n\t\ttry {\n\t\t\treturn (await Writer.collect(this.version, (w) => widest.encode(w, this.version))).byteLength;\n\t\t} catch {\n\t\t\t// One that can't go out leaves no room, and fails as it would have.\n\t\t\treturn Number.POSITIVE_INFINITY;\n\t\t}\n\t}\n\n\t// Register a subscription's accepted copy, asking for what it `asked`, so incoming groups and\n\t// datagrams find it.\n\t#register(\n\t\tid: bigint,\n\t\tmsg: Subscribe,\n\t\tasked: Asked,\n\t\tproducer: track.Producer,\n\t\tframing: { compress: boolean; timescale: number; scale: Time.Timescale | undefined },\n\t\tstate: SubscribeSetup,\n\t): SubscribeEntry {\n\t\thooks.receiveTrack(producer, {\n\t\t\tresolvesStart: resolvesStart(this.version),\n\t\t\tfillsFromStart: fillsFromStart(this.version),\n\t\t});\n\t\t// A new upstream subscription: stale runs an earlier one reported were judged under other terms.\n\t\thooks.supersedeStale(producer);\n\t\t// A wire whose ranges carry each live join answers where each starts, which alone places a\n\t\t// reader's.\n\t\tif (hasRanges(this.version)) hooks.answersJoins(producer);\n\t\tif (!hasRanges(this.version)) {\n\t\t\thooks.dropAnchors(producer);\n\t\t\t// A wire without ranges starts a time anchor at the first group at or after it, so its\n\t\t\t// readers do too, rather than at an earlier group the copy happens to hold.\n\t\t\thooks.startsAtKeys(producer);\n\t\t}\n\t\t// Lite-06+ resolves where the feed starts only with SUBSCRIBE_START, so a relay serving\n\t\t// this copy holds its first group until the answer arrives.\n\t\tif (resolvesStart(this.version) && !hasRanges(this.version))\n\t\t\thooks.startTrack(producer, { requested: msg.startGroup });\n\t\t// Lite-07 names every start, so the copy and its tail wait for the wire rather than a grace.\n\t\tif (hasSkip(this.version)) hooks.proveTrack(producer);\n\t\tconst live = new LiveRanges(this.version, msg.ranges ?? []);\n\t\tconst entry: SubscribeEntry = {\n\t\t\ttrack: producer,\n\t\t\tmeta: msg.meta,\n\t\t\tstaleCap: capOf(live),\n\t\t\t...framing,\n\t\t\t// Before lite-07, the effective max delay is the stopgap grace: the wrong clock (it\n\t\t\t// bounds presentation-time drift), but it is how long the subscriber was willing to wait\n\t\t\t// for a late group anyway, and no longer than the publisher keeps one fresh.\n\t\t\ttail: new Tail({\n\t\t\t\tgrace: () => (hasSkip(this.version) ? undefined : hooks.tailGrace(producer)),\n\t\t\t\tproven: hasSkip(this.version),\n\t\t\t}),\n\t\t\tfeedEnded: hasSkip(this.version) ? new Once<\"ended\">() : undefined,\n\t\t\trequested: msg.startGroup,\n\t\t\tfloor: msg.startGroup,\n\t\t\tasked: [...asked.ranges],\n\t\t\taskedPlaced: asked.placed,\n\t\t\tlive,\n\t\t\tstarts: new Map(),\n\t\t\tjoinTicks: new Map(),\n\t\t\tjoinBudgets: new Map(),\n\t\t\tsent: 0,\n\t\t\tstream: { kind: \"setup\" },\n\t\t\tfillIds: new Set(),\n\t\t\tprobeIds: new Set(),\n\t\t\tfillGroups: [],\n\t\t\tfillsChanged: new Signal(0),\n\t\t\tbroadcast: msg.broadcast,\n\t\t\tconsumedId: state.consumedId,\n\t\t};\n\t\tif (hasRanges(this.version)) this.#declareFeed(entry);\n\t\tif (hasDatagrams(this.version) && !hasDatagramTracks(this.version) && state.consumer && state.legacyKey) {\n\t\t\tconst info = { priority: producer.priority, timescale: framing.scale };\n\t\t\tconst pending = this.#legacyRequests.get(state.legacyKey);\n\t\t\tconst request = pending?.closed.peek() === undefined ? pending : undefined;\n\t\t\tthis.#legacyRequests.delete(state.legacyKey);\n\t\t\tconst datagrams = request\n\t\t\t\t? request.accept(info)\n\t\t\t\t: wireOf(state.consumer).createDatagrams(producer.name, info, false);\n\t\t\t// Undefined while a live datagram track already holds the name: serve the stream track alone.\n\t\t\tif (datagrams) {\n\t\t\t\tentry.datagrams = { producer: datagrams, timescale: framing.scale };\n\t\t\t\tentry.legacyKey = state.legacyKey;\n\t\t\t\tthis.#datagrams.set(id, entry.datagrams);\n\t\t\t\tthis.#legacyDatagrams.set(state.legacyKey, entry.datagrams);\n\t\t\t\tlet held: track.Subscriber | undefined;\n\t\t\t\tconst sync = () => {\n\t\t\t\t\tconst priority = datagrams.priority.peek();\n\t\t\t\t\tif (priority === undefined) {\n\t\t\t\t\t\theld?.close();\n\t\t\t\t\t\theld = undefined;\n\t\t\t\t\t} else if (held) {\n\t\t\t\t\t\theld.update(latestAt(priority));\n\t\t\t\t\t} else {\n\t\t\t\t\t\theld = producer.subscribe(latestAt(priority));\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst dispose = datagrams.priority.subscribe(sync);\n\t\t\t\tsync();\n\t\t\t\tentry.datagramDemand = () => {\n\t\t\t\t\tdispose();\n\t\t\t\t\theld?.close();\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Before any group of it reaches a reader, its publisher may judge one too old under any\n\t\t// live join it asked.\n\t\thooks.judgeUnder(producer, narrowest(entry.live));\n\t\tthis.#subscribes.set(id, entry);\n\t\tstate.producer = producer;\n\t\treturn entry;\n\t}\n\n\t// Open the subscribe stream and write the SUBSCRIBE on it.\n\tasync #sendSubscribe(state: SubscribeSetup, msg: Subscribe, deadline: Deadline): Promise<Stream> {\n\t\t// Giving up leaves the line, so the next open takes the stream this one was waiting for.\n\t\tconst signal = state.cancel.signal;\n\t\tconst opening = Stream.tryOpen(this.#quic, { version: this.version, signal }).then((opened) => {\n\t\t\tif (!opened) throw signal.reason;\n\t\t\treturn opened;\n\t\t});\n\t\tconst stream = await deadline.open(opening);\n\t\tstate.stream = stream;\n\t\t// Setup was given up as the open handed over its stream: the late-setup handler resets\n\t\t// the stream, so don't send a SUBSCRIBE on it first.\n\t\tsignal.throwIfAborted();\n\t\tawait stream.writer.u53(StreamId.Subscribe);\n\t\tawait msg.encode(stream.writer, this.version);\n\t\treturn stream;\n\t}\n\n\t// Opens a TRACK stream and reads the single TRACK_INFO. Lite-05+ only. The stream\n\t// stays open, as interest in the track, until the caller closes it.\n\tasync #trackInfo(\n\t\tbroadcast: Path.Valid,\n\t\t{ identity }: Pin,\n\t\ttrack: string,\n\t\tsignal: AbortSignal | undefined,\n\t\tdeadline: Deadline,\n\t): Promise<{ info: TrackInfo; stream: Stream }> {\n\t\treturn this.#exchange(\n\t\t\t{ version: this.version },\n\t\t\tasync (stream) => {\n\t\t\t\tawait stream.writer.u53(StreamId.Track);\n\t\t\t\tawait new TrackMessage(broadcast, track, identity).encode(stream.writer, this.version);\n\t\t\t\tconst info = await TrackInfo.decode(stream.reader, this.version);\n\t\t\t\treturn { info, stream };\n\t\t\t},\n\t\t\tsignal,\n\t\t\tdeadline,\n\t\t);\n\t}\n\n\t// Opens a stream and runs a request/response exchange on it, resetting the stream if `run`\n\t// fails. Subscriber.close() or `signal` also resets it while `run` is pending, so a peer that\n\t// never answers cannot hold it open, and a stream that opens after either is reset at once.\n\tasync #exchange<T>(\n\t\toptions: OpenOptions,\n\t\trun: (stream: Stream) => Promise<T>,\n\t\tsignal: AbortSignal | undefined,\n\t\tdeadline: Deadline,\n\t): Promise<T> {\n\t\tconst closed = signal ? AbortSignal.any([this.#closed.signal, signal]) : this.#closed.signal;\n\t\tclosed.throwIfAborted();\n\t\t// Giving up leaves the line, so the next open takes the stream this one was waiting for.\n\t\tconst opening = Stream.tryOpen(this.#quic, { ...options, signal: closed }).then((opened) => {\n\t\t\tif (!opened) throw closed.reason;\n\t\t\treturn opened;\n\t\t});\n\t\tconst stream = await deadline.open(opening);\n\t\tconst abort = () => stream.abort(error(closed.reason));\n\t\tclosed.addEventListener(\"abort\", abort);\n\t\ttry {\n\t\t\tclosed.throwIfAborted();\n\t\t\treturn await untilAborted(run(stream), closed);\n\t\t} catch (err) {\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\tstream.abort(error(err));\n\t\t\tthrow err;\n\t\t} finally {\n\t\t\tclosed.removeEventListener(\"abort\", abort);\n\t\t}\n\t}\n\n\t// Map the wire TRACK_INFO onto the model track.Info a producer/consumer holds.\n\t#toModelInfo(info: TrackInfo): track.Info {\n\t\treturn {\n\t\t\ttimescale: info.timescale ?? null,\n\t\t\t// Publisher Max Age rides on the wire, so the local media-time budget\n\t\t\t// matches what the upstream advertises (relays re-serve with the same bound).\n\t\t\tmaxAge: info.maxAge === undefined ? null : Duration.millis(info.maxAge),\n\t\t\tpriority: info.priority,\n\t\t\trefresh: {\n\t\t\t\tratio: info.refresh ?? null,\n\t\t\t\tinterval: info.refreshInterval === undefined ? null : Duration.millis(info.refreshInterval),\n\t\t\t},\n\t\t\tcompression: info.compress ? \"deflate\" : \"none\",\n\t\t};\n\t}\n\n\t// Resolve a track's immutable model info via a TRACK stream (lite-05+), for the\n\t// ConsumeBroadcast backing track.Consumer.info(). On older drafts there's no TRACK\n\t// stream, so this rejects rather than fabricating defaults. The TRACK stream stays\n\t// open until `hold` aborts, so the publisher keeps the track for whoever asked here;\n\t// aborting it before TRACK_INFO resets the stream.\n\tasync resolveTrackInfo(\n\t\tbroadcast: Path.Valid,\n\t\ttrack: string,\n\t\tpin: Pin = {},\n\t\thold?: AbortSignal,\n\t): Promise<track.Info> {\n\t\tif (!hasTrackStream(this.version)) {\n\t\t\tthrow new Error(\"track info requires moq-lite-05 or newer\");\n\t\t}\n\t\tconst deadline = new Deadline();\n\t\tconst { info, stream } = await deadline.wait(this.#trackInfo(broadcast, pin, track, hold, deadline));\n\t\tif (hold && !hold.aborted) hold.addEventListener(\"abort\", () => stream.close(), { once: true });\n\t\telse stream.close();\n\t\treturn this.#toModelInfo(info);\n\t}\n\n\t/**\n\t * Whether a `fetchGroup(key)` can deduplicate onto an active non-filling subscription for\n\t * `(broadcast, consumed, track)`: true when the active subscription hasn't accounted for `key`\n\t * yet (so unioning transfers at most 1 wire copy) or still caches `key` intact. False when `key`\n\t * was already dropped, reset, or evicted on that subscription (must use one-shot SUBSCRIBE + FIN).\n\t */\n\tcanDeduplicateFetch(broadcast: Path.Valid, consumed: Consumed, track: string, key: bigint): boolean {\n\t\tfor (const entry of this.#subscribes.values()) {\n\t\t\tif (\n\t\t\t\t!entry.filling &&\n\t\t\t\t!entry.fillGroup &&\n\t\t\t\t// A metadata copy holds no payload a payload fetch could take.\n\t\t\t\t!entry.meta &&\n\t\t\t\tentry.broadcast === broadcast &&\n\t\t\t\tentry.consumedId === consumed.id &&\n\t\t\t\tentry.track.name === track\n\t\t\t) {\n\t\t\t\tconst largest = entry.track.largest()?.group;\n\t\t\t\tif (largest !== undefined && key <= largest && !entry.tail.covers(key, key + 1n)) return true;\n\t\t\t\tif (!entry.tail.dropped(key) && hooks.producerHoldsGroup(entry.track, key, true)) return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t// Open a one-shot bounded SUBSCRIBE + FIN for one group, for the ConsumeBroadcast backing\n\t// track.Consumer.fetchGroup() (lite-07).\n\tasync fetchGroup(\n\t\tbroadcast: Path.Valid,\n\t\ttrack: string,\n\t\tkey: bigint,\n\t\toptions: track.FetchGroupOptions = {},\n\t\tconsumed: Consumed = {},\n\t): Promise<netGroup.Consumer> {\n\t\t// On lite-05/06 a FIN unsubscribes, so the one-shot request would be cancelled at once.\n\t\tif (!hasRanges(this.version)) throw new StreamError(StreamCode.NotSupported);\n\t\tconst { identity } = consumed;\n\t\toptions.signal?.throwIfAborted();\n\n\t\t// Coalesce onto a still-open fetch of the same group so we don't open a second stream\n\t\t// (and re-download it); each caller reads an independent mirror.\n\t\t//\n\t\t// Reserve each caller's mirror before the fetch starts or is awaited: the fetch watches\n\t\t// demand from the start, and a fast FIN cannot discard frames before these callers\n\t\t// receive their handles. An abort closes only this caller's mirror, so the stream is\n\t\t// cancelled once the last one leaves.\n\t\t// A minted identity is an object, which JSON prints as {}, so key on its text and flag.\n\t\tconst pin = identity === undefined ? null : [Identity.text(identity), Identity.isMinted(identity)];\n\t\tconst slot = JSON.stringify([consumed.id, broadcast, pin, track, String(key)]);\n\t\tlet entry = this.#fetches.get(slot);\n\t\tlet consumer: netGroup.Consumer;\n\t\tif (entry && entry.group.closed.peek() === undefined) {\n\t\t\tconsumer = entry.group.mirror();\n\t\t} else {\n\t\t\tconst group = new netGroup.Producer(key);\n\t\t\tconsumer = group.mirror();\n\t\t\tentry = {\n\t\t\t\tgroup,\n\t\t\t\taccepted: this.#runFetchSubscribe(broadcast, consumed, track, key, options.priority ?? 0, group),\n\t\t\t};\n\t\t\tthis.#fetches.set(slot, entry);\n\t\t\tvoid group.closed.then(() => {\n\t\t\t\tif (this.#fetches.get(slot)?.group === group) this.#fetches.delete(slot);\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tawait untilAborted(entry.accepted, options.signal);\n\t\t\treturn consumer;\n\t\t} catch (err) {\n\t\t\tconsumer.close();\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t// Lite-07: one-shot bounded SUBSCRIBE([Position(key, 0), Position(key + 1, 0))) + immediate\n\t// subscriber FIN alongside TRACK (1 RTT), delivering the incoming uni Group Stream directly\n\t// into `group`.\n\tasync #runFetchSubscribe(\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\ttrackName: string,\n\t\tkey: bigint,\n\t\tpriority: number,\n\t\tgroup: netGroup.Producer,\n\t): Promise<void> {\n\t\tconst refused = unauthorized(broadcast);\n\t\tconst id = this.#subscribeNext++;\n\t\tconst pending = Promise.withResolvers<SubscribeEntry | undefined>();\n\t\tthis.#pending.set(id, pending.promise);\n\t\tconst arrived = Promise.withResolvers<void>();\n\t\tlet registered = false;\n\t\tlet stream: Stream | undefined;\n\t\ttry {\n\t\t\twhile (\n\t\t\t\t(await this.#auth?.ready(broadcast, \"subscribe\", {\n\t\t\t\t\tsignal: consumed.valid,\n\t\t\t\t\tuntil: () => groupUnwanted(group),\n\t\t\t\t})) === false\n\t\t\t) {\n\t\t\t\tif (group.closed.peek() === undefined && group.demand().wanted.peek()) continue;\n\t\t\t\tthrow new StreamError(StreamCode.Cancel, { message: \"cancel\" });\n\t\t\t}\n\t\t\tconst disposeGrant = this.#grant?.subscribe(() => {\n\t\t\t\tif (this.#denied(broadcast)) hooks.abortGroup(group, refused);\n\t\t\t});\n\t\t\tvoid group.closed.then(() => disposeGrant?.());\n\t\t\tif (this.#denied(broadcast)) throw refused;\n\n\t\t\tconst { identity, valid } = consumed;\n\t\t\tconst cancel = new AbortController();\n\t\t\tvoid group.closed.then((err) => cancel.abort(err ?? new StreamError(StreamCode.Cancel)));\n\t\t\tconst signal = valid ? AbortSignal.any([valid, cancel.signal]) : cancel.signal;\n\t\t\tconst deadline = new Deadline();\n\t\t\tconst answered = this.#trackInfo(broadcast, consumed, trackName, signal, deadline);\n\t\t\tanswered.then(\n\t\t\t\t({ stream: trackStream }) => trackStream.close(),\n\t\t\t\t(err: unknown) => cancel.abort(error(err)),\n\t\t\t);\n\n\t\t\tconst ranges: WireRange[] = [\n\t\t\t\twithPolicy(\n\t\t\t\t\t{\n\t\t\t\t\t\tstart: { absolute: key, frame: 0 },\n\t\t\t\t\t\tend: { absolute: key + 1n, frame: 0 },\n\t\t\t\t\t},\n\t\t\t\t\t{ priority, order: \"ascending\" },\n\t\t\t\t),\n\t\t\t];\n\t\t\tconst msg = new Subscribe({\n\t\t\t\tid,\n\t\t\t\tbroadcast,\n\t\t\t\tidentity,\n\t\t\t\ttrack: trackName,\n\t\t\t\tpriority,\n\t\t\t\torder: \"ascending\",\n\t\t\t\tmaxDelay: null,\n\t\t\t\tstartGroup: key,\n\t\t\t\tendGroup: key,\n\t\t\t\tranges,\n\t\t\t});\n\n\t\t\tconst openSub = this.#exchange(\n\t\t\t\t{ sendOrder: sendOrder({ priority }), version: this.version },\n\t\t\t\tasync (opened) => {\n\t\t\t\t\tconst bytes = await Writer.collect(this.version, async (w) => {\n\t\t\t\t\t\tawait w.u53(StreamId.Subscribe);\n\t\t\t\t\t\tawait msg.encode(w, this.version);\n\t\t\t\t\t});\n\t\t\t\t\tawait opened.writer.write(bytes);\n\t\t\t\t\topened.writer.close();\n\t\t\t\t\treturn opened;\n\t\t\t\t},\n\t\t\t\tsignal,\n\t\t\t\tdeadline,\n\t\t\t);\n\t\t\tconst setup = deadline.wait(Promise.all([openSub, answered]));\n\t\t\tlet info: TrackInfo;\n\t\t\ttry {\n\t\t\t\tconst [opened, infoRes] = await untilAbandoned(group, setup);\n\t\t\t\tstream = opened;\n\t\t\t\tinfo = infoRes.info;\n\t\t\t} catch (err: unknown) {\n\t\t\t\tcancel.abort(error(err));\n\t\t\t\tvoid openSub.then(\n\t\t\t\t\t(opened) => opened.abort(error(err)),\n\t\t\t\t\t() => void 0,\n\t\t\t\t);\n\t\t\t\tthrow err;\n\t\t\t}\n\n\t\t\thooks.bindGroupCompression(group, info.compress);\n\t\t\tconst live = new LiveRanges(this.version, ranges);\n\t\t\tconst target: FetchTarget = {\n\t\t\t\tproducer: group,\n\t\t\t\ttaken: false,\n\t\t\t\tarrived: () => arrived.resolve(),\n\t\t\t};\n\t\t\tconst entry: SubscribeEntry = {\n\t\t\t\t// Unused for fillGroup entries; satisfies the shared SubscribeEntry shape.\n\t\t\t\ttrack: undefined as unknown as track.Producer,\n\t\t\t\tmeta: false,\n\t\t\t\tstaleCap: key + 1n,\n\t\t\t\tcompress: info.compress,\n\t\t\t\ttimescale: wireTimescale(this.version, info.timescale) ?? 0,\n\t\t\t\ttail: new Tail({ grace: () => undefined, proven: true }),\n\t\t\t\trequested: key,\n\t\t\t\tfloor: key,\n\t\t\t\tasked: [],\n\t\t\t\taskedPlaced: new Map(),\n\t\t\t\tlive,\n\t\t\t\tstarts: new Map(),\n\t\t\t\tjoinTicks: new Map(),\n\t\t\t\tjoinBudgets: new Map(),\n\t\t\t\tsent: 0,\n\t\t\t\tstream: { kind: \"setup\" },\n\t\t\t\tfilling: \"range\",\n\t\t\t\tfillIds: new Set(),\n\t\t\t\tprobeIds: new Set(),\n\t\t\t\tfillGroups: [],\n\t\t\t\tfillsChanged: new Signal(0),\n\t\t\t\tfillGroup: target,\n\t\t\t};\n\t\t\tthis.#subscribes.set(id, entry);\n\t\t\tthis.#pending.delete(id);\n\t\t\tpending.resolve(entry);\n\t\t\tregistered = true;\n\n\t\t\tconst responses = this.#readFetchSubscribe(stream, entry, key, target);\n\t\t\tentry.stream = { kind: \"fin\", responses: responses.catch(() => {}) };\n\t\t\tvoid responses.catch((err: unknown) => {\n\t\t\t\tif (!target.taken) arrived.reject(error(err));\n\t\t\t});\n\t\t\t// Keep reading control responses until settled; cleanup runs when both control and group settle.\n\t\t\tvoid responses\n\t\t\t\t.catch(() => {})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tthis.#subscribes.delete(id);\n\t\t\t\t\tentry.tail.close();\n\t\t\t\t});\n\n\t\t\tawait untilAbandoned(group, arrived.promise);\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\tif (!registered) {\n\t\t\t\tthis.#pending.delete(id);\n\t\t\t\tpending.resolve(undefined);\n\t\t\t}\n\t\t\tstream?.abort(e);\n\t\t\thooks.abortGroup(group, e);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t// Read a standalone lite-07 one-shot SUBSCRIBE's responses until publisher FIN, waiting for any\n\t// in-flight uni Group Stream before concluding the group was not delivered.\n\tasync #readFetchSubscribe(stream: Stream, entry: SubscribeEntry, key: bigint, target: FetchTarget): Promise<void> {\n\t\tlet started = false;\n\t\tlet ended = false;\n\t\tlet refused: Error | undefined;\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\tconst resp = await decodeSubscribeResponseMaybe(stream.reader, this.version);\n\t\t\t\tif (!resp) break;\n\t\t\t\tif (\"start\" in resp) {\n\t\t\t\t\tif (started || resp.start.id !== 0n)\n\t\t\t\t\t\tthrow new ProtocolViolation(\"unexpected fetch subscribe SUBSCRIBE_START\");\n\t\t\t\t\tstarted = true;\n\t\t\t\t\tif (resp.start.start === undefined || resp.start.start > key) {\n\t\t\t\t\t\tentry.tail.account(key, key + 1n);\n\t\t\t\t\t\trefused ??= new NotFound(`group ${key}`);\n\t\t\t\t\t}\n\t\t\t\t} else if (\"drop\" in resp || \"skip\" in resp || \"old\" in resp) {\n\t\t\t\t\tconst { start, end } = \"drop\" in resp ? resp.drop : \"skip\" in resp ? resp.skip : resp.old;\n\t\t\t\t\tentry.tail.account(start, end);\n\t\t\t\t\tif (key >= start && key < end) {\n\t\t\t\t\t\t// A lite-07 drop or skip is not found here; a stale verdict, as every drop before\n\t\t\t\t\t\t// lite-07 reads, is old.\n\t\t\t\t\t\tconst stale = \"old\" in resp || (\"drop\" in resp && !hasSkip(this.version));\n\t\t\t\t\t\trefused ??= stale ? new StreamError(StreamCode.Old) : new NotFound(`group ${key}`);\n\t\t\t\t\t\t// The publisher gave up the group: a stream it opened ends with this reason,\n\t\t\t\t\t\t// even where the browser lost its reset. One received whole stays whole.\n\t\t\t\t\t\ttarget.dropped ??= refused;\n\t\t\t\t\t\tif (target.taken) hooks.abortGroup(target.producer, refused);\n\t\t\t\t\t}\n\t\t\t\t} else if (\"end\" in resp) {\n\t\t\t\t\tif (ended) throw new ProtocolViolation(\"duplicate SUBSCRIBE_END\");\n\t\t\t\t\tended = true;\n\t\t\t\t\tif (resp.end.group <= key) {\n\t\t\t\t\t\tentry.tail.account(key, key + 1n);\n\t\t\t\t\t\trefused ??= new NotFound(`group ${key}`);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new ProtocolViolation(\"unexpected fetch subscribe response\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Publisher FIN'd cleanly; wait for the uni Group Stream if not yet arrived or still reading.\n\t\t\t// Lite-07 names every start with no grace timer, but abandoning the fetch or closing the\n\t\t\t// session ends the wait so the subscription entry always cleans up.\n\t\t\tconst stop = new Once<null>();\n\t\t\tconst cancel = () => {\n\t\t\t\tif (stop.peek() === undefined) stop.set(null);\n\t\t\t};\n\t\t\tconst unsubSession = this.#quicClosed.subscribe((closed) => {\n\t\t\t\tif (closed) cancel();\n\t\t\t});\n\t\t\tif (this.#quicClosed.peek()) cancel();\n\t\t\tvoid target.producer.closed.then(cancel, cancel);\n\t\t\ttry {\n\t\t\t\tif (!target.taken && refused === undefined) {\n\t\t\t\t\tconst covered = () => target.taken || entry.tail.covers(key, key + 1n);\n\t\t\t\t\tawait entry.tail.settle(covered, stop);\n\t\t\t\t}\n\t\t\t\tif (entry.tail.reading) {\n\t\t\t\t\tawait entry.tail.settle(() => true, stop);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tunsubSession();\n\t\t\t\tcancel();\n\t\t\t}\n\t\t\tif (!target.taken) {\n\t\t\t\tthrow refused ?? new NotFound(`group ${key}`);\n\t\t\t}\n\t\t\tif (target.lost) hooks.abortGroup(target.producer, refused ?? target.lost);\n\t\t} catch (err: unknown) {\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\tstream.abort(e);\n\t\t\tif (target.taken) hooks.abortGroup(target.producer, e);\n\t\t\tthrow e;\n\t\t}\n\t}\n\n\t// Serve the received copy's misses as its request handler, until the copy closes. Each is asked\n\t// through a subscription (see `RangeFills`): on lite-07 the copy's own, and before it one of its\n\t// own per run, as the Rust serve loop's `range_fills` does.\n\tasync #runFills(broadcast: Path.Valid, consumed: Consumed, entry: SubscribeEntry): Promise<void> {\n\t\tconst requests = entry.track.requests();\n\t\tconst fills = new RangeFills(entry.track, this.version, (groups, priority) =>\n\t\t\tthis.#recover(broadcast, consumed, entry, groups, priority),\n\t\t);\n\t\tentry.fills = fills;\n\t\tconst driving = this.#driveFills(entry, fills);\n\t\ttry {\n\t\t\tfor (let fill = await requests.requestedFill(); fill; fill = await requests.requestedFill())\n\t\t\t\tfills.push(fill);\n\t\t} finally {\n\t\t\trequests.close();\n\t\t\tfills.close();\n\t\t\tawait driving;\n\t\t}\n\t}\n\n\t// Settle `fills` as their inputs change, until the copy closes, asking what they owe through\n\t// `entry`'s subscription. Mirrors the Rust serve loop's `RangeFills::poll`.\n\tasync #driveFills(entry: SubscribeEntry, fills: RangeFills): Promise<void> {\n\t\tconst demand = entry.track.demand();\n\t\twhile (!fills.closed) {\n\t\t\t// A stream still arriving on a recovery is kept only for someone reading it. The\n\t\t\t// finished copy can release its request handler when the last recovery ends.\n\t\t\tconst recovering = fills.recovering;\n\t\t\tif (fills.poll(entry.tail, !isAbandoned(demand)) || fills.recovering !== recovering)\n\t\t\t\tentry.fillsChanged.update((revision) => revision + 1);\n\t\t\tawait fills.changed(entry.tail, demand);\n\t\t}\n\t\tentry.fillsChanged.update((revision) => revision + 1);\n\t}\n\n\t// Ask `asked` of `copy` on a SUBSCRIBE of their own with no max delay, as the Rust `Recovery`\n\t// does: on lite-07 `copy`'s subscription dropped them as stale, or delivered them before and they\n\t// were since evicted, so it never sends them again, and before lite-07 every run is asked this\n\t// way. Its groups land in the copy as a subscription's do. It FINs once every group is accounted\n\t// for and read, and is over at the publisher's FIN in reply, refusing whatever it did not deliver.\n\t#recover(\n\t\tbroadcast: Path.Valid,\n\t\tconsumed: Consumed,\n\t\tcopy: SubscribeEntry,\n\t\tasked: Run | { time: bigint; start: TimeProbe[\"start\"] },\n\t\tpriority: number,\n\t): TimeProbe[\"recovery\"] {\n\t\tconst producer = copy.track;\n\t\tconst id = this.#subscribeNext++;\n\t\t// Narrowed in place once the first group before lite-07 settles how far it reaches.\n\t\tconst groups = \"time\" in asked ? { start: asked.time, end: asked.time + 1n } : { ...asked };\n\t\t// Before lite-07 the subscription proves only the keys below its start, so the range stays open\n\t\t// until the first group that arrives caps it: only upstream knows which group it still holds\n\t\t// past the run, and a relay's start may be its floor, which names no group.\n\t\tconst oneStart = !hasGroupEnd(this.version);\n\t\tconst oneShot = keepsSubscribeOpen(this.version);\n\t\tconst policy: Policy = { priority, order: \"ascending\" };\n\t\tconst ranges: track.Range[] = [span(groups.start, oneStart ? undefined : groups.end) ?? EMPTY];\n\t\t// A metadata copy's fill asks for headers alone too.\n\t\tconst target = { name: producer.name, meta: copy.meta };\n\t\tconst msg = this.#withRanges(this.#subscribeMessage(id, broadcast, consumed, target, policy, ranges), ranges);\n\t\t// Lite-07 recovery asks for exact group bounds [Position(start, 0), Position(end, 0))\n\t\t// rather than time-containment ranges.\n\t\tif (hasRanges(this.version)) {\n\t\t\tmsg.ranges = [\n\t\t\t\twithPolicy(\n\t\t\t\t\t\"time\" in asked\n\t\t\t\t\t\t? probe(asked.time)\n\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\tstart: { absolute: groups.start, frame: 0 },\n\t\t\t\t\t\t\t\tend: { absolute: groups.end, frame: 0 },\n\t\t\t\t\t\t\t},\n\t\t\t\t\tmsg,\n\t\t\t\t),\n\t\t\t];\n\t\t}\n\t\tconst live = new LiveRanges(this.version, msg.ranges ?? []);\n\t\tconst entry: SubscribeEntry = {\n\t\t\ttrack: producer,\n\t\t\tmeta: copy.meta,\n\t\t\tstaleCap: capOf(live),\n\t\t\tcompress: copy.compress,\n\t\t\ttimescale: copy.timescale,\n\t\t\ttail: new Tail({\n\t\t\t\tgrace: () => (hasSkip(this.version) ? undefined : hooks.tailGrace(producer)),\n\t\t\t\tproven: hasSkip(this.version),\n\t\t\t}),\n\t\t\trequested: msg.startGroup,\n\t\t\tfloor: msg.startGroup,\n\t\t\tasked: ranges,\n\t\t\taskedPlaced: new Map(),\n\t\t\tlive,\n\t\t\tstarts: new Map(),\n\t\t\tjoinTicks: new Map(),\n\t\t\tjoinBudgets: new Map(),\n\t\t\tsent: 0,\n\t\t\t// Its responses are read here, which owns this stream's end.\n\t\t\tstream: { kind: \"setup\" },\n\t\t\tfilling: \"time\" in asked ? \"probe\" : \"range\",\n\t\t\tfeedEnded: \"time\" in asked ? new Once<\"ended\">() : undefined,\n\t\t\tfillIds: new Set(),\n\t\t\tprobeIds: new Set(),\n\t\t\tfillGroups: [],\n\t\t\tfillsChanged: new Signal(0),\n\t\t};\n\t\tconst left = new AbortController();\n\t\tconst signal = consumed.valid ? AbortSignal.any([consumed.valid, left.signal]) : left.signal;\n\t\tconst leaving = new Promise<void>((resolve) =>\n\t\t\tleft.signal.addEventListener(\"abort\", () => resolve(), { once: true }),\n\t\t);\n\t\tlet refused: Refused[] = [];\n\t\t// Those the fills have yet to take: each refusal is handed over once.\n\t\tlet fresh: Refused[] = [];\n\t\t// TEMPORARY MIGRATION, delete at the next version cut with `Stall`, once no relay of the\n\t\t// previous release is left. That relay starts the recovery at its floor, sends the next group it\n\t\t// holds, and never accounts for the keys between: it read a SUBSCRIBE asking no max delay as a\n\t\t// 285,000-year grace, so it never asks its own upstream. Once the `Stall` grace passes with no\n\t\t// progress, what is still owed is refused for now: asked a key at a time instead, a sparse span\n\t\t// would cost a request per key.\n\t\tlet stall: Stall | undefined;\n\t\tconst changed = new Signal(0);\n\t\t// What the publisher gives up of the groups, accounted for in the tail. The latest verdict on a\n\t\t// group replaces any earlier one, so a peer repeating its drops grows nothing.\n\t\tconst giveUp = (start: bigint, end: bigint, refusal: Refusal) => {\n\t\t\tstall?.restart();\n\t\t\tentry.tail.account(start, end);\n\t\t\trefused = refuseRun(refused, max(start, groups.start), min(end, groups.end), refusal);\n\t\t\tfresh = refuseRun(fresh, max(start, groups.start), min(end, groups.end), refusal);\n\t\t\tchanged.update((revision) => revision + 1);\n\t\t};\n\t\tthis.#subscribes.set(id, entry);\n\t\tconst done = (async () => {\n\t\t\tlet failed: Error = new StreamError(StreamCode.Cancel, { message: \"recovery ended\" });\n\t\t\tlet stream: Stream | undefined;\n\t\t\ttry {\n\t\t\t\twhile ((await this.#auth?.ready(broadcast, \"subscribe\", { signal, until: () => leaving })) === false) {\n\t\t\t\t\tif (left.signal.aborted) return fresh;\n\t\t\t\t}\n\t\t\t\tif (this.#denied(broadcast)) throw unauthorized(broadcast);\n\t\t\t\tconst opened = await this.#exchange(\n\t\t\t\t\t{ sendOrder: sendOrder({ priority }), version: this.version },\n\t\t\t\t\tasync (stream) => {\n\t\t\t\t\t\tconst bytes = await Writer.collect(this.version, async (w) => {\n\t\t\t\t\t\t\tawait w.u53(StreamId.Subscribe);\n\t\t\t\t\t\t\tawait msg.encode(w, this.version);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tawait stream.writer.write(bytes);\n\t\t\t\t\t\t// Lite-07 one-shot SUBSCRIBE + immediate FIN (1 RTT).\n\t\t\t\t\t\tif (oneShot) stream.writer.close();\n\t\t\t\t\t\treturn stream;\n\t\t\t\t\t},\n\t\t\t\t\tsignal,\n\t\t\t\t\tnew Deadline(),\n\t\t\t\t);\n\t\t\t\tstream = opened;\n\t\t\t\tlet fin = oneShot;\n\t\t\t\t// The update capping the open range at the first group that arrives, which goes out before\n\t\t\t\t// our FIN.\n\t\t\t\tlet capping: Promise<unknown> = Promise.resolve();\n\t\t\t\tlet capped = !oneStart;\n\t\t\t\tlet started = false;\n\t\t\t\tconst cap = () => {\n\t\t\t\t\tcapped = true;\n\t\t\t\t\tconst update = new SubscribeUpdate({\n\t\t\t\t\t\tpriority: msg.priority,\n\t\t\t\t\t\torder: msg.order,\n\t\t\t\t\t\tmaxDelay: msg.maxDelay,\n\t\t\t\t\t\tstartGroup: msg.startGroup,\n\t\t\t\t\t\tendGroup: inclusiveGroupEnd(groups.end),\n\t\t\t\t\t});\n\t\t\t\t\t// A failed write means the publisher stopped reading: its responses decide the end.\n\t\t\t\t\tcapping = Writer.collect(this.version, (w) => update.encode(w, this.version))\n\t\t\t\t\t\t.then((encoded) => opened.writer.write(encoded))\n\t\t\t\t\t\t.catch(() => undefined);\n\t\t\t\t};\n\t\t\t\t// Only a group that arrives proves one, so once started the range stops past the first;\n\t\t\t\t// what lies between is named by the publisher's drops, or given up with the grace.\n\t\t\t\tconst capAtFirst = () => {\n\t\t\t\t\tconst first = entry.tail.first;\n\t\t\t\t\tif (capped || !started || first === undefined || first < groups.start) return;\n\t\t\t\t\tif (first + 1n < groups.end) groups.end = first + 1n;\n\t\t\t\t\tcap();\n\t\t\t\t\t// TEMPORARY MIGRATION, see `stall`.\n\t\t\t\t\tif (!entry.tail.covers(groups.start, groups.end)) {\n\t\t\t\t\t\tstall?.close();\n\t\t\t\t\t\tstall = new Stall(entry.tail);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst responses = this.#recoveryResponses(\n\t\t\t\t\topened,\n\t\t\t\t\tentry,\n\t\t\t\t\tgroups,\n\t\t\t\t\t(group) => {\n\t\t\t\t\t\tif (\"time\" in asked) {\n\t\t\t\t\t\t\tif (group !== undefined && group < asked.time) {\n\t\t\t\t\t\t\t\t// The time is inside this group, whose start is the only key owed.\n\t\t\t\t\t\t\t\tgroups.start = group;\n\t\t\t\t\t\t\t\tgroups.end = group + 1n;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tasked.start.set({ group });\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst from = group ?? groups.end;\n\t\t\t\t\t\tstarted = true;\n\t\t\t\t\t\t// Starting past the run answers all of it, so nothing more is asked.\n\t\t\t\t\t\tif (!capped && from >= groups.end) cap();\n\t\t\t\t\t\tcapAtFirst();\n\t\t\t\t\t},\n\t\t\t\t\tgiveUp,\n\t\t\t\t\t() => fin,\n\t\t\t\t);\n\t\t\t\t// FIN once every group is accounted for and read, as a subscriber does once its tail\n\t\t\t\t// settles, and the publisher FINs in reply.\n\t\t\t\tlet ended = false;\n\t\t\t\tconst over = responses.then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tended = true;\n\t\t\t\t\t},\n\t\t\t\t\t() => {\n\t\t\t\t\t\tended = true;\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\t// Ends a settle still waiting once this loop leaves it.\n\t\t\t\tconst stopped = new Once<null>();\n\t\t\t\tconst covered = () => entry.tail.covers(groups.start, groups.end);\n\t\t\t\ttry {\n\t\t\t\t\twhile (!oneShot && !ended && !left.signal.aborted) {\n\t\t\t\t\t\tcapAtFirst();\n\t\t\t\t\t\t// TEMPORARY MIGRATION, see `stall`: what is still owed once the grace passed with no\n\t\t\t\t\t\t// progress is refused for now, as this route cannot account for it.\n\t\t\t\t\t\tif (stall?.poll(entry.tail) && !covered()) {\n\t\t\t\t\t\t\tfailed = new StreamError(StreamCode.Unroutable, { message: \"recovery stalled\" });\n\t\t\t\t\t\t\tleft.abort();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (covered()) {\n\t\t\t\t\t\t\tawait race([entry.tail.settle(covered, stopped), over, leaving]);\n\t\t\t\t\t\t\tif (ended || left.signal.aborted) break;\n\t\t\t\t\t\t\t// The cap goes out before our FIN; a cancel, which resets a write still blocked, or\n\t\t\t\t\t\t\t// the publisher's end stops the wait.\n\t\t\t\t\t\t\tawait race([capping, over, leaving]);\n\t\t\t\t\t\t\tif (ended || left.signal.aborted) break;\n\t\t\t\t\t\t\tfin = true;\n\t\t\t\t\t\t\topened.writer.close();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait race([\n\t\t\t\t\t\t\tSignal.race(entry.tail.changed),\n\t\t\t\t\t\t\tover,\n\t\t\t\t\t\t\tleaving,\n\t\t\t\t\t\t\t...(stall === undefined ? [] : [stall.wake]),\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tstopped.set(null);\n\t\t\t\t}\n\t\t\t\t// After our FIN, a cancel still stops the wait for the publisher's.\n\t\t\t\tif (!ended) await race([over, leaving]);\n\t\t\t\t// Cancelled: nothing more is read, and our own reset ends the reads above.\n\t\t\t\tif (!ended) {\n\t\t\t\t\topened.abort(failed);\n\t\t\t\t\tawait over;\n\t\t\t\t} else {\n\t\t\t\t\tawait responses;\n\t\t\t\t\t// The publisher FINs once done (unprompted before lite-07, or in reply to our\n\t\t\t\t\t// one-shot FIN on lite-07), before every uni Group Stream it opened may have\n\t\t\t\t\t// landed: wait for those before refusing what is left, at most the grace before\n\t\t\t\t\t// lite-07, whose tail has none, and a stream silent that long is given up on. A proven\n\t\t\t\t\t// tail waits only for what lies above the runs it forgot: below them it lost proof, so\n\t\t\t\t\t// that part is refused for the fill to ask again.\n\t\t\t\t\tconst lost = () => entry.tail.lost([groups]);\n\t\t\t\t\tif (!covered() || entry.tail.reading) {\n\t\t\t\t\t\tconst drained = new Once<null>();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst answered = () => entry.tail.answered(groups.start, groups.end);\n\t\t\t\t\t\t\tawait race([entry.tail.drain(answered, drained, GRACE), leaving]);\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tdrained.set(null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (lost())\n\t\t\t\t\t\tfailed = new StreamError(StreamCode.Unroutable, {\n\t\t\t\t\t\t\tmessage: \"recovery tail forgot runs it still owes\",\n\t\t\t\t\t\t});\n\t\t\t\t\topened.close();\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tcloseViolation(this.#quic, err);\n\t\t\t\tfailed = error(err);\n\t\t\t\t// The publisher reset its side, or reading failed: give back our side too.\n\t\t\t\tstream?.abort(failed);\n\t\t\t} finally {\n\t\t\t\tstall?.close();\n\t\t\t\tleft.abort();\n\t\t\t\tentry.feedEnded?.set(\"ended\");\n\t\t\t\tthis.#subscribes.delete(id);\n\t\t\t\tentry.tail.close();\n\t\t\t}\n\t\t\t// What nothing accounted for is refused, as nothing more arrives on it.\n\t\t\tlet unanswered: Run[] = [{ ...groups }];\n\t\t\tfor (const run of [...entry.tail.accounted(groups.start, groups.end), ...refused])\n\t\t\t\tunanswered = removeRun(unanswered, run.start, run.end);\n\t\t\tfor (const gap of unanswered) fresh.push({ ...gap, refusal: passing(failed) });\n\t\t\t// Only what was not handed over while it was out.\n\t\t\treturn fresh;\n\t\t})();\n\t\tconst takeRefused = () => {\n\t\t\tconst taken = fresh;\n\t\t\tfresh = [];\n\t\t\treturn taken;\n\t\t};\n\t\treturn {\n\t\t\tgroups: () => groups,\n\t\t\tarrived: () => entry.tail.first !== undefined,\n\t\t\tdone,\n\t\t\ttakeRefused,\n\t\t\tchanged,\n\t\t\treadingChanged: entry.tail.changed,\n\t\t\treading: () => entry.tail.reading,\n\t\t\tcancel: () => left.abort(),\n\t\t};\n\t}\n\n\t// Read a recovery's responses to the publisher's FIN, giving up what it names it will not\n\t// deliver. `fin` says whether our FIN went out, which the publisher's answers, and `onStart`\n\t// hears where SUBSCRIBE_START says delivery starts.\n\tasync #recoveryResponses(\n\t\tstream: Stream,\n\t\tentry: SubscribeEntry,\n\t\tgroups: Run,\n\t\tonStart: (from: bigint | undefined) => void,\n\t\tgiveUp: (start: bigint, end: bigint, refusal: Refusal) => void,\n\t\tfin: () => boolean,\n\t): Promise<void> {\n\t\tlet started = false;\n\t\tlet finished = false;\n\t\t// Where the SUBSCRIBE_START's answer for the groups below its start ends.\n\t\tlet answered: bigint | undefined;\n\t\tfor (;;) {\n\t\t\tconst resp = await decodeSubscribeResponseMaybe(stream.reader, this.version);\n\t\t\tif (!resp) {\n\t\t\t\t// The publisher FINs in reply to ours, or once it finished the track.\n\t\t\t\tif (fin() || finished) return;\n\t\t\t\tthrow new ProtocolViolation(\"recovery subscribe ended without SUBSCRIBE_END\");\n\t\t\t}\n\t\t\tif (\"start\" in resp) {\n\t\t\t\t// One start, for its one range.\n\t\t\t\tif (started || resp.start.id !== 0n) throw new ProtocolViolation(\"unexpected recovery SUBSCRIBE_START\");\n\t\t\t\tstarted = true;\n\t\t\t\t// Below its start the publisher, asked with no max delay, lacks them.\n\t\t\t\tconst from = resp.start.start ?? groups.end;\n\t\t\t\tgiveUp(\n\t\t\t\t\tgroups.start,\n\t\t\t\t\tmax(groups.start, min(from, groups.end)),\n\t\t\t\t\tpassing(new NotFound(`group ${groups.start}`)),\n\t\t\t\t);\n\t\t\t\tonStart(resp.start.start);\n\t\t\t\t// After `onStart`, which narrows a time probe's groups to the group it starts.\n\t\t\t\tanswered = max(groups.start, min(from, groups.end));\n\t\t\t} else if (\"skip\" in resp) {\n\t\t\t\t// Never produced: final, as the subscription feeding the copy records it.\n\t\t\t\tconst { start, end } = resp.skip;\n\t\t\t\tentry.tail.account(start, end);\n\t\t\t\thooks.skipTrackGroups(entry.track, start, end);\n\t\t\t} else if (\"drop\" in resp || \"old\" in resp) {\n\t\t\t\tconst { start, end } = \"drop\" in resp ? resp.drop : resp.old;\n\t\t\t\t// Before lite-07 a drop only ever named staleness.\n\t\t\t\tconst stale = \"old\" in resp || !hasSkip(this.version);\n\t\t\t\tconst cause = stale ? new StreamError(StreamCode.Old) : new NotFound(`group ${start}`);\n\t\t\t\tthis.#dropped(entry, start, end);\n\t\t\t\t// Final on this subscription, so a stream it overtook is told from one whose gap the grace\n\t\t\t\t// gave up on. It says nothing of whether the groups exist, so the fills owing them are\n\t\t\t\t// refused for now rather than answered. Below its start the SUBSCRIBE_START already\n\t\t\t\t// answered them, which a publisher naming them again does not change.\n\t\t\t\tentry.tail.drop(start, end);\n\t\t\t\tgiveUp(max(start, answered ?? start), end, passing(cause));\n\t\t\t} else if (\"end\" in resp) {\n\t\t\t\tif (finished) throw new ProtocolViolation(\"duplicate SUBSCRIBE_END\");\n\t\t\t\tfinished = true;\n\t\t\t\t// Nothing at or past the track's end will be produced. Lite-05 specified an inclusive\n\t\t\t\t// end, which @moq/net 0.1.3 to 0.1.9 sent, so its end group may still be in flight: the\n\t\t\t\t// tail settles it instead.\n\t\t\t\tconst end = max(this.version === Version.DRAFT_05 ? resp.end.group + 1n : resp.end.group, groups.start);\n\t\t\t\tgiveUp(end, groups.end, dropped(new NotFound(`group ${end}`)));\n\t\t\t} else {\n\t\t\t\tthrow new ProtocolViolation(\"unexpected recovery subscribe response\");\n\t\t\t}\n\t\t}\n\t}\n\n\t// Start reading the subscribe stream's responses; see `runResponses`.\n\t#read(stream: Stream, entry: SubscribeEntry): Promise<void> {\n\t\tconst responses = this.runResponses(stream, entry);\n\t\tentry.stream = { kind: \"reading\", responses: responses.catch(() => {}) };\n\t\treturn responses;\n\t}\n\n\t// Reads the subscribe stream's responses until FIN, recording the range the tail is\n\t// accounted against: SUBSCRIBE_START/END/DROP on lite-05+, and any SUBSCRIBE_DROP after the\n\t// OK before then, where the FIN itself ends the track. Reading to the FIN, rather than\n\t// awaiting it, matters: a pull-driven transport stream closes only on a read.\n\t// SUBSCRIBE_END declares the track's end right away, so a consumer learns it before the\n\t// last groups arrive. The publisher must declare the end before FIN unless we cancelled\n\t// locally; resets and malformed responses reject.\n\tprivate async runResponses(stream: Stream, entry: SubscribeEntry): Promise<void> {\n\t\tlet observed: Sorted<bigint, bigint> | undefined;\n\t\tfor (;;) {\n\t\t\tconst resp = await decodeSubscribeResponseMaybe(stream.reader, this.version);\n\t\t\t// The publisher answered, so its demand stands on the subscription from here.\n\t\t\tif (entry.unanswered) {\n\t\t\t\tentry.unanswered.held.close();\n\t\t\t\tentry.unanswered.answered.abort();\n\t\t\t\tentry.unanswered = undefined;\n\t\t\t}\n\t\t\tif (!resp) {\n\t\t\t\t// Before lite-05 the FIN is the track's only end.\n\t\t\t\tif (!hasTrackStream(this.version)) {\n\t\t\t\t\t// Our side never FINs there, so the stream is still being read.\n\t\t\t\t\tif (entry.stream.kind === \"reading\")\n\t\t\t\t\t\tentry.stream = { kind: \"finished\", responses: entry.stream.responses };\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (entry.end === undefined && hooks.trackReleased(entry.track).peek() === undefined)\n\t\t\t\t\tthrow new ProtocolViolation(\"subscribe stream ended without SUBSCRIBE_END\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Once its tail is accounted for, this feed no longer owns the copy's placement.\n\t\t\tif (entry.feedEnded?.peek()) continue;\n\n\t\t\tif (\"ok\" in resp) throw new ProtocolViolation(\"duplicate SUBSCRIBE_OK\");\n\t\t\tif (\"start\" in resp) {\n\t\t\t\tif (hasRanges(this.version)) {\n\t\t\t\t\tthis.#started(entry, resp.start);\n\t\t\t\t\tconst { id, largest } = resp.start;\n\t\t\t\t\tif (typeof largest === \"object\" && entry.live.get(id)) {\n\t\t\t\t\t\tconst group = largest.position.group;\n\t\t\t\t\t\tobserved ??= new Sorted(\n\t\t\t\t\t\t\t(key) => key,\n\t\t\t\t\t\t\t(a, b) => (a < b ? -1 : a > b ? 1 : 0),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (observed.floor(group) !== group) observed.insert(group);\n\t\t\t\t\t}\n\t\t\t\t\t// The rest of a burst already here is recorded before applying it once.\n\t\t\t\t\tif (!startBuffered(stream.reader, this.version)) {\n\t\t\t\t\t\tthis.#applyStarts(entry, observed);\n\t\t\t\t\t\tobserved = undefined;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Before lite-07 the one start answers the subscription, and says the feed is live.\n\t\t\t\t\tif (entry.start !== undefined) throw new ProtocolViolation(\"duplicate SUBSCRIBE_START\");\n\t\t\t\t\tconst start = resp.start.start;\n\t\t\t\t\tentry.start = start ?? null;\n\t\t\t\t\t// A tail waits for SUBSCRIBE_START to say where delivery starts.\n\t\t\t\t\tentry.tail.touch();\n\t\t\t\t\thooks.startTrack(entry.track, {\n\t\t\t\t\t\tstart: entry.start,\n\t\t\t\t\t\trequested: entry.requested,\n\t\t\t\t\t\trestated: entry.restated,\n\t\t\t\t\t});\n\t\t\t\t\t// The groups the SUBSCRIBE asked for below it are not waited for, whatever the\n\t\t\t\t\t// demand asks later. One that still arrives is delivered.\n\t\t\t\t\tif (entry.requested !== undefined && start !== undefined)\n\t\t\t\t\t\tentry.tail.account(entry.requested, start);\n\t\t\t\t}\n\t\t\t} else if (\"end\" in resp) {\n\t\t\t\tif (entry.end !== undefined) throw new ProtocolViolation(\"duplicate SUBSCRIBE_END\");\n\t\t\t\tentry.end = resp.end.group;\n\t\t\t\t// A local close can win the race with the response; there is nothing left to end.\n\t\t\t\tif (hooks.trackReleased(entry.track).peek() !== undefined) continue;\n\t\t\t\ttry {\n\t\t\t\t\t// Lower groups may still be on the wire behind a higher one, so readers hold\n\t\t\t\t\t// at a hole below the end until the tail settles.\n\t\t\t\t\thooks.endTrack(entry.track, { group: entry.end, frame: 0 });\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// lite-05 specified an inclusive end, and @moq/net 0.1.3 to 0.1.9 sent one, so\n\t\t\t\t\t// there an end below a received group only costs the early boundary: the FIN\n\t\t\t\t\t// still finishes the track. Later drafts made it exclusive.\n\t\t\t\t\tif (this.version !== Version.DRAFT_05) {\n\t\t\t\t\t\tthrow new ProtocolViolation(`invalid SUBSCRIBE_END: ${reason(error(err))}`);\n\t\t\t\t\t}\n\t\t\t\t\tconsole.warn(`invalid SUBSCRIBE_END: ${reason(error(err))}`);\n\t\t\t\t}\n\t\t\t\t// Lite-07 keeps the stream open past SUBSCRIBE_END: FIN once the tail settles,\n\t\t\t\t// and the publisher's FIN in reply ends this loop.\n\t\t\t\tif (keepsSubscribeOpen(this.version)) void this.#finishTail(stream, entry).catch(() => {});\n\t\t\t} else if (\"skip\" in resp) {\n\t\t\t\tthis.#skipped(entry, resp.skip.start, resp.skip.end);\n\t\t\t} else if (\"drop\" in resp || \"old\" in resp) {\n\t\t\t\tconst { start, end } = \"drop\" in resp ? resp.drop : resp.old;\n\t\t\t\t// The publisher will never send these groups on this subscription, so they are accounted\n\t\t\t\t// for without a stream. Lite-07 tells a stream a drop overtook from one whose gap the grace\n\t\t\t\t// gave up on.\n\t\t\t\tif (hasSkip(this.version)) entry.tail.drop(start, end);\n\t\t\t\telse entry.tail.account(start, end);\n\t\t\t\tthis.#dropped(entry, start, end);\n\t\t\t\tlet refusal: Refusal;\n\t\t\t\tif (\"old\" in resp) {\n\t\t\t\t\t// Stale, recorded under the max age it names it judged under: a reader wider than that\n\t\t\t\t\t// does not settle on it, and asks for the group with a request of its own. A group a\n\t\t\t\t\t// fill asked for is recovered on its own, so the copy does not record it given up\n\t\t\t\t\t// meanwhile. Mirrors the Rust `ServeLoop::apply_response`.\n\t\t\t\t\tconst hole = staleHole(resp.old.maxAge, entry.staleCap);\n\t\t\t\t\tfor (const given of runGaps(entry.fillGroups, start, end))\n\t\t\t\t\t\thooks.dropTrackGroups(entry.track, given.start, given.end, hole);\n\t\t\t\t\trefusal = stale(new StreamError(StreamCode.Old));\n\t\t\t\t} else if (!hasSkip(this.version)) {\n\t\t\t\t\t// Before lite-07 a drop carries no code and only ever names staleness, judged under no\n\t\t\t\t\t// budget this side can see: superseded, as it always read. A group a fill still owes\n\t\t\t\t\t// is left to the fill's recovery, which asks with no max delay: the publisher answers\n\t\t\t\t\t// both, and which lands first must not decide what the reader gets. Mirrors the Rust\n\t\t\t\t\t// `ServeLoop::apply_response`.\n\t\t\t\t\t// Before lite-05 nothing recovers a fill, so the drop is recorded for it too.\n\t\t\t\t\tconst owed = hasTrackStream(this.version) ? hooks.fillsOwe(entry.track, start, end) : [];\n\t\t\t\t\tfor (const given of runGaps(owed, start, end))\n\t\t\t\t\t\thooks.dropTrackGroups(entry.track, given.start, given.end, { reason: \"old\" });\n\t\t\t\t\trefusal = stale(new StreamError(StreamCode.Old));\n\t\t\t\t} else {\n\t\t\t\t\t// A lite-07 drop is this subscription's alone, which says nothing of whether the groups\n\t\t\t\t\t// exist: a copy of one still arriving on it is given up for now, and a reader that still\n\t\t\t\t\t// wants one asks a fill, which another request or route may answer.\n\t\t\t\t\thooks.loseTrackGroups(entry.track, start, end);\n\t\t\t\t\trefusal = scoped(new NotFound(`group ${start}`));\n\t\t\t\t}\n\t\t\t\tentry.fills?.refuse(start, end, refusal);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Lite-07: record where one range starts, from its SUBSCRIBE_START, along with what the publisher\n\t// knows of the live edge, which `#applyStarts` then applies. A range following the live edge is\n\t// answered with where the edge is. Mirrors the Rust `ServeLoop::record_start`.\n\t#started(entry: SubscribeEntry, msg: SubscribeStart): void {\n\t\tconst { id, start, largest } = msg;\n\t\tconst range = entry.live.get(id);\n\t\tconst follows = range !== undefined && (range.start?.live !== undefined || range.end === undefined);\n\t\tif (!entry.live.assigned(id) || entry.starts.has(id) || (largest === \"unknown\" && follows))\n\t\t\tthrow new ProtocolViolation(`unexpected SUBSCRIBE_START: ${id}`);\n\t\t// Recorded whole, so a relay answers its own readers that the group ended.\n\t\tif (typeof largest === \"object\") hooks.reportedLargest(entry.track, largest.position, largest.ended);\n\t\tif (largest !== \"unknown\") hooks.answerEdge(entry.track);\n\t\t// One retired since is owed nothing.\n\t\tif (range) {\n\t\t\tentry.starts.set(id, start);\n\t\t\t// A fill's range starting past where it asked skips groups it will not deliver.\n\t\t\tconst asked = entry.fillIds.has(id) ? fillRun(range) : undefined;\n\t\t\tif (asked) {\n\t\t\t\tconst skipped = max(asked.start, min(start ?? asked.end, asked.end));\n\t\t\t\t// The tail uses each range's own START. Another range can still owe this prefix.\n\t\t\t\tentry.fills?.skip(asked, asked.start, skipped);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Apply the lite-07 SUBSCRIBE_STARTs `#started` recorded to what every range shares: where the\n\t// feed starts, the tail, and the starts the copy's readers resolve against. Once per burst, since\n\t// each pass walks every range, so one per START would cost the square of the ranges. Mirrors the\n\t// Rust `ServeLoop::apply_starts`.\n\t#applyStarts(entry: SubscribeEntry, observed: Sorted<bigint, bigint> | undefined): void {\n\t\t// The lowest start any range reported is the first group served; none leaves nothing owed.\n\t\tlet lowest: bigint | null = null;\n\t\tfor (const at of entry.starts.values()) if (at !== undefined && (lowest === null || at < lowest)) lowest = at;\n\t\tentry.start = lowest;\n\t\t// The tail judges what is owed again.\n\t\tentry.tail.touch();\n\t\tthis.#reportStarts(entry);\n\t\tthis.#declareFeed(entry, observed);\n\t}\n\n\t// The publisher never produced `[start, end)`, as a SUBSCRIBE_SKIP says, so nothing is\n\t// waited for and no reader ends. A skip replaces any drop of the same groups; a reader a drop\n\t// already ended stays ended.\n\t#skipped(entry: SubscribeEntry, start: bigint, end: bigint): void {\n\t\tentry.tail.account(start, end);\n\t\t// A fill owing them is answered: the source never had them.\n\t\tentry.fills?.refuse(start, end, passing(new NotFound(`group ${start}`)));\n\t\t// A group that arrived was produced after all, so the skip contradicts it: it keeps the\n\t\t// group, and the session goes on, since the draft requires no more.\n\t\tconst [cached] = hooks.skipTrackGroups(entry.track, start, end);\n\t\tif (cached) {\n\t\t\tconsole.warn(\n\t\t\t\t`protocol error: SUBSCRIBE_SKIP skips [${start}, ${end}), which holds group ${cached.start}, which arrived; keeping it`,\n\t\t\t);\n\t\t}\n\t}\n\n\t// Settle a lite-07 tail past SUBSCRIBE_END, then FIN. An update sent meanwhile asks for more,\n\t// which waits a fresh grace rather than one that may have passed while a stream was read.\n\tasync #finishTail(stream: Stream, entry: SubscribeEntry): Promise<void> {\n\t\tfor (;;) {\n\t\t\tconst sent = entry.sent;\n\t\t\ttry {\n\t\t\t\tawait this.#settleTail(entry);\n\t\t\t} catch (err: unknown) {\n\t\t\t\t// The tail lost its proof: this route cannot prove the track's end, so the track ends\n\t\t\t\t// with the error for another to resume, as the Rust subscriber gives it back.\n\t\t\t\tconst e = error(err);\n\t\t\t\thooks.abortTrack(entry.track, e);\n\t\t\t\tstream.abort(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (hooks.trackReleased(entry.track).peek() !== undefined) return;\n\t\t\tif (entry.sent !== sent || !this.#covered(entry)) continue;\n\t\t\t// The copy's own tail settles with the subscription's, which its readers wait on, whatever\n\t\t\t// fill is still out.\n\t\t\tif (entry.stream.kind !== \"reading\") return;\n\t\t\tthis.#fin(stream, entry);\n\t\t\thooks.settleTail(entry.track);\n\t\t\tentry.fills?.finishFeed();\n\t\t\tentry.feedEnded?.set(\"ended\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// FIN our side once, acknowledging a settled tail without cancelling the publisher's half.\n\t#fin(stream: Stream, entry: SubscribeEntry): void {\n\t\tif (entry.stream.kind !== \"reading\") return;\n\t\tentry.stream = { kind: \"fin\", responses: entry.stream.responses };\n\t\tstream.writer.close();\n\t}\n\n\t// Wait for the group streams the publisher still owes once it has ended the subscription.\n\t//\n\t// Received headers and SUBSCRIBE_DROP account for the range. An unaccounted\n\t// key, such as a lost datagram, still waits out the grace. Streams whose\n\t// headers arrived keep reading until their own FIN or reset, or, with a grace, until they go\n\t// quiet for it: a browser can lose a stream's reset.\n\t//\n\t// A lite-07 tail that forgot runs it still owes can never settle, so it throws\n\t// {@link StreamCode.Unroutable} instead.\n\tasync #settleTail(entry: SubscribeEntry): Promise<void> {\n\t\tconst { tail, track } = entry;\n\t\tawait tail.drain(() => this.#covered(entry) || this.#lost(entry), hooks.trackReleased(track));\n\t\tif (this.#lost(entry)) {\n\t\t\tthrow new StreamError(StreamCode.Unroutable, { message: \"subscription tail forgot runs it still owes\" });\n\t\t}\n\t}\n\n\t// Whether a lite-07 tail lost the proof for what it is owed (see `Tail.lost`).\n\t#lost(entry: SubscribeEntry): boolean {\n\t\tconst owed = hasRanges(this.version) ? this.#owed(entry) : undefined;\n\t\treturn owed !== undefined && entry.tail.lost(owed);\n\t}\n\n\t// The groups a lite-07 subscription the publisher ended is owed, or undefined while nothing\n\t// says yet. Lite-07 answers each range with its own SUBSCRIBE_START, even once the track ended,\n\t// unless nothing was asked below the end. Each range the publisher holds is then owed from the\n\t// start its SUBSCRIBE_START named, which accounts for a skipped prefix and resolves a live join\n\t// or a time start; one whose SUBSCRIBE_START is still on its way owes what nothing says yet.\n\t#owed(entry: SubscribeEntry): { start: bigint; end: bigint }[] | undefined {\n\t\tif (entry.end === undefined) return undefined;\n\t\tconst held = wireHeld(hooks.requested(entry.track).peek() ?? {});\n\t\tconst ranges = placedAsTimes(held.ranges, held.placed);\n\t\tconst end = min(entry.end, wireSpan(ranges).end ?? entry.end);\n\t\tif (entry.start === undefined) return end > (rangesStart(ranges) ?? 0n) ? undefined : [];\n\t\tconst owed: track.Range[] = [];\n\t\tfor (const [id, range] of entry.live.entries()) {\n\t\t\tif (!entry.starts.has(id)) return undefined;\n\t\t\tconst at = entry.starts.get(id);\n\t\t\tif (at === undefined) continue;\n\t\t\tconst model = requestedRange(range);\n\t\t\towed.push({ ...model, start: at });\n\t\t}\n\t\t// Each starts at the group its publisher reported starting it at.\n\t\treturn new Window(owed, entry.track.largest()?.group, AT_KEYS).runs(0n, end);\n\t}\n\n\t// Whether the groups received and dropped account for every group the demand is owed once\n\t// the publisher ended the subscription.\n\t#covered(entry: SubscribeEntry): boolean {\n\t\t// Without SUBSCRIBE_END (older drafts) nothing says which groups are owed.\n\t\tif (entry.end === undefined) return false;\n\t\tconst held = wireHeld(hooks.requested(entry.track).peek() ?? {});\n\t\tconst ranges = placedAsTimes(held.ranges, held.placed);\n\t\tconst end = min(entry.end, wireSpan(ranges).end ?? entry.end);\n\t\tconst floor = rangesStart(ranges);\n\t\tif (hasRanges(this.version)) {\n\t\t\treturn this.#owed(entry)?.every((run) => entry.tail.covers(run.start, run.end)) ?? false;\n\t\t}\n\t\t// Without SUBSCRIBE_START the publisher served no group at all. Otherwise each group is owed\n\t\t// from the floor the demand last asked for, or where SUBSCRIBE_START resolved a live-edge one,\n\t\t// but never below that START: nothing answers an update, and the publisher applies none once it\n\t\t// has sent its FIN, so a floor an update lowered may never have reached it. The groups the\n\t\t// SUBSCRIBE asked for below its SUBSCRIBE_START were accounted for when it arrived.\n\t\tif (entry.start === undefined || entry.start === null) return true;\n\t\tconst window = new Window(ranges, entry.track.largest()?.group);\n\t\tconst from = max(floor ?? entry.start, entry.start);\n\t\treturn window.runs(from, end).every((run) => entry.tail.covers(run.start, run.end));\n\t}\n\n\t/**\n\t * Send SUBSCRIBE_UPDATE messages whenever the track's aggregate subscription changes.\n\t *\n\t * Resolves cleanly when the stream or track closes, or a write fails, so the caller can include\n\t * this in a race without leaving a dangling pending write that would\n\t * become an unhandled rejection if the user calls update after close.\n\t *\n\t * Peeks the signal at the top of every iteration so that updates which landed\n\t * before SubscribeOk arrived (or between iterations, before .next() registered\n\t * its listener) aren't lost.\n\t */\n\tasync #runSubscriptionUpdates(\n\t\tid: bigint,\n\t\tbroadcast: Path.Valid,\n\t\tentry: SubscribeEntry,\n\t\tmsg: Subscribe,\n\t\tstream: Stream,\n\t): Promise<void> {\n\t\tconst track = entry.track;\n\t\t// A reset stops updates too; the responses decide how the track ends.\n\t\tconst stopped: Promise<null> = race([\n\t\t\thooks.trackReleased(track),\n\t\t\tstream.reader.closed,\n\t\t\t...(entry.feedEnded ? [entry.feedEnded] : []),\n\t\t]).then(\n\t\t\t() => null,\n\t\t\t() => null,\n\t\t);\n\t\tlet lastSent: track.Subscription = { ranges: entry.asked };\n\t\tif (entry.askedPlaced.size > 0) lastSent.placed = entry.askedPlaced;\n\n\t\t// The wanted group is subscription state: an update announces each new one past our\n\t\t// largest, and every later update restates it. Requests asking for the same group\n\t\t// coalesce into that one update.\n\t\tlet sentWanted: bigint | undefined;\n\t\t// What the fills asked with the last update, and the priority it carried.\n\t\tlet sentFills: Run[] = [];\n\t\tlet sentFillOrder: track.Order | undefined;\n\t\tlet sentPriority = msg.priority;\n\t\t// The time starts and live joins the readers waited on as the last update went out.\n\t\tlet sentAsks: bigint[] = [];\n\t\tlet sentJoins: JoinAsk[] = [];\n\t\t// The terms the publisher last heard; an update restating them tells it nothing, as when a\n\t\t// join's tick moves while its probe is still unanswered.\n\t\tlet live = new SubscribeUpdate({\n\t\t\tpriority: msg.priority,\n\t\t\torder: msg.order,\n\t\t\tmaxDelay: msg.maxDelay,\n\t\t\tstartGroup: msg.startGroup,\n\t\t\tendGroup: msg.endGroup,\n\t\t\tstartFrame: msg.startFrame,\n\t\t\tendFrame: msg.endFrame,\n\t\t});\n\t\tconst asked = hooks.demandAsked(track.demand());\n\t\tconst edge = hooks.producerLargest(track);\n\t\twhile (entry.stream.kind === \"reading\") {\n\t\t\tconst largest = edge.peek()?.group;\n\t\t\tconst wanted = asked.peek();\n\t\t\tconst refresh =\n\t\t\t\thasRefresh(this.version) &&\n\t\t\t\tlargest !== undefined &&\n\t\t\t\twanted !== undefined &&\n\t\t\t\twanted > largest &&\n\t\t\t\twanted !== sentWanted\n\t\t\t\t\t? wanted\n\t\t\t\t\t: undefined;\n\t\t\tconst current = hooks.requested(track).peek();\n\t\t\t// Lite-07 asks upstream to place each time start and live join the readers wait on.\n\t\t\tconst asks = hasRanges(this.version) ? hooks.requested(track).asks() : [];\n\t\t\tconst joins = hasRanges(this.version) ? hooks.requested(track).joins() : [];\n\t\t\t// Lite-07 asks the held fills' groups through the same subscription, each at the fills' own\n\t\t\t// priority and order; a wire before it carries one policy, the demand's or the more urgent\n\t\t\t// fills'.\n\t\t\tconst fills = entry.fills?.ask;\n\t\t\tconst fillGroups = fills?.groups ?? [];\n\t\t\tconst demandPolicy = rangesPolicy(current === undefined ? [] : wireHeld(current).ranges);\n\t\t\tconst priority = Math.max(demandPolicy.priority, fills?.priority ?? -128);\n\t\t\tif (\n\t\t\t\tcurrent === undefined ||\n\t\t\t\t(refresh === undefined &&\n\t\t\t\t\tpriority === sentPriority &&\n\t\t\t\t\tsameList(fillGroups, sentFills, sameRun) &&\n\t\t\t\t\t(fillGroups.length === 0 || fills?.order === sentFillOrder) &&\n\t\t\t\t\tsameList(asks, sentAsks) &&\n\t\t\t\t\tsameList(joins, sentJoins, sameJoin) &&\n\t\t\t\t\tthis.#sameSubscription(current, lastSent))\n\t\t\t) {\n\t\t\t\t// Each wake releases the quiet signals too, including when termination wins.\n\t\t\t\tconst next = await race([\n\t\t\t\t\tSignal.race(hooks.requested(track), asked, edge, entry.fillsChanged),\n\t\t\t\t\tstopped,\n\t\t\t\t]);\n\t\t\t\tif (next === null) return;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Demand collapsing to nothing is refused the same way an initial empty\n\t\t\t// request is: the error closes the track, so every local subscriber sees it.\n\t\t\tconst { ranges, placed } = wireHeld(current);\n\t\t\tif (ranges.length === 0) throw new Error(EMPTY_RANGE);\n\t\t\t// A wire before lite-07 narrows a placed join to a start at its group.\n\t\t\tconst times = placedAsTimes(ranges, placed);\n\t\t\tconst span = wireSpan(times);\n\n\t\t\t// Changed ranges owe groups nobody asked for until now: below a lowered floor, or\n\t\t\t// between ranges a widening joins while keeping the floor. Each gap they reach waits\n\t\t\t// a fresh grace, which only delays giving up on one still owed.\n\t\t\tconst start = rangesStart(times);\n\t\t\tconst last = wireHeld(lastSent);\n\t\t\tif (!sameRanges(ranges, last.ranges) || !samePlaced(placed, last.placed))\n\t\t\t\tentry.tail.demand(start ?? entry.start ?? 0n, UNBOUNDED);\n\n\t\t\t// Lite-07 edits the live ranges: a range already live keeps its Range ID, and where it\n\t\t\t// started. The retired ones owe nothing more.\n\t\t\tlet edit: { remove: bigint[]; add: WireRange[]; retune: [bigint, Retune][] } | undefined;\n\t\t\tif (hasRanges(this.version)) {\n\t\t\t\t// The demand's ranges and the fills' groups, widened together until they fit. The fills\n\t\t\t\t// keep their exact ask, so what they ask next is compared with that, not the wire.\n\t\t\t\tconst demanded = toWireRanges(ranges, placed);\n\t\t\t\tconst fields = await this.#subscribeFields(msg, {\n\t\t\t\t\tpriority,\n\t\t\t\t\torder: demandPolicy.order,\n\t\t\t\t\tmaxDelay: maxAge(ranges),\n\t\t\t\t});\n\t\t\t\tif (entry.stream.kind !== \"reading\") return;\n\t\t\t\tconst budget = Fit.budget(\n\t\t\t\t\tfields,\n\t\t\t\t\tentry.live.next(),\n\t\t\t\t\tdemanded.length + asks.length + joins.length + fillGroups.length,\n\t\t\t\t);\n\t\t\t\tconst fitted = Fit.fit(demanded, fillGroups, entry.fills?.avoid() ?? [], budget);\n\t\t\t\t// A fill's range starting past its run speaks only while that run is asked whole.\n\t\t\t\tentry.fills?.retireSkipped(fitted.fills);\n\t\t\t\t// Each fill's range is its own, at the fills' priority and order, so the demand's ranges\n\t\t\t\t// keep theirs. Mirrors the Rust `FillAsk::wire`.\n\t\t\t\tconst fillPolicy = { priority: fills?.priority ?? 0, order: fills?.order ?? \"ascending\" };\n\t\t\t\tconst fillRanges: WireRange[] = fitted.fills.map((run) =>\n\t\t\t\t\twithPolicy({ start: { absolute: run.start }, end: { absolute: run.end } }, fillPolicy),\n\t\t\t\t);\n\t\t\t\t// The probes the readers' asks and joins need, as many as fit beside the rest: those left\n\t\t\t\t// out go once an answer lets the readers waiting on others go.\n\t\t\t\tconst wanted = wantedProbes(entry, asks, joins, fitted.ranges);\n\t\t\t\t// A probe asks on behalf of the demand's readers, at what the demand asks as a whole.\n\t\t\t\tconst asked = wanted.probes.map((probe) => withPolicy(probe, demandPolicy));\n\t\t\t\tconst probed = Fit.fitAfter(budget, [...fitted.ranges, ...fillRanges], asked);\n\t\t\t\t// A live probe asked afresh is retired and added again, which the publisher answers anew.\n\t\t\t\tconst renew = fittedReasks(wanted.reasked, entry.live, probed);\n\t\t\t\t// The demand's ranges, then the probes, then the fills'.\n\t\t\t\tconst kindOf = (id: bigint): RangeKind =>\n\t\t\t\t\tentry.fillIds.has(id) ? \"fill\" : entry.probeIds.has(id) ? \"probe\" : \"demand\";\n\t\t\t\t// Before a retune moves it: the publisher may answer under the max asked until then.\n\t\t\t\tfor (const [id, range] of entry.live.entries()) {\n\t\t\t\t\tconst live = range.start?.live;\n\t\t\t\t\tconst joined = range.start?.joined;\n\t\t\t\t\t// Every max a placed join was ever asked under, answered or not: a retune keeps its\n\t\t\t\t\t// answer, which proves history only if none was finite.\n\t\t\t\t\tconst recorded = live !== undefined ? !entry.joinTicks.has(id) : joined !== undefined;\n\t\t\t\t\tif (!recorded) continue;\n\t\t\t\t\tconst max = (live ?? joined)?.max ?? null;\n\t\t\t\t\tentry.joinBudgets.set(id, Math.min(entry.joinBudgets.get(id) ?? NO_MAX_DELAY, wireBudget(max)));\n\t\t\t\t}\n\t\t\t\tconst edited = entry.live.edit(\n\t\t\t\t\t[...fitted.ranges, ...probed, ...fillRanges],\n\t\t\t\t\t{ probes: probed.length, fills: fillRanges.length, kindOf },\n\t\t\t\t\trenew,\n\t\t\t\t);\n\t\t\t\tedit = edited;\n\t\t\t\tfor (const id of entry.starts.keys()) if (!entry.live.get(id)) entry.starts.delete(id);\n\t\t\t\tfor (const id of entry.joinTicks.keys()) if (!entry.live.get(id)) entry.joinTicks.delete(id);\n\t\t\t\tfor (const id of entry.joinBudgets.keys()) if (!entry.live.get(id)) entry.joinBudgets.delete(id);\n\t\t\t\t// Before the update reaches the wire, as the SUBSCRIBE did.\n\t\t\t\thooks.judgeUnder(entry.track, narrowest(entry.live));\n\t\t\t\tif (capOf(entry.live) !== entry.staleCap) entry.staleCap = undefined;\n\t\t\t\tfor (const id of entry.fillIds) if (!entry.live.get(id)) entry.fillIds.delete(id);\n\t\t\t\tfor (const id of edited.fillIds) entry.fillIds.add(id);\n\t\t\t\tfor (const id of entry.probeIds) if (!entry.live.get(id)) entry.probeIds.delete(id);\n\t\t\t\tfor (const id of edited.probeIds) entry.probeIds.add(id);\n\t\t\t\t// The groups a fill newly asks for wait a fresh grace too.\n\t\t\t\tfor (const run of fitted.fills)\n\t\t\t\t\tfor (const gap of runGaps(entry.fillGroups, run.start, run.end))\n\t\t\t\t\t\tentry.tail.demand(gap.start, gap.end);\n\t\t\t\tentry.fillGroups = fitted.fills;\n\t\t\t\tentry.floor = span.start;\n\t\t\t\t// Pending while a range the update adds awaits SUBSCRIBE_START, if it may start lower.\n\t\t\t\tthis.#reportStarts(entry);\n\t\t\t\tthis.#declareFeed(entry);\n\t\t\t} else {\n\t\t\t\tconst before = wireSpan(placedAsTimes(last.ranges, last.placed));\n\t\t\t\t// An update gets no fresh SUBSCRIBE_START, so the floor follows the requested start in\n\t\t\t\t// both directions: one that moves back keeps the floor asked, not the stale START.\n\t\t\t\tif (span.start !== before.start) hooks.startTrack(entry.track, { start: null, requested: span.start });\n\t\t\t\telse if (\n\t\t\t\t\tresolvesStart(this.version) &&\n\t\t\t\t\tspan.start === undefined &&\n\t\t\t\t\t(span.end !== before.end || maxAge(ranges) !== maxAge(last.ranges))\n\t\t\t\t) {\n\t\t\t\t\t// A join with no start is placed afresh within the new max age or end, which may reach\n\t\t\t\t\t// below the START: a reader's join may too, while fills still wait on the re-offer.\n\t\t\t\t\tentry.restated = true;\n\t\t\t\t\thooks.restateTrack(entry.track);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Round-trip the other Subscribe parameters so the publisher doesn't\n\t\t\t// interpret SUBSCRIBE_UPDATE as a reset of ordered/delay/etc.\n\t\t\tconst update = new SubscribeUpdate({\n\t\t\t\twantedGroup: refresh ?? sentWanted,\n\t\t\t\tpriority,\n\t\t\t\torder: demandPolicy.order,\n\t\t\t\tmaxDelay: maxAge(ranges),\n\t\t\t\tstartGroup: span.start,\n\t\t\t\tendGroup: inclusiveGroupEnd(span.end),\n\t\t\t\tranges: edit?.add,\n\t\t\t\tremove: edit?.remove,\n\t\t\t\tretune: edit?.retune,\n\t\t\t});\n\t\t\t// Encoded apart from the write, so a bound the wire can't carry still fails the track.\n\t\t\tconst encoded = await Writer.collect(this.version, (w) => update.encode(w, this.version));\n\t\t\tif (entry.stream.kind !== \"reading\") return;\n\t\t\tif (!restates(this.version, update, live)) {\n\t\t\t\t// A failed write means the publisher stopped reading, as it does once it finishes the\n\t\t\t\t// track. The responses decide how the track ends, cleanly at the FIN or with a reset's error.\n\t\t\t\ttry {\n\t\t\t\t\tawait stream.writer.write(encoded);\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tentry.sent += 1;\n\t\t\t\t// A tail settling past SUBSCRIBE_END re-judges what the update now asks for.\n\t\t\t\tentry.tail.touch();\n\t\t\t\tconsole.debug(`subscribe update: id=${id} broadcast=${broadcast} track=${track.name}`);\n\t\t\t}\n\t\t\tlive = update;\n\t\t\tif (refresh !== undefined) sentWanted = refresh;\n\t\t\tlastSent = { ...current };\n\t\t\tsentFills = fillGroups;\n\t\t\tsentFillOrder = fills?.order;\n\t\t\tsentPriority = priority;\n\t\t\tsentAsks = asks;\n\t\t\tsentJoins = joins;\n\t\t}\n\t}\n\n\t#reportStarts(entry: SubscribeEntry): void {\n\t\t// Where the publisher started each live range asked from a group's start, a placed join's\n\t\t// with no max age, or from the oldest group as time 0, which a reader's time start there resolves to when the copy can't place it\n\t\t// among its groups; and one asked as a live join, whose answer alone places that join for the\n\t\t// copy's readers within the max it was asked under. Mirrors the Rust `SubStream::report_starts`.\n\t\tconst times: [bigint, bigint | undefined][] = [];\n\t\tfor (const id of entry.live.ids()) {\n\t\t\tconst range = entry.live.get(id);\n\t\t\tif (range === undefined || !entry.starts.has(id)) continue;\n\t\t\t// Undefined for a range with no group to deliver.\n\t\t\tconst at = entry.starts.get(id);\n\t\t\tif (range.start?.live !== undefined) {\n\t\t\t\t// Recorded once, as it arrives: a reader that began waiting since takes only a newer answer.\n\t\t\t\tif (!entry.joinTicks.has(id)) {\n\t\t\t\t\tconst { min, max } = range.start.live;\n\t\t\t\t\tconst budget = Math.min(entry.joinBudgets.get(id) ?? NO_MAX_DELAY, wireBudget(max));\n\t\t\t\t\t// Kept with it, so a retune wider after it lands still finds the answer narrower.\n\t\t\t\t\tentry.joinBudgets.set(id, budget);\n\t\t\t\t\tentry.joinTicks.set(id, hooks.answerJoin(entry.track, min, through(range.end), at, budget));\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// A max age, now or under a retune since, may start a placed join past groups the publisher\n\t\t\t// still holds, as stale for it alone, so its answer proves nothing of history. Its readers\n\t\t\t// are placed already.\n\t\t\tconst joined = range.start?.joined;\n\t\t\tif (\n\t\t\t\tjoined !== undefined &&\n\t\t\t\tMath.min(entry.joinBudgets.get(id) ?? NO_MAX_DELAY, wireBudget(joined.max)) < NO_MAX_DELAY\n\t\t\t)\n\t\t\t\tcontinue;\n\t\t\t// An exact-group Position start is not a time-containment query.\n\t\t\tif (range.start?.absolute !== undefined) continue;\n\t\t\tconst asked = range.start?.time ?? joined?.absolute ?? 0n;\n\t\t\t// One with no group to deliver says nothing of its time unless it reaches it.\n\t\t\tif (at !== undefined || reaches(range.end, asked)) times.push([asked, at]);\n\t\t}\n\t\thooks.timeStarts(entry.track, times);\n\t\tconst live = new Set(entry.live.ranges().map(wireJoin));\n\t\thooks.retainJoins(entry.track, (min, end) => live.has(joinKey(min, end)));\n\t}\n\n\t// Declare where a lite-07 feed starts: the lowest start the live ranges report, or the\n\t// requested floor, pending, while SUBSCRIBE_START or a range's SUBSCRIBE_START has yet to\n\t// say where one starts. Mirrors the Rust `SubStream::declare`.\n\t#declareFeed(entry: SubscribeEntry, observed?: Sorted<bigint, bigint>): void {\n\t\tlet start: bigint | null = null;\n\t\tlet pending = entry.start === undefined;\n\t\t// Only the demand's ranges say where the live feed starts, not a fill's or a probe.\n\t\tconst feeding = [...entry.live.ids()].filter((id) => !entry.fillIds.has(id) && !entry.probeIds.has(id));\n\t\tfor (const id of feeding) {\n\t\t\tif (!entry.starts.has(id)) continue;\n\t\t\tconst at = entry.starts.get(id);\n\t\t\t// A range with no group there serves nothing to start from.\n\t\t\tif (at !== undefined && (start === null || at < start)) start = at;\n\t\t}\n\t\t// One still unanswered leaves the start standing once the feed started only while it can't\n\t\t// start below it.\n\t\tconst lowest = start;\n\t\tconst lower = (id: bigint) => {\n\t\t\tconst range = entry.live.get(id);\n\t\t\treturn lowest === null || range === undefined || !startsPast(range, lowest);\n\t\t};\n\t\tif (feeding.some((id) => !entry.starts.has(id) && lower(id))) pending = true;\n\t\tconst runs: Run[] = [];\n\t\tconst latest = entry.track.largest()?.group;\n\t\tlet timeFloors: Map<bigint, bigint> | undefined;\n\t\tfor (const id of feeding) {\n\t\t\tconst range = entry.live.get(id);\n\t\t\tif (!range) continue;\n\t\t\tconst at = entry.starts.get(id);\n\t\t\tif (at === undefined && entry.starts.has(id)) continue;\n\t\t\tconst time = range.start?.time;\n\t\t\tlet intervening: bigint | undefined;\n\t\t\tif (at === undefined && time !== undefined) {\n\t\t\t\t// A known group at or before the anchor excludes earlier groups even after the live edge passes it.\n\t\t\t\tintervening = entry.timeFloors?.get(id);\n\t\t\t\tconst reported = latest !== undefined && latest <= time ? latest : observed?.floor(time);\n\t\t\t\tif (reported !== undefined) intervening = max(intervening ?? 0n, reported);\n\t\t\t\tif (intervening !== undefined) {\n\t\t\t\t\ttimeFloors ??= new Map();\n\t\t\t\t\ttimeFloors.set(id, intervening);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst asked = range.start?.absolute ?? range.start?.joined?.absolute ?? intervening ?? 0n;\n\t\t\tconst from = at ?? asked;\n\t\t\tconst end = range.end === undefined ? UNBOUNDED : (through(range.end) ?? -1n) + 1n;\n\t\t\tif (from < end) runs.push({ start: from, end });\n\t\t}\n\t\tentry.timeFloors = timeFloors;\n\t\truns.sort((a, b) => (a.start < b.start ? -1 : a.start > b.start ? 1 : 0));\n\t\tconst feed: Run[] = [];\n\t\tfor (const run of runs) insertRun(feed, run.start, run.end);\n\t\tconst next = { start: pending ? undefined : start, requested: entry.floor, feed };\n\t\tconst last = entry.declared;\n\t\tif (\n\t\t\tlast &&\n\t\t\tlast.start === next.start &&\n\t\t\tlast.requested === next.requested &&\n\t\t\tsameList(last.feed, feed, sameRun)\n\t\t)\n\t\t\treturn;\n\t\tentry.declared = next;\n\t\thooks.startTrack(entry.track, next);\n\t}\n\n\t#sameSubscription(a: track.Subscription, b: track.Subscription): boolean {\n\t\tconst aw = wireHeld(a);\n\t\tconst bw = wireHeld(b);\n\t\tconst ar = aw.ranges;\n\t\tconst br = bw.ranges;\n\t\tlet rangesEqual: boolean;\n\t\tif (hasRanges(this.version)) rangesEqual = sameRanges(ar, br) && samePlaced(aw.placed, bw.placed);\n\t\telse {\n\t\t\t// A placed join goes out as a start at its group.\n\t\t\tconst as = wireSpan(placedAsTimes(ar, aw.placed));\n\t\t\tconst bs = wireSpan(placedAsTimes(br, bw.placed));\n\t\t\t// A lite-06 `Group Start` of 0 is no floor, so the two spell the same; a pre-06 wire tells\n\t\t\t// them apart: omitted joins at the publisher's start, and 0 is group 0.\n\t\t\tconst start = resolvesStart(this.version)\n\t\t\t\t? (span: typeof as) => span.start ?? 0n\n\t\t\t\t: (span: typeof as) => span.start;\n\t\t\trangesEqual = start(as) === start(bs) && as.end === bs.end;\n\t\t}\n\t\t// Lite-07 carries a policy per range, which the ranges compare; before it one for the whole\n\t\t// subscription, and a wire without `Group Order` cannot carry a change to the order.\n\t\tconst pa = rangesPolicy(ar);\n\t\tconst pb = rangesPolicy(br);\n\t\tconst sameOrder = hasRanges(this.version) || !hasOrder(this.version) || pa.order === pb.order;\n\t\tconst samePriority = hasRanges(this.version) || pa.priority === pb.priority;\n\t\t// A wire before lite-07 carries one max age for the whole subscription; lite-07 one per live\n\t\t// join, which the ranges compare.\n\t\tconst sameMax = hasRanges(this.version) || maxAge(ar) === maxAge(br);\n\t\treturn samePriority && sameOrder && sameMax && rangesEqual;\n\t}\n\n\t/**\n\t * Handles a group message.\n\t * @param group - The group message\n\t * @param stream - The stream to read frames from\n\t *\n\t * @internal\n\t */\n\tasync runGroup(group: GroupMessage, stream: Reader) {\n\t\t// One that beats its subscription's TRACK_INFO waits for it unread, which flow control\n\t\t// bounds. Waiters resume in the order they arrived.\n\t\tconst entry = this.#subscribes.get(group.subscribe) ?? (await this.#pending.get(group.subscribe));\n\t\tif (!entry) {\n\t\t\tif (group.subscribe >= this.#subscribeNext) {\n\t\t\t\tthrow new Error(`unknown subscription: id=${group.subscribe}`);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (entry.fillGroup) {\n\t\t\tconst target = entry.fillGroup;\n\t\t\tif (group.key !== target.producer.start || target.taken || target.dropped) {\n\t\t\t\tstream.stop(StreamCode.Cancel);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttarget.taken = true;\n\t\t\ttarget.arrived();\n\t\t\tconst counted = entry.tail.open(group.key);\n\t\t\ttry {\n\t\t\t\tconst format = {\n\t\t\t\t\tscale: entry.timescale,\n\t\t\t\t\tcompress: entry.compress,\n\t\t\t\t\tlengthFirst: hasLengthFirst(this.version),\n\t\t\t\t\tframeStart: group.frameStart,\n\t\t\t\t};\n\t\t\t\tconst end = await untilAbandoned(target.producer, readFrames(stream, target.producer, format));\n\t\t\t\tif (end === undefined) target.producer.finish();\n\t\t\t\telse target.producer.finishAt(end);\n\t\t\t\tstream.stop(StreamCode.Cancel);\n\t\t\t} catch (err: unknown) {\n\t\t\t\tif (err instanceof ProtocolViolation) {\n\t\t\t\t\thooks.abortGroup(target.producer, err);\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\t\t// A failure with no code waits for the subscription's end to say why.\n\t\t\t\tif (e instanceof StreamError || e instanceof SessionError) hooks.abortGroup(target.producer, e);\n\t\t\t\telse target.lost = e;\n\t\t\t\tstream.stop(e);\n\t\t\t} finally {\n\t\t\t\tcounted.done();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst { track, timescale, tail, feedEnded } = entry;\n\t\tif (feedEnded?.peek()) {\n\t\t\tstream.stop(StreamCode.Cancel);\n\t\t\treturn;\n\t\t}\n\t\tconst feed = feedEnded ? [feedEnded] : [];\n\t\t// Lite-07: a drop that overtook the header, rather than a gap the grace gave up on.\n\t\tconst overtaken = hasSkip(this.version) && tail.dropped(group.key);\n\t\tlet producer: netGroup.Producer | undefined;\n\t\tlet arriving: Arriving | undefined;\n\t\tconst counted = tail.open(group.key, () => stream.last);\n\n\t\ttry {\n\t\t\t// The publisher contradicted its own end, which no later group can repair. lite-05\n\t\t\t// specified an inclusive end, so its last group lands on it: the write below drops\n\t\t\t// only that group there.\n\t\t\tif (entry.end !== undefined && group.key >= entry.end && this.version !== Version.DRAFT_05) {\n\t\t\t\tconst violation = new ProtocolViolation(\n\t\t\t\t\t`group ${group.key} is at or past the declared end ${entry.end}`,\n\t\t\t\t);\n\t\t\t\thooks.abortTrack(track, violation);\n\t\t\t\tthrow violation;\n\t\t\t}\n\t\t\t// Registered before any duplicate wait below, so a drop that lands during it finds the read.\n\t\t\tif (hasSkip(this.version)) {\n\t\t\t\tentry.reading ??= new Map();\n\t\t\t\tentry.reading.set(counted, group.key);\n\t\t\t}\n\t\t\t// A duplicate of a copy still arriving, such as one another subscription sharing the copy\n\t\t\t// delivers, waits unread, which flow control bounds. Created once that copy ends, it is\n\t\t\t// refused as a duplicate if the copy finished and takes the group if it failed,\n\t\t\t// continuing the reads of that copy, which wait while it is held. Its own reset ends the\n\t\t\t// wait; a clean end leaves it on the copy alone. Parked meanwhile: that copy's stream holds\n\t\t\t// the end of whatever carries it, so a stall there never holds this subscription's.\n\t\t\tfor (;;) {\n\t\t\t\t// Kept held past a failure until this copy takes the group, below.\n\t\t\t\tconst next = hooks.arrivingGroup(track, group.key);\n\t\t\t\tif (next === undefined) break;\n\t\t\t\tarriving?.release();\n\t\t\t\tarriving = next;\n\t\t\t\tcounted.park();\n\t\t\t\tconst settled = arriving.settled;\n\t\t\t\t// Only a failure of this stream ends the wait; its clean end, as the cancel after a reset\n\t\t\t\t// is, waits on nothing new, so nothing stays on the copy past this race. The reset is\n\t\t\t\t// decoded as `stream.closed` decodes it.\n\t\t\t\tconst failed = stream.closed.then(() => new Promise<never>(() => {}));\n\t\t\t\tconst end = await raceAborted([settled, failed, ...feed], stream.resetSignal, fromTransport);\n\t\t\t\tif (end === \"ended\") throw new StreamError(StreamCode.Cancel);\n\t\t\t}\n\t\t\tcounted.resume();\n\t\t\t// The drop already named this stream's group on the wire, so the stream holds no end, even\n\t\t\t// once it takes the group from a copy that failed: its reset, which a browser can lose, may\n\t\t\t// be all that is left of it. It reads on until its own end or the feed closes.\n\t\t\tif (overtaken) counted.done();\n\t\t\tproducer ??= hooks.receiveGroup(track, {\n\t\t\t\tstart: group.key,\n\t\t\t\toffset: group.frameStart,\n\t\t\t\tfill: entry.filling !== undefined,\n\t\t\t});\n\t\t\t// Before lite-07 no answer says where the live feed is, so its first group does, once the\n\t\t\t// copy holds it. Mirrors the Rust `Producer::edge_from_groups`.\n\t\t\tif (!hasRanges(this.version) && !entry.filling) hooks.answerEdge(track);\n\t\t\t// Released once this copy took the group, so the failed copy's readers find it.\n\t\t\tarriving?.release();\n\n\t\t\tconst format = {\n\t\t\t\tscale: timescale,\n\t\t\t\tcompress: entry.compress,\n\t\t\t\tlengthFirst: hasLengthFirst(this.version),\n\t\t\t\tframeStart: group.frameStart,\n\t\t\t};\n\t\t\tconst frames = readFrames(stream, producer, format);\n\t\t\t// A stream the subscription's end gave up on, as one whose reset the browser lost, fails like\n\t\t\t// a reset, so the reader may fetch what it still wants.\n\t\t\tconst quiet = counted.stalled.then((): never => {\n\t\t\t\tconsole.debug(`group stream stalled: group=${group.key} track=${track.name}`);\n\t\t\t\tthrow new StreamError(StreamCode.DeliveryTimeout, { message: \"stalled\" });\n\t\t\t});\n\t\t\tconst end = await race([\n\t\t\t\tentry.filling === \"range\" ? untilAbandoned(producer, frames) : frames,\n\t\t\t\tquiet,\n\t\t\t\t...feed,\n\t\t\t]);\n\t\t\tif (end === \"ended\") throw new StreamError(StreamCode.Cancel);\n\n\t\t\t// Whole at a GROUP_END's end, else without one: every frame sent arrived.\n\t\t\tif (end === undefined) producer.finish();\n\t\t\telse {\n\t\t\t\tproducer.finishAt(end);\n\t\t\t\t// No other group starts inside the span, which the tail counts as it counts the\n\t\t\t\t// group, and the track records skipped, as its own publisher's append did.\n\t\t\t\tif (end > group.key + 1n) {\n\t\t\t\t\ttail.account(group.key + 1n, end);\n\t\t\t\t\thooks.skipTrackGroups(track, group.key + 1n, end);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstream.stop(StreamCode.Cancel);\n\t\t} catch (err: unknown) {\n\t\t\t// A violation ends the session, which the connection does once it escapes; anything\n\t\t\t// else ends only this group.\n\t\t\tif (err instanceof ProtocolViolation) {\n\t\t\t\tif (producer) hooks.abortGroup(producer, err);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tconst e = await sessionCause(this.#quic, err);\n\t\t\tif (producer) hooks.abortGroup(producer, e);\n\t\t\tstream.stop(e);\n\t\t} finally {\n\t\t\tarriving?.release();\n\t\t\tentry.reading?.delete(counted);\n\t\t\tcounted.done();\n\t\t}\n\t}\n\n\t// A SUBSCRIBE_DROP named `[start, end)`: a stream still reading a group it names holds the\n\t// subscription's end no longer, since the drop accounts for the group and a browser can lose\n\t// that stream's reset. A final drop ends the read through the track, which aborts the group. A\n\t// stale one leaves it reading until its own end or this feed closes, which cuts a group still\n\t// arriving: lite-07 waits out no timer for a group the publisher already gave up.\n\t#dropped(entry: SubscribeEntry, start: bigint, end: bigint): void {\n\t\tfor (const [counted, key] of entry.reading ?? []) {\n\t\t\tif (key >= start && key < end) counted.done();\n\t\t}\n\t}\n\n\t/**\n\t * Receives QUIC datagrams and routes each to its subscription's track producer (lite-05 §6.4).\n\t *\n\t * Returns immediately on a non-datagram transport or pre-lite-05 version. A decode error or an\n\t * unknown subscribe id drops that datagram without tearing down the session (best-effort); the\n\t * loop ends only when the datagram stream closes.\n\t *\n\t * @internal\n\t */\n\tasync runDatagrams(): Promise<void> {\n\t\tif (!hasDatagrams(this.version) || DatagramStream.maxDatagramSize(this.#quic) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Never reject: this loop is awaited alongside the connection's other tasks, so a\n\t\t// datagram-stream failure must not tear the whole session down (it's best-effort).\n\t\tconst reader = DatagramStream.datagramReader(this.#quic);\n\t\tif (!reader) return;\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tfor (;;) {\n\t\t\t\t\tconst yielded = datagramBudget.poll();\n\t\t\t\t\tif (yielded !== undefined) {\n\t\t\t\t\t\tthis.#receiveYield = yielded;\n\t\t\t\t\t\tawait yielded;\n\t\t\t\t\t\tthis.#receiveYield = undefined;\n\t\t\t\t\t}\n\t\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\t\tif (done) break;\n\t\t\t\t\tif (!value) continue;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.#routeDatagram(value);\n\t\t\t\t\t} catch (err: unknown) {\n\t\t\t\t\t\tconsole.debug(`dropping datagram: ${reason(err)}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\treader.releaseLock();\n\t\t\t}\n\t\t} catch (err: unknown) {\n\t\t\tconst e = error(err);\n\t\t\tif (e.message === \"The session is closed.\") {\n\t\t\t\tconsole.debug(`datagram receive stopped: ${e.message}`);\n\t\t\t} else {\n\t\t\t\tconsole.warn(\"datagram stream error\", err);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Decode one datagram body and hand it to the datagram track it was sent for. A publisher\n\t// sends a track's first datagram right behind its answer, which the transport may hand over\n\t// first: one for a subscription still awaiting its answer is held a host task, so an answer\n\t// already received decodes before it, while other tracks' datagrams go on. One that still\n\t// finds no track is dropped and counted.\n\tasync #routeDatagram(payload: Uint8Array): Promise<void> {\n\t\tif (payload.byteLength > DatagramMessage.MAX_SIZE) return;\n\t\tlet unrouted = await this.#deliverDatagram(payload, true);\n\t\tif (unrouted === undefined) return;\n\t\t// Its track may have registered while the decode awaited.\n\t\tif (!this.#isHeld(unrouted) && this.#datagrams.has(unrouted))\n\t\t\tunrouted = await this.#deliverDatagram(payload, true);\n\t\tif (unrouted === undefined) return;\n\t\tconst awaiting = this.#isHeld(unrouted) || this.#unanswered.has(unrouted) || this.#pending.has(unrouted);\n\t\tif (awaiting && this.#held.length < HELD_DATAGRAMS) {\n\t\t\tthis.#held.push({ subscribe: unrouted, payload });\n\t\t\tthis.#heldRouted ??= this.#routeHeld();\n\t\t\treturn;\n\t\t}\n\t\tthis.#dropUnrouted(unrouted);\n\t}\n\n\t// Wait for the datagrams received for `subscribe` so far to route: a host task, then until the\n\t// receive loop reads the transport's queue empty rather than yielding to its budget, and those\n\t// held for its answer. A peer keeping the queue full delays the end, holding nothing more.\n\tasync #datagramsRouted(subscribe: bigint): Promise<void> {\n\t\tawait yieldNow();\n\t\tfor (;;) {\n\t\t\tconst receiveYield = this.#receiveYield;\n\t\t\tif (receiveYield !== undefined) {\n\t\t\t\tawait receiveYield;\n\t\t\t\t// The loop reads on in microtasks, until the queue empties or its next yield.\n\t\t\t\tawait yieldNow();\n\t\t\t} else if (this.#isHeld(subscribe)) {\n\t\t\t\t// A held datagram keeps its routing pass running.\n\t\t\t\tawait this.#heldRouted;\n\t\t\t} else return;\n\t\t}\n\t}\n\n\t// Whether a datagram for `subscribe` is held, which later ones wait behind to keep its order.\n\t#isHeld(subscribe: bigint): boolean {\n\t\treturn this.#held.some((held) => held.subscribe === subscribe);\n\t}\n\n\t// A host task later, route the datagrams held until now, then any held meanwhile.\n\tasync #routeHeld(): Promise<void> {\n\t\tawait yieldNow();\n\t\tfor (let count = this.#held.length; count > 0; count--) {\n\t\t\tconst [{ payload }] = this.#held;\n\t\t\ttry {\n\t\t\t\tconst unrouted = await this.#deliverDatagram(payload, false);\n\t\t\t\tif (unrouted !== undefined) this.#dropUnrouted(unrouted);\n\t\t\t} catch (err: unknown) {\n\t\t\t\tconsole.debug(`dropping datagram: ${reason(err)}`);\n\t\t\t}\n\t\t\tthis.#held.shift();\n\t\t}\n\t\tthis.#heldRouted = this.#held.length > 0 ? this.#routeHeld() : undefined;\n\t}\n\n\t#dropUnrouted(subscribe: bigint): void {\n\t\tthis.datagramsUnrouted++;\n\t\tconsole.debug(`dropping datagram for a subscription with no datagram track: id=${subscribe}`);\n\t}\n\n\t// Deliver one datagram body, returning its Subscribe ID if that subscription has no datagram\n\t// track, or, `behindHeld`, has a datagram held.\n\tasync #deliverDatagram(payload: Uint8Array, behindHeld: boolean): Promise<bigint | undefined> {\n\t\tconst dg = await DatagramMessage.decode(payload, this.version);\n\t\tconst entry = this.#datagrams.get(dg.subscribe);\n\t\tif (!entry) return dg.subscribe;\n\t\tif (behindHeld && this.#isHeld(dg.subscribe)) return dg.subscribe;\n\t\t// A scale-less datagram's timestamp is bare, which the track checks is its key.\n\t\t// A lite-05/06 datagram's wire timestamp is dropped, so its sequence stands in as the key.\n\t\tconst timestamp =\n\t\t\tentry.timescale === undefined\n\t\t\t\t? Time.Timestamp.unscaled(dg.sequence ?? dg.timestamp)\n\t\t\t\t: new Time.Timestamp(toNumber(dg.timestamp), entry.timescale);\n\t\tconst datagram = { timestamp, payload: dg.payload };\n\t\t// Lite-05/06 name a sequence, which a hop to a peer of those versions sends again.\n\t\tif (dg.sequence === undefined) entry.producer.write(datagram);\n\t\telse hooks.writeDatagramWire(entry.producer, datagram, dg.sequence);\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Opens a PROBE bidi stream to receive bandwidth estimates from the publisher.\n\t * Returns immediately if recv bandwidth is not supported.\n\t *\n\t * Probe is best-effort telemetry: a stream-level failure (peer reset, FIN,\n\t * missing peer support, transport hiccup) is caught and logged, never\n\t * propagated to the connection. On exit the bandwidth/RTT signals are\n\t * cleared so consumers see them as stale.\n\t *\n\t * @internal\n\t */\n\t// Await the peer's advertised probe level, blocking until its SETUP arrives. The peer\n\t// MUST send exactly one SETUP, so this resolves once that stream is read.\n\tasync #peerProbeLevel(peerSetup: Signal<Setup | undefined>, scope: Effect): Promise<ProbeLevel | undefined> {\n\t\tlet setup = peerSetup.peek();\n\t\twhile (setup === undefined) {\n\t\t\tsetup = await scope.race([Signal.race(peerSetup)]);\n\t\t\tif (setup === undefined) return;\n\t\t}\n\t\treturn setup.probe;\n\t}\n\n\tasync runProbe(signal?: AbortSignal, target?: Getter<number>): Promise<void> {\n\t\tif (!this.#probe) return;\n\t\tif (this.version === Version.DRAFT_01 || this.version === Version.DRAFT_02) return;\n\t\tconst scope = new Effect();\n\t\tconst abort = signal ? AbortSignal.any([signal, this.#closed.signal]) : this.#closed.signal;\n\t\tconst stop = () => scope.close();\n\t\tabort.addEventListener(\"abort\", stop, { once: true });\n\t\tif (abort.aborted) stop();\n\n\t\t// Probe is best-effort: transport failures stay per-stream, but malformed control\n\t\t// input ends the session. Drop the estimates so consumers know they're stale.\n\t\ttry {\n\t\t\t// Lite-05+ gates PROBE on the peer advertising Probe >= Report in its SETUP.\n\t\t\t// Only a peer that probes up to a target is sent one; a Report-level peer ignores it.\n\t\t\tlet increase = false;\n\t\t\tif (hasSetupStream(this.version) && this.#peerSetup) {\n\t\t\t\tconst level = await this.#peerProbeLevel(this.#peerSetup, scope);\n\t\t\t\tif (level === undefined || level < ProbeLevel.Report) return;\n\t\t\t\tincrease = level >= ProbeLevel.Increase;\n\t\t\t}\n\t\t\tif (this.#goingAway() || abort.aborted) return;\n\t\t\tconst stream = await Stream.tryOpen(this.#quic, { version: this.version, signal: abort });\n\t\t\tif (!stream) return;\n\t\t\tif (abort.aborted) {\n\t\t\t\t// Handed a stream as it gave up: give the slot back unused.\n\t\t\t\tstream.close();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tscope.cleanup(() => stream.close());\n\t\t\tawait scope.race([stream.writer.u53(StreamId.Probe)]);\n\t\t\tif (target && increase) this.#sendTarget(stream, target, scope);\n\t\t\tfor (;;) {\n\t\t\t\tconst probe = await scope.race([Probe.decodeMaybe(stream.reader, this.version)]);\n\t\t\t\tif (!probe) break;\n\t\t\t\t// Lite-03 carries no RTT; newer drafts retract it with a zero.\n\t\t\t\tconst prev = this.#probe.peek();\n\t\t\t\tconst rtt = probe.rtt !== undefined ? Duration.millis(probe.rtt) : undefined;\n\t\t\t\tthis.#probe.set({\n\t\t\t\t\t// `undefined` is the peer reporting \"unknown\"; a 0 would become a real ABR target.\n\t\t\t\t\testimatedRecvRate: probe.bitrate,\n\t\t\t\t\trtt: hasProbeRtt(this.version) ? rtt : (rtt ?? prev.rtt),\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (err: unknown) {\n\t\t\tcloseViolation(this.#quic, err);\n\t\t\tif (!this.#closed.signal.aborted) {\n\t\t\t\tconsole.warn(\"probe stream error\", err);\n\t\t\t}\n\t\t} finally {\n\t\t\tscope.close();\n\t\t\tabort.removeEventListener(\"abort\", stop);\n\t\t\tthis.#probe.set({});\n\t\t}\n\t}\n\n\t// Send `target` on the PROBE stream whenever it changes, in order, while `scope` lives.\n\t// Nothing is sent while it is zero, until it retracts a target already sent. One write is\n\t// in flight at a time, and the next sends the latest target, so a peer that stops reading\n\t// holds one target however often it changes.\n\t#sendTarget(stream: Stream, target: Getter<number>, scope: Effect): void {\n\t\tlet sent = 0;\n\t\tlet writing = false;\n\t\tconst write = async () => {\n\t\t\twriting = true;\n\t\t\ttry {\n\t\t\t\tfor (;;) {\n\t\t\t\t\t// The wire carries whole bits per second.\n\t\t\t\t\tconst next = Math.floor(target.peek());\n\t\t\t\t\tif (next === sent) return;\n\t\t\t\t\tsent = next;\n\t\t\t\t\t// Zero reads as unknown on the wire, which retracts the last target.\n\t\t\t\t\tawait new Probe({ bitrate: next > 0 ? next : undefined }).encode(stream.writer, this.version);\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// The writer and reader are independent, so a failed write does not end the\n\t\t\t\t// reads: end the probe here, which also closes the stream.\n\t\t\t\tscope.close();\n\t\t\t} finally {\n\t\t\t\twriting = false;\n\t\t\t}\n\t\t};\n\t\tscope.run((effect) => {\n\t\t\teffect.get(target);\n\t\t\tif (!writing) void write();\n\t\t});\n\t\t// A close queues behind a write the peer is not reading, which would hold the stream\n\t\t// open past the probe; a reset rejects that write and frees the stream.\n\t\tscope.cleanup(() => {\n\t\t\tif (writing) stream.abort(new StreamError(StreamCode.Cancel, { message: \"probe ended\" }));\n\t\t});\n\t}\n\n\t/**\n\t * Wait until every subscribe stream's responses are read to its FIN or reset. Bounded only\n\t * once the transport is closed, so that its reads end.\n\t *\n\t * @internal\n\t */\n\tasync drain(): Promise<void> {\n\t\tawait Promise.all(\n\t\t\tArray.from(this.#subscribes.values(), (entry) => entry.stream.kind !== \"setup\" && entry.stream.responses),\n\t\t);\n\t}\n\n\t/**\n\t * Ends every subscribed track, fetch, and setup exchange with `err`, the session's end, which\n\t * defaults to a clean close: they were cut off rather than ended. A track whose publisher\n\t * already ended it finishes instead, datagram tracks included.\n\t */\n\tclose(err: Error = new SessionError(SessionCode.Cancel)) {\n\t\tthis.#closed.abort(err);\n\t\tthis.#routed?.close(err);\n\n\t\tfor (const { track, stream, end, datagrams, fillGroup } of this.#subscribes.values()) {\n\t\t\tif (fillGroup) {\n\t\t\t\thooks.abortGroup(fillGroup.producer, err);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (stream.kind === \"finished\") track.finish();\n\t\t\thooks.abortTrack(track, err);\n\t\t\t// Lite-05/06: the stream track's end is its datagrams' end. An abort after the declared\n\t\t\t// end settled ends it cleanly, even while the FIN that would finalize it is in flight.\n\t\t\tif (datagrams && end !== undefined && hooks.trackReleased(track).peek() === null) datagrams.ended = true;\n\t\t}\n\n\t\tthis.#subscribes.clear();\n\t\tfor (const { producer, ended } of this.#datagrams.values()) {\n\t\t\tif (ended) producer.finish();\n\t\t\thooks.abortDatagrams(producer, err);\n\t\t}\n\t\tthis.#datagrams.clear();\n\t\tthis.#legacyDatagrams.clear();\n\n\t\t// This also releases callers still awaiting acceptance.\n\t\tfor (const { group } of this.#fetches.values()) {\n\t\t\thooks.abortGroup(group, err);\n\t\t}\n\t}\n}\n\n// Settles with `step`, or rejects with the group's error once it closes first. A publisher\n// may never answer a fetch, so Subscriber.close() closing the group is what releases it.\nasync function untilClosed<T>(group: netGroup.Producer, step: Promise<T>): Promise<T> {\n\tconst value = await race([step, group.closed]);\n\tconst closed = group.closed.peek();\n\tif (closed !== undefined) throw closed ?? new Error(\"fetch closed before it was accepted\");\n\treturn value as T;\n}\n\n// Resolve once no reader wants `group`, or it closed.\nasync function groupUnwanted(group: netGroup.Producer): Promise<void> {\n\tconst demand = group.demand();\n\twhile (demand.wanted.peek() && demand.closed.peek() === undefined) {\n\t\tawait Signal.race(demand.wanted, demand.closed);\n\t}\n}\n\n// Like untilClosed, but also cancels once every reader has left. Demand is level-triggered, so a\n// caller that coalesces onto the group before the check re-arms it.\nasync function untilAbandoned<T>(group: netGroup.Producer, step: Promise<T>): Promise<T> {\n\tconst idle: unique symbol = Symbol(\"idle\");\n\tfor (;;) {\n\t\tconst value = await untilClosed(group, race([step, groupUnwanted(group).then((): typeof idle => idle)]));\n\t\tif (value !== idle) return value as T;\n\t\tif (!group.demand().wanted.peek()) {\n\t\t\t// Close here rather than where the error lands, so no fetch coalesces onto the group\n\t\t\t// in between only to fail with it.\n\t\t\tconst err = new StreamError(StreamCode.Cancel, { message: \"cancel\" });\n\t\t\thooks.abortGroup(group, err);\n\t\t\tthrow err;\n\t\t}\n\t}\n}\n\n/**\n * A broadcast consumed from a lite session. It resolves `track.Consumer.info()` from a copy it\n * holds, else over the wire, and `.fetchGroup()` over the wire (lite-05+), by reaching into the\n * {@link Subscriber} it was opened from, the way the Rust `BroadcastConsumer` holds its session.\n * Live subscribes still flow through the inherited requested() queue.\n */\nclass ConsumeBroadcast extends broadcast.Consumer {\n\t#subscriber: Subscriber;\n\t#path: Path.Valid;\n\t#consumed: Consumed;\n\n\tconstructor(subscriber: Subscriber, path: Path.Valid, consumed: Consumed, state?: never) {\n\t\tsuper(state);\n\t\t// A metadata reader gets a copy of its own, filled by a metadata subscription.\n\t\tif (hasMeta(subscriber.version)) hooks.serveMeta(this);\n\t\tconst baseFetchGroup = wireOf(this).fetchGroup;\n\t\toverrideBroadcastWire(this, {\n\t\t\t// Only lite-07 keeps a name's stream and datagram tracks apart.\n\t\t\tdistinguishesKinds: hasDatagramTracks(subscriber.version),\n\t\t\tresolveTrackInfo: async (name, hold) => {\n\t\t\t\thold?.throwIfAborted();\n\t\t\t\t// A copy already accepted holds the identity's immutable info, so it answers without\n\t\t\t\t// waiting on its upstream, as the Rust broadcast answers from the track it holds. The\n\t\t\t\t// lookup holds that copy, and so its upstream subscription, until `hold` aborts.\n\t\t\t\tconst held = hooks.resolveHeld(this, name, hold);\n\t\t\t\tif (held !== undefined) return held;\n\t\t\t\tif (!consumed.valid) return subscriber.resolveTrackInfo(path, name, consumed, hold);\n\t\t\t\t// Retirement cancels setup, but a one-shot query still releases its TRACK\n\t\t\t\t// as soon as it answers instead of holding it for the broadcast's lifetime.\n\t\t\t\tconst query = new AbortController();\n\t\t\t\tconst signal = AbortSignal.any([consumed.valid, hold ?? query.signal]);\n\t\t\t\ttry {\n\t\t\t\t\treturn await subscriber.resolveTrackInfo(path, name, consumed, signal);\n\t\t\t\t} finally {\n\t\t\t\t\tif (!hold) query.abort();\n\t\t\t\t}\n\t\t\t},\n\t\t\t// On lite-07, fetchGroup deduplicates onto an active SUBSCRIBE when it covers or caches\n\t\t\t// `key`, else opens a one-shot bounded SUBSCRIBE + FIN. On lite-05/06 it reads a copy, whose\n\t\t\t// fill asks a missing group on a SUBSCRIBE of its own. Older drafts have no fill to ask.\n\t\t\tfetchGroup: hasRanges(subscriber.version)\n\t\t\t\t? (name, key, options) => {\n\t\t\t\t\t\tif (baseFetchGroup && subscriber.canDeduplicateFetch(path, consumed, name, key)) {\n\t\t\t\t\t\t\treturn baseFetchGroup(name, key, options);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn subscriber.fetchGroup(path, name, key, options, consumed);\n\t\t\t\t\t}\n\t\t\t\t: hasTrackStream(subscriber.version)\n\t\t\t\t\t? baseFetchGroup\n\t\t\t\t\t: undefined,\n\t\t});\n\t\tthis.#subscriber = subscriber;\n\t\tthis.#path = path;\n\t\tthis.#consumed = consumed;\n\t}\n\n\t// Preserve the subclass (and its wire-backed info/fetchGroup) when the consume cache shares\n\t// this broadcast across callers.\n\toverride clone(): ConsumeBroadcast {\n\t\treturn new ConsumeBroadcast(this.#subscriber, this.#path, this.#consumed, this.shareState());\n\t}\n}\n\n/**\n * The probes to ask for `asks` and `joins` beside the demand's `ranges` (see `probes` and\n * `joinProbes`), and the live probes to ask afresh. A time start's and a join's in turn, then\n * whichever kind is left, so a flood of either leaves the other its share of what fits. Mirrors the\n * Rust `wanted_probes`.\n *\n * @internal\n */\nexport function wantedProbes(\n\tentry: SubscribeEntry,\n\tasks: readonly bigint[],\n\tjoins: readonly JoinAsk[],\n\tranges: readonly WireRange[],\n): { probes: WireRange[]; reasked: bigint[] } {\n\tconst times = probes(asks, ranges);\n\tconst joined = joinProbes(entry, joins, ranges);\n\tconst wanted: WireRange[] = [];\n\tfor (let i = 0; i < Math.max(times.length, joined.probes.length); i++) {\n\t\tif (i < times.length) wanted.push(times[i]);\n\t\tif (i < joined.probes.length) wanted.push(joined.probes[i]);\n\t}\n\treturn { probes: wanted, reasked: joined.reasked };\n}\n\n// The probes to ask for `asks`, each a time start the copy's readers wait on, beside the demand's\n// `ranges`: a demand range from the same time answers it already. Mirrors the Rust `probes`.\nfunction probes(asks: readonly bigint[], ranges: readonly WireRange[]): WireRange[] {\n\tif (asks.length === 0) return [];\n\tconst answered = new Set<bigint>();\n\tfor (const { start } of ranges) {\n\t\tconst time = start?.time;\n\t\tif (time !== undefined) answered.add(time);\n\t}\n\treturn asks.filter((time) => !answered.has(time)).map(probe);\n}\n\n// The probes to ask for `joins`, each a live join the copy's readers wait on, beside the demand's\n// `ranges`, and the live probes to ask afresh: one answered before a reader began waiting.\n//\n// A live range asking the join answers it when it is still unanswered under a max as wide as the\n// waiting readers', or was answered after every waiting reader began under one. The max asked\n// may have bounded the answering relay's copy. A demand range added by this edit also qualifies\n// because its answer comes after the edit. A probe stays until its readers stop waiting, so its\n// answer outlives their placing, and asks the widest max they wait with, retuned in place as that\n// moves. Mirrors the Rust `join_probes`.\n/** @internal */\nexport function joinProbes(\n\tentry: SubscribeEntry,\n\tjoins: readonly JoinAsk[],\n\tranges: readonly WireRange[],\n): { probes: WireRange[]; reasked: bigint[] } {\n\tconst out: WireRange[] = [];\n\tconst reasked: bigint[] = [];\n\tfor (const join of joins) {\n\t\tconst key = joinKey(join.min, join.end);\n\t\tconst answers = (id: bigint) => {\n\t\t\tconst asked = entry.joinBudgets.get(id) ?? NO_MAX_DELAY;\n\t\t\tconst live = entry.live.get(id)?.start?.live;\n\t\t\tconst now = live === undefined ? 0 : wireBudget(live.max);\n\t\t\t// The publisher may answer under the max asked before a retune since.\n\t\t\tconst wide = Math.min(asked, now) >= join.budget;\n\t\t\tconst tick = entry.joinTicks.get(id);\n\t\t\tif (tick === undefined) return !entry.starts.has(id) && wide;\n\t\t\treturn tick > join.since && wide;\n\t\t};\n\t\t// Each live range asking the join, with whether it is a probe.\n\t\tconst live: [bigint, boolean][] = [];\n\t\tfor (const [id, held] of entry.live.entries())\n\t\t\tif (!entry.fillIds.has(id) && wireJoin(held) === key) live.push([id, entry.probeIds.has(id)]);\n\t\t// A demand range answers only while this edit keeps it: one the going-out ranges no longer\n\t\t// ask, hidden by a wider range or collapsed into another, is retired with its answer.\n\t\tconst kept = ranges.some((held) => wireJoin(held) === key);\n\t\tconst demandAnswers = kept && live.some(([id, probe]) => !probe && answers(id));\n\t\tconst added = kept && !live.some(([, probe]) => !probe);\n\t\tif (demandAnswers || added) continue;\n\t\tconst probing = live.filter(([, probe]) => probe).map(([id]) => id);\n\t\tif (!probing.some(answers)) reasked.push(...probing);\n\t\tout.push(joinProbe(join));\n\t}\n\treturn { probes: out, reasked };\n}\n\n// The range a copy asks its upstream to place the live join `join` with: the join itself, under the\n// widest max its readers wait with, so readers waiting on it share it, as a demand range asking it\n// goes out (see `toWireRanges`). Mirrors the Rust `join_probe`.\nfunction joinProbe(join: JoinAsk): WireRange {\n\tconst live = { min: join.min, max: join.budget < NO_MAX_DELAY ? join.budget : null };\n\treturn join.end === undefined ? { start: { live } } : { start: { live }, end: { time: join.end } };\n}\n\n/**\n * The live probes in `reasked` whose join a fresh probe among `probes` still asks, so each is\n * retired and asked afresh; the rest stay, as no probe that fit replaces them. Matched by the join\n * each asks, not the whole range: the fresh probe asks the max its readers now wait with, which may\n * differ from the one the live probe was answered under. Mirrors the Rust `fitted_reasks`.\n *\n * @internal\n */\nexport function fittedReasks(reasked: Iterable<bigint>, live: LiveRanges, probes: readonly WireRange[]): Set<bigint> {\n\tconst kept = new Set(probes.map(wireJoin).filter((join) => join !== undefined));\n\tconst renew = new Set<bigint>();\n\tfor (const id of reasked) {\n\t\tconst range = live.get(id);\n\t\tconst join = range === undefined ? undefined : wireJoin(range);\n\t\tif (join !== undefined && kept.has(join)) renew.add(id);\n\t}\n\treturn renew;\n}\n\n// The narrowest max in milliseconds among the live joins of `live`, {@link NO_MAX_DELAY} for none:\n// the budget an upstream may judge a group too old under, which a stream reset as too old names\n// nowhere. Mirrors the Rust `narrowest`.\nfunction narrowest(live: LiveRanges): number {\n\tlet narrowest = NO_MAX_DELAY;\n\tfor (const range of live.ranges()) {\n\t\tconst max = range.start?.live?.max ?? range.start?.joined?.max;\n\t\tif (max !== undefined) narrowest = Math.min(narrowest, wireBudget(max));\n\t}\n\treturn narrowest;\n}\n\n// A wire live start's max in milliseconds as a budget: {@link NO_MAX_DELAY} for none.\nfunction wireBudget(max: number | null): number {\n\treturn max ?? NO_MAX_DELAY;\n}\n\n// The live join `min` milliseconds behind the live edge (null for no lag limit) through the time\n// `end`, as one key.\nfunction joinKey(min: number | null, end: bigint | undefined): string {\n\treturn `${min}:${end ?? \"\"}`;\n}\n\n// The live join a wire range asks, as its lag and inclusive end (see `through`), undefined for one\n// that isn't a live join: where it lands doesn't depend on its max. Mirrors the Rust `wire_join`.\nfunction wireJoin(range: WireRange): string | undefined {\n\tconst live = range.start?.live;\n\treturn live === undefined ? undefined : joinKey(live.min, through(range.end));\n}\n\n// The exclusive group end past every range among `live`, undefined when one follows the live edge\n// or `live` holds none: the cap a stale drop is judged within. Mirrors the Rust `cap_of`.\nfunction capOf(live: LiveRanges): bigint | undefined {\n\tlet cap: bigint | undefined;\n\tfor (const range of live.ranges()) {\n\t\tif (range.end === undefined) return undefined;\n\t\tconst last = through(range.end);\n\t\t// A range ending before the first group reaches none.\n\t\tcap = max(cap ?? 0n, last === undefined ? 0n : last + 1n);\n\t}\n\treturn cap;\n}\n\n// The one `Subscriber Max Age` a wire before lite-07 carries for `ranges`, in milliseconds: `null`\n// (no limit) while a history range is asked for, and otherwise the largest live join's max.\n// Mirrors the Rust `Subscription::max_age`.\nfunction maxAge(ranges: readonly track.Range[]): number | null {\n\tconst budget = widest(ranges);\n\treturn budget < NO_MAX_DELAY ? budget : null;\n}\n\n// Whether `update` restates `live`, the terms the publisher last heard: the same terms, and on\n// lite-07 no range edited, or before it the same span. Mirrors the Rust `begin_subscription`.\nfunction restates(version: Version, update: SubscribeUpdate, live: SubscribeUpdate): boolean {\n\tconst terms =\n\t\tupdate.wantedGroup === live.wantedGroup &&\n\t\tupdate.priority === live.priority &&\n\t\tupdate.order === live.order &&\n\t\tupdate.maxDelay === live.maxDelay;\n\tif (!terms) return false;\n\tif (hasRanges(version)) return update.ranges?.length === 0 && !update.remove?.length && !update.retune?.length;\n\treturn (\n\t\tupdate.startGroup === live.startGroup &&\n\t\tupdate.endGroup === live.endGroup &&\n\t\tupdate.startFrame === live.startFrame &&\n\t\tupdate.endFrame === live.endFrame\n\t);\n}\n\n// The range a copy asks its upstream to place time start `time` with: the group containing it\n// alone, so it delivers nothing another range does not, and readers starting there share it.\n// Mirrors the Rust `probe`.\nfunction probe(time: bigint): WireRange {\n\treturn { start: { time }, end: { time } };\n}\n\n// Whether the live range `range`, once answered, starts at or past group `start`, which the live feed\n// already serves: from a time at or past it, as the group containing that time is, from a join placed\n// there, or at the latest group, which no group the feed serves is past. Mirrors the Rust `starts_past`.\nfunction startsPast(range: WireRange, start: bigint): boolean {\n\tconst from = range.start;\n\tif (from?.time !== undefined) return from.time >= start;\n\tif (from?.absolute !== undefined) return from.absolute >= start;\n\tif (from?.joined !== undefined) return from.joined.absolute >= start;\n\treturn from?.live?.min === 0;\n}\n\n// Whether a lite-07 range with no group to deliver says its publisher held none at or before its\n// reach: only one whose end takes in the group containing its time, which a range that ends before\n// its time may not, and an open one always does. Mirrors the Rust `SubStream::report_starts`.\nfunction reaches(end: WireAnchor | undefined, asked: bigint): boolean {\n\tif (end === undefined) return true;\n\tif (end.time !== undefined) return end.time >= asked;\n\tif (end.absolute !== undefined) return end.absolute > asked;\n\treturn false;\n}\n\n// The last time a lite-07 range ending at `end` reaches, as its own inclusive time, undefined while\n// it follows the live edge: an exclusive group end stops at the time before it. Mirrors the Rust\n// `through`.\nfunction through(end: WireAnchor | undefined): bigint | undefined {\n\tif (end?.time !== undefined) return end.time;\n\tif (end?.absolute === undefined) return undefined;\n\tif (end.frame) return end.absolute;\n\treturn end.absolute > 0n ? end.absolute - 1n : undefined;\n}\n"]}
|