@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/window.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.js","sourceRoot":"","sources":["../src/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAE,GA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AqF;IACrF,OAAO,SAAS,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,EAAU,EAAE,KAAa,EAAE,OAAgB,EAAE,QAAkB;IAClF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5C,IAAI,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3E,mGAAmG;IACnG,mGAAmG;IACnG,2FAA2F;IAC3F,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IACrF,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAChC,OAAO,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9E,CAAC","sourcesContent":["/**\n * A subscriber's own ranges, resolved to the group starts it reads, and the helpers that\n * translate ranges between the model and the wire. Mirrors the Rust `subscription` module.\n *\n * The aggregate a publisher sees is the union of every subscriber's ranges, so it says what\n * arrives, not what one subscriber asked for. A {@link Window} is the per-subscriber side:\n * resolved at the hop serving the subscriber, it filters that subscriber's reads.\n *\n * @module\n */\n\nimport { Duration } from \"@moq/clock\";\nimport { Counts, Cover } from \"./cover.ts\";\nimport { NO_MAX_DELAY, runsFrom, wireMillis } from \"./internal.ts\";\nimport type { Order, Range, Start, Subscription } from \"./track.ts\";\nimport { max, min, UNBOUNDED } from \"./util/key.ts\";\nimport { Sorted } from \"./util/sorted.ts\";\n\n/** A run of group starts `[start, end)`; an open run ends at {@link UNBOUNDED}. */\nexport type Run = { start: bigint; end: bigint };\n\n/**\n * One range resolved to groups: from `start` up to the exclusive `end`, undefined while open.\n * `floored` says whether the start names a group, rather than reaching back to the oldest one.\n */\nexport type Resolved = { start: bigint; end?: bigint; floored: boolean };\n\n/** Check one end's shape, naming `field` in the error. */\nfunction timeOf(field: string, value: unknown): bigint | undefined {\n\tif (value === undefined) return undefined;\n\tif (typeof value === \"bigint\" && value >= 0n) return value;\n\tthrow new TypeError(`${field} must be a time, a non-negative bigint`);\n}\n\n/**\n * Check one start's shape: a time, or a live join, its lag and max each rounded up to a whole\n * millisecond or null for no limit, an omitted max as zero.\n */\nfunction checkStart(value: unknown): Start | undefined {\n\tif (typeof value === \"object\" && value !== null && \"live\" in value) {\n\t\tconst live = (value as { live: unknown }).live;\n\t\tif (typeof live !== \"object\" || live === null) throw new TypeError(\"a live range start must be { min, max }\");\n\t\tconst { min, max } = live as { min: unknown; max?: unknown };\n\t\tif (min !== null && !Duration.is(min))\n\t\t\tthrow new TypeError(\"a live range start's min must be a Duration or null\");\n\t\tif (max !== undefined && max !== null && !Duration.is(max))\n\t\t\tthrow new TypeError(\"a live range start's max must be a Duration or null\");\n\t\treturn {\n\t\t\tlive: {\n\t\t\t\tmin: min === null ? null : wireMillis(\"live range start min\", min),\n\t\t\t\tmax: max === null ? null : wireMillis(\"live range start max\", max ?? Duration.ZERO),\n\t\t\t},\n\t\t};\n\t}\n\treturn timeOf(\"range start\", value);\n}\n\n/**\n * Check and copy a caller's ranges, refusing a malformed one rather than serving it widened. A\n * default priority or order is left out, so equal ranges compare equal however they were written.\n */\nexport function rangesOf(ranges: readonly Range[]): Range[] {\n\tif (!Array.isArray(ranges)) throw new TypeError(\"ranges must be an array\");\n\treturn ranges.map((range) => {\n\t\tif (typeof range !== \"object\" || range === null) throw new TypeError(\"a range must be an object\");\n\t\tconst out: Range = {};\n\t\tconst start = checkStart(range.start);\n\t\tconst end = timeOf(\"range end\", range.end);\n\t\tif (start !== undefined) out.start = start;\n\t\tif (end !== undefined) out.end = end;\n\t\treturn withPolicy(out, { priority: priorityOf(range.priority), order: orderOf(range.order) });\n\t});\n}\n\n// A plain JS caller can pass anything, and silently serving a typo at the default would hide it.\nfunction priorityOf(value: number | undefined): number {\n\tif (value === undefined) return 0;\n\tif (!Number.isInteger(value) || value < -128 || value > 127)\n\t\tthrow new RangeError(`priority must be an integer in -128..=127: ${value}`);\n\treturn value;\n}\n\nfunction orderOf(order: Order | undefined): Order {\n\tif (order === undefined) return \"descending\";\n\tif (order !== \"ascending\" && order !== \"descending\") throw new TypeError(`unknown order: ${String(order)}`);\n\treturn order;\n}\n\n/**\n * A range's priority and group order: how urgently, and in what order, its groups go out. Mirrors\n * the Rust `Policy`.\n */\nexport interface Policy {\n\tpriority: number;\n\torder: Order;\n}\n\n/**\n * The default subscription, its one range at `priority`: how a datagram track is subscribed, whose\n * only knob is a priority.\n */\nexport function latestAt(priority: number): Subscription {\n\treturn {\n\t\tranges: [\n\t\t\twithPolicy(\n\t\t\t\t{ start: { live: { min: Duration.ZERO, max: Duration.ZERO } } },\n\t\t\t\t{ priority, order: \"descending\" },\n\t\t\t),\n\t\t],\n\t};\n}\n\n/** The policy of a range that names none. */\nexport const DEFAULT_POLICY: Readonly<Policy> = Object.freeze({ priority: 0, order: \"descending\" });\n\n/** The policy `range` asks under. */\nexport function policyOf(range: Range): Policy {\n\treturn { priority: range.priority ?? 0, order: range.order ?? \"descending\" };\n}\n\n/** `range` under `policy`, which it leaves out where it is the default. */\nexport function withPolicy(range: Range, policy: Policy): Range {\n\tconst { priority: _, order: __, ...out } = range;\n\tconst ranged: Range = out;\n\tif (policy.priority !== 0) ranged.priority = policy.priority;\n\tif (policy.order === \"ascending\") ranged.order = \"ascending\";\n\treturn ranged;\n}\n\n/**\n * A number ranking how urgently a policy sends: the priority, then newest first, which wins a tie.\n * Ranges at one rank cover a range at an equal or lower one, so it adds nothing beside them.\n * Mirrors the Rust `Policy::rank`, reversed.\n */\nexport function policyRank(policy: Policy): number {\n\treturn policy.priority * 2 + (policy.order === \"descending\" ? 1 : 0);\n}\n\n/** The policy {@link policyRank} ranks `rank`. */\nexport function rankPolicy(rank: number): Policy {\n\tconst descending = ((rank % 2) + 2) % 2 === 1;\n\treturn { priority: (rank - (descending ? 1 : 0)) / 2, order: descending ? \"descending\" : \"ascending\" };\n}\n\n/**\n * What `ranges` ask as a whole, as a wire without a policy per range carries it: the highest\n * priority, newest first if any range at that priority is. The default without any. Mirrors the\n * Rust `Policy::of`.\n */\nexport function rangesPolicy(ranges: Iterable<Range>): Policy {\n\tlet top: number | undefined;\n\tfor (const range of ranges) {\n\t\tconst rank = policyRank(policyOf(range));\n\t\tif (top === undefined || rank > top) top = rank;\n\t}\n\treturn top === undefined ? { ...DEFAULT_POLICY } : rankPolicy(top);\n}\n\n/** The time `range` starts from, undefined when it doesn't name one. Mirrors the Rust `Range::time`. */\nexport function rangeTime(range: Range): bigint | undefined {\n\treturn typeof range.start === \"bigint\" ? range.start : undefined;\n}\n\n/**\n * The lag of the live join `range` starts with, in whole milliseconds rounded up as the wire\n * carries it, null for no lag limit, and undefined for a range that doesn't join live. Mirrors\n * the Rust `live_millis`.\n */\nexport function liveMillis(range: Range): number | null | undefined {\n\tif (typeof range.start !== \"object\") return undefined;\n\tconst { min } = range.start.live;\n\treturn min && Math.ceil(min.asMillis());\n}\n\n/**\n * A live join's max as a budget in milliseconds, rounded up: {@link NO_MAX_DELAY} for none, and\n * zero when omitted. Mirrors the Rust `budget`.\n */\nfunction budgetOf(max: Duration | null | undefined): number {\n\tif (max === null) return NO_MAX_DELAY;\n\treturn max === undefined ? 0 : Math.min(Math.ceil(max.asMillis()), NO_MAX_DELAY);\n}\n\n/** A budget in milliseconds as a live join's max: {@link NO_MAX_DELAY} is no limit. Mirrors the Rust `max_of`. */\nexport function maxOf(budget: number): Duration | null {\n\treturn budget >= NO_MAX_DELAY ? null : Duration.millis(budget);\n}\n\n/**\n * The staleness budget in milliseconds of the groups `range` covers: its max for a live join, and\n * none ({@link NO_MAX_DELAY}) for history. Mirrors the Rust `Range::budget`.\n */\nexport function rangeBudget(range: Range): number {\n\treturn typeof range.start === \"object\" ? budgetOf(range.start.live.max) : NO_MAX_DELAY;\n}\n\n/**\n * The widest staleness budget in milliseconds any of `ranges` gives a group: none while a history\n * range is asked for, and otherwise the largest live join's max, zero with no range. Mirrors the\n * Rust `Subscription::widest`.\n */\nexport function widest(ranges: Iterable<Range>): number {\n\tlet widest = 0;\n\tfor (const range of ranges) if (!isEmpty(range)) widest = Math.max(widest, rangeBudget(range));\n\treturn widest;\n}\n\n/**\n * The live join `range` asks, as its lag in milliseconds and its end, as one key: the key a join\n * is placed and answered under, which a change of max alone keeps. Undefined for history. Mirrors\n * the Rust `Range::join`.\n */\nexport function joinOf(range: Range): string | undefined {\n\tconst lag = liveMillis(range);\n\treturn lag === undefined ? undefined : `${lag}:${range.end ?? \"\"}`;\n}\n\n/**\n * The range from group `start` up to the exclusive group `end`, or onward for undefined: what a\n * wire's group bounds become. Undefined when it holds nothing, which an exclusive end of 0 says\n * whatever the start. Mirrors the Rust `Range::span`.\n */\nexport function span(start: bigint | undefined, end: bigint | undefined): Range | undefined {\n\tif (end === 0n) return undefined;\n\tconst range: Range = {};\n\tif (start !== undefined) range.start = start;\n\tif (end !== undefined) range.end = end - 1n;\n\treturn isEmpty(range) ? undefined : range;\n}\n\n/** Whether `range` certainly delivers nothing: it ends before a time start. */\nexport function isEmpty(range: Range): boolean {\n\tconst time = rangeTime(range);\n\treturn time !== undefined && range.end !== undefined && range.end < time;\n}\n\n/**\n * A canonical order, as the Rust `Range` sorts: from the oldest group first, then by time, then\n * live joins by lag, then by end, open first.\n */\nexport function compare(a: Range, b: Range): number {\n\tconst rank = (range: Range): [number, bigint, bigint] => {\n\t\tconst live = liveMillis(range);\n\t\t// A lag or max of none sorts first, as Rust's `Option` does.\n\t\tif (live !== undefined) return [2, BigInt(live ?? -1), BigInt(liveMax(range))];\n\t\tconst time = rangeTime(range);\n\t\treturn time === undefined ? [0, 0n, 0n] : [1, time, 0n];\n\t};\n\tconst [ra, va, ma] = rank(a);\n\tconst [rb, vb, mb] = rank(b);\n\treturn (\n\t\tra - rb ||\n\t\torder(va, vb) ||\n\t\torder(ma, mb) ||\n\t\torder(a.end ?? -1n, b.end ?? -1n) ||\n\t\tpolicyRank(policyOf(b)) - policyRank(policyOf(a))\n\t);\n}\n\n// A live join's max as a sort key: -1 for none, so it sorts first, else its milliseconds.\nfunction liveMax(range: Range): number {\n\tconst budget = rangeBudget(range);\n\treturn budget >= NO_MAX_DELAY ? -1 : budget;\n}\n\nfunction order(a: bigint, b: bigint): number {\n\treturn a < b ? -1 : a > b ? 1 : 0;\n}\n\n/** Whether two lists hold the same ranges in the same order. */\nexport function sameRanges(a: readonly Range[], b: readonly Range[]): boolean {\n\treturn a.length === b.length && a.every((range, index) => rangeKey(range) === rangeKey(b[index]));\n}\n\n/**\n * Whether two lists ask for the same groups range by range, whatever their policies: a change of\n * policy alone resolves nothing again.\n */\nexport function sameSpans(a: readonly Range[], b: readonly Range[]): boolean {\n\treturn a.length === b.length && a.every((range, index) => spanKey(range) === spanKey(b[index]));\n}\n\n/** A range as a string, equal exactly when the ranges are; JSON can't hold a bigint. */\nexport function rangeKey(range: Range): string {\n\treturn `${spanKey(range)}@${range.priority ?? 0}${range.order === \"ascending\" ? \"a\" : \"d\"}`;\n}\n\n/** {@link rangeKey} without the range's policy: equal when two ranges ask for the same groups. */\nfunction spanKey(range: Range): string {\n\tconst live = liveMillis(range);\n\tconst start = live === undefined ? (rangeTime(range) ?? \"\") : `L${live}/${liveMax(range)}`;\n\treturn `${start}..${range.end ?? \"\"}`;\n}\n\n/**\n * Whether `next` keeps where `old` resolved: the same groups under another policy, or the same\n * live join under another max. Mirrors the Rust `Range::retunes`.\n */\nexport function retunes(old: Range, next: Range): boolean {\n\tconst join = joinOf(next);\n\treturn spanKey(old) === spanKey(next) || (join !== undefined && joinOf(old) === join);\n}\n\n/**\n * The union of `ranges` in a canonical order, without empty or redundant ranges.\n *\n * Time spans merge where they overlap or touch, as the group starts they cover. The rest can't be\n * placed without the live edge, so only an open range drops what it certainly covers: the open\n * time span drops ranges starting inside it, and a range from the oldest group following the live\n * edge covers everything. A live join reaches no further back than its lag, so it covers nothing\n * else, and live joins of the same lag and end are one range under the largest max among them:\n * where a join lands doesn't depend on it.\n *\n * Ranges fold so only within one policy. Across policies a range drops only once ranges at\n * policies that {@link covers | cover} its own already ask for every group it does, since folding\n * it into a range at another policy would lose its priority or order. Mirrors the Rust `union`.\n */\nexport function union(ranges: readonly Range[]): Range[] {\n\tconst classes = new Map<number, Range[]>();\n\tfor (const range of ranges) {\n\t\tif (isEmpty(range)) continue;\n\t\tconst rank = policyRank(policyOf(range));\n\t\tconst held = classes.get(rank);\n\t\tconst bare = withPolicy(range, DEFAULT_POLICY);\n\t\tif (held) held.push(bare);\n\t\telse classes.set(rank, [bare]);\n\t}\n\tconst out: Range[] = [];\n\t// The ranges at every policy covering the next, each policy covering all that follow it.\n\tconst above: Range[] = [];\n\tfor (const rank of [...classes.keys()].sort((a, b) => b - a)) {\n\t\tconst policy = rankPolicy(rank);\n\t\tconst spans = fold(classes.get(rank) ?? []);\n\t\tconst covered = fold(above);\n\t\tfor (const range of spans) {\n\t\t\tif (!sameRanges(fold([...above, range]), covered)) out.push(withPolicy(range, policy));\n\t\t}\n\t\tabove.push(...spans);\n\t}\n\tout.sort(compare);\n\treturn out;\n}\n\n// The union of `ranges`, all at one policy, as {@link union} folds them.\nfunction fold(ranges: readonly Range[]): Range[] {\n\tconst kept = ranges.filter((range) => !isEmpty(range));\n\tif (kept.some((range) => range.start === undefined && range.end === undefined)) return [{}];\n\n\tconst spans: Run[] = [];\n\tfor (const range of kept) {\n\t\tconst time = rangeTime(range);\n\t\tif (time === undefined) continue;\n\t\tspans.push({ start: time, end: range.end === undefined ? UNBOUNDED : range.end + 1n });\n\t}\n\tspans.sort((a, b) => order(a.start, b.start) || order(a.end, b.end));\n\tconst runs: Run[] = [];\n\tfor (const span of spans) {\n\t\tconst last = runs.at(-1);\n\t\tif (last && span.start <= last.end) last.end = max(last.end, span.end);\n\t\telse runs.push({ ...span });\n\t}\n\n\tconst out: Range[] = runs.map((run) =>\n\t\trun.end === UNBOUNDED ? { start: run.start } : { start: run.start, end: run.end - 1n },\n\t);\n\t// A range with no time start can't be placed against the time spans. One from the oldest group\n\t// takes in every one from there ending before it.\n\tconst joins = new Map<string, Range>();\n\tlet oldest: Range | undefined;\n\tfor (const range of kept) {\n\t\tconst join = joinOf(range);\n\t\tif (join === undefined) {\n\t\t\tif (rangeTime(range) === undefined && (oldest === undefined || (range.end ?? 0n) > (oldest.end ?? 0n)))\n\t\t\t\toldest = range;\n\t\t\tcontinue;\n\t\t}\n\t\tconst held = joins.get(join);\n\t\tif (!held || rangeBudget(range) > rangeBudget(held)) joins.set(join, range);\n\t}\n\tif (oldest !== undefined) out.push(oldest);\n\tout.push(...joins.values());\n\n\tout.sort(compare);\n\treturn out.filter((range, index) => index === 0 || rangeKey(range) !== rangeKey(out[index - 1]));\n}\n\n/**\n * The lowest time any range starts from, or undefined when one names none: the floor a wire\n * without ranges carries. Mirrors the Rust `Subscription::start`.\n */\nexport function rangesStart(ranges: readonly Range[]): bigint | undefined {\n\tlet floor: bigint | undefined;\n\tfor (const range of ranges) {\n\t\tif (isEmpty(range)) continue;\n\t\tconst time = rangeTime(range);\n\t\tif (time === undefined) return undefined;\n\t\tfloor = min(floor ?? time, time);\n\t}\n\treturn floor;\n}\n\n/**\n * The exclusive end past every range, or undefined when one is open: the cap a wire without\n * ranges carries. No range at all ends at group 0. Mirrors the Rust `Subscription::end`.\n */\nexport function rangesEnd(ranges: readonly Range[]): bigint | undefined {\n\tlet end = 0n;\n\tfor (const range of ranges) {\n\t\tif (isEmpty(range)) continue;\n\t\tif (range.end === undefined) return undefined;\n\t\tend = max(end, range.end + 1n);\n\t}\n\treturn end;\n}\n\n/** The ranges a SUBSCRIBE carries for `ranges`: all but the empty ones. Mirrors the Rust `wire_ranges`. */\nexport function wireRanges(ranges: readonly Range[]): Range[] {\n\treturn ranges.filter((range) => !isEmpty(range));\n}\n\n/**\n * {@link wireRanges} of `subscription`, and the group each live join among them was\n * {@link Subscription.placed | placed} at, by its index there.\n */\nexport function wireHeld(subscription: Subscription): { ranges: Range[]; placed: Map<number, bigint> } {\n\tconst ranges: Range[] = [];\n\tconst placed = new Map<number, bigint>();\n\tfor (const [index, range] of (subscription.ranges ?? [{}]).entries()) {\n\t\tif (isEmpty(range)) continue;\n\t\tconst group = subscription.placed?.get(index);\n\t\tif (group !== undefined) placed.set(ranges.length, group);\n\t\tranges.push(range);\n\t}\n\treturn { ranges, placed };\n}\n\n/**\n * `ranges` with each live join `placed` at a group, by index, as a time start there: how a wire\n * before lite-07 narrows it, whose one max age still takes the join's max (see the original\n * ranges). Mirrors the Rust `Subscription::times`.\n */\nexport function placedAsTimes(ranges: readonly Range[], placed: ReadonlyMap<number, bigint>): Range[] {\n\tif (placed.size === 0) return [...ranges];\n\treturn ranges.map((range, index) => {\n\t\tconst group = placed.get(index);\n\t\tif (group === undefined) return range;\n\t\tconst out: Range = { start: group };\n\t\tif (range.end !== undefined) out.end = range.end;\n\t\treturn withPolicy(out, policyOf(range));\n\t});\n}\n\n/** Whether every range has an end, so a lite-07 publisher ends the subscription once it covers them. */\nexport function bounded(ranges: readonly Range[]): boolean {\n\treturn ranges.every((range) => range.end !== undefined);\n}\n\n/**\n * Whether a subscriber joins at the live edge: an open range with no time start, a live join or one\n * from the oldest group, following it. A time start resumes a known group instead, such as a route\n * switch picking up where the reader stopped. Mirrors the Rust `Prefs::joins_live`.\n */\nexport function joinsLive(ranges: readonly Range[]): boolean {\n\treturn ranges.some((range) => rangeTime(range) === undefined && range.end === undefined);\n}\n\n/**\n * The one span a wire without ranges carries for `ranges`, which the subscribers' own reads\n * narrow again: from the lowest time start up to {@link rangesEnd}.\n *\n * A subscription whose ranges all lack a time start asks with no start, which a pre-06 publisher\n * reads as the latest group and a lite-06 one as no floor: a wire without ranges carries a live\n * join so. One mixing the two asks from group 0, since no single start covers both: the latest\n * group may sit below the time start. Mirrors the Rust `wire_span`.\n */\nexport function wireSpan(ranges: readonly Range[]): { start?: bigint; end?: bigint } {\n\tlet start = rangesStart(ranges);\n\tif (start === undefined && ranges.some((range) => !isEmpty(range) && rangeTime(range) !== undefined)) start = 0n;\n\treturn { start, end: rangesEnd(ranges) };\n}\n\n/** A range holding nothing: nothing sorts below group 0. Mirrors the Rust `Range::EMPTY`. */\nexport const EMPTY: Range = Object.freeze({ start: 1n, end: 0n });\n\n/**\n * `ranges` with every range raised to start no earlier than `floor` and stop before the exclusive\n * `end`, without ever widening one. Mirrors the Rust `Subscription::clamped`.\n *\n * `resolved` names where each range resolved, by index, so its start becomes its own group,\n * raised to `floor` or capped at `end`. A start not resolved keeps its time, since the floor may\n * lie before it, so the caller drops what it resolves to below `floor`. An end not resolved\n * becomes the cap.\n */\nexport function clamped(\n\tranges: readonly Range[],\n\tfloor: bigint | undefined,\n\tend: bigint | undefined,\n\tresolved: readonly (Resolved | undefined)[],\n): Range[] {\n\tif (floor === undefined && end === undefined) return [...ranges];\n\treturn ranges.map((range, index) => {\n\t\tconst at = resolved[index];\n\t\tlet start = at ? at.start : range.start;\n\t\tif (floor !== undefined && typeof start === \"bigint\") start = max(start, floor);\n\t\tlet requested = range.end;\n\t\tif (requested !== undefined && at?.end !== undefined) {\n\t\t\tif (at.end === 0n) return EMPTY;\n\t\t\trequested = at.end - 1n;\n\t\t}\n\t\tif (end !== undefined) {\n\t\t\tif (end === 0n) return EMPTY;\n\t\t\trequested = requested === undefined ? end - 1n : min(requested, end - 1n);\n\t\t}\n\t\tconst out: Range = {};\n\t\tif (start !== undefined) out.start = start;\n\t\tif (requested !== undefined) out.end = requested;\n\t\treturn withPolicy(out, policyOf(range));\n\t});\n}\n\n/**\n * How a received copy places a live join's range: from an upstream answer recorded after join tick\n * `since`, the live edge having moved since any earlier one (see {@link Holdings.join}), or `at`\n * the group it was already placed at (see {@link Subscription.placed}). Mirrors the Rust `Joining`.\n */\nexport type Joining = { since: number; at?: never } | { at: bigint; since?: never };\n\n/** A live join placed from any answer. Mirrors the Rust `Joining::default`. */\nexport const SINCE_ZERO: Joining = { since: 0 };\n\n// The group `joining` places a join at, if it was placed already.\nfunction placedAt(joining: Joining | undefined): bigint | undefined {\n\treturn joining?.at;\n}\n\n/**\n * `ranges` as a copy asked from `floor` through the exclusive `end` asks for them, and the group each\n * live join among them is {@link Subscription.placed | placed} at, by index: as {@link clamped} places\n * them, except a live join, which stays itself, placed at the group {@link clamped} starts it at. As\n * a time start it would read as history, whose groups never go stale. A join `placed` already starts\n * no earlier than where it was placed, and stays placed whatever the bounds. Mirrors the Rust\n * `Range::asked` and the resume `asked`.\n */\nexport function asked(\n\tranges: readonly Range[],\n\tfloor: bigint | undefined,\n\tend: bigint | undefined,\n\tresolved: readonly (Resolved | undefined)[],\n\tplaced: ReadonlyMap<number, bigint> = new Map(),\n): { ranges: Range[]; placed: Map<number, bigint> } {\n\tconst out: Range[] = [];\n\tconst at = new Map<number, bigint>();\n\tfor (const [index, range] of ranges.entries()) {\n\t\tconst group = placed.get(index);\n\t\tconst clamp =\n\t\t\tgroup === undefined\n\t\t\t\t? clamped([range], floor, end, [resolved[index]])[0]\n\t\t\t\t: clamped([range], floor === undefined ? group : max(floor, group), end, [\n\t\t\t\t\t\tresolved[index] ?? { start: group, floored: true },\n\t\t\t\t\t])[0];\n\t\tconst start = range.start;\n\t\tif (typeof start !== \"object\" || typeof clamp.start !== \"bigint\" || isEmpty(clamp)) {\n\t\t\tout.push(clamp);\n\t\t\tcontinue;\n\t\t}\n\t\tconst join: Range = { start };\n\t\tif (clamp.end !== undefined) join.end = clamp.end;\n\t\tat.set(index, clamp.start);\n\t\tout.push(withPolicy(join, policyOf(range)));\n\t}\n\treturn { ranges: out, placed: at };\n}\n\n/** Where a time falls among the groups a hop holds. Mirrors the Rust `Containing`. */\nexport type Containing =\n\t/**\n\t * A range from it starts at this key: the newest group starting at or before it, or, once that\n\t * group ended whole at or before the time, its End, so the range starts at the next group: a time\n\t * past a whole group's span lies in a span no group contains.\n\t */\n\t| { at: bigint }\n\t/** Every group held starts after it. */\n\t| \"before\"\n\t/** No group is held. */\n\t| \"unknown\";\n\n/**\n * The groups a serving hop holds, by start, for resolving time starts and live joins. Mirrors the\n * Rust `Holdings`.\n */\nexport interface Holdings {\n\t/**\n\t * Whether this hop resolves ranges against groups of its own. A hop that holds none, such as a\n\t * reader following route copies, leaves its ranges to the copies.\n\t */\n\tresolves(): boolean;\n\t/**\n\t * Whether this hop leaves a live join to the copies it follows, holding it as before any group\n\t * until one places it. Absent for one whose ranges were placed already, where a live join left\n\t * with no start reached back. Mirrors the Rust `Holdings::defers`.\n\t */\n\tdefers?(): boolean;\n\t/**\n\t * Where `time` falls among the groups held, for a range whose groups go stale past `budget` in\n\t * milliseconds ({@link NO_MAX_DELAY} for none): a received copy counts a group its upstream gave\n\t * up as stale only for a range within the budget it was judged under. Mirrors the Rust\n\t * `Holdings::containing`.\n\t */\n\tcontaining(time: bigint, budget: number): Containing;\n\t/** The lowest group held starting at or after `from`. */\n\tnextStart(from: bigint): bigint | undefined;\n\t/** Whether nothing more can arrive here, so a time start nothing contains reaches back to the oldest group rather than wait. */\n\tcomplete(): boolean;\n\t/**\n\t * Whether a fill handler can look up a time start the groups held can't place in the track's\n\t * history, as the Rust `Holdings::looks_up` says. Absent for none.\n\t */\n\tlooksUp?(): boolean;\n\t/**\n\t * Where a live join holding a nonzero `min` behind the live edge, ending at `end`, starts for a\n\t * range whose groups go stale past `budget` (see {@link containing}). Only an upstream's answer\n\t * recorded after tick `since`, under a budget at least as wide, counts: a relay answering it\n\t * starts no lower than the groups its own copy's max age bound expired, which a wider reader still\n\t * wants. Undefined while it can't tell yet: nothing held measures the live edge, or a relay copy\n\t * waits on upstream to answer for it. Absent where the hop leaves its ranges to the copies it\n\t * follows. Mirrors the Rust `Holdings::join`.\n\t */\n\tjoin?(min: Duration | null, end: bigint | undefined, budget: number, since: number): Join | undefined;\n\t/**\n\t * Whether this hop places a live join only where its upstream's answer to that join does, never\n\t * from the groups it holds: a lite-07 relay copy, whose wire carries each join and reports where\n\t * each starts. Absent for none. Mirrors the Rust `Holdings::answers_joins`.\n\t */\n\tanswersJoins?(): boolean;\n\t/**\n\t * The upstream's answer to the live join `min` through `end`, for a reader within `budget` whose\n\t * range was added at tick `since`: the group it starts at, or none for nothing to deliver. It\n\t * stands once the end is declared too, when {@link answersJoins} no longer holds: a copy holds\n\t * only the groups from where its feed started, so they can't measure a join behind them. Absent\n\t * for none. Mirrors the Rust `Holdings::answered_join`.\n\t */\n\tansweredJoin?(\n\t\tmin: Duration | null,\n\t\tend: bigint | undefined,\n\t\tbudget: number,\n\t\tsince: number,\n\t): { start?: bigint } | undefined;\n\t/**\n\t * Whether the producer declared every start in `[start, end)` skipped, so no group starts there\n\t * even in the history a handler serves. Absent for none.\n\t */\n\tneverProduced?(start: bigint, end: bigint): boolean;\n\t/**\n\t * Runs of times {@link containing} can't place, so a window skips its time starts in them rather\n\t * than try each again whenever the groups held change. Absent, or undefined, when it can't tell,\n\t * so each is tried. Mirrors the Rust `Holdings::unplaced`.\n\t */\n\tunplaced?(): Unplaced | undefined;\n}\n\n/**\n * Where a live join starts: as a time start at the live edge less its lag (`time`), which\n * resolves, looks up, and waits as any time start does; at a group this hop measured by arrival,\n * or its upstream answered (`group`); or nowhere (`\"empty\"`), as the upstream answered a bounded\n * join. Mirrors the Rust `Join`.\n */\nexport type Join = { group: bigint; time?: never } | { time: bigint; group?: never } | \"oldest\" | \"empty\";\n\n/**\n * The times a {@link Holdings} can't place: sorted, disjoint runs, apart from the times a placement\n * that the groups and drops held don't decide places. `mark` changes whenever such a placement may\n * have, so a window that sees it unchanged tries only the times outside `runs` again.\n */\nexport type Unplaced = { runs: readonly Run[]; mark: number };\n\n/** A hop that holds no groups of its own, such as a reader following route copies that resolve its ranges for it. */\nexport const UNHELD: Holdings = Object.freeze({\n\tresolves: () => false,\n\tdefers: () => true,\n\tcontaining: () => \"unknown\" as const,\n\tnextStart: () => undefined,\n\tcomplete: () => true,\n});\n\n/**\n * A hop that holds no groups of its own but knows every time it is asked starts a group, such as\n * a publisher's reported start: a time start names the group starting there.\n */\nexport const AT_KEYS: Holdings = Object.freeze({\n\t...UNHELD,\n\tdefers: () => false,\n\tcontaining: (time: bigint) => ({ at: time }),\n});\n\n/** One non-empty range, resolved. */\ntype Span = {\n\t/** The time it starts from: its range's start, or a live join's; undefined for the oldest group or a join's group. */\n\tat: bigint | undefined;\n\tstart: bigint;\n\t/** The exclusive end, {@link UNBOUNDED} past every group. */\n\tend: bigint;\n\t/** Whether the start names a group, rather than reaching back to the oldest one. */\n\tfloored: boolean;\n\t/**\n\t * A time start the groups held can't place, whose group a fill asks the track's history for: the\n\t * span reads nothing until it answers.\n\t */\n\tlooking?: Lookup;\n\t/** A time start the groups held can't place yet: the span reads only the groups from that time until it can. */\n\twaiting: boolean;\n\t/** Its range's budget in milliseconds, which the groups it reads get. */\n\tbudget: number;\n\t/** What it counts in the window's groups and missable groups, so taking it out uncounts exactly that. */\n\treads?: Run;\n\tasks?: Run;\n};\n\n/**\n * A time start being looked up: its time, and the oldest key the group containing it may start at,\n * past every group held below it. Mirrors the Rust `Looking`.\n */\nexport interface Lookup {\n\ttime: bigint;\n\tfloor: bigint;\n}\n\n/**\n * What the track's history answered a time start's lookup with: the group containing the time, no\n * group from `floor`, the oldest key it asked from, through the time, or nothing, with no handler\n * left to. Mirrors the Rust `window::Found`.\n */\nexport type Found = { kind: \"group\"; group: bigint } | { kind: \"dropped\"; floor: bigint } | { kind: \"unanswered\" };\n\n/**\n * A subscriber's ranges resolved to the group starts it reads, each by the key its caller gave\n * it, so an edit resolves only the ranges it adds and leaves every other where it resolved.\n * Mirrors the Rust `Window`.\n *\n * A start resolves when its range is placed, and again only when it is replaced. A live join\n * waits, reading everything, until {@link settle} names a first group. A time start the groups\n * held can't place yet waits too, reading only the groups from its time meanwhile, since whichever\n * group contains it starts at or before it.\n */\nexport class Window {\n\t// What these were resolved from, by key, in key order.\n\t#ranges = new Map<bigint, Range>();\n\t// Each non-empty range placed, by key.\n\t#spans = new Map<bigint, Span>();\n\t// The groups the spans cover, counted so an edit moves only its own runs.\n\t#groups = new Cover();\n\t// The part of {@link #groups} a miss may ask for: see {@link missable}.\n\t#missable = new Cover();\n\t// The ranges whose live join waits on a first group, by key: everything is in range meanwhile.\n\t#pending = new Set<bigint>();\n\t/**\n\t * The spans, by key, whose time start waits on a group arriving, by that time: a change to the\n\t * groups held tries only those its {@link Holdings.unplaced} leaves out.\n\t */\n\t#waiting = new ByTime();\n\t/** The {@link Unplaced.mark} every waiting span was last tried under. */\n\t#waited: number | undefined;\n\t/**\n\t * The spans, by key, still looking up their time start, which read nothing meanwhile, by that\n\t * time: kept apart so an answer finds them without visiting every span.\n\t */\n\t#looking = new ByTime();\n\t/**\n\t * The ranges, by key, of a live join that can't tell where it starts while groups are held, such\n\t * as a relay copy waiting on upstream to answer for it, so they read nothing yet: a group held is\n\t * no reason to start at it.\n\t */\n\t#reaching = new Set<bigint>();\n\t/** How each live join's range is placed, by key. */\n\t#joining = new Map<bigint, Joining>();\n\t// How many spans name each start, and how many name none: see {@link start}.\n\t#named = new Counts<bigint>();\n\t#unnamed = 0;\n\t// The budgets of the live joins among the ranges, counted, for the widest asked.\n\t#budgets = new Counts<number>();\n\t// The non-empty history ranges among the ranges, placed or not.\n\t#histories = 0;\n\t// The groups the spans read, by the budget of their ranges.\n\t#layers = new Map<number, Cover>();\n\t// {@link budget} as last read, until the budgets, the layers, or the ranges not yet placed move.\n\t#budget?: Budget;\n\n\t/**\n\t * Resolve `ranges`, keyed by position, time starts from `holdings`, and a live join back by its\n\t * lag from the live edge, `latest` being the latest group.\n\t */\n\tconstructor(ranges: readonly Range[], latest: bigint | undefined, holdings: Holdings = UNHELD) {\n\t\tfor (const [index, range] of ranges.entries()) {\n\t\t\tthis.#ranges.set(BigInt(index), range);\n\t\t\tthis.#countBudget(range, 1);\n\t\t}\n\t\tthis.#place(latest, holdings);\n\t}\n\n\t/**\n\t * {@link Window} for ranges the caller keys itself, in key order, each live join's range placed as\n\t * `joining` of its key says (from join tick 0 by default). Mirrors the Rust `Window::keyed_since`.\n\t */\n\tstatic keyed(\n\t\tranges: Iterable<readonly [bigint, Range]>,\n\t\tlatest: bigint | undefined,\n\t\tholdings: Holdings = UNHELD,\n\t\tjoining: (key: bigint) => Joining = () => SINCE_ZERO,\n\t): Window {\n\t\tconst window = new Window([], undefined, holdings);\n\t\tfor (const [key, range] of ranges) {\n\t\t\twindow.#ranges.set(key, range);\n\t\t\twindow.#countBudget(range, 1);\n\t\t\tconst join = joining(key);\n\t\t\tif (liveMillis(range) !== undefined || join.at !== undefined) window.#joining.set(key, join);\n\t\t}\n\t\twindow.#place(latest, holdings);\n\t\treturn window;\n\t}\n\n\t/**\n\t * How long each group stays worth delivering once superseded, as these ranges set it: the same\n\t * value until the ranges or where they are placed move. Mirrors the Rust `Window::budget`.\n\t */\n\tbudget(): Budget {\n\t\tif (this.#budget) return this.#budget;\n\t\tthis.#budget = new Budget({\n\t\t\tlayers: [...this.#layers].map(([budget, cover]) => [budget, cover.runs()] as const),\n\t\t\tunplaced: this.#unplacedBudgets((key) => this.#ranges.get(key)),\n\t\t\twidest: this.#histories > 0 ? NO_MAX_DELAY : (this.#budgets.last() ?? 0),\n\t\t});\n\t\treturn this.#budget;\n\t}\n\n\t/**\n\t * Each range not yet placed, as `rangeOf` its key says, as the exclusive end of the groups it may\n\t * cover and its budget: a pending one may cover any up to its end, since every group is in range\n\t * meanwhile, and a live join still reaching may start at any. Mirrors the Rust\n\t * `Window::unplaced_budgets`.\n\t */\n\t#unplacedBudgets(rangeOf: (key: bigint) => Range | undefined): [bigint, number][] {\n\t\tconst unplaced: [bigint, number][] = [];\n\t\tfor (const key of [...this.#pending, ...this.#reaching]) {\n\t\t\tconst range = rangeOf(key);\n\t\t\tif (range === undefined || isEmpty(range)) continue;\n\t\t\tunplaced.push([range.end === undefined ? UNBOUNDED : range.end + 1n, rangeBudget(range)]);\n\t\t}\n\t\treturn unplaced;\n\t}\n\n\t/**\n\t * The ranges covering group `key`, by key, each with the budget in milliseconds `rangeOf` its key\n\t * gives, these ranges as given by default: a range not yet placed may cover any group up to its\n\t * end, as in {@link budget}. Mirrors the Rust `Window::covering`.\n\t */\n\tcovering(key: bigint, rangeOf = (id: bigint) => this.#ranges.get(id)): [bigint, number][] {\n\t\tconst ids: bigint[] = [];\n\t\tfor (const [id, span] of this.#spans)\n\t\t\tif (span.reads && span.reads.start <= key && key < span.reads.end) ids.push(id);\n\t\tfor (const id of [...this.#pending, ...this.#reaching]) {\n\t\t\tconst range = rangeOf(id);\n\t\t\tif (range !== undefined && !isEmpty(range) && (range.end === undefined || range.end >= key)) ids.push(id);\n\t\t}\n\t\tconst covering: [bigint, number][] = [];\n\t\tfor (const id of ids) {\n\t\t\tconst range = rangeOf(id);\n\t\t\tif (range !== undefined) covering.push([id, rangeBudget(range)]);\n\t\t}\n\t\treturn covering;\n\t}\n\n\t/**\n\t * {@link budget} with each range's staleness taken from `ranges`, by key, rather than from the\n\t * range it was placed as: a front's reader places a live join where a copy resolved it, as a time\n\t * start, and the join's groups still go stale past its max. Mirrors the Rust `Window::budget_of`.\n\t */\n\tbudgetOf(ranges: ReadonlyMap<bigint, Range>): Budget {\n\t\tconst layers = new Map<number, Cover>();\n\t\tfor (const [key, span] of this.#spans) {\n\t\t\tconst range = ranges.get(key);\n\t\t\tif (!span.reads || range === undefined) continue;\n\t\t\tconst budget = rangeBudget(range);\n\t\t\tconst layer = layers.get(budget) ?? new Cover();\n\t\t\tlayers.set(budget, layer);\n\t\t\tlayer.add(span.reads.start, span.reads.end, 1);\n\t\t}\n\t\treturn new Budget({\n\t\t\tlayers: [...layers].map(([budget, cover]) => [budget, cover.runs()] as const),\n\t\t\tunplaced: this.#unplacedBudgets((key) => ranges.get(key)),\n\t\t\twidest: widest(ranges.values()),\n\t\t});\n\t}\n\n\t// Count a live join's budget among {@link #budgets}, or a history range among {@link #histories},\n\t// once more, or once less for a `delta` of -1.\n\t#countBudget(range: Range, delta: 1 | -1): void {\n\t\tif (liveMillis(range) === undefined) {\n\t\t\tif (isEmpty(range)) return;\n\t\t\tthis.#histories += delta;\n\t\t} else if (delta > 0) this.#budgets.add(rangeBudget(range));\n\t\telse this.#budgets.remove(rangeBudget(range));\n\t\tthis.#budget = undefined;\n\t}\n\n\t/** What these were resolved from, in key order. Costs every range. */\n\tget ranges(): Range[] {\n\t\treturn [...this.#ranges.values()];\n\t}\n\n\t/**\n\t * Retire the ranges keyed `retire`, then resolve `add`, leaving every other range where it\n\t * resolved. A key added again replaces its range in place, but a live join added again with only\n\t * its max or policy changed, and placed as it was, keeps where it started, as does any other range\n\t * added again with only its policy changed; any other key added is past every key held. Each live\n\t * join's range is placed as `joining` of its key says (from join tick 0 by default). Costs the\n\t * ranges edited, never the rest. Returns whether any group it reads, or how long one stays\n\t * fresh, may have moved: a change of policy alone moves none. Mirrors the Rust\n\t * `Window::edit_since`.\n\t */\n\tedit(\n\t\tretire: Iterable<bigint>,\n\t\tadd: readonly (readonly [bigint, Range])[],\n\t\tlatest: bigint | undefined,\n\t\tholdings: Holdings = UNHELD,\n\t\tjoining: (key: bigint) => Joining = () => SINCE_ZERO,\n\t): boolean {\n\t\tlet moved = false;\n\t\tconst retuned = new Set<bigint>();\n\t\tfor (const [key, range] of add) {\n\t\t\tconst old = this.#ranges.get(key);\n\t\t\t// A live join keeps where it started whatever its max, and any range whose policy alone\n\t\t\t// moved keeps where it resolved; one added again unchanged resolves afresh.\n\t\t\tconst kept =\n\t\t\t\told !== undefined &&\n\t\t\t\t(joinOf(range) !== undefined\n\t\t\t\t\t? joinOf(old) === joinOf(range)\n\t\t\t\t\t: rangeKey(old) !== rangeKey(range) && retunes(old, range));\n\t\t\tif (kept && placedAt(this.#joining.get(key)) === placedAt(joining(key))) retuned.add(key);\n\t\t}\n\t\tconst readded = new Set(add.map(([key]) => key));\n\t\tfor (const key of retire) {\n\t\t\tif (retuned.has(key)) continue;\n\t\t\tmoved = true;\n\t\t\tthis.#retire(key);\n\t\t\t// One added again is replaced in place below, keeping its order.\n\t\t\tif (!readded.has(key)) {\n\t\t\t\tconst range = this.#ranges.get(key);\n\t\t\t\tif (range) this.#countBudget(range, -1);\n\t\t\t\tthis.#ranges.delete(key);\n\t\t\t\tthis.#joining.delete(key);\n\t\t\t}\n\t\t}\n\t\tfor (const [key, range] of add) {\n\t\t\tconst old = this.#ranges.get(key);\n\t\t\tif (\n\t\t\t\tretuned.has(key) &&\n\t\t\t\told !== undefined &&\n\t\t\t\tretunes(old, range) &&\n\t\t\t\trangeBudget(old) === rangeBudget(range)\n\t\t\t) {\n\t\t\t\t// Its policy alone moved, which nothing here reads.\n\t\t\t\tthis.#ranges.set(key, range);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmoved = true;\n\t\t\tif (old !== undefined) this.#countBudget(old, -1);\n\t\t\tthis.#countBudget(range, 1);\n\t\t\tif (retuned.has(key)) {\n\t\t\t\tthis.#ranges.set(key, range);\n\t\t\t\t// Its groups take the new budget where it stands.\n\t\t\t\tconst span = this.#spans.get(key);\n\t\t\t\tif (span) {\n\t\t\t\t\tthis.#uncount(key, span);\n\t\t\t\t\tthis.#count(key, { ...span, budget: rangeBudget(range) });\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.#retire(key);\n\t\t\tthis.#ranges.set(key, range);\n\t\t\tconst join = joining(key);\n\t\t\tif (liveMillis(range) !== undefined || join.at !== undefined) this.#joining.set(key, join);\n\t\t\telse this.#joining.delete(key);\n\t\t\tif (!isEmpty(range)) this.#placeRange(key, latest, holdings);\n\t\t}\n\t\treturn moved;\n\t}\n\n\t/**\n\t * Note each live join range keyed in `since` as added at its tick instead (see\n\t * `Prefs.stamp`), placing again any still waiting on an answer, which an answer recorded since\n\t * that tick may now place. One already placed stays where it started, and one placed at a group\n\t * takes no tick. Returns whether the groups in range moved.\n\t */\n\tstamp(\n\t\tsince: Iterable<readonly [bigint, number]>,\n\t\tlatest: bigint | undefined,\n\t\tholdings: Holdings = UNHELD,\n\t): boolean {\n\t\tconst placed = this.#spans.size;\n\t\tfor (const [key, tick] of since) {\n\t\t\tif (!(this.#joining.get(key)?.since !== undefined)) continue;\n\t\t\tthis.#joining.set(key, { since: tick });\n\t\t\tif (!this.#reaching.delete(key)) continue;\n\t\t\tthis.#budget = undefined;\n\t\t\tthis.#placeRange(key, latest, holdings);\n\t\t}\n\t\treturn this.#spans.size > placed;\n\t}\n\n\t// Take out what the range keyed `key` placed, leaving the range itself.\n\t#retire(key: bigint): void {\n\t\tconst pending = this.#pending.delete(key);\n\t\tif (this.#reaching.delete(key) || pending) this.#budget = undefined;\n\t\tconst span = this.#spans.get(key);\n\t\tif (span) this.#uncount(key, span);\n\t}\n\n\t/** Whether a live join still waits on a first group. */\n\tget pending(): boolean {\n\t\treturn this.#pending.size > 0;\n\t}\n\n\t/**\n\t * Whether a live join's reach back waits on its upstream's answer or a group held starting. Mirrors\n\t * the Rust `Window::is_reaching`.\n\t */\n\tget reaching(): boolean {\n\t\treturn this.#reaching.size > 0;\n\t}\n\n\t/**\n\t * The keys of the ranges still waiting on a live join or a time start. Mirrors the Rust\n\t * `Window::unsettled`.\n\t */\n\tunsettled(): Set<bigint> {\n\t\tconst keys = new Set([...this.#pending, ...this.#reaching.keys()]);\n\t\tfor (const entry of this.#waiting.all()) for (const key of entry.keys) keys.add(key);\n\t\tfor (const entry of this.#looking.all()) for (const key of entry.keys) keys.add(key);\n\t\treturn keys;\n\t}\n\n\t/**\n\t * Whether a range not yet placed may still come to hold group `key`: placed, it starts at or below\n\t * the group its time or live edge falls in, which may be `key` or one below. A time at or past\n\t * `end`, where group `key` is known to end, falls in a later group, however far the range got\n\t * placing it. Mirrors the Rust `Window::may_hold`.\n\t */\n\tmayHold(key: bigint, end: bigint | undefined): boolean {\n\t\tconst reaches = (unsettled: bigint) => {\n\t\t\tconst range = this.#ranges.get(unsettled);\n\t\t\tif (range === undefined || (range.end !== undefined && range.end < key)) return false;\n\t\t\tconst time = rangeTime(range);\n\t\t\treturn time === undefined || end === undefined || time < end;\n\t\t};\n\t\tfor (const unsettled of this.#pending) if (reaches(unsettled)) return true;\n\t\tfor (const unsettled of this.#reaching) if (reaches(unsettled)) return true;\n\t\tfor (const timed of [this.#waiting, this.#looking]) {\n\t\t\tconst entries = end === undefined ? timed.all() : timed.in(0n, end);\n\t\t\tfor (const entry of entries) for (const unsettled of entry.keys) if (reaches(unsettled)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/** Whether nothing is left to resolve as groups arrive. */\n\tget settled(): boolean {\n\t\treturn this.#pending.size === 0 && !this.#unplaced() && this.#looking.size === 0;\n\t}\n\n\t/**\n\t * Resolve what the groups now held settle: live joins once `latest` exists or the holdings can\n\t * tell where they start, and time starts once a group arrives. Returns whether the groups in\n\t * range moved.\n\t */\n\tsettle(latest: bigint | undefined, holdings: Holdings = UNHELD): boolean {\n\t\tif (this.pending) {\n\t\t\tif (latest === undefined) return false;\n\t\t\t// Every range places again, as when first resolved: the first group arrives once per track.\n\t\t\tthis.#place(latest, holdings);\n\t\t\treturn !this.pending;\n\t\t}\n\t\tlet moved = false;\n\t\tif (this.#reaching.size > 0) {\n\t\t\tconst placed = this.#spans.size;\n\t\t\tconst reaching = [...this.#reaching];\n\t\t\tthis.#reaching.clear();\n\t\t\tthis.#budget = undefined;\n\t\t\tfor (const key of reaching) this.#placeRange(key, latest, holdings);\n\t\t\tmoved = this.#spans.size > placed;\n\t\t}\n\t\tif (this.#waiting.size > 0 && this.#startWaiting(holdings)) moved = true;\n\t\treturn moved;\n\t}\n\n\t// Start the spans whose time start waits on a group, once one arrived, or once nothing can\n\t// arrive any more. Only the times the holdings may now place are tried, so a change placing one\n\t// of them costs that one, not every span still waiting. Returns whether any started.\n\t#startWaiting(holdings: Holdings): boolean {\n\t\tconst complete = holdings.complete();\n\t\tconst unplaced = complete ? undefined : holdings.unplaced?.();\n\t\tlet tried: Timed[];\n\t\tif (unplaced !== undefined && this.#waited === unplaced.mark) {\n\t\t\ttried = [];\n\t\t\tfor (const gap of outside(unplaced.runs)) {\n\t\t\t\tfor (const entry of this.#waiting.takeIn(gap.start, gap.end)) tried.push(entry);\n\t\t\t}\n\t\t} else {\n\t\t\ttried = this.#waiting.takeAll();\n\t\t\tthis.#waited = unplaced?.mark;\n\t\t}\n\t\tlet started = false;\n\t\tfor (const entry of tried) {\n\t\t\t// Every key waiting on one time waits under the widest budget among their ranges.\n\t\t\tconst containing = holdings.containing(entry.time, this.#widestOf(entry.keys));\n\t\t\tlet start: bigint;\n\t\t\tlet floored: boolean;\n\t\t\tif (typeof containing === \"object\") [start, floored] = [containing.at, true];\n\t\t\t// The group holding it is older than any held, or nothing can arrive.\n\t\t\telse if (containing === \"before\" || complete) [start, floored] = [0n, false];\n\t\t\telse {\n\t\t\t\tthis.#waiting.put(entry);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstarted = true;\n\t\t\tfor (const key of entry.keys) this.#startSpan(key, entry.time, start, floored, holdings);\n\t\t}\n\t\treturn started;\n\t}\n\n\t// Start the span keyed `key`, whose time start `at` waited, at `start`: looked up where the\n\t// groups held can't place it, as when first resolved, and otherwise reading its groups.\n\t#startSpan(key: bigint, at: bigint, start: bigint, floored: boolean, holdings: Holdings): void {\n\t\tconst span = this.#spans.get(key);\n\t\tif (!span) return;\n\t\tthis.#uncount(key, span);\n\t\tspan.start = start;\n\t\tspan.floored = floored;\n\t\tspan.waiting = false;\n\t\tconst floor = unresolved(at, start, floored, holdings);\n\t\tif (floor !== undefined) span.looking = { time: at, floor };\n\t\tthis.#count(key, span);\n\t}\n\n\t/**\n\t * The time starts still waiting on the groups held, lowest first: what a received copy asks its\n\t * upstream to place. Mirrors the Rust `Window::asks`.\n\t */\n\tasks(): bigint[] {\n\t\tconst times: bigint[] = [];\n\t\tfor (const entry of this.#waiting.all()) times.push(entry.time);\n\t\treturn times;\n\t}\n\n\t/**\n\t * The live joins still waiting on an answer, as `[lag, end, budget, since]`: the lag in\n\t * milliseconds (null for no lag limit), the range's end, its budget in milliseconds, and the join tick its range was added\n\t * at. What a received copy asks its upstream to place. Mirrors the Rust `Window::joins`.\n\t */\n\tjoins(): [number | null, bigint | undefined, number, number][] {\n\t\tconst joins: [number | null, bigint | undefined, number, number][] = [];\n\t\tfor (const key of this.#reaching) {\n\t\t\tconst range = this.#ranges.get(key);\n\t\t\tconst lag = range && liveMillis(range);\n\t\t\tif (range && lag !== undefined)\n\t\t\t\tjoins.push([lag, range.end, rangeBudget(range), this.#joining.get(key)?.since ?? 0]);\n\t\t}\n\t\treturn joins;\n\t}\n\n\t/**\n\t * The times in `[start, end)` of the time starts not yet resolved: waiting on the groups held, or\n\t * on a lookup of the track's history. The group containing each starts at or before its time, so\n\t * one at or past a read's floor and below a group may still land between them. Mirrors the Rust\n\t * `Window::unresolved_in`.\n\t */\n\tunresolvedIn(start: bigint, end: bigint): bigint[] {\n\t\tconst times: bigint[] = [];\n\t\tfor (const entry of this.#waiting.in(start, end)) times.push(entry.time);\n\t\tfor (const entry of this.#looking.in(start, end)) times.push(entry.time);\n\t\treturn times;\n\t}\n\n\t/** Whether group `key` is in range. Everything is while a live join waits on a first group. */\n\tcontains(key: bigint): boolean {\n\t\treturn this.pending || this.#groups.contains(key);\n\t}\n\n\t/**\n\t * Whether a range placed so far holds group `key`: unlike {@link contains}, not every group while a\n\t * live join waits on a first group. Mirrors the Rust `Window::holds`.\n\t */\n\tholds(key: bigint): boolean {\n\t\treturn this.#groups.contains(key);\n\t}\n\n\t/** The lowest group in range at or above `from`, undefined when none is. `from` itself while a live join waits on a first group. */\n\tnext(from: bigint): bigint | undefined {\n\t\treturn this.pending ? from : this.#groups.next(from);\n\t}\n\n\t/** The highest group in range below `before`, undefined when none is. The one just below while a live join waits on a first group. */\n\tprev(before: bigint): bigint | undefined {\n\t\tif (this.pending) return before > 0n ? before - 1n : undefined;\n\t\treturn this.#groups.prev(before);\n\t}\n\n\t/**\n\t * The lowest group in range, undefined while a start waits, a time start's lookup included: it may\n\t * resolve to a group below every one in range. Nothing in range floors at group 0.\n\t */\n\tfloor(): bigint | undefined {\n\t\tif (this.pending || this.#unplaced() || this.#looking.size > 0) return undefined;\n\t\treturn this.#groups.lowest() ?? 0n;\n\t}\n\n\t/**\n\t * The lowest group the ranges name, undefined while one reaches back to the oldest group or a\n\t * start waits.\n\t */\n\tstart(): bigint | undefined {\n\t\tif (this.pending || this.#reaching.size > 0 || this.#unnamed > 0) return undefined;\n\t\treturn this.#named.first();\n\t}\n\n\t/** Where the run in range reaching past every group starts, undefined when none does. A live join that waits runs from 0. */\n\topenFrom(): bigint | undefined {\n\t\treturn this.pending ? 0n : this.#groups.openFrom();\n\t}\n\n\t/** The exclusive end past every group in range, undefined when one stays open or a start waits. Nothing in range ends at 0. */\n\tend(): bigint | undefined {\n\t\tif (!this.settled) return undefined;\n\t\tconst end = this.#groups.end();\n\t\treturn end === UNBOUNDED ? undefined : end;\n\t}\n\n\t/** The runs in range from `from` up to the exclusive `end`, lowest first. */\n\truns(from = 0n, end = UNBOUNDED): Run[] {\n\t\tif (from >= end) return [];\n\t\tif (this.pending) return [{ start: from, end }];\n\t\treturn this.#groups.runs(from, end);\n\t}\n\n\t/**\n\t * The runs the placed ranges name: unlike {@link runs}, a live join still waiting on a first\n\t * group names none of them. Mirrors the Rust `Window::placed`.\n\t */\n\tplaced(from = 0n, end = UNBOUNDED): Run[] {\n\t\treturn from >= end ? [] : this.#groups.runs(from, end);\n\t}\n\n\t/**\n\t * The part of {@link runs} a miss may ask a fill for: all of it but what starts before a time\n\t * start that fell before every group held. Mirrors the Rust `Window::missable`.\n\t */\n\tmissable(from = 0n, end = UNBOUNDED): Run[] {\n\t\tif (from >= end) return [];\n\t\tif (this.pending) return [{ start: from, end }];\n\t\treturn this.#missable.runs(from, end);\n\t}\n\n\t/**\n\t * The range keyed `key` resolved: undefined for one whose start still waits, or is still looked\n\t * up, or that isn't held. One empty as given ends at its start. Mirrors the Rust\n\t * `Window::resolved_key`.\n\t */\n\tresolvedKey(key: bigint): Resolved | undefined {\n\t\tconst range = this.#ranges.get(key);\n\t\tif (range === undefined) return undefined;\n\t\tconst time = rangeTime(range);\n\t\tif (time !== undefined && isEmpty(range)) return { start: time, end: time, floored: true };\n\t\tconst span = this.#spans.get(key);\n\t\tif (!span || span.looking || span.waiting) return undefined;\n\t\treturn { start: span.start, end: span.end === UNBOUNDED ? undefined : span.end, floored: span.floored };\n\t}\n\n\t/** Each range resolved, in key order, as {@link resolvedKey} reads it. Mirrors the Rust `Window::resolved`. */\n\tresolved(): (Resolved | undefined)[] {\n\t\treturn [...this.#ranges.keys()].map((key) => this.resolvedKey(key));\n\t}\n\n\t/**\n\t * Where each range starts once delivery starts at `from`, in key order: undefined for one with\n\t * no group there, or whose start still waits. Mirrors the Rust `Window::starts`.\n\t */\n\tstarts(from: bigint): (bigint | undefined)[] {\n\t\treturn this.resolved().map((range) => {\n\t\t\tif (!range) return undefined;\n\t\t\tconst start = max(range.start, from);\n\t\t\treturn range.end === undefined || range.end > start ? start : undefined;\n\t\t});\n\t}\n\n\t/** The time starts still looked up, by time. Mirrors the Rust `Window::lookups`. */\n\tlookups(): Lookup[] {\n\t\tconst lookups: Lookup[] = [];\n\t\tfor (const { keys } of this.#looking.all()) {\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst looking = this.#spans.get(key)?.looking;\n\t\t\t\tif (looking) lookups.push(looking);\n\t\t\t}\n\t\t}\n\t\treturn lookups;\n\t}\n\n\t/**\n\t * The lookup of time start `at` answered: its spans start where the answer says, never where the\n\t * groups held happen to. Left unanswered because no handler is left, they start where the groups\n\t * held say, as with no handler at all, unless the cache since evicted the group their floor was\n\t * past and a handler is back: then they look it up again from lower down. Returns whether the\n\t * groups in range moved. Mirrors the Rust `Window::found`.\n\t */\n\tfound(at: bigint, found: Found, holdings: Holdings = UNHELD): boolean {\n\t\tconst keys = this.#looking.take(at);\n\t\tif (keys === undefined) return false;\n\t\tfor (const key of keys) {\n\t\t\tconst span = this.#spans.get(key);\n\t\t\tif (!span) continue;\n\t\t\tthis.#uncount(key, span);\n\t\t\tconst asked = span.looking?.floor;\n\t\t\tspan.looking = undefined;\n\t\t\tif (found.kind === \"group\") {\n\t\t\t\tspan.start = found.group;\n\t\t\t\tspan.floored = true;\n\t\t\t} else if (found.kind === \"dropped\") {\n\t\t\t\t// A floor is one past the group held below the time, which then holds it; from 0, no\n\t\t\t\t// group starts at or before it, so the span reads from the time on.\n\t\t\t\tspan.start = found.floor > 0n ? found.floor - 1n : at;\n\t\t\t\tspan.floored = true;\n\t\t\t} else {\n\t\t\t\tconst containing = holdings.containing(at, this.#budgetOf(key));\n\t\t\t\tspan.start = typeof containing === \"object\" ? containing.at : 0n;\n\t\t\t\tspan.floored = typeof containing === \"object\";\n\t\t\t\tif (asked !== undefined) {\n\t\t\t\t\t// Nothing held at or before the time any more, maybe nothing at all: the group containing\n\t\t\t\t\t// it may start anywhere below the floor asked.\n\t\t\t\t\tconst floor = span.floored\n\t\t\t\t\t\t? unresolved(at, span.start, true, holdings)\n\t\t\t\t\t\t: holdings.looksUp?.()\n\t\t\t\t\t\t\t? 0n\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\tif (floor !== undefined && floor < asked) span.looking = { time: at, floor };\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.#count(key, span);\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * What rebuilding from the spans would read, may ask a miss for, and name as its start, for a test\n\t * to check the counted runs against.\n\t */\n\tfresh(): { runs: Run[]; missable: Run[]; named: bigint | undefined } {\n\t\tconst groups: Run[] = [];\n\t\tconst missable: Run[] = [];\n\t\tlet named: bigint | undefined;\n\t\tfor (const span of this.#spans.values()) {\n\t\t\tconst [reads, asks] = spanReads(span);\n\t\t\tif (reads) groups.push(reads);\n\t\t\tif (asks) missable.push(asks);\n\t\t\tif (span.floored) named = min(named ?? span.start, span.start);\n\t\t}\n\t\treturn { runs: merge(groups), missable: merge(missable), named };\n\t}\n\n\t/** The lowest start the spans name, counted. */\n\tnamed(): bigint | undefined {\n\t\treturn this.#named.first();\n\t}\n\n\t// Whether a time start or a live join waits on the groups held to place it.\n\t#unplaced(): boolean {\n\t\treturn this.#waiting.size > 0 || this.#reaching.size > 0;\n\t}\n\n\t// The budget of the range keyed `key`, none for one not held.\n\t#budgetOf(key: bigint): number {\n\t\tconst range = this.#ranges.get(key);\n\t\treturn range === undefined ? NO_MAX_DELAY : rangeBudget(range);\n\t}\n\n\t// The widest budget among the ranges keyed `keys`.\n\t#widestOf(keys: Iterable<bigint>): number {\n\t\tlet widest = 0;\n\t\tfor (const key of keys) widest = Math.max(widest, this.#budgetOf(key));\n\t\treturn widest;\n\t}\n\n\t// Resolve every range again from scratch.\n\t#place(latest: bigint | undefined, holdings: Holdings): void {\n\t\tthis.#reaching.clear();\n\t\tthis.#spans.clear();\n\t\tthis.#pending.clear();\n\t\tthis.#waiting = new ByTime();\n\t\tthis.#looking = new ByTime();\n\t\tthis.#groups = new Cover();\n\t\tthis.#missable = new Cover();\n\t\tthis.#layers.clear();\n\t\tthis.#budget = undefined;\n\t\tthis.#named = new Counts();\n\t\tthis.#unnamed = 0;\n\t\tfor (const [key, range] of this.#ranges) {\n\t\t\tif (!isEmpty(range)) this.#placeRange(key, latest, holdings);\n\t\t}\n\t\t// Each span waiting was just tried against these holdings.\n\t\tthis.#waited = holdings.unplaced?.()?.mark;\n\t}\n\n\t// Resolve the non-empty range keyed `key` into a span, or note what it waits on.\n\t#placeRange(key: bigint, latest: bigint | undefined, holdings: Holdings): void {\n\t\tconst range = this.#ranges.get(key);\n\t\tif (range === undefined) return;\n\t\tconst end = range.end === undefined ? UNBOUNDED : range.end + 1n;\n\t\tlet at = rangeTime(range);\n\t\tconst live = typeof range.start === \"object\" ? range.start.live.min : undefined;\n\t\tconst budget = rangeBudget(range);\n\t\t// Placed already (live join or exact-group Position start): start at that exact group without\n\t\t// time-containment lookup.\n\t\tconst placed = this.#joining.get(key)?.at;\n\t\tif (placed !== undefined) {\n\t\t\tthis.#count(key, { at: undefined, start: placed, end, floored: true, waiting: false, budget });\n\t\t\treturn;\n\t\t}\n\t\t// A hop whose copies place the join waits on them, as one with no group yet does.\n\t\tif (live !== undefined && holdings.defers?.()) {\n\t\t\tthis.#pending.add(key);\n\t\t\tthis.#budget = undefined;\n\t\t\treturn;\n\t\t}\n\t\t// Placed already, where a copy resolved it: one left with no start reached back.\n\t\tif (live !== undefined && holdings.resolves()) {\n\t\t\tlet join: Join | undefined;\n\t\t\tif (holdings.answersJoins?.()) {\n\t\t\t\t// Only its upstream's answer places it, whatever this hop holds: read none of the groups\n\t\t\t\t// held until it does.\n\t\t\t\tjoin = holdings.join?.(live, range.end, budget, this.#joining.get(key)?.since ?? 0);\n\t\t\t\t// Nothing to deliver: a start past its end holds nothing.\n\t\t\t\tif (join === \"empty\" && range.end !== undefined) join = { group: range.end + 1n };\n\t\t\t\tif (join === undefined || join === \"empty\") {\n\t\t\t\t\tthis.#reaching.add(key);\n\t\t\t\t\tthis.#budget = undefined;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst since = this.#joining.get(key)?.since ?? 0;\n\t\t\t\t// Its upstream's answer places it, whatever the groups held measure: nothing to deliver\n\t\t\t\t// starts it past its end, while an unbounded one measures.\n\t\t\t\tconst answer = holdings.answeredJoin?.(live, range.end, budget, since);\n\t\t\t\tconst answered = answer?.start ?? (answer && range.end !== undefined ? range.end + 1n : undefined);\n\t\t\t\tif (answered !== undefined) {\n\t\t\t\t\tjoin = { group: answered };\n\t\t\t\t} else if (latest === undefined) {\n\t\t\t\t\t// Nothing to measure the live edge by yet: wait for the first group, reading everything\n\t\t\t\t\t// meanwhile.\n\t\t\t\t\tthis.#pending.add(key);\n\t\t\t\t\tthis.#budget = undefined;\n\t\t\t\t\treturn;\n\t\t\t\t} else if (live?.asNanos() === 0) {\n\t\t\t\t\t// The latest group holds the live edge. One made before any group then starts at the\n\t\t\t\t\t// first, which was the latest when it was placed.\n\t\t\t\t\tjoin = { group: latest };\n\t\t\t\t} else {\n\t\t\t\t\tjoin = holdings.join?.(live, range.end, budget, since);\n\t\t\t\t\t// Nothing to measure the live edge by yet: read none of the groups held until it resolves.\n\t\t\t\t\tif (join === undefined || join === \"empty\") {\n\t\t\t\t\t\tthis.#reaching.add(key);\n\t\t\t\t\t\tthis.#budget = undefined;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// A group a join measured starts there; a time is placed among the groups held; one past\n\t\t\t// every group starts as a range from the oldest group does.\n\t\t\tif (join === \"oldest\") at = undefined;\n\t\t\telse if (join.group !== undefined) {\n\t\t\t\tthis.#count(key, { at: undefined, start: join.group, end, floored: true, waiting: false, budget });\n\t\t\t\treturn;\n\t\t\t} else at = join.time;\n\t\t}\n\t\tconst start = startOf(at, latest, budget, holdings);\n\t\tif (start === \"pending\") {\n\t\t\tthis.#pending.add(key);\n\t\t\tthis.#budget = undefined;\n\t\t\treturn;\n\t\t}\n\t\tif (start === \"waiting\") {\n\t\t\t// Reads only the groups from its time until the groups held place it; see #startWaiting.\n\t\t\tthis.#count(key, { at, start: 0n, end, floored: false, waiting: true, budget });\n\t\t\treturn;\n\t\t}\n\t\t// A time start the groups held can't place reads nothing until its lookup answers.\n\t\tconst floor = at === undefined ? undefined : unresolved(at, start.group, start.floored, holdings);\n\t\tconst looking = at !== undefined && floor !== undefined ? { time: at, floor } : undefined;\n\t\tthis.#count(key, { at, start: start.group, end, floored: start.floored, looking, waiting: false, budget });\n\t}\n\n\t// Hold `span` under `key`, counting the groups it reads and where it starts.\n\t#count(key: bigint, span: Span): void {\n\t\t[span.reads, span.asks] = spanReads(span);\n\t\tif (span.reads) {\n\t\t\tthis.#groups.add(span.reads.start, span.reads.end, 1);\n\t\t\tconst layer = this.#layers.get(span.budget) ?? new Cover();\n\t\t\tthis.#layers.set(span.budget, layer);\n\t\t\tlayer.add(span.reads.start, span.reads.end, 1);\n\t\t\tthis.#budget = undefined;\n\t\t}\n\t\tif (span.asks) this.#missable.add(span.asks.start, span.asks.end, 1);\n\t\tif (span.floored) this.#named.add(span.start);\n\t\telse this.#unnamed++;\n\t\tif (span.looking) this.#looking.add(span.looking.time, key);\n\t\tif (span.waiting) this.#waiting.add(span.at ?? 0n, key);\n\t\tthis.#spans.set(key, span);\n\t}\n\n\t// Take back what {@link #count} counted for `span`, and take it out of the spans.\n\t#uncount(key: bigint, span: Span): void {\n\t\tif (span.reads) {\n\t\t\tthis.#groups.add(span.reads.start, span.reads.end, -1);\n\t\t\tconst layer = this.#layers.get(span.budget);\n\t\t\tlayer?.add(span.reads.start, span.reads.end, -1);\n\t\t\tif (layer?.lowest() === undefined) this.#layers.delete(span.budget);\n\t\t\tthis.#budget = undefined;\n\t\t}\n\t\tif (span.asks) this.#missable.add(span.asks.start, span.asks.end, -1);\n\t\tif (span.floored) this.#named.remove(span.start);\n\t\telse this.#unnamed--;\n\t\tif (span.looking) this.#looking.remove(span.looking.time, key);\n\t\tif (span.waiting) this.#waiting.remove(span.at ?? 0n, key);\n\t\tthis.#spans.delete(key);\n\t}\n}\n\n/**\n * How long each group stays worth delivering once superseded, in milliseconds, as a reader's ranges\n * set it: the widest budget among the ranges covering it, a live join's being its max, and a history\n * range's as long as the publisher keeps it ({@link NO_MAX_DELAY}). A range not yet placed may cover\n * any group up to its end. A group none covers, such as one handed out before the ranges moved, gets\n * the widest budget any range asks: it was reached through one of them, so a history range keeps it\n * from going stale. Immutable: a window hands out a new one when its ranges move. Mirrors the Rust\n * `Budget`.\n */\nexport class Budget {\n\t/** The groups the placed ranges cover, by the budget they give, widest first, each sorted and disjoint. */\n\treadonly layers: readonly (readonly [number, readonly Run[]])[];\n\t/**\n\t * The ranges not yet placed, each as the exclusive end of the groups it may cover and its budget:\n\t * by end ascending, budget descending, leaving out any another covers at least as widely.\n\t */\n\treadonly unplaced: readonly (readonly [bigint, number])[];\n\t// The widest budget any range asks, placed or not, which a group no range covers gets.\n\treadonly #widest: number;\n\n\tconstructor(parts: {\n\t\tlayers: readonly (readonly [number, readonly Run[]])[];\n\t\tunplaced: readonly (readonly [bigint, number])[];\n\t\twidest: number;\n\t}) {\n\t\tthis.layers = parts.layers.filter(([, runs]) => runs.length > 0).sort(([a], [b]) => b - a);\n\t\t// A range covering through a later group at least as widely hides one through an earlier.\n\t\tconst unplaced = [...parts.unplaced].sort(([a, x], [b, y]) => (a < b ? -1 : a > b ? 1 : x - y));\n\t\tconst kept: (readonly [bigint, number])[] = [];\n\t\tfor (let i = unplaced.length - 1; i >= 0; i--) {\n\t\t\tconst wider = kept.at(-1);\n\t\t\tif (wider === undefined || unplaced[i][1] > wider[1]) kept.push(unplaced[i]);\n\t\t}\n\t\tthis.unplaced = kept.reverse();\n\t\tthis.#widest = parts.widest;\n\t}\n\n\t/** The same budget for every group. */\n\tstatic uniform(budget: number): Budget {\n\t\treturn new Budget({ layers: [], unplaced: [], widest: budget });\n\t}\n\n\t/** This budget, each group's no wider than `bound`, undefined for none. */\n\tclamped(bound: number | undefined): Budget {\n\t\tif (bound === undefined || this.#widest <= bound) return this;\n\t\treturn new Budget({\n\t\t\tlayers: this.layers.map(([budget, runs]) => [Math.min(budget, bound), runs] as const),\n\t\t\tunplaced: this.unplaced.map(([end, budget]) => [end, Math.min(budget, bound)] as const),\n\t\t\twidest: bound,\n\t\t});\n\t}\n\n\t/** How long group `key` stays worth delivering once superseded. */\n\tat(key: bigint): number {\n\t\tlet at: number | undefined;\n\t\tfor (const [budget, runs] of this.layers) {\n\t\t\tconst run = runs[runsFrom(runs, key)];\n\t\t\tif (run !== undefined && run.start <= key) {\n\t\t\t\tat = budget;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst unplaced = this.unplaced[this.#unplacedFrom(key)];\n\t\tif (unplaced !== undefined) at = Math.max(at ?? 0, unplaced[1]);\n\t\treturn at ?? this.#widest;\n\t}\n\n\t/** The widest budget any group gets, counting a range not yet placed. */\n\twidest(): number {\n\t\treturn this.#widest;\n\t}\n\n\t/** Whether every group gets the same budget. */\n\tisUniform(): boolean {\n\t\treturn (\n\t\t\tthis.layers.every(([budget]) => budget === this.#widest) &&\n\t\t\tthis.unplaced.every(([, budget]) => budget === this.#widest)\n\t\t);\n\t}\n\n\t/** Whether `other` gives every group the same budget, as this one's copy. */\n\tequals(other: Budget | undefined): boolean {\n\t\tif (other === this) return true;\n\t\treturn (\n\t\t\tother !== undefined &&\n\t\t\tthis.#widest === other.#widest &&\n\t\t\tthis.layers.length === other.layers.length &&\n\t\t\tthis.layers.every(([budget, runs], i) => budget === other.layers[i][0] && runs === other.layers[i][1]) &&\n\t\t\tthis.unplaced.length === other.unplaced.length &&\n\t\t\tthis.unplaced.every(([end, budget], i) => end === other.unplaced[i][0] && budget === other.unplaced[i][1])\n\t\t);\n\t}\n\n\t/** `[start, end)` cut where the budget changes, each stretch with its budget, lowest first. */\n\truns(start: bigint, end: bigint): [Run, number][] {\n\t\tconst runs: [Run, number][] = [];\n\t\tfor (let at = start; at < end; ) {\n\t\t\tconst [budget, next] = this.stretch(at);\n\t\t\tconst to = next === undefined ? end : min(next, end);\n\t\t\truns.push([{ start: at, end: to }, budget]);\n\t\t\tat = to;\n\t\t}\n\t\treturn runs;\n\t}\n\n\t/** The budget of group `key`, and the next key whose budget differs, undefined for none. */\n\tstretch(key: bigint): [number, bigint | undefined] {\n\t\tconst budget = this.at(key);\n\t\tif (this.isUniform()) return [budget, undefined];\n\t\tfor (let cut = this.#cutAfter(key); cut !== undefined; cut = this.#cutAfter(cut)) {\n\t\t\tif (this.at(cut) !== budget) return [budget, cut];\n\t\t}\n\t\treturn [budget, undefined];\n\t}\n\n\t// The next key past `key` where a layer's run or an unplaced range starts or ends, so the budget\n\t// may change.\n\t#cutAfter(key: bigint): bigint | undefined {\n\t\tlet cut: bigint | undefined;\n\t\tconst take = (at: bigint) => {\n\t\t\tif (at < UNBOUNDED) cut = cut === undefined ? at : min(cut, at);\n\t\t};\n\t\tfor (const [, runs] of this.layers) {\n\t\t\tconst run = runs[runsFrom(runs, key)];\n\t\t\tif (run !== undefined) take(run.start <= key ? run.end : run.start);\n\t\t}\n\t\tconst unplaced = this.unplaced[this.#unplacedFrom(key)];\n\t\tif (unplaced !== undefined) take(unplaced[0]);\n\t\treturn cut;\n\t}\n\n\t// The index of the first unplaced range that may cover `key`.\n\t#unplacedFrom(key: bigint): number {\n\t\tlet lo = 0;\n\t\tlet hi = this.unplaced.length;\n\t\twhile (lo < hi) {\n\t\t\tconst mid = (lo + hi) >>> 1;\n\t\t\tif (this.unplaced[mid][0] <= key) lo = mid + 1;\n\t\t\telse hi = mid;\n\t\t}\n\t\treturn lo;\n\t}\n}\n\n/** Spans by key, keyed by the time each waits on or looks up, lowest first. */\ntype Timed = { time: bigint; keys: Set<bigint> };\n\nconst compareTimes = (a: bigint, b: bigint): number => (a < b ? -1 : a > b ? 1 : 0);\n\n/**\n * {@link Timed} entries ordered by time, so the times in a run are found without a walk, and a\n * span joins or leaves its time without shifting every other.\n */\nclass ByTime {\n\t#entries = new Sorted<bigint, Timed>((entry) => entry.time, compareTimes);\n\n\tget size(): number {\n\t\treturn this.#entries.size;\n\t}\n\n\t/** Every entry, lowest first. */\n\t*all(): Generator<Timed> {\n\t\tconst first = this.#entries.first();\n\t\tif (first) yield* this.#entries.from(first.time);\n\t}\n\n\t/** Every entry whose time is in `[start, end)`, lowest first. */\n\t*in(start: bigint, end: bigint): Generator<Timed> {\n\t\tfor (const entry of this.#entries.from(start)) {\n\t\t\tif (entry.time >= end) return;\n\t\t\tyield entry;\n\t\t}\n\t}\n\n\t/** Add the span keyed `key` under `time`. */\n\tadd(time: bigint, key: bigint): void {\n\t\tconst entry = this.#entries.ceil(time);\n\t\tif (entry?.time === time) entry.keys.add(key);\n\t\telse this.#entries.insert({ time, keys: new Set([key]) });\n\t}\n\n\t/** Take the span keyed `key` out from under `time`, if it is there. */\n\tremove(time: bigint, key: bigint): void {\n\t\tconst entry = this.#entries.ceil(time);\n\t\tif (entry?.time !== time || !entry.keys.delete(key)) return;\n\t\tif (entry.keys.size === 0) this.#entries.delete(time);\n\t}\n\n\t/** Put back an entry taken out, whose time no entry holds. */\n\tput(entry: Timed): void {\n\t\tthis.#entries.insert(entry);\n\t}\n\n\t/** Take out the spans under `time`, if any. */\n\ttake(time: bigint): Set<bigint> | undefined {\n\t\tconst entry = this.#entries.ceil(time);\n\t\tif (entry?.time !== time) return undefined;\n\t\tthis.#entries.delete(time);\n\t\treturn entry.keys;\n\t}\n\n\t/** Take out every entry whose time is in `[start, end)`, lowest first. */\n\ttakeIn(start: bigint, end: bigint): Timed[] {\n\t\tconst taken: Timed[] = [];\n\t\tfor (const entry of this.#entries.from(start)) {\n\t\t\tif (end < UNBOUNDED && entry.time >= end) break;\n\t\t\ttaken.push(entry);\n\t\t}\n\t\tfor (const entry of taken) this.#entries.delete(entry.time);\n\t\treturn taken;\n\t}\n\n\t/** Take out every entry, lowest first. */\n\ttakeAll(): Timed[] {\n\t\tconst taken = [...this.all()];\n\t\tthis.#entries = new Sorted<bigint, Timed>((entry) => entry.time, compareTimes);\n\t\treturn taken;\n\t}\n}\n\n// What `span` reads, and the part of it a miss may ask for, each undefined for none.\nfunction spanReads(span: Span): [Run | undefined, Run | undefined] {\n\t// A span still looking up its start reads nothing until it knows which group that is.\n\tif (span.looking) return [undefined, undefined];\n\t// A span waiting on its time start reads from that time meanwhile, and may ask a miss there, as\n\t// one reaching back past every group held does: whichever group contains it starts at or before\n\t// it, so every group from there on is in range.\n\tif (span.waiting) {\n\t\tconst at = span.at ?? 0n;\n\t\tif (at >= span.end) return [undefined, undefined];\n\t\treturn [\n\t\t\t{ start: at, end: span.end },\n\t\t\t{ start: at, end: span.end },\n\t\t];\n\t}\n\tif (span.start >= span.end) return [undefined, undefined];\n\t// A time start before every group held reaches back to the group containing it, which is unknown\n\t// here, so it asks no miss below its time: every key from there on is in range, the key at the\n\t// time itself being the containing group if it exists.\n\tconst reach = !span.floored && span.at !== undefined ? span.at : span.start;\n\treturn [{ start: span.start, end: span.end }, reach < span.end ? { start: reach, end: span.end } : undefined];\n}\n\n// The times outside sorted, disjoint `runs`, as runs lowest first.\nfunction outside(runs: readonly Run[]): Run[] {\n\tconst gaps: Run[] = [];\n\tlet from = 0n;\n\tfor (const run of runs) {\n\t\tif (run.end <= run.start) continue;\n\t\tif (run.start > from) gaps.push({ start: from, end: run.start });\n\t\tfrom = max(from, run.end);\n\t}\n\tif (from < UNBOUNDED) gaps.push({ start: from, end: UNBOUNDED });\n\treturn gaps;\n}\n\n// `runs` merged into sorted, disjoint runs, the empty ones dropped.\nfunction merge(runs: Run[]): Run[] {\n\tconst merged: Run[] = [];\n\tfor (const run of runs.filter((run) => run.end > run.start).sort((a, b) => order(a.start, b.start))) {\n\t\tconst last = merged.at(-1);\n\t\tif (last && run.start <= last.end) last.end = max(last.end, run.end);\n\t\telse merged.push({ ...run });\n\t}\n\treturn merged;\n}\n\n/**\n * The first group a range starting from time `at` starts at (undefined for the oldest group), and\n * whether it names that group rather than reaching back to the oldest one. `\"pending\"` while a hop\n * that holds no groups waits on a latest group, reading everything meanwhile, and `\"waiting\"` for\n * a time start the groups held can't place yet. Mirrors the Rust `start`.\n */\nfunction startOf(\n\tat: bigint | undefined,\n\tlatest: bigint | undefined,\n\tbudget: number,\n\tholdings: Holdings,\n): { group: bigint; floored: boolean } | \"waiting\" | \"pending\" {\n\t// Nothing sits below group 0, so the oldest start needs no latest group.\n\tif (at === undefined) return { group: 0n, floored: false };\n\t// No group starts before 0, so time 0 names group 0 whatever is held.\n\tif (at === 0n) return { group: 0n, floored: true };\n\tconst containing = holdings.containing(at, budget);\n\tif (typeof containing === \"object\") return { group: containing.at, floored: true };\n\t// The group holding it is older than any held, so reach back to the oldest.\n\tif (containing === \"before\") return { group: 0n, floored: false };\n\t// Before any group, which a hop that holds none (such as a reader following route copies)\n\t// leaves to the copies to resolve.\n\tif (latest === undefined && !holdings.resolves()) return \"pending\";\n\t// Nothing can arrive any more, so nothing held reaches past it.\n\tif (holdings.complete()) return { group: 0n, floored: false };\n\t// The groups held can't place it, so wait for one that can rather than guess from the latest:\n\t// a copy can see the live edge before the groups its publisher resolved the time to.\n\treturn \"waiting\";\n}\n\n/**\n * The oldest key a fill of the group containing time start `at`, resolved to `start`, asks from,\n * when the groups held can't tell which group contains it and a handler may: it is before every\n * group held, or a group the cache evicted may start after `start`, the newest held at or before\n * it, and still at or before `at`. Starts the producer skipped hold none. Mirrors the Rust\n * `unresolved`.\n */\nfunction unresolved(at: bigint, start: bigint, floored: boolean, holdings: Holdings): bigint | undefined {\n\tif (!holdings.looksUp?.()) return undefined;\n\tif (!floored) return holdings.nextStart(0n) === undefined ? undefined : 0n;\n\t// Past a group held at the start, or one starting at the time, which contains it whatever its End.\n\t// A start below the time no group holds is a whole group's End, where a group the cache let go may\n\t// start and end before the time, so the search takes it in. Mirrors the Rust `unresolved`.\n\tconst next = holdings.nextStart(start) === start || start >= at ? start + 1n : start;\n\tconst after = holdings.nextStart(next);\n\tif (after === undefined) return undefined;\n\tconst gap = min(after, at + 1n);\n\treturn holdings.neverProduced?.(next, gap) || next >= gap ? undefined : next;\n}\n"]}
|
package/wire.d.ts
CHANGED
|
@@ -9,75 +9,190 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Dispose, GetPromise, Getter } from "@moq/signals";
|
|
11
11
|
import type * as broadcast from "./broadcast.ts";
|
|
12
|
-
import type
|
|
12
|
+
import type * as datagram from "./datagram.ts";
|
|
13
13
|
import type { Consumer as GroupConsumer } from "./group.ts";
|
|
14
|
-
import type {
|
|
14
|
+
import type { WireRoute } from "./hop.ts";
|
|
15
|
+
import type * as Identity from "./identity.ts";
|
|
16
|
+
import type { Lister, Tracks } from "./listing.ts";
|
|
15
17
|
import type * as origin from "./origin.ts";
|
|
16
18
|
import type * as Path from "./path.ts";
|
|
19
|
+
import type { Timescale } from "./time.ts";
|
|
17
20
|
import type * as track from "./track.ts";
|
|
18
21
|
/** The protocol-facing operations behind a broadcast handle. */
|
|
19
22
|
export interface Broadcast {
|
|
23
|
+
/** Whether datagram metadata comes from an application rather than a peer's kindless SUBSCRIBE. */
|
|
24
|
+
localDatagrams: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the source keeps a name's stream track and datagram track apart: a local one, or a
|
|
27
|
+
* moq-lite 07 peer's. The others carry both kinds of a name on one subscription.
|
|
28
|
+
*/
|
|
29
|
+
distinguishesKinds: boolean;
|
|
30
|
+
/** Whether the source already publishes a stream track named `name`, before anything is requested of it. */
|
|
31
|
+
publishesTrack(name: string): boolean;
|
|
32
|
+
datagrams(name: string): datagram.Consumer;
|
|
33
|
+
liveDatagrams(name: string): datagram.Consumer | undefined;
|
|
34
|
+
/** Create a datagram track, listed unless `listed` is false, as a session's track riding a stream track's subscription. */
|
|
35
|
+
createDatagrams(name: string, info: Partial<datagram.Info>, listed?: boolean): datagram.Producer | undefined;
|
|
36
|
+
requestedDatagrams(): Promise<datagram.Request | undefined>;
|
|
20
37
|
subscribe(name: string, options?: track.Subscription): track.Subscriber;
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
/** The track's properties; `hold` keeps the track wanted until it aborts, the way a held TRACK stream does, and aborting it before the answer abandons the lookup. */
|
|
39
|
+
resolveTrackInfo(name: string, hold?: AbortSignal): Promise<track.Info>;
|
|
40
|
+
/**
|
|
41
|
+
* The newest frame the track's cache holds, read without subscribing; `undefined` while it holds
|
|
42
|
+
* none. With `timescale`, its `frame` is that frame's moq-timestamp Object ID at that scale.
|
|
43
|
+
*/
|
|
44
|
+
largest(name: string, timescale?: Timescale): track.Position | undefined;
|
|
45
|
+
/** Fetch one group; absent when the session's version cannot fetch, so callers never ask. */
|
|
46
|
+
fetchGroup?(name: string, key: bigint, options?: track.FetchGroupOptions): Promise<GroupConsumer>;
|
|
23
47
|
requested(): Promise<track.Request | undefined>;
|
|
48
|
+
/** List the broadcast's tracks for `owner`, ending its older listing of this broadcast with CANCELLED. */
|
|
49
|
+
tracks(owner?: object): Tracks;
|
|
50
|
+
/** Answer the broadcast's listings, as a session does with its peer's; throws while another answers. */
|
|
51
|
+
lister(): Lister;
|
|
52
|
+
/**
|
|
53
|
+
* The operations a metadata reader resolves names through, each name's metadata copy, where the
|
|
54
|
+
* handle keeps those apart from the payload copies; undefined elsewhere. See {@link metaWireOf}.
|
|
55
|
+
*/
|
|
56
|
+
meta?(): Broadcast | undefined;
|
|
57
|
+
}
|
|
58
|
+
/** Receives one change to the watched prefixes: `prefix` is now (or no longer) wanted. */
|
|
59
|
+
export type InterestListener = (prefix: Path.Valid, wanted: boolean) => void;
|
|
60
|
+
/** An origin's open request for a path, as a serving session sees it. */
|
|
61
|
+
export interface RequestSlot {
|
|
62
|
+
/** The blind answer a session already gave it, if any. */
|
|
63
|
+
readonly answer?: broadcast.Consumer;
|
|
24
64
|
}
|
|
25
65
|
/** The protocol-facing operations behind an origin producer. */
|
|
26
66
|
export interface OriginProducer {
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Hear the root-relative prefixes readers of this origin are watching, narrowed to its
|
|
69
|
+
* scope: each one currently wanted first, then every change. A prefix may be reported
|
|
70
|
+
* wanted more than once, by overlapping watches, and is released as many times. Sessions
|
|
71
|
+
* ask their peer for announcements under exactly these. Returns the unsubscribe.
|
|
72
|
+
*/
|
|
73
|
+
interests(listener: InterestListener): Dispose;
|
|
74
|
+
/** Whether an advertised prefix is nameable here and overlaps the handle's allowed paths. */
|
|
30
75
|
accepts(prefix: Path.Valid): boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
cost?: Route["cost"] | bigint;
|
|
34
|
-
}): origin.Dynamic;
|
|
76
|
+
/** Land a route a peer announced, taken as given and never forwarded back to a peer. */
|
|
77
|
+
receive(prefix: Path.Valid, route?: Partial<WireRoute>): origin.Claim;
|
|
35
78
|
attach(discovery: boolean): Dispose;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Hold the origin's announcement streams overlapping `prefix` unsynced until
|
|
81
|
+
* the returned dispose: a session holds one while its peer's initial set is in flight.
|
|
82
|
+
*/
|
|
83
|
+
snapshot(prefix: Path.Valid): Dispose;
|
|
84
|
+
readonly requests: Getter<ReadonlyMap<Path.Valid, RequestSlot>>;
|
|
85
|
+
changed(): GetPromise<unknown>;
|
|
86
|
+
/** Whether sessions should answer the request with a blind subscription right now. */
|
|
87
|
+
blind(slot: RequestSlot): boolean;
|
|
39
88
|
answer(path: Path.Valid, front: broadcast.Consumer): Dispose | undefined;
|
|
40
89
|
routes(path: Path.Valid): boolean;
|
|
90
|
+
/** The rank of the link a session given this handle lands its routes through. */
|
|
91
|
+
readonly priority: number;
|
|
92
|
+
}
|
|
93
|
+
/** The protocol-facing operations behind an origin route or claim. */
|
|
94
|
+
export interface Route {
|
|
95
|
+
/** The metadata the route is advertised with, or undefined while hidden. */
|
|
96
|
+
readonly info: WireRoute | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Advertise the route with `info` as given, as a session's update does: a named identity
|
|
99
|
+
* replaces the route's, which restarts its readers; otherwise it keeps the route's own.
|
|
100
|
+
* Announces a hidden route.
|
|
101
|
+
*/
|
|
102
|
+
update(info: Partial<WireRoute>): void;
|
|
103
|
+
/**
|
|
104
|
+
* Close the route as its announcer withdrawing it, so readers see it end. Closing the handle
|
|
105
|
+
* of a route a session received instead means the session lost it, and readers see it go
|
|
106
|
+
* offline.
|
|
107
|
+
*/
|
|
108
|
+
end(): void;
|
|
41
109
|
}
|
|
42
110
|
/** The protocol-facing operations behind an origin consumer. */
|
|
43
111
|
export interface OriginConsumer {
|
|
44
112
|
routes(path: Path.Valid): boolean;
|
|
45
|
-
readonly broadcasts: Getter<ReadonlyMap<Path.Valid, broadcast.Consumer> | undefined>;
|
|
46
113
|
readonly advertised: Getter<Advertisements | undefined>;
|
|
47
|
-
/** The announced local broadcast at `path`, when it is the route peers are offered there.
|
|
48
|
-
|
|
49
|
-
|
|
114
|
+
/** The announced local broadcast at `path`, when it is the route peers are offered there.
|
|
115
|
+
* A request naming an `identity` only matches a route serving it. */
|
|
116
|
+
local(path: Path.Valid, identity?: Identity.Valid): broadcast.Consumer | undefined;
|
|
117
|
+
/** Resolve `path` for serving; throws `Unroutable` when the route serves another `identity`. */
|
|
118
|
+
demand(path: Path.Valid, identity?: Identity.Valid, signal?: AbortSignal): Promise<broadcast.Consumer | undefined>;
|
|
119
|
+
/** Whether the handle's scope admits everything beneath the root-relative `prefix`. */
|
|
120
|
+
covers(prefix: Path.Valid): boolean;
|
|
121
|
+
/** The root-relative prefixes the handle's scope admits; unset for every path. */
|
|
122
|
+
readonly allowed?: Path.Prefixes;
|
|
123
|
+
/** The absolute path the handle's root-relative paths hang from. */
|
|
124
|
+
readonly root: Path.Valid;
|
|
50
125
|
}
|
|
51
126
|
/** One originated advertisement exposed to the publishing wire. */
|
|
52
127
|
export interface Advertised {
|
|
53
|
-
readonly
|
|
54
|
-
readonly route:
|
|
55
|
-
/** The
|
|
56
|
-
readonly
|
|
128
|
+
readonly ref: object;
|
|
129
|
+
readonly route: WireRoute;
|
|
130
|
+
/** The absolute prefix a claim raised to its handle's root is filed at; unset when filed at its row. */
|
|
131
|
+
readonly filed?: Path.Valid;
|
|
132
|
+
/** Whether it is a broadcast published here, which serves only the path it is filed at. */
|
|
133
|
+
readonly exact?: boolean;
|
|
134
|
+
/** Its place, newest first, among the claims filed with it; unset when that is its place in its row. */
|
|
135
|
+
readonly order?: number;
|
|
136
|
+
}
|
|
137
|
+
/** What names a stream: an advertisement, and the identity its route serves. */
|
|
138
|
+
export interface Served {
|
|
139
|
+
readonly ref: object;
|
|
140
|
+
readonly route: Pick<WireRoute, "identity" | "epoch">;
|
|
57
141
|
}
|
|
58
142
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
143
|
+
* Whether two advertisements serve one stream: the same route identity, or, for a route not
|
|
144
|
+
* yet named one, the same advertisement.
|
|
145
|
+
*/
|
|
146
|
+
export declare function sameIdentity(a: Served, b: Served): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Every originated advertisement per prefix, most preferred first. A reader ranks only what its
|
|
149
|
+
* scope admits, so a cheaper route it cannot use never hides one it can, and ranks the claims
|
|
150
|
+
* covering its root as one tier wherever each is filed.
|
|
61
151
|
*/
|
|
62
152
|
export type Advertisements = ReadonlyMap<Path.Valid, readonly Advertised[]>;
|
|
63
153
|
/** The protocol-facing operations behind an established session. */
|
|
64
154
|
export interface Established {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Consume `path` from the session: the route it ranks best, or with `identity`, the best
|
|
157
|
+
* route of that identity alone, as a request pinned to it resolves.
|
|
158
|
+
*/
|
|
159
|
+
consume(path: Path.Valid, identity?: Identity.Valid): broadcast.Consumer;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the peer refuses an announce request overlapping one it still holds, so
|
|
162
|
+
* discovery never holds two where one covers the other.
|
|
163
|
+
*/
|
|
164
|
+
readonly exclusive: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Tell the peer this side is moving, with a GOAWAY naming no URI where the version carries
|
|
167
|
+
* one, and stop taking new tokens, so the auth handle backs a replacement while this session
|
|
168
|
+
* keeps serving.
|
|
169
|
+
*/
|
|
170
|
+
leave(): void;
|
|
68
171
|
}
|
|
69
|
-
|
|
172
|
+
/** A produced broadcast's view, which always fetches from its own cache. */
|
|
173
|
+
export type Produced = Broadcast & Required<Pick<Broadcast, "fetchGroup">>;
|
|
174
|
+
type View = Broadcast | OriginProducer | OriginConsumer | Route | Established;
|
|
70
175
|
/** Register the package-private view for a handle. */
|
|
71
176
|
export declare function registerWire(handle: object, view: View): void;
|
|
72
177
|
/** Replace selected operations on a broadcast's package-private view. */
|
|
73
|
-
export declare function overrideBroadcastWire(handle: broadcast.Consumer, overrides: Partial<Pick<Broadcast, "resolveTrackInfo" | "fetchGroup">>): void;
|
|
178
|
+
export declare function overrideBroadcastWire(handle: broadcast.Consumer, overrides: Partial<Pick<Broadcast, "resolveTrackInfo" | "fetchGroup" | "distinguishesKinds">>): void;
|
|
179
|
+
export declare function wireOf(handle: broadcast.Producer): Produced;
|
|
74
180
|
export declare function wireOf(handle: broadcast.Producer | broadcast.Consumer): Broadcast;
|
|
75
181
|
export declare function wireOf(handle: origin.Producer): OriginProducer;
|
|
76
182
|
export declare function wireOf(handle: origin.Consumer): OriginConsumer;
|
|
77
|
-
export declare function wireOf(handle:
|
|
183
|
+
export declare function wireOf(handle: origin.Route | origin.Claim): Route;
|
|
184
|
+
export declare function wireOf(handle: import("./connection/session.ts").Session): Established;
|
|
78
185
|
/** Install the private Track.Consumer constructor. */
|
|
79
186
|
export declare function registerTrackConsumer(factory: (name: string, source: Broadcast) => track.Consumer): void;
|
|
80
187
|
/** Create a track handle backed by a broadcast's private wire view. */
|
|
81
188
|
export declare function trackOf(name: string, source: broadcast.Producer | broadcast.Consumer): track.Consumer;
|
|
189
|
+
/**
|
|
190
|
+
* The view a metadata reader resolves names through: the metadata copies where the handle keeps
|
|
191
|
+
* them apart (a lite-07 session's broadcast, or an origin front), and otherwise the payload
|
|
192
|
+
* copies, whose headers it takes. Mirrors the Rust `broadcast::Consumer::track_meta`.
|
|
193
|
+
*/
|
|
194
|
+
export declare function metaWireOf(source: broadcast.Producer | broadcast.Consumer): Broadcast;
|
|
195
|
+
/** {@link trackOf} for a metadata reader, resolving the copy {@link metaWireOf} picks. */
|
|
196
|
+
export declare function trackMetaOf(name: string, source: broadcast.Producer | broadcast.Consumer): track.Consumer;
|
|
82
197
|
export {};
|
|
83
198
|
//# sourceMappingURL=wire.d.ts.map
|
package/wire.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,KAAK,SAAS,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;AAGzC,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACzB,mGAAmG;IACnG,cAAc,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4GAA4G;IAC5G,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAA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