@automovie/render 0.0.0-stage → 0.0.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 (503) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/lib/AUTOMOVIE_GUIDE_PASSES.d.ts +11 -0
  4. package/lib/AUTOMOVIE_GUIDE_PASSES.js +21 -0
  5. package/lib/AUTOMOVIE_GUIDE_PASSES.js.map +1 -0
  6. package/lib/IAutoMovieCaptionEntry.d.ts +28 -0
  7. package/lib/IAutoMovieCaptionEntry.js +3 -0
  8. package/lib/IAutoMovieCaptionEntry.js.map +1 -0
  9. package/lib/IAutoMovieCaptionSidecar.d.ts +25 -0
  10. package/lib/IAutoMovieCaptionSidecar.js +3 -0
  11. package/lib/IAutoMovieCaptionSidecar.js.map +1 -0
  12. package/lib/IAutoMovieCapturedFrame.d.ts +22 -0
  13. package/lib/IAutoMovieCapturedFrame.js +3 -0
  14. package/lib/IAutoMovieCapturedFrame.js.map +1 -0
  15. package/lib/IAutoMovieGuidePassOutput.d.ts +23 -0
  16. package/lib/IAutoMovieGuidePassOutput.js +3 -0
  17. package/lib/IAutoMovieGuidePassOutput.js.map +1 -0
  18. package/lib/IAutoMoviePoseKeypointActor.d.ts +36 -0
  19. package/lib/IAutoMoviePoseKeypointActor.js +3 -0
  20. package/lib/IAutoMoviePoseKeypointActor.js.map +1 -0
  21. package/lib/IAutoMoviePoseKeypointFrame.d.ts +25 -0
  22. package/lib/IAutoMoviePoseKeypointFrame.js +3 -0
  23. package/lib/IAutoMoviePoseKeypointFrame.js.map +1 -0
  24. package/lib/IAutoMoviePoseKeypointSidecar.d.ts +21 -0
  25. package/lib/IAutoMoviePoseKeypointSidecar.js +3 -0
  26. package/lib/IAutoMoviePoseKeypointSidecar.js.map +1 -0
  27. package/lib/IAutoMovieRenderAdapters.d.ts +34 -0
  28. package/lib/IAutoMovieRenderAdapters.js +3 -0
  29. package/lib/IAutoMovieRenderAdapters.js.map +1 -0
  30. package/lib/IAutoMovieRenderAndSeeRequest.d.ts +32 -0
  31. package/lib/IAutoMovieRenderAndSeeRequest.js +3 -0
  32. package/lib/IAutoMovieRenderAndSeeRequest.js.map +1 -0
  33. package/lib/IAutoMovieRenderAndSeeResult.d.ts +20 -0
  34. package/lib/IAutoMovieRenderAndSeeResult.js +3 -0
  35. package/lib/IAutoMovieRenderAndSeeResult.js.map +1 -0
  36. package/lib/IAutoMovieRenderChunk.d.ts +48 -0
  37. package/lib/IAutoMovieRenderChunk.js +3 -0
  38. package/lib/IAutoMovieRenderChunk.js.map +1 -0
  39. package/lib/IAutoMovieRenderChunkPlan.d.ts +32 -0
  40. package/lib/IAutoMovieRenderChunkPlan.js +3 -0
  41. package/lib/IAutoMovieRenderChunkPlan.js.map +1 -0
  42. package/lib/IAutoMovieRenderPassManifest.d.ts +21 -0
  43. package/lib/IAutoMovieRenderPassManifest.js +3 -0
  44. package/lib/IAutoMovieRenderPassManifest.js.map +1 -0
  45. package/lib/IAutoMovieRenderReassembly.d.ts +24 -0
  46. package/lib/IAutoMovieRenderReassembly.js +3 -0
  47. package/lib/IAutoMovieRenderReassembly.js.map +1 -0
  48. package/lib/IAutoMovieRenderResult.d.ts +39 -0
  49. package/lib/IAutoMovieRenderResult.js +3 -0
  50. package/lib/IAutoMovieRenderResult.js.map +1 -0
  51. package/lib/IAutoMovieSequenceRenderAdapters.d.ts +36 -0
  52. package/lib/IAutoMovieSequenceRenderAdapters.js +3 -0
  53. package/lib/IAutoMovieSequenceRenderAdapters.js.map +1 -0
  54. package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +36 -0
  55. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js +3 -0
  56. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js.map +1 -0
  57. package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +23 -0
  58. package/lib/IAutoMovieSequenceRenderAndSeeResult.js +3 -0
  59. package/lib/IAutoMovieSequenceRenderAndSeeResult.js.map +1 -0
  60. package/lib/IAutoMovieSequenceRenderFrame.d.ts +41 -0
  61. package/lib/IAutoMovieSequenceRenderFrame.js +3 -0
  62. package/lib/IAutoMovieSequenceRenderFrame.js.map +1 -0
  63. package/lib/IAutoMovieSequenceRenderPlan.d.ts +76 -0
  64. package/lib/IAutoMovieSequenceRenderPlan.js +3 -0
  65. package/lib/IAutoMovieSequenceRenderPlan.js.map +1 -0
  66. package/lib/IAutoMovieSequenceRenderResult.d.ts +44 -0
  67. package/lib/IAutoMovieSequenceRenderResult.js +3 -0
  68. package/lib/IAutoMovieSequenceRenderResult.js.map +1 -0
  69. package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +39 -0
  70. package/lib/IAutoMovieSequenceRenderShotSpan.js +3 -0
  71. package/lib/IAutoMovieSequenceRenderShotSpan.js.map +1 -0
  72. package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +39 -0
  73. package/lib/IAutoMovieSequenceRenderTransitionSpan.js +3 -0
  74. package/lib/IAutoMovieSequenceRenderTransitionSpan.js.map +1 -0
  75. package/lib/audio/encodeAutoMovieWavPcm16.d.ts +21 -0
  76. package/lib/audio/encodeAutoMovieWavPcm16.js +59 -0
  77. package/lib/audio/encodeAutoMovieWavPcm16.js.map +1 -0
  78. package/lib/audio/index.d.ts +2 -0
  79. package/lib/audio/index.js +19 -0
  80. package/lib/audio/index.js.map +1 -0
  81. package/lib/audio/mixAutoMovieAudioPcm.d.ts +64 -0
  82. package/lib/audio/mixAutoMovieAudioPcm.js +86 -0
  83. package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -0
  84. package/lib/auditAutoMovieRenderObservation.d.ts +31 -0
  85. package/lib/auditAutoMovieRenderObservation.js +63 -0
  86. package/lib/auditAutoMovieRenderObservation.js.map +1 -0
  87. package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +28 -0
  88. package/lib/cache/createAutoMovieHttpArtifactStore.js +66 -0
  89. package/lib/cache/createAutoMovieHttpArtifactStore.js.map +1 -0
  90. package/lib/caption/IAutoMovieBeatCaption.d.ts +22 -0
  91. package/lib/caption/IAutoMovieBeatCaption.js +3 -0
  92. package/lib/caption/IAutoMovieBeatCaption.js.map +1 -0
  93. package/lib/caption/autoMovieCaptionLanguageComparisonKey.d.ts +18 -0
  94. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js +24 -0
  95. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js.map +1 -0
  96. package/lib/caption/beatCaptions.d.ts +22 -0
  97. package/lib/caption/beatCaptions.js +50 -0
  98. package/lib/caption/beatCaptions.js.map +1 -0
  99. package/lib/caption/canonicalProductionWebVtt.d.ts +23 -0
  100. package/lib/caption/canonicalProductionWebVtt.js +60 -0
  101. package/lib/caption/canonicalProductionWebVtt.js.map +1 -0
  102. package/lib/caption/canonicalizeAutoMovieCaptionText.d.ts +18 -0
  103. package/lib/caption/canonicalizeAutoMovieCaptionText.js +24 -0
  104. package/lib/caption/canonicalizeAutoMovieCaptionText.js.map +1 -0
  105. package/lib/caption/escapeWebVttText.d.ts +17 -0
  106. package/lib/caption/escapeWebVttText.js +25 -0
  107. package/lib/caption/escapeWebVttText.js.map +1 -0
  108. package/lib/caption/index.d.ts +11 -0
  109. package/lib/caption/index.js +28 -0
  110. package/lib/caption/index.js.map +1 -0
  111. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +37 -0
  112. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js +129 -0
  113. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -0
  114. package/lib/caption/isAutoMovieWebVttIdentifier.d.ts +21 -0
  115. package/lib/caption/isAutoMovieWebVttIdentifier.js +28 -0
  116. package/lib/caption/isAutoMovieWebVttIdentifier.js.map +1 -0
  117. package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +34 -0
  118. package/lib/caption/parseAutoMovieCaptionLanguage.js +121 -0
  119. package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -0
  120. package/lib/caption/serializeAutoMovieWebVttCueText.d.ts +17 -0
  121. package/lib/caption/serializeAutoMovieWebVttCueText.js +27 -0
  122. package/lib/caption/serializeAutoMovieWebVttCueText.js.map +1 -0
  123. package/lib/caption/serializeAutoMovieWebVttIdentifier.d.ts +17 -0
  124. package/lib/caption/serializeAutoMovieWebVttIdentifier.js +27 -0
  125. package/lib/caption/serializeAutoMovieWebVttIdentifier.js.map +1 -0
  126. package/lib/caption/serializeAutoMovieWebVttSingleLineText.d.ts +19 -0
  127. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js +26 -0
  128. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js.map +1 -0
  129. package/lib/caption/webVttCaptionLanguage.d.ts +18 -0
  130. package/lib/caption/webVttCaptionLanguage.js +29 -0
  131. package/lib/caption/webVttCaptionLanguage.js.map +1 -0
  132. package/lib/caption/webVttTime.d.ts +19 -0
  133. package/lib/caption/webVttTime.js +30 -0
  134. package/lib/caption/webVttTime.js.map +1 -0
  135. package/lib/captionPlan.d.ts +1 -0
  136. package/lib/captionPlan.js +18 -0
  137. package/lib/captionPlan.js.map +1 -0
  138. package/lib/captionSidecar.d.ts +3 -0
  139. package/lib/captionSidecar.js +20 -0
  140. package/lib/captionSidecar.js.map +1 -0
  141. package/lib/captionSlice.d.ts +1 -0
  142. package/lib/captionSlice.js +18 -0
  143. package/lib/captionSlice.js.map +1 -0
  144. package/lib/chunkSequenceRender.d.ts +5 -0
  145. package/lib/chunkSequenceRender.js +22 -0
  146. package/lib/chunkSequenceRender.js.map +1 -0
  147. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +16 -0
  148. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js +20 -0
  149. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -0
  150. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.d.ts +11 -0
  151. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js +14 -0
  152. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js.map +1 -0
  153. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +15 -0
  154. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js +19 -0
  155. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -0
  156. package/lib/delivery/AutoMovieProductionPngRole.d.ts +14 -0
  157. package/lib/delivery/AutoMovieProductionPngRole.js +3 -0
  158. package/lib/delivery/AutoMovieProductionPngRole.js.map +1 -0
  159. package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +41 -0
  160. package/lib/delivery/IAutoMovieProductionPngProfile.js +3 -0
  161. package/lib/delivery/IAutoMovieProductionPngProfile.js.map +1 -0
  162. package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +46 -0
  163. package/lib/delivery/IAutoMovieProductionVideoProfile.js +3 -0
  164. package/lib/delivery/IAutoMovieProductionVideoProfile.js.map +1 -0
  165. package/lib/delivery/assertAutoMovieCaptureClock.d.ts +26 -0
  166. package/lib/delivery/assertAutoMovieCaptureClock.js +29 -0
  167. package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -0
  168. package/lib/delivery/assertProductionOpusProfile.d.ts +23 -0
  169. package/lib/delivery/assertProductionOpusProfile.js +160 -0
  170. package/lib/delivery/assertProductionOpusProfile.js.map +1 -0
  171. package/lib/delivery/assertProductionPngPicture.d.ts +24 -0
  172. package/lib/delivery/assertProductionPngPicture.js +47 -0
  173. package/lib/delivery/assertProductionPngPicture.js.map +1 -0
  174. package/lib/delivery/assertProductionVideoProfile.d.ts +30 -0
  175. package/lib/delivery/assertProductionVideoProfile.js +150 -0
  176. package/lib/delivery/assertProductionVideoProfile.js.map +1 -0
  177. package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +56 -0
  178. package/lib/delivery/auditAutoMovieDecodedFrames.js +92 -0
  179. package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -0
  180. package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +27 -0
  181. package/lib/delivery/auditAutoMovieEncodedPresentation.js +62 -0
  182. package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -0
  183. package/lib/delivery/index.d.ts +14 -0
  184. package/lib/delivery/index.js +31 -0
  185. package/lib/delivery/index.js.map +1 -0
  186. package/lib/delivery/planAutoMovieCaptureUrl.d.ts +18 -0
  187. package/lib/delivery/planAutoMovieCaptureUrl.js +31 -0
  188. package/lib/delivery/planAutoMovieCaptureUrl.js.map +1 -0
  189. package/lib/delivery/productionOpusDescription.d.ts +41 -0
  190. package/lib/delivery/productionOpusDescription.js +125 -0
  191. package/lib/delivery/productionOpusDescription.js.map +1 -0
  192. package/lib/delivery/resolveProductionPngProfile.d.ts +27 -0
  193. package/lib/delivery/resolveProductionPngProfile.js +53 -0
  194. package/lib/delivery/resolveProductionPngProfile.js.map +1 -0
  195. package/lib/delivery/resolveProductionVideoProfile.d.ts +27 -0
  196. package/lib/delivery/resolveProductionVideoProfile.js +36 -0
  197. package/lib/delivery/resolveProductionVideoProfile.js.map +1 -0
  198. package/lib/ffmpegArgs.d.ts +33 -0
  199. package/lib/ffmpegArgs.js +56 -0
  200. package/lib/ffmpegArgs.js.map +1 -0
  201. package/lib/film/AutoMovieOrderedScalar.d.ts +15 -0
  202. package/lib/film/AutoMovieOrderedScalar.js +3 -0
  203. package/lib/film/AutoMovieOrderedScalar.js.map +1 -0
  204. package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +28 -0
  205. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js +3 -0
  206. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js.map +1 -0
  207. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +29 -0
  208. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js +3 -0
  209. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js.map +1 -0
  210. package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +36 -0
  211. package/lib/film/IAutoMovieProductionEncoderIdentity.js +3 -0
  212. package/lib/film/IAutoMovieProductionEncoderIdentity.js.map +1 -0
  213. package/lib/film/IAutoMovieProductionRenderChunk.d.ts +39 -0
  214. package/lib/film/IAutoMovieProductionRenderChunk.js +3 -0
  215. package/lib/film/IAutoMovieProductionRenderChunk.js.map +1 -0
  216. package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +53 -0
  217. package/lib/film/IAutoMovieProductionRenderJobPlan.js +3 -0
  218. package/lib/film/IAutoMovieProductionRenderJobPlan.js.map +1 -0
  219. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +31 -0
  220. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js +3 -0
  221. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js.map +1 -0
  222. package/lib/film/IAutoMovieProductionRenderTier.d.ts +25 -0
  223. package/lib/film/IAutoMovieProductionRenderTier.js +3 -0
  224. package/lib/film/IAutoMovieProductionRenderTier.js.map +1 -0
  225. package/lib/film/assertSingleGuidePass.d.ts +19 -0
  226. package/lib/film/assertSingleGuidePass.js +35 -0
  227. package/lib/film/assertSingleGuidePass.js.map +1 -0
  228. package/lib/film/equalOrderedScalars.d.ts +27 -0
  229. package/lib/film/equalOrderedScalars.js +52 -0
  230. package/lib/film/equalOrderedScalars.js.map +1 -0
  231. package/lib/film/index.d.ts +9 -0
  232. package/lib/film/index.js +26 -0
  233. package/lib/film/index.js.map +1 -0
  234. package/lib/film/normalizeAudioAssets.d.ts +21 -0
  235. package/lib/film/normalizeAudioAssets.js +56 -0
  236. package/lib/film/normalizeAudioAssets.js.map +1 -0
  237. package/lib/film/normalizeRenderTier.d.ts +19 -0
  238. package/lib/film/normalizeRenderTier.js +45 -0
  239. package/lib/film/normalizeRenderTier.js.map +1 -0
  240. package/lib/film/planProductionRenderJob.d.ts +48 -0
  241. package/lib/film/planProductionRenderJob.js +196 -0
  242. package/lib/film/planProductionRenderJob.js.map +1 -0
  243. package/lib/film/productionVisualDeliveryOccurrence.d.ts +20 -0
  244. package/lib/film/productionVisualDeliveryOccurrence.js +24 -0
  245. package/lib/film/productionVisualDeliveryOccurrence.js.map +1 -0
  246. package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +21 -0
  247. package/lib/film/resolveProductionRenderTierFrameFormat.js +46 -0
  248. package/lib/film/resolveProductionRenderTierFrameFormat.js.map +1 -0
  249. package/lib/film/validDigest.d.ts +18 -0
  250. package/lib/film/validDigest.js +25 -0
  251. package/lib/film/validDigest.js.map +1 -0
  252. package/lib/film/validWaveAudioIdentity.d.ts +25 -0
  253. package/lib/film/validWaveAudioIdentity.js +76 -0
  254. package/lib/film/validWaveAudioIdentity.js.map +1 -0
  255. package/lib/frameName.d.ts +19 -0
  256. package/lib/frameName.js +24 -0
  257. package/lib/frameName.js.map +1 -0
  258. package/lib/framePattern.d.ts +16 -0
  259. package/lib/framePattern.js +21 -0
  260. package/lib/framePattern.js.map +1 -0
  261. package/lib/frameTimes.d.ts +20 -0
  262. package/lib/frameTimes.js +33 -0
  263. package/lib/frameTimes.js.map +1 -0
  264. package/lib/guidePassFrameName.d.ts +15 -0
  265. package/lib/guidePassFrameName.js +21 -0
  266. package/lib/guidePassFrameName.js.map +1 -0
  267. package/lib/guidePassFramePattern.d.ts +15 -0
  268. package/lib/guidePassFramePattern.js +21 -0
  269. package/lib/guidePassFramePattern.js.map +1 -0
  270. package/lib/guidePasses.d.ts +7 -0
  271. package/lib/guidePasses.js +24 -0
  272. package/lib/guidePasses.js.map +1 -0
  273. package/lib/guidePassesInternal/passExtension.d.ts +14 -0
  274. package/lib/guidePassesInternal/passExtension.js +18 -0
  275. package/lib/guidePassesInternal/passExtension.js.map +1 -0
  276. package/lib/index.d.ts +69 -0
  277. package/lib/index.js +86 -0
  278. package/lib/index.js.map +1 -0
  279. package/lib/isGuidePass.d.ts +15 -0
  280. package/lib/isGuidePass.js +20 -0
  281. package/lib/isGuidePass.js.map +1 -0
  282. package/lib/normalizeGuidePasses.d.ts +15 -0
  283. package/lib/normalizeGuidePasses.js +32 -0
  284. package/lib/normalizeGuidePasses.js.map +1 -0
  285. package/lib/planCaptionSidecar.d.ts +23 -0
  286. package/lib/planCaptionSidecar.js +56 -0
  287. package/lib/planCaptionSidecar.js.map +1 -0
  288. package/lib/planChunkedSequenceRender.d.ts +26 -0
  289. package/lib/planChunkedSequenceRender.js +132 -0
  290. package/lib/planChunkedSequenceRender.js.map +1 -0
  291. package/lib/planGuidePassOutputs.d.ts +19 -0
  292. package/lib/planGuidePassOutputs.js +31 -0
  293. package/lib/planGuidePassOutputs.js.map +1 -0
  294. package/lib/planPoseKeypointSidecar.d.ts +27 -0
  295. package/lib/planPoseKeypointSidecar.js +141 -0
  296. package/lib/planPoseKeypointSidecar.js.map +1 -0
  297. package/lib/planSequenceRender.d.ts +20 -0
  298. package/lib/planSequenceRender.js +99 -0
  299. package/lib/planSequenceRender.js.map +1 -0
  300. package/lib/planViewerFrameTimes.d.ts +33 -0
  301. package/lib/planViewerFrameTimes.js +74 -0
  302. package/lib/planViewerFrameTimes.js.map +1 -0
  303. package/lib/renderAndSee.d.ts +14 -0
  304. package/lib/renderAndSee.js +22 -0
  305. package/lib/renderAndSee.js.map +1 -0
  306. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +41 -0
  307. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js +3 -0
  308. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js.map +1 -0
  309. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +53 -0
  310. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js +3 -0
  311. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js.map +1 -0
  312. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +27 -0
  313. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js +3 -0
  314. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js.map +1 -0
  315. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +28 -0
  316. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js +77 -0
  317. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -0
  318. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +23 -0
  319. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js +55 -0
  320. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -0
  321. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +17 -0
  322. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js +51 -0
  323. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -0
  324. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +22 -0
  325. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js +32 -0
  326. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -0
  327. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +23 -0
  328. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js +35 -0
  329. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -0
  330. package/lib/renderBudgetPreflight/index.d.ts +9 -0
  331. package/lib/renderBudgetPreflight/index.js +26 -0
  332. package/lib/renderBudgetPreflight/index.js.map +1 -0
  333. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.d.ts +18 -0
  334. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js +22 -0
  335. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js.map +1 -0
  336. package/lib/renderCaptionSidecar.d.ts +13 -0
  337. package/lib/renderCaptionSidecar.js +17 -0
  338. package/lib/renderCaptionSidecar.js.map +1 -0
  339. package/lib/renderObservationAudit.d.ts +1 -0
  340. package/lib/renderObservationAudit.js +18 -0
  341. package/lib/renderObservationAudit.js.map +1 -0
  342. package/lib/renderPathStem.d.ts +22 -0
  343. package/lib/renderPathStem.js +64 -0
  344. package/lib/renderPathStem.js.map +1 -0
  345. package/lib/renderPoseKeypointSidecar.d.ts +15 -0
  346. package/lib/renderPoseKeypointSidecar.js +19 -0
  347. package/lib/renderPoseKeypointSidecar.js.map +1 -0
  348. package/lib/renderSequenceAndSee.d.ts +14 -0
  349. package/lib/renderSequenceAndSee.js +32 -0
  350. package/lib/renderSequenceAndSee.js.map +1 -0
  351. package/lib/renderSequenceVideo.d.ts +15 -0
  352. package/lib/renderSequenceVideo.js +35 -0
  353. package/lib/renderSequenceVideo.js.map +1 -0
  354. package/lib/renderVideo.d.ts +17 -0
  355. package/lib/renderVideo.js +45 -0
  356. package/lib/renderVideo.js.map +1 -0
  357. package/lib/screenplay/index.d.ts +1 -0
  358. package/lib/screenplay/index.js +18 -0
  359. package/lib/screenplay/index.js.map +1 -0
  360. package/lib/screenplay/renderScreenplay.d.ts +25 -0
  361. package/lib/screenplay/renderScreenplay.js +101 -0
  362. package/lib/screenplay/renderScreenplay.js.map +1 -0
  363. package/lib/screenplay/screenplaySceneSlug.d.ts +17 -0
  364. package/lib/screenplay/screenplaySceneSlug.js +21 -0
  365. package/lib/screenplay/screenplaySceneSlug.js.map +1 -0
  366. package/lib/sequenceRenderPlan.d.ts +5 -0
  367. package/lib/sequenceRenderPlan.js +22 -0
  368. package/lib/sequenceRenderPlan.js.map +1 -0
  369. package/lib/sequenceRenderVideo.d.ts +6 -0
  370. package/lib/sequenceRenderVideo.js +23 -0
  371. package/lib/sequenceRenderVideo.js.map +1 -0
  372. package/lib/shotBeat.d.ts +18 -0
  373. package/lib/shotBeat.js +23 -0
  374. package/lib/shotBeat.js.map +1 -0
  375. package/lib/sliceCaptionSidecar.d.ts +15 -0
  376. package/lib/sliceCaptionSidecar.js +57 -0
  377. package/lib/sliceCaptionSidecar.js.map +1 -0
  378. package/package.json +46 -3
  379. package/src/AUTOMOVIE_GUIDE_PASSES.ts +19 -0
  380. package/src/IAutoMovieCaptionEntry.ts +32 -0
  381. package/src/IAutoMovieCaptionSidecar.ts +29 -0
  382. package/src/IAutoMovieCapturedFrame.ts +24 -0
  383. package/src/IAutoMovieGuidePassOutput.ts +27 -0
  384. package/src/IAutoMoviePoseKeypointActor.ts +39 -0
  385. package/src/IAutoMoviePoseKeypointFrame.ts +28 -0
  386. package/src/IAutoMoviePoseKeypointSidecar.ts +25 -0
  387. package/src/IAutoMovieRenderAdapters.ts +39 -0
  388. package/src/IAutoMovieRenderAndSeeRequest.ts +38 -0
  389. package/src/IAutoMovieRenderAndSeeResult.ts +23 -0
  390. package/src/IAutoMovieRenderChunk.ts +62 -0
  391. package/src/IAutoMovieRenderChunkPlan.ts +40 -0
  392. package/src/IAutoMovieRenderPassManifest.ts +25 -0
  393. package/src/IAutoMovieRenderReassembly.ts +28 -0
  394. package/src/IAutoMovieRenderResult.ts +46 -0
  395. package/src/IAutoMovieSequenceRenderAdapters.ts +41 -0
  396. package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +47 -0
  397. package/src/IAutoMovieSequenceRenderAndSeeResult.ts +23 -0
  398. package/src/IAutoMovieSequenceRenderFrame.ts +48 -0
  399. package/src/IAutoMovieSequenceRenderPlan.ts +88 -0
  400. package/src/IAutoMovieSequenceRenderResult.ts +52 -0
  401. package/src/IAutoMovieSequenceRenderShotSpan.ts +46 -0
  402. package/src/IAutoMovieSequenceRenderTransitionSpan.ts +46 -0
  403. package/src/audio/encodeAutoMovieWavPcm16.ts +65 -0
  404. package/src/audio/index.ts +2 -0
  405. package/src/audio/mixAutoMovieAudioPcm.ts +137 -0
  406. package/src/auditAutoMovieRenderObservation.ts +79 -0
  407. package/src/cache/createAutoMovieHttpArtifactStore.ts +84 -0
  408. package/src/caption/IAutoMovieBeatCaption.ts +23 -0
  409. package/src/caption/autoMovieCaptionLanguageComparisonKey.ts +23 -0
  410. package/src/caption/beatCaptions.ts +59 -0
  411. package/src/caption/canonicalProductionWebVtt.ts +76 -0
  412. package/src/caption/canonicalizeAutoMovieCaptionText.ts +24 -0
  413. package/src/caption/escapeWebVttText.ts +23 -0
  414. package/src/caption/index.ts +11 -0
  415. package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +231 -0
  416. package/src/caption/isAutoMovieWebVttIdentifier.ts +26 -0
  417. package/src/caption/parseAutoMovieCaptionLanguage.ts +160 -0
  418. package/src/caption/serializeAutoMovieWebVttCueText.ts +28 -0
  419. package/src/caption/serializeAutoMovieWebVttIdentifier.ts +27 -0
  420. package/src/caption/serializeAutoMovieWebVttSingleLineText.ts +26 -0
  421. package/src/caption/webVttCaptionLanguage.ts +30 -0
  422. package/src/caption/webVttTime.ts +30 -0
  423. package/src/captionPlan.ts +1 -0
  424. package/src/captionSidecar.ts +3 -0
  425. package/src/captionSlice.ts +1 -0
  426. package/src/chunkSequenceRender.ts +5 -0
  427. package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +21 -0
  428. package/src/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.ts +14 -0
  429. package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +28 -0
  430. package/src/delivery/AutoMovieProductionPngRole.ts +18 -0
  431. package/src/delivery/IAutoMovieProductionPngProfile.ts +52 -0
  432. package/src/delivery/IAutoMovieProductionVideoProfile.ts +48 -0
  433. package/src/delivery/assertAutoMovieCaptureClock.ts +37 -0
  434. package/src/delivery/assertProductionOpusProfile.ts +179 -0
  435. package/src/delivery/assertProductionPngPicture.ts +62 -0
  436. package/src/delivery/assertProductionVideoProfile.ts +180 -0
  437. package/src/delivery/auditAutoMovieDecodedFrames.ts +157 -0
  438. package/src/delivery/auditAutoMovieEncodedPresentation.ts +86 -0
  439. package/src/delivery/index.ts +14 -0
  440. package/src/delivery/planAutoMovieCaptureUrl.ts +32 -0
  441. package/src/delivery/productionOpusDescription.ts +173 -0
  442. package/src/delivery/resolveProductionPngProfile.ts +70 -0
  443. package/src/delivery/resolveProductionVideoProfile.ts +48 -0
  444. package/src/ffmpegArgs.ts +61 -0
  445. package/src/film/AutoMovieOrderedScalar.ts +15 -0
  446. package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +40 -0
  447. package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +34 -0
  448. package/src/film/IAutoMovieProductionEncoderIdentity.ts +42 -0
  449. package/src/film/IAutoMovieProductionRenderChunk.ts +47 -0
  450. package/src/film/IAutoMovieProductionRenderJobPlan.ts +73 -0
  451. package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +37 -0
  452. package/src/film/IAutoMovieProductionRenderTier.ts +27 -0
  453. package/src/film/assertSingleGuidePass.ts +38 -0
  454. package/src/film/equalOrderedScalars.ts +56 -0
  455. package/src/film/index.ts +9 -0
  456. package/src/film/normalizeAudioAssets.ts +74 -0
  457. package/src/film/normalizeRenderTier.ts +51 -0
  458. package/src/film/planProductionRenderJob.ts +353 -0
  459. package/src/film/productionVisualDeliveryOccurrence.ts +28 -0
  460. package/src/film/resolveProductionRenderTierFrameFormat.ts +60 -0
  461. package/src/film/validDigest.ts +23 -0
  462. package/src/film/validWaveAudioIdentity.ts +88 -0
  463. package/src/frameName.ts +24 -0
  464. package/src/framePattern.ts +19 -0
  465. package/src/frameTimes.ts +36 -0
  466. package/src/guidePassFrameName.ts +29 -0
  467. package/src/guidePassFramePattern.ts +27 -0
  468. package/src/guidePasses.ts +7 -0
  469. package/src/guidePassesInternal/passExtension.ts +19 -0
  470. package/src/index.ts +69 -0
  471. package/src/isGuidePass.ts +21 -0
  472. package/src/normalizeGuidePasses.ts +33 -0
  473. package/src/planCaptionSidecar.ts +98 -0
  474. package/src/planChunkedSequenceRender.ts +200 -0
  475. package/src/planGuidePassOutputs.ts +47 -0
  476. package/src/planPoseKeypointSidecar.ts +289 -0
  477. package/src/planSequenceRender.ts +175 -0
  478. package/src/planViewerFrameTimes.ts +98 -0
  479. package/src/renderAndSee.ts +30 -0
  480. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +53 -0
  481. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +61 -0
  482. package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +29 -0
  483. package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +137 -0
  484. package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +100 -0
  485. package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +82 -0
  486. package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +40 -0
  487. package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +59 -0
  488. package/src/renderBudgetPreflight/index.ts +9 -0
  489. package/src/renderBudgetPreflight/selectAutoMovieRenderBudget.ts +28 -0
  490. package/src/renderCaptionSidecar.ts +17 -0
  491. package/src/renderObservationAudit.ts +1 -0
  492. package/src/renderPathStem.ts +61 -0
  493. package/src/renderPoseKeypointSidecar.ts +19 -0
  494. package/src/renderSequenceAndSee.ts +34 -0
  495. package/src/renderSequenceVideo.ts +44 -0
  496. package/src/renderVideo.ts +65 -0
  497. package/src/screenplay/index.ts +1 -0
  498. package/src/screenplay/renderScreenplay.ts +128 -0
  499. package/src/screenplay/screenplaySceneSlug.ts +29 -0
  500. package/src/sequenceRenderPlan.ts +5 -0
  501. package/src/sequenceRenderVideo.ts +6 -0
  502. package/src/shotBeat.ts +19 -0
  503. package/src/sliceCaptionSidecar.ts +85 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * One comparable leaf value in an ordered plan field.
3
+ *
4
+ * `equalOrderedScalars` compares arrays of these, or arrays of arrays of them,
5
+ * position by position. The two fields it serves are a WAVE speaker label
6
+ * array, whose leaves are strings, and a downmix matrix, whose leaves are
7
+ * numbers; naming the leaf type keeps a record or other value out of that
8
+ * comparison at compile time.
9
+ *
10
+ * @evidence contracts/development/design.md#principled-representation A closed union of the two primitive types the compared fields hold lets `Object.is` decide every leaf, since strings and numbers are compared by value and need no structural recursion.
11
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The alias exists only to give `equalOrderedScalars` a stated leaf domain; it adds no wrapper, tag or runtime value.
12
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The union lists the leaf types of the two real compared fields and special-cases no value; nothing else is admitted for a future caller.
13
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the comparison that reads the type, the two fields whose leaves it covers, and what the narrow domain keeps out.
14
+ */
15
+ export type AutoMovieOrderedScalar = number | string;
@@ -0,0 +1,40 @@
1
+ import type {
2
+ IAutoMovieProductionAudioProcessing,
3
+ IAutoMovieProductionWaveSourceFormat,
4
+ } from "@automovie/ingest";
5
+
6
+ import type { IAutoMovieProductionAudioAssetIdentityBase } from "./IAutoMovieProductionAudioAssetIdentityBase";
7
+
8
+ /**
9
+ * Source-format or placeholder provenance of one audio asset a render plan
10
+ * references.
11
+ *
12
+ * The `wave` arm carries the decoder's source format and processing record
13
+ * unchanged, and `normalizeAudioAssets` refuses it when either contradicts the
14
+ * record's own rate and channel count. The `placeholder-audio-stem` arm names a
15
+ * deterministic guide stem in the sound plan's 48 kHz stereo format and carries
16
+ * no WAVE facts, so a stem cannot pose as a decoded source.
17
+ *
18
+ * @evidence contracts/development/design.md#principled-representation A discriminated union on `kind` makes the WAVE facts present exactly when the asset was decoded, so a consumer narrows by the tag instead of testing optional fields.
19
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The shared facts come from `IAutoMovieProductionAudioAssetIdentityBase` and each arm adds only its provenance, reusing ingest's own source-format and processing types rather than restating them.
20
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts Neither arm special-cases an asset; the placeholder arm's fixed format is the sound plan's contract rate and channel count, which `normalizeAudioAssets` enforces.
21
+ * @evidence contracts/development/common.md#meaningful-documentation The doc says what each arm carries, where the WAVE facts come from, which validator refuses a contradiction, and the placeholder format.
22
+ */
23
+ export type IAutoMovieProductionAudioAssetIdentity =
24
+ IAutoMovieProductionAudioAssetIdentityBase &
25
+ (
26
+ | {
27
+ /** A deterministic guide stem with no decoded source. */
28
+ kind: "placeholder-audio-stem";
29
+ }
30
+ | {
31
+ /** A decoded RIFF/WAVE source. */
32
+ kind: "wave";
33
+
34
+ /** The WAVE declaration the decoder read, before processing. */
35
+ sourceFormat: IAutoMovieProductionWaveSourceFormat;
36
+
37
+ /** The conversion the decoder applied to produce mixer input. */
38
+ processing: IAutoMovieProductionAudioProcessing;
39
+ }
40
+ );
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Byte, clock and channel facts every planned audio asset carries, whatever
3
+ * its provenance.
4
+ *
5
+ * The placeholder and WAVE arms of `IAutoMovieProductionAudioAssetIdentity`
6
+ * both extend it. `normalizeAudioAssets` refuses a record whose path is blank
7
+ * or repeated, whose digest is not a SHA-256 content digest, whose counts are
8
+ * not positive safe integers, or whose duration differs from
9
+ * `sourceFrames / sampleRate`.
10
+ *
11
+ * @evidence contracts/development/design.md#principled-representation Sample count and rate carry integer clock facts, while durationSeconds equals their binary64 quotient rather than an exact rational value. The planner checks cue spans against sourceFrames using exact frame-to-sample conversion instead of deriving sample count from rounded seconds.
12
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The fields that do not depend on provenance live here once, and the union type adds only what each arm needs, so the two arms cannot describe the shared facts differently.
13
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The interface encodes no default or special value; every constraint on its fields is enforced by `normalizeAudioAssets`, which the doc names.
14
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the union that extends it and the validator with each refusal, and every member states its unit, source or derivation.
15
+ */
16
+ export interface IAutoMovieProductionAudioAssetIdentityBase {
17
+ /** Project-relative path of the builder-declared asset, unique in a plan. */
18
+ path: string;
19
+
20
+ /** SHA-256 content digest of the asset's current bytes. */
21
+ digest: string;
22
+
23
+ /** Complete source runtime in seconds, exactly `sourceFrames / sampleRate`. */
24
+ durationSeconds: number;
25
+
26
+ /** Number of source sample frames in the asset; a positive safe integer. */
27
+ sourceFrames: number;
28
+
29
+ /** Source sample rate in samples per second; a positive safe integer. */
30
+ sampleRate: number;
31
+
32
+ /** Source channel count; a positive safe integer. */
33
+ channels: number;
34
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Identity of the installed H.264 encoder and every setting that can change
3
+ * its output bytes.
4
+ *
5
+ * It sits inside `IAutoMovieProductionRenderRuntimeIdentity`, which every chunk
6
+ * id digests, so a different encoder version, closure or setting gives every
7
+ * chunk a new id and an old encode reads as stale. Publication checks that the
8
+ * package and version are non-blank and the closure digest is a SHA-256
9
+ * content digest. No code in the repository builds this record yet; it is
10
+ * supplied with the runtime identity by the caller of
11
+ * `planProductionRenderJob`.
12
+ *
13
+ * @evidence contracts/development/design.md#principled-representation Content addressing needs every input that decides output bytes, so the record names the package, its version, a digest over its installed executable closure, and each byte-affecting encoder setting, and nothing that only affects speed of the build machine.
14
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The encoder facts are grouped apart from the capture facts so the runtime identity reads as capture plus encoder, and the settings sit in one `arguments` record that maps one to one onto the encoder's options.
15
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The codec is a closed `h264` literal because the H.264 adapter is the only encoder, and no setting is defaulted or special-cased here; the doc states that no repository code produces the record yet.
16
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states why the record exists, how a change propagates to chunk ids, which fields publication validates, and that no repository producer exists, and each member says what it identifies and in which unit.
17
+ */
18
+ export interface IAutoMovieProductionEncoderIdentity {
19
+ /** Installed encoder package name, such as `h264-mp4-encoder`. */
20
+ package: string;
21
+
22
+ /** Installed encoder package version, exactly as installed. */
23
+ version: string;
24
+
25
+ /** SHA-256 content digest over every installed file the encoder executes. */
26
+ closureDigest: string;
27
+
28
+ /** Coded video format the encoder emits; H.264 is the only one. */
29
+ codec: "h264";
30
+
31
+ /** Every encoder setting that can change the output bytes. */
32
+ arguments: {
33
+ /** The encoder's quantization parameter; lower values keep more detail. */
34
+ quantizationParameter: number;
35
+
36
+ /** The encoder's speed preset, which trades compression for time. */
37
+ speed: number;
38
+
39
+ /** Key-frame interval, in frames. */
40
+ groupOfPictures: number;
41
+ };
42
+ }
@@ -0,0 +1,47 @@
1
+ import type { IAutoMovieProductionRenderFrame } from "@automovie/engine";
2
+ import type { AutoMovieGuidePass } from "@automovie/interface";
3
+
4
+ /**
5
+ * One content-addressed planned range of tier output frames for a moving-image deliverable.
6
+ *
7
+ * `planProductionRenderJob` emits `chunkFrames`-sized ranges for feature and guide-pass deliverables. A slot is an operational address while the id derives from supplied content inputs; the type itself neither acquires a lock nor checks a resident output's currentness. `IAutoMovieRenderChunk` instead describes numbered sequence-reassembly ranges without content identity. Retained planner consumers are tests rather than a maintained production scheduler.
8
+ *
9
+ * @evidence contracts/development/design.md#principled-representation The planner hashes canonical declared edit, effect, tier, raster, range, pass, runtime and source identity inputs and builds a readable operational slot. Matching claimed digests alone cannot prove equal resident media or truthful host identities; this record performs no execution or output admission.
10
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Resolved frames keep planned shot/time/layer facts with the range while the sequence-reassembly contract remains separate. The retained planner and its tests construct these records; no application scheduler or encoder is wired by the type.
11
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The `kind` union admits only the two moving-image deliverable kinds and `pass` is `beauty` exactly for a feature; no deliverable id or range is special-cased.
12
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the producer, what one chunk covers, how slot and id differ in stability and why, and how it differs from the sequence-render chunk; each member states its unit or derivation.
13
+ */
14
+ export interface IAutoMovieProductionRenderChunk {
15
+ /**
16
+ * `<production>:<tier>:<deliverable>:<pass>:<index>`, where `index` counts
17
+ * this deliverable's ranges from zero; stable across content changes.
18
+ */
19
+ slot: string;
20
+
21
+ /**
22
+ * SHA-256 digest over the edit, effects, tier, frame formats, range, pass,
23
+ * runtime identity and source shot digests of this range.
24
+ */
25
+ id: string;
26
+
27
+ /** Id of the production deliverable that owns the range. */
28
+ deliverable: string;
29
+
30
+ /** Kind of that deliverable; only the moving-image kinds have chunks. */
31
+ kind: "feature" | "guide-pass";
32
+
33
+ /** `beauty` for a feature, otherwise the guide deliverable's one pass. */
34
+ pass: AutoMovieGuidePass;
35
+
36
+ /** First tier output frame of the range, inclusive and zero-based. */
37
+ frameStart: number;
38
+
39
+ /** Tier output frame one past the range's last frame. */
40
+ frameEndExclusive: number;
41
+
42
+ /**
43
+ * One resolved frame per output frame in the range, each with its output
44
+ * index, full-rate timeline frame, time and shot layers.
45
+ */
46
+ frames: IAutoMovieProductionRenderFrame[];
47
+ }
@@ -0,0 +1,73 @@
1
+ import type {
2
+ IAutoMovieCompiledFilmEffect,
3
+ IAutoMovieFilmTimeline,
4
+ IAutoMovieProductionDesign,
5
+ } from "@automovie/interface";
6
+
7
+ import type { IAutoMovieProductionAudioAssetIdentity } from "./IAutoMovieProductionAudioAssetIdentity";
8
+ import type { IAutoMovieProductionRenderChunk } from "./IAutoMovieProductionRenderChunk";
9
+ import type { IAutoMovieProductionRenderRuntimeIdentity } from "./IAutoMovieProductionRenderRuntimeIdentity";
10
+ import type { IAutoMovieProductionRenderTier } from "./IAutoMovieProductionRenderTier";
11
+
12
+ /**
13
+ * One tier's render plan, containing its output frame ranges and non-video tracks.
14
+ *
15
+ * `planProductionRenderJob` builds it from supplied timeline and runtime inputs. Proxy and final plans share `editFingerprint` and differ in tier, projected frame format, frame count and chunks. Current repository callers are planner tests; a maintained application does not acquire, validate or execute stored plans through this record.
16
+ *
17
+ * @evidence contracts/development/design.md#principled-representation The planner derives this version-four record deterministically from admitted supplied inputs; a stored record alone proves neither current input identity nor resident output bytes. The type executes no currentness check.
18
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Identities, tier, projected raster, resolved chunks and tracks occupy one planning result. The planner's existing tests consume the shape; no removed render subcommand or replacement application consumer is claimed.
19
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts No field is a cached measurement or special case; every value is copied or derived from the edit and declared inputs, and `version` is the one contract-defined constant.
20
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the retained planner, current test-only consumption and lack of stored-plan admission, plus the relationship between tiers. Members state their source, units and ordering, with frame counts expressed as tier output frames.
21
+ */
22
+ export interface IAutoMovieProductionRenderJobPlan {
23
+ /** Plan schema version. */
24
+ version: 4;
25
+
26
+ /** Production id, which namespaces every slot and output path. */
27
+ productionId: string;
28
+
29
+ /** The timeline's compiler input fingerprint, shared by every capture. */
30
+ compileFingerprint: string;
31
+
32
+ /** Digest of the builder-owned film edit, equal for proxy and final. */
33
+ editFingerprint: string;
34
+
35
+ /** Capture and encoder identity every chunk renders under. */
36
+ runtimeIdentity: IAutoMovieProductionRenderRuntimeIdentity;
37
+
38
+ /** Proxy or final tier; final is scale one and step one. */
39
+ tier: IAutoMovieProductionRenderTier;
40
+
41
+ /** The production's own full-quality raster and frame clock. */
42
+ sourceFrameFormat: IAutoMovieProductionDesign["frameFormat"];
43
+
44
+ /** Raster and frame clock of the tier output, projected from the source. */
45
+ frameFormat: IAutoMovieProductionDesign["frameFormat"];
46
+
47
+ /** Number of tier output frames, the timeline length divided by the step. */
48
+ totalFrames: number;
49
+
50
+ /** Maximum number of output frames in one chunk; a positive safe integer. */
51
+ chunkFrames: number;
52
+
53
+ /**
54
+ * Chunks in deliverable declaration order, each deliverable's ranges in
55
+ * frame order.
56
+ */
57
+ chunks: IAutoMovieProductionRenderChunk[];
58
+
59
+ /** Planned non-video tracks; this value does not publish or execute them. */
60
+ tracks: {
61
+ /** Canonical WebVTT text of the timeline's caption placements. */
62
+ captions: string;
63
+
64
+ /** The timeline's audio placements, copied unchanged. */
65
+ audio: IAutoMovieFilmTimeline["tracks"]["audio"];
66
+
67
+ /** Validated identity of every supplied audio asset, sorted by path. */
68
+ audioAssets: IAutoMovieProductionAudioAssetIdentity[];
69
+
70
+ /** The current film-global effect runtimes, copied unchanged. */
71
+ effects: IAutoMovieCompiledFilmEffect[];
72
+ };
73
+ }
@@ -0,0 +1,37 @@
1
+ import type { IAutoMovieCaptureRuntimeIdentity } from "@automovie/interface";
2
+
3
+ import type { IAutoMovieProductionEncoderIdentity } from "./IAutoMovieProductionEncoderIdentity";
4
+
5
+ /**
6
+ * Capture and encoder identity shared by every chunk of one render job.
7
+ *
8
+ * Every chunk id digests the whole record, so a change to the viewer bytes,
9
+ * the browser, the graphics backend, the dialogue runtime or the encoder gives
10
+ * every chunk a new id. `planProductionRenderJob` refuses a `sourceDigest` or
11
+ * non-null `dialogueRuntimeIdentity` that is not a SHA-256 content digest; the
12
+ * caller supplies the rest.
13
+ *
14
+ * @evidence contracts/development/design.md#principled-representation Content addressing needs every runtime input that can change captured or encoded bytes, so the record carries a digest of the declared viewer and package inputs, the dialogue runtime digest, the full capture identity and the encoder identity.
15
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Capture facts reuse the interface's `IAutoMovieCaptureRuntimeIdentity` and encoder facts live in `IAutoMovieProductionEncoderIdentity`, so this record only joins them with the two job-wide digests.
16
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The protocol literal is the schema version and the only fixed value; null for the dialogue runtime is the documented silent-production state, not a fallback.
17
+ * @evidence contracts/development/common.md#meaningful-documentation The doc says why every field reaches the chunk ids, which fields the planner validates, and each member states what it identifies and what null means.
18
+ */
19
+ export interface IAutoMovieProductionRenderRuntimeIdentity {
20
+ /** Schema of this record; changes when its meaning changes. */
21
+ protocolVersion: "automovie.production-render-runtime.v3";
22
+
23
+ /** SHA-256 digest of the declared viewer, capture, asset and package bytes. */
24
+ sourceDigest: string;
25
+
26
+ /**
27
+ * SHA-256 digest of the dialogue and viseme runtime installed for every
28
+ * capture, or null when the production synthesizes no dialogue.
29
+ */
30
+ dialogueRuntimeIdentity: string | null;
31
+
32
+ /** Browser, graphics and installed-package identity of the capture host. */
33
+ capture: IAutoMovieCaptureRuntimeIdentity;
34
+
35
+ /** Encoder package, closure and byte-affecting settings. */
36
+ encoder: IAutoMovieProductionEncoderIdentity;
37
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Cost and quality tier of one render job over a shared builder-owned edit.
3
+ *
4
+ * `normalizeRenderTier` admits exactly two shapes: the final tier with scale 1
5
+ * and step 1, and a proxy that reduces at least one of the two. A proxy keeps
6
+ * the edit and its runtime, so the timeline length must be a multiple of
7
+ * `frameStep`; `resolveProductionRenderTierFrameFormat` projects the source
8
+ * raster and clock through it.
9
+ *
10
+ * @evidence contracts/development/design.md#principled-representation Two independent reductions, a raster scale and an integer frame decimation, describe every cheaper rendering of the same edit while keeping its runtime exact, because decimating by a divisor of the frame count divides the rational frame rate by the same integer.
11
+ * @evidence contracts/development/design.md#minimal-and-owned-surface The tier is three plain fields, and its admission and its projection live in `normalizeRenderTier` and `resolveProductionRenderTierFrameFormat`, so the record carries no behavior.
12
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts The limits of 1 for final and 16 for the proxy step come from the production design's `renderTiers` contract, and no other value is special-cased.
13
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the two admitted shapes and their validator, the divisibility rule with its reason, and the projection, and each member gives its range and its final value.
14
+ */
15
+ export interface IAutoMovieProductionRenderTier {
16
+ /** Tier name, used in chunk slots and publication paths. */
17
+ kind: "proxy" | "final";
18
+
19
+ /** Raster multiplier in `(0, 1]`; exactly 1 at the final tier. */
20
+ resolutionScale: number;
21
+
22
+ /**
23
+ * Render every Nth timeline frame; an integer from 1 through 16, exactly 1
24
+ * at the final tier.
25
+ */
26
+ frameStep: number;
27
+ }
@@ -0,0 +1,38 @@
1
+ import type { AutoMovieGuidePass } from "@automovie/interface";
2
+
3
+ import { isGuidePass } from "../guidePasses";
4
+
5
+ /**
6
+ * Return the one structural pass a guide-pass deliverable declares, or throw.
7
+ *
8
+ * Every entry must be a known guide pass other than `beauty`, and after
9
+ * folding repeats exactly one distinct pass must remain, so one deliverable's
10
+ * failure can never hide inside another's output. `normalizeGuidePasses` is
11
+ * the different, wider rule of the sequence planners, which keeps any number
12
+ * of passes and admits `beauty`.
13
+ *
14
+ * @evidence contracts/development/implementation.md#principled-implementation Membership is decided by `isGuidePass` over the runtime list that mirrors the `AutoMovieGuidePass` union, minus `beauty`, and repeats fold into a list of distinct passes whose length must be one.
15
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The function returns the single pass the planner keys a chunk by instead of a one-element list, and it reuses the shared pass list rather than restating it; it stays apart from `normalizeGuidePasses` because the two admission rules differ.
16
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No pass or deliverable is special-cased; the runtime membership check covers values that reached the typed parameter from untyped JSON, and each refusal throws rather than picking a pass.
17
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states what is returned, both refusals, the reason a deliverable owns one pass, and how this rule differs from `normalizeGuidePasses`.
18
+ * @evidence contracts/development/implementation.md#efficient-algorithms One pass over the P entries with two scans of at most six known passes each, O(P) time, and a distinct list of at most five entries; every entry must be read to prove there is one distinct pass.
19
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner calls it once for the legacy default and once per declared guide deliverable on one-element lists, so there is no repeated work worth sharing.
20
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The distinct list of at most five passes is local and dropped on return, leaving only the returned pass literal; no handle or task is involved.
21
+ */
22
+ export const assertSingleGuidePass: (
23
+ passes: readonly Exclude<AutoMovieGuidePass, "beauty">[],
24
+ ) => Exclude<AutoMovieGuidePass, "beauty"> = (
25
+ passes: readonly Exclude<AutoMovieGuidePass, "beauty">[],
26
+ ): Exclude<AutoMovieGuidePass, "beauty"> => {
27
+ const distinct: Exclude<AutoMovieGuidePass, "beauty">[] = [];
28
+ for (const pass of passes) {
29
+ if (isGuidePass(pass) === false || (pass as string) === "beauty")
30
+ throw new Error(`Guide-pass render cannot use "${pass}".`);
31
+ if (distinct.includes(pass) === false) distinct.push(pass);
32
+ }
33
+ if (distinct.length !== 1)
34
+ throw new Error(
35
+ `A guide-pass deliverable requires exactly one declared pass, but received ${distinct.length}. Declare separate deliverables when the production contract gains per-pass ownership.`,
36
+ );
37
+ return distinct[0]!;
38
+ };
@@ -0,0 +1,56 @@
1
+ import type { AutoMovieOrderedScalar } from "./AutoMovieOrderedScalar";
2
+
3
+ /** One position of a compared array: a scalar or a one-level row of scalars. */
4
+ type IOrderedEntry = AutoMovieOrderedScalar | readonly AutoMovieOrderedScalar[];
5
+
6
+ /**
7
+ * Compare ordered arrays of scalars, or of arrays of scalars, by value.
8
+ *
9
+ * The domain is exactly what `validWaveAudioIdentity` compares: a speaker-label
10
+ * array such as `["front-left", "front-right"]` and a one-row downmix matrix
11
+ * such as `[[0.5, 0.5]]`. Arrays are equal when they have the same length and
12
+ * every position holds equal scalars, or rows of the same length with equal
13
+ * scalars; order and the scalar's type both count. `Object.is` decides each
14
+ * scalar, so `NaN` equals `NaN` and `+0` differs from `-0`.
15
+ *
16
+ * A non-array argument returns false instead of being compared, so a record
17
+ * cannot pass by lacking a `length`. Nesting deeper than one row, prototypes,
18
+ * symbol keys, boxed primitives and cycles are outside the domain.
19
+ *
20
+ * @evidence contracts/development/implementation.md#principled-implementation A length check followed by a positional `Object.is` comparison is the definition of ordered-sequence equality over primitive leaves, applied once more for the single nesting level the matrix has; the premise that leaves are strings or numbers holds because the parameter type admits nothing else.
21
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One loop handles both shapes, descending only where a position holds a row, instead of a general deep equality whose answer would also depend on prototypes and key order the callers never compare.
22
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No value or caller is special-cased; the non-array refusal is the stated domain boundary, not a compensation for a particular input.
23
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names the two compared shapes and their caller, the equality rule including order and type, the `Object.is` cases for `NaN` and signed zero, and what lies outside the domain.
24
+ * @evidence contracts/development/implementation.md#efficient-algorithms Time is linear in the total leaf count and stops at the first difference, with no allocation; every leaf must be read to prove equality, so no faster comparison exists.
25
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure comparison of two small arrays coordinates no phases or requests whose work could be shared.
26
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function keeps no reference to its arguments after returning a boolean and opens no handle or task.
27
+ */
28
+ export const equalOrderedScalars: (
29
+ left: readonly IOrderedEntry[],
30
+ right: readonly IOrderedEntry[],
31
+ ) => boolean = (
32
+ left: readonly IOrderedEntry[],
33
+ right: readonly IOrderedEntry[],
34
+ ): boolean => {
35
+ if (Array.isArray(left) === false || Array.isArray(right) === false)
36
+ return false;
37
+ if (left.length !== right.length) return false;
38
+ for (let at: number = 0; at < left.length; ++at) {
39
+ const one: IOrderedEntry = left[at]!;
40
+ const other: IOrderedEntry = right[at]!;
41
+ if (Array.isArray(one) || Array.isArray(other)) {
42
+ if (Array.isArray(one) === false || Array.isArray(other) === false)
43
+ return false;
44
+ const row: readonly AutoMovieOrderedScalar[] =
45
+ one as readonly AutoMovieOrderedScalar[];
46
+ const otherRow: readonly AutoMovieOrderedScalar[] =
47
+ other as readonly AutoMovieOrderedScalar[];
48
+ if (row.length !== otherRow.length) return false;
49
+ for (let inner: number = 0; inner < row.length; ++inner)
50
+ if (Object.is(row[inner], otherRow[inner]) === false) return false;
51
+ continue;
52
+ }
53
+ if (Object.is(one, other) === false) return false;
54
+ }
55
+ return true;
56
+ };
@@ -0,0 +1,9 @@
1
+ export * from "./IAutoMovieProductionAudioAssetIdentity";
2
+ export * from "./IAutoMovieProductionEncoderIdentity";
3
+ export * from "./IAutoMovieProductionRenderChunk";
4
+ export * from "./IAutoMovieProductionRenderJobPlan";
5
+ export * from "./IAutoMovieProductionRenderRuntimeIdentity";
6
+ export * from "./IAutoMovieProductionRenderTier";
7
+ export * from "./planProductionRenderJob";
8
+ export * from "./productionVisualDeliveryOccurrence";
9
+ export * from "./resolveProductionRenderTierFrameFormat";
@@ -0,0 +1,74 @@
1
+ import { compareCodeUnits } from "@automovie/engine";
2
+ import type { IAutoMovieProductionSoundPlan } from "@automovie/interface";
3
+
4
+ import type { IAutoMovieProductionAudioAssetIdentity } from "./IAutoMovieProductionAudioAssetIdentity";
5
+ import { validDigest } from "./validDigest";
6
+ import { validWaveAudioIdentity } from "./validWaveAudioIdentity";
7
+
8
+ /** Sample rate of a placeholder stem: the sound plan's fixed mix rate. */
9
+ const PLACEHOLDER_SAMPLE_RATE: IAutoMovieProductionSoundPlan["sampleRate"] = 48_000;
10
+
11
+ /** Channel count of a placeholder stem: the sound plan's fixed stereo mix. */
12
+ const PLACEHOLDER_CHANNELS: IAutoMovieProductionSoundPlan["channels"] = 2;
13
+
14
+ /**
15
+ * Copy the planned audio asset identities sorted by path, refusing any that
16
+ * is invalid.
17
+ *
18
+ * Paths sort by UTF-16 code unit, so one input yields one plan on every host.
19
+ * Throws when a path is blank or repeated, the digest is not a SHA-256 content
20
+ * digest, the sample rate, channel count or sample-frame count is not a
21
+ * positive safe integer, `durationSeconds` is not exactly `sourceFrames /
22
+ * sampleRate`, the kind is unknown, a placeholder stem is not 48 kHz stereo,
23
+ * or a WAVE identity fails `validWaveAudioIdentity`. The input is not changed.
24
+ *
25
+ * @evidence contracts/development/implementation.md#principled-implementation Code-unit order is locale-independent and total over distinct paths, and the duration check compares the stored seconds with the same IEEE division that produced them, so an exact record passes and any edited count or duration is refused.
26
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One sort and one validating copy produce the plan's asset list; the WAVE-specific relations live in `validWaveAudioIdentity` and the digest grammar in `validDigest`, so this function holds only the provenance-independent rules.
27
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The placeholder format is typed from `IAutoMovieProductionSoundPlan`'s fixed rate and channel count rather than chosen here, no path is special-cased, and an invalid asset throws rather than being dropped.
28
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states the ordering and why, every refusal, the placeholder format, and that the input is left unchanged.
29
+ * @evidence contracts/development/implementation.md#efficient-algorithms For A assets the cost is an O(A log A) sort plus one O(1) set lookup and constant checks per asset and one deep copy of each identity; the sort is needed because the order is part of the plan bytes.
30
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner calls it once per plan on that plan's own inputs, so there is no completed equivalent work to share.
31
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The path set and the sorted array are local and released on return; the returned copies, owned by the caller, hold one record per asset and no handle or task.
32
+ */
33
+ export const normalizeAudioAssets: (
34
+ assets: readonly IAutoMovieProductionAudioAssetIdentity[],
35
+ ) => IAutoMovieProductionAudioAssetIdentity[] = (
36
+ assets: readonly IAutoMovieProductionAudioAssetIdentity[],
37
+ ): IAutoMovieProductionAudioAssetIdentity[] => {
38
+ const paths: Set<string> = new Set();
39
+ return [...assets]
40
+ .sort(
41
+ (
42
+ left: IAutoMovieProductionAudioAssetIdentity,
43
+ right: IAutoMovieProductionAudioAssetIdentity,
44
+ ): number => compareCodeUnits(left.path, right.path),
45
+ )
46
+ .map(
47
+ (
48
+ asset: IAutoMovieProductionAudioAssetIdentity,
49
+ ): IAutoMovieProductionAudioAssetIdentity => {
50
+ if (
51
+ asset.path.trim().length === 0 ||
52
+ paths.has(asset.path) ||
53
+ validDigest(asset.digest) === false ||
54
+ Number.isSafeInteger(asset.sampleRate) === false ||
55
+ asset.sampleRate <= 0 ||
56
+ Number.isSafeInteger(asset.channels) === false ||
57
+ asset.channels <= 0 ||
58
+ Number.isSafeInteger(asset.sourceFrames) === false ||
59
+ asset.sourceFrames <= 0 ||
60
+ asset.durationSeconds !== asset.sourceFrames / asset.sampleRate ||
61
+ (asset.kind !== "placeholder-audio-stem" && asset.kind !== "wave") ||
62
+ (asset.kind === "placeholder-audio-stem" &&
63
+ (asset.sampleRate !== PLACEHOLDER_SAMPLE_RATE ||
64
+ asset.channels !== PLACEHOLDER_CHANNELS)) ||
65
+ (asset.kind === "wave" && validWaveAudioIdentity(asset) === false)
66
+ )
67
+ throw new Error(
68
+ `Audio asset "${asset.path}" has invalid identity, duration, sample rate, channels, or duplicate ownership.`,
69
+ );
70
+ paths.add(asset.path);
71
+ return structuredClone(asset);
72
+ },
73
+ );
74
+ };
@@ -0,0 +1,51 @@
1
+ import type { IAutoMovieProductionRenderTier } from "./IAutoMovieProductionRenderTier";
2
+
3
+ /** The tier an omitted declaration means: exact final output. */
4
+ const FINAL_TIER: Readonly<IAutoMovieProductionRenderTier> = {
5
+ kind: "final",
6
+ resolutionScale: 1,
7
+ frameStep: 1,
8
+ };
9
+
10
+ /**
11
+ * Return a copy of the declared render tier, or the final tier when none is
12
+ * declared, refusing any other shape.
13
+ *
14
+ * Final must be scale 1 and step 1. A proxy must have a finite scale in
15
+ * `(0, 1]` and an integer step from 1 through 16, and reduce at least one of
16
+ * them, so a proxy cannot claim final's output and final cannot be spelled as
17
+ * a proxy. Throws one error naming both admitted shapes.
18
+ *
19
+ * @evidence contracts/development/implementation.md#principled-implementation The check is the closed admission rule of the production design's `renderTiers` contract, evaluated field by field on finite and safe-integer predicates so NaN, infinity and fractional steps are refused rather than compared.
20
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One predicate admits the two shapes and one structured clone returns a value the caller owns, so the planner and the frame-format projection share one rule instead of each restating it.
21
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The limits are the design contract's 1-for-final and 1-through-16 step bounds; the default for an omitted tier is the documented final tier, not a guess, and an invalid tier throws instead of being clamped.
22
+ * @evidence contracts/development/common.md#meaningful-documentation The doc states the omitted-tier default, both admitted shapes with their bounds, why a proxy must reduce something, that the result is a copy, and the refusal.
23
+ * @evidence contracts/development/implementation.md#efficient-algorithms The call does constant work: a fixed set of comparisons and one clone of a three-field record.
24
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call validates one small record, and the planner and the projection each call it once per plan, so caching would cost more than the check.
25
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing after returning the copy its caller owns and opens no handle or task.
26
+ */
27
+ export const normalizeRenderTier: (
28
+ tier: IAutoMovieProductionRenderTier | undefined,
29
+ ) => IAutoMovieProductionRenderTier = (
30
+ tier: IAutoMovieProductionRenderTier | undefined,
31
+ ): IAutoMovieProductionRenderTier => {
32
+ const value: Readonly<IAutoMovieProductionRenderTier> = tier ?? FINAL_TIER;
33
+ if (
34
+ (value.kind !== "proxy" && value.kind !== "final") ||
35
+ Number.isFinite(value.resolutionScale) === false ||
36
+ value.resolutionScale <= 0 ||
37
+ value.resolutionScale > 1 ||
38
+ Number.isSafeInteger(value.frameStep) === false ||
39
+ value.frameStep <= 0 ||
40
+ value.frameStep > 16 ||
41
+ (value.kind === "final" &&
42
+ (value.resolutionScale !== 1 || value.frameStep !== 1)) ||
43
+ (value.kind === "proxy" &&
44
+ value.resolutionScale === 1 &&
45
+ value.frameStep === 1)
46
+ )
47
+ throw new Error(
48
+ "Render tier must be exact final (scale 1, step 1) or a bounded cheaper proxy (scale in (0, 1], integer step 1..16, with at least one reduction).",
49
+ );
50
+ return structuredClone(value);
51
+ };