reactor-effect-client 0.7.1 → 0.8.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/NOTICE +7 -2
- package/README.md +103 -141
- package/dist/Coordinator.d.ts +382 -0
- package/dist/Coordinator.d.ts.map +1 -0
- package/dist/Coordinator.js +732 -0
- package/dist/Coordinator.js.map +1 -0
- package/dist/H3.d.ts +159 -0
- package/dist/H3.d.ts.map +1 -0
- package/dist/H3.js +21 -0
- package/dist/H3.js.map +1 -0
- package/dist/H3Source.d.ts +93 -0
- package/dist/H3Source.d.ts.map +1 -0
- package/dist/H3Source.js +401 -0
- package/dist/H3Source.js.map +1 -0
- package/dist/LocalSource.d.ts +68 -0
- package/dist/LocalSource.d.ts.map +1 -0
- package/dist/LocalSource.js +354 -0
- package/dist/LocalSource.js.map +1 -0
- package/dist/Media.d.ts +106 -0
- package/dist/Media.d.ts.map +1 -0
- package/dist/Media.js +16 -0
- package/dist/Media.js.map +1 -0
- package/dist/Peer.d.ts +134 -0
- package/dist/Peer.d.ts.map +1 -0
- package/dist/Peer.js +57 -0
- package/dist/Peer.js.map +1 -0
- package/dist/Playout.d.ts +724 -0
- package/dist/Playout.d.ts.map +1 -0
- package/dist/Playout.js +28 -0
- package/dist/Playout.js.map +1 -0
- package/dist/Reactor.d.ts +135 -0
- package/dist/Reactor.d.ts.map +1 -0
- package/dist/Reactor.js +158 -0
- package/dist/Reactor.js.map +1 -0
- package/dist/ReactorError.d.ts +331 -0
- package/dist/ReactorError.d.ts.map +1 -0
- package/dist/ReactorError.js +316 -0
- package/dist/ReactorError.js.map +1 -0
- package/dist/ReactorTest.d.ts +383 -0
- package/dist/ReactorTest.d.ts.map +1 -0
- package/dist/ReactorTest.js +317 -0
- package/dist/ReactorTest.js.map +1 -0
- package/dist/Session.d.ts +314 -0
- package/dist/Session.d.ts.map +1 -0
- package/dist/Session.js +51 -0
- package/dist/Session.js.map +1 -0
- package/dist/index.d.ts +12 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/correlator.d.ts +46 -0
- package/dist/internal/correlator.d.ts.map +1 -0
- package/dist/internal/correlator.js +150 -0
- package/dist/internal/correlator.js.map +1 -0
- package/dist/internal/deadline.d.ts +24 -0
- package/dist/internal/deadline.d.ts.map +1 -0
- package/dist/internal/deadline.js +44 -0
- package/dist/internal/deadline.js.map +1 -0
- package/dist/{h3/_internal/contracts.d.ts → internal/h3/commands.d.ts} +39 -33
- package/dist/internal/h3/commands.d.ts.map +1 -0
- package/dist/internal/h3/commands.js +128 -0
- package/dist/internal/h3/commands.js.map +1 -0
- package/dist/{h3 → internal/h3}/messages.d.ts +16 -11
- package/dist/internal/h3/messages.d.ts.map +1 -0
- package/dist/{h3 → internal/h3}/messages.js +19 -31
- package/dist/internal/h3/messages.js.map +1 -0
- package/dist/internal/h3/operations.d.ts +145 -0
- package/dist/internal/h3/operations.d.ts.map +1 -0
- package/dist/internal/h3/operations.js +284 -0
- package/dist/internal/h3/operations.js.map +1 -0
- package/dist/{h3 → internal/h3}/profile.d.ts +63 -65
- package/dist/internal/h3/profile.d.ts.map +1 -0
- package/dist/{h3 → internal/h3}/profile.js +39 -39
- package/dist/internal/h3/profile.js.map +1 -0
- package/dist/internal/h3/provider.d.ts +14 -0
- package/dist/internal/h3/provider.d.ts.map +1 -0
- package/dist/internal/h3/provider.js +672 -0
- package/dist/internal/h3/provider.js.map +1 -0
- package/dist/internal/h3/references.d.ts +68 -0
- package/dist/internal/h3/references.d.ts.map +1 -0
- package/dist/internal/h3/references.js +339 -0
- package/dist/internal/h3/references.js.map +1 -0
- package/dist/internal/h3/request.d.ts +56 -0
- package/dist/internal/h3/request.d.ts.map +1 -0
- package/dist/internal/h3/request.js +70 -0
- package/dist/internal/h3/request.js.map +1 -0
- package/dist/internal/h3/state.d.ts +120 -0
- package/dist/internal/h3/state.d.ts.map +1 -0
- package/dist/internal/h3/state.js +270 -0
- package/dist/internal/h3/state.js.map +1 -0
- package/dist/{Submission.d.ts → internal/h3/submission.d.ts} +1 -3
- package/dist/internal/h3/submission.d.ts.map +1 -0
- package/dist/{Submission.js → internal/h3/submission.js} +1 -9
- package/dist/internal/h3/submission.js.map +1 -0
- package/dist/internal/hub.d.ts +32 -0
- package/dist/internal/hub.d.ts.map +1 -0
- package/dist/internal/hub.js +92 -0
- package/dist/internal/hub.js.map +1 -0
- package/dist/internal/playout/errors.d.ts +51 -0
- package/dist/internal/playout/errors.d.ts.map +1 -0
- package/dist/internal/playout/errors.js +40 -0
- package/dist/internal/playout/errors.js.map +1 -0
- package/dist/internal/playout/policy.d.ts +559 -0
- package/dist/internal/playout/policy.d.ts.map +1 -0
- package/dist/internal/playout/policy.js +2338 -0
- package/dist/internal/playout/policy.js.map +1 -0
- package/dist/internal/playout/runtime.d.ts +28 -0
- package/dist/internal/playout/runtime.d.ts.map +1 -0
- package/dist/internal/playout/runtime.js +766 -0
- package/dist/internal/playout/runtime.js.map +1 -0
- package/dist/internal/playout/tag.d.ts +14 -0
- package/dist/internal/playout/tag.d.ts.map +1 -0
- package/dist/internal/playout/tag.js +43 -0
- package/dist/internal/playout/tag.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts +55 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.js +42 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts +160 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.js +21 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts +89 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.js +20 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts +85 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.js +24 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts +190 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.js +54 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts +88 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.js +33 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.js.map +1 -0
- package/dist/internal/queue.d.ts +4 -0
- package/dist/internal/queue.d.ts.map +1 -0
- package/dist/{_internal → internal}/queue.js +0 -9
- package/dist/internal/queue.js.map +1 -0
- package/dist/internal/reactorTest/coordinator.d.ts +5 -0
- package/dist/internal/reactorTest/coordinator.d.ts.map +1 -0
- package/dist/internal/reactorTest/coordinator.js +178 -0
- package/dist/internal/reactorTest/coordinator.js.map +1 -0
- package/dist/internal/reactorTest/faults.d.ts +172 -0
- package/dist/internal/reactorTest/faults.d.ts.map +1 -0
- package/dist/internal/reactorTest/faults.js +23 -0
- package/dist/internal/reactorTest/faults.js.map +1 -0
- package/dist/internal/reactorTest/h3.d.ts +431 -0
- package/dist/internal/reactorTest/h3.d.ts.map +1 -0
- package/dist/internal/reactorTest/h3.js +625 -0
- package/dist/internal/reactorTest/h3.js.map +1 -0
- package/dist/internal/reactorTest/media.d.ts +22 -0
- package/dist/internal/reactorTest/media.d.ts.map +1 -0
- package/dist/internal/reactorTest/media.js +34 -0
- package/dist/internal/reactorTest/media.js.map +1 -0
- package/dist/internal/reactorTest/peer.d.ts +318 -0
- package/dist/internal/reactorTest/peer.d.ts.map +1 -0
- package/dist/internal/reactorTest/peer.js +206 -0
- package/dist/internal/reactorTest/peer.js.map +1 -0
- package/dist/internal/reactorTest/playout.d.ts +34 -0
- package/dist/internal/reactorTest/playout.d.ts.map +1 -0
- package/dist/internal/reactorTest/playout.js +340 -0
- package/dist/internal/reactorTest/playout.js.map +1 -0
- package/dist/internal/reactorTest/references.d.ts +25 -0
- package/dist/internal/reactorTest/references.d.ts.map +1 -0
- package/dist/{testing/Png.js → internal/reactorTest/references.js} +50 -12
- package/dist/internal/reactorTest/references.js.map +1 -0
- package/dist/internal/reactorTest/sessions.d.ts +364 -0
- package/dist/internal/reactorTest/sessions.d.ts.map +1 -0
- package/dist/internal/reactorTest/sessions.js +592 -0
- package/dist/internal/reactorTest/sessions.js.map +1 -0
- package/dist/internal/reactorTest/timing.d.ts +13 -0
- package/dist/internal/reactorTest/timing.d.ts.map +1 -0
- package/dist/internal/reactorTest/timing.js +20 -0
- package/dist/internal/reactorTest/timing.js.map +1 -0
- package/dist/internal/recording.d.ts +52 -0
- package/dist/internal/recording.d.ts.map +1 -0
- package/dist/internal/recording.js +141 -0
- package/dist/internal/recording.js.map +1 -0
- package/dist/internal/session/connect.d.ts +34 -0
- package/dist/internal/session/connect.d.ts.map +1 -0
- package/dist/internal/session/connect.js +502 -0
- package/dist/internal/session/connect.js.map +1 -0
- package/dist/internal/session/generation.d.ts +35 -0
- package/dist/internal/session/generation.d.ts.map +1 -0
- package/dist/internal/session/generation.js +185 -0
- package/dist/internal/session/generation.js.map +1 -0
- package/dist/internal/session/ice.d.ts +23 -0
- package/dist/internal/session/ice.d.ts.map +1 -0
- package/dist/internal/session/ice.js +57 -0
- package/dist/internal/session/ice.js.map +1 -0
- package/dist/internal/session/inbound.d.ts +50 -0
- package/dist/internal/session/inbound.d.ts.map +1 -0
- package/dist/internal/session/inbound.js +202 -0
- package/dist/internal/session/inbound.js.map +1 -0
- package/dist/internal/session/model.d.ts +163 -0
- package/dist/internal/session/model.d.ts.map +1 -0
- package/dist/internal/session/model.js +78 -0
- package/dist/internal/session/model.js.map +1 -0
- package/dist/internal/session/requests.d.ts +71 -0
- package/dist/internal/session/requests.d.ts.map +1 -0
- package/dist/internal/session/requests.js +240 -0
- package/dist/internal/session/requests.js.map +1 -0
- package/dist/internal/session/tracks.d.ts +21 -0
- package/dist/internal/session/tracks.d.ts.map +1 -0
- package/dist/internal/session/tracks.js +166 -0
- package/dist/internal/session/tracks.js.map +1 -0
- package/dist/internal/session/upload.d.ts +21 -0
- package/dist/internal/session/upload.d.ts.map +1 -0
- package/dist/internal/session/upload.js +68 -0
- package/dist/internal/session/upload.js.map +1 -0
- package/dist/internal/session.d.ts +66 -0
- package/dist/internal/session.d.ts.map +1 -0
- package/dist/internal/session.js +280 -0
- package/dist/internal/session.js.map +1 -0
- package/dist/{stats.d.ts → internal/stats.d.ts} +30 -16
- package/dist/internal/stats.d.ts.map +1 -0
- package/dist/internal/stats.js +201 -0
- package/dist/internal/stats.js.map +1 -0
- package/dist/internal/token.d.ts +22 -0
- package/dist/internal/token.d.ts.map +1 -0
- package/dist/internal/token.js +65 -0
- package/dist/internal/token.js.map +1 -0
- package/dist/internal/wire.d.ts +37 -0
- package/dist/internal/wire.d.ts.map +1 -0
- package/dist/internal/wire.js +49 -0
- package/dist/internal/wire.js.map +1 -0
- package/notices/bufbuild-protobuf-LICENSE +201 -0
- package/package.json +17 -38
- package/dist/FetchHttp.d.ts +0 -9
- package/dist/FetchHttp.d.ts.map +0 -1
- package/dist/FetchHttp.js +0 -63
- package/dist/FetchHttp.js.map +0 -1
- package/dist/PeerFactory.d.ts +0 -26
- package/dist/PeerFactory.d.ts.map +0 -1
- package/dist/PeerFactory.js +0 -4
- package/dist/PeerFactory.js.map +0 -1
- package/dist/PeerTypes.d.ts +0 -64
- package/dist/PeerTypes.d.ts.map +0 -1
- package/dist/PeerTypes.js +0 -2
- package/dist/PeerTypes.js.map +0 -1
- package/dist/Sequence.d.ts +0 -85
- package/dist/Sequence.d.ts.map +0 -1
- package/dist/Sequence.js +0 -210
- package/dist/Sequence.js.map +0 -1
- package/dist/SessionTypes.d.ts +0 -312
- package/dist/SessionTypes.d.ts.map +0 -1
- package/dist/SessionTypes.js +0 -19
- package/dist/SessionTypes.js.map +0 -1
- package/dist/Submission.d.ts.map +0 -1
- package/dist/Submission.js.map +0 -1
- package/dist/_internal/queue.d.ts +0 -6
- package/dist/_internal/queue.d.ts.map +0 -1
- package/dist/_internal/queue.js.map +0 -1
- package/dist/bytes.d.ts +0 -6
- package/dist/bytes.d.ts.map +0 -1
- package/dist/bytes.js +0 -32
- package/dist/bytes.js.map +0 -1
- package/dist/contract.d.ts +0 -149
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -119
- package/dist/contract.js.map +0 -1
- package/dist/coordinator/_internal/client.d.ts +0 -215
- package/dist/coordinator/_internal/client.d.ts.map +0 -1
- package/dist/coordinator/_internal/client.js +0 -563
- package/dist/coordinator/_internal/client.js.map +0 -1
- package/dist/coordinator/_internal/recording.d.ts +0 -31
- package/dist/coordinator/_internal/recording.d.ts.map +0 -1
- package/dist/coordinator/_internal/recording.js +0 -123
- package/dist/coordinator/_internal/recording.js.map +0 -1
- package/dist/coordinator/_internal/response.d.ts +0 -15
- package/dist/coordinator/_internal/response.d.ts.map +0 -1
- package/dist/coordinator/_internal/response.js +0 -55
- package/dist/coordinator/_internal/response.js.map +0 -1
- package/dist/coordinator/_internal/schemas.d.ts +0 -73
- package/dist/coordinator/_internal/schemas.d.ts.map +0 -1
- package/dist/coordinator/_internal/schemas.js +0 -200
- package/dist/coordinator/_internal/schemas.js.map +0 -1
- package/dist/coordinator/index.d.ts +0 -40
- package/dist/coordinator/index.d.ts.map +0 -1
- package/dist/coordinator/index.js +0 -21
- package/dist/coordinator/index.js.map +0 -1
- package/dist/correlation.d.ts +0 -47
- package/dist/correlation.d.ts.map +0 -1
- package/dist/correlation.js +0 -131
- package/dist/correlation.js.map +0 -1
- package/dist/duration.d.ts +0 -27
- package/dist/duration.d.ts.map +0 -1
- package/dist/duration.js +0 -47
- package/dist/duration.js.map +0 -1
- package/dist/errors.d.ts +0 -1303
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -745
- package/dist/errors.js.map +0 -1
- package/dist/h3/_internal/client.d.ts +0 -9
- package/dist/h3/_internal/client.d.ts.map +0 -1
- package/dist/h3/_internal/client.js +0 -652
- package/dist/h3/_internal/client.js.map +0 -1
- package/dist/h3/_internal/contracts.d.ts.map +0 -1
- package/dist/h3/_internal/contracts.js +0 -123
- package/dist/h3/_internal/contracts.js.map +0 -1
- package/dist/h3/_internal/deployment.d.ts +0 -8
- package/dist/h3/_internal/deployment.d.ts.map +0 -1
- package/dist/h3/_internal/deployment.js +0 -149
- package/dist/h3/_internal/deployment.js.map +0 -1
- package/dist/h3/_internal/evidence.d.ts +0 -17
- package/dist/h3/_internal/evidence.d.ts.map +0 -1
- package/dist/h3/_internal/evidence.js +0 -48
- package/dist/h3/_internal/evidence.js.map +0 -1
- package/dist/h3/_internal/operations.d.ts +0 -58
- package/dist/h3/_internal/operations.d.ts.map +0 -1
- package/dist/h3/_internal/operations.js +0 -268
- package/dist/h3/_internal/operations.js.map +0 -1
- package/dist/h3/_internal/references.d.ts +0 -24
- package/dist/h3/_internal/references.d.ts.map +0 -1
- package/dist/h3/_internal/references.js +0 -309
- package/dist/h3/_internal/references.js.map +0 -1
- package/dist/h3/_internal/request.d.ts +0 -21
- package/dist/h3/_internal/request.d.ts.map +0 -1
- package/dist/h3/_internal/request.js +0 -97
- package/dist/h3/_internal/request.js.map +0 -1
- package/dist/h3/_internal/retained.d.ts +0 -22
- package/dist/h3/_internal/retained.d.ts.map +0 -1
- package/dist/h3/_internal/retained.js +0 -89
- package/dist/h3/_internal/retained.js.map +0 -1
- package/dist/h3/_internal/state.d.ts +0 -44
- package/dist/h3/_internal/state.d.ts.map +0 -1
- package/dist/h3/_internal/state.js +0 -283
- package/dist/h3/_internal/state.js.map +0 -1
- package/dist/h3/index.d.ts +0 -10
- package/dist/h3/index.d.ts.map +0 -1
- package/dist/h3/index.js +0 -7
- package/dist/h3/index.js.map +0 -1
- package/dist/h3/messages.d.ts.map +0 -1
- package/dist/h3/messages.js.map +0 -1
- package/dist/h3/profile.d.ts.map +0 -1
- package/dist/h3/profile.js.map +0 -1
- package/dist/h3/types.d.ts +0 -291
- package/dist/h3/types.d.ts.map +0 -1
- package/dist/h3/types.js +0 -2
- package/dist/h3/types.js.map +0 -1
- package/dist/host.d.ts +0 -26
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -20
- package/dist/host.js.map +0 -1
- package/dist/json.d.ts +0 -25
- package/dist/json.d.ts.map +0 -1
- package/dist/json.js +0 -143
- package/dist/json.js.map +0 -1
- package/dist/media-stream.d.ts +0 -10
- package/dist/media-stream.d.ts.map +0 -1
- package/dist/media-stream.js +0 -18
- package/dist/media-stream.js.map +0 -1
- package/dist/observation.d.ts +0 -38
- package/dist/observation.d.ts.map +0 -1
- package/dist/observation.js +0 -113
- package/dist/observation.js.map +0 -1
- package/dist/orchestration/elapsed.d.ts +0 -9
- package/dist/orchestration/elapsed.d.ts.map +0 -1
- package/dist/orchestration/elapsed.js +0 -8
- package/dist/orchestration/elapsed.js.map +0 -1
- package/dist/orchestration/h3-source.d.ts +0 -58
- package/dist/orchestration/h3-source.d.ts.map +0 -1
- package/dist/orchestration/h3-source.js +0 -362
- package/dist/orchestration/h3-source.js.map +0 -1
- package/dist/orchestration/index.d.ts +0 -17
- package/dist/orchestration/index.d.ts.map +0 -1
- package/dist/orchestration/index.js +0 -12
- package/dist/orchestration/index.js.map +0 -1
- package/dist/orchestration/media-buffer.d.ts +0 -32
- package/dist/orchestration/media-buffer.d.ts.map +0 -1
- package/dist/orchestration/media-buffer.js +0 -94
- package/dist/orchestration/media-buffer.js.map +0 -1
- package/dist/orchestration/open-h3.d.ts +0 -101
- package/dist/orchestration/open-h3.d.ts.map +0 -1
- package/dist/orchestration/open-h3.js +0 -127
- package/dist/orchestration/open-h3.js.map +0 -1
- package/dist/orchestration/queries.d.ts +0 -10
- package/dist/orchestration/queries.d.ts.map +0 -1
- package/dist/orchestration/queries.js +0 -43
- package/dist/orchestration/queries.js.map +0 -1
- package/dist/orchestration/references.d.ts +0 -18
- package/dist/orchestration/references.d.ts.map +0 -1
- package/dist/orchestration/references.js +0 -79
- package/dist/orchestration/references.js.map +0 -1
- package/dist/orchestration/renewal-state.d.ts +0 -84
- package/dist/orchestration/renewal-state.d.ts.map +0 -1
- package/dist/orchestration/renewal-state.js +0 -95
- package/dist/orchestration/renewal-state.js.map +0 -1
- package/dist/orchestration/renewal.d.ts +0 -103
- package/dist/orchestration/renewal.d.ts.map +0 -1
- package/dist/orchestration/renewal.js +0 -1099
- package/dist/orchestration/renewal.js.map +0 -1
- package/dist/orchestration/request.d.ts +0 -65
- package/dist/orchestration/request.d.ts.map +0 -1
- package/dist/orchestration/request.js +0 -134
- package/dist/orchestration/request.js.map +0 -1
- package/dist/orchestration/retention.d.ts +0 -100
- package/dist/orchestration/retention.d.ts.map +0 -1
- package/dist/orchestration/retention.js +0 -134
- package/dist/orchestration/retention.js.map +0 -1
- package/dist/orchestration/routing.d.ts +0 -21
- package/dist/orchestration/routing.d.ts.map +0 -1
- package/dist/orchestration/routing.js +0 -93
- package/dist/orchestration/routing.js.map +0 -1
- package/dist/orchestration/scheduler-key.d.ts +0 -14
- package/dist/orchestration/scheduler-key.d.ts.map +0 -1
- package/dist/orchestration/scheduler-key.js +0 -62
- package/dist/orchestration/scheduler-key.js.map +0 -1
- package/dist/orchestration/scheduler-policy.d.ts +0 -246
- package/dist/orchestration/scheduler-policy.d.ts.map +0 -1
- package/dist/orchestration/scheduler-policy.js +0 -668
- package/dist/orchestration/scheduler-policy.js.map +0 -1
- package/dist/orchestration/scheduler.d.ts +0 -393
- package/dist/orchestration/scheduler.d.ts.map +0 -1
- package/dist/orchestration/scheduler.js +0 -2621
- package/dist/orchestration/scheduler.js.map +0 -1
- package/dist/orchestration/source-slot.d.ts +0 -124
- package/dist/orchestration/source-slot.d.ts.map +0 -1
- package/dist/orchestration/source-slot.js +0 -348
- package/dist/orchestration/source-slot.js.map +0 -1
- package/dist/orchestration/types.d.ts +0 -1462
- package/dist/orchestration/types.d.ts.map +0 -1
- package/dist/orchestration/types.js +0 -135
- package/dist/orchestration/types.js.map +0 -1
- package/dist/protobuf.d.ts +0 -63
- package/dist/protobuf.d.ts.map +0 -1
- package/dist/protobuf.js +0 -252
- package/dist/protobuf.js.map +0 -1
- package/dist/session/_internal/acquire.d.ts +0 -21
- package/dist/session/_internal/acquire.d.ts.map +0 -1
- package/dist/session/_internal/acquire.js +0 -168
- package/dist/session/_internal/acquire.js.map +0 -1
- package/dist/session/_internal/cleanup.d.ts +0 -19
- package/dist/session/_internal/cleanup.d.ts.map +0 -1
- package/dist/session/_internal/cleanup.js +0 -102
- package/dist/session/_internal/cleanup.js.map +0 -1
- package/dist/session/_internal/lifecycle.d.ts +0 -67
- package/dist/session/_internal/lifecycle.d.ts.map +0 -1
- package/dist/session/_internal/lifecycle.js +0 -142
- package/dist/session/_internal/lifecycle.js.map +0 -1
- package/dist/session/_internal/remote.d.ts +0 -28
- package/dist/session/_internal/remote.d.ts.map +0 -1
- package/dist/session/_internal/remote.js +0 -71
- package/dist/session/_internal/remote.js.map +0 -1
- package/dist/session/_internal/uploads.d.ts +0 -7
- package/dist/session/_internal/uploads.d.ts.map +0 -1
- package/dist/session/_internal/uploads.js +0 -31
- package/dist/session/_internal/uploads.js.map +0 -1
- package/dist/session/commands.d.ts +0 -2
- package/dist/session/commands.d.ts.map +0 -1
- package/dist/session/commands.js +0 -2
- package/dist/session/commands.js.map +0 -1
- package/dist/session/files.d.ts +0 -21
- package/dist/session/files.d.ts.map +0 -1
- package/dist/session/files.js +0 -49
- package/dist/session/files.js.map +0 -1
- package/dist/session/index.d.ts +0 -84
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -16
- package/dist/session/index.js.map +0 -1
- package/dist/session/media.d.ts +0 -114
- package/dist/session/media.d.ts.map +0 -1
- package/dist/session/media.js +0 -2
- package/dist/session/media.js.map +0 -1
- package/dist/session/recorder.d.ts +0 -24
- package/dist/session/recorder.d.ts.map +0 -1
- package/dist/session/recorder.js +0 -19
- package/dist/session/recorder.js.map +0 -1
- package/dist/session.d.ts +0 -105
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -976
- package/dist/session.js.map +0 -1
- package/dist/simulation/_internal/source.d.ts +0 -12
- package/dist/simulation/_internal/source.d.ts.map +0 -1
- package/dist/simulation/_internal/source.js +0 -513
- package/dist/simulation/_internal/source.js.map +0 -1
- package/dist/simulation/index.d.ts +0 -13
- package/dist/simulation/index.d.ts.map +0 -1
- package/dist/simulation/index.js +0 -12
- package/dist/simulation/index.js.map +0 -1
- package/dist/simulation/types.d.ts +0 -39
- package/dist/simulation/types.d.ts.map +0 -1
- package/dist/simulation/types.js +0 -2
- package/dist/simulation/types.js.map +0 -1
- package/dist/stats.d.ts.map +0 -1
- package/dist/stats.js +0 -205
- package/dist/stats.js.map +0 -1
- package/dist/testing/Faults.d.ts +0 -4
- package/dist/testing/Faults.d.ts.map +0 -1
- package/dist/testing/Faults.js +0 -7
- package/dist/testing/Faults.js.map +0 -1
- package/dist/testing/Png.d.ts +0 -3
- package/dist/testing/Png.d.ts.map +0 -1
- package/dist/testing/Png.js.map +0 -1
- package/dist/testing/Wav.d.ts +0 -14
- package/dist/testing/Wav.d.ts.map +0 -1
- package/dist/testing/Wav.js +0 -37
- package/dist/testing/Wav.js.map +0 -1
- package/dist/testing/index.d.ts +0 -5
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -4
- package/dist/testing/index.js.map +0 -1
- package/dist/wire.d.ts +0 -7
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.generated.d.ts +0 -305
- package/dist/wire.generated.d.ts.map +0 -1
- package/dist/wire.generated.js +0 -1257
- package/dist/wire.generated.js.map +0 -1
- package/dist/wire.js +0 -5
- package/dist/wire.js.map +0 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactor in a box: Reactor's coordinator and an H3 model simulated in memory
|
|
3
|
+
* at the network edge, so an application and every SDK layer above it run
|
|
4
|
+
* unchanged without a paid session. Provide `layer({ timing })` beneath
|
|
5
|
+
* `Reactor.layer()` in place of an HTTP client and a host; `layerCoordinator`
|
|
6
|
+
* is the coordinator's HTTP API alone, with no host.
|
|
7
|
+
*
|
|
8
|
+
* It models what H3 does, not how fast it does it: every delay comes from the
|
|
9
|
+
* `timing` the caller chooses. A scenario test states the timing it relies on
|
|
10
|
+
* with `Timing.fixed`; a simulation test draws from wide ranges with
|
|
11
|
+
* `Timing.random`, reproducibly for its seed; `Timing.hosted` draws from
|
|
12
|
+
* ranges paid runs measured, for demos. Every delay is an `Effect.sleep`: under
|
|
13
|
+
* `TestClock`, fork `flow()` and the run is deterministic; on the live clock
|
|
14
|
+
* it plays in real time.
|
|
15
|
+
*/
|
|
16
|
+
import * as Context from "effect/Context";
|
|
17
|
+
import * as Duration from "effect/Duration";
|
|
18
|
+
import * as Effect from "effect/Effect";
|
|
19
|
+
import * as Layer from "effect/Layer";
|
|
20
|
+
import * as Redacted from "effect/Redacted";
|
|
21
|
+
import * as Schema from "effect/Schema";
|
|
22
|
+
import * as TestClock from "effect/testing/TestClock";
|
|
23
|
+
import * as HttpClient from "effect/unstable/http/HttpClient";
|
|
24
|
+
import * as Coordinator from "./internal/reactorTest/coordinator.js";
|
|
25
|
+
import { clipId } from "./internal/reactorTest/h3.js";
|
|
26
|
+
import * as Media from "./internal/reactorTest/media.js";
|
|
27
|
+
import * as Peer from "./internal/reactorTest/peer.js";
|
|
28
|
+
import * as Sessions from "./internal/reactorTest/sessions.js";
|
|
29
|
+
import * as Sampler from "./internal/reactorTest/timing.js";
|
|
30
|
+
import { PeerFactory } from "./Peer.js";
|
|
31
|
+
const Count = Schema.Int.check(Schema.isGreaterThan(0));
|
|
32
|
+
const nth = { nth: Schema.optionalKey(Count) };
|
|
33
|
+
/**
|
|
34
|
+
* A fault the simulated Reactor injects. `nth` counts the occurrences the
|
|
35
|
+
* fault matches since it was added, from 1; without it every one matches.
|
|
36
|
+
*/
|
|
37
|
+
export const Fault = Schema.Union([
|
|
38
|
+
/**
|
|
39
|
+
* `POST /sessions` is refused with 403, or with `status`, allocating nothing
|
|
40
|
+
* either way: from a 5xx the client cannot tell that.
|
|
41
|
+
*/
|
|
42
|
+
Schema.TaggedStruct("RefuseAllocation", {
|
|
43
|
+
...nth,
|
|
44
|
+
status: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 400, maximum: 599 }))),
|
|
45
|
+
}),
|
|
46
|
+
/**
|
|
47
|
+
* `POST /sessions` on a token whose sessions are used allocates a session
|
|
48
|
+
* all the same, where it is otherwise refused 403 `session_limit`. What
|
|
49
|
+
* hosted Reactor answers a spent token is unobserved.
|
|
50
|
+
*/
|
|
51
|
+
Schema.TaggedStruct("IgnoreSessionLimit", nth),
|
|
52
|
+
/**
|
|
53
|
+
* `POST /sessions` on a token whose sessions are used answers with the
|
|
54
|
+
* session the token created last, where it is otherwise refused 403
|
|
55
|
+
* `session_limit`. What hosted Reactor answers a spent token is unobserved.
|
|
56
|
+
*/
|
|
57
|
+
Schema.TaggedStruct("RepeatSession", nth),
|
|
58
|
+
/**
|
|
59
|
+
* `POST /sessions` allocates, and answers 200 with a descriptor that names
|
|
60
|
+
* no session, so the client cannot tell what it made. Whether hosted
|
|
61
|
+
* Reactor ever answers so is unobserved.
|
|
62
|
+
*/
|
|
63
|
+
Schema.TaggedStruct("UnnamedAllocation", nth),
|
|
64
|
+
/**
|
|
65
|
+
* `POST /sessions` is never answered and allocates nothing, so only the
|
|
66
|
+
* client's own deadline ends the request, not knowing what it made.
|
|
67
|
+
*/
|
|
68
|
+
Schema.TaggedStruct("StallAllocation", nth),
|
|
69
|
+
/** Registering a WebRTC connection is refused with 403. */
|
|
70
|
+
Schema.TaggedStruct("RefuseConnect", nth),
|
|
71
|
+
/**
|
|
72
|
+
* A reconnect is refused with 503, or with `status`, saying to try again `retryAfter` later
|
|
73
|
+
* when it is set: the offer that replaces a connection's SDP (`PUT sdp_params`) takes no
|
|
74
|
+
* effect.
|
|
75
|
+
*/
|
|
76
|
+
Schema.TaggedStruct("RefuseReconnect", {
|
|
77
|
+
...nth,
|
|
78
|
+
status: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 400, maximum: 599 }))),
|
|
79
|
+
/** Sent as `Retry-After`, in whole seconds. */
|
|
80
|
+
retryAfter: Schema.optionalKey(Schema.Duration),
|
|
81
|
+
}),
|
|
82
|
+
/** The model never answers the command; with `applied` it takes effect and only the reply is lost. */
|
|
83
|
+
Schema.TaggedStruct("DropReply", {
|
|
84
|
+
...nth,
|
|
85
|
+
command: Schema.String,
|
|
86
|
+
applied: Schema.optionalKey(Schema.Boolean),
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* The model takes the command on time and answers it this long late, over
|
|
90
|
+
* the connection the command came on, whichever transport then carries it.
|
|
91
|
+
*/
|
|
92
|
+
Schema.TaggedStruct("LateReply", { ...nth, command: Schema.String, after: Schema.Duration }),
|
|
93
|
+
/** A build never finishes and holds the build slot. */
|
|
94
|
+
Schema.TaggedStruct("StallBuild", nth),
|
|
95
|
+
/** A build fails: the model broadcasts `clip_failed` and drops the clip. */
|
|
96
|
+
Schema.TaggedStruct("FailBuild", { ...nth, reason: Schema.optionalKey(Schema.String) }),
|
|
97
|
+
/** A connection drops this long after its channels open; the session goes on. */
|
|
98
|
+
Schema.TaggedStruct("Disconnect", { ...nth, after: Schema.Duration }),
|
|
99
|
+
/** Sessions end this long after they become ready, when that is sooner than their grant. */
|
|
100
|
+
Schema.TaggedStruct("Expire", { after: Schema.Duration }),
|
|
101
|
+
/**
|
|
102
|
+
* No session ends at its grant's cap: each runs until it is terminated, or
|
|
103
|
+
* until 30 s after its last connection drops. Whether hosted Reactor ends a
|
|
104
|
+
* session nothing ever connected to at its cap is unobserved.
|
|
105
|
+
*/
|
|
106
|
+
Schema.TaggedStruct("IgnoreCap", {}),
|
|
107
|
+
/** DELETE is accepted and the session reads STOPPING this long before it closes. */
|
|
108
|
+
Schema.TaggedStruct("SlowDelete", { for: Schema.Duration }),
|
|
109
|
+
/** DELETE is accepted and the session runs on until its grant ends. */
|
|
110
|
+
Schema.TaggedStruct("IgnoreDelete", {}),
|
|
111
|
+
/**
|
|
112
|
+
* `GET /sessions/{id}` answers 404 for a session that still runs, as a
|
|
113
|
+
* coordinator that lost track of it for a moment would. Whether hosted
|
|
114
|
+
* Reactor ever does is unobserved.
|
|
115
|
+
*/
|
|
116
|
+
Schema.TaggedStruct("MissingSession", nth),
|
|
117
|
+
/** While a clip plays, video is absent, black or one repeated frame. */
|
|
118
|
+
Schema.TaggedStruct("Video", { video: Schema.Literals(["absent", "black", "frozen"]) }),
|
|
119
|
+
/** The session offers audio and sends none. */
|
|
120
|
+
Schema.TaggedStruct("NoAudio", {}),
|
|
121
|
+
/** An enqueue with reference images is refused because one of them is invalid. */
|
|
122
|
+
Schema.TaggedStruct("InvalidImage", nth),
|
|
123
|
+
/**
|
|
124
|
+
* `POST /tokens` misgrants: a longer session than was asked for (the
|
|
125
|
+
* default), none of the cap asked for, a session not asked to be bound, a
|
|
126
|
+
* token already expired, or no echo of what it granted.
|
|
127
|
+
*/
|
|
128
|
+
Schema.TaggedStruct("OverGrant", {
|
|
129
|
+
...nth,
|
|
130
|
+
grant: Schema.optionalKey(Schema.Literals(["longer", "uncapped", "bound", "expired", "silent"])),
|
|
131
|
+
}),
|
|
132
|
+
/** A recording's playlist is ready this long after the time its clip predicted. */
|
|
133
|
+
Schema.TaggedStruct("LateRecording", { ...nth, by: Schema.Duration }),
|
|
134
|
+
/**
|
|
135
|
+
* Content moderation flags an enqueue, every one or those with `prompt`.
|
|
136
|
+
* The enqueue is answered as usual; `timing.moderation` later the verdict
|
|
137
|
+
* arrives on the control channel naming no category, input, command or
|
|
138
|
+
* request, as it did in a paid run, and on `terminate` (the default) the
|
|
139
|
+
* session ends, as Reactor documents. `warn` only reports it.
|
|
140
|
+
*/
|
|
141
|
+
Schema.TaggedStruct("Moderate", {
|
|
142
|
+
...nth,
|
|
143
|
+
prompt: Schema.optionalKey(Schema.String),
|
|
144
|
+
action: Schema.optionalKey(Schema.Literals(["terminate", "warn"])),
|
|
145
|
+
/** False ends the session with no verdict sent, which Reactor's docs allow. */
|
|
146
|
+
verdict: Schema.optionalKey(Schema.Boolean),
|
|
147
|
+
}),
|
|
148
|
+
]);
|
|
149
|
+
const point = (input) => {
|
|
150
|
+
const value = Duration.fromInputUnsafe(input ?? 0);
|
|
151
|
+
return { min: value, max: value };
|
|
152
|
+
};
|
|
153
|
+
const range = (bounds) => ({
|
|
154
|
+
min: Duration.fromInputUnsafe(bounds[0]),
|
|
155
|
+
max: Duration.fromInputUnsafe(bounds[1]),
|
|
156
|
+
});
|
|
157
|
+
export const Timing = {
|
|
158
|
+
/**
|
|
159
|
+
* Every delay fixed: zero unless named. A scenario test names the ones its
|
|
160
|
+
* outcome depends on.
|
|
161
|
+
*/
|
|
162
|
+
fixed: (input) => ({
|
|
163
|
+
label: "fixed",
|
|
164
|
+
seed: 1,
|
|
165
|
+
http: point(input.http),
|
|
166
|
+
channel: point(input.channel),
|
|
167
|
+
allocation: point(input.allocation),
|
|
168
|
+
negotiation: point(input.negotiation),
|
|
169
|
+
connect: point(input.connect),
|
|
170
|
+
seam: point(input.seam),
|
|
171
|
+
stop: point(input.stop),
|
|
172
|
+
moderation: point(input.moderation),
|
|
173
|
+
buildSpeed: { min: input.buildSpeed, max: input.buildSpeed },
|
|
174
|
+
continuedBuildSpeed: {
|
|
175
|
+
min: input.continuedBuildSpeed ?? input.buildSpeed,
|
|
176
|
+
max: input.continuedBuildSpeed ?? input.buildSpeed,
|
|
177
|
+
},
|
|
178
|
+
}),
|
|
179
|
+
/**
|
|
180
|
+
* Every delay drawn from a range, deliberately wider than anything measured
|
|
181
|
+
* so that code tuned to one provider speed fails: builds from a quarter of
|
|
182
|
+
* real time to ten times it, requests and messages up to 2 s, seams up to
|
|
183
|
+
* half a second, stops landing up to a second after their acknowledgement.
|
|
184
|
+
* Name a narrower range to explore one.
|
|
185
|
+
*/
|
|
186
|
+
random: (input) => ({
|
|
187
|
+
label: `random seed ${input.seed}`,
|
|
188
|
+
seed: input.seed,
|
|
189
|
+
http: range(input.http ?? [0, "2 seconds"]),
|
|
190
|
+
channel: range(input.channel ?? [0, "2 seconds"]),
|
|
191
|
+
allocation: range(input.allocation ?? [0, "5 seconds"]),
|
|
192
|
+
negotiation: range(input.negotiation ?? [0, "2 seconds"]),
|
|
193
|
+
connect: range(input.connect ?? [0, "2 seconds"]),
|
|
194
|
+
seam: range(input.seam ?? [0, "500 millis"]),
|
|
195
|
+
stop: range(input.stop ?? [0, "1 second"]),
|
|
196
|
+
moderation: range(input.moderation ?? [0, "2 seconds"]),
|
|
197
|
+
buildSpeed: {
|
|
198
|
+
min: input.buildSpeed?.[0] ?? 0.25,
|
|
199
|
+
max: input.buildSpeed?.[1] ?? 10,
|
|
200
|
+
},
|
|
201
|
+
continuedBuildSpeed: {
|
|
202
|
+
min: input.continuedBuildSpeed?.[0] ?? 0.25,
|
|
203
|
+
max: input.continuedBuildSpeed?.[1] ?? 10,
|
|
204
|
+
},
|
|
205
|
+
}),
|
|
206
|
+
/**
|
|
207
|
+
* What two paid hosted H3 runs measured on 2026-09-27 (0.6.0 evidence):
|
|
208
|
+
* connect steps of 0.2–0.9 s, eleven 5 s clips built about every 2.1 s
|
|
209
|
+
* while playing, five seams of 30–110 ms and command round trips of 60–90
|
|
210
|
+
* ms; from 0.7.0's two runs on 2026-09-28, a stop landing about 20 ms
|
|
211
|
+
* after its acknowledgement and one continued 5 s clip built in 5.45 s; and
|
|
212
|
+
* from 0.8.0's cut run, a moderation verdict 1.01 s after its enqueue. These
|
|
213
|
+
* are small samples, drawn as ranges and not replayed as a trace: use them
|
|
214
|
+
* for demos and realism checks, not as what a test depends on.
|
|
215
|
+
*/
|
|
216
|
+
hosted: {
|
|
217
|
+
label: "hosted H3, paid runs of 2026-09-27 and 2026-09-28",
|
|
218
|
+
seed: 1,
|
|
219
|
+
http: range(["200 millis", "300 millis"]),
|
|
220
|
+
channel: range(["30 millis", "45 millis"]),
|
|
221
|
+
allocation: range(["300 millis", "500 millis"]),
|
|
222
|
+
negotiation: range(["500 millis", "650 millis"]),
|
|
223
|
+
connect: range(["600 millis", "900 millis"]),
|
|
224
|
+
seam: range(["30 millis", "110 millis"]),
|
|
225
|
+
stop: point("20 millis"),
|
|
226
|
+
moderation: point("1 second"),
|
|
227
|
+
buildSpeed: { min: 2.3, max: 2.6 },
|
|
228
|
+
continuedBuildSpeed: { min: 0.92, max: 0.92 },
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
const count = (value) => Count.pipe(Schema.withConstructorDefault(Effect.succeed(value)));
|
|
232
|
+
/** The simulated Reactor's fixed facts; its delays come from `Timing`. */
|
|
233
|
+
export const Options = Schema.Struct({
|
|
234
|
+
/** The key `POST /tokens` accepts. */
|
|
235
|
+
apiKey: Schema.String.pipe(Schema.withConstructorDefault(Effect.succeed("reactor-test-api-key"))),
|
|
236
|
+
/** The queue capacities H3's state reports. */
|
|
237
|
+
generationCapacity: count(20),
|
|
238
|
+
playoutCapacity: count(10),
|
|
239
|
+
/**
|
|
240
|
+
* The rate the pricing API publishes, in credits a second, as it stated
|
|
241
|
+
* H3's for the paid runs: 125 at 10,000 a dollar is $0.0125 a second.
|
|
242
|
+
*/
|
|
243
|
+
creditsPerSecond: count(125),
|
|
244
|
+
creditsPerDollar: count(10_000),
|
|
245
|
+
/** Sessions the account may run at once, as Reactor's default quota; more are refused with 429. */
|
|
246
|
+
concurrentSessions: count(5),
|
|
247
|
+
/**
|
|
248
|
+
* Sessions the account may create a minute, three back to back, as Reactor's
|
|
249
|
+
* default quota; more are refused with 429 and a `Retry-After`.
|
|
250
|
+
*/
|
|
251
|
+
sessionsPerMinute: count(10),
|
|
252
|
+
/** Decoded frame size. */
|
|
253
|
+
width: count(16),
|
|
254
|
+
height: count(16),
|
|
255
|
+
/**
|
|
256
|
+
* The local candidate type of the pair a peer's statistics report carrying
|
|
257
|
+
* its media: `relay` stands for a connection through TURN.
|
|
258
|
+
*/
|
|
259
|
+
candidate: Schema.Literals(["host", "srflx", "relay"]).pipe(Schema.withConstructorDefault(Effect.succeed("host"))),
|
|
260
|
+
/** Whether the deployment's `enqueue` declares `reference_audios`. */
|
|
261
|
+
referenceAudio: Schema.Boolean.pipe(Schema.withConstructorDefault(Effect.succeed(true))),
|
|
262
|
+
/**
|
|
263
|
+
* Whether the deployment records. A recorder answers a clip or recording
|
|
264
|
+
* request with an HLS playlist, ready when the clip says; without one the
|
|
265
|
+
* request fails as a disabled recorder does. Whether hosted H3 records is
|
|
266
|
+
* unobserved.
|
|
267
|
+
*/
|
|
268
|
+
recorder: Schema.Boolean.pipe(Schema.withConstructorDefault(Effect.succeed(false))),
|
|
269
|
+
faults: Schema.Array(Fault).pipe(Schema.withConstructorDefault(Effect.succeed([]))),
|
|
270
|
+
});
|
|
271
|
+
/** Inspects and disturbs the simulated Reactor. */
|
|
272
|
+
export class ReactorTest extends Context.Service()("reactor-effect-client/ReactorTest") {
|
|
273
|
+
}
|
|
274
|
+
/** The simulated coordinator's state, and the services over it. */
|
|
275
|
+
const simulate = Effect.fnUntraced(function* (input) {
|
|
276
|
+
const { timing, ...rest } = input;
|
|
277
|
+
const options = Options.make(rest);
|
|
278
|
+
const sessions = yield* Sessions.make(options, yield* Sampler.make(timing));
|
|
279
|
+
const context = Context.make(ReactorTest, ReactorTest.of({
|
|
280
|
+
apiKey: Redacted.make(options.apiKey),
|
|
281
|
+
sessions: sessions.info,
|
|
282
|
+
billing: sessions.billing,
|
|
283
|
+
log: sessions.log,
|
|
284
|
+
inject: sessions.inject,
|
|
285
|
+
})).pipe(Context.add(HttpClient.HttpClient, Coordinator.client(sessions)));
|
|
286
|
+
return { sessions, context };
|
|
287
|
+
});
|
|
288
|
+
/**
|
|
289
|
+
* The simulated coordinator alone: tokens, sessions and their lifetimes,
|
|
290
|
+
* uploads and recordings over its HTTP API, with no host. Its sessions run
|
|
291
|
+
* without a connection, as a session does before its first or after its last.
|
|
292
|
+
*/
|
|
293
|
+
export const layerCoordinator = (input) => Layer.effectContext(Effect.map(simulate(input), ({ context }) => context));
|
|
294
|
+
/** The simulated Reactor, as the network edge `Reactor.layer` needs. */
|
|
295
|
+
export const layer = (input) => Layer.effectContext(Effect.map(simulate(input), ({ sessions, context }) => Context.add(context, PeerFactory, PeerFactory.of({
|
|
296
|
+
check: Effect.void,
|
|
297
|
+
make: Effect.acquireRelease(Peer.make(sessions), (peer) => peer.close),
|
|
298
|
+
}))));
|
|
299
|
+
/** The clip a simulated frame belongs to and its index in the clip; undefined when black. */
|
|
300
|
+
export const frameOf = (frame) => {
|
|
301
|
+
const decoded = Media.decode(frame.data);
|
|
302
|
+
return decoded && { clipId: clipId(decoded.ordinal), index: decoded.index };
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Keeps a `TestClock` moving in `step`s (5 ms by default) while it runs, so a
|
|
306
|
+
* scenario written as straight-line code advances in virtual time and each
|
|
307
|
+
* message chain lands within a step of when it would. Fork it into the test's
|
|
308
|
+
* scope; one large `TestClock.adjust` can run ahead of a fiber still being
|
|
309
|
+
* woken.
|
|
310
|
+
*/
|
|
311
|
+
export const flow = (step = "5 millis") => Effect.forever(TestClock.adjust(step));
|
|
312
|
+
/**
|
|
313
|
+
* Reference media H3's local checks accept, for tests and demos:
|
|
314
|
+
* `pngBytes({ width, height })` is a black PNG, `wavBytes({ seconds })` a WAV tone.
|
|
315
|
+
*/
|
|
316
|
+
export { pngBytes, wavBytes } from "./internal/reactorTest/references.js";
|
|
317
|
+
//# sourceMappingURL=ReactorTest.js.map
|
|
@@ -0,0 +1 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AAO,EAAE,QAAQ,EAAE,QAAQ,EAAmB,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One Reactor session: an allocation this process owns or an attachment it
|
|
3
|
+
* joined, its connection generations, commands, events and cleanup evidence.
|
|
4
|
+
* `Reactor.create` and `Reactor.attach` acquire one in a scope.
|
|
5
|
+
*/
|
|
6
|
+
import type * as Duration from "effect/Duration";
|
|
7
|
+
import type * as Effect from "effect/Effect";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import type * as Scope from "effect/Scope";
|
|
10
|
+
import type * as Stream from "effect/Stream";
|
|
11
|
+
import type { Capabilities, Descriptor, Transport } from "./Coordinator.js";
|
|
12
|
+
import type { Correlation } from "./internal/correlator.js";
|
|
13
|
+
import type { Statistics } from "./internal/stats.js";
|
|
14
|
+
import type { DecodedMedia, TrackMedia } from "./Media.js";
|
|
15
|
+
import type { CommandFailure, ReactorError } from "./ReactorError.js";
|
|
16
|
+
export type { Correlation } from "./internal/correlator.js";
|
|
17
|
+
export type { Statistics } from "./internal/stats.js";
|
|
18
|
+
/** A recording the session prepared, with the playlist to download it from. */
|
|
19
|
+
export declare const ClipReady: Schema.Struct<{
|
|
20
|
+
readonly sessionId: Schema.String;
|
|
21
|
+
readonly kind: Schema.String;
|
|
22
|
+
readonly startMarker: Schema.Finite;
|
|
23
|
+
readonly endMarker: Schema.Finite;
|
|
24
|
+
readonly nowMarker: Schema.Finite;
|
|
25
|
+
readonly predictedReadyAtMs: Schema.BigInt;
|
|
26
|
+
readonly playlistUrl: Schema.String;
|
|
27
|
+
}>;
|
|
28
|
+
export type ClipReady = typeof ClipReady.Type;
|
|
29
|
+
/**
|
|
30
|
+
* A control-channel message Reactor sent. Provider text (a clip failure's
|
|
31
|
+
* reason, an error's code and message) stays `Redacted`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ControlMessage: Schema.Union<readonly [Schema.TaggedStruct<"ModelSchema", {
|
|
34
|
+
readonly openapi: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
35
|
+
}>, Schema.TaggedStruct<"ClipReady", {
|
|
36
|
+
readonly clip: Schema.Struct<{
|
|
37
|
+
readonly sessionId: Schema.String;
|
|
38
|
+
readonly kind: Schema.String;
|
|
39
|
+
readonly startMarker: Schema.Finite;
|
|
40
|
+
readonly endMarker: Schema.Finite;
|
|
41
|
+
readonly nowMarker: Schema.Finite;
|
|
42
|
+
readonly predictedReadyAtMs: Schema.BigInt;
|
|
43
|
+
readonly playlistUrl: Schema.String;
|
|
44
|
+
}>;
|
|
45
|
+
}>, Schema.TaggedStruct<"ClipFailed", {
|
|
46
|
+
readonly reason: Schema.Redacted<Schema.String>;
|
|
47
|
+
}>, Schema.TaggedStruct<"TrackPublished", {
|
|
48
|
+
readonly name: Schema.String;
|
|
49
|
+
}>, Schema.TaggedStruct<"Error", {
|
|
50
|
+
readonly code: Schema.Redacted<Schema.String>;
|
|
51
|
+
readonly message: Schema.Redacted<Schema.String>;
|
|
52
|
+
}>]>;
|
|
53
|
+
export type ControlMessage = typeof ControlMessage.Type;
|
|
54
|
+
/** An uploaded file, as a command refers to it. */
|
|
55
|
+
export interface UploadReference {
|
|
56
|
+
readonly uploadId: string;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly mimeType: string;
|
|
59
|
+
readonly size: bigint;
|
|
60
|
+
}
|
|
61
|
+
export type Status = "idle" | "connecting" | "waiting" | "ready" | "disconnected" | "closing" | "closed";
|
|
62
|
+
export type Ownership = "owned" | "attached" | "allocating" | "unknown";
|
|
63
|
+
/**
|
|
64
|
+
* A session's cleanup evidence, a Schema so it can be persisted. Termination
|
|
65
|
+
* is confirmed by an independent read, never by a DELETE response alone.
|
|
66
|
+
*/
|
|
67
|
+
export declare const CloseReport: Schema.Struct<{
|
|
68
|
+
readonly localClosed: Schema.Boolean;
|
|
69
|
+
readonly allocation: Schema.Literals<readonly ["none", "known", "unknown"]>;
|
|
70
|
+
readonly ownership: Schema.optionalKey<Schema.Literals<readonly ["owned", "attached"]>>;
|
|
71
|
+
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
72
|
+
readonly remote: Schema.Struct<{
|
|
73
|
+
readonly attempted: Schema.Boolean;
|
|
74
|
+
readonly responseReceived: Schema.Boolean;
|
|
75
|
+
readonly confirmed: Schema.Boolean;
|
|
76
|
+
readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
|
|
77
|
+
readonly deleteStatus: Schema.NullOr<Schema.Int>;
|
|
78
|
+
readonly state: Schema.NullOr<Schema.String>;
|
|
79
|
+
readonly error: Schema.optionalKey<Schema.Struct<{
|
|
80
|
+
readonly _tag: Schema.String;
|
|
81
|
+
readonly reason: Schema.String;
|
|
82
|
+
readonly message: Schema.String;
|
|
83
|
+
readonly operation: Schema.optionalKey<Schema.String>;
|
|
84
|
+
readonly requestId: Schema.optionalKey<Schema.String>;
|
|
85
|
+
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
86
|
+
readonly generation: Schema.optionalKey<Schema.String>;
|
|
87
|
+
readonly outcome: Schema.optionalKey<Schema.Literals<readonly ["not-submitted", "unknown", "replied"]>>;
|
|
88
|
+
}>>;
|
|
89
|
+
}>;
|
|
90
|
+
readonly unpublishSubmitted: Schema.$Array<Schema.String>;
|
|
91
|
+
/** Claims possibly accepted remotely without an attributable response. */
|
|
92
|
+
readonly unresolvedPublications: Schema.$Array<Schema.String>;
|
|
93
|
+
readonly localErrors: Schema.$Array<Schema.Struct<{
|
|
94
|
+
readonly _tag: Schema.String;
|
|
95
|
+
readonly reason: Schema.String;
|
|
96
|
+
readonly message: Schema.String;
|
|
97
|
+
readonly operation: Schema.optionalKey<Schema.String>;
|
|
98
|
+
readonly requestId: Schema.optionalKey<Schema.String>;
|
|
99
|
+
readonly sessionId: Schema.optionalKey<Schema.String>;
|
|
100
|
+
readonly generation: Schema.optionalKey<Schema.String>;
|
|
101
|
+
readonly outcome: Schema.optionalKey<Schema.Literals<readonly ["not-submitted", "unknown", "replied"]>>;
|
|
102
|
+
}>>;
|
|
103
|
+
}>;
|
|
104
|
+
export type CloseReport = typeof CloseReport.Type;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the session a report closed may still bill: this process owned it
|
|
107
|
+
* and no read confirmed it ended, or it asked for an allocation whose outcome,
|
|
108
|
+
* and so whose id, never arrived. Nothing can confirm the second ended; the
|
|
109
|
+
* session's cap bounds it.
|
|
110
|
+
*/
|
|
111
|
+
export declare const mayStillBill: (report: CloseReport) => boolean;
|
|
112
|
+
export interface ReadyDescriptor extends Descriptor {
|
|
113
|
+
readonly capabilities: Capabilities;
|
|
114
|
+
readonly selected_transport: typeof Transport.Type;
|
|
115
|
+
}
|
|
116
|
+
export interface ReadyState {
|
|
117
|
+
readonly status: "ready";
|
|
118
|
+
readonly generation: bigint;
|
|
119
|
+
readonly remote: {
|
|
120
|
+
readonly ownership: "owned" | "attached";
|
|
121
|
+
readonly sessionId: string;
|
|
122
|
+
readonly descriptor: ReadyDescriptor;
|
|
123
|
+
readonly connectionId: number;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
interface SnapshotDetails {
|
|
127
|
+
readonly generation: bigint;
|
|
128
|
+
/**
|
|
129
|
+
* The session is reconnecting a dropped connection on its own: from the drop until a
|
|
130
|
+
* connection is ready or it stops trying, as `Reactor.Options.reconnect` says. `disconnected`
|
|
131
|
+
* without it is lasting: only `session.reconnect` connects the session again. A drop no attempt
|
|
132
|
+
* could reconnect, once content moderation or Reactor has ended the session or Reactor refuses
|
|
133
|
+
* this client's protocol (`VersionMismatch`), is lasting from the drop on, and `lastError` says
|
|
134
|
+
* why. A connection that drops before it has been ready 10 seconds, once the reconnect's time
|
|
135
|
+
* has run out, reads `reconnecting` for one change before the reconnect stops.
|
|
136
|
+
*/
|
|
137
|
+
readonly reconnecting: boolean;
|
|
138
|
+
readonly pending: {
|
|
139
|
+
readonly data: number;
|
|
140
|
+
readonly control: number;
|
|
141
|
+
};
|
|
142
|
+
readonly pausedLocally: ReadonlyArray<string>;
|
|
143
|
+
readonly claimedTracks: ReadonlyArray<string>;
|
|
144
|
+
readonly unresolvedPublications: ReadonlyArray<string>;
|
|
145
|
+
readonly receivedTracks: ReadonlyArray<string>;
|
|
146
|
+
readonly observationOverflows: bigint;
|
|
147
|
+
readonly subscribers: number;
|
|
148
|
+
readonly lastError?: ReactorError;
|
|
149
|
+
readonly close?: CloseReport;
|
|
150
|
+
}
|
|
151
|
+
export type Snapshot = SnapshotDetails & (ReadyState | {
|
|
152
|
+
readonly status: Exclude<Status, "ready">;
|
|
153
|
+
readonly remote?: {
|
|
154
|
+
readonly ownership: Ownership;
|
|
155
|
+
readonly sessionId?: string;
|
|
156
|
+
readonly descriptor?: Descriptor;
|
|
157
|
+
readonly connectionId?: number;
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
export interface Attribution {
|
|
161
|
+
readonly requestId: string;
|
|
162
|
+
readonly sequence: bigint;
|
|
163
|
+
readonly generation: bigint;
|
|
164
|
+
readonly correlation: Correlation;
|
|
165
|
+
}
|
|
166
|
+
/** A command's result and its observation are the same attributed value. */
|
|
167
|
+
export type CommandReply = Attribution & {
|
|
168
|
+
readonly _tag: "Model";
|
|
169
|
+
readonly outcome: "replied";
|
|
170
|
+
} & ({
|
|
171
|
+
readonly kind: "ack";
|
|
172
|
+
} | {
|
|
173
|
+
readonly kind: "message";
|
|
174
|
+
readonly type: string;
|
|
175
|
+
readonly data?: Schema.JsonObject;
|
|
176
|
+
});
|
|
177
|
+
export interface UploadProgress {
|
|
178
|
+
readonly allocation: "not-requested" | "unknown" | "confirmed";
|
|
179
|
+
readonly transfer: "not-requested" | "unknown" | "confirmed";
|
|
180
|
+
readonly notification: "not-submitted" | "unknown" | "submitted";
|
|
181
|
+
readonly file?: UploadReference;
|
|
182
|
+
}
|
|
183
|
+
export interface Uploaded {
|
|
184
|
+
readonly file: UploadReference;
|
|
185
|
+
readonly transfer: "confirmed";
|
|
186
|
+
readonly notification: "submitted";
|
|
187
|
+
}
|
|
188
|
+
export type EventPayload = {
|
|
189
|
+
readonly _tag: "Status";
|
|
190
|
+
readonly status: Status;
|
|
191
|
+
} | {
|
|
192
|
+
readonly _tag: "CommandError";
|
|
193
|
+
readonly error: ReactorError;
|
|
194
|
+
readonly requestId: string;
|
|
195
|
+
readonly correlation: Correlation;
|
|
196
|
+
}
|
|
197
|
+
/** A control message; a reply to this client's own request only when correlation says so. */
|
|
198
|
+
| {
|
|
199
|
+
readonly _tag: "Control";
|
|
200
|
+
readonly message: ControlMessage;
|
|
201
|
+
readonly requestId: string;
|
|
202
|
+
readonly correlation: Correlation;
|
|
203
|
+
} | {
|
|
204
|
+
readonly _tag: "Track";
|
|
205
|
+
readonly name: string;
|
|
206
|
+
readonly mid: string;
|
|
207
|
+
} | {
|
|
208
|
+
readonly _tag: "Decoded";
|
|
209
|
+
readonly kind: "audio" | "video";
|
|
210
|
+
readonly name: string;
|
|
211
|
+
readonly mid: string;
|
|
212
|
+
} | {
|
|
213
|
+
readonly _tag: "Diagnostic";
|
|
214
|
+
readonly error: ReactorError;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Reactor's content moderation flagged an input. `terminate` means Reactor
|
|
218
|
+
* is ending the session, and it is not reconnected; `warn` is informational.
|
|
219
|
+
* Its text stays out: the categories name what was flagged.
|
|
220
|
+
*/
|
|
221
|
+
| {
|
|
222
|
+
readonly _tag: "Moderation";
|
|
223
|
+
readonly action: string;
|
|
224
|
+
readonly categories: ReadonlyArray<string>;
|
|
225
|
+
/** What was screened, such as `prompt` or `image`, when Reactor says. */
|
|
226
|
+
readonly inputKind?: string;
|
|
227
|
+
/** The command that carried it, when Reactor says. */
|
|
228
|
+
readonly command?: string;
|
|
229
|
+
/** The request it answers, when Reactor names one. */
|
|
230
|
+
readonly requestId?: string;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _tag: "Upload";
|
|
233
|
+
readonly progress: UploadProgress;
|
|
234
|
+
};
|
|
235
|
+
export type SessionEvent = CommandReply | (EventPayload & {
|
|
236
|
+
readonly sequence: bigint;
|
|
237
|
+
readonly generation: bigint;
|
|
238
|
+
});
|
|
239
|
+
/** A state and every event after it, with no gap: events at or below `revision` are already in it. */
|
|
240
|
+
export interface Observation {
|
|
241
|
+
readonly initial: Snapshot;
|
|
242
|
+
readonly revision: bigint;
|
|
243
|
+
readonly events: Stream.Stream<SessionEvent, ReactorError>;
|
|
244
|
+
}
|
|
245
|
+
export interface ObserveOptions {
|
|
246
|
+
/** Events an observer may hold unread before it fails with `Overflow`; 64 by default. */
|
|
247
|
+
readonly capacity?: number | undefined;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* The library's own reply deadline, not a caller's wait: after dispatch its
|
|
251
|
+
* expiry fails with `Timeout`, outcome `unknown`, and the request stays
|
|
252
|
+
* attributable. To only stop waiting, fork the command and bound the join.
|
|
253
|
+
*/
|
|
254
|
+
export interface CommandOptions {
|
|
255
|
+
/** 10 seconds by default. */
|
|
256
|
+
readonly replyTimeout?: Duration.Input | undefined;
|
|
257
|
+
/** Uploaded files the command refers to, by the name the command uses. */
|
|
258
|
+
readonly uploads?: ReadonlyMap<string, UploadReference> | undefined;
|
|
259
|
+
}
|
|
260
|
+
export interface UploadOptions {
|
|
261
|
+
/** From allocation to notification; the session's upload timeout by default. */
|
|
262
|
+
readonly uploadTimeout?: Duration.Input | undefined;
|
|
263
|
+
}
|
|
264
|
+
export interface Session {
|
|
265
|
+
readonly id: string;
|
|
266
|
+
readonly ownership: "owned" | "attached";
|
|
267
|
+
readonly snapshot: Effect.Effect<Snapshot>;
|
|
268
|
+
/**
|
|
269
|
+
* The snapshot at every lifecycle change, starting with the current one; a reader that falls
|
|
270
|
+
* behind still sees each status in turn. A snapshot's status, generation, `reconnecting`,
|
|
271
|
+
* `lastError`, `receivedTracks` and `close` are as its change left them; the rest (pending
|
|
272
|
+
* counts, observers and overflows, and the connection's paused, claimed and unresolved tracks)
|
|
273
|
+
* is read as the reader takes it.
|
|
274
|
+
*/
|
|
275
|
+
readonly changes: Stream.Stream<Snapshot>;
|
|
276
|
+
/** The negotiated connection, when the session is ready. */
|
|
277
|
+
readonly ready: Effect.Effect<ReadyState, ReactorError>;
|
|
278
|
+
/** Events from now on; see `observe` to pair them with a state. */
|
|
279
|
+
readonly events: (options?: ObserveOptions) => Stream.Stream<SessionEvent, ReactorError>;
|
|
280
|
+
readonly observe: (options?: ObserveOptions) => Effect.Effect<Observation, ReactorError, Scope.Scope>;
|
|
281
|
+
readonly command: (name: string, data: unknown, options?: CommandOptions) => Effect.Effect<CommandReply, CommandFailure>;
|
|
282
|
+
/** The deployment's OpenAPI document, when it publishes one. */
|
|
283
|
+
readonly schema: Effect.Effect<{
|
|
284
|
+
readonly openapi?: Schema.JsonObject;
|
|
285
|
+
}, ReactorError>;
|
|
286
|
+
readonly upload: (name: string, mimeType: string, bytes: Uint8Array, options?: UploadOptions) => Effect.Effect<Uploaded, ReactorError>;
|
|
287
|
+
readonly requestRecordingClip: (seconds: number) => Effect.Effect<ClipReady, ReactorError>;
|
|
288
|
+
readonly recording: Effect.Effect<ClipReady, ReactorError>;
|
|
289
|
+
/** A sample of the connection's statistics; its `rates` run from the session's previous sample. */
|
|
290
|
+
readonly stats: Effect.Effect<Statistics, ReactorError>;
|
|
291
|
+
/** The current generation's decoded media, from a host that decodes it. */
|
|
292
|
+
readonly decoded: Effect.Effect<DecodedMedia, ReactorError>;
|
|
293
|
+
/** The current generation's platform tracks, from a host that has them. */
|
|
294
|
+
readonly tracks: Effect.Effect<TrackMedia, ReactorError>;
|
|
295
|
+
/**
|
|
296
|
+
* A new connection generation now, from a ready connection or a lasting drop; it never replays a
|
|
297
|
+
* command. While the session reconnects a dropped connection on its own (`reconnecting`), as it
|
|
298
|
+
* does unless `Reactor.Options` turns `reconnect` off, this joins that reconnect rather than
|
|
299
|
+
* begin another: it succeeds once a connection is ready again, and fails as the reconnect stops,
|
|
300
|
+
* with the session's `lastError`, or with `Closed` if the session closes first. One whose
|
|
301
|
+
* connection is replaced while it makes its peer, as the session reconnects a drop or another
|
|
302
|
+
* reconnect asked for takes over, begins nothing either: it succeeds once a later connection is
|
|
303
|
+
* ready, and fails with the session's `lastError` once a later one is down for good, as the
|
|
304
|
+
* session's own reconnect stops or as another reconnect asked for fails meanwhile, whose failure
|
|
305
|
+
* it then takes. It fails with `InvalidState` while another reconnect asked for is under way. It
|
|
306
|
+
* fails with `Closed`, not submitted, if the session's close has begun before it takes the
|
|
307
|
+
* session over, or once its connection is open and becoming ready; one the close overtakes
|
|
308
|
+
* earlier in its negotiation fails with its connection's `Aborted`.
|
|
309
|
+
*/
|
|
310
|
+
readonly reconnect: Effect.Effect<void, ReactorError>;
|
|
311
|
+
/** Idempotent. Closing an owned session attempts and then confirms remote termination. */
|
|
312
|
+
readonly close: Effect.Effect<CloseReport>;
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=Session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Session.d.ts","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,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