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,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clip operations by submission: what the provider's evidence established
|
|
3
|
+
* about each committed clip, from acceptance to its end. Every transition is
|
|
4
|
+
* pure and returns the waiters it completes, run once the new table is in place.
|
|
5
|
+
*/
|
|
6
|
+
import * as Deferred from "effect/Deferred";
|
|
7
|
+
import * as Effect from "effect/Effect";
|
|
8
|
+
import * as Exit from "effect/Exit";
|
|
9
|
+
import * as Result from "effect/Result";
|
|
10
|
+
import { ClipEnded, CommandFailure, ReactorError } from "../../ReactorError.js";
|
|
11
|
+
export const empty = (capacity) => ({
|
|
12
|
+
capacity,
|
|
13
|
+
operations: new Map(),
|
|
14
|
+
byClip: new Map(),
|
|
15
|
+
});
|
|
16
|
+
export const makeWaiters = Effect.all({
|
|
17
|
+
accepted: Deferred.make(),
|
|
18
|
+
generated: Deferred.make(),
|
|
19
|
+
started: Deferred.make(),
|
|
20
|
+
finished: Deferred.make(),
|
|
21
|
+
});
|
|
22
|
+
/** Nothing more can change it: its clip ended once accepted, or it was decided without one. */
|
|
23
|
+
const settled = (operation) => (operation.ended !== undefined && operation.acceptance !== undefined) ||
|
|
24
|
+
operation.indeterminate ||
|
|
25
|
+
operation.rejected;
|
|
26
|
+
const put = (table, operation) => {
|
|
27
|
+
const operations = new Map(table.operations).set(operation.identity.id, operation);
|
|
28
|
+
const byClip = operation.clipId === undefined || operation.rejected
|
|
29
|
+
? table.byClip
|
|
30
|
+
: new Map(table.byClip).set(operation.clipId, operation.identity.id);
|
|
31
|
+
return { ...table, operations, byClip };
|
|
32
|
+
};
|
|
33
|
+
const remove = (table, id) => {
|
|
34
|
+
const operation = table.operations.get(id);
|
|
35
|
+
if (operation === undefined)
|
|
36
|
+
return table;
|
|
37
|
+
const operations = new Map(table.operations);
|
|
38
|
+
operations.delete(id);
|
|
39
|
+
const byClip = new Map(table.byClip);
|
|
40
|
+
if (operation.clipId !== undefined && byClip.get(operation.clipId) === id)
|
|
41
|
+
byClip.delete(operation.clipId);
|
|
42
|
+
return { ...table, operations, byClip };
|
|
43
|
+
};
|
|
44
|
+
const succeed = (deferred, value) => Effect.asVoid(Deferred.succeed(deferred, value));
|
|
45
|
+
const fail = (deferred, error) => Effect.asVoid(Deferred.fail(deferred, error));
|
|
46
|
+
/**
|
|
47
|
+
* Takes a slot for a submission about to dispatch. Operations that ended are
|
|
48
|
+
* evicted first, oldest first; a table of unresolved operations refuses.
|
|
49
|
+
*/
|
|
50
|
+
export const reserve = ({ table, identity, waiters, }) => {
|
|
51
|
+
if (table.operations.has(identity.id))
|
|
52
|
+
return Result.succeed(table);
|
|
53
|
+
let next = table;
|
|
54
|
+
if (next.operations.size >= next.capacity) {
|
|
55
|
+
const evictable = [...next.operations.values()].find(settled);
|
|
56
|
+
if (evictable !== undefined)
|
|
57
|
+
next = remove(next, evictable.identity.id);
|
|
58
|
+
}
|
|
59
|
+
if (next.operations.size >= next.capacity)
|
|
60
|
+
return Result.fail(ReactorError.fromCode("Overflow", "H3 clip operation bound reached", {
|
|
61
|
+
operation: "enqueue",
|
|
62
|
+
outcome: "not-submitted",
|
|
63
|
+
}));
|
|
64
|
+
return Result.succeed(put(next, {
|
|
65
|
+
identity,
|
|
66
|
+
waiters,
|
|
67
|
+
acceptance: undefined,
|
|
68
|
+
clipId: undefined,
|
|
69
|
+
generated: undefined,
|
|
70
|
+
started: undefined,
|
|
71
|
+
ended: undefined,
|
|
72
|
+
indeterminate: false,
|
|
73
|
+
rejected: false,
|
|
74
|
+
holders: 0,
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
/** A commit that failed after reserving sent nothing. */
|
|
78
|
+
export const abandon = ({ table, id }) => remove(table, id);
|
|
79
|
+
/** What an operation established resolves its waiters, once its acceptance is decided. */
|
|
80
|
+
const publish = (operation) => {
|
|
81
|
+
if (operation.acceptance === undefined)
|
|
82
|
+
return [];
|
|
83
|
+
const { generated, started, ended, waiters } = operation;
|
|
84
|
+
const effects = [];
|
|
85
|
+
if (generated !== undefined)
|
|
86
|
+
effects.push(succeed(waiters.generated, generated));
|
|
87
|
+
if (started !== undefined)
|
|
88
|
+
effects.push(succeed(waiters.started, started));
|
|
89
|
+
if (ended === undefined)
|
|
90
|
+
return effects;
|
|
91
|
+
if (ended.message === "clip_failed" || ended.message === "clip_popped") {
|
|
92
|
+
const error = ReactorError.make({
|
|
93
|
+
reason: ClipEnded.make({
|
|
94
|
+
message: `clip ended by ${ended.message}`,
|
|
95
|
+
clipId: ended.clipId,
|
|
96
|
+
lifecycle: ended.message,
|
|
97
|
+
transportGeneration: ended.transportGeneration,
|
|
98
|
+
}),
|
|
99
|
+
context: { operation: "clip operation" },
|
|
100
|
+
});
|
|
101
|
+
// A phase that was not reached never will be.
|
|
102
|
+
if (generated === undefined)
|
|
103
|
+
effects.push(fail(waiters.generated, error));
|
|
104
|
+
if (started === undefined)
|
|
105
|
+
effects.push(fail(waiters.started, error));
|
|
106
|
+
}
|
|
107
|
+
effects.push(succeed(waiters.finished, ended));
|
|
108
|
+
return effects;
|
|
109
|
+
};
|
|
110
|
+
/** The enqueue's own result: a definite failure decides the operation without a clip. */
|
|
111
|
+
export const settle = ({ table, id, exit, }) => {
|
|
112
|
+
const operation = table.operations.get(id);
|
|
113
|
+
if (operation === undefined || operation.acceptance !== undefined || Exit.isSuccess(exit))
|
|
114
|
+
return [table, []];
|
|
115
|
+
const error = Exit.findError(exit);
|
|
116
|
+
if (error._tag !== "Success" || !CommandFailure.is(error.success))
|
|
117
|
+
return [table, []];
|
|
118
|
+
const failure = error.success;
|
|
119
|
+
if (failure.context.outcome === "unknown")
|
|
120
|
+
return [table, []];
|
|
121
|
+
// No clip will ever carry this submission, and what a clip showed before the
|
|
122
|
+
// refusal is not its fact.
|
|
123
|
+
const rejected = {
|
|
124
|
+
...operation,
|
|
125
|
+
rejected: true,
|
|
126
|
+
generated: undefined,
|
|
127
|
+
started: undefined,
|
|
128
|
+
ended: undefined,
|
|
129
|
+
};
|
|
130
|
+
const next = put(remove(table, id), { ...rejected, clipId: undefined });
|
|
131
|
+
const { waiters } = operation;
|
|
132
|
+
return [
|
|
133
|
+
next,
|
|
134
|
+
[
|
|
135
|
+
fail(waiters.accepted, failure),
|
|
136
|
+
fail(waiters.generated, failure),
|
|
137
|
+
fail(waiters.started, failure),
|
|
138
|
+
fail(waiters.finished, failure),
|
|
139
|
+
],
|
|
140
|
+
];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Evidence the provider holds until the enqueue's reply decides the
|
|
144
|
+
* acceptance: the clip's facts accrue meanwhile.
|
|
145
|
+
*/
|
|
146
|
+
export const identify = ({ table, acceptance, }) => {
|
|
147
|
+
const operation = table.operations.get(acceptance.submissionId);
|
|
148
|
+
if (operation === undefined || operation.clipId !== undefined || operation.rejected)
|
|
149
|
+
return table;
|
|
150
|
+
return put(table, { ...operation, clipId: acceptance.clip.clip_id });
|
|
151
|
+
};
|
|
152
|
+
/** The acceptance the provider recorded, on the same path that records it. */
|
|
153
|
+
export const accept = ({ table, acceptance, }) => {
|
|
154
|
+
const operation = table.operations.get(acceptance.submissionId);
|
|
155
|
+
if (operation === undefined || operation.acceptance !== undefined)
|
|
156
|
+
return [table, []];
|
|
157
|
+
const accepted = {
|
|
158
|
+
...operation,
|
|
159
|
+
acceptance,
|
|
160
|
+
clipId: operation.clipId ?? acceptance.clip.clip_id,
|
|
161
|
+
};
|
|
162
|
+
return [
|
|
163
|
+
put(table, accepted),
|
|
164
|
+
[succeed(operation.waiters.accepted, acceptance), ...publish(accepted)],
|
|
165
|
+
];
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* A clip carrying a submission's exact prompt and metadata after its pending
|
|
169
|
+
* acceptance expired, or in a later generation. It resolves the operation only.
|
|
170
|
+
*/
|
|
171
|
+
export const lateEvidence = ({ table, id, clip, source, }) => {
|
|
172
|
+
const operation = table.operations.get(id);
|
|
173
|
+
if (operation === undefined ||
|
|
174
|
+
operation.acceptance !== undefined ||
|
|
175
|
+
operation.rejected ||
|
|
176
|
+
operation.identity.metadata !== clip.metadata ||
|
|
177
|
+
operation.identity.prompt !== clip.prompt)
|
|
178
|
+
return [table, []];
|
|
179
|
+
return accept({
|
|
180
|
+
table,
|
|
181
|
+
acceptance: { submissionId: id, clip, evidence: { kind: "metadata", source } },
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
const fact = (clipId, message, source) => ({
|
|
185
|
+
clipId,
|
|
186
|
+
message,
|
|
187
|
+
transportGeneration: source.generation,
|
|
188
|
+
source,
|
|
189
|
+
});
|
|
190
|
+
const advance = (table, clipId, message, source, phase) => {
|
|
191
|
+
const id = table.byClip.get(clipId);
|
|
192
|
+
const operation = id === undefined ? undefined : table.operations.get(id);
|
|
193
|
+
if (operation === undefined || operation.ended !== undefined || operation.indeterminate)
|
|
194
|
+
return [table, []];
|
|
195
|
+
const evidence = fact(clipId, message, source);
|
|
196
|
+
// Started implies generated, and an end that finished or stopped implies both.
|
|
197
|
+
const reachedStart = phase === "started" ||
|
|
198
|
+
(phase === "ended" && (message === "clip_finished" || message === "clip_stopped"));
|
|
199
|
+
const next = {
|
|
200
|
+
...operation,
|
|
201
|
+
generated: operation.generated ?? (phase === "generated" || reachedStart ? evidence : undefined),
|
|
202
|
+
started: operation.started ?? (reachedStart ? evidence : undefined),
|
|
203
|
+
ended: phase === "ended" ? evidence : undefined,
|
|
204
|
+
};
|
|
205
|
+
return [put(table, next), publish(next)];
|
|
206
|
+
};
|
|
207
|
+
/** Advances operations from a message the reducer applied. */
|
|
208
|
+
export const observe = ({ table, message, source, }) => {
|
|
209
|
+
if (table.byClip.size === 0)
|
|
210
|
+
return [table, []];
|
|
211
|
+
switch (message.type) {
|
|
212
|
+
case "queue_update": {
|
|
213
|
+
let next = table;
|
|
214
|
+
const effects = [];
|
|
215
|
+
for (const clip of message.data.playout)
|
|
216
|
+
if (clip.ready) {
|
|
217
|
+
const [after, done] = advance(next, clip.clip_id, "queue_update", source, "generated");
|
|
218
|
+
next = after;
|
|
219
|
+
effects.push(...done);
|
|
220
|
+
}
|
|
221
|
+
return [next, effects];
|
|
222
|
+
}
|
|
223
|
+
case "state_update":
|
|
224
|
+
return message.data.playing_clip_id === null
|
|
225
|
+
? [table, []]
|
|
226
|
+
: advance(table, message.data.playing_clip_id, "state_update", source, "started");
|
|
227
|
+
case "clip_generated":
|
|
228
|
+
return advance(table, message.data.clip.clip_id, message.type, source, "generated");
|
|
229
|
+
case "clip_started":
|
|
230
|
+
return advance(table, message.data.clip.clip_id, message.type, source, "started");
|
|
231
|
+
case "clip_finished":
|
|
232
|
+
case "clip_stopped":
|
|
233
|
+
case "clip_failed":
|
|
234
|
+
case "clip_popped":
|
|
235
|
+
return advance(table, message.data.clip.clip_id, message.type, source, "ended");
|
|
236
|
+
default:
|
|
237
|
+
return [table, []];
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
/** The provider retired: what evidence did not decide is `Indeterminate`. */
|
|
241
|
+
export const retire = (table) => {
|
|
242
|
+
const indeterminate = ReactorError.fromCode("Indeterminate", "H3 provider retired before the clip's evidence", { operation: "clip operation" });
|
|
243
|
+
let next = table;
|
|
244
|
+
const effects = [];
|
|
245
|
+
for (const operation of table.operations.values()) {
|
|
246
|
+
const { waiters } = operation;
|
|
247
|
+
effects.push(fail(waiters.accepted, indeterminate), fail(waiters.generated, indeterminate), fail(waiters.started, indeterminate), fail(waiters.finished, indeterminate));
|
|
248
|
+
next =
|
|
249
|
+
operation.holders === 0
|
|
250
|
+
? remove(next, operation.identity.id)
|
|
251
|
+
: put(next, {
|
|
252
|
+
...operation,
|
|
253
|
+
indeterminate: operation.indeterminate || !settled(operation),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
return [next, effects];
|
|
257
|
+
};
|
|
258
|
+
/** A holder of an operation; releasing the last holder acknowledges it and frees its slot. */
|
|
259
|
+
export const hold = ({ table, id, }) => {
|
|
260
|
+
const operation = table.operations.get(id);
|
|
261
|
+
return operation === undefined
|
|
262
|
+
? Result.fail(ReactorError.fromCode("InvalidState", "H3 has no clip operation for this submission; it has not committed or was released", { operation: "clip operation" }))
|
|
263
|
+
: Result.succeed(put(table, { ...operation, holders: operation.holders + 1 }));
|
|
264
|
+
};
|
|
265
|
+
export const release = ({ table, id }) => {
|
|
266
|
+
const operation = table.operations.get(id);
|
|
267
|
+
if (operation === undefined)
|
|
268
|
+
return table;
|
|
269
|
+
return operation.holders <= 1
|
|
270
|
+
? remove(table, id)
|
|
271
|
+
: put(table, { ...operation, holders: operation.holders - 1 });
|
|
272
|
+
};
|
|
273
|
+
/** A clip's facts are the operation's once its acceptance is decided. */
|
|
274
|
+
export const factsOf = ({ id, operation, }) => operation?.acceptance === undefined
|
|
275
|
+
? { submissionId: id, indeterminate: operation?.indeterminate ?? false }
|
|
276
|
+
: {
|
|
277
|
+
submissionId: id,
|
|
278
|
+
acceptance: operation.acceptance,
|
|
279
|
+
...(operation.generated === undefined ? {} : { generated: operation.generated }),
|
|
280
|
+
...(operation.started === undefined ? {} : { started: operation.started }),
|
|
281
|
+
...(operation.ended === undefined ? {} : { ended: operation.ended }),
|
|
282
|
+
indeterminate: operation.indeterminate,
|
|
283
|
+
};
|
|
284
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/internal/h3/operations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA6EhF,MAAM,CAAC,MAAM,KAAK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AAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;QACpE,aAAa,EAAE,SAAS,CAAC,aAAa;KACvC,CAAC"}
|
|
@@ -2,52 +2,52 @@
|
|
|
2
2
|
export declare const modelName: "reactor/h3-reference-to-video-turbo-realtime";
|
|
3
3
|
export declare const documentedVersion: "0.5.5";
|
|
4
4
|
export declare const source = "https://docs.reactor.inc/model-api-reference/h3-reference-to-video-turbo-realtime/schema";
|
|
5
|
-
export declare const requestSeconds:
|
|
6
|
-
min: 5;
|
|
7
|
-
max: 15.084;
|
|
8
|
-
}
|
|
9
|
-
export declare const canvases:
|
|
10
|
-
"16:9":
|
|
11
|
-
width: 1344;
|
|
12
|
-
height: 768;
|
|
13
|
-
}
|
|
14
|
-
"1:1":
|
|
15
|
-
width: 768;
|
|
16
|
-
height: 768;
|
|
17
|
-
}
|
|
18
|
-
"9:16":
|
|
19
|
-
width: 768;
|
|
20
|
-
height: 1344;
|
|
21
|
-
}
|
|
22
|
-
"4:3":
|
|
23
|
-
width: 1024;
|
|
24
|
-
height: 768;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
5
|
+
export declare const requestSeconds: {
|
|
6
|
+
readonly min: 5;
|
|
7
|
+
readonly max: 15.084;
|
|
8
|
+
};
|
|
9
|
+
export declare const canvases: {
|
|
10
|
+
readonly "16:9": {
|
|
11
|
+
readonly width: 1344;
|
|
12
|
+
readonly height: 768;
|
|
13
|
+
};
|
|
14
|
+
readonly "1:1": {
|
|
15
|
+
readonly width: 768;
|
|
16
|
+
readonly height: 768;
|
|
17
|
+
};
|
|
18
|
+
readonly "9:16": {
|
|
19
|
+
readonly width: 768;
|
|
20
|
+
readonly height: 1344;
|
|
21
|
+
};
|
|
22
|
+
readonly "4:3": {
|
|
23
|
+
readonly width: 1024;
|
|
24
|
+
readonly height: 768;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type CanvasAspect = keyof typeof canvases;
|
|
27
28
|
/** SDK image safety bounds; byte validation does not replace the model's image decoder. */
|
|
28
|
-
export declare const referenceLimits:
|
|
29
|
-
maxImages: 9;
|
|
30
|
-
maxBytes: number;
|
|
31
|
-
maxPixels: 25000000;
|
|
32
|
-
minAspect: 0.25;
|
|
33
|
-
maxAspect: 4;
|
|
34
|
-
}
|
|
29
|
+
export declare const referenceLimits: {
|
|
30
|
+
readonly maxImages: 9;
|
|
31
|
+
readonly maxBytes: number;
|
|
32
|
+
readonly maxPixels: 25000000;
|
|
33
|
+
readonly minAspect: 0.25;
|
|
34
|
+
readonly maxAspect: 4;
|
|
35
|
+
};
|
|
35
36
|
/**
|
|
36
37
|
* H3's audio reference bounds: at most three clips, or two when the clip
|
|
37
38
|
* continues another, whose soundtrack takes the third; at most twelve
|
|
38
39
|
* references in total, counting images, audio and a continuation; each 2–15 s
|
|
39
40
|
* long, mono or stereo, and at most 25 MiB.
|
|
40
41
|
*/
|
|
41
|
-
export declare const audioReferenceLimits:
|
|
42
|
-
maxAudio: 3;
|
|
43
|
-
maxAudioWithContinuation: 2;
|
|
44
|
-
maxTotal: 12;
|
|
45
|
-
maxBytes: number;
|
|
46
|
-
minSeconds: 2;
|
|
47
|
-
maxSeconds: 15;
|
|
48
|
-
maxChannels: 2;
|
|
49
|
-
}
|
|
50
|
-
/** Adapter limits shared by request capture, reference validation and profile declarations. */
|
|
42
|
+
export declare const audioReferenceLimits: {
|
|
43
|
+
readonly maxAudio: 3;
|
|
44
|
+
readonly maxAudioWithContinuation: 2;
|
|
45
|
+
readonly maxTotal: 12;
|
|
46
|
+
readonly maxBytes: number;
|
|
47
|
+
readonly minSeconds: 2;
|
|
48
|
+
readonly maxSeconds: 15;
|
|
49
|
+
readonly maxChannels: 2;
|
|
50
|
+
};
|
|
51
51
|
export declare const metadataMaxChars = 2000;
|
|
52
52
|
export declare const imageMimeTypes: readonly ["image/jpeg", "image/png", "image/webp"];
|
|
53
53
|
/**
|
|
@@ -57,10 +57,7 @@ export declare const imageMimeTypes: readonly ["image/jpeg", "image/png", "image
|
|
|
57
57
|
* may carry any of them.
|
|
58
58
|
*/
|
|
59
59
|
export declare const audioMimeTypes: readonly ["audio/wav", "audio/mpeg", "audio/aac", "audio/mp4", "audio/ogg", "audio/flac", "audio/webm", "audio/x-wav", "audio/wave", "audio/x-m4a", "audio/opus", "audio/x-flac"];
|
|
60
|
-
/** Shared H3 timing data and explicit defaults used by offline orchestration. */
|
|
61
|
-
export type CanvasAspect = keyof typeof canvases;
|
|
62
60
|
export interface ModelProfile {
|
|
63
|
-
/** Wire model name passed to the SDK. */
|
|
64
61
|
readonly modelName: string;
|
|
65
62
|
readonly fps: number;
|
|
66
63
|
/** Legal output lengths are `minFrames + k * frameStep`, `k >= 0`, up to `maxFrames`. */
|
|
@@ -74,9 +71,9 @@ export interface ModelProfile {
|
|
|
74
71
|
};
|
|
75
72
|
readonly prompt: {
|
|
76
73
|
readonly maxChars: number;
|
|
77
|
-
/**
|
|
74
|
+
/** The provider's text budget; its tokenizer, not this estimate, is authoritative. */
|
|
78
75
|
readonly maxTokens: number;
|
|
79
|
-
/** Conservative characters
|
|
76
|
+
/** Conservative characters per token for a local estimate. */
|
|
80
77
|
readonly charsPerTokenEstimate: number;
|
|
81
78
|
};
|
|
82
79
|
readonly references: {
|
|
@@ -89,10 +86,7 @@ export interface ModelProfile {
|
|
|
89
86
|
readonly maxAspect: number;
|
|
90
87
|
readonly mimeTypes: ReadonlyArray<string>;
|
|
91
88
|
};
|
|
92
|
-
/**
|
|
93
|
-
* Audio references the model takes beside its images; absent for a model
|
|
94
|
-
* that takes none, whose requests must carry no audio.
|
|
95
|
-
*/
|
|
89
|
+
/** Audio references the model takes beside its images; absent for a model that takes none. */
|
|
96
90
|
readonly audioReferences?: {
|
|
97
91
|
readonly max: number;
|
|
98
92
|
/** A continued clip spends one audio slot on the previous clip's soundtrack. */
|
|
@@ -110,12 +104,12 @@ export interface ModelProfile {
|
|
|
110
104
|
readonly width: number;
|
|
111
105
|
readonly height: number;
|
|
112
106
|
}>;
|
|
113
|
-
/**
|
|
107
|
+
/** The queue capacities H3 documents; live state snapshots are authoritative. */
|
|
114
108
|
readonly expectedCapacities: {
|
|
115
109
|
readonly generation: number;
|
|
116
110
|
readonly playout: number;
|
|
117
111
|
};
|
|
118
|
-
/**
|
|
112
|
+
/** How many recent clips orchestration offers as continuations. */
|
|
119
113
|
readonly continuationWindow: number;
|
|
120
114
|
readonly audio: {
|
|
121
115
|
readonly sampleRate: number;
|
|
@@ -127,20 +121,24 @@ export interface ModelProfile {
|
|
|
127
121
|
};
|
|
128
122
|
}
|
|
129
123
|
export declare const h3ReferenceTurboRealtime: ModelProfile;
|
|
130
|
-
export declare const minSeconds: (
|
|
131
|
-
export declare const maxSeconds: (
|
|
132
|
-
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
export declare const
|
|
124
|
+
export declare const minSeconds: (profile: ModelProfile) => number;
|
|
125
|
+
export declare const maxSeconds: (profile: ModelProfile) => number;
|
|
126
|
+
/**
|
|
127
|
+
* The frame count a request of `seconds` produces: rounded up onto the
|
|
128
|
+
* profile's frame grid. A clip's own `frames` and `seconds` are authoritative.
|
|
129
|
+
*/
|
|
130
|
+
export declare const alignFrames: {
|
|
131
|
+
(seconds: number): (profile: ModelProfile) => number;
|
|
132
|
+
(profile: ModelProfile, seconds: number): number;
|
|
133
|
+
};
|
|
137
134
|
/** True when `seconds` is a length the provider accepts as a request. */
|
|
138
|
-
export declare const isRequestableSeconds:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
135
|
+
export declare const isRequestableSeconds: {
|
|
136
|
+
(seconds: number): (profile: ModelProfile) => boolean;
|
|
137
|
+
(profile: ModelProfile, seconds: number): boolean;
|
|
138
|
+
};
|
|
139
|
+
/** An advisory token estimate for budgeting; the provider's tokenizer decides. */
|
|
140
|
+
export declare const estimateTokens: {
|
|
141
|
+
(prompt: string): (profile: ModelProfile) => number;
|
|
142
|
+
(profile: ModelProfile, prompt: string): number;
|
|
143
|
+
};
|
|
146
144
|
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/internal/h3/profile.ts"],"names":[],"mappings":"AAGA,gGAAgG;AAChG,eAAO,MAAM,SAAS,EAAG,8CAAuD,CAAC;AACjF,eAAO,MAAM,iBAAiB,EAAG,OAAgB,CAAC;AAClD,eAAO,MAAM,MAAM,6FACyE,CAAC;AAC7F,eAAO,MAAM,cAAc;aAAK,GAAG,EAAE,CAAC;aAAE,GAAG,EAAE,MAAM;CAAW,CAAC;AAC/D,eAAO,MAAM,QAAQ;aACnB,MAAM;iBAAI,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;aAClC,KAAK;iBAAI,KAAK,EAAE,GAAG;iBAAE,MAAM,EAAE,GAAG;;aAChC,MAAM;iBAAI,KAAK,EAAE,GAAG;iBAAE,MAAM,EAAE,IAAI;;aAClC,KAAK;iBAAI,KAAK,EAAE,IAAI;iBAAE,MAAM,EAAE,GAAG;;CACzB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC;AAEjD,2FAA2F;AAC3F,eAAO,MAAM,eAAe;aAC1B,SAAS,EAAE,CAAC;aACZ,QAAQ;aACR,SAAS,EAAE,QAAU;aACrB,SAAS,EAAE,IAAI;aACf,SAAS,EAAE,CAAC;CACJ,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;aAC/B,QAAQ,EAAE,CAAC;aACX,wBAAwB,EAAE,CAAC;aAC3B,QAAQ,EAAE,EAAE;aACZ,QAAQ;aACR,UAAU,EAAE,CAAC;aACb,UAAU,EAAE,EAAE;aACd,WAAW,EAAE,CAAC;CACN,CAAC;AAEX,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AACtC,eAAO,MAAM,cAAc,YAAI,YAAY,EAAE,WAAW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O,MAAM,UAAU,YAAa,YAAY,KAAG,MAAyC,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE;IACxB,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,MAAM,CAAC;IACrD,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAKjD,CAAC;AAEH,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,EAAE;IACjC,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC;IACtD,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAOnD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,cAAc,EAAE;IAC3B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,MAAM,CAAC;IACpD,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAGjD,CAAC"}
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
+
/** The H3 Reference Turbo Realtime model: its documented limits and frame grid. */
|
|
2
|
+
import { dual } from "effect/Function";
|
|
1
3
|
/** Documentation revision selected by this adapter, not an assertion about a server version. */
|
|
2
4
|
export const modelName = "reactor/h3-reference-to-video-turbo-realtime";
|
|
3
5
|
export const documentedVersion = "0.5.5";
|
|
4
6
|
export const source = "https://docs.reactor.inc/model-api-reference/h3-reference-to-video-turbo-realtime/schema";
|
|
5
|
-
export const requestSeconds =
|
|
6
|
-
export const canvases =
|
|
7
|
-
"16:9":
|
|
8
|
-
"1:1":
|
|
9
|
-
"9:16":
|
|
10
|
-
"4:3":
|
|
11
|
-
}
|
|
7
|
+
export const requestSeconds = { min: 5, max: 15.084 };
|
|
8
|
+
export const canvases = {
|
|
9
|
+
"16:9": { width: 1344, height: 768 },
|
|
10
|
+
"1:1": { width: 768, height: 768 },
|
|
11
|
+
"9:16": { width: 768, height: 1344 },
|
|
12
|
+
"4:3": { width: 1024, height: 768 },
|
|
13
|
+
};
|
|
12
14
|
/** SDK image safety bounds; byte validation does not replace the model's image decoder. */
|
|
13
|
-
export const referenceLimits =
|
|
15
|
+
export const referenceLimits = {
|
|
14
16
|
maxImages: 9,
|
|
15
17
|
maxBytes: 25 * 1024 * 1024,
|
|
16
18
|
maxPixels: 25_000_000,
|
|
17
19
|
minAspect: 0.25,
|
|
18
20
|
maxAspect: 4,
|
|
19
|
-
}
|
|
21
|
+
};
|
|
20
22
|
/**
|
|
21
23
|
* H3's audio reference bounds: at most three clips, or two when the clip
|
|
22
24
|
* continues another, whose soundtrack takes the third; at most twelve
|
|
23
25
|
* references in total, counting images, audio and a continuation; each 2–15 s
|
|
24
26
|
* long, mono or stereo, and at most 25 MiB.
|
|
25
27
|
*/
|
|
26
|
-
export const audioReferenceLimits =
|
|
28
|
+
export const audioReferenceLimits = {
|
|
27
29
|
maxAudio: 3,
|
|
28
30
|
maxAudioWithContinuation: 2,
|
|
29
31
|
maxTotal: 12,
|
|
@@ -31,17 +33,16 @@ export const audioReferenceLimits = Object.freeze({
|
|
|
31
33
|
minSeconds: 2,
|
|
32
34
|
maxSeconds: 15,
|
|
33
35
|
maxChannels: 2,
|
|
34
|
-
}
|
|
35
|
-
/** Adapter limits shared by request capture, reference validation and profile declarations. */
|
|
36
|
+
};
|
|
36
37
|
export const metadataMaxChars = 2_000;
|
|
37
|
-
export const imageMimeTypes =
|
|
38
|
+
export const imageMimeTypes = ["image/jpeg", "image/png", "image/webp"];
|
|
38
39
|
/**
|
|
39
40
|
* The audio formats H3 documents (WAV, MP3, AAC/M4A, OGG/Opus, FLAC and WebM),
|
|
40
41
|
* by the MIME type an upload of each carries. Bytes are identified by their
|
|
41
42
|
* container, which names the first type of each format; an existing upload
|
|
42
43
|
* may carry any of them.
|
|
43
44
|
*/
|
|
44
|
-
export const audioMimeTypes =
|
|
45
|
+
export const audioMimeTypes = [
|
|
45
46
|
"audio/wav",
|
|
46
47
|
"audio/mpeg",
|
|
47
48
|
"audio/aac",
|
|
@@ -54,7 +55,7 @@ export const audioMimeTypes = Object.freeze([
|
|
|
54
55
|
"audio/x-m4a",
|
|
55
56
|
"audio/opus",
|
|
56
57
|
"audio/x-flac",
|
|
57
|
-
]
|
|
58
|
+
];
|
|
58
59
|
export const h3ReferenceTurboRealtime = {
|
|
59
60
|
modelName,
|
|
60
61
|
fps: 24,
|
|
@@ -62,8 +63,8 @@ export const h3ReferenceTurboRealtime = {
|
|
|
62
63
|
maxFrames: 362,
|
|
63
64
|
frameStep: 17,
|
|
64
65
|
requestSeconds,
|
|
65
|
-
//
|
|
66
|
-
//
|
|
66
|
+
// The provider sets no character limit; its budget is about 2,000 tokens, and
|
|
67
|
+
// a longer prompt fails the clip at build. maxChars is this SDK's own bound.
|
|
67
68
|
prompt: { maxChars: 12_000, maxTokens: 2_000, charsPerTokenEstimate: 3.5 },
|
|
68
69
|
references: {
|
|
69
70
|
min: 0,
|
|
@@ -72,7 +73,7 @@ export const h3ReferenceTurboRealtime = {
|
|
|
72
73
|
maxPixels: referenceLimits.maxPixels,
|
|
73
74
|
minAspect: referenceLimits.minAspect,
|
|
74
75
|
maxAspect: referenceLimits.maxAspect,
|
|
75
|
-
mimeTypes:
|
|
76
|
+
mimeTypes: imageMimeTypes,
|
|
76
77
|
},
|
|
77
78
|
audioReferences: {
|
|
78
79
|
max: audioReferenceLimits.maxAudio,
|
|
@@ -81,34 +82,33 @@ export const h3ReferenceTurboRealtime = {
|
|
|
81
82
|
maxBytes: audioReferenceLimits.maxBytes,
|
|
82
83
|
minSeconds: audioReferenceLimits.minSeconds,
|
|
83
84
|
maxSeconds: audioReferenceLimits.maxSeconds,
|
|
84
|
-
mimeTypes:
|
|
85
|
+
mimeTypes: audioMimeTypes,
|
|
85
86
|
},
|
|
86
87
|
metadataMaxChars,
|
|
87
|
-
canvases:
|
|
88
|
-
aspect
|
|
89
|
-
...
|
|
88
|
+
canvases: ["16:9", "1:1", "9:16", "4:3"].map((aspect) => ({
|
|
89
|
+
aspect,
|
|
90
|
+
...canvases[aspect],
|
|
90
91
|
})),
|
|
91
92
|
expectedCapacities: { generation: 20, playout: 10 },
|
|
92
93
|
continuationWindow: 8,
|
|
93
94
|
audio: { sampleRate: 48_000, channels: 1 },
|
|
94
95
|
tracks: { video: "main_video", audio: "main_audio" },
|
|
95
96
|
};
|
|
96
|
-
export const minSeconds = (
|
|
97
|
-
export const maxSeconds = (
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/** Clamp into the accepted request range, then align. Always yields a length the provider accepts. */
|
|
108
|
-
export const clampSecondsTo = (p, seconds) => alignSecondsTo(p, Math.min(p.requestSeconds.max, Math.max(p.requestSeconds.min, Number.isFinite(seconds) ? seconds : p.requestSeconds.min)));
|
|
97
|
+
export const minSeconds = (profile) => profile.minFrames / profile.fps;
|
|
98
|
+
export const maxSeconds = (profile) => profile.maxFrames / profile.fps;
|
|
99
|
+
/**
|
|
100
|
+
* The frame count a request of `seconds` produces: rounded up onto the
|
|
101
|
+
* profile's frame grid. A clip's own `frames` and `seconds` are authoritative.
|
|
102
|
+
*/
|
|
103
|
+
export const alignFrames = dual(2, (profile, seconds) => {
|
|
104
|
+
const frames = Number.isFinite(seconds) ? Math.ceil(seconds * profile.fps - 1e-6) : 0;
|
|
105
|
+
const steps = Math.ceil(Math.max(0, frames - profile.minFrames) / profile.frameStep);
|
|
106
|
+
return Math.min(profile.maxFrames, profile.minFrames + steps * profile.frameStep);
|
|
107
|
+
});
|
|
109
108
|
/** True when `seconds` is a length the provider accepts as a request. */
|
|
110
|
-
export const isRequestableSeconds = (
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
export const isRequestableSeconds = dual(2, (profile, seconds) => Number.isFinite(seconds) &&
|
|
110
|
+
seconds >= profile.requestSeconds.min &&
|
|
111
|
+
seconds <= profile.requestSeconds.max);
|
|
112
|
+
/** An advisory token estimate for budgeting; the provider's tokenizer decides. */
|
|
113
|
+
export const estimateTokens = dual(2, (profile, prompt) => Math.ceil(prompt.length / profile.prompt.charsPerTokenEstimate));
|
|
114
114
|
//# sourceMappingURL=profile.js.map
|