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.
Files changed (514) hide show
  1. package/NOTICE +7 -2
  2. package/README.md +103 -141
  3. package/dist/Coordinator.d.ts +382 -0
  4. package/dist/Coordinator.d.ts.map +1 -0
  5. package/dist/Coordinator.js +732 -0
  6. package/dist/Coordinator.js.map +1 -0
  7. package/dist/H3.d.ts +159 -0
  8. package/dist/H3.d.ts.map +1 -0
  9. package/dist/H3.js +21 -0
  10. package/dist/H3.js.map +1 -0
  11. package/dist/H3Source.d.ts +93 -0
  12. package/dist/H3Source.d.ts.map +1 -0
  13. package/dist/H3Source.js +401 -0
  14. package/dist/H3Source.js.map +1 -0
  15. package/dist/LocalSource.d.ts +68 -0
  16. package/dist/LocalSource.d.ts.map +1 -0
  17. package/dist/LocalSource.js +354 -0
  18. package/dist/LocalSource.js.map +1 -0
  19. package/dist/Media.d.ts +106 -0
  20. package/dist/Media.d.ts.map +1 -0
  21. package/dist/Media.js +16 -0
  22. package/dist/Media.js.map +1 -0
  23. package/dist/Peer.d.ts +134 -0
  24. package/dist/Peer.d.ts.map +1 -0
  25. package/dist/Peer.js +57 -0
  26. package/dist/Peer.js.map +1 -0
  27. package/dist/Playout.d.ts +724 -0
  28. package/dist/Playout.d.ts.map +1 -0
  29. package/dist/Playout.js +28 -0
  30. package/dist/Playout.js.map +1 -0
  31. package/dist/Reactor.d.ts +135 -0
  32. package/dist/Reactor.d.ts.map +1 -0
  33. package/dist/Reactor.js +158 -0
  34. package/dist/Reactor.js.map +1 -0
  35. package/dist/ReactorError.d.ts +331 -0
  36. package/dist/ReactorError.d.ts.map +1 -0
  37. package/dist/ReactorError.js +316 -0
  38. package/dist/ReactorError.js.map +1 -0
  39. package/dist/ReactorTest.d.ts +383 -0
  40. package/dist/ReactorTest.d.ts.map +1 -0
  41. package/dist/ReactorTest.js +317 -0
  42. package/dist/ReactorTest.js.map +1 -0
  43. package/dist/Session.d.ts +314 -0
  44. package/dist/Session.d.ts.map +1 -0
  45. package/dist/Session.js +51 -0
  46. package/dist/Session.js.map +1 -0
  47. package/dist/index.d.ts +12 -22
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +12 -11
  50. package/dist/index.js.map +1 -1
  51. package/dist/internal/correlator.d.ts +46 -0
  52. package/dist/internal/correlator.d.ts.map +1 -0
  53. package/dist/internal/correlator.js +150 -0
  54. package/dist/internal/correlator.js.map +1 -0
  55. package/dist/internal/deadline.d.ts +24 -0
  56. package/dist/internal/deadline.d.ts.map +1 -0
  57. package/dist/internal/deadline.js +44 -0
  58. package/dist/internal/deadline.js.map +1 -0
  59. package/dist/{h3/_internal/contracts.d.ts → internal/h3/commands.d.ts} +39 -33
  60. package/dist/internal/h3/commands.d.ts.map +1 -0
  61. package/dist/internal/h3/commands.js +128 -0
  62. package/dist/internal/h3/commands.js.map +1 -0
  63. package/dist/{h3 → internal/h3}/messages.d.ts +16 -11
  64. package/dist/internal/h3/messages.d.ts.map +1 -0
  65. package/dist/{h3 → internal/h3}/messages.js +19 -31
  66. package/dist/internal/h3/messages.js.map +1 -0
  67. package/dist/internal/h3/operations.d.ts +145 -0
  68. package/dist/internal/h3/operations.d.ts.map +1 -0
  69. package/dist/internal/h3/operations.js +284 -0
  70. package/dist/internal/h3/operations.js.map +1 -0
  71. package/dist/{h3 → internal/h3}/profile.d.ts +63 -65
  72. package/dist/internal/h3/profile.d.ts.map +1 -0
  73. package/dist/{h3 → internal/h3}/profile.js +39 -39
  74. package/dist/internal/h3/profile.js.map +1 -0
  75. package/dist/internal/h3/provider.d.ts +14 -0
  76. package/dist/internal/h3/provider.d.ts.map +1 -0
  77. package/dist/internal/h3/provider.js +672 -0
  78. package/dist/internal/h3/provider.js.map +1 -0
  79. package/dist/internal/h3/references.d.ts +68 -0
  80. package/dist/internal/h3/references.d.ts.map +1 -0
  81. package/dist/internal/h3/references.js +339 -0
  82. package/dist/internal/h3/references.js.map +1 -0
  83. package/dist/internal/h3/request.d.ts +56 -0
  84. package/dist/internal/h3/request.d.ts.map +1 -0
  85. package/dist/internal/h3/request.js +70 -0
  86. package/dist/internal/h3/request.js.map +1 -0
  87. package/dist/internal/h3/state.d.ts +120 -0
  88. package/dist/internal/h3/state.d.ts.map +1 -0
  89. package/dist/internal/h3/state.js +270 -0
  90. package/dist/internal/h3/state.js.map +1 -0
  91. package/dist/{Submission.d.ts → internal/h3/submission.d.ts} +1 -3
  92. package/dist/internal/h3/submission.d.ts.map +1 -0
  93. package/dist/{Submission.js → internal/h3/submission.js} +1 -9
  94. package/dist/internal/h3/submission.js.map +1 -0
  95. package/dist/internal/hub.d.ts +32 -0
  96. package/dist/internal/hub.d.ts.map +1 -0
  97. package/dist/internal/hub.js +92 -0
  98. package/dist/internal/hub.js.map +1 -0
  99. package/dist/internal/playout/errors.d.ts +51 -0
  100. package/dist/internal/playout/errors.d.ts.map +1 -0
  101. package/dist/internal/playout/errors.js +40 -0
  102. package/dist/internal/playout/errors.js.map +1 -0
  103. package/dist/internal/playout/policy.d.ts +559 -0
  104. package/dist/internal/playout/policy.d.ts.map +1 -0
  105. package/dist/internal/playout/policy.js +2338 -0
  106. package/dist/internal/playout/policy.js.map +1 -0
  107. package/dist/internal/playout/runtime.d.ts +28 -0
  108. package/dist/internal/playout/runtime.d.ts.map +1 -0
  109. package/dist/internal/playout/runtime.js +766 -0
  110. package/dist/internal/playout/runtime.js.map +1 -0
  111. package/dist/internal/playout/tag.d.ts +14 -0
  112. package/dist/internal/playout/tag.d.ts.map +1 -0
  113. package/dist/internal/playout/tag.js +43 -0
  114. package/dist/internal/playout/tag.js.map +1 -0
  115. package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts +55 -0
  116. package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts.map +1 -0
  117. package/dist/internal/proto/reactor_wire/v1/common_pb.js +42 -0
  118. package/dist/internal/proto/reactor_wire/v1/common_pb.js.map +1 -0
  119. package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts +160 -0
  120. package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts.map +1 -0
  121. package/dist/internal/proto/reactor_wire/v1/control_pb.js +21 -0
  122. package/dist/internal/proto/reactor_wire/v1/control_pb.js.map +1 -0
  123. package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts +89 -0
  124. package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts.map +1 -0
  125. package/dist/internal/proto/reactor_wire/v1/data_pb.js +20 -0
  126. package/dist/internal/proto/reactor_wire/v1/data_pb.js.map +1 -0
  127. package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts +85 -0
  128. package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts.map +1 -0
  129. package/dist/internal/proto/reactor_wire/v1/model_pb.js +24 -0
  130. package/dist/internal/proto/reactor_wire/v1/model_pb.js.map +1 -0
  131. package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts +190 -0
  132. package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts.map +1 -0
  133. package/dist/internal/proto/reactor_wire/v1/platform_pb.js +54 -0
  134. package/dist/internal/proto/reactor_wire/v1/platform_pb.js.map +1 -0
  135. package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts +88 -0
  136. package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts.map +1 -0
  137. package/dist/internal/proto/reactor_wire/v1/track_pb.js +33 -0
  138. package/dist/internal/proto/reactor_wire/v1/track_pb.js.map +1 -0
  139. package/dist/internal/queue.d.ts +4 -0
  140. package/dist/internal/queue.d.ts.map +1 -0
  141. package/dist/{_internal → internal}/queue.js +0 -9
  142. package/dist/internal/queue.js.map +1 -0
  143. package/dist/internal/reactorTest/coordinator.d.ts +5 -0
  144. package/dist/internal/reactorTest/coordinator.d.ts.map +1 -0
  145. package/dist/internal/reactorTest/coordinator.js +178 -0
  146. package/dist/internal/reactorTest/coordinator.js.map +1 -0
  147. package/dist/internal/reactorTest/faults.d.ts +172 -0
  148. package/dist/internal/reactorTest/faults.d.ts.map +1 -0
  149. package/dist/internal/reactorTest/faults.js +23 -0
  150. package/dist/internal/reactorTest/faults.js.map +1 -0
  151. package/dist/internal/reactorTest/h3.d.ts +431 -0
  152. package/dist/internal/reactorTest/h3.d.ts.map +1 -0
  153. package/dist/internal/reactorTest/h3.js +625 -0
  154. package/dist/internal/reactorTest/h3.js.map +1 -0
  155. package/dist/internal/reactorTest/media.d.ts +22 -0
  156. package/dist/internal/reactorTest/media.d.ts.map +1 -0
  157. package/dist/internal/reactorTest/media.js +34 -0
  158. package/dist/internal/reactorTest/media.js.map +1 -0
  159. package/dist/internal/reactorTest/peer.d.ts +318 -0
  160. package/dist/internal/reactorTest/peer.d.ts.map +1 -0
  161. package/dist/internal/reactorTest/peer.js +206 -0
  162. package/dist/internal/reactorTest/peer.js.map +1 -0
  163. package/dist/internal/reactorTest/playout.d.ts +34 -0
  164. package/dist/internal/reactorTest/playout.d.ts.map +1 -0
  165. package/dist/internal/reactorTest/playout.js +340 -0
  166. package/dist/internal/reactorTest/playout.js.map +1 -0
  167. package/dist/internal/reactorTest/references.d.ts +25 -0
  168. package/dist/internal/reactorTest/references.d.ts.map +1 -0
  169. package/dist/{testing/Png.js → internal/reactorTest/references.js} +50 -12
  170. package/dist/internal/reactorTest/references.js.map +1 -0
  171. package/dist/internal/reactorTest/sessions.d.ts +364 -0
  172. package/dist/internal/reactorTest/sessions.d.ts.map +1 -0
  173. package/dist/internal/reactorTest/sessions.js +592 -0
  174. package/dist/internal/reactorTest/sessions.js.map +1 -0
  175. package/dist/internal/reactorTest/timing.d.ts +13 -0
  176. package/dist/internal/reactorTest/timing.d.ts.map +1 -0
  177. package/dist/internal/reactorTest/timing.js +20 -0
  178. package/dist/internal/reactorTest/timing.js.map +1 -0
  179. package/dist/internal/recording.d.ts +52 -0
  180. package/dist/internal/recording.d.ts.map +1 -0
  181. package/dist/internal/recording.js +141 -0
  182. package/dist/internal/recording.js.map +1 -0
  183. package/dist/internal/session/connect.d.ts +34 -0
  184. package/dist/internal/session/connect.d.ts.map +1 -0
  185. package/dist/internal/session/connect.js +502 -0
  186. package/dist/internal/session/connect.js.map +1 -0
  187. package/dist/internal/session/generation.d.ts +35 -0
  188. package/dist/internal/session/generation.d.ts.map +1 -0
  189. package/dist/internal/session/generation.js +185 -0
  190. package/dist/internal/session/generation.js.map +1 -0
  191. package/dist/internal/session/ice.d.ts +23 -0
  192. package/dist/internal/session/ice.d.ts.map +1 -0
  193. package/dist/internal/session/ice.js +57 -0
  194. package/dist/internal/session/ice.js.map +1 -0
  195. package/dist/internal/session/inbound.d.ts +50 -0
  196. package/dist/internal/session/inbound.d.ts.map +1 -0
  197. package/dist/internal/session/inbound.js +202 -0
  198. package/dist/internal/session/inbound.js.map +1 -0
  199. package/dist/internal/session/model.d.ts +163 -0
  200. package/dist/internal/session/model.d.ts.map +1 -0
  201. package/dist/internal/session/model.js +78 -0
  202. package/dist/internal/session/model.js.map +1 -0
  203. package/dist/internal/session/requests.d.ts +71 -0
  204. package/dist/internal/session/requests.d.ts.map +1 -0
  205. package/dist/internal/session/requests.js +240 -0
  206. package/dist/internal/session/requests.js.map +1 -0
  207. package/dist/internal/session/tracks.d.ts +21 -0
  208. package/dist/internal/session/tracks.d.ts.map +1 -0
  209. package/dist/internal/session/tracks.js +166 -0
  210. package/dist/internal/session/tracks.js.map +1 -0
  211. package/dist/internal/session/upload.d.ts +21 -0
  212. package/dist/internal/session/upload.d.ts.map +1 -0
  213. package/dist/internal/session/upload.js +68 -0
  214. package/dist/internal/session/upload.js.map +1 -0
  215. package/dist/internal/session.d.ts +66 -0
  216. package/dist/internal/session.d.ts.map +1 -0
  217. package/dist/internal/session.js +280 -0
  218. package/dist/internal/session.js.map +1 -0
  219. package/dist/{stats.d.ts → internal/stats.d.ts} +30 -16
  220. package/dist/internal/stats.d.ts.map +1 -0
  221. package/dist/internal/stats.js +201 -0
  222. package/dist/internal/stats.js.map +1 -0
  223. package/dist/internal/token.d.ts +22 -0
  224. package/dist/internal/token.d.ts.map +1 -0
  225. package/dist/internal/token.js +65 -0
  226. package/dist/internal/token.js.map +1 -0
  227. package/dist/internal/wire.d.ts +37 -0
  228. package/dist/internal/wire.d.ts.map +1 -0
  229. package/dist/internal/wire.js +49 -0
  230. package/dist/internal/wire.js.map +1 -0
  231. package/notices/bufbuild-protobuf-LICENSE +201 -0
  232. package/package.json +17 -38
  233. package/dist/FetchHttp.d.ts +0 -9
  234. package/dist/FetchHttp.d.ts.map +0 -1
  235. package/dist/FetchHttp.js +0 -63
  236. package/dist/FetchHttp.js.map +0 -1
  237. package/dist/PeerFactory.d.ts +0 -26
  238. package/dist/PeerFactory.d.ts.map +0 -1
  239. package/dist/PeerFactory.js +0 -4
  240. package/dist/PeerFactory.js.map +0 -1
  241. package/dist/PeerTypes.d.ts +0 -64
  242. package/dist/PeerTypes.d.ts.map +0 -1
  243. package/dist/PeerTypes.js +0 -2
  244. package/dist/PeerTypes.js.map +0 -1
  245. package/dist/Sequence.d.ts +0 -85
  246. package/dist/Sequence.d.ts.map +0 -1
  247. package/dist/Sequence.js +0 -210
  248. package/dist/Sequence.js.map +0 -1
  249. package/dist/SessionTypes.d.ts +0 -312
  250. package/dist/SessionTypes.d.ts.map +0 -1
  251. package/dist/SessionTypes.js +0 -19
  252. package/dist/SessionTypes.js.map +0 -1
  253. package/dist/Submission.d.ts.map +0 -1
  254. package/dist/Submission.js.map +0 -1
  255. package/dist/_internal/queue.d.ts +0 -6
  256. package/dist/_internal/queue.d.ts.map +0 -1
  257. package/dist/_internal/queue.js.map +0 -1
  258. package/dist/bytes.d.ts +0 -6
  259. package/dist/bytes.d.ts.map +0 -1
  260. package/dist/bytes.js +0 -32
  261. package/dist/bytes.js.map +0 -1
  262. package/dist/contract.d.ts +0 -149
  263. package/dist/contract.d.ts.map +0 -1
  264. package/dist/contract.js +0 -119
  265. package/dist/contract.js.map +0 -1
  266. package/dist/coordinator/_internal/client.d.ts +0 -215
  267. package/dist/coordinator/_internal/client.d.ts.map +0 -1
  268. package/dist/coordinator/_internal/client.js +0 -563
  269. package/dist/coordinator/_internal/client.js.map +0 -1
  270. package/dist/coordinator/_internal/recording.d.ts +0 -31
  271. package/dist/coordinator/_internal/recording.d.ts.map +0 -1
  272. package/dist/coordinator/_internal/recording.js +0 -123
  273. package/dist/coordinator/_internal/recording.js.map +0 -1
  274. package/dist/coordinator/_internal/response.d.ts +0 -15
  275. package/dist/coordinator/_internal/response.d.ts.map +0 -1
  276. package/dist/coordinator/_internal/response.js +0 -55
  277. package/dist/coordinator/_internal/response.js.map +0 -1
  278. package/dist/coordinator/_internal/schemas.d.ts +0 -73
  279. package/dist/coordinator/_internal/schemas.d.ts.map +0 -1
  280. package/dist/coordinator/_internal/schemas.js +0 -200
  281. package/dist/coordinator/_internal/schemas.js.map +0 -1
  282. package/dist/coordinator/index.d.ts +0 -40
  283. package/dist/coordinator/index.d.ts.map +0 -1
  284. package/dist/coordinator/index.js +0 -21
  285. package/dist/coordinator/index.js.map +0 -1
  286. package/dist/correlation.d.ts +0 -47
  287. package/dist/correlation.d.ts.map +0 -1
  288. package/dist/correlation.js +0 -131
  289. package/dist/correlation.js.map +0 -1
  290. package/dist/duration.d.ts +0 -27
  291. package/dist/duration.d.ts.map +0 -1
  292. package/dist/duration.js +0 -47
  293. package/dist/duration.js.map +0 -1
  294. package/dist/errors.d.ts +0 -1303
  295. package/dist/errors.d.ts.map +0 -1
  296. package/dist/errors.js +0 -745
  297. package/dist/errors.js.map +0 -1
  298. package/dist/h3/_internal/client.d.ts +0 -9
  299. package/dist/h3/_internal/client.d.ts.map +0 -1
  300. package/dist/h3/_internal/client.js +0 -652
  301. package/dist/h3/_internal/client.js.map +0 -1
  302. package/dist/h3/_internal/contracts.d.ts.map +0 -1
  303. package/dist/h3/_internal/contracts.js +0 -123
  304. package/dist/h3/_internal/contracts.js.map +0 -1
  305. package/dist/h3/_internal/deployment.d.ts +0 -8
  306. package/dist/h3/_internal/deployment.d.ts.map +0 -1
  307. package/dist/h3/_internal/deployment.js +0 -149
  308. package/dist/h3/_internal/deployment.js.map +0 -1
  309. package/dist/h3/_internal/evidence.d.ts +0 -17
  310. package/dist/h3/_internal/evidence.d.ts.map +0 -1
  311. package/dist/h3/_internal/evidence.js +0 -48
  312. package/dist/h3/_internal/evidence.js.map +0 -1
  313. package/dist/h3/_internal/operations.d.ts +0 -58
  314. package/dist/h3/_internal/operations.d.ts.map +0 -1
  315. package/dist/h3/_internal/operations.js +0 -268
  316. package/dist/h3/_internal/operations.js.map +0 -1
  317. package/dist/h3/_internal/references.d.ts +0 -24
  318. package/dist/h3/_internal/references.d.ts.map +0 -1
  319. package/dist/h3/_internal/references.js +0 -309
  320. package/dist/h3/_internal/references.js.map +0 -1
  321. package/dist/h3/_internal/request.d.ts +0 -21
  322. package/dist/h3/_internal/request.d.ts.map +0 -1
  323. package/dist/h3/_internal/request.js +0 -97
  324. package/dist/h3/_internal/request.js.map +0 -1
  325. package/dist/h3/_internal/retained.d.ts +0 -22
  326. package/dist/h3/_internal/retained.d.ts.map +0 -1
  327. package/dist/h3/_internal/retained.js +0 -89
  328. package/dist/h3/_internal/retained.js.map +0 -1
  329. package/dist/h3/_internal/state.d.ts +0 -44
  330. package/dist/h3/_internal/state.d.ts.map +0 -1
  331. package/dist/h3/_internal/state.js +0 -283
  332. package/dist/h3/_internal/state.js.map +0 -1
  333. package/dist/h3/index.d.ts +0 -10
  334. package/dist/h3/index.d.ts.map +0 -1
  335. package/dist/h3/index.js +0 -7
  336. package/dist/h3/index.js.map +0 -1
  337. package/dist/h3/messages.d.ts.map +0 -1
  338. package/dist/h3/messages.js.map +0 -1
  339. package/dist/h3/profile.d.ts.map +0 -1
  340. package/dist/h3/profile.js.map +0 -1
  341. package/dist/h3/types.d.ts +0 -291
  342. package/dist/h3/types.d.ts.map +0 -1
  343. package/dist/h3/types.js +0 -2
  344. package/dist/h3/types.js.map +0 -1
  345. package/dist/host.d.ts +0 -26
  346. package/dist/host.d.ts.map +0 -1
  347. package/dist/host.js +0 -20
  348. package/dist/host.js.map +0 -1
  349. package/dist/json.d.ts +0 -25
  350. package/dist/json.d.ts.map +0 -1
  351. package/dist/json.js +0 -143
  352. package/dist/json.js.map +0 -1
  353. package/dist/media-stream.d.ts +0 -10
  354. package/dist/media-stream.d.ts.map +0 -1
  355. package/dist/media-stream.js +0 -18
  356. package/dist/media-stream.js.map +0 -1
  357. package/dist/observation.d.ts +0 -38
  358. package/dist/observation.d.ts.map +0 -1
  359. package/dist/observation.js +0 -113
  360. package/dist/observation.js.map +0 -1
  361. package/dist/orchestration/elapsed.d.ts +0 -9
  362. package/dist/orchestration/elapsed.d.ts.map +0 -1
  363. package/dist/orchestration/elapsed.js +0 -8
  364. package/dist/orchestration/elapsed.js.map +0 -1
  365. package/dist/orchestration/h3-source.d.ts +0 -58
  366. package/dist/orchestration/h3-source.d.ts.map +0 -1
  367. package/dist/orchestration/h3-source.js +0 -362
  368. package/dist/orchestration/h3-source.js.map +0 -1
  369. package/dist/orchestration/index.d.ts +0 -17
  370. package/dist/orchestration/index.d.ts.map +0 -1
  371. package/dist/orchestration/index.js +0 -12
  372. package/dist/orchestration/index.js.map +0 -1
  373. package/dist/orchestration/media-buffer.d.ts +0 -32
  374. package/dist/orchestration/media-buffer.d.ts.map +0 -1
  375. package/dist/orchestration/media-buffer.js +0 -94
  376. package/dist/orchestration/media-buffer.js.map +0 -1
  377. package/dist/orchestration/open-h3.d.ts +0 -101
  378. package/dist/orchestration/open-h3.d.ts.map +0 -1
  379. package/dist/orchestration/open-h3.js +0 -127
  380. package/dist/orchestration/open-h3.js.map +0 -1
  381. package/dist/orchestration/queries.d.ts +0 -10
  382. package/dist/orchestration/queries.d.ts.map +0 -1
  383. package/dist/orchestration/queries.js +0 -43
  384. package/dist/orchestration/queries.js.map +0 -1
  385. package/dist/orchestration/references.d.ts +0 -18
  386. package/dist/orchestration/references.d.ts.map +0 -1
  387. package/dist/orchestration/references.js +0 -79
  388. package/dist/orchestration/references.js.map +0 -1
  389. package/dist/orchestration/renewal-state.d.ts +0 -84
  390. package/dist/orchestration/renewal-state.d.ts.map +0 -1
  391. package/dist/orchestration/renewal-state.js +0 -95
  392. package/dist/orchestration/renewal-state.js.map +0 -1
  393. package/dist/orchestration/renewal.d.ts +0 -103
  394. package/dist/orchestration/renewal.d.ts.map +0 -1
  395. package/dist/orchestration/renewal.js +0 -1099
  396. package/dist/orchestration/renewal.js.map +0 -1
  397. package/dist/orchestration/request.d.ts +0 -65
  398. package/dist/orchestration/request.d.ts.map +0 -1
  399. package/dist/orchestration/request.js +0 -134
  400. package/dist/orchestration/request.js.map +0 -1
  401. package/dist/orchestration/retention.d.ts +0 -100
  402. package/dist/orchestration/retention.d.ts.map +0 -1
  403. package/dist/orchestration/retention.js +0 -134
  404. package/dist/orchestration/retention.js.map +0 -1
  405. package/dist/orchestration/routing.d.ts +0 -21
  406. package/dist/orchestration/routing.d.ts.map +0 -1
  407. package/dist/orchestration/routing.js +0 -93
  408. package/dist/orchestration/routing.js.map +0 -1
  409. package/dist/orchestration/scheduler-key.d.ts +0 -14
  410. package/dist/orchestration/scheduler-key.d.ts.map +0 -1
  411. package/dist/orchestration/scheduler-key.js +0 -62
  412. package/dist/orchestration/scheduler-key.js.map +0 -1
  413. package/dist/orchestration/scheduler-policy.d.ts +0 -246
  414. package/dist/orchestration/scheduler-policy.d.ts.map +0 -1
  415. package/dist/orchestration/scheduler-policy.js +0 -668
  416. package/dist/orchestration/scheduler-policy.js.map +0 -1
  417. package/dist/orchestration/scheduler.d.ts +0 -393
  418. package/dist/orchestration/scheduler.d.ts.map +0 -1
  419. package/dist/orchestration/scheduler.js +0 -2621
  420. package/dist/orchestration/scheduler.js.map +0 -1
  421. package/dist/orchestration/source-slot.d.ts +0 -124
  422. package/dist/orchestration/source-slot.d.ts.map +0 -1
  423. package/dist/orchestration/source-slot.js +0 -348
  424. package/dist/orchestration/source-slot.js.map +0 -1
  425. package/dist/orchestration/types.d.ts +0 -1462
  426. package/dist/orchestration/types.d.ts.map +0 -1
  427. package/dist/orchestration/types.js +0 -135
  428. package/dist/orchestration/types.js.map +0 -1
  429. package/dist/protobuf.d.ts +0 -63
  430. package/dist/protobuf.d.ts.map +0 -1
  431. package/dist/protobuf.js +0 -252
  432. package/dist/protobuf.js.map +0 -1
  433. package/dist/session/_internal/acquire.d.ts +0 -21
  434. package/dist/session/_internal/acquire.d.ts.map +0 -1
  435. package/dist/session/_internal/acquire.js +0 -168
  436. package/dist/session/_internal/acquire.js.map +0 -1
  437. package/dist/session/_internal/cleanup.d.ts +0 -19
  438. package/dist/session/_internal/cleanup.d.ts.map +0 -1
  439. package/dist/session/_internal/cleanup.js +0 -102
  440. package/dist/session/_internal/cleanup.js.map +0 -1
  441. package/dist/session/_internal/lifecycle.d.ts +0 -67
  442. package/dist/session/_internal/lifecycle.d.ts.map +0 -1
  443. package/dist/session/_internal/lifecycle.js +0 -142
  444. package/dist/session/_internal/lifecycle.js.map +0 -1
  445. package/dist/session/_internal/remote.d.ts +0 -28
  446. package/dist/session/_internal/remote.d.ts.map +0 -1
  447. package/dist/session/_internal/remote.js +0 -71
  448. package/dist/session/_internal/remote.js.map +0 -1
  449. package/dist/session/_internal/uploads.d.ts +0 -7
  450. package/dist/session/_internal/uploads.d.ts.map +0 -1
  451. package/dist/session/_internal/uploads.js +0 -31
  452. package/dist/session/_internal/uploads.js.map +0 -1
  453. package/dist/session/commands.d.ts +0 -2
  454. package/dist/session/commands.d.ts.map +0 -1
  455. package/dist/session/commands.js +0 -2
  456. package/dist/session/commands.js.map +0 -1
  457. package/dist/session/files.d.ts +0 -21
  458. package/dist/session/files.d.ts.map +0 -1
  459. package/dist/session/files.js +0 -49
  460. package/dist/session/files.js.map +0 -1
  461. package/dist/session/index.d.ts +0 -84
  462. package/dist/session/index.d.ts.map +0 -1
  463. package/dist/session/index.js +0 -16
  464. package/dist/session/index.js.map +0 -1
  465. package/dist/session/media.d.ts +0 -114
  466. package/dist/session/media.d.ts.map +0 -1
  467. package/dist/session/media.js +0 -2
  468. package/dist/session/media.js.map +0 -1
  469. package/dist/session/recorder.d.ts +0 -24
  470. package/dist/session/recorder.d.ts.map +0 -1
  471. package/dist/session/recorder.js +0 -19
  472. package/dist/session/recorder.js.map +0 -1
  473. package/dist/session.d.ts +0 -105
  474. package/dist/session.d.ts.map +0 -1
  475. package/dist/session.js +0 -976
  476. package/dist/session.js.map +0 -1
  477. package/dist/simulation/_internal/source.d.ts +0 -12
  478. package/dist/simulation/_internal/source.d.ts.map +0 -1
  479. package/dist/simulation/_internal/source.js +0 -513
  480. package/dist/simulation/_internal/source.js.map +0 -1
  481. package/dist/simulation/index.d.ts +0 -13
  482. package/dist/simulation/index.d.ts.map +0 -1
  483. package/dist/simulation/index.js +0 -12
  484. package/dist/simulation/index.js.map +0 -1
  485. package/dist/simulation/types.d.ts +0 -39
  486. package/dist/simulation/types.d.ts.map +0 -1
  487. package/dist/simulation/types.js +0 -2
  488. package/dist/simulation/types.js.map +0 -1
  489. package/dist/stats.d.ts.map +0 -1
  490. package/dist/stats.js +0 -205
  491. package/dist/stats.js.map +0 -1
  492. package/dist/testing/Faults.d.ts +0 -4
  493. package/dist/testing/Faults.d.ts.map +0 -1
  494. package/dist/testing/Faults.js +0 -7
  495. package/dist/testing/Faults.js.map +0 -1
  496. package/dist/testing/Png.d.ts +0 -3
  497. package/dist/testing/Png.d.ts.map +0 -1
  498. package/dist/testing/Png.js.map +0 -1
  499. package/dist/testing/Wav.d.ts +0 -14
  500. package/dist/testing/Wav.d.ts.map +0 -1
  501. package/dist/testing/Wav.js +0 -37
  502. package/dist/testing/Wav.js.map +0 -1
  503. package/dist/testing/index.d.ts +0 -5
  504. package/dist/testing/index.d.ts.map +0 -1
  505. package/dist/testing/index.js +0 -4
  506. package/dist/testing/index.js.map +0 -1
  507. package/dist/wire.d.ts +0 -7
  508. package/dist/wire.d.ts.map +0 -1
  509. package/dist/wire.generated.d.ts +0 -305
  510. package/dist/wire.generated.d.ts.map +0 -1
  511. package/dist/wire.generated.js +0 -1257
  512. package/dist/wire.generated.js.map +0 -1
  513. package/dist/wire.js +0 -5
  514. package/dist/wire.js.map +0 -1
@@ -1,1462 +0,0 @@
1
- import * as Context from "effect/Context";
2
- import * as Data from "effect/Data";
3
- import type * as Duration from "effect/Duration";
4
- import type * as Effect from "effect/Effect";
5
- import type * as Option from "effect/Option";
6
- import * as Result from "effect/Result";
7
- import * as Schema from "effect/Schema";
8
- import type * as Scope from "effect/Scope";
9
- import type * as Stream from "effect/Stream";
10
- import type { ReactorError, ReactorFailure } from "../errors.js";
11
- import type { ObservationOptions } from "../observation.js";
12
- import type { Clip } from "../h3/messages.js";
13
- import type { CommandFailure, PolicyFailure } from "../errors.js";
14
- import type { AudioFrame, VideoFrame, MediaPressure } from "../session/media.js";
15
- import type { Submission } from "../Submission.js";
16
- import type { Affinity } from "../Sequence.js";
17
- import type { Canvas, ClipId, ClipRequest } from "./request.js";
18
- /**
19
- * How long a clip took to become Ready, measured on the monotonic clock, so a
20
- * correction of the host's wall clock does not change it.
21
- */
22
- export type BuildTiming = {
23
- readonly _tag: "Measured";
24
- readonly buildMs: number;
25
- } | {
26
- readonly _tag: "Bounded";
27
- readonly admissionToReadyMs: number;
28
- } | {
29
- readonly _tag: "Unknown";
30
- };
31
- export declare const BuildTiming: {
32
- readonly $is: <Tag extends "Bounded" | "Measured" | "Unknown">(tag: Tag) => (u: unknown) => u is Extract<{
33
- readonly _tag: "Measured";
34
- readonly buildMs: number;
35
- }, {
36
- readonly _tag: Tag;
37
- }> | Extract<{
38
- readonly _tag: "Bounded";
39
- readonly admissionToReadyMs: number;
40
- }, {
41
- readonly _tag: Tag;
42
- }> | Extract<{
43
- readonly _tag: "Unknown";
44
- }, {
45
- readonly _tag: Tag;
46
- }>;
47
- readonly $match: {
48
- <Cases extends { readonly [Tag in "Bounded" | "Measured" | "Unknown"]: (args: Extract<BuildTiming, {
49
- readonly _tag: Tag;
50
- }>) => any; }>(cases: Cases): (value: BuildTiming) => import("effect/Unify").Unify<ReturnType<Cases["Bounded" | "Measured" | "Unknown"]>>;
51
- <Cases extends { readonly [Tag in "Bounded" | "Measured" | "Unknown"]: (args: Extract<BuildTiming, {
52
- readonly _tag: Tag;
53
- }>) => any; }>(value: BuildTiming, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Bounded" | "Measured" | "Unknown"]>>;
54
- };
55
- readonly Bounded: Data.TaggedEnum.ConstructorFrom<{
56
- readonly _tag: "Bounded";
57
- readonly admissionToReadyMs: number;
58
- }, "_tag">;
59
- readonly Measured: Data.TaggedEnum.ConstructorFrom<{
60
- readonly _tag: "Measured";
61
- readonly buildMs: number;
62
- }, "_tag">;
63
- readonly Unknown: Data.TaggedEnum.ConstructorFrom<{
64
- readonly _tag: "Unknown";
65
- }, "_tag">;
66
- };
67
- /** A provider clip is visible even when this application never submitted it. */
68
- export interface ClipRecord {
69
- readonly clipId: ClipId;
70
- /** Physical session that owns this clip, including during a renewal overlap. */
71
- readonly sessionId: string;
72
- readonly durationSeconds: number;
73
- readonly provider: Clip;
74
- readonly request?: ClipRequest;
75
- readonly seq?: number;
76
- /** When this process enqueued the clip: epoch milliseconds of the local observation. */
77
- readonly enqueuedAt?: number;
78
- }
79
- /** The renderer hook receives a locally authored request with its annotation. */
80
- export interface LocalClipRecord extends ClipRecord {
81
- readonly request: ClipRequest;
82
- readonly seq: number;
83
- readonly enqueuedAt: number;
84
- }
85
- export interface Playback {
86
- readonly clipId: ClipId;
87
- /** Initial provider state may name a playing clip without describing it. */
88
- readonly record: Option.Option<ClipRecord>;
89
- /**
90
- * When the start was observed locally, in epoch milliseconds, never
91
- * reconstructed from queue order. It is a recorded instant: compare it with
92
- * wall time (`Clock.currentTimeMillis`), and measure elapsed time on the
93
- * monotonic clock instead.
94
- */
95
- readonly startedAt: Option.Option<number>;
96
- /** Monotonic start observation, available only when this process saw Started. */
97
- readonly startedAtMonotonicMillis?: number;
98
- }
99
- export interface EngineState {
100
- readonly availability: "Ready" | "Synchronizing" | "Unavailable";
101
- /** Every live physical source, including one with no clips yet. */
102
- readonly sessions: readonly {
103
- readonly sessionId: string;
104
- readonly availability: EngineState["availability"];
105
- }[];
106
- /** The source that receives an unconstrained new request. */
107
- readonly preferredSessionId: Option.Option<string>;
108
- /** The source draining ahead of a ready replacement, if there is one. */
109
- readonly retiringSessionId: Option.Option<string>;
110
- /**
111
- * The retiring source can hand off once idle: no sequence holds it
112
- * preferred, it is not recovering, and its media cannot hold the switch past
113
- * the final clip's grace. Absent on physical sources.
114
- */
115
- readonly handoffReady?: boolean;
116
- readonly queued: readonly ClipRecord[];
117
- /** Provider queue order, including an independently observed active build. */
118
- readonly generationOrder: readonly ClipId[];
119
- readonly building: Option.Option<{
120
- readonly record: ClipRecord;
121
- /** When the build was seen to start, in epoch milliseconds of the local observation. */
122
- readonly startedAt: Option.Option<number>;
123
- }>;
124
- readonly ready: readonly ClipRecord[];
125
- readonly playing: Option.Option<Playback>;
126
- readonly continuable: readonly ClipId[];
127
- readonly failed: readonly ClipId[];
128
- readonly started: boolean;
129
- readonly canvas: Option.Option<Canvas>;
130
- readonly capacities: {
131
- readonly generation: number;
132
- readonly playout: number;
133
- };
134
- }
135
- export type EngineEvent = {
136
- readonly _tag: "Queued";
137
- readonly clipId: ClipId;
138
- readonly durationSeconds: number;
139
- } | {
140
- readonly _tag: "Building";
141
- readonly clipId: ClipId;
142
- readonly startedAt: Option.Option<number>;
143
- } | {
144
- readonly _tag: "Ready";
145
- readonly clipId: ClipId;
146
- readonly timing: BuildTiming;
147
- readonly durationSeconds: number;
148
- } | {
149
- readonly _tag: "Started";
150
- readonly clipId: ClipId;
151
- readonly durationSeconds: number;
152
- /** Epoch milliseconds of the local observation, as every event's `at` is. */
153
- readonly at: number;
154
- /** Monotonic instant captured with `at`, for elapsed as-run accounting. */
155
- readonly atMonotonicMillis?: number;
156
- } | {
157
- readonly _tag: "Ended";
158
- readonly clipId: ClipId;
159
- readonly termination: "finished" | "stopped";
160
- /** Local observation time of the end, when the source provides it. */
161
- readonly at?: number;
162
- readonly atMonotonicMillis?: number;
163
- } | {
164
- readonly _tag: "Failed";
165
- readonly clipId: ClipId;
166
- readonly reason: string;
167
- readonly sessionId?: string;
168
- /**
169
- * The clip was lost with its session, which renewal replaced, rather than failed by
170
- * the provider. A clip that had not started never aired there.
171
- */
172
- readonly lost?: true;
173
- } | {
174
- readonly _tag: "Starved";
175
- readonly at: number;
176
- }
177
- /**
178
- * The retiring source's final clip arrived in full while a replacement is
179
- * Ready. An observation only: a short clip still switches once its grace
180
- * past Ended elapses, without this event.
181
- */
182
- | {
183
- readonly _tag: "HandoffReady";
184
- readonly sessionId: string;
185
- } | {
186
- readonly _tag: "SessionFailed";
187
- readonly failure: ReactorFailure;
188
- };
189
- export declare const EngineEvent: {
190
- readonly $is: <Tag extends "Building" | "Ended" | "Failed" | "HandoffReady" | "Queued" | "Ready" | "SessionFailed" | "Started" | "Starved">(tag: Tag) => (u: unknown) => u is Extract<{
191
- readonly _tag: "Queued";
192
- readonly clipId: ClipId;
193
- readonly durationSeconds: number;
194
- }, {
195
- readonly _tag: Tag;
196
- }> | Extract<{
197
- readonly _tag: "Building";
198
- readonly clipId: ClipId;
199
- readonly startedAt: Option.Option<number>;
200
- }, {
201
- readonly _tag: Tag;
202
- }> | Extract<{
203
- readonly _tag: "Ready";
204
- readonly clipId: ClipId;
205
- readonly timing: BuildTiming;
206
- readonly durationSeconds: number;
207
- }, {
208
- readonly _tag: Tag;
209
- }> | Extract<{
210
- readonly _tag: "Started";
211
- readonly clipId: ClipId;
212
- readonly durationSeconds: number;
213
- /** Epoch milliseconds of the local observation, as every event's `at` is. */
214
- readonly at: number;
215
- /** Monotonic instant captured with `at`, for elapsed as-run accounting. */
216
- readonly atMonotonicMillis?: number;
217
- }, {
218
- readonly _tag: Tag;
219
- }> | Extract<{
220
- readonly _tag: "Ended";
221
- readonly clipId: ClipId;
222
- readonly termination: "finished" | "stopped";
223
- /** Local observation time of the end, when the source provides it. */
224
- readonly at?: number;
225
- readonly atMonotonicMillis?: number;
226
- }, {
227
- readonly _tag: Tag;
228
- }> | Extract<{
229
- readonly _tag: "Failed";
230
- readonly clipId: ClipId;
231
- readonly reason: string;
232
- readonly sessionId?: string;
233
- /**
234
- * The clip was lost with its session, which renewal replaced, rather than failed by
235
- * the provider. A clip that had not started never aired there.
236
- */
237
- readonly lost?: true;
238
- }, {
239
- readonly _tag: Tag;
240
- }> | Extract<{
241
- readonly _tag: "Starved";
242
- readonly at: number;
243
- }, {
244
- readonly _tag: Tag;
245
- }> | Extract<{
246
- readonly _tag: "HandoffReady";
247
- readonly sessionId: string;
248
- }, {
249
- readonly _tag: Tag;
250
- }> | Extract<{
251
- readonly _tag: "SessionFailed";
252
- readonly failure: ReactorFailure;
253
- }, {
254
- readonly _tag: Tag;
255
- }>;
256
- readonly $match: {
257
- <Cases extends { readonly [Tag in "Building" | "Ended" | "Failed" | "HandoffReady" | "Queued" | "Ready" | "SessionFailed" | "Started" | "Starved"]: (args: Extract<EngineEvent, {
258
- readonly _tag: Tag;
259
- }>) => any; }>(cases: Cases): (value: EngineEvent) => import("effect/Unify").Unify<ReturnType<Cases["Building" | "Ended" | "Failed" | "HandoffReady" | "Queued" | "Ready" | "SessionFailed" | "Started" | "Starved"]>>;
260
- <Cases extends { readonly [Tag in "Building" | "Ended" | "Failed" | "HandoffReady" | "Queued" | "Ready" | "SessionFailed" | "Started" | "Starved"]: (args: Extract<EngineEvent, {
261
- readonly _tag: Tag;
262
- }>) => any; }>(value: EngineEvent, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Building" | "Ended" | "Failed" | "HandoffReady" | "Queued" | "Ready" | "SessionFailed" | "Started" | "Starved"]>>;
263
- };
264
- readonly Building: Data.TaggedEnum.ConstructorFrom<{
265
- readonly _tag: "Building";
266
- readonly clipId: ClipId;
267
- readonly startedAt: Option.Option<number>;
268
- }, "_tag">;
269
- readonly Ended: Data.TaggedEnum.ConstructorFrom<{
270
- readonly _tag: "Ended";
271
- readonly clipId: ClipId;
272
- readonly termination: "finished" | "stopped";
273
- /** Local observation time of the end, when the source provides it. */
274
- readonly at?: number;
275
- readonly atMonotonicMillis?: number;
276
- }, "_tag">;
277
- readonly Failed: Data.TaggedEnum.ConstructorFrom<{
278
- readonly _tag: "Failed";
279
- readonly clipId: ClipId;
280
- readonly reason: string;
281
- readonly sessionId?: string;
282
- /**
283
- * The clip was lost with its session, which renewal replaced, rather than failed by
284
- * the provider. A clip that had not started never aired there.
285
- */
286
- readonly lost?: true;
287
- }, "_tag">;
288
- readonly HandoffReady: Data.TaggedEnum.ConstructorFrom<{
289
- readonly _tag: "HandoffReady";
290
- readonly sessionId: string;
291
- }, "_tag">;
292
- readonly Queued: Data.TaggedEnum.ConstructorFrom<{
293
- readonly _tag: "Queued";
294
- readonly clipId: ClipId;
295
- readonly durationSeconds: number;
296
- }, "_tag">;
297
- readonly Ready: Data.TaggedEnum.ConstructorFrom<{
298
- readonly _tag: "Ready";
299
- readonly clipId: ClipId;
300
- readonly timing: BuildTiming;
301
- readonly durationSeconds: number;
302
- }, "_tag">;
303
- readonly SessionFailed: Data.TaggedEnum.ConstructorFrom<{
304
- readonly _tag: "SessionFailed";
305
- readonly failure: ReactorFailure;
306
- }, "_tag">;
307
- readonly Started: Data.TaggedEnum.ConstructorFrom<{
308
- readonly _tag: "Started";
309
- readonly clipId: ClipId;
310
- readonly durationSeconds: number;
311
- /** Epoch milliseconds of the local observation, as every event's `at` is. */
312
- readonly at: number;
313
- /** Monotonic instant captured with `at`, for elapsed as-run accounting. */
314
- readonly atMonotonicMillis?: number;
315
- }, "_tag">;
316
- readonly Starved: Data.TaggedEnum.ConstructorFrom<{
317
- readonly _tag: "Starved";
318
- readonly at: number;
319
- }, "_tag">;
320
- };
321
- export type RemoveOutcome = "unstarted" | "in_flight" | "generation" | "ready";
322
- /**
323
- * What an orchestration command can fail with: a dispatched or undispatched
324
- * command's `CommandFailure`, or a local `PolicyFailure` refusal. Both carry
325
- * `context.outcome`, so a caller reads the dispatch evidence without narrowing.
326
- */
327
- export type EngineError = CommandFailure | PolicyFailure;
328
- /**
329
- * An engine's state and every event after it, with no gap between them: the
330
- * subscription is acquired before the state is read. An event may repeat what
331
- * `initial` already reflects, so apply events idempotently by `clipId`. The
332
- * stream is bounded per observer like any observation; after an `Overflow`,
333
- * observe again for a fresh state and subscription.
334
- */
335
- export interface EngineObservation {
336
- readonly initial: EngineState;
337
- readonly events: Stream.Stream<EngineEvent, ReactorError>;
338
- }
339
- export type ObserveEngine = (options?: ObservationOptions) => Effect.Effect<EngineObservation, ReactorError, Scope.Scope>;
340
- export interface EngineShape {
341
- readonly prepare: (request: ClipRequest) => Effect.Effect<Submission<ClipId, EngineError>, EngineError>;
342
- readonly enqueue: (request: ClipRequest) => Effect.Effect<ClipId, EngineError>;
343
- /** Refuse before dispatch if routing would select another physical source. */
344
- readonly enqueueOnSource?: ((request: ClipRequest, expectedSessionId: string) => Effect.Effect<ClipId, EngineError>) | undefined;
345
- /**
346
- * The current state. After an owned renewal worker's defect or unexpected
347
- * interruption, it fails with that worker's Cause until close begins.
348
- */
349
- readonly state: Effect.Effect<EngineState>;
350
- /** Later events only, subscribed when the stream runs; use `observe` to pair them with a state. */
351
- readonly events: Stream.Stream<EngineEvent, ReactorError>;
352
- readonly observe: ObserveEngine;
353
- /**
354
- * The terminal failure, as it was raised: a session's `ReactorError`, a
355
- * replacement's `AcquisitionFailure` with its cleanup, or the failed command.
356
- * An owned renewal worker's defect or unexpected interruption fails this
357
- * effect and observations with the original Cause instead of a typed error.
358
- * A waiter that must act on either, such as one that closes the handle,
359
- * handles the whole Cause (`Effect.catchCause`), not only this value.
360
- */
361
- readonly failure: Effect.Effect<ReactorFailure>;
362
- /** Permanently stop new renewal allocations; already acquired sources may finish. */
363
- readonly stopRenewal: Effect.Effect<void, EngineError>;
364
- readonly setAutoplay: (enabled: boolean) => Effect.Effect<void, EngineError>;
365
- readonly pauseAndStop: Effect.Effect<void, EngineError>;
366
- readonly remove: (id: ClipId) => Effect.Effect<RemoveOutcome, EngineError>;
367
- /**
368
- * Stops `id` if it is still the clip playing on its session. Autoplay stays as it is, so
369
- * with autoplay on the session's next Ready clip starts; the stopped clip cannot resume.
370
- */
371
- readonly cut: (id: ClipId) => Effect.Effect<void, EngineError>;
372
- /** A global rank within this clip's physical session range in the chosen queue. */
373
- readonly move: (id: ClipId, position: number, queue: "generation" | "playout") => Effect.Effect<void, EngineError>;
374
- readonly setCanvas: (canvas: Canvas) => Effect.Effect<void, EngineError>;
375
- }
376
- /**
377
- * An orchestration's recovering media output, one logical track per kind that
378
- * continues across reconnects and source replacements, and ends with the
379
- * orchestration's terminal failure.
380
- *
381
- * - Consumption is mandatory: while it runs, the orchestration buffers what the
382
- * reader has not taken (by default 96 video frames and 192,000 audio
383
- * samples; see `maxQueuedVideoFrames` and `maxQueuedAudioSamples`), and an
384
- * output that stays undrained past that fails the orchestration with
385
- * `Overflow`. That failure is terminal.
386
- * - Each output has one reader at a time. A second concurrent reader fails
387
- * with `AlreadyReading` rather than silently splitting the frames; a reader
388
- * that ends releases the output, and a later reader resumes from what is
389
- * retained. A preview that wants only the newest frame derives it per
390
- * consumer with `Stream.buffer({ capacity: 1, strategy: "sliding" })`.
391
- * - `pressure` reports the loss of the logical output: `droppedVideo`,
392
- * `droppedAudio` and `readerOverflows` accumulate across generations and
393
- * across source replacements, counting each source only while it fed this
394
- * output. A total that cannot be read fails `pressure` with `InvalidState`
395
- * rather than reporting zero.
396
- */
397
- export interface MediaShape {
398
- readonly video: Stream.Stream<VideoFrame, ReactorFailure>;
399
- readonly audio: Stream.Stream<AudioFrame, ReactorFailure>;
400
- readonly pressure: Effect.Effect<MediaPressure, ReactorError>;
401
- readonly videoFramesPerSecond: number;
402
- }
403
- export type MediaState = {
404
- readonly _tag: "Ready";
405
- readonly sessionId: string;
406
- readonly generation: bigint;
407
- } | {
408
- readonly _tag: "Recovering";
409
- readonly sessionId: string;
410
- readonly cause: ReactorFailure;
411
- } | {
412
- readonly _tag: "Failed";
413
- readonly cause: ReactorFailure;
414
- } | {
415
- readonly _tag: "Closed";
416
- };
417
- export interface MediaTail {
418
- readonly video: {
419
- readonly framesPerSecond: number;
420
- readonly expectedFrames: number;
421
- readonly receivedFrames: number;
422
- readonly status: "not-started" | "count-complete" | "incomplete";
423
- };
424
- readonly audio: {
425
- readonly receivedSamples: number;
426
- readonly status: "unverified";
427
- };
428
- readonly sourceDrops: {
429
- readonly video: bigint | null;
430
- readonly audio: bigint | null;
431
- };
432
- readonly forwarded: {
433
- readonly queuedVideoFrames: number;
434
- readonly queuedAudioSamples: number;
435
- };
436
- }
437
- export type Renewal = {
438
- readonly _tag: "Opened";
439
- readonly sessionId: string;
440
- readonly lifetime: Duration.Duration;
441
- } | {
442
- readonly _tag: "Prepared";
443
- } | {
444
- readonly _tag: "SetupFailed";
445
- readonly reason: string;
446
- readonly consecutive: number;
447
- } | {
448
- readonly _tag: "Recovering";
449
- readonly sessionId: string;
450
- readonly reason: string;
451
- } | {
452
- readonly _tag: "Reconnected";
453
- readonly sessionId: string;
454
- readonly generation: bigint;
455
- } | {
456
- readonly _tag: "Switched";
457
- readonly sessionId: string;
458
- readonly ageSeconds: number;
459
- readonly tail: MediaTail;
460
- /** Eligibility facts captured before retirement waits; absent on historical event values. */
461
- readonly handoff?: {
462
- readonly replacementSessionId: string;
463
- readonly decision: "no-observed-start" | "count-complete" | "grace-elapsed";
464
- /** Local decoded-frame accounting, not presentation or audio completeness. */
465
- readonly finalClip: {
466
- readonly _tag: "NoObservedStart";
467
- } | {
468
- readonly _tag: "Observed";
469
- readonly clipId: ClipId;
470
- readonly expectedVideoFrames: number;
471
- readonly receivedVideoFrames: number;
472
- readonly videoStatus: "count-complete" | "incomplete";
473
- };
474
- readonly grace: {
475
- readonly _tag: "NotObserved";
476
- } | {
477
- readonly _tag: "Observed";
478
- readonly origin: "Ended" | "Idle";
479
- readonly elapsedMs: number;
480
- readonly limitMs: number;
481
- };
482
- };
483
- } | {
484
- readonly _tag: "Replaced";
485
- readonly reason: string;
486
- readonly lostClips: number;
487
- readonly sessionId: string;
488
- readonly ageSeconds: number;
489
- readonly tail: MediaTail;
490
- } | {
491
- readonly _tag: "Failed";
492
- readonly reason: string;
493
- };
494
- /**
495
- * One handle's observation, in the order its changes happened: engine events,
496
- * renewal events and media-state transitions from a single stream, so a
497
- * `Replaced` follows the `Failed` events of the clips it lost and no media
498
- * state arrives out of order.
499
- */
500
- export type HandleEvent = {
501
- readonly _tag: "Engine";
502
- readonly event: EngineEvent;
503
- } | {
504
- readonly _tag: "Renewal";
505
- readonly event: Renewal;
506
- } | {
507
- readonly _tag: "Media";
508
- readonly state: MediaState;
509
- };
510
- /**
511
- * The handle's current engine and media state, and every handle event after
512
- * it. The subscription is acquired before the state is read, so no event falls
513
- * between them; an event may repeat what `initial` already reflects.
514
- */
515
- export interface HandleObservation {
516
- readonly initial: {
517
- readonly engine: EngineState;
518
- readonly media: MediaState;
519
- };
520
- readonly events: Stream.Stream<HandleEvent, ReactorError>;
521
- }
522
- export interface MediaSource {
523
- readonly video: Stream.Stream<VideoFrame, ReactorError>;
524
- readonly audio: Stream.Stream<AudioFrame, ReactorError>;
525
- readonly pressure: Effect.Effect<MediaPressure, ReactorError>;
526
- readonly videoFramesPerSecond: number;
527
- readonly generation: bigint;
528
- }
529
- export declare const PolicyCleanup: Schema.Struct<{
530
- readonly operation: Schema.String;
531
- readonly result: Schema.Result<Schema.Void, Schema.Union<readonly [Schema.decodeTo<Schema.declare<CommandFailure, CommandFailure>, Schema.Codec<{
532
- readonly _tag: "CommandFailure";
533
- readonly message: string;
534
- readonly reason: {
535
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
536
- readonly message: string;
537
- } | {
538
- readonly _tag: "Http";
539
- readonly message: string;
540
- readonly status?: number;
541
- readonly retryAfterMillis?: number;
542
- } | {
543
- readonly _tag: "RecorderDisabled" | "Remote";
544
- readonly message: string;
545
- readonly remoteCode?: string;
546
- } | {
547
- readonly _tag: "Native";
548
- readonly message: string;
549
- readonly status?: number;
550
- } | {
551
- readonly _tag: "IceFailed";
552
- readonly message: string;
553
- readonly pairs: number;
554
- readonly candidateTypes: readonly string[];
555
- } | {
556
- readonly _tag: "TransportFailed";
557
- readonly message: string;
558
- readonly pairs: number;
559
- } | {
560
- readonly _tag: "ClipEnded";
561
- readonly message: string;
562
- readonly clipId: string;
563
- readonly lifecycle: "clip_failed" | "clip_popped";
564
- readonly transportGeneration: string;
565
- };
566
- readonly context: {
567
- readonly operation?: string;
568
- readonly requestId?: string;
569
- readonly sessionId?: string;
570
- readonly generation?: string;
571
- readonly outcome?: "not-submitted" | "replied" | "unknown";
572
- };
573
- }, unknown, never, never>, never, never>, Schema.decodeTo<Schema.declare<PolicyFailure, PolicyFailure>, Schema.Codec<{
574
- readonly _tag: "PolicyFailure";
575
- readonly message: string;
576
- readonly reason: {
577
- readonly _tag: "AnchorUnavailable" | "AnnotationCapacity" | "Busy" | "ContinuationUnavailable" | "IdentityExhausted" | "InvalidRequest" | "NotFound" | "OwnerConflict" | "PositionConflict" | "QueueChanged" | "QueueFull" | "RouteChanged" | "SessionClosed" | "SessionRecovering" | "SessionRetired" | "SubmissionCapacity";
578
- readonly message: string;
579
- } | {
580
- readonly _tag: "Missing";
581
- readonly message: string;
582
- readonly purpose: "anchor" | "continuation" | "session_anchor";
583
- } | {
584
- readonly _tag: "Sequence";
585
- readonly message: string;
586
- readonly sequenceId: string;
587
- readonly code: "capacity" | "indeterminate" | "member-capacity" | "member-duplicate" | "member-missing" | "missing" | "not-releasable" | "owner-mismatch" | "retired" | "sealed" | "sealing";
588
- };
589
- readonly context: {
590
- readonly operation?: string;
591
- readonly requestId?: string;
592
- readonly sessionId?: string;
593
- readonly generation?: string;
594
- readonly outcome?: "not-submitted" | "replied" | "unknown";
595
- };
596
- }, unknown, never, never>, never, never>]>>;
597
- }>;
598
- export interface PolicyCleanup extends Schema.Schema.Type<typeof PolicyCleanup> {
599
- }
600
- export declare const SourceCleanup: Schema.Struct<{
601
- /** The unmodified lifecycle owner's canonical cleanup evidence. */
602
- readonly lease: Schema.Struct<{
603
- readonly localClosed: Schema.Boolean;
604
- readonly allocation: Schema.Literals<readonly ["none", "known", "unknown"]>;
605
- readonly ownership: Schema.optionalKey<Schema.Literals<readonly ["owned", "attached"]>>;
606
- readonly sessionId: Schema.optionalKey<Schema.String>;
607
- readonly remote: Schema.Struct<{
608
- readonly attempted: Schema.Boolean;
609
- readonly responseReceived: Schema.Boolean;
610
- readonly confirmed: Schema.Boolean;
611
- readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
612
- readonly deleteStatus: Schema.NullOr<Schema.Int>;
613
- readonly state: Schema.NullOr<Schema.String>;
614
- readonly error: Schema.optionalKey<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
615
- readonly _tag: "ReactorError";
616
- readonly message: string;
617
- readonly reason: {
618
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
619
- readonly message: string;
620
- } | {
621
- readonly _tag: "Http";
622
- readonly message: string;
623
- readonly status?: number;
624
- readonly retryAfterMillis?: number;
625
- } | {
626
- readonly _tag: "RecorderDisabled" | "Remote";
627
- readonly message: string;
628
- readonly remoteCode?: string;
629
- } | {
630
- readonly _tag: "Native";
631
- readonly message: string;
632
- readonly status?: number;
633
- } | {
634
- readonly _tag: "IceFailed";
635
- readonly message: string;
636
- readonly pairs: number;
637
- readonly candidateTypes: readonly string[];
638
- } | {
639
- readonly _tag: "TransportFailed";
640
- readonly message: string;
641
- readonly pairs: number;
642
- } | {
643
- readonly _tag: "ClipEnded";
644
- readonly message: string;
645
- readonly clipId: string;
646
- readonly lifecycle: "clip_failed" | "clip_popped";
647
- readonly transportGeneration: string;
648
- };
649
- readonly context: {
650
- readonly operation?: string;
651
- readonly requestId?: string;
652
- readonly sessionId?: string;
653
- readonly generation?: string;
654
- readonly outcome?: "not-submitted" | "replied" | "unknown";
655
- };
656
- }, unknown, never, never>, never, never>>;
657
- }>;
658
- readonly unpublishSubmitted: Schema.$Array<Schema.String>;
659
- readonly unresolvedPublications: Schema.$Array<Schema.String>;
660
- readonly localErrors: Schema.$Array<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
661
- readonly _tag: "ReactorError";
662
- readonly message: string;
663
- readonly reason: {
664
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
665
- readonly message: string;
666
- } | {
667
- readonly _tag: "Http";
668
- readonly message: string;
669
- readonly status?: number;
670
- readonly retryAfterMillis?: number;
671
- } | {
672
- readonly _tag: "RecorderDisabled" | "Remote";
673
- readonly message: string;
674
- readonly remoteCode?: string;
675
- } | {
676
- readonly _tag: "Native";
677
- readonly message: string;
678
- readonly status?: number;
679
- } | {
680
- readonly _tag: "IceFailed";
681
- readonly message: string;
682
- readonly pairs: number;
683
- readonly candidateTypes: readonly string[];
684
- } | {
685
- readonly _tag: "TransportFailed";
686
- readonly message: string;
687
- readonly pairs: number;
688
- } | {
689
- readonly _tag: "ClipEnded";
690
- readonly message: string;
691
- readonly clipId: string;
692
- readonly lifecycle: "clip_failed" | "clip_popped";
693
- readonly transportGeneration: string;
694
- };
695
- readonly context: {
696
- readonly operation?: string;
697
- readonly requestId?: string;
698
- readonly sessionId?: string;
699
- readonly generation?: string;
700
- readonly outcome?: "not-submitted" | "replied" | "unknown";
701
- };
702
- }, unknown, never, never>, never, never>>;
703
- }>;
704
- readonly policy: Schema.$Array<Schema.Struct<{
705
- readonly operation: Schema.String;
706
- readonly result: Schema.Result<Schema.Void, Schema.Union<readonly [Schema.decodeTo<Schema.declare<CommandFailure, CommandFailure>, Schema.Codec<{
707
- readonly _tag: "CommandFailure";
708
- readonly message: string;
709
- readonly reason: {
710
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
711
- readonly message: string;
712
- } | {
713
- readonly _tag: "Http";
714
- readonly message: string;
715
- readonly status?: number;
716
- readonly retryAfterMillis?: number;
717
- } | {
718
- readonly _tag: "RecorderDisabled" | "Remote";
719
- readonly message: string;
720
- readonly remoteCode?: string;
721
- } | {
722
- readonly _tag: "Native";
723
- readonly message: string;
724
- readonly status?: number;
725
- } | {
726
- readonly _tag: "IceFailed";
727
- readonly message: string;
728
- readonly pairs: number;
729
- readonly candidateTypes: readonly string[];
730
- } | {
731
- readonly _tag: "TransportFailed";
732
- readonly message: string;
733
- readonly pairs: number;
734
- } | {
735
- readonly _tag: "ClipEnded";
736
- readonly message: string;
737
- readonly clipId: string;
738
- readonly lifecycle: "clip_failed" | "clip_popped";
739
- readonly transportGeneration: string;
740
- };
741
- readonly context: {
742
- readonly operation?: string;
743
- readonly requestId?: string;
744
- readonly sessionId?: string;
745
- readonly generation?: string;
746
- readonly outcome?: "not-submitted" | "replied" | "unknown";
747
- };
748
- }, unknown, never, never>, never, never>, Schema.decodeTo<Schema.declare<PolicyFailure, PolicyFailure>, Schema.Codec<{
749
- readonly _tag: "PolicyFailure";
750
- readonly message: string;
751
- readonly reason: {
752
- readonly _tag: "AnchorUnavailable" | "AnnotationCapacity" | "Busy" | "ContinuationUnavailable" | "IdentityExhausted" | "InvalidRequest" | "NotFound" | "OwnerConflict" | "PositionConflict" | "QueueChanged" | "QueueFull" | "RouteChanged" | "SessionClosed" | "SessionRecovering" | "SessionRetired" | "SubmissionCapacity";
753
- readonly message: string;
754
- } | {
755
- readonly _tag: "Missing";
756
- readonly message: string;
757
- readonly purpose: "anchor" | "continuation" | "session_anchor";
758
- } | {
759
- readonly _tag: "Sequence";
760
- readonly message: string;
761
- readonly sequenceId: string;
762
- readonly code: "capacity" | "indeterminate" | "member-capacity" | "member-duplicate" | "member-missing" | "missing" | "not-releasable" | "owner-mismatch" | "retired" | "sealed" | "sealing";
763
- };
764
- readonly context: {
765
- readonly operation?: string;
766
- readonly requestId?: string;
767
- readonly sessionId?: string;
768
- readonly generation?: string;
769
- readonly outcome?: "not-submitted" | "replied" | "unknown";
770
- };
771
- }, unknown, never, never>, never, never>]>>;
772
- }>>;
773
- }>;
774
- export interface SourceCleanup extends Schema.Schema.Type<typeof SourceCleanup> {
775
- }
776
- /**
777
- * An orchestration's cleanup evidence. As a Schema it encodes for persistence
778
- * (`Schema.toCodecJson(CleanupReport)` for JSON); its failures encode as
779
- * diagnostic JSON, without provider text.
780
- */
781
- export declare const CleanupReport: Schema.Struct<{
782
- readonly sessions: Schema.$Array<Schema.Struct<{
783
- /** The unmodified lifecycle owner's canonical cleanup evidence. */
784
- readonly lease: Schema.Struct<{
785
- readonly localClosed: Schema.Boolean;
786
- readonly allocation: Schema.Literals<readonly ["none", "known", "unknown"]>;
787
- readonly ownership: Schema.optionalKey<Schema.Literals<readonly ["owned", "attached"]>>;
788
- readonly sessionId: Schema.optionalKey<Schema.String>;
789
- readonly remote: Schema.Struct<{
790
- readonly attempted: Schema.Boolean;
791
- readonly responseReceived: Schema.Boolean;
792
- readonly confirmed: Schema.Boolean;
793
- readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
794
- readonly deleteStatus: Schema.NullOr<Schema.Int>;
795
- readonly state: Schema.NullOr<Schema.String>;
796
- readonly error: Schema.optionalKey<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
797
- readonly _tag: "ReactorError";
798
- readonly message: string;
799
- readonly reason: {
800
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
801
- readonly message: string;
802
- } | {
803
- readonly _tag: "Http";
804
- readonly message: string;
805
- readonly status?: number;
806
- readonly retryAfterMillis?: number;
807
- } | {
808
- readonly _tag: "RecorderDisabled" | "Remote";
809
- readonly message: string;
810
- readonly remoteCode?: string;
811
- } | {
812
- readonly _tag: "Native";
813
- readonly message: string;
814
- readonly status?: number;
815
- } | {
816
- readonly _tag: "IceFailed";
817
- readonly message: string;
818
- readonly pairs: number;
819
- readonly candidateTypes: readonly string[];
820
- } | {
821
- readonly _tag: "TransportFailed";
822
- readonly message: string;
823
- readonly pairs: number;
824
- } | {
825
- readonly _tag: "ClipEnded";
826
- readonly message: string;
827
- readonly clipId: string;
828
- readonly lifecycle: "clip_failed" | "clip_popped";
829
- readonly transportGeneration: string;
830
- };
831
- readonly context: {
832
- readonly operation?: string;
833
- readonly requestId?: string;
834
- readonly sessionId?: string;
835
- readonly generation?: string;
836
- readonly outcome?: "not-submitted" | "replied" | "unknown";
837
- };
838
- }, unknown, never, never>, never, never>>;
839
- }>;
840
- readonly unpublishSubmitted: Schema.$Array<Schema.String>;
841
- readonly unresolvedPublications: Schema.$Array<Schema.String>;
842
- readonly localErrors: Schema.$Array<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
843
- readonly _tag: "ReactorError";
844
- readonly message: string;
845
- readonly reason: {
846
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
847
- readonly message: string;
848
- } | {
849
- readonly _tag: "Http";
850
- readonly message: string;
851
- readonly status?: number;
852
- readonly retryAfterMillis?: number;
853
- } | {
854
- readonly _tag: "RecorderDisabled" | "Remote";
855
- readonly message: string;
856
- readonly remoteCode?: string;
857
- } | {
858
- readonly _tag: "Native";
859
- readonly message: string;
860
- readonly status?: number;
861
- } | {
862
- readonly _tag: "IceFailed";
863
- readonly message: string;
864
- readonly pairs: number;
865
- readonly candidateTypes: readonly string[];
866
- } | {
867
- readonly _tag: "TransportFailed";
868
- readonly message: string;
869
- readonly pairs: number;
870
- } | {
871
- readonly _tag: "ClipEnded";
872
- readonly message: string;
873
- readonly clipId: string;
874
- readonly lifecycle: "clip_failed" | "clip_popped";
875
- readonly transportGeneration: string;
876
- };
877
- readonly context: {
878
- readonly operation?: string;
879
- readonly requestId?: string;
880
- readonly sessionId?: string;
881
- readonly generation?: string;
882
- readonly outcome?: "not-submitted" | "replied" | "unknown";
883
- };
884
- }, unknown, never, never>, never, never>>;
885
- }>;
886
- readonly policy: Schema.$Array<Schema.Struct<{
887
- readonly operation: Schema.String;
888
- readonly result: Schema.Result<Schema.Void, Schema.Union<readonly [Schema.decodeTo<Schema.declare<CommandFailure, CommandFailure>, Schema.Codec<{
889
- readonly _tag: "CommandFailure";
890
- readonly message: string;
891
- readonly reason: {
892
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
893
- readonly message: string;
894
- } | {
895
- readonly _tag: "Http";
896
- readonly message: string;
897
- readonly status?: number;
898
- readonly retryAfterMillis?: number;
899
- } | {
900
- readonly _tag: "RecorderDisabled" | "Remote";
901
- readonly message: string;
902
- readonly remoteCode?: string;
903
- } | {
904
- readonly _tag: "Native";
905
- readonly message: string;
906
- readonly status?: number;
907
- } | {
908
- readonly _tag: "IceFailed";
909
- readonly message: string;
910
- readonly pairs: number;
911
- readonly candidateTypes: readonly string[];
912
- } | {
913
- readonly _tag: "TransportFailed";
914
- readonly message: string;
915
- readonly pairs: number;
916
- } | {
917
- readonly _tag: "ClipEnded";
918
- readonly message: string;
919
- readonly clipId: string;
920
- readonly lifecycle: "clip_failed" | "clip_popped";
921
- readonly transportGeneration: string;
922
- };
923
- readonly context: {
924
- readonly operation?: string;
925
- readonly requestId?: string;
926
- readonly sessionId?: string;
927
- readonly generation?: string;
928
- readonly outcome?: "not-submitted" | "replied" | "unknown";
929
- };
930
- }, unknown, never, never>, never, never>, Schema.decodeTo<Schema.declare<PolicyFailure, PolicyFailure>, Schema.Codec<{
931
- readonly _tag: "PolicyFailure";
932
- readonly message: string;
933
- readonly reason: {
934
- readonly _tag: "AnchorUnavailable" | "AnnotationCapacity" | "Busy" | "ContinuationUnavailable" | "IdentityExhausted" | "InvalidRequest" | "NotFound" | "OwnerConflict" | "PositionConflict" | "QueueChanged" | "QueueFull" | "RouteChanged" | "SessionClosed" | "SessionRecovering" | "SessionRetired" | "SubmissionCapacity";
935
- readonly message: string;
936
- } | {
937
- readonly _tag: "Missing";
938
- readonly message: string;
939
- readonly purpose: "anchor" | "continuation" | "session_anchor";
940
- } | {
941
- readonly _tag: "Sequence";
942
- readonly message: string;
943
- readonly sequenceId: string;
944
- readonly code: "capacity" | "indeterminate" | "member-capacity" | "member-duplicate" | "member-missing" | "missing" | "not-releasable" | "owner-mismatch" | "retired" | "sealed" | "sealing";
945
- };
946
- readonly context: {
947
- readonly operation?: string;
948
- readonly requestId?: string;
949
- readonly sessionId?: string;
950
- readonly generation?: string;
951
- readonly outcome?: "not-submitted" | "replied" | "unknown";
952
- };
953
- }, unknown, never, never>, never, never>]>>;
954
- }>>;
955
- }>>;
956
- }>;
957
- export interface CleanupReport extends Schema.Schema.Type<typeof CleanupReport> {
958
- }
959
- /** The facts that decide whether a retirement is proven complete. */
960
- interface RetirementEvidence {
961
- readonly source?: {
962
- readonly sessionId: string;
963
- } | undefined;
964
- readonly cleanup?: SourceCleanup | undefined;
965
- readonly conflictingCleanup?: SourceCleanup | undefined;
966
- readonly retirement: {
967
- readonly accounting: "settled" | "timed-out" | "not-applicable";
968
- readonly scope: "closed" | "failed";
969
- readonly affinity: "retired" | "failed" | "not-applicable";
970
- readonly errors: readonly unknown[];
971
- readonly unknownSubmissions: bigint;
972
- };
973
- }
974
- /**
975
- * The omitted-complete counter a proven complete retirement belongs to, or
976
- * undefined when its evidence is incomplete. The retention owner classifies
977
- * with it and the summary codec checks rows marked complete against it, so
978
- * decoded evidence cannot present an incomplete retirement as compacted.
979
- */
980
- export declare const completeKind: (evidence: RetirementEvidence) => "noAllocation" | "ownedTerminated" | "attachedDetached" | undefined;
981
- /**
982
- * Continuous cleanup is explicitly summarized. The absence of `sessions` makes
983
- * legacy complete-history decoders reject it instead of accepting truncated evidence.
984
- * JSON codecs encode its exact counts and ordinals as decimal strings.
985
- */
986
- export declare const CleanupSummary: Schema.Struct<{
987
- readonly format: Schema.Literal<"reactor-orchestration-cleanup-summary/v1">;
988
- readonly totalRetirements: Schema.BigInt;
989
- readonly omittedComplete: Schema.Struct<{
990
- readonly noAllocation: Schema.BigInt;
991
- readonly ownedTerminated: Schema.BigInt;
992
- readonly attachedDetached: Schema.BigInt;
993
- }>;
994
- readonly retained: Schema.$Array<Schema.Struct<{
995
- readonly ordinal: Schema.BigInt;
996
- readonly source: Schema.optionalKey<Schema.Struct<{
997
- readonly sessionId: Schema.String;
998
- readonly incarnation: Schema.BigInt;
999
- }>>;
1000
- readonly cleanup: Schema.optionalKey<Schema.Struct<{
1001
- /** The unmodified lifecycle owner's canonical cleanup evidence. */
1002
- readonly lease: Schema.Struct<{
1003
- readonly localClosed: Schema.Boolean;
1004
- readonly allocation: Schema.Literals<readonly ["none", "known", "unknown"]>;
1005
- readonly ownership: Schema.optionalKey<Schema.Literals<readonly ["owned", "attached"]>>;
1006
- readonly sessionId: Schema.optionalKey<Schema.String>;
1007
- readonly remote: Schema.Struct<{
1008
- readonly attempted: Schema.Boolean;
1009
- readonly responseReceived: Schema.Boolean;
1010
- readonly confirmed: Schema.Boolean;
1011
- readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
1012
- readonly deleteStatus: Schema.NullOr<Schema.Int>;
1013
- readonly state: Schema.NullOr<Schema.String>;
1014
- readonly error: Schema.optionalKey<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
1015
- readonly _tag: "ReactorError";
1016
- readonly message: string;
1017
- readonly reason: {
1018
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1019
- readonly message: string;
1020
- } | {
1021
- readonly _tag: "Http";
1022
- readonly message: string;
1023
- readonly status?: number;
1024
- readonly retryAfterMillis?: number;
1025
- } | {
1026
- readonly _tag: "RecorderDisabled" | "Remote";
1027
- readonly message: string;
1028
- readonly remoteCode?: string;
1029
- } | {
1030
- readonly _tag: "Native";
1031
- readonly message: string;
1032
- readonly status?: number;
1033
- } | {
1034
- readonly _tag: "IceFailed";
1035
- readonly message: string;
1036
- readonly pairs: number;
1037
- readonly candidateTypes: readonly string[];
1038
- } | {
1039
- readonly _tag: "TransportFailed";
1040
- readonly message: string;
1041
- readonly pairs: number;
1042
- } | {
1043
- readonly _tag: "ClipEnded";
1044
- readonly message: string;
1045
- readonly clipId: string;
1046
- readonly lifecycle: "clip_failed" | "clip_popped";
1047
- readonly transportGeneration: string;
1048
- };
1049
- readonly context: {
1050
- readonly operation?: string;
1051
- readonly requestId?: string;
1052
- readonly sessionId?: string;
1053
- readonly generation?: string;
1054
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1055
- };
1056
- }, unknown, never, never>, never, never>>;
1057
- }>;
1058
- readonly unpublishSubmitted: Schema.$Array<Schema.String>;
1059
- readonly unresolvedPublications: Schema.$Array<Schema.String>;
1060
- readonly localErrors: Schema.$Array<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
1061
- readonly _tag: "ReactorError";
1062
- readonly message: string;
1063
- readonly reason: {
1064
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1065
- readonly message: string;
1066
- } | {
1067
- readonly _tag: "Http";
1068
- readonly message: string;
1069
- readonly status?: number;
1070
- readonly retryAfterMillis?: number;
1071
- } | {
1072
- readonly _tag: "RecorderDisabled" | "Remote";
1073
- readonly message: string;
1074
- readonly remoteCode?: string;
1075
- } | {
1076
- readonly _tag: "Native";
1077
- readonly message: string;
1078
- readonly status?: number;
1079
- } | {
1080
- readonly _tag: "IceFailed";
1081
- readonly message: string;
1082
- readonly pairs: number;
1083
- readonly candidateTypes: readonly string[];
1084
- } | {
1085
- readonly _tag: "TransportFailed";
1086
- readonly message: string;
1087
- readonly pairs: number;
1088
- } | {
1089
- readonly _tag: "ClipEnded";
1090
- readonly message: string;
1091
- readonly clipId: string;
1092
- readonly lifecycle: "clip_failed" | "clip_popped";
1093
- readonly transportGeneration: string;
1094
- };
1095
- readonly context: {
1096
- readonly operation?: string;
1097
- readonly requestId?: string;
1098
- readonly sessionId?: string;
1099
- readonly generation?: string;
1100
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1101
- };
1102
- }, unknown, never, never>, never, never>>;
1103
- }>;
1104
- readonly policy: Schema.$Array<Schema.Struct<{
1105
- readonly operation: Schema.String;
1106
- readonly result: Schema.Result<Schema.Void, Schema.Union<readonly [Schema.decodeTo<Schema.declare<CommandFailure, CommandFailure>, Schema.Codec<{
1107
- readonly _tag: "CommandFailure";
1108
- readonly message: string;
1109
- readonly reason: {
1110
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1111
- readonly message: string;
1112
- } | {
1113
- readonly _tag: "Http";
1114
- readonly message: string;
1115
- readonly status?: number;
1116
- readonly retryAfterMillis?: number;
1117
- } | {
1118
- readonly _tag: "RecorderDisabled" | "Remote";
1119
- readonly message: string;
1120
- readonly remoteCode?: string;
1121
- } | {
1122
- readonly _tag: "Native";
1123
- readonly message: string;
1124
- readonly status?: number;
1125
- } | {
1126
- readonly _tag: "IceFailed";
1127
- readonly message: string;
1128
- readonly pairs: number;
1129
- readonly candidateTypes: readonly string[];
1130
- } | {
1131
- readonly _tag: "TransportFailed";
1132
- readonly message: string;
1133
- readonly pairs: number;
1134
- } | {
1135
- readonly _tag: "ClipEnded";
1136
- readonly message: string;
1137
- readonly clipId: string;
1138
- readonly lifecycle: "clip_failed" | "clip_popped";
1139
- readonly transportGeneration: string;
1140
- };
1141
- readonly context: {
1142
- readonly operation?: string;
1143
- readonly requestId?: string;
1144
- readonly sessionId?: string;
1145
- readonly generation?: string;
1146
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1147
- };
1148
- }, unknown, never, never>, never, never>, Schema.decodeTo<Schema.declare<PolicyFailure, PolicyFailure>, Schema.Codec<{
1149
- readonly _tag: "PolicyFailure";
1150
- readonly message: string;
1151
- readonly reason: {
1152
- readonly _tag: "AnchorUnavailable" | "AnnotationCapacity" | "Busy" | "ContinuationUnavailable" | "IdentityExhausted" | "InvalidRequest" | "NotFound" | "OwnerConflict" | "PositionConflict" | "QueueChanged" | "QueueFull" | "RouteChanged" | "SessionClosed" | "SessionRecovering" | "SessionRetired" | "SubmissionCapacity";
1153
- readonly message: string;
1154
- } | {
1155
- readonly _tag: "Missing";
1156
- readonly message: string;
1157
- readonly purpose: "anchor" | "continuation" | "session_anchor";
1158
- } | {
1159
- readonly _tag: "Sequence";
1160
- readonly message: string;
1161
- readonly sequenceId: string;
1162
- readonly code: "capacity" | "indeterminate" | "member-capacity" | "member-duplicate" | "member-missing" | "missing" | "not-releasable" | "owner-mismatch" | "retired" | "sealed" | "sealing";
1163
- };
1164
- readonly context: {
1165
- readonly operation?: string;
1166
- readonly requestId?: string;
1167
- readonly sessionId?: string;
1168
- readonly generation?: string;
1169
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1170
- };
1171
- }, unknown, never, never>, never, never>]>>;
1172
- }>>;
1173
- }>>;
1174
- readonly conflictingCleanup: Schema.optionalKey<Schema.Struct<{
1175
- /** The unmodified lifecycle owner's canonical cleanup evidence. */
1176
- readonly lease: Schema.Struct<{
1177
- readonly localClosed: Schema.Boolean;
1178
- readonly allocation: Schema.Literals<readonly ["none", "known", "unknown"]>;
1179
- readonly ownership: Schema.optionalKey<Schema.Literals<readonly ["owned", "attached"]>>;
1180
- readonly sessionId: Schema.optionalKey<Schema.String>;
1181
- readonly remote: Schema.Struct<{
1182
- readonly attempted: Schema.Boolean;
1183
- readonly responseReceived: Schema.Boolean;
1184
- readonly confirmed: Schema.Boolean;
1185
- readonly evidence: Schema.NullOr<Schema.Literals<readonly ["absent", "terminal"]>>;
1186
- readonly deleteStatus: Schema.NullOr<Schema.Int>;
1187
- readonly state: Schema.NullOr<Schema.String>;
1188
- readonly error: Schema.optionalKey<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
1189
- readonly _tag: "ReactorError";
1190
- readonly message: string;
1191
- readonly reason: {
1192
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1193
- readonly message: string;
1194
- } | {
1195
- readonly _tag: "Http";
1196
- readonly message: string;
1197
- readonly status?: number;
1198
- readonly retryAfterMillis?: number;
1199
- } | {
1200
- readonly _tag: "RecorderDisabled" | "Remote";
1201
- readonly message: string;
1202
- readonly remoteCode?: string;
1203
- } | {
1204
- readonly _tag: "Native";
1205
- readonly message: string;
1206
- readonly status?: number;
1207
- } | {
1208
- readonly _tag: "IceFailed";
1209
- readonly message: string;
1210
- readonly pairs: number;
1211
- readonly candidateTypes: readonly string[];
1212
- } | {
1213
- readonly _tag: "TransportFailed";
1214
- readonly message: string;
1215
- readonly pairs: number;
1216
- } | {
1217
- readonly _tag: "ClipEnded";
1218
- readonly message: string;
1219
- readonly clipId: string;
1220
- readonly lifecycle: "clip_failed" | "clip_popped";
1221
- readonly transportGeneration: string;
1222
- };
1223
- readonly context: {
1224
- readonly operation?: string;
1225
- readonly requestId?: string;
1226
- readonly sessionId?: string;
1227
- readonly generation?: string;
1228
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1229
- };
1230
- }, unknown, never, never>, never, never>>;
1231
- }>;
1232
- readonly unpublishSubmitted: Schema.$Array<Schema.String>;
1233
- readonly unresolvedPublications: Schema.$Array<Schema.String>;
1234
- readonly localErrors: Schema.$Array<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
1235
- readonly _tag: "ReactorError";
1236
- readonly message: string;
1237
- readonly reason: {
1238
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1239
- readonly message: string;
1240
- } | {
1241
- readonly _tag: "Http";
1242
- readonly message: string;
1243
- readonly status?: number;
1244
- readonly retryAfterMillis?: number;
1245
- } | {
1246
- readonly _tag: "RecorderDisabled" | "Remote";
1247
- readonly message: string;
1248
- readonly remoteCode?: string;
1249
- } | {
1250
- readonly _tag: "Native";
1251
- readonly message: string;
1252
- readonly status?: number;
1253
- } | {
1254
- readonly _tag: "IceFailed";
1255
- readonly message: string;
1256
- readonly pairs: number;
1257
- readonly candidateTypes: readonly string[];
1258
- } | {
1259
- readonly _tag: "TransportFailed";
1260
- readonly message: string;
1261
- readonly pairs: number;
1262
- } | {
1263
- readonly _tag: "ClipEnded";
1264
- readonly message: string;
1265
- readonly clipId: string;
1266
- readonly lifecycle: "clip_failed" | "clip_popped";
1267
- readonly transportGeneration: string;
1268
- };
1269
- readonly context: {
1270
- readonly operation?: string;
1271
- readonly requestId?: string;
1272
- readonly sessionId?: string;
1273
- readonly generation?: string;
1274
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1275
- };
1276
- }, unknown, never, never>, never, never>>;
1277
- }>;
1278
- readonly policy: Schema.$Array<Schema.Struct<{
1279
- readonly operation: Schema.String;
1280
- readonly result: Schema.Result<Schema.Void, Schema.Union<readonly [Schema.decodeTo<Schema.declare<CommandFailure, CommandFailure>, Schema.Codec<{
1281
- readonly _tag: "CommandFailure";
1282
- readonly message: string;
1283
- readonly reason: {
1284
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1285
- readonly message: string;
1286
- } | {
1287
- readonly _tag: "Http";
1288
- readonly message: string;
1289
- readonly status?: number;
1290
- readonly retryAfterMillis?: number;
1291
- } | {
1292
- readonly _tag: "RecorderDisabled" | "Remote";
1293
- readonly message: string;
1294
- readonly remoteCode?: string;
1295
- } | {
1296
- readonly _tag: "Native";
1297
- readonly message: string;
1298
- readonly status?: number;
1299
- } | {
1300
- readonly _tag: "IceFailed";
1301
- readonly message: string;
1302
- readonly pairs: number;
1303
- readonly candidateTypes: readonly string[];
1304
- } | {
1305
- readonly _tag: "TransportFailed";
1306
- readonly message: string;
1307
- readonly pairs: number;
1308
- } | {
1309
- readonly _tag: "ClipEnded";
1310
- readonly message: string;
1311
- readonly clipId: string;
1312
- readonly lifecycle: "clip_failed" | "clip_popped";
1313
- readonly transportGeneration: string;
1314
- };
1315
- readonly context: {
1316
- readonly operation?: string;
1317
- readonly requestId?: string;
1318
- readonly sessionId?: string;
1319
- readonly generation?: string;
1320
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1321
- };
1322
- }, unknown, never, never>, never, never>, Schema.decodeTo<Schema.declare<PolicyFailure, PolicyFailure>, Schema.Codec<{
1323
- readonly _tag: "PolicyFailure";
1324
- readonly message: string;
1325
- readonly reason: {
1326
- readonly _tag: "AnchorUnavailable" | "AnnotationCapacity" | "Busy" | "ContinuationUnavailable" | "IdentityExhausted" | "InvalidRequest" | "NotFound" | "OwnerConflict" | "PositionConflict" | "QueueChanged" | "QueueFull" | "RouteChanged" | "SessionClosed" | "SessionRecovering" | "SessionRetired" | "SubmissionCapacity";
1327
- readonly message: string;
1328
- } | {
1329
- readonly _tag: "Missing";
1330
- readonly message: string;
1331
- readonly purpose: "anchor" | "continuation" | "session_anchor";
1332
- } | {
1333
- readonly _tag: "Sequence";
1334
- readonly message: string;
1335
- readonly sequenceId: string;
1336
- readonly code: "capacity" | "indeterminate" | "member-capacity" | "member-duplicate" | "member-missing" | "missing" | "not-releasable" | "owner-mismatch" | "retired" | "sealed" | "sealing";
1337
- };
1338
- readonly context: {
1339
- readonly operation?: string;
1340
- readonly requestId?: string;
1341
- readonly sessionId?: string;
1342
- readonly generation?: string;
1343
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1344
- };
1345
- }, unknown, never, never>, never, never>]>>;
1346
- }>>;
1347
- }>>;
1348
- readonly retirement: Schema.Struct<{
1349
- readonly accounting: Schema.Literals<readonly ["settled", "timed-out", "not-applicable"]>;
1350
- readonly scope: Schema.Literals<readonly ["closed", "failed"]>;
1351
- readonly affinity: Schema.Literals<readonly ["retired", "failed", "not-applicable"]>;
1352
- readonly errors: Schema.$Array<Schema.decodeTo<Schema.declare<ReactorError, ReactorError>, Schema.Codec<{
1353
- readonly _tag: "ReactorError";
1354
- readonly message: string;
1355
- readonly reason: {
1356
- readonly _tag: "Aborted" | "AlreadyReading" | "ChannelClosed" | "Closed" | "Disconnected" | "Indeterminate" | "InvalidInput" | "InvalidState" | "Overflow" | "Protocol" | "SdpRejected" | "Shutdown" | "TerminalSession" | "Timeout" | "UnexpectedReply" | "UnsupportedCapability" | "UnsupportedHost" | "Upload" | "VersionMismatch";
1357
- readonly message: string;
1358
- } | {
1359
- readonly _tag: "Http";
1360
- readonly message: string;
1361
- readonly status?: number;
1362
- readonly retryAfterMillis?: number;
1363
- } | {
1364
- readonly _tag: "RecorderDisabled" | "Remote";
1365
- readonly message: string;
1366
- readonly remoteCode?: string;
1367
- } | {
1368
- readonly _tag: "Native";
1369
- readonly message: string;
1370
- readonly status?: number;
1371
- } | {
1372
- readonly _tag: "IceFailed";
1373
- readonly message: string;
1374
- readonly pairs: number;
1375
- readonly candidateTypes: readonly string[];
1376
- } | {
1377
- readonly _tag: "TransportFailed";
1378
- readonly message: string;
1379
- readonly pairs: number;
1380
- } | {
1381
- readonly _tag: "ClipEnded";
1382
- readonly message: string;
1383
- readonly clipId: string;
1384
- readonly lifecycle: "clip_failed" | "clip_popped";
1385
- readonly transportGeneration: string;
1386
- };
1387
- readonly context: {
1388
- readonly operation?: string;
1389
- readonly requestId?: string;
1390
- readonly sessionId?: string;
1391
- readonly generation?: string;
1392
- readonly outcome?: "not-submitted" | "replied" | "unknown";
1393
- };
1394
- }, unknown, never, never>, never, never>>;
1395
- /** Settled bookkeeping can still record an unknown dispatch outcome. */
1396
- readonly unknownSubmissions: Schema.BigInt;
1397
- }>;
1398
- readonly disposition: Schema.Literals<readonly ["complete", "incomplete"]>;
1399
- }>>;
1400
- readonly exhausted: Schema.Boolean;
1401
- }>;
1402
- export interface CleanupSummary extends Schema.Schema.Type<typeof CleanupSummary> {
1403
- }
1404
- /** Resolved by the one router; the full request remains a local annotation. */
1405
- export interface RoutedRequest {
1406
- readonly request: ClipRequest;
1407
- readonly position: number | undefined;
1408
- }
1409
- export interface EnqueueHooks {
1410
- readonly commit?: (submissionId: string) => Effect.Effect<void, EngineError>;
1411
- readonly result?: (submissionId: string, result: Result.Result<ClipId, EngineError>) => Effect.Effect<void>;
1412
- }
1413
- /**
1414
- * One physical provider view or an explicit production simulator. It owns no
1415
- * sequence routing; a scheduled handle supplies every RoutedRequest.
1416
- */
1417
- export interface Source {
1418
- readonly id: string;
1419
- readonly state: Effect.Effect<EngineState>;
1420
- readonly events: Stream.Stream<EngineEvent, ReactorError>;
1421
- readonly observe: ObserveEngine;
1422
- readonly prepareRouted: (request: RoutedRequest, hooks?: EnqueueHooks) => Effect.Effect<Submission<ClipId, EngineError>, EngineError>;
1423
- readonly media: Effect.Effect<MediaSource, ReactorError>;
1424
- readonly reconnect: Effect.Effect<void, ReactorError | CommandFailure>;
1425
- readonly refresh: Effect.Effect<void, EngineError>;
1426
- readonly setAutoplay: (enabled: boolean) => Effect.Effect<void, EngineError>;
1427
- readonly stop: Effect.Effect<void, EngineError>;
1428
- readonly remove: (id: ClipId) => Effect.Effect<RemoveOutcome, EngineError>;
1429
- readonly move: (id: ClipId, position: number) => Effect.Effect<void, EngineError>;
1430
- readonly setCanvas: (canvas: Canvas) => Effect.Effect<void, EngineError>;
1431
- readonly close: Effect.Effect<SourceCleanup>;
1432
- }
1433
- export interface HandleShape {
1434
- readonly engine: EngineShape;
1435
- readonly media: MediaShape;
1436
- /** The current media state; like `engine.state`, it fails with a renewal worker's Cause until close begins. */
1437
- readonly mediaState: Effect.Effect<MediaState>;
1438
- /** Engine, renewal and media changes in one ordered stream, after the current state. */
1439
- readonly observe: (options?: ObservationOptions) => Effect.Effect<HandleObservation, ReactorError, Scope.Scope>;
1440
- readonly sessionId: Effect.Effect<Option.Option<string>>;
1441
- readonly close: Effect.Effect<CleanupReport>;
1442
- readonly cleanup: Effect.Effect<Option.Option<CleanupReport>>;
1443
- readonly sequences: Pick<Affinity<string>, "get" | "snapshots" | "seal" | "acknowledgeIndeterminate" | "release">;
1444
- }
1445
- /** Opt-in continuous renewal retains bounded cleanup evidence in a distinct report. */
1446
- export interface ContinuousHandleShape extends Omit<HandleShape, "close" | "cleanup"> {
1447
- readonly close: Effect.Effect<CleanupSummary>;
1448
- readonly cleanup: Effect.Effect<Option.Option<CleanupSummary>>;
1449
- }
1450
- declare const Engine_base: Context.ServiceClass<Engine, "reactor-effect-client/Orchestration/Engine", EngineShape>;
1451
- export declare class Engine extends Engine_base {
1452
- }
1453
- declare const Media_base: Context.ServiceClass<Media, "reactor-effect-client/Orchestration/Media", MediaShape>;
1454
- export declare class Media extends Media_base {
1455
- }
1456
- declare const Handle_base: Context.ServiceClass<Handle, "reactor-effect-client/Orchestration/Handle", HandleShape>;
1457
- export declare class Handle extends Handle_base {
1458
- }
1459
- /** The three services of one handle, so its facets can never come from two orchestrations. */
1460
- export declare const handleContext: (handle: HandleShape) => Context.Context<Engine | Media | Handle>;
1461
- export {};
1462
- //# sourceMappingURL=types.d.ts.map