@automovie/render 0.2.0 → 0.3.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 (681) hide show
  1. package/lib/IAutoMovieCaptionEntry.d.ts +1 -28
  2. package/lib/IAutoMovieCaptionSidecar.d.ts +1 -25
  3. package/lib/IAutoMovieCapturedFrame.d.ts +1 -22
  4. package/lib/IAutoMovieGuidePassOutput.d.ts +1 -23
  5. package/lib/IAutoMoviePoseKeypointActor.d.ts +1 -36
  6. package/lib/IAutoMoviePoseKeypointFrame.d.ts +1 -25
  7. package/lib/IAutoMoviePoseKeypointSidecar.d.ts +1 -21
  8. package/lib/IAutoMovieRenderAdapters.d.ts +1 -34
  9. package/lib/IAutoMovieRenderAndSeeRequest.d.ts +1 -32
  10. package/lib/IAutoMovieRenderAndSeeResult.d.ts +1 -20
  11. package/lib/IAutoMovieRenderChunk.d.ts +1 -48
  12. package/lib/IAutoMovieRenderChunkPlan.d.ts +1 -32
  13. package/lib/IAutoMovieRenderPassManifest.d.ts +1 -21
  14. package/lib/IAutoMovieRenderReassembly.d.ts +1 -24
  15. package/lib/IAutoMovieRenderResult.d.ts +1 -39
  16. package/lib/IAutoMovieSequenceRenderAdapters.d.ts +1 -36
  17. package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +1 -36
  18. package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +1 -23
  19. package/lib/IAutoMovieSequenceRenderFrame.d.ts +1 -41
  20. package/lib/IAutoMovieSequenceRenderPlan.d.ts +1 -76
  21. package/lib/IAutoMovieSequenceRenderResult.d.ts +1 -44
  22. package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +1 -39
  23. package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +1 -39
  24. package/lib/audio/mixAutoMovieAudioPcm.d.ts +2 -39
  25. package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -1
  26. package/lib/audio/mixAutoMovieAudioPcm.mjs.map +1 -1
  27. package/lib/auditAutoMovieRenderObservation.d.ts +2 -14
  28. package/lib/auditAutoMovieRenderObservation.js.map +1 -1
  29. package/lib/auditAutoMovieRenderObservation.mjs.map +1 -1
  30. package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +1 -1
  31. package/lib/cache/createAutoMovieHttpArtifactStore.mjs.map +1 -1
  32. package/lib/caption/IAutoMovieBeatCaption.d.ts +1 -22
  33. package/lib/caption/beatCaptions.d.ts +1 -2
  34. package/lib/caption/beatCaptions.js.map +1 -1
  35. package/lib/caption/beatCaptions.mjs.map +1 -1
  36. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +1 -12
  37. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -1
  38. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.mjs.map +1 -1
  39. package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +1 -14
  40. package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -1
  41. package/lib/caption/parseAutoMovieCaptionLanguage.mjs.map +1 -1
  42. package/lib/capture/AutoMovieCaptureFolder.d.ts +3 -13
  43. package/lib/capture/AutoMovieCaptureFolder.js.map +1 -1
  44. package/lib/capture/AutoMovieCaptureFolder.mjs.map +1 -1
  45. package/lib/capture/IAutoMovieCaptureBudget.d.ts +1 -24
  46. package/lib/capture/IAutoMovieCaptureCell.d.ts +1 -33
  47. package/lib/capture/IAutoMovieCaptureComparison.d.ts +1 -75
  48. package/lib/capture/IAutoMovieCaptureDrawing.d.ts +1 -56
  49. package/lib/capture/IAutoMovieCaptureLayout.d.ts +1 -47
  50. package/lib/capture/IAutoMovieCapturePlan.d.ts +1 -30
  51. package/lib/capture/IAutoMovieCapturePlanRequest.d.ts +1 -97
  52. package/lib/capture/IAutoMovieCaptureRecord.d.ts +1 -134
  53. package/lib/capture/IAutoMovieCaptureRequestSource.d.ts +1 -36
  54. package/lib/capture/IAutoMovieCaptureResolution.d.ts +1 -20
  55. package/lib/capture/IAutoMovieCaptureSelection.d.ts +1 -23
  56. package/lib/capture/IAutoMovieCaptureStorage.d.ts +1 -76
  57. package/lib/capture/IAutoMovieCaptureSubject.d.ts +1 -81
  58. package/lib/capture/IAutoMovieCaptureTime.d.ts +1 -16
  59. package/lib/capture/IAutoMovieCaptureWindow.d.ts +1 -24
  60. package/lib/capture/compareAutoMovieCaptureRounds.d.ts +2 -23
  61. package/lib/capture/compareAutoMovieCaptureRounds.js.map +1 -1
  62. package/lib/capture/compareAutoMovieCaptureRounds.mjs.map +1 -1
  63. package/lib/capture/formatAutoMovieCapturePlanRequest.d.ts +1 -1
  64. package/lib/capture/formatAutoMovieCapturePlanRequest.js.map +1 -1
  65. package/lib/capture/formatAutoMovieCapturePlanRequest.mjs.map +1 -1
  66. package/lib/capture/markAutoMovieCaptureCell.d.ts +1 -1
  67. package/lib/capture/markAutoMovieCaptureCell.mjs.map +1 -1
  68. package/lib/capture/parseAutoMovieCapturePlanRequest.d.ts +1 -2
  69. package/lib/capture/parseAutoMovieCapturePlanRequest.js.map +1 -1
  70. package/lib/capture/parseAutoMovieCapturePlanRequest.mjs.map +1 -1
  71. package/lib/capture/planAutoMovieCapture.d.ts +2 -11
  72. package/lib/capture/planAutoMovieCapture.js.map +1 -1
  73. package/lib/capture/planAutoMovieCapture.mjs.map +1 -1
  74. package/lib/capture/planAutoMovieCaptureFrames.d.ts +2 -22
  75. package/lib/capture/planAutoMovieCaptureFrames.js.map +1 -1
  76. package/lib/capture/planAutoMovieCaptureFrames.mjs.map +1 -1
  77. package/lib/capture/planAutoMovieCaptureLayout.d.ts +2 -16
  78. package/lib/capture/planAutoMovieCaptureLayout.js.map +1 -1
  79. package/lib/capture/planAutoMovieCaptureLayout.mjs.map +1 -1
  80. package/lib/capture/planAutoMovieVideoFrames.d.ts +2 -8
  81. package/lib/capture/planAutoMovieVideoFrames.js.map +1 -1
  82. package/lib/capture/planAutoMovieVideoFrames.mjs.map +1 -1
  83. package/lib/capture/planAutoMovieVideoSceneCuts.d.ts +2 -8
  84. package/lib/capture/planAutoMovieVideoSceneCuts.js.map +1 -1
  85. package/lib/capture/planAutoMovieVideoSceneCuts.mjs.map +1 -1
  86. package/lib/capture/readAutoMovieVideoSceneCuts.d.ts +2 -6
  87. package/lib/capture/readAutoMovieVideoSceneCuts.js.map +1 -1
  88. package/lib/capture/readAutoMovieVideoSceneCuts.mjs.map +1 -1
  89. package/lib/capture/resolveAutoMovieCapturePatterns.d.ts +2 -10
  90. package/lib/capture/resolveAutoMovieCapturePatterns.js.map +1 -1
  91. package/lib/capture/resolveAutoMovieCapturePatterns.mjs.map +1 -1
  92. package/lib/capture/runAutoMovieCapture.d.ts +2 -21
  93. package/lib/capture/runAutoMovieCapture.js.map +1 -1
  94. package/lib/capture/runAutoMovieCapture.mjs.map +1 -1
  95. package/lib/capture/runAutoMovieVideoCapture.d.ts +2 -20
  96. package/lib/capture/runAutoMovieVideoCapture.js.map +1 -1
  97. package/lib/capture/runAutoMovieVideoCapture.mjs.map +1 -1
  98. package/lib/capture/scaleAutoMovieCaptureLabels.d.ts +2 -5
  99. package/lib/capture/scaleAutoMovieCaptureLabels.js.map +1 -1
  100. package/lib/capture/scaleAutoMovieCaptureLabels.mjs.map +1 -1
  101. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +2 -6
  102. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -1
  103. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.mjs.map +1 -1
  104. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +2 -14
  105. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -1
  106. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.mjs.map +1 -1
  107. package/lib/delivery/AutoMovieProductionPngRole.d.ts +1 -14
  108. package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +1 -41
  109. package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +1 -46
  110. package/lib/delivery/assertAutoMovieCaptureClock.d.ts +2 -9
  111. package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -1
  112. package/lib/delivery/assertAutoMovieCaptureClock.mjs.map +1 -1
  113. package/lib/delivery/assertProductionPngPicture.d.ts +2 -6
  114. package/lib/delivery/assertProductionPngPicture.js.map +1 -1
  115. package/lib/delivery/assertProductionPngPicture.mjs.map +1 -1
  116. package/lib/delivery/assertProductionVideoProfile.d.ts +2 -6
  117. package/lib/delivery/assertProductionVideoProfile.js.map +1 -1
  118. package/lib/delivery/assertProductionVideoProfile.mjs.map +1 -1
  119. package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +2 -35
  120. package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -1
  121. package/lib/delivery/auditAutoMovieDecodedFrames.mjs.map +1 -1
  122. package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +2 -8
  123. package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -1
  124. package/lib/delivery/auditAutoMovieEncodedPresentation.mjs.map +1 -1
  125. package/lib/delivery/planAutoMovieVideoEncoding.d.ts +2 -18
  126. package/lib/delivery/planAutoMovieVideoEncoding.js.map +1 -1
  127. package/lib/delivery/planAutoMovieVideoEncoding.mjs.map +1 -1
  128. package/lib/delivery/productionOpusDescription.d.ts +2 -6
  129. package/lib/delivery/productionOpusDescription.js.map +1 -1
  130. package/lib/delivery/productionOpusDescription.mjs.map +1 -1
  131. package/lib/delivery/resolveProductionPngProfile.d.ts +2 -7
  132. package/lib/delivery/resolveProductionPngProfile.js.map +1 -1
  133. package/lib/delivery/resolveProductionPngProfile.mjs.map +1 -1
  134. package/lib/delivery/resolveProductionVideoProfile.d.ts +2 -7
  135. package/lib/delivery/resolveProductionVideoProfile.js.map +1 -1
  136. package/lib/delivery/resolveProductionVideoProfile.mjs.map +1 -1
  137. package/lib/draw/AutoMovieDrawSession.d.ts +3 -16
  138. package/lib/draw/AutoMovieDrawSession.js.map +1 -1
  139. package/lib/draw/AutoMovieDrawSession.mjs.map +1 -1
  140. package/lib/draw/IAutoMovieDrawCall.d.ts +1 -27
  141. package/lib/draw/IAutoMovieDrawDescription.d.ts +1 -15
  142. package/lib/draw/IAutoMovieDrawFunction.d.ts +1 -3
  143. package/lib/draw/IAutoMovieDrawResult.d.ts +1 -36
  144. package/lib/draw/IAutoMovieDrawScene.d.ts +9 -2
  145. package/lib/draw/decodeAutoMovieDrawPixels.d.ts +2 -6
  146. package/lib/draw/decodeAutoMovieDrawPixels.js.map +1 -1
  147. package/lib/draw/decodeAutoMovieDrawPixels.mjs.map +1 -1
  148. package/lib/draw/describeAutoMovieDrawScene.d.ts +4 -4
  149. package/lib/draw/describeAutoMovieDrawScene.js +10 -4
  150. package/lib/draw/describeAutoMovieDrawScene.js.map +1 -1
  151. package/lib/draw/describeAutoMovieDrawScene.mjs +8 -4
  152. package/lib/draw/describeAutoMovieDrawScene.mjs.map +1 -1
  153. package/lib/draw/index.d.ts +1 -0
  154. package/lib/draw/index.js +1 -0
  155. package/lib/draw/index.js.map +1 -1
  156. package/lib/draw/index.mjs +2 -1
  157. package/lib/draw/installAutoMovieDraw.d.ts +6 -6
  158. package/lib/draw/installAutoMovieDraw.js +18 -23
  159. package/lib/draw/installAutoMovieDraw.js.map +1 -1
  160. package/lib/draw/installAutoMovieDraw.mjs +16 -23
  161. package/lib/draw/installAutoMovieDraw.mjs.map +1 -1
  162. package/lib/draw/planAutoMovieDrawCall.d.ts +1 -3
  163. package/lib/draw/planAutoMovieDrawCall.js.map +1 -1
  164. package/lib/draw/planAutoMovieDrawCall.mjs.map +1 -1
  165. package/lib/draw/renderAutoMovieDrawnVideo.d.ts +2 -12
  166. package/lib/draw/renderAutoMovieDrawnVideo.js.map +1 -1
  167. package/lib/draw/renderAutoMovieDrawnVideo.mjs.map +1 -1
  168. package/lib/draw/replaceAutoMovieDrawInspection.d.ts +24 -0
  169. package/lib/draw/replaceAutoMovieDrawInspection.js +29 -0
  170. package/lib/draw/replaceAutoMovieDrawInspection.js.map +1 -0
  171. package/lib/draw/replaceAutoMovieDrawInspection.mjs +29 -0
  172. package/lib/draw/replaceAutoMovieDrawInspection.mjs.map +1 -0
  173. package/lib/draw/stampAutoMovieDrawLegend.d.ts +2 -4
  174. package/lib/draw/stampAutoMovieDrawLegend.js.map +1 -1
  175. package/lib/draw/stampAutoMovieDrawLegend.mjs.map +1 -1
  176. package/lib/film/AutoMovieOrderedScalar.d.ts +1 -15
  177. package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +1 -28
  178. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +1 -29
  179. package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +1 -36
  180. package/lib/film/IAutoMovieProductionRenderChunk.d.ts +1 -39
  181. package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +1 -53
  182. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +1 -31
  183. package/lib/film/IAutoMovieProductionRenderTier.d.ts +1 -25
  184. package/lib/film/equalOrderedScalars.d.ts +2 -5
  185. package/lib/film/equalOrderedScalars.js.map +1 -1
  186. package/lib/film/equalOrderedScalars.mjs.map +1 -1
  187. package/lib/film/normalizeAudioAssets.d.ts +1 -1
  188. package/lib/film/normalizeAudioAssets.js.map +1 -1
  189. package/lib/film/normalizeAudioAssets.mjs.map +1 -1
  190. package/lib/film/normalizeRenderTier.d.ts +1 -1
  191. package/lib/film/normalizeRenderTier.mjs.map +1 -1
  192. package/lib/film/planProductionRenderJob.d.ts +2 -16
  193. package/lib/film/planProductionRenderJob.js.map +1 -1
  194. package/lib/film/planProductionRenderJob.mjs.map +1 -1
  195. package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +1 -2
  196. package/lib/film/resolveProductionRenderTierFrameFormat.mjs.map +1 -1
  197. package/lib/film/validWaveAudioIdentity.d.ts +1 -1
  198. package/lib/film/validWaveAudioIdentity.mjs.map +1 -1
  199. package/lib/index.mjs +8 -7
  200. package/lib/picture/AutoMovieRasterSheet.d.ts +2 -2
  201. package/lib/picture/AutoMovieRasterSheet.js.map +1 -1
  202. package/lib/picture/AutoMovieRasterSheet.mjs.map +1 -1
  203. package/lib/picture/IAutoMovieRasterComparison.d.ts +1 -33
  204. package/lib/picture/IAutoMovieRasterImage.d.ts +1 -17
  205. package/lib/picture/compareAutoMovieRasters.d.ts +1 -2
  206. package/lib/picture/compareAutoMovieRasters.js.map +1 -1
  207. package/lib/picture/compareAutoMovieRasters.mjs.map +1 -1
  208. package/lib/picture/decodeAutoMovieRasterPng.d.ts +1 -1
  209. package/lib/picture/decodeAutoMovieRasterPng.js.map +1 -1
  210. package/lib/picture/decodeAutoMovieRasterPng.mjs.map +1 -1
  211. package/lib/picture/encodeAutoMovieRasterPng.d.ts +1 -1
  212. package/lib/picture/encodeAutoMovieRasterPng.js.map +1 -1
  213. package/lib/picture/encodeAutoMovieRasterPng.mjs.map +1 -1
  214. package/lib/picture/hashAutoMovieRasterImage.d.ts +1 -1
  215. package/lib/picture/hashAutoMovieRasterImage.mjs.map +1 -1
  216. package/lib/picture/stampAutoMovieRasterLabel.d.ts +2 -5
  217. package/lib/picture/stampAutoMovieRasterLabel.js.map +1 -1
  218. package/lib/picture/stampAutoMovieRasterLabel.mjs.map +1 -1
  219. package/lib/planCaptionSidecar.d.ts +2 -8
  220. package/lib/planCaptionSidecar.js.map +1 -1
  221. package/lib/planCaptionSidecar.mjs.map +1 -1
  222. package/lib/planChunkedSequenceRender.d.ts +2 -9
  223. package/lib/planChunkedSequenceRender.js.map +1 -1
  224. package/lib/planChunkedSequenceRender.mjs.map +1 -1
  225. package/lib/planGuidePassOutputs.d.ts +2 -6
  226. package/lib/planGuidePassOutputs.js.map +1 -1
  227. package/lib/planGuidePassOutputs.mjs.map +1 -1
  228. package/lib/planPoseKeypointSidecar.d.ts +2 -12
  229. package/lib/planPoseKeypointSidecar.js.map +1 -1
  230. package/lib/planPoseKeypointSidecar.mjs.map +1 -1
  231. package/lib/planSequenceRender.d.ts +2 -9
  232. package/lib/planSequenceRender.js.map +1 -1
  233. package/lib/planSequenceRender.mjs.map +1 -1
  234. package/lib/planViewerFrameTimes.d.ts +2 -16
  235. package/lib/planViewerFrameTimes.js.map +1 -1
  236. package/lib/planViewerFrameTimes.mjs.map +1 -1
  237. package/lib/renderAndSee.d.ts +1 -2
  238. package/lib/renderAndSee.js.map +1 -1
  239. package/lib/renderAndSee.mjs.map +1 -1
  240. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +1 -41
  241. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +1 -53
  242. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +1 -27
  243. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +2 -13
  244. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -1
  245. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.mjs.map +1 -1
  246. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +2 -8
  247. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -1
  248. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.mjs.map +1 -1
  249. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +1 -1
  250. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -1
  251. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.mjs.map +1 -1
  252. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +1 -2
  253. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -1
  254. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.mjs.map +1 -1
  255. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +2 -8
  256. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -1
  257. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.mjs.map +1 -1
  258. package/lib/renderCaptionSidecar.d.ts +1 -1
  259. package/lib/renderCaptionSidecar.mjs.map +1 -1
  260. package/lib/renderPoseKeypointSidecar.d.ts +1 -1
  261. package/lib/renderPoseKeypointSidecar.mjs.map +1 -1
  262. package/lib/renderSequenceAndSee.d.ts +1 -2
  263. package/lib/renderSequenceAndSee.js.map +1 -1
  264. package/lib/renderSequenceAndSee.mjs.map +1 -1
  265. package/lib/renderSequenceVideo.d.ts +1 -3
  266. package/lib/renderSequenceVideo.js.map +1 -1
  267. package/lib/renderSequenceVideo.mjs.map +1 -1
  268. package/lib/renderVideo.d.ts +1 -3
  269. package/lib/renderVideo.js.map +1 -1
  270. package/lib/renderVideo.mjs.map +1 -1
  271. package/lib/scene/AutoMovieFilmBeautyComposition.d.ts +1 -25
  272. package/lib/scene/AutoMoviePlayer.d.ts +1 -2
  273. package/lib/scene/AutoMoviePlayer.js.map +1 -1
  274. package/lib/scene/AutoMoviePlayer.mjs.map +1 -1
  275. package/lib/scene/IApplyAutoMovieSectionPlanesProps.d.ts +1 -1
  276. package/lib/scene/IAutoMovieFilmBeautyLayer.d.ts +1 -12
  277. package/lib/scene/IAutoMovieFormationPoseTake.d.ts +1 -22
  278. package/lib/scene/IAutoMovieFormationViewerObject.d.ts +1 -2
  279. package/lib/scene/IAutoMovieRigLocalTransform.d.ts +1 -15
  280. package/lib/scene/IAutoMovieSpringAxisSettlement.d.ts +2 -2
  281. package/lib/scene/IBakeFormationCycleProps.d.ts +1 -2
  282. package/lib/scene/applyAutoMovieRigLocals.d.ts +1 -2
  283. package/lib/scene/applyAutoMovieRigLocals.js.map +1 -1
  284. package/lib/scene/applyAutoMovieRigLocals.mjs.map +1 -1
  285. package/lib/scene/applyAutoMovieSectionPlanes.mjs.map +1 -1
  286. package/lib/scene/applyFormationCycleCadence.d.ts +1 -1
  287. package/lib/scene/applyFormationCycleCadence.mjs.map +1 -1
  288. package/lib/scene/applyPose.d.ts +1 -2
  289. package/lib/scene/applyPose.js.map +1 -1
  290. package/lib/scene/applyPose.mjs.map +1 -1
  291. package/lib/scene/applyRenderMode.js.map +1 -1
  292. package/lib/scene/applyRenderMode.mjs.map +1 -1
  293. package/lib/scene/applySampledObjectMotion.d.ts +1 -1
  294. package/lib/scene/applySampledObjectMotion.mjs.map +1 -1
  295. package/lib/scene/applySemanticMaskMode.d.ts +1 -1
  296. package/lib/scene/applySemanticMaskMode.js.map +1 -1
  297. package/lib/scene/applySemanticMaskMode.mjs.map +1 -1
  298. package/lib/scene/autoMovieAnalysisRampColor.d.ts +2 -5
  299. package/lib/scene/autoMovieAnalysisRampColor.js.map +1 -1
  300. package/lib/scene/autoMovieAnalysisRampColor.mjs.map +1 -1
  301. package/lib/scene/bakeFormationCycle.d.ts +2 -1
  302. package/lib/scene/bakeFormationCycle.js +3 -2
  303. package/lib/scene/bakeFormationCycle.js.map +1 -1
  304. package/lib/scene/bakeFormationCycle.mjs +3 -2
  305. package/lib/scene/bakeFormationCycle.mjs.map +1 -1
  306. package/lib/scene/buildAutoMovieConstruction.d.ts +2 -5
  307. package/lib/scene/buildAutoMovieConstruction.js.map +1 -1
  308. package/lib/scene/buildAutoMovieConstruction.mjs.map +1 -1
  309. package/lib/scene/buildGeometry.d.ts +1 -1
  310. package/lib/scene/buildGeometry.js.map +1 -1
  311. package/lib/scene/buildGeometry.mjs.map +1 -1
  312. package/lib/scene/buildInstancedEffect.js.map +1 -1
  313. package/lib/scene/buildInstancedEffect.mjs.map +1 -1
  314. package/lib/scene/buildInstancedFormation.js.map +1 -1
  315. package/lib/scene/buildInstancedFormation.mjs.map +1 -1
  316. package/lib/scene/buildSpaceObject.js.map +1 -1
  317. package/lib/scene/buildSpaceObject.mjs.map +1 -1
  318. package/lib/scene/createAutoMoviePhysicalPoseAdapter.d.ts +2 -2
  319. package/lib/scene/createAutoMoviePhysicalPoseAdapter.js.map +1 -1
  320. package/lib/scene/createAutoMoviePhysicalPoseAdapter.mjs.map +1 -1
  321. package/lib/scene/describeFormationTextureSources.d.ts +1 -2
  322. package/lib/scene/describeFormationTextureSources.mjs.map +1 -1
  323. package/lib/scene/formation/index.d.ts +1 -1
  324. package/lib/scene/formationCycleCadence.d.ts +1 -1
  325. package/lib/scene/formationCycleCadence.mjs.map +1 -1
  326. package/lib/scene/human-polygon/AutoMovieHumanPolygon.d.ts +7 -57
  327. package/lib/scene/human-polygon/applyHumanPolygonPose.d.ts +2 -2
  328. package/lib/scene/human-polygon/applyHumanPolygonPose.js.map +1 -1
  329. package/lib/scene/human-polygon/applyHumanPolygonPose.mjs.map +1 -1
  330. package/lib/scene/human-polygon/buildHumanPolygon.d.ts +2 -1
  331. package/lib/scene/human-polygon/buildHumanPolygon.js.map +1 -1
  332. package/lib/scene/human-polygon/buildHumanPolygon.mjs.map +1 -1
  333. package/lib/scene/human-polygon/buildHumanPolygonModule.d.ts +2 -2
  334. package/lib/scene/human-polygon/buildHumanPolygonModule.js.map +1 -1
  335. package/lib/scene/human-polygon/buildHumanPolygonModule.mjs.map +1 -1
  336. package/lib/scene/human-polygon/buildHumanPolygonParts.d.ts +2 -2
  337. package/lib/scene/human-polygon/buildHumanPolygonParts.js.map +1 -1
  338. package/lib/scene/human-polygon/buildHumanPolygonParts.mjs.map +1 -1
  339. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.d.ts +3 -2
  340. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.js.map +1 -1
  341. package/lib/scene/human-polygon/createAutoMovieHumanPolygonFigure.mjs.map +1 -1
  342. package/lib/scene/index.d.ts +1 -1
  343. package/lib/scene/index.js +0 -1
  344. package/lib/scene/index.js.map +1 -1
  345. package/lib/scene/index.mjs +6 -6
  346. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.d.ts +2 -4
  347. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.js.map +1 -1
  348. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.mjs.map +1 -1
  349. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.d.ts +1 -1
  350. package/lib/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.mjs.map +1 -1
  351. package/lib/scene/inspection/IApplyAutoMovieInspectionProps.d.ts +2 -3
  352. package/lib/scene/inspection/IAutoMovieInspectionCamera.d.ts +1 -29
  353. package/lib/scene/inspection/IAutoMovieInspectionHandle.d.ts +3 -6
  354. package/lib/scene/inspection/IAutoMovieInspectionKind.d.ts +1 -16
  355. package/lib/scene/inspection/IAutoMovieInspectionLabel.d.ts +1 -18
  356. package/lib/scene/inspection/IAutoMovieInspectionLegendEntry.d.ts +1 -22
  357. package/lib/scene/inspection/IAutoMovieInspectionMarkSet.d.ts +1 -1
  358. package/lib/scene/inspection/IAutoMovieInspectionMeasured.d.ts +1 -1
  359. package/lib/scene/inspection/IAutoMovieInspectionRequest.d.ts +1 -99
  360. package/lib/scene/inspection/IAutoMovieInspectionTrail.d.ts +1 -18
  361. package/lib/scene/inspection/IAutoMovieInspectionView.d.ts +1 -80
  362. package/lib/scene/inspection/applyAutoMovieInspection.js.map +1 -1
  363. package/lib/scene/inspection/applyAutoMovieInspection.mjs.map +1 -1
  364. package/lib/scene/inspection/applyAutoMovieInspectionSection.d.ts +1 -1
  365. package/lib/scene/inspection/applyAutoMovieInspectionSection.mjs.map +1 -1
  366. package/lib/scene/inspection/applyAutoMovieInspectionShade.d.ts +2 -2
  367. package/lib/scene/inspection/applyAutoMovieInspectionShade.js.map +1 -1
  368. package/lib/scene/inspection/applyAutoMovieInspectionShade.mjs.map +1 -1
  369. package/lib/scene/inspection/buildAutoMovieInspectionMarks.mjs.map +1 -1
  370. package/lib/scene/inspection/chooseAutoMovieInspectionMarks.d.ts +1 -1
  371. package/lib/scene/inspection/chooseAutoMovieInspectionMarks.mjs.map +1 -1
  372. package/lib/scene/inspection/colorAutoMovieInspectionObjects.d.ts +3 -3
  373. package/lib/scene/inspection/colorAutoMovieInspectionObjects.js.map +1 -1
  374. package/lib/scene/inspection/colorAutoMovieInspectionObjects.mjs.map +1 -1
  375. package/lib/scene/inspection/expandAutoMovieInspectionSweep.d.ts +2 -17
  376. package/lib/scene/inspection/expandAutoMovieInspectionSweep.js.map +1 -1
  377. package/lib/scene/inspection/expandAutoMovieInspectionSweep.mjs.map +1 -1
  378. package/lib/scene/inspection/focusAutoMovieInspection.d.ts +2 -3
  379. package/lib/scene/inspection/focusAutoMovieInspection.js.map +1 -1
  380. package/lib/scene/inspection/focusAutoMovieInspection.mjs.map +1 -1
  381. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.d.ts +1 -1
  382. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.js.map +1 -1
  383. package/lib/scene/inspection/formatAutoMovieInspectionCameraView.mjs.map +1 -1
  384. package/lib/scene/inspection/formatAutoMovieInspectionRequest.d.ts +1 -1
  385. package/lib/scene/inspection/formatAutoMovieInspectionRequest.js.map +1 -1
  386. package/lib/scene/inspection/formatAutoMovieInspectionRequest.mjs.map +1 -1
  387. package/lib/scene/inspection/formatAutoMovieInspectionView.d.ts +1 -1
  388. package/lib/scene/inspection/formatAutoMovieInspectionView.js.map +1 -1
  389. package/lib/scene/inspection/formatAutoMovieInspectionView.mjs.map +1 -1
  390. package/lib/scene/inspection/legendAutoMovieInspectionMarks.d.ts +2 -6
  391. package/lib/scene/inspection/legendAutoMovieInspectionMarks.js.map +1 -1
  392. package/lib/scene/inspection/legendAutoMovieInspectionMarks.mjs.map +1 -1
  393. package/lib/scene/inspection/listAutoMovieInspectionKinds.d.ts +2 -9
  394. package/lib/scene/inspection/listAutoMovieInspectionKinds.js.map +1 -1
  395. package/lib/scene/inspection/listAutoMovieInspectionKinds.mjs.map +1 -1
  396. package/lib/scene/inspection/markAutoMovieInspectionTrails.d.ts +1 -2
  397. package/lib/scene/inspection/markAutoMovieInspectionTrails.js.map +1 -1
  398. package/lib/scene/inspection/markAutoMovieInspectionTrails.mjs.map +1 -1
  399. package/lib/scene/inspection/measureAutoMovieInspectionDefects.d.ts +1 -1
  400. package/lib/scene/inspection/measureAutoMovieInspectionDefects.js.map +1 -1
  401. package/lib/scene/inspection/measureAutoMovieInspectionDefects.mjs.map +1 -1
  402. package/lib/scene/inspection/measureAutoMovieInspectionEdges.mjs.map +1 -1
  403. package/lib/scene/inspection/measureAutoMovieInspectionMeshes.d.ts +1 -1
  404. package/lib/scene/inspection/measureAutoMovieInspectionMeshes.mjs.map +1 -1
  405. package/lib/scene/inspection/measureAutoMovieInspectionPaths.d.ts +2 -7
  406. package/lib/scene/inspection/measureAutoMovieInspectionPaths.js.map +1 -1
  407. package/lib/scene/inspection/measureAutoMovieInspectionPaths.mjs.map +1 -1
  408. package/lib/scene/inspection/mergeAutoMovieInspectionLegends.d.ts +1 -1
  409. package/lib/scene/inspection/mergeAutoMovieInspectionLegends.mjs.map +1 -1
  410. package/lib/scene/inspection/parseAutoMovieInspectionRequest.d.ts +1 -1
  411. package/lib/scene/inspection/parseAutoMovieInspectionRequest.js.map +1 -1
  412. package/lib/scene/inspection/parseAutoMovieInspectionRequest.mjs.map +1 -1
  413. package/lib/scene/inspection/parseAutoMovieInspectionView.d.ts +1 -1
  414. package/lib/scene/inspection/parseAutoMovieInspectionView.js.map +1 -1
  415. package/lib/scene/inspection/parseAutoMovieInspectionView.mjs.map +1 -1
  416. package/lib/scene/inspection/placeAutoMovieInspectionLabels.d.ts +2 -6
  417. package/lib/scene/inspection/placeAutoMovieInspectionLabels.js.map +1 -1
  418. package/lib/scene/inspection/placeAutoMovieInspectionLabels.mjs.map +1 -1
  419. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.d.ts +2 -9
  420. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.js.map +1 -1
  421. package/lib/scene/inspection/planAutoMovieInspectionTrailTimes.mjs.map +1 -1
  422. package/lib/scene/inspection/resolveAutoMovieInspectionColors.d.ts +2 -18
  423. package/lib/scene/inspection/resolveAutoMovieInspectionColors.js.map +1 -1
  424. package/lib/scene/inspection/resolveAutoMovieInspectionColors.mjs.map +1 -1
  425. package/lib/scene/inspection/resolveAutoMovieInspectionView.d.ts +1 -2
  426. package/lib/scene/inspection/resolveAutoMovieInspectionView.js.map +1 -1
  427. package/lib/scene/inspection/resolveAutoMovieInspectionView.mjs.map +1 -1
  428. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.d.ts +1 -1
  429. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.js.map +1 -1
  430. package/lib/scene/inspection/sampleAutoMovieInspectionTrails.mjs.map +1 -1
  431. package/lib/scene/matchesAutoMovieShadowTextureProfile.d.ts +1 -1
  432. package/lib/scene/matchesAutoMovieShadowTextureProfile.mjs.map +1 -1
  433. package/lib/scene/observeAutoMovieRendererFrame.d.ts +2 -5
  434. package/lib/scene/observeAutoMovieRendererFrame.js.map +1 -1
  435. package/lib/scene/observeAutoMovieRendererFrame.mjs.map +1 -1
  436. package/lib/scene/planAutoMovieShadowTextureTarget.d.ts +1 -1
  437. package/lib/scene/planAutoMovieShadowTextureTarget.mjs.map +1 -1
  438. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.d.ts +2 -6
  439. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.js.map +1 -1
  440. package/lib/scene/readAutoMovieFilmDisplayTextureResidency.mjs.map +1 -1
  441. package/lib/scene/readAutoMovieMaterialTextureSources.d.ts +3 -5
  442. package/lib/scene/readAutoMovieMaterialTextureSources.js.map +1 -1
  443. package/lib/scene/readAutoMovieMaterialTextureSources.mjs.map +1 -1
  444. package/lib/scene/readAutoMovieRenderTextureTarget.d.ts +1 -1
  445. package/lib/scene/readAutoMovieRenderTextureTarget.mjs.map +1 -1
  446. package/lib/scene/readAutoMovieShadowTextureTargets.d.ts +1 -2
  447. package/lib/scene/readAutoMovieShadowTextureTargets.js.map +1 -1
  448. package/lib/scene/readAutoMovieShadowTextureTargets.mjs.map +1 -1
  449. package/lib/scene/readAutoMovieTextureSource.d.ts +1 -1
  450. package/lib/scene/readAutoMovieTextureSource.js.map +1 -1
  451. package/lib/scene/readAutoMovieTextureSource.mjs.map +1 -1
  452. package/lib/scene/readAutoMovieTransmissionTextureTarget.d.ts +1 -1
  453. package/lib/scene/readAutoMovieTransmissionTextureTarget.mjs.map +1 -1
  454. package/lib/scene/resolveAutoMovieFilmBeautyComposition.d.ts +2 -3
  455. package/lib/scene/resolveAutoMovieFilmBeautyComposition.js.map +1 -1
  456. package/lib/scene/resolveAutoMovieFilmBeautyComposition.mjs.map +1 -1
  457. package/lib/scene/semanticMask/IAutoMovieSemanticMaskBinding.d.ts +1 -19
  458. package/lib/scene/semanticMask/attachAutoMovieSemanticMask.d.ts +1 -1
  459. package/lib/scene/semanticMask/attachAutoMovieSemanticMask.mjs.map +1 -1
  460. package/lib/scene/semanticMask/autoMovieSemanticMaskOf.d.ts +1 -1
  461. package/lib/scene/semanticMask/autoMovieSemanticMaskOf.mjs.map +1 -1
  462. package/lib/sliceCaptionSidecar.d.ts +1 -1
  463. package/lib/sliceCaptionSidecar.mjs.map +1 -1
  464. package/package.json +7 -7
  465. package/src/IAutoMovieCaptionEntry.ts +1 -32
  466. package/src/IAutoMovieCaptionSidecar.ts +1 -29
  467. package/src/IAutoMovieCapturedFrame.ts +1 -24
  468. package/src/IAutoMovieGuidePassOutput.ts +1 -27
  469. package/src/IAutoMoviePoseKeypointActor.ts +1 -39
  470. package/src/IAutoMoviePoseKeypointFrame.ts +1 -28
  471. package/src/IAutoMoviePoseKeypointSidecar.ts +1 -25
  472. package/src/IAutoMovieRenderAdapters.ts +1 -39
  473. package/src/IAutoMovieRenderAndSeeRequest.ts +1 -38
  474. package/src/IAutoMovieRenderAndSeeResult.ts +1 -23
  475. package/src/IAutoMovieRenderChunk.ts +1 -62
  476. package/src/IAutoMovieRenderChunkPlan.ts +1 -40
  477. package/src/IAutoMovieRenderPassManifest.ts +1 -25
  478. package/src/IAutoMovieRenderReassembly.ts +1 -28
  479. package/src/IAutoMovieRenderResult.ts +1 -46
  480. package/src/IAutoMovieSequenceRenderAdapters.ts +1 -41
  481. package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +1 -47
  482. package/src/IAutoMovieSequenceRenderAndSeeResult.ts +1 -23
  483. package/src/IAutoMovieSequenceRenderFrame.ts +1 -48
  484. package/src/IAutoMovieSequenceRenderPlan.ts +1 -88
  485. package/src/IAutoMovieSequenceRenderResult.ts +1 -52
  486. package/src/IAutoMovieSequenceRenderShotSpan.ts +1 -46
  487. package/src/IAutoMovieSequenceRenderTransitionSpan.ts +1 -46
  488. package/src/audio/mixAutoMovieAudioPcm.ts +10 -44
  489. package/src/auditAutoMovieRenderObservation.ts +5 -14
  490. package/src/cache/createAutoMovieHttpArtifactStore.ts +1 -1
  491. package/src/caption/IAutoMovieBeatCaption.ts +1 -23
  492. package/src/caption/beatCaptions.ts +1 -1
  493. package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +1 -12
  494. package/src/caption/parseAutoMovieCaptionLanguage.ts +1 -13
  495. package/src/capture/AutoMovieCaptureFolder.ts +10 -16
  496. package/src/capture/IAutoMovieCaptureBudget.ts +1 -26
  497. package/src/capture/IAutoMovieCaptureCell.ts +1 -42
  498. package/src/capture/IAutoMovieCaptureComparison.ts +1 -96
  499. package/src/capture/IAutoMovieCaptureDrawing.ts +1 -64
  500. package/src/capture/IAutoMovieCaptureLayout.ts +1 -51
  501. package/src/capture/IAutoMovieCapturePlan.ts +1 -36
  502. package/src/capture/IAutoMovieCapturePlanRequest.ts +1 -117
  503. package/src/capture/IAutoMovieCaptureRecord.ts +1 -174
  504. package/src/capture/IAutoMovieCaptureRequestSource.ts +1 -37
  505. package/src/capture/IAutoMovieCaptureResolution.ts +1 -23
  506. package/src/capture/IAutoMovieCaptureSelection.ts +1 -28
  507. package/src/capture/IAutoMovieCaptureStorage.ts +1 -76
  508. package/src/capture/IAutoMovieCaptureSubject.ts +1 -94
  509. package/src/capture/IAutoMovieCaptureTime.ts +1 -17
  510. package/src/capture/IAutoMovieCaptureWindow.ts +1 -29
  511. package/src/capture/compareAutoMovieCaptureRounds.ts +33 -48
  512. package/src/capture/formatAutoMovieCapturePlanRequest.ts +7 -3
  513. package/src/capture/markAutoMovieCaptureCell.ts +1 -1
  514. package/src/capture/parseAutoMovieCapturePlanRequest.ts +13 -10
  515. package/src/capture/planAutoMovieCapture.ts +20 -21
  516. package/src/capture/planAutoMovieCaptureFrames.ts +9 -28
  517. package/src/capture/planAutoMovieCaptureLayout.ts +8 -21
  518. package/src/capture/planAutoMovieVideoFrames.ts +5 -10
  519. package/src/capture/planAutoMovieVideoSceneCuts.ts +5 -10
  520. package/src/capture/readAutoMovieVideoSceneCuts.ts +5 -7
  521. package/src/capture/resolveAutoMovieCapturePatterns.ts +11 -14
  522. package/src/capture/runAutoMovieCapture.ts +19 -33
  523. package/src/capture/runAutoMovieVideoCapture.ts +13 -32
  524. package/src/capture/scaleAutoMovieCaptureLabels.ts +5 -2
  525. package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +5 -6
  526. package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +17 -27
  527. package/src/delivery/AutoMovieProductionPngRole.ts +1 -18
  528. package/src/delivery/IAutoMovieProductionPngProfile.ts +1 -52
  529. package/src/delivery/IAutoMovieProductionVideoProfile.ts +1 -48
  530. package/src/delivery/assertAutoMovieCaptureClock.ts +7 -7
  531. package/src/delivery/assertProductionPngPicture.ts +8 -13
  532. package/src/delivery/assertProductionVideoProfile.ts +5 -12
  533. package/src/delivery/auditAutoMovieDecodedFrames.ts +17 -56
  534. package/src/delivery/auditAutoMovieEncodedPresentation.ts +3 -8
  535. package/src/delivery/planAutoMovieVideoEncoding.ts +8 -23
  536. package/src/delivery/productionOpusDescription.ts +9 -15
  537. package/src/delivery/resolveProductionPngProfile.ts +9 -17
  538. package/src/delivery/resolveProductionVideoProfile.ts +9 -16
  539. package/src/draw/AutoMovieDrawSession.ts +19 -18
  540. package/src/draw/IAutoMovieDrawCall.ts +1 -34
  541. package/src/draw/IAutoMovieDrawDescription.ts +1 -17
  542. package/src/draw/IAutoMovieDrawFunction.ts +5 -3
  543. package/src/draw/IAutoMovieDrawResult.ts +1 -45
  544. package/src/draw/IAutoMovieDrawScene.ts +10 -2
  545. package/src/draw/decodeAutoMovieDrawPixels.ts +5 -3
  546. package/src/draw/describeAutoMovieDrawScene.ts +18 -11
  547. package/src/draw/index.ts +1 -0
  548. package/src/draw/installAutoMovieDraw.ts +43 -45
  549. package/src/draw/planAutoMovieDrawCall.ts +8 -5
  550. package/src/draw/renderAutoMovieDrawnVideo.ts +6 -9
  551. package/src/draw/replaceAutoMovieDrawInspection.ts +36 -0
  552. package/src/draw/stampAutoMovieDrawLegend.ts +7 -5
  553. package/src/film/AutoMovieOrderedScalar.ts +1 -15
  554. package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +1 -40
  555. package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +1 -34
  556. package/src/film/IAutoMovieProductionEncoderIdentity.ts +1 -42
  557. package/src/film/IAutoMovieProductionRenderChunk.ts +1 -47
  558. package/src/film/IAutoMovieProductionRenderJobPlan.ts +1 -73
  559. package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +1 -37
  560. package/src/film/IAutoMovieProductionRenderTier.ts +1 -27
  561. package/src/film/equalOrderedScalars.ts +10 -10
  562. package/src/film/normalizeAudioAssets.ts +4 -2
  563. package/src/film/normalizeRenderTier.ts +1 -1
  564. package/src/film/planProductionRenderJob.ts +11 -48
  565. package/src/film/resolveProductionRenderTierFrameFormat.ts +1 -1
  566. package/src/film/validWaveAudioIdentity.ts +3 -3
  567. package/src/picture/AutoMovieRasterSheet.ts +7 -3
  568. package/src/picture/IAutoMovieRasterComparison.ts +1 -33
  569. package/src/picture/IAutoMovieRasterImage.ts +1 -19
  570. package/src/picture/compareAutoMovieRasters.ts +4 -2
  571. package/src/picture/decodeAutoMovieRasterPng.ts +2 -1
  572. package/src/picture/encodeAutoMovieRasterPng.ts +2 -1
  573. package/src/picture/hashAutoMovieRasterImage.ts +1 -1
  574. package/src/picture/stampAutoMovieRasterLabel.ts +5 -2
  575. package/src/planCaptionSidecar.ts +11 -30
  576. package/src/planChunkedSequenceRender.ts +15 -26
  577. package/src/planGuidePassOutputs.ts +10 -16
  578. package/src/planPoseKeypointSidecar.ts +11 -40
  579. package/src/planSequenceRender.ts +11 -32
  580. package/src/planViewerFrameTimes.ts +5 -22
  581. package/src/renderAndSee.ts +5 -2
  582. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +1 -53
  583. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +1 -61
  584. package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +1 -29
  585. package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +9 -37
  586. package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +11 -15
  587. package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +2 -3
  588. package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +4 -3
  589. package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +7 -19
  590. package/src/renderCaptionSidecar.ts +1 -1
  591. package/src/renderPoseKeypointSidecar.ts +1 -1
  592. package/src/renderSequenceAndSee.ts +5 -2
  593. package/src/renderSequenceVideo.ts +6 -4
  594. package/src/renderVideo.ts +5 -3
  595. package/src/scene/AutoMovieFilmBeautyComposition.ts +1 -24
  596. package/src/scene/AutoMoviePlayer.ts +12 -12
  597. package/src/scene/IApplyAutoMovieSectionPlanesProps.ts +1 -1
  598. package/src/scene/IAutoMovieFilmBeautyLayer.ts +1 -12
  599. package/src/scene/IAutoMovieFormationPoseTake.ts +1 -26
  600. package/src/scene/IAutoMovieFormationViewerObject.ts +4 -2
  601. package/src/scene/IAutoMovieRigLocalTransform.ts +1 -16
  602. package/src/scene/IAutoMovieSpringAxisSettlement.ts +2 -2
  603. package/src/scene/IBakeFormationCycleProps.ts +4 -2
  604. package/src/scene/applyAutoMovieRigLocals.ts +4 -2
  605. package/src/scene/applyAutoMovieSectionPlanes.ts +1 -1
  606. package/src/scene/applyFormationCycleCadence.ts +1 -1
  607. package/src/scene/applyPose.ts +2 -5
  608. package/src/scene/applyRenderMode.ts +5 -5
  609. package/src/scene/applySampledObjectMotion.ts +1 -1
  610. package/src/scene/applySemanticMaskMode.ts +1 -1
  611. package/src/scene/autoMovieAnalysisRampColor.ts +7 -5
  612. package/src/scene/bakeFormationCycle.ts +4 -3
  613. package/src/scene/buildAutoMovieConstruction.ts +2 -5
  614. package/src/scene/buildGeometry.ts +6 -9
  615. package/src/scene/buildInstancedEffect.ts +6 -6
  616. package/src/scene/buildInstancedFormation.ts +3 -3
  617. package/src/scene/buildSpaceObject.ts +7 -3
  618. package/src/scene/createAutoMoviePhysicalPoseAdapter.ts +4 -4
  619. package/src/scene/describeFormationTextureSources.ts +2 -2
  620. package/src/scene/formation/index.ts +1 -1
  621. package/src/scene/formationCycleCadence.ts +1 -1
  622. package/src/scene/human-polygon/AutoMovieHumanPolygon.ts +7 -67
  623. package/src/scene/human-polygon/applyHumanPolygonPose.ts +12 -7
  624. package/src/scene/human-polygon/buildHumanPolygon.ts +23 -12
  625. package/src/scene/human-polygon/buildHumanPolygonModule.ts +6 -3
  626. package/src/scene/human-polygon/buildHumanPolygonParts.ts +10 -6
  627. package/src/scene/human-polygon/createAutoMovieHumanPolygonFigure.ts +10 -3
  628. package/src/scene/index.ts +1 -1
  629. package/src/scene/inspection/AUTO_MOVIE_INSPECTION_KINDS.ts +3 -1
  630. package/src/scene/inspection/AUTO_MOVIE_INSPECTION_PALETTE.ts +1 -1
  631. package/src/scene/inspection/IApplyAutoMovieInspectionProps.ts +5 -3
  632. package/src/scene/inspection/IAutoMovieInspectionCamera.ts +1 -38
  633. package/src/scene/inspection/IAutoMovieInspectionHandle.ts +8 -6
  634. package/src/scene/inspection/IAutoMovieInspectionKind.ts +1 -18
  635. package/src/scene/inspection/IAutoMovieInspectionLabel.ts +1 -21
  636. package/src/scene/inspection/IAutoMovieInspectionLegendEntry.ts +1 -24
  637. package/src/scene/inspection/IAutoMovieInspectionMarkSet.ts +1 -1
  638. package/src/scene/inspection/IAutoMovieInspectionMeasured.ts +1 -1
  639. package/src/scene/inspection/IAutoMovieInspectionRequest.ts +1 -115
  640. package/src/scene/inspection/IAutoMovieInspectionTrail.ts +1 -21
  641. package/src/scene/inspection/IAutoMovieInspectionView.ts +1 -92
  642. package/src/scene/inspection/applyAutoMovieInspection.ts +12 -8
  643. package/src/scene/inspection/applyAutoMovieInspectionSection.ts +1 -1
  644. package/src/scene/inspection/applyAutoMovieInspectionShade.ts +2 -2
  645. package/src/scene/inspection/buildAutoMovieInspectionMarks.ts +1 -1
  646. package/src/scene/inspection/chooseAutoMovieInspectionMarks.ts +1 -1
  647. package/src/scene/inspection/colorAutoMovieInspectionObjects.ts +6 -3
  648. package/src/scene/inspection/expandAutoMovieInspectionSweep.ts +8 -15
  649. package/src/scene/inspection/focusAutoMovieInspection.ts +6 -4
  650. package/src/scene/inspection/formatAutoMovieInspectionCameraView.ts +2 -1
  651. package/src/scene/inspection/formatAutoMovieInspectionRequest.ts +6 -3
  652. package/src/scene/inspection/formatAutoMovieInspectionView.ts +4 -3
  653. package/src/scene/inspection/legendAutoMovieInspectionMarks.ts +6 -3
  654. package/src/scene/inspection/listAutoMovieInspectionKinds.ts +7 -10
  655. package/src/scene/inspection/markAutoMovieInspectionTrails.ts +4 -2
  656. package/src/scene/inspection/measureAutoMovieInspectionDefects.ts +5 -5
  657. package/src/scene/inspection/measureAutoMovieInspectionEdges.ts +1 -1
  658. package/src/scene/inspection/measureAutoMovieInspectionMeshes.ts +1 -1
  659. package/src/scene/inspection/measureAutoMovieInspectionPaths.ts +6 -3
  660. package/src/scene/inspection/mergeAutoMovieInspectionLegends.ts +1 -1
  661. package/src/scene/inspection/parseAutoMovieInspectionRequest.ts +10 -7
  662. package/src/scene/inspection/parseAutoMovieInspectionView.ts +6 -4
  663. package/src/scene/inspection/placeAutoMovieInspectionLabels.ts +6 -7
  664. package/src/scene/inspection/planAutoMovieInspectionTrailTimes.ts +4 -11
  665. package/src/scene/inspection/resolveAutoMovieInspectionColors.ts +7 -11
  666. package/src/scene/inspection/resolveAutoMovieInspectionView.ts +5 -3
  667. package/src/scene/inspection/sampleAutoMovieInspectionTrails.ts +1 -1
  668. package/src/scene/matchesAutoMovieShadowTextureProfile.ts +1 -1
  669. package/src/scene/observeAutoMovieRendererFrame.ts +3 -3
  670. package/src/scene/planAutoMovieShadowTextureTarget.ts +1 -1
  671. package/src/scene/readAutoMovieFilmDisplayTextureResidency.ts +3 -12
  672. package/src/scene/readAutoMovieMaterialTextureSources.ts +5 -3
  673. package/src/scene/readAutoMovieRenderTextureTarget.ts +1 -1
  674. package/src/scene/readAutoMovieShadowTextureTargets.ts +5 -5
  675. package/src/scene/readAutoMovieTextureSource.ts +4 -2
  676. package/src/scene/readAutoMovieTransmissionTextureTarget.ts +1 -1
  677. package/src/scene/resolveAutoMovieFilmBeautyComposition.ts +6 -4
  678. package/src/scene/semanticMask/IAutoMovieSemanticMaskBinding.ts +1 -24
  679. package/src/scene/semanticMask/attachAutoMovieSemanticMask.ts +1 -1
  680. package/src/scene/semanticMask/autoMovieSemanticMaskOf.ts +1 -1
  681. package/src/sliceCaptionSidecar.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"planCaptionSidecar.mjs","names":[],"sources":["../src/planCaptionSidecar.ts"],"sourcesContent":["import {\n IAutoMoviePlaybackSample,\n IAutoMoviePlaybackTimeline,\n playbackCursor,\n sequenceTimeline,\n} from \"@automovie/engine\";\nimport {\n IAutoMovieScript,\n IAutoMovieSequence,\n IAutoMovieShot,\n} from \"@automovie/interface\";\n\nimport { IAutoMovieBeatCaption } from \"./caption/IAutoMovieBeatCaption.js\";\nimport { beatCaptions } from \"./caption/beatCaptions.js\";\nimport {\n IAutoMovieCaptionEntry,\n IAutoMovieCaptionSidecar,\n} from \"./captionSidecar.js\";\nimport { frameTimes } from \"./frameTimes.js\";\nimport { shotBeat } from \"./shotBeat.js\";\n\n/**\n * Plan the caption sidecar of one sequence render: which beat's shot is live at every output frame, grouped into spans, each joined to its beat's caption and enclosing scene slug.\n *\n * The cut is laid on the output clock by `sequenceTimeline`, and the output frames are the `frameTimes` schedule `planSequenceRender` captures, so span boundaries land on the same frames as the render. A frame inside a transition belongs to the incoming shot, as in playback. A shot id `shot:<beat>` names that beat; an unprefixed id is taken as the beat id itself. A beat with no caption, or a script without a tree, yields null `caption` and `slug` while the frame-to-beat spans remain.\n *\n * Throws when `fps` is not a finite positive number, when the runtime rounds to zero output frames (the same refusal `planSequenceRender` makes), or when `sequenceTimeline` refuses the cut. Planning only: the host writes the file through `renderCaptionSidecar`.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Frames come from frameTimes, the independently computed binary64 i/fps schedule the render plan uses, and a forward-only playbackCursor resolves each instant to the live shot. Division can round, but the positive clock gives the non-decreasing queries the cursor requires; grouping consecutive equal beats into half-open spans covers every scheduled frame exactly once.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Timeline layout and live-shot resolution stay in the engine, the beat index in `beatCaptions`, and serialization in `renderCaptionSidecar`; this function owns only sampling, grouping and the join, so the sidecar cannot drift from the render's frame schedule.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The `shot:` prefix is the interface's documented shot-to-beat naming, not a fixture case, read through `shotBeat`, which the pose-keypoint plan shares, and no sequence or beat is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the clock and schedule shared with the render, the transition rule, the shot-to-beat mapping, the null states, every refusal, and that the host writes the file.\n * @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, F output frames, E cut entries and N script-tree nodes, timeline indexing, caption indexing and the cursor sweep take O(S+F+E+N) work. The schedule holds F times, the returned range list can also reach F entries, and each range joins the beat index once without retaining a separate playback-sample array.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner computes one sidecar per call from caller-supplied values and coordinates no phases; a host that also plans the render recomputes the shared schedule, which is cheap arithmetic.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame schedule, cursor and beat index are local and released on return; the returned sidecar, owned by the caller, holds one entry per run of consecutive frames of one beat, at most F.\n */\nexport const planCaptionSidecar: (props: {\n script: IAutoMovieScript;\n sequence: IAutoMovieSequence;\n shots: IAutoMovieShot[];\n fps: number;\n}) => IAutoMovieCaptionSidecar = (props: {\n /** The script whose screenplay tree carries captions and scene slugs. */\n script: IAutoMovieScript;\n\n /** The cut being rendered. */\n sequence: IAutoMovieSequence;\n\n /** The shots the cut references, each id at most once. */\n shots: IAutoMovieShot[];\n\n /**\n * Output frames per second: the render clock, which may differ from `sequence.fps`.\n */\n fps: number;\n}): IAutoMovieCaptionSidecar => {\n const script: IAutoMovieScript = props.script;\n const sequence: IAutoMovieSequence = props.sequence;\n const shots: IAutoMovieShot[] = props.shots;\n const fps: number = props.fps;\n if (!Number.isFinite(fps) || fps <= 0)\n throw new Error(`fps must be a finite number > 0, but was ${fps}`);\n\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n sequence,\n shots,\n );\n const times: number[] = frameTimes(fps, timeline.runtime);\n if (times.length === 0)\n throw new Error(\n `planCaptionSidecar requires at least one frame; fps ${fps} and duration ${timeline.runtime} produced zero frames`,\n );\n const captions: Map<string, IAutoMovieBeatCaption> = beatCaptions(script);\n const cursor: (seconds: number) => IAutoMoviePlaybackSample = playbackCursor(\n sequence,\n timeline,\n );\n\n const entries: IAutoMovieCaptionEntry[] = [];\n times.forEach((time: number, frame: number): void => {\n const beat: string = shotBeat(cursor(time).shot);\n const last: IAutoMovieCaptionEntry | undefined =\n entries[entries.length - 1];\n if (last !== undefined && last.beat === beat) {\n last.frameEnd = frame + 1;\n return;\n }\n const authored: IAutoMovieBeatCaption | undefined = captions.get(beat);\n entries.push({\n frameStart: frame,\n frameEnd: frame + 1,\n beat,\n caption: authored?.caption ?? null,\n slug: authored?.slug ?? null,\n });\n });\n return { target: sequence.id, fps, frameCount: times.length, entries };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,MAAa,sBAKqB,UAcF;CAC9B,MAAM,SAA2B,MAAM;CACvC,MAAM,WAA+B,MAAM;CAC3C,MAAM,QAA0B,MAAM;CACtC,MAAM,MAAc,MAAM;CAC1B,IAAI,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAClC,MAAM,IAAI,MAAM,4CAA4C,KAAK;CAEnE,MAAM,WAAuC,iBAC3C,UACA,KACF;CACA,MAAM,QAAkB,WAAW,KAAK,SAAS,OAAO;CACxD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,uDAAuD,IAAI,gBAAgB,SAAS,QAAQ,sBAC9F;CACF,MAAM,WAA+C,aAAa,MAAM;CACxE,MAAM,SAAwD,eAC5D,UACA,QACF;CAEA,MAAM,UAAoC,CAAC;CAC3C,MAAM,SAAS,MAAc,UAAwB;EACnD,MAAM,OAAe,SAAS,OAAO,IAAI,CAAC,CAAC,IAAI;EAC/C,MAAM,OACJ,QAAQ,QAAQ,SAAS;EAC3B,IAAI,SAAS,KAAA,KAAa,KAAK,SAAS,MAAM;GAC5C,KAAK,WAAW,QAAQ;GACxB;EACF;EACA,MAAM,WAA8C,SAAS,IAAI,IAAI;EACrE,QAAQ,KAAK;GACX,YAAY;GACZ,UAAU,QAAQ;GAClB;GACA,SAAS,UAAU,WAAW;GAC9B,MAAM,UAAU,QAAQ;EAC1B,CAAC;CACH,CAAC;CACD,OAAO;EAAE,QAAQ,SAAS;EAAI;EAAK,YAAY,MAAM;EAAQ;CAAQ;AACvE"}
1
+ {"version":3,"file":"planCaptionSidecar.mjs","names":[],"sources":["../src/planCaptionSidecar.ts"],"sourcesContent":["import { playbackCursor, sequenceTimeline } from \"@automovie/engine\";\nimport type {\n IAutoMovieBeatCaption,\n IAutoMovieCaptionEntry,\n IAutoMovieCaptionSidecar,\n IAutoMoviePlanCaptionSidecarProps,\n IAutoMoviePlaybackSample,\n IAutoMoviePlaybackTimeline,\n IAutoMovieScript,\n IAutoMovieSequence,\n IAutoMovieShot,\n} from \"@automovie/interface\";\n\nimport { beatCaptions } from \"./caption/beatCaptions.js\";\nimport { frameTimes } from \"./frameTimes.js\";\nimport { shotBeat } from \"./shotBeat.js\";\n\n/**\n * Plan the caption sidecar of one sequence render: which beat's shot is live at every output frame, grouped into spans, each joined to its beat's caption and enclosing scene slug.\n *\n * The cut is laid on the output clock by `sequenceTimeline`, and the output frames are the `frameTimes` schedule `planSequenceRender` captures, so span boundaries land on the same frames as the render. A frame inside a transition belongs to the incoming shot, as in playback. A shot id `shot:<beat>` names that beat; an unprefixed id is taken as the beat id itself. A beat with no caption, or a script without a tree, yields null `caption` and `slug` while the frame-to-beat spans remain.\n *\n * Throws when `fps` is not a finite positive number, when the runtime rounds to zero output frames (the same refusal `planSequenceRender` makes), or when `sequenceTimeline` refuses the cut. Planning only: the host writes the file through `renderCaptionSidecar`.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Frames come from frameTimes, the independently computed binary64 i/fps schedule the render plan uses, and a forward-only playbackCursor resolves each instant to the live shot. Division can round, but the positive clock gives the non-decreasing queries the cursor requires; grouping consecutive equal beats into half-open spans covers every scheduled frame exactly once.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Timeline layout and live-shot resolution stay in the engine, the beat index in `beatCaptions`, and serialization in `renderCaptionSidecar`; this function owns only sampling, grouping and the join, so the sidecar cannot drift from the render's frame schedule.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The `shot:` prefix is the interface's documented shot-to-beat naming, not a fixture case, read through `shotBeat`, which the pose-keypoint plan shares, and no sequence or beat is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the clock and schedule shared with the render, the transition rule, the shot-to-beat mapping, the null states, every refusal, and that the host writes the file.\n * @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, F output frames, E cut entries and N script-tree nodes, timeline indexing, caption indexing and the cursor sweep take O(S+F+E+N) work. The schedule holds F times, the returned range list can also reach F entries, and each range joins the beat index once without retaining a separate playback-sample array.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner computes one sidecar per call from caller-supplied values and coordinates no phases; a host that also plans the render recomputes the shared schedule, which is cheap arithmetic.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame schedule, cursor and beat index are local and released on return; the returned sidecar, owned by the caller, holds one entry per run of consecutive frames of one beat, at most F.\n */\nexport const planCaptionSidecar: (\n props: IAutoMoviePlanCaptionSidecarProps,\n) => IAutoMovieCaptionSidecar = (\n props: IAutoMoviePlanCaptionSidecarProps,\n): IAutoMovieCaptionSidecar => {\n const script: IAutoMovieScript = props.script;\n const sequence: IAutoMovieSequence = props.sequence;\n const shots: IAutoMovieShot[] = props.shots;\n const fps: number = props.fps;\n if (!Number.isFinite(fps) || fps <= 0)\n throw new Error(`fps must be a finite number > 0, but was ${fps}`);\n\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n sequence,\n shots,\n );\n const times: number[] = frameTimes(fps, timeline.runtime);\n if (times.length === 0)\n throw new Error(\n `planCaptionSidecar requires at least one frame; fps ${fps} and duration ${timeline.runtime} produced zero frames`,\n );\n const captions: Map<string, IAutoMovieBeatCaption> = beatCaptions(script);\n const cursor: (seconds: number) => IAutoMoviePlaybackSample = playbackCursor(\n sequence,\n timeline,\n );\n\n const entries: IAutoMovieCaptionEntry[] = [];\n times.forEach((time: number, frame: number): void => {\n const beat: string = shotBeat(cursor(time).shot);\n const last: IAutoMovieCaptionEntry | undefined =\n entries[entries.length - 1];\n if (last !== undefined && last.beat === beat) {\n last.frameEnd = frame + 1;\n return;\n }\n const authored: IAutoMovieBeatCaption | undefined = captions.get(beat);\n entries.push({\n frameStart: frame,\n frameEnd: frame + 1,\n beat,\n caption: authored?.caption ?? null,\n slug: authored?.slug ?? null,\n });\n });\n return { target: sequence.id, fps, frameCount: times.length, entries };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAgCA,MAAa,sBAGX,UAC6B;CAC7B,MAAM,SAA2B,MAAM;CACvC,MAAM,WAA+B,MAAM;CAC3C,MAAM,QAA0B,MAAM;CACtC,MAAM,MAAc,MAAM;CAC1B,IAAI,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAClC,MAAM,IAAI,MAAM,4CAA4C,KAAK;CAEnE,MAAM,WAAuC,iBAC3C,UACA,KACF;CACA,MAAM,QAAkB,WAAW,KAAK,SAAS,OAAO;CACxD,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,uDAAuD,IAAI,gBAAgB,SAAS,QAAQ,sBAC9F;CACF,MAAM,WAA+C,aAAa,MAAM;CACxE,MAAM,SAAwD,eAC5D,UACA,QACF;CAEA,MAAM,UAAoC,CAAC;CAC3C,MAAM,SAAS,MAAc,UAAwB;EACnD,MAAM,OAAe,SAAS,OAAO,IAAI,CAAC,CAAC,IAAI;EAC/C,MAAM,OACJ,QAAQ,QAAQ,SAAS;EAC3B,IAAI,SAAS,KAAA,KAAa,KAAK,SAAS,MAAM;GAC5C,KAAK,WAAW,QAAQ;GACxB;EACF;EACA,MAAM,WAA8C,SAAS,IAAI,IAAI;EACrE,QAAQ,KAAK;GACX,YAAY;GACZ,UAAU,QAAQ;GAClB;GACA,SAAS,UAAU,WAAW;GAC9B,MAAM,UAAU,QAAQ;EAC1B,CAAC;CACH,CAAC;CACD,OAAO;EAAE,QAAQ,SAAS;EAAI;EAAK,YAAY,MAAM;EAAQ;CAAQ;AACvE"}
@@ -1,6 +1,4 @@
1
- import { IAutoMovieRenderSpec } from "@automovie/interface";
2
- import type { IAutoMovieRenderChunkPlan } from "./IAutoMovieRenderChunkPlan.js";
3
- import { IAutoMovieSequenceRenderPlan } from "./sequenceRenderPlan.js";
1
+ import type { IAutoMoviePlanChunkedSequenceRenderProps, IAutoMovieRenderChunkPlan } from "@automovie/interface";
4
2
  /**
5
3
  * Split a `planSequenceRender` manifest into `chunkFrames`-sized, independently renderable chunks and the plan to concatenate them.
6
4
  *
@@ -18,9 +16,4 @@ import { IAutoMovieSequenceRenderPlan } from "./sequenceRenderPlan.js";
18
16
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner builds one chunk plan from one whole plan per call and coordinates no phases or consumers whose results it could share.
19
17
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller-owned plan holds F relabelled frame records plus O(C * (P + 1)) pass/chunk path records and strings, whose byte lengths depend on supplied paths. Frame spreads share original non-path fields; per-chunk slice arrays become collectable after mapping, and this planner opens no handle or task.
20
18
  */
21
- export declare const planChunkedSequenceRender: (props: {
22
- plan: IAutoMovieSequenceRenderPlan;
23
- spec: IAutoMovieRenderSpec;
24
- chunkFrames: number;
25
- passes?: readonly string[];
26
- }) => IAutoMovieRenderChunkPlan;
19
+ export declare const planChunkedSequenceRender: (props: IAutoMoviePlanChunkedSequenceRenderProps) => IAutoMovieRenderChunkPlan;
@@ -1 +1 @@
1
- {"version":3,"file":"planChunkedSequenceRender.js","sourceRoot":"","sources":["../src/planChunkedSequenceRender.ts"],"names":[],"mappings":";;;AAKA,mDAA6C;AAC7C,iDAA2C;AAC3C,uDAAiD;AACjD,qDAI0B;AAM1B;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,yBAAyB,GAKJ,CAAC,KAYlC,EAA6B,EAAE;IAC9B,MAAM,IAAI,GAAiC,KAAK,CAAC,IAAI,CAAC;IACtD,MAAM,IAAI,GAAyB,KAAK,CAAC,IAAI,CAAC;IAC9C,MAAM,WAAW,GAAW,KAAK,CAAC,WAAW,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC;QACpD,MAAM,IAAI,KAAK,CACb,mDAAmD,WAAW,EAAE,CACjE,CAAC;IACJ,MAAM,MAAM,GACV,KAAK,CAAC,MAAM,KAAK,SAAS,C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,GAAG,GAAW,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAW,IAAI,CAAC,GAAG,CAChC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EACvB,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CACzB,CAAC;IACF,OAAO,GAAG,IAAI,SAAS;QACrB,CAAC,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE;QACtB,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AAC7D,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"planChunkedSequenceRender.mjs","names":[],"sources":["../src/planChunkedSequenceRender.ts"],"sourcesContent":["import { AutoMovieGuidePass, IAutoMovieRenderSpec } from \"@automovie/interface\";\n\nimport type { IAutoMovieRenderChunk } from \"./IAutoMovieRenderChunk.js\";\nimport type { IAutoMovieRenderChunkPlan } from \"./IAutoMovieRenderChunkPlan.js\";\nimport type { IAutoMovieRenderPassManifest } from \"./IAutoMovieRenderPassManifest.js\";\nimport { ffmpegArgs } from \"./ffmpegArgs.js\";\nimport { frameName } from \"./frameName.js\";\nimport { framePattern } from \"./framePattern.js\";\nimport {\n guidePassFramePattern,\n normalizeGuidePasses,\n planGuidePassOutputs,\n} from \"./guidePasses.js\";\nimport {\n IAutoMovieSequenceRenderFrame,\n IAutoMovieSequenceRenderPlan,\n} from \"./sequenceRenderPlan.js\";\n\n/**\n * Split a `planSequenceRender` manifest into `chunkFrames`-sized, independently renderable chunks and the plan to concatenate them.\n *\n * Chunks are frame-atomic: chunk `i` holds the whole plan's frames `[i * chunkFrames, (i + 1) * chunkFrames)`, the last one clipped to the total. A transition's blend is already baked into each frame's `blend`, so a transition that straddles a boundary is split between frames with each frame keeping its blend, and concatenating the chunks reproduces the whole render frame for frame. Running chunks in parallel or on a farm is a host concern. The plan holds every frame of the render; only capture and encoding are bounded per chunk.\n *\n * When `passes` is given, every chunk also plans its per-pass frame paths through `planGuidePassOutputs`, with chunk-local indices, and the plan gains one {@link IAutoMovieRenderPassManifest} per pass. Omitting `passes` omits every pass field; an empty list plans empty pass sets; an unknown pass name throws before any chunk is built. Throws when `chunkFrames` is not a positive integer.\n *\n * `planProductionRenderJob` partitions frames with the same arithmetic but a different contract, restarting its index per deliverable and admitting only safe integers, so the two do not share a helper.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Chunks are contiguous slices of the supplied binary64 frame schedule, so the method only re-labels frames and paths and never resamples time; the concat entries are basenames with each apostrophe written as `'\\''`, the quoting `av_get_token` parses, because the demuxer resolves entries against the list file's directory and ends a quoted string at an apostrophe.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The frameName, framePattern and ffmpegArgs helpers supply the same naming and encoding arguments as whole-render planning; guidePasses supplies pass normalization and naming. The production planner keeps separate partition arithmetic because its index restarts per deliverable and pass and its admission rule differs.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The label pad width comes from the chunk count so labels sort in play order, the concat arguments are ffmpeg's documented lossless form, and no chunk, pass or path is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the boundary rule and why transitions survive it, that the plan holds all frames, the pass behavior for absent, empty and unknown lists, every refusal, and why production partitioning stays separate.\n * @evidence contracts/development/implementation.md#efficient-algorithms For F frames, C chunks and P requested passes the metadata work is O(F + C * (P + 1)): each frame is sliced and re-labelled once, while each chunk builds paths and arguments and repeats bounded distinct-pass planning. Path string lengths additionally drive formatting and concat escaping.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner builds one chunk plan from one whole plan per call and coordinates no phases or consumers whose results it could share.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller-owned plan holds F relabelled frame records plus O(C * (P + 1)) pass/chunk path records and strings, whose byte lengths depend on supplied paths. Frame spreads share original non-path fields; per-chunk slice arrays become collectable after mapping, and this planner opens no handle or task.\n */\nexport const planChunkedSequenceRender: (props: {\n plan: IAutoMovieSequenceRenderPlan;\n spec: IAutoMovieRenderSpec;\n chunkFrames: number;\n passes?: readonly string[];\n}) => IAutoMovieRenderChunkPlan = (props: {\n /** The whole-sequence render manifest to split. */\n plan: IAutoMovieSequenceRenderPlan;\n\n /** Render spec for each chunk's encoder arguments; its target matches the plan. */\n spec: IAutoMovieRenderSpec;\n\n /** Output frames per chunk, a positive integer. */\n chunkFrames: number;\n\n /** Guide passes to plan per chunk; omit for a beauty-only render. */\n passes?: readonly string[];\n}): IAutoMovieRenderChunkPlan => {\n const plan: IAutoMovieSequenceRenderPlan = props.plan;\n const spec: IAutoMovieRenderSpec = props.spec;\n const chunkFrames: number = props.chunkFrames;\n if (!Number.isInteger(chunkFrames) || chunkFrames <= 0)\n throw new Error(\n `chunkFrames must be a positive integer, but was ${chunkFrames}`,\n );\n const passes: AutoMovieGuidePass[] | undefined =\n props.passes === undefined ? undefined : normalizeGuidePasses(props.passes);\n\n const chunkCount: number = Math.ceil(plan.frames.length / chunkFrames);\n const pad: number = String(Math.max(chunkCount - 1, 0)).length;\n\n const chunks: IAutoMovieRenderChunk[] = Array.from(\n { length: chunkCount },\n (_: unknown, index: number): IAutoMovieRenderChunk => {\n const frameStart: number = index * chunkFrames;\n const frameEnd: number = Math.min(\n frameStart + chunkFrames,\n plan.frames.length,\n );\n const slice: IAutoMovieSequenceRenderFrame[] = plan.frames.slice(\n frameStart,\n frameEnd,\n );\n const label: string = `chunk_${String(index).padStart(pad, \"0\")}`;\n const frameDir: string = `${plan.frameDir}/${label}`;\n const frames: IAutoMovieSequenceRenderFrame[] = slice.map(\n (\n frame: IAutoMovieSequenceRenderFrame,\n local: number,\n ): IAutoMovieSequenceRenderFrame => ({\n ...frame,\n index: local,\n path: `${frameDir}/${frameName(local)}`,\n }),\n );\n const inputPattern: string = `${frameDir}/${framePattern()}`;\n const outputPath: string = taggedOutput(plan.outputPath, label);\n return {\n index,\n frameStart,\n frameEnd,\n frameCount: frames.length,\n startSeconds: slice[0]!.timeSeconds,\n endSeconds: slice[slice.length - 1]!.timeSeconds,\n frames,\n frameDir,\n firstFrame: `${frameDir}/${frameName(0)}`,\n lastFrame: `${frameDir}/${frameName(frames.length - 1)}`,\n inputPattern,\n outputPath,\n ffmpegArgs: ffmpegArgs(spec, inputPattern, outputPath),\n ...(passes === undefined\n ? {}\n : {\n passOutputs: planGuidePassOutputs({\n frameDir,\n frameCount: frames.length,\n passes,\n }),\n }),\n };\n },\n );\n\n const chunkOutputs: string[] = chunks.map(\n (chunk: IAutoMovieRenderChunk): string => chunk.outputPath,\n );\n const concatListPath: string = `${plan.outputPath}.concat.txt`;\n // The concat demuxer resolves a relative entry against the list file's\n // directory, and `taggedOutput` keeps every chunk beside the list, so entries\n // are basenames; a directory-qualified entry would resolve twice.\n const concatListLines: string[] = chunkOutputs.map(\n (output: string): string => `file '${escapeConcatEntry(baseName(output))}'`,\n );\n return {\n target: plan.target,\n renderFps: plan.renderFps,\n frameCount: plan.frames.length,\n chunkFrames,\n chunkCount,\n chunks,\n ...(passes === undefined\n ? {}\n : {\n passManifests: passes.map(\n (pass: AutoMovieGuidePass): IAutoMovieRenderPassManifest => ({\n pass,\n chunkFrameDirs: chunks.map(\n (chunk: IAutoMovieRenderChunk): string => chunk.frameDir,\n ),\n inputPatterns: chunks.map(\n (chunk: IAutoMovieRenderChunk): string =>\n `${chunk.frameDir}/${guidePassFramePattern(pass)}`,\n ),\n frameCount: plan.frames.length,\n }),\n ),\n }),\n reassembly: {\n outputPath: plan.outputPath,\n chunkOutputs,\n concatListPath,\n concatListLines,\n ffmpegArgs: [\n \"-y\",\n \"-f\",\n \"concat\",\n \"-safe\",\n \"0\",\n \"-i\",\n concatListPath,\n \"-c\",\n \"copy\",\n plan.outputPath,\n ],\n },\n };\n};\n\n/** The path's last segment, after the final `/` or `\\`. */\nconst baseName: (path: string) => string = (path: string): string =>\n path.slice(Math.max(path.lastIndexOf(\"/\"), path.lastIndexOf(\"\\\\\")) + 1);\n\n/**\n * Escape one concat-demuxer entry for its single-quoted file line. A quoted string cannot contain `'`, so each apostrophe closes the quote, emits an escaped quote, and reopens it (`'` becomes `'\\''`), the grammar ffmpeg's `av_get_token` parses.\n */\nconst escapeConcatEntry: (name: string) => string = (name: string): string =>\n name.replace(/'/g, \"'\\\\''\");\n\n/**\n * Insert a `.<label>` tag before the output's extension, or append it when the basename has none. The extension dot is searched only within the basename, so a dotted directory such as `out.v2/render` tags the file, not the directory.\n */\nconst taggedOutput: (output: string, label: string) => string = (\n output: string,\n label: string,\n): string => {\n const dot: number = output.lastIndexOf(\".\");\n const separator: number = Math.max(\n output.lastIndexOf(\"/\"),\n output.lastIndexOf(\"\\\\\"),\n );\n return dot <= separator\n ? `${output}.${label}`\n : `${output.slice(0, dot)}.${label}${output.slice(dot)}`;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,6BAKsB,UAYF;CAC/B,MAAM,OAAqC,MAAM;CACjD,MAAM,OAA6B,MAAM;CACzC,MAAM,cAAsB,MAAM;CAClC,IAAI,CAAC,OAAO,UAAU,WAAW,KAAK,eAAe,GACnD,MAAM,IAAI,MACR,mDAAmD,aACrD;CACF,MAAM,SACJ,MAAM,WAAW,KAAA,IAAY,KAAA,IAAY,qBAAqB,MAAM,MAAM;CAE5E,MAAM,aAAqB,KAAK,KAAK,KAAK,OAAO,SAAS,WAAW;CACrE,MAAM,MAAc,OAAO,KAAK,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC;CAExD,MAAM,SAAkC,MAAM,KAC5C,EAAE,QAAQ,WAAW,IACpB,GAAY,UAAyC;EACpD,MAAM,aAAqB,QAAQ;EACnC,MAAM,WAAmB,KAAK,IAC5B,aAAa,aACb,KAAK,OAAO,MACd;EACA,MAAM,QAAyC,KAAK,OAAO,MACzD,YACA,QACF;EACA,MAAM,QAAgB,SAAS,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,GAA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,KAAK;GACP;EACF;CACF;AACF;;AAGA,MAAM,YAAsC,SAC1C,KAAK,MAAM,KAAK,IAAI,KAAK,YAAY,GAAG,GAAG,KAAK,YAAY,IAAI,CAAC,IAAI,CAAC;;;;AAKxE,MAAM,qBAA+C,SACnD,KAAK,QAAQ,MAAM,OAAO;;;;AAK5B,MAAM,gBACJ,QACA,UACW;CACX,MAAM,MAAc,OAAO,YAAY,GAAG;CAK1C,OAAO,OAJmB,KAAK,IAC7B,OAAO,YAAY,GAAG,GACtB,OAAO,YAAY,IAAI,CAEH,IAClB,GAAG,OAAO,GAAG,UACb,GAAG,OAAO,MAAM,GAAG,GAAG,EAAE,GAAG,QAAQ,OAAO,MAAM,GAAG;AACzD"}
1
+ {"version":3,"file":"planChunkedSequenceRender.mjs","names":[],"sources":["../src/planChunkedSequenceRender.ts"],"sourcesContent":["import type {\n AutoMovieGuidePass,\n IAutoMoviePlanChunkedSequenceRenderProps,\n IAutoMovieRenderChunk,\n IAutoMovieRenderChunkPlan,\n IAutoMovieRenderPassManifest,\n IAutoMovieRenderSpec,\n IAutoMovieSequenceRenderFrame,\n IAutoMovieSequenceRenderPlan,\n} from \"@automovie/interface\";\n\nimport { ffmpegArgs } from \"./ffmpegArgs.js\";\nimport { frameName } from \"./frameName.js\";\nimport { framePattern } from \"./framePattern.js\";\nimport {\n guidePassFramePattern,\n normalizeGuidePasses,\n planGuidePassOutputs,\n} from \"./guidePasses.js\";\n\n/**\n * Split a `planSequenceRender` manifest into `chunkFrames`-sized, independently renderable chunks and the plan to concatenate them.\n *\n * Chunks are frame-atomic: chunk `i` holds the whole plan's frames `[i * chunkFrames, (i + 1) * chunkFrames)`, the last one clipped to the total. A transition's blend is already baked into each frame's `blend`, so a transition that straddles a boundary is split between frames with each frame keeping its blend, and concatenating the chunks reproduces the whole render frame for frame. Running chunks in parallel or on a farm is a host concern. The plan holds every frame of the render; only capture and encoding are bounded per chunk.\n *\n * When `passes` is given, every chunk also plans its per-pass frame paths through `planGuidePassOutputs`, with chunk-local indices, and the plan gains one {@link IAutoMovieRenderPassManifest} per pass. Omitting `passes` omits every pass field; an empty list plans empty pass sets; an unknown pass name throws before any chunk is built. Throws when `chunkFrames` is not a positive integer.\n *\n * `planProductionRenderJob` partitions frames with the same arithmetic but a different contract, restarting its index per deliverable and admitting only safe integers, so the two do not share a helper.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Chunks are contiguous slices of the supplied binary64 frame schedule, so the method only re-labels frames and paths and never resamples time; the concat entries are basenames with each apostrophe written as `'\\''`, the quoting `av_get_token` parses, because the demuxer resolves entries against the list file's directory and ends a quoted string at an apostrophe.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The frameName, framePattern and ffmpegArgs helpers supply the same naming and encoding arguments as whole-render planning; guidePasses supplies pass normalization and naming. The production planner keeps separate partition arithmetic because its index restarts per deliverable and pass and its admission rule differs.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The label pad width comes from the chunk count so labels sort in play order, the concat arguments are ffmpeg's documented lossless form, and no chunk, pass or path is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the boundary rule and why transitions survive it, that the plan holds all frames, the pass behavior for absent, empty and unknown lists, every refusal, and why production partitioning stays separate.\n * @evidence contracts/development/implementation.md#efficient-algorithms For F frames, C chunks and P requested passes the metadata work is O(F + C * (P + 1)): each frame is sliced and re-labelled once, while each chunk builds paths and arguments and repeats bounded distinct-pass planning. Path string lengths additionally drive formatting and concat escaping.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner builds one chunk plan from one whole plan per call and coordinates no phases or consumers whose results it could share.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller-owned plan holds F relabelled frame records plus O(C * (P + 1)) pass/chunk path records and strings, whose byte lengths depend on supplied paths. Frame spreads share original non-path fields; per-chunk slice arrays become collectable after mapping, and this planner opens no handle or task.\n */\nexport const planChunkedSequenceRender: (\n props: IAutoMoviePlanChunkedSequenceRenderProps,\n) => IAutoMovieRenderChunkPlan = (\n props: IAutoMoviePlanChunkedSequenceRenderProps,\n): IAutoMovieRenderChunkPlan => {\n const plan: IAutoMovieSequenceRenderPlan = props.plan;\n const spec: IAutoMovieRenderSpec = props.spec;\n const chunkFrames: number = props.chunkFrames;\n if (!Number.isInteger(chunkFrames) || chunkFrames <= 0)\n throw new Error(\n `chunkFrames must be a positive integer, but was ${chunkFrames}`,\n );\n const passes: AutoMovieGuidePass[] | undefined =\n props.passes === undefined ? undefined : normalizeGuidePasses(props.passes);\n\n const chunkCount: number = Math.ceil(plan.frames.length / chunkFrames);\n const pad: number = String(Math.max(chunkCount - 1, 0)).length;\n\n const chunks: IAutoMovieRenderChunk[] = Array.from(\n { length: chunkCount },\n (_: unknown, index: number): IAutoMovieRenderChunk => {\n const frameStart: number = index * chunkFrames;\n const frameEnd: number = Math.min(\n frameStart + chunkFrames,\n plan.frames.length,\n );\n const slice: IAutoMovieSequenceRenderFrame[] = plan.frames.slice(\n frameStart,\n frameEnd,\n );\n const label: string = `chunk_${String(index).padStart(pad, \"0\")}`;\n const frameDir: string = `${plan.frameDir}/${label}`;\n const frames: IAutoMovieSequenceRenderFrame[] = slice.map(\n (\n frame: IAutoMovieSequenceRenderFrame,\n local: number,\n ): IAutoMovieSequenceRenderFrame => ({\n ...frame,\n index: local,\n path: `${frameDir}/${frameName(local)}`,\n }),\n );\n const inputPattern: string = `${frameDir}/${framePattern()}`;\n const outputPath: string = taggedOutput(plan.outputPath, label);\n return {\n index,\n frameStart,\n frameEnd,\n frameCount: frames.length,\n startSeconds: slice[0]!.timeSeconds,\n endSeconds: slice[slice.length - 1]!.timeSeconds,\n frames,\n frameDir,\n firstFrame: `${frameDir}/${frameName(0)}`,\n lastFrame: `${frameDir}/${frameName(frames.length - 1)}`,\n inputPattern,\n outputPath,\n ffmpegArgs: ffmpegArgs(spec, inputPattern, outputPath),\n ...(passes === undefined\n ? {}\n : {\n passOutputs: planGuidePassOutputs({\n frameDir,\n frameCount: frames.length,\n passes,\n }),\n }),\n };\n },\n );\n\n const chunkOutputs: string[] = chunks.map(\n (chunk: IAutoMovieRenderChunk): string => chunk.outputPath,\n );\n const concatListPath: string = `${plan.outputPath}.concat.txt`;\n // The concat demuxer resolves a relative entry against the list file's\n // directory, and `taggedOutput` keeps every chunk beside the list, so entries\n // are basenames; a directory-qualified entry would resolve twice.\n const concatListLines: string[] = chunkOutputs.map(\n (output: string): string => `file '${escapeConcatEntry(baseName(output))}'`,\n );\n return {\n target: plan.target,\n renderFps: plan.renderFps,\n frameCount: plan.frames.length,\n chunkFrames,\n chunkCount,\n chunks,\n ...(passes === undefined\n ? {}\n : {\n passManifests: passes.map(\n (pass: AutoMovieGuidePass): IAutoMovieRenderPassManifest => ({\n pass,\n chunkFrameDirs: chunks.map(\n (chunk: IAutoMovieRenderChunk): string => chunk.frameDir,\n ),\n inputPatterns: chunks.map(\n (chunk: IAutoMovieRenderChunk): string =>\n `${chunk.frameDir}/${guidePassFramePattern(pass)}`,\n ),\n frameCount: plan.frames.length,\n }),\n ),\n }),\n reassembly: {\n outputPath: plan.outputPath,\n chunkOutputs,\n concatListPath,\n concatListLines,\n ffmpegArgs: [\n \"-y\",\n \"-f\",\n \"concat\",\n \"-safe\",\n \"0\",\n \"-i\",\n concatListPath,\n \"-c\",\n \"copy\",\n plan.outputPath,\n ],\n },\n };\n};\n\n/** The path's last segment, after the final `/` or `\\`. */\nconst baseName: (path: string) => string = (path: string): string =>\n path.slice(Math.max(path.lastIndexOf(\"/\"), path.lastIndexOf(\"\\\\\")) + 1);\n\n/**\n * Escape one concat-demuxer entry for its single-quoted file line. A quoted string cannot contain `'`, so each apostrophe closes the quote, emits an escaped quote, and reopens it (`'` becomes `'\\''`), the grammar ffmpeg's `av_get_token` parses.\n */\nconst escapeConcatEntry: (name: string) => string = (name: string): string =>\n name.replace(/'/g, \"'\\\\''\");\n\n/**\n * Insert a `.<label>` tag before the output's extension, or append it when the basename has none. The extension dot is searched only within the basename, so a dotted directory such as `out.v2/render` tags the file, not the directory.\n */\nconst taggedOutput: (output: string, label: string) => string = (\n output: string,\n label: string,\n): string => {\n const dot: number = output.lastIndexOf(\".\");\n const separator: number = Math.max(\n output.lastIndexOf(\"/\"),\n output.lastIndexOf(\"\\\\\"),\n );\n return dot <= separator\n ? `${output}.${label}`\n : `${output.slice(0, dot)}.${label}${output.slice(dot)}`;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAa,6BAGX,UAC8B;CAC9B,MAAM,OAAqC,MAAM;CACjD,MAAM,OAA6B,MAAM;CACzC,MAAM,cAAsB,MAAM;CAClC,IAAI,CAAC,OAAO,UAAU,WAAW,KAAK,eAAe,GACnD,MAAM,IAAI,MACR,mDAAmD,aACrD;CACF,MAAM,SACJ,MAAM,WAAW,KAAA,IAAY,KAAA,IAAY,qBAAqB,MAAM,MAAM;CAE5E,MAAM,aAAqB,KAAK,KAAK,KAAK,OAAO,SAAS,WAAW;CACrE,MAAM,MAAc,OAAO,KAAK,IAAI,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC;CAExD,MAAM,SAAkC,MAAM,KAC5C,EAAE,QAAQ,WAAW,IACpB,GAAY,UAAyC;EACpD,MAAM,aAAqB,QAAQ;EACnC,MAAM,WAAmB,KAAK,IAC5B,aAAa,aACb,KAAK,OAAO,MACd;EACA,MAAM,QAAyC,KAAK,OAAO,MACzD,YACA,QACF;EACA,MAAM,QAAgB,SAAS,OAAO,KAAK,CAAC,CAAC,SAAS,KAAK,GAAG;EAC9D,MAAM,WAAmB,GAAG,KAAK,SAAS,GAAG;EAC7C,MAAM,SAA0C,MAAM,KAElD,OACA,WACmC;GACnC,GAAG;GACH,OAAO;GACP,MAAM,GAAG,SAAS,GAAG,UAAU,KAAK;EACtC,EACF;EACA,MAAM,eAAuB,GAAG,SAAS,GAAG,aAAa;EACzD,MAAM,aAAqB,aAAa,KAAK,YAAY,KAAK;EAC9D,OAAO;GACL;GACA;GACA;GACA,YAAY,OAAO;GACnB,cAAc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AY,GAAG,GACtB,OAAO,YAAY,IAAI,CAEH,IAClB,GAAG,OAAO,GAAG,UACb,GAAG,OAAO,MAAM,GAAG,GAAG,EAAE,GAAG,QAAQ,OAAO,MAAM,GAAG;AACzD"}
@@ -1,4 +1,4 @@
1
- import type { IAutoMovieGuidePassOutput } from "./IAutoMovieGuidePassOutput.js";
1
+ import type { IAutoMovieGuidePassOutput, IAutoMoviePlanGuidePassOutputsProps } from "@automovie/interface";
2
2
  /**
3
3
  * Plan where each requested pass writes its frames inside one frame directory: one capture per pass per frame, at pass-tagged paths.
4
4
  *
@@ -12,8 +12,4 @@ import type { IAutoMovieGuidePassOutput } from "./IAutoMovieGuidePassOutput.js";
12
12
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call plans one frame directory from its own arguments, and the strings are cheaper to rebuild than to cache.
13
13
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing after returning the plan its caller owns and opens no handle or task.
14
14
  */
15
- export declare const planGuidePassOutputs: (props: {
16
- frameDir: string;
17
- frameCount: number;
18
- passes: readonly string[];
19
- }) => IAutoMovieGuidePassOutput[];
15
+ export declare const planGuidePassOutputs: (props: IAutoMoviePlanGuidePassOutputsProps) => IAutoMovieGuidePassOutput[];
@@ -1 +1 @@
1
- {"version":3,"file":"planGuidePassOutputs.js","sourceRoot":"","sources":["../src/planGuidePassOutputs.ts"],"names":[],"mappings":";;;AAGA,mEAA6D;AAC7D,yEAAmE;AACnE,uEAAiE;AAEjE;;;;;;;;;;;;GAYG;AACI,MAAM,oBAAoB,GAIG,CAAC,KASpC,EAA+B,EAAE;IAChC,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC,UAAU,IAAI,CAAC;QACvE,MAAM,IAAI,KAAK,CACb,6DAA6D,KAAK,CAAC,UAAU,EAAE,CAChF,CAAC;IACJ,OAAO,IAAA,8CAAoB,EAAC,KAAK,CAAC,MAAM,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E,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAA,gDAAqB,EAAC,IAAI,CAAC,EAAE;KACjE,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAjBW,QAAA,oBAAoB,GAApB,oBAAoB,CAiB/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"planGuidePassOutputs.mjs","names":[],"sources":["../src/planGuidePassOutputs.ts"],"sourcesContent":["import type { AutoMovieGuidePass } from \"@automovie/interface\";\n\nimport type { IAutoMovieGuidePassOutput } from \"./IAutoMovieGuidePassOutput.js\";\nimport { guidePassFrameName } from \"./guidePassFrameName.js\";\nimport { guidePassFramePattern } from \"./guidePassFramePattern.js\";\nimport { normalizeGuidePasses } from \"./normalizeGuidePasses.js\";\n\n/**\n * Plan where each requested pass writes its frames inside one frame directory: one capture per pass per frame, at pass-tagged paths.\n *\n * Passes are normalized by `normalizeGuidePasses`, so repeats fold and an unknown name throws; an empty request yields an empty plan. Throws when `frameCount` is not a positive integer. Paths use the default `png` extension and five-digit numbering.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Each output's first, last and pattern paths come from the same naming functions the capture writer uses, so the plan addresses exactly the files a capture of `frameCount` frames writes.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Validation of passes is delegated to `normalizeGuidePasses` and naming to `guidePassFrameName` and `guidePassFramePattern`; this function only checks the frame count and joins paths.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No pass, directory or frame count is special-cased, and an invalid count throws instead of being clamped.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the pass normalization and its refusals, the empty-request result, the frame-count refusal, and the fixed extension and padding.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cost is O(P) for P requested names plus three short strings per distinct pass, at most six.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call plans one frame directory from its own arguments, and the strings are cheaper to rebuild than to cache.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing after returning the plan its caller owns and opens no handle or task.\n */\nexport const planGuidePassOutputs: (props: {\n frameDir: string;\n frameCount: number;\n passes: readonly string[];\n}) => IAutoMovieGuidePassOutput[] = (props: {\n /** Directory where the render's frame files are written. */\n frameDir: string;\n\n /** Number of frames each pass captures; a positive integer. */\n frameCount: number;\n\n /** Requested passes, in capture order. */\n passes: readonly string[];\n}): IAutoMovieGuidePassOutput[] => {\n if (Number.isInteger(props.frameCount) === false || props.frameCount <= 0)\n throw new Error(\n `guide pass frameCount must be a positive integer, but was ${props.frameCount}`,\n );\n return normalizeGuidePasses(props.passes).map(\n (pass: AutoMovieGuidePass): IAutoMovieGuidePassOutput => ({\n pass,\n firstFrame: `${props.frameDir}/${guidePassFrameName(0, pass)}`,\n lastFrame: `${props.frameDir}/${guidePassFrameName(props.frameCount - 1, pass)}`,\n inputPattern: `${props.frameDir}/${guidePassFramePattern(pass)}`,\n }),\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAa,wBAIwB,UASF;CACjC,IAAI,OAAO,UAAU,MAAM,UAAU,MAAM,SAAS,MAAM,cAAc,GACtE,MAAM,IAAI,MACR,6DAA6D,MAAM,YACrE;CACF,OAAO,qBAAqB,MAAM,MAAM,CAAC,CAAC,KACvC,UAAyD;EACxD;EACA,YAAY,GAAG,MAAM,SAAS,GAAG,mBAAmB,GAAG,IAAI;EAC3D,WAAW,GAAG,MAAM,SAAS,GAAG,mBAAmB,MAAM,aAAa,GAAG,IAAI;EAC7E,cAAc,GAAG,MAAM,SAAS,GAAG,sBAAsB,IAAI;CAC/D,EACF;AACF"}
1
+ {"version":3,"file":"planGuidePassOutputs.mjs","names":[],"sources":["../src/planGuidePassOutputs.ts"],"sourcesContent":["import type {\n AutoMovieGuidePass,\n IAutoMovieGuidePassOutput,\n IAutoMoviePlanGuidePassOutputsProps,\n} from \"@automovie/interface\";\n\nimport { guidePassFrameName } from \"./guidePassFrameName.js\";\nimport { guidePassFramePattern } from \"./guidePassFramePattern.js\";\nimport { normalizeGuidePasses } from \"./normalizeGuidePasses.js\";\n\n/**\n * Plan where each requested pass writes its frames inside one frame directory: one capture per pass per frame, at pass-tagged paths.\n *\n * Passes are normalized by `normalizeGuidePasses`, so repeats fold and an unknown name throws; an empty request yields an empty plan. Throws when `frameCount` is not a positive integer. Paths use the default `png` extension and five-digit numbering.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Each output's first, last and pattern paths come from the same naming functions the capture writer uses, so the plan addresses exactly the files a capture of `frameCount` frames writes.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Validation of passes is delegated to `normalizeGuidePasses` and naming to `guidePassFrameName` and `guidePassFramePattern`; this function only checks the frame count and joins paths.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No pass, directory or frame count is special-cased, and an invalid count throws instead of being clamped.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the pass normalization and its refusals, the empty-request result, the frame-count refusal, and the fixed extension and padding.\n * @evidence contracts/development/implementation.md#efficient-algorithms Cost is O(P) for P requested names plus three short strings per distinct pass, at most six.\n * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call plans one frame directory from its own arguments, and the strings are cheaper to rebuild than to cache.\n * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function retains nothing after returning the plan its caller owns and opens no handle or task.\n */\nexport const planGuidePassOutputs: (\n props: IAutoMoviePlanGuidePassOutputsProps,\n) => IAutoMovieGuidePassOutput[] = (\n props: IAutoMoviePlanGuidePassOutputsProps,\n): IAutoMovieGuidePassOutput[] => {\n if (Number.isInteger(props.frameCount) === false || props.frameCount <= 0)\n throw new Error(\n `guide pass frameCount must be a positive integer, but was ${props.frameCount}`,\n );\n return normalizeGuidePasses(props.passes).map(\n (pass: AutoMovieGuidePass): IAutoMovieGuidePassOutput => ({\n pass,\n firstFrame: `${props.frameDir}/${guidePassFrameName(0, pass)}`,\n lastFrame: `${props.frameDir}/${guidePassFrameName(props.frameCount - 1, pass)}`,\n inputPattern: `${props.frameDir}/${guidePassFramePattern(pass)}`,\n }),\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAa,wBAGX,UACgC;CAChC,IAAI,OAAO,UAAU,MAAM,UAAU,MAAM,SAAS,MAAM,cAAc,GACtE,MAAM,IAAI,MACR,6DAA6D,MAAM,YACrE;CACF,OAAO,qBAAqB,MAAM,MAAM,CAAC,CAAC,KACvC,UAAyD;EACxD;EACA,YAAY,GAAG,MAAM,SAAS,GAAG,mBAAmB,GAAG,IAAI;EAC3D,WAAW,GAAG,MAAM,SAAS,GAAG,mBAAmB,MAAM,aAAa,GAAG,IAAI;EAC7E,cAAc,GAAG,MAAM,SAAS,GAAG,sBAAsB,IAAI;CAC/D,EACF;AACF"}
@@ -1,5 +1,4 @@
1
- import type { IAutoMovieDeliveryCrop, IAutoMovieMotion, IAutoMovieScene, IAutoMovieSequence, IAutoMovieShot, IAutoMovieSkeleton } from "@automovie/interface";
2
- import type { IAutoMoviePoseKeypointSidecar } from "./IAutoMoviePoseKeypointSidecar.js";
1
+ import type { IAutoMoviePlanPoseKeypointSidecarProps, IAutoMoviePoseKeypointSidecar } from "@automovie/interface";
3
2
  /**
4
3
  * Plan the pose-keypoint sidecar of one sequence render.
5
4
  *
@@ -15,13 +14,4 @@ import type { IAutoMoviePoseKeypointSidecar } from "./IAutoMoviePoseKeypointSide
15
14
  * @evidence contracts/development/implementation.md#reuse-equivalent-work A shot's staging, its scene, camera and node index, is resolved once per call and shared by all its frames, which is equivalent because the inputs are immutable for the call and the staging depends only on the shot's `scene` and `camera` ids; the cache is dropped on return.
16
15
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Call-local maps reference every supplied shot, scene, motion and skeleton; at most one staging entry per supplied shot also holds a camera and node map, which can repeat one scene's node population across shots. The F-time schedule, motion samples and projection intermediates become collectable when their calls finish. The caller retains every returned frame, actor and keypoint, with no frame or population cap here; no native handle or background task is acquired.
17
16
  */
18
- export declare const planPoseKeypointSidecar: (props: {
19
- sequence: IAutoMovieSequence;
20
- shots: IAutoMovieShot[];
21
- scenes: readonly IAutoMovieScene[];
22
- motions: readonly IAutoMovieMotion[];
23
- skeletons: readonly IAutoMovieSkeleton[];
24
- fps: number;
25
- aspect?: number;
26
- crop?: IAutoMovieDeliveryCrop;
27
- }) => IAutoMoviePoseKeypointSidecar;
17
+ export declare const planPoseKeypointSidecar: (props: IAutoMoviePlanPoseKeypointSidecarProps) => IAutoMoviePoseKeypointSidecar;
@@ -1 +1 @@
1
- {"version":3,"file":"planPoseKeypointSidecar.js","sourceRoot":"","sources":["../src/planPoseKeypointSidecar.ts"],"names":[],"mappings":";;;AAAA,8CAW2B;AAiB3B,mDAA6C;AAC7C,+CAAyC;AAEzC;;;;;;;;;;;;;;GAcG;AACI,MAAM,uBAAuB,GASE,CAAC,KAwBtC,EAAiC,EAAE;IAClC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,4CAA4C,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAA+B,IAAA,yBAAgB,EAC3D,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,KAAK,CACZ,CAAC;IACF,MAAM,KAAK,GAAa,IAAA,0BAAU,EAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAChE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,4DAA4D,KAAK,CAAC,GAAG,iBAAiB,QAAQ,CAAC,OAAO,uBAAuB,CAC9H,CAAC;IACJ,MAAM,QAAQ,GAAgC,IAAI,GAAG,CACnD,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAoB,EAA4B,EAAE,CAAC;QAClE,IAAI,CAAC,EAAE;QACP,IAAI;KACL,CAAC,CACH,CAAC;IACF,MAAM,SAAS,GAAiC,IAAI,GAAG,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aACnB,CAAC;YACF,wEAAwE;YACxE,sEAAsE;YACtE,qEAAqE;YACrE,sEAAsE;YACtE,0DAA0D;YAC1D,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;gBACnC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC;oBACE,UAAU,EAAE,IAAA,8BAAqB,EAC/B,GAAG,EACH,WAAW,CACT,OAAO,CAAC,MAAM,EACd,IAAI,CAAC,YAAY,EACjB,IAAI,EACJ,IAAA,iBAAQ,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAChD,CACF;iBACF,CAAC;SACP,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,GAKH,CACZ,MAAwB,EACxB,YAA4C,EAC5C,IAAY,EACZ,KAAwB,EAChB,EAAE,CACV,IAAA,qBAAY,EACV,IAAA,wBAAe,EAAC,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,EAChE,KAAK,EACL,CAAC,EACD,CAAC,CACF,CAAC,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"planPoseKeypointSidecar.mjs","names":[],"sources":["../src/planPoseKeypointSidecar.ts"],"sourcesContent":["import {\n IAutoMoviePlaybackSample,\n IAutoMoviePlaybackTimeline,\n foldRoot,\n playbackCursor,\n projectToNdc,\n resolveCameraAt,\n resolvePoseKeypoints,\n sampleMotion,\n sceneFogTransmittance,\n sequenceTimeline,\n} from \"@automovie/engine\";\nimport type {\n IAutoMovieCamera,\n IAutoMovieDeliveryCrop,\n IAutoMovieMotion,\n IAutoMoviePose,\n IAutoMovieScene,\n IAutoMovieSceneNode,\n IAutoMovieSequence,\n IAutoMovieShot,\n IAutoMovieSkeleton,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\n\nimport type { IAutoMoviePoseKeypointActor } from \"./IAutoMoviePoseKeypointActor.js\";\nimport type { IAutoMoviePoseKeypointFrame } from \"./IAutoMoviePoseKeypointFrame.js\";\nimport type { IAutoMoviePoseKeypointSidecar } from \"./IAutoMoviePoseKeypointSidecar.js\";\nimport { frameTimes } from \"./frameTimes.js\";\nimport { shotBeat } from \"./shotBeat.js\";\n\n/**\n * Plan the pose-keypoint sidecar of one sequence render.\n *\n * The cut is laid on the output clock by `sequenceTimeline`, the output frames are the `frameTimes` schedule the render captures at `fps`, and a forward `playbackCursor` finds the live shot and its shot-local time on each frame. Every performance of that shot whose motion, skeleton and scene node resolve is sampled at `max(0, time - startOffset)`, and its joints are projected through the shot's camera by `resolvePoseKeypoints` with the given aspect and crop. A frame whose scene or camera does not resolve, and a performance without a motion or with an unresolved reference, contribute no keypoints rather than throwing, so the sidecar still covers every output frame; an unresolved cut shot is refused by the timeline builder.\n *\n * When the scene declares fog, each actor also carries the fog transmittance at the camera depth of its world root, its staged placement with the sampled pose root folded in, through the engine's `sceneFogTransmittance`, the law the viewer hands its shader. Throws for an `fps` that is not a finite positive number, for a cut `sequenceTimeline` cannot lay out, and for a runtime that rounds to zero frames. The host writes the result through `renderPoseKeypointSidecar`.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Frames use frameTimes' independently computed binary64 i/fps schedule, whose positive clock supplies the non-decreasing queries the forward cursor requires. Motion sampling, projection and fog use engine functions. Camera depth is projectToNdc's pre-divide depth, unaffected by the discarded frustum-scaled coordinates, so unit frustum arguments preserve that depth; root-sampled fog approximates depth variation across each actor.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The planner owns only the frame walk and the per-actor record, the clock, shot resolution, sampling, projection and fog are the engine's, and the beat label is `shotBeat`, shared with the caption plan.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unresolvable references contribute nothing rather than a placeholder, `atmosphere` is omitted for a fogless scene rather than written as a default, and no shot, actor or fixture is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the clock, how each frame's shot and each actor's pose are resolved, what is skipped rather than refused, when and how `atmosphere` is derived, every refusal, and who writes the file, and each property states its role and unit.\n * @evidence contracts/development/implementation.md#efficient-algorithms Initial maps index all supplied shots, scenes, motions and skeletons, including unused extras, while timeline and cursor work costs O(E + F) for E cut entries and F output samples. Each first-live shot scans its scene's cameras and indexes that scene's nodes; different shots sharing a scene rebuild that node index. Every frame scans its live shot's performances, and each resolved actor pays sampleMotion's key/joint/expression work plus resolvePoseKeypoints' forward kinematics, joint projection and camera-clip sampling. Fog requests sample the camera again per actor. These delegated populations drive cost beyond a constant per-performance bound, and none of the input arrays or output populations is capped here.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work A shot's staging, its scene, camera and node index, is resolved once per call and shared by all its frames, which is equivalent because the inputs are immutable for the call and the staging depends only on the shot's `scene` and `camera` ids; the cache is dropped on return.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Call-local maps reference every supplied shot, scene, motion and skeleton; at most one staging entry per supplied shot also holds a camera and node map, which can repeat one scene's node population across shots. The F-time schedule, motion samples and projection intermediates become collectable when their calls finish. The caller retains every returned frame, actor and keypoint, with no frame or population cap here; no native handle or background task is acquired.\n */\nexport const planPoseKeypointSidecar: (props: {\n sequence: IAutoMovieSequence;\n shots: IAutoMovieShot[];\n scenes: readonly IAutoMovieScene[];\n motions: readonly IAutoMovieMotion[];\n skeletons: readonly IAutoMovieSkeleton[];\n fps: number;\n aspect?: number;\n crop?: IAutoMovieDeliveryCrop;\n}) => IAutoMoviePoseKeypointSidecar = (props: {\n /** The cut being rendered. */\n sequence: IAutoMovieSequence;\n\n /** Every shot the cut references; extra shots are ignored. */\n shots: IAutoMovieShot[];\n\n /** The staged scenes the shots play over. */\n scenes: readonly IAutoMovieScene[];\n\n /** The motions the shots' performances reference. */\n motions: readonly IAutoMovieMotion[];\n\n /** The skeletons the motions target. */\n skeletons: readonly IAutoMovieSkeleton[];\n\n /** Output frames per second, the render clock, not necessarily `sequence.fps`. */\n fps: number;\n\n /** Render aspect, width over height; `resolvePoseKeypoints` assumes 16/9 when omitted. */\n aspect?: number;\n\n /** Normalized delivery crop the keypoints are expressed in; the whole frame when omitted. */\n crop?: IAutoMovieDeliveryCrop;\n}): IAutoMoviePoseKeypointSidecar => {\n if (Number.isFinite(props.fps) === false || props.fps <= 0)\n throw new Error(`fps must be a finite number > 0, but was ${props.fps}`);\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n props.sequence,\n props.shots,\n );\n const times: number[] = frameTimes(props.fps, timeline.runtime);\n if (times.length === 0)\n throw new Error(\n `planPoseKeypointSidecar requires at least one frame; fps ${props.fps} and duration ${timeline.runtime} produced zero frames`,\n );\n const shotById: Map<string, IAutoMovieShot> = new Map(\n props.shots.map((shot: IAutoMovieShot): [string, IAutoMovieShot] => [\n shot.id,\n shot,\n ]),\n );\n const sceneById: Map<string, IAutoMovieScene> = new Map(\n props.scenes.map((scene: IAutoMovieScene): [string, IAutoMovieScene] => [\n scene.id,\n scene,\n ]),\n );\n const lookups: IPoseLookups = {\n motionById: new Map(\n props.motions.map(\n (motion: IAutoMovieMotion): [string, IAutoMovieMotion] => [\n motion.id,\n motion,\n ],\n ),\n ),\n skeletonById: new Map(\n props.skeletons.map(\n (skeleton: IAutoMovieSkeleton): [string, IAutoMovieSkeleton] => [\n skeleton.id,\n skeleton,\n ],\n ),\n ),\n aspect: props.aspect,\n crop: props.crop,\n };\n const stagingByShot: Map<string, IShotStaging | null> = new Map();\n const cursor: (seconds: number) => IAutoMoviePlaybackSample = playbackCursor(\n props.sequence,\n timeline,\n );\n const frames: IAutoMoviePoseKeypointFrame[] = times.map(\n (time: number, frame: number): IAutoMoviePoseKeypointFrame => {\n const sample: IAutoMoviePlaybackSample = cursor(time);\n // sequenceTimeline already threw for any entry whose shot was not\n // provided, so every cursor sample names a known shot.\n const shot: IAutoMovieShot = shotById.get(sample.shot)!;\n let staging: IShotStaging | null | undefined = stagingByShot.get(shot.id);\n if (staging === undefined) {\n staging = stageShot(shot, sceneById);\n stagingByShot.set(shot.id, staging);\n }\n return {\n frame,\n beat: shotBeat(sample.shot),\n actors:\n staging === null ? [] : actorsAt(shot, staging, sample.time, lookups),\n };\n },\n );\n return {\n target: props.sequence.id,\n fps: props.fps,\n frameCount: frames.length,\n frames,\n };\n};\n\n/** The call-wide lookups every frame's actor projection reads. */\ninterface IPoseLookups {\n motionById: ReadonlyMap<string, IAutoMovieMotion>;\n skeletonById: ReadonlyMap<string, IAutoMovieSkeleton>;\n aspect: number | undefined;\n crop: IAutoMovieDeliveryCrop | undefined;\n}\n\n/** A shot's resolved scene, camera and node index, shared by all its frames. */\ninterface IShotStaging {\n scene: IAutoMovieScene;\n camera: IAutoMovieCamera;\n nodeById: ReadonlyMap<string, IAutoMovieSceneNode>;\n}\n\n/** Resolve a shot's scene and camera, or null when either is missing. */\nconst stageShot: (\n shot: IAutoMovieShot,\n sceneById: ReadonlyMap<string, IAutoMovieScene>,\n) => IShotStaging | null = (\n shot: IAutoMovieShot,\n sceneById: ReadonlyMap<string, IAutoMovieScene>,\n): IShotStaging | null => {\n const scene: IAutoMovieScene | undefined = sceneById.get(shot.scene);\n const camera: IAutoMovieCamera | undefined = scene?.cameras.find(\n (candidate: IAutoMovieCamera): boolean => candidate.id === shot.camera,\n );\n if (scene === undefined || camera === undefined) return null;\n return {\n scene,\n camera,\n nodeById: new Map(\n scene.nodes.map(\n (node: IAutoMovieSceneNode): [string, IAutoMovieSceneNode] => [\n node.id,\n node,\n ],\n ),\n ),\n };\n};\n\n/** Project every resolvable performing actor of one shot at a shot-local instant. */\nconst actorsAt: (\n shot: IAutoMovieShot,\n staging: IShotStaging,\n time: number,\n lookups: IPoseLookups,\n) => IAutoMoviePoseKeypointActor[] = (\n shot: IAutoMovieShot,\n staging: IShotStaging,\n time: number,\n lookups: IPoseLookups,\n): IAutoMoviePoseKeypointActor[] => {\n const actors: IAutoMoviePoseKeypointActor[] = [];\n for (const performance of shot.performances) {\n if (performance.motion === null) continue;\n const motion: IAutoMovieMotion | undefined = lookups.motionById.get(\n performance.motion,\n );\n const node: IAutoMovieSceneNode | undefined = staging.nodeById.get(\n performance.node,\n );\n if (motion === undefined || node === undefined) continue;\n const skeleton: IAutoMovieSkeleton | undefined = lookups.skeletonById.get(\n motion.skeleton,\n );\n if (skeleton === undefined) continue;\n const pose: IAutoMoviePose = sampleMotion(\n motion,\n Math.max(0, time - performance.startOffset),\n ).pose;\n const fog: IAutoMovieScene[\"fog\"] = staging.scene.fog;\n actors.push({\n node: performance.node,\n keypoints: resolvePoseKeypoints({\n pose,\n skeleton,\n node,\n camera: staging.camera,\n cameraMotion: shot.cameraMotion,\n time,\n aspect: lookups.aspect,\n crop: lookups.crop,\n }),\n // Spread only when the scene declares fog, so a fogless scene's sidecar\n // carries no `atmosphere` key at all. The depth sample is the actor's\n // world root, its staged placement with the sampled pose root folded\n // in, because the staged placement alone would keep the atmosphere an\n // actor had at frame zero while its clip carries it away.\n ...(fog === undefined || fog === null\n ? {}\n : {\n atmosphere: sceneFogTransmittance(\n fog,\n cameraDepth(\n staging.camera,\n shot.cameraMotion,\n time,\n foldRoot(node.transform, pose.root).translation,\n ),\n ),\n }),\n });\n }\n return actors;\n};\n\n/**\n * The distance of `point` along the camera's forward axis at `time`, the\n * length the fog is integrated over and what the fog shader interpolates as\n * `vFogDepth`.\n *\n * `projectToNdc` computes that depth as `-localZ` before its perspective\n * divide, so the frustum half-height and aspect, which only scale the\n * discarded `ndcX` and `ndcY`, are passed as 1.\n */\nconst cameraDepth: (\n camera: IAutoMovieCamera,\n cameraMotion: IAutoMovieShot[\"cameraMotion\"],\n time: number,\n point: IAutoMovieVector3,\n) => number = (\n camera: IAutoMovieCamera,\n cameraMotion: IAutoMovieShot[\"cameraMotion\"],\n time: number,\n point: IAutoMovieVector3,\n): number =>\n projectToNdc(\n resolveCameraAt(camera.transform, cameraMotion, camera.id, time),\n point,\n 1,\n 1,\n ).depth;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA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,cACA,MACA,UAEA,aACE,gBAAgB,OAAO,WAAW,cAAc,OAAO,IAAI,IAAI,GAC/D,OACA,GACA,CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"planPoseKeypointSidecar.mjs","names":[],"sources":["../src/planPoseKeypointSidecar.ts"],"sourcesContent":["import {\n foldRoot,\n playbackCursor,\n projectToNdc,\n resolveCameraAt,\n resolvePoseKeypoints,\n sampleMotion,\n sceneFogTransmittance,\n sequenceTimeline,\n} from \"@automovie/engine\";\nimport type {\n IAutoMovieCamera,\n IAutoMovieDeliveryCrop,\n IAutoMovieMotion,\n IAutoMoviePlanPoseKeypointSidecarProps,\n IAutoMoviePlaybackSample,\n IAutoMoviePlaybackTimeline,\n IAutoMoviePose,\n IAutoMoviePoseKeypointActor,\n IAutoMoviePoseKeypointFrame,\n IAutoMoviePoseKeypointSidecar,\n IAutoMovieScene,\n IAutoMovieSceneNode,\n IAutoMovieShot,\n IAutoMovieSkeleton,\n IAutoMovieVector3,\n} from \"@automovie/interface\";\n\nimport { frameTimes } from \"./frameTimes.js\";\nimport { shotBeat } from \"./shotBeat.js\";\n\n/**\n * Plan the pose-keypoint sidecar of one sequence render.\n *\n * The cut is laid on the output clock by `sequenceTimeline`, the output frames are the `frameTimes` schedule the render captures at `fps`, and a forward `playbackCursor` finds the live shot and its shot-local time on each frame. Every performance of that shot whose motion, skeleton and scene node resolve is sampled at `max(0, time - startOffset)`, and its joints are projected through the shot's camera by `resolvePoseKeypoints` with the given aspect and crop. A frame whose scene or camera does not resolve, and a performance without a motion or with an unresolved reference, contribute no keypoints rather than throwing, so the sidecar still covers every output frame; an unresolved cut shot is refused by the timeline builder.\n *\n * When the scene declares fog, each actor also carries the fog transmittance at the camera depth of its world root, its staged placement with the sampled pose root folded in, through the engine's `sceneFogTransmittance`, the law the viewer hands its shader. Throws for an `fps` that is not a finite positive number, for a cut `sequenceTimeline` cannot lay out, and for a runtime that rounds to zero frames. The host writes the result through `renderPoseKeypointSidecar`.\n *\n * @evidence contracts/development/implementation.md#principled-implementation Frames use frameTimes' independently computed binary64 i/fps schedule, whose positive clock supplies the non-decreasing queries the forward cursor requires. Motion sampling, projection and fog use engine functions. Camera depth is projectToNdc's pre-divide depth, unaffected by the discarded frustum-scaled coordinates, so unit frustum arguments preserve that depth; root-sampled fog approximates depth variation across each actor.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The planner owns only the frame walk and the per-actor record, the clock, shot resolution, sampling, projection and fog are the engine's, and the beat label is `shotBeat`, shared with the caption plan.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unresolvable references contribute nothing rather than a placeholder, `atmosphere` is omitted for a fogless scene rather than written as a default, and no shot, actor or fixture is special-cased.\n * @evidence contracts/development/common.md#meaningful-documentation The doc states the clock, how each frame's shot and each actor's pose are resolved, what is skipped rather than refused, when and how `atmosphere` is derived, every refusal, and who writes the file, and each property states its role and unit.\n * @evidence contracts/development/implementation.md#efficient-algorithms Initial maps index all supplied shots, scenes, motions and skeletons, including unused extras, while timeline and cursor work costs O(E + F) for E cut entries and F output samples. Each first-live shot scans its scene's cameras and indexes that scene's nodes; different shots sharing a scene rebuild that node index. Every frame scans its live shot's performances, and each resolved actor pays sampleMotion's key/joint/expression work plus resolvePoseKeypoints' forward kinematics, joint projection and camera-clip sampling. Fog requests sample the camera again per actor. These delegated populations drive cost beyond a constant per-performance bound, and none of the input arrays or output populations is capped here.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work A shot's staging, its scene, camera and node index, is resolved once per call and shared by all its frames, which is equivalent because the inputs are immutable for the call and the staging depends only on the shot's `scene` and `camera` ids; the cache is dropped on return.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Call-local maps reference every supplied shot, scene, motion and skeleton; at most one staging entry per supplied shot also holds a camera and node map, which can repeat one scene's node population across shots. The F-time schedule, motion samples and projection intermediates become collectable when their calls finish. The caller retains every returned frame, actor and keypoint, with no frame or population cap here; no native handle or background task is acquired.\n */\nexport const planPoseKeypointSidecar: (\n props: IAutoMoviePlanPoseKeypointSidecarProps,\n) => IAutoMoviePoseKeypointSidecar = (\n props: IAutoMoviePlanPoseKeypointSidecarProps,\n): IAutoMoviePoseKeypointSidecar => {\n if (Number.isFinite(props.fps) === false || props.fps <= 0)\n throw new Error(`fps must be a finite number > 0, but was ${props.fps}`);\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n props.sequence,\n props.shots,\n );\n const times: number[] = frameTimes(props.fps, timeline.runtime);\n if (times.length === 0)\n throw new Error(\n `planPoseKeypointSidecar requires at least one frame; fps ${props.fps} and duration ${timeline.runtime} produced zero frames`,\n );\n const shotById: Map<string, IAutoMovieShot> = new Map(\n props.shots.map((shot: IAutoMovieShot): [string, IAutoMovieShot] => [\n shot.id,\n shot,\n ]),\n );\n const sceneById: Map<string, IAutoMovieScene> = new Map(\n props.scenes.map((scene: IAutoMovieScene): [string, IAutoMovieScene] => [\n scene.id,\n scene,\n ]),\n );\n const lookups: IPoseLookups = {\n motionById: new Map(\n props.motions.map(\n (motion: IAutoMovieMotion): [string, IAutoMovieMotion] => [\n motion.id,\n motion,\n ],\n ),\n ),\n skeletonById: new Map(\n props.skeletons.map(\n (skeleton: IAutoMovieSkeleton): [string, IAutoMovieSkeleton] => [\n skeleton.id,\n skeleton,\n ],\n ),\n ),\n aspect: props.aspect,\n crop: props.crop,\n };\n const stagingByShot: Map<string, IShotStaging | null> = new Map();\n const cursor: (seconds: number) => IAutoMoviePlaybackSample = playbackCursor(\n props.sequence,\n timeline,\n );\n const frames: IAutoMoviePoseKeypointFrame[] = times.map(\n (time: number, frame: number): IAutoMoviePoseKeypointFrame => {\n const sample: IAutoMoviePlaybackSample = cursor(time);\n // sequenceTimeline already threw for any entry whose shot was not\n // provided, so every cursor sample names a known shot.\n const shot: IAutoMovieShot = shotById.get(sample.shot)!;\n let staging: IShotStaging | null | undefined = stagingByShot.get(shot.id);\n if (staging === undefined) {\n staging = stageShot(shot, sceneById);\n stagingByShot.set(shot.id, staging);\n }\n return {\n frame,\n beat: shotBeat(sample.shot),\n actors:\n staging === null ? [] : actorsAt(shot, staging, sample.time, lookups),\n };\n },\n );\n return {\n target: props.sequence.id,\n fps: props.fps,\n frameCount: frames.length,\n frames,\n };\n};\n\n/** The call-wide lookups every frame's actor projection reads. */\ninterface IPoseLookups {\n motionById: ReadonlyMap<string, IAutoMovieMotion>;\n skeletonById: ReadonlyMap<string, IAutoMovieSkeleton>;\n aspect: number | undefined;\n crop: IAutoMovieDeliveryCrop | undefined;\n}\n\n/** A shot's resolved scene, camera and node index, shared by all its frames. */\ninterface IShotStaging {\n scene: IAutoMovieScene;\n camera: IAutoMovieCamera;\n nodeById: ReadonlyMap<string, IAutoMovieSceneNode>;\n}\n\n/** Resolve a shot's scene and camera, or null when either is missing. */\nconst stageShot: (\n shot: IAutoMovieShot,\n sceneById: ReadonlyMap<string, IAutoMovieScene>,\n) => IShotStaging | null = (\n shot: IAutoMovieShot,\n sceneById: ReadonlyMap<string, IAutoMovieScene>,\n): IShotStaging | null => {\n const scene: IAutoMovieScene | undefined = sceneById.get(shot.scene);\n const camera: IAutoMovieCamera | undefined = scene?.cameras.find(\n (candidate: IAutoMovieCamera): boolean => candidate.id === shot.camera,\n );\n if (scene === undefined || camera === undefined) return null;\n return {\n scene,\n camera,\n nodeById: new Map(\n scene.nodes.map(\n (node: IAutoMovieSceneNode): [string, IAutoMovieSceneNode] => [\n node.id,\n node,\n ],\n ),\n ),\n };\n};\n\n/** Project every resolvable performing actor of one shot at a shot-local instant. */\nconst actorsAt: (\n shot: IAutoMovieShot,\n staging: IShotStaging,\n time: number,\n lookups: IPoseLookups,\n) => IAutoMoviePoseKeypointActor[] = (\n shot: IAutoMovieShot,\n staging: IShotStaging,\n time: number,\n lookups: IPoseLookups,\n): IAutoMoviePoseKeypointActor[] => {\n const actors: IAutoMoviePoseKeypointActor[] = [];\n for (const performance of shot.performances) {\n if (performance.motion === null) continue;\n const motion: IAutoMovieMotion | undefined = lookups.motionById.get(\n performance.motion,\n );\n const node: IAutoMovieSceneNode | undefined = staging.nodeById.get(\n performance.node,\n );\n if (motion === undefined || node === undefined) continue;\n const skeleton: IAutoMovieSkeleton | undefined = lookups.skeletonById.get(\n motion.skeleton,\n );\n if (skeleton === undefined) continue;\n const pose: IAutoMoviePose = sampleMotion(\n motion,\n Math.max(0, time - performance.startOffset),\n ).pose;\n const fog: IAutoMovieScene[\"fog\"] = staging.scene.fog;\n actors.push({\n node: performance.node,\n keypoints: resolvePoseKeypoints({\n pose,\n skeleton,\n node,\n camera: staging.camera,\n cameraMotion: shot.cameraMotion,\n time,\n aspect: lookups.aspect,\n crop: lookups.crop,\n }),\n // Spread only when the scene declares fog, so a fogless scene's sidecar\n // carries no `atmosphere` key at all. The depth sample is the actor's\n // world root, its staged placement with the sampled pose root folded\n // in, because the staged placement alone would keep the atmosphere an\n // actor had at frame zero while its clip carries it away.\n ...(fog === undefined || fog === null\n ? {}\n : {\n atmosphere: sceneFogTransmittance(\n fog,\n cameraDepth(\n staging.camera,\n shot.cameraMotion,\n time,\n foldRoot(node.transform, pose.root).translation,\n ),\n ),\n }),\n });\n }\n return actors;\n};\n\n/**\n * The distance of `point` along the camera's forward axis at `time`, the\n * length the fog is integrated over and what the fog shader interpolates as\n * `vFogDepth`.\n *\n * `projectToNdc` computes that depth as `-localZ` before its perspective\n * divide, so the frustum half-height and aspect, which only scale the\n * discarded `ndcX` and `ndcY`, are passed as 1.\n */\nconst cameraDepth: (\n camera: IAutoMovieCamera,\n cameraMotion: IAutoMovieShot[\"cameraMotion\"],\n time: number,\n point: IAutoMovieVector3,\n) => number = (\n camera: IAutoMovieCamera,\n cameraMotion: IAutoMovieShot[\"cameraMotion\"],\n time: number,\n point: IAutoMovieVector3,\n): number =>\n projectToNdc(\n resolveCameraAt(camera.transform, cameraMotion, camera.id, time),\n point,\n 1,\n 1,\n ).depth;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8CA,MAAa,2BAGX,UACkC;CAClC,IAAI,OAAO,SAA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OAAO,IAAI,IAAI,GAC/D,OACA,GACA,CACF,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
- import { IAutoMovieRenderSpec, IAutoMovieSequence, IAutoMovieShot } from "@automovie/interface";
2
- import type { IAutoMovieSequenceRenderPlan } from "./IAutoMovieSequenceRenderPlan.js";
1
+ import type { IAutoMoviePlanSequenceRenderProps, IAutoMovieSequenceRenderPlan } from "@automovie/interface";
3
2
  /**
4
3
  * Build the render-layer manifest for a committed sequence. The output FPS is controlled by the render spec; the cut's fps is preserved as editorial metadata. Trim and transition arithmetic is delegated to the engine playback timeline, then copied into the manifest so the capture host has no hidden timing rules.
5
4
  *
@@ -11,10 +10,4 @@ import type { IAutoMovieSequenceRenderPlan } from "./IAutoMovieSequenceRenderPla
11
10
  * @evidence contracts/development/implementation.md#reuse-equivalent-work One resolved timeline feeds shot spans, transitions and every frame sample; the forward cursor retains its current entry across increasing sample times only within this call.
12
11
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned plan retains shot-span and frame metadata proportional to the output schedule; the temporary cursor and timeline are released on return, and planning opens no host resource.
13
12
  */
14
- export declare const planSequenceRender: (props: {
15
- sequence: IAutoMovieSequence;
16
- shots: IAutoMovieShot[];
17
- spec: IAutoMovieRenderSpec;
18
- frameDir?: string;
19
- outputPath?: string;
20
- }) => IAutoMovieSequenceRenderPlan;
13
+ export declare const planSequenceRender: (props: IAutoMoviePlanSequenceRenderProps) => IAutoMovieSequenceRenderPlan;
@@ -1 +1 @@
1
- {"version":3,"file":"planSequenceRender.js","sourceRoot":"","sources":["../src/planSequenceRender.ts"],"names":[],"mappings":";;;AAAA,8CAI2B;AAU3B,mDAA6C;AAC7C,iDAA2C;AAC3C,uDAAiD;AACjD,mDAA6C;AAC7C,2DAAqD;AAErD;;;;;;;;;;GAUG;AACI,MAAM,kBAAkB,GAMM,CAAC,KAerC,EAAgC,EAAE;IACjC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ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AAC,KAAK,CAAC,IAAI;oBACvB,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI;oBAClC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;iBAC1B;SACR,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"planSequenceRender.mjs","names":[],"sources":["../src/planSequenceRender.ts"],"sourcesContent":["import {\n IAutoMoviePlaybackTimeline,\n playbackCursor,\n sequenceTimeline,\n} from \"@automovie/engine\";\nimport {\n IAutoMovieRenderSpec,\n IAutoMovieSequence,\n IAutoMovieShot,\n} from \"@automovie/interface\";\n\nimport type { IAutoMovieSequenceRenderFrame } from \"./IAutoMovieSequenceRenderFrame.js\";\nimport type { IAutoMovieSequenceRenderPlan } from \"./IAutoMovieSequenceRenderPlan.js\";\nimport type { IAutoMovieSequenceRenderTransitionSpan } from \"./IAutoMovieSequenceRenderTransitionSpan.js\";\nimport { ffmpegArgs } from \"./ffmpegArgs.js\";\nimport { frameName } from \"./frameName.js\";\nimport { framePattern } from \"./framePattern.js\";\nimport { frameTimes } from \"./frameTimes.js\";\nimport { renderPathStem } from \"./renderPathStem.js\";\n\n/**\n * Build the render-layer manifest for a committed sequence. The output FPS is controlled by the render spec; the cut's fps is preserved as editorial metadata. Trim and transition arithmetic is delegated to the engine playback timeline, then copied into the manifest so the capture host has no hidden timing rules.\n *\n * @evidence contracts/development/implementation.md#principled-implementation sequenceTimeline owns trim and overlap arithmetic, frameTimes supplies increasing half-open output samples, and one playbackCursor resolves those samples without changing the sequence's editorial fps.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The manifest gathers timeline spans, resolved frame samples and paths so a capture host reads one plan instead of independently implementing the cut.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A mismatched render target or empty schedule refuses; output path overrides are caller data and no sequence identity is specially recognized.\n * @evidence contracts/development/common.md#meaningful-documentation The planner documents editorial versus output fps and target equality; manifest members state seconds, trim offsets, blend weights and host paths.\n * @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, E timeline entries and F output frames, the engine first indexes all S shots, including unused extras; layout and the forward cursor then cost O(E+F), for O(S+E+F) planning time and peak metadata space. The returned manifest retains O(E+F) records and no per-frame full timeline scan occurs.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work One resolved timeline feeds shot spans, transitions and every frame sample; the forward cursor retains its current entry across increasing sample times only within this call.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned plan retains shot-span and frame metadata proportional to the output schedule; the temporary cursor and timeline are released on return, and planning opens no host resource.\n */\nexport const planSequenceRender: (props: {\n sequence: IAutoMovieSequence;\n shots: IAutoMovieShot[];\n spec: IAutoMovieRenderSpec;\n frameDir?: string;\n outputPath?: string;\n}) => IAutoMovieSequenceRenderPlan = (props: {\n /** Sequence being rendered. */\n sequence: IAutoMovieSequence;\n\n /** Committed shots referenced by the sequence. */\n shots: IAutoMovieShot[];\n\n /** Render parameters whose `target` must equal `sequence.id`. */\n spec: IAutoMovieRenderSpec;\n\n /** Optional frame directory override. */\n frameDir?: string;\n\n /** Optional encoded output path override. */\n outputPath?: string;\n}): IAutoMovieSequenceRenderPlan => {\n if (props.spec.target !== props.sequence.id)\n throw new Error(\n `render spec target \"${props.spec.target}\" must equal sequence \"${props.sequence.id}\"`,\n );\n\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n props.sequence,\n props.shots,\n );\n const times: number[] = frameTimes(\n props.spec.frameFormat.fps,\n timeline.runtime,\n );\n if (times.length === 0)\n throw new Error(\n `planSequenceRender requires at least one frame; fps ${props.spec.frameFormat.fps} and duration ${timeline.runtime} produced zero frames`,\n );\n\n const stem: string = renderPathStem(props.sequence.id);\n const frameDir: string = props.frameDir ?? `frames/${stem}`;\n const outputPath: string = props.outputPath ?? `${stem}.mp4`;\n const inputPattern: string = `${frameDir}/${framePattern()}`;\n return {\n target: { kind: \"sequence\", id: props.sequence.id },\n sequenceFps: props.sequence.fps,\n renderFps: props.spec.frameFormat.fps,\n durationSeconds: timeline.runtime,\n frameCount: times.length,\n times,\n shots: timeline.entries.map(\n (\n entry: IAutoMoviePlaybackTimeline[\"entries\"][number],\n ): IAutoMovieSequenceRenderPlan[\"shots\"][number] => ({\n entry: entry.entry,\n shot: entry.shot,\n start: entry.start,\n end: entry.start + entry.played,\n played: entry.played,\n offset: entry.offset,\n trim: props.sequence.shots[entry.entry]!.trim,\n }),\n ),\n transitionSpans: transitionSpans(props.sequence, timeline),\n frames: frameSamples(props.sequence, timeline, times, frameDir),\n frameDir,\n firstFrame: `${frameDir}/${frameName(0)}`,\n lastFrame: `${frameDir}/${frameName(times.length - 1)}`,\n inputPattern,\n outputPath,\n ffmpegArgs: ffmpegArgs(props.spec, inputPattern, outputPath),\n };\n};\n\nconst transitionSpans: (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n) => IAutoMovieSequenceRenderTransitionSpan[] = (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n): IAutoMovieSequenceRenderTransitionSpan[] =>\n timeline.entries.flatMap(\n (\n entry: IAutoMoviePlaybackTimeline[\"entries\"][number],\n ): IAutoMovieSequenceRenderTransitionSpan[] => {\n const transition: IAutoMovieSequence[\"shots\"][number][\"transition\"] =\n sequence.shots[entry.entry]!.transition;\n if (transition === null) return [];\n const outgoing: IAutoMoviePlaybackTimeline[\"entries\"][number] =\n timeline.entries[entry.entry - 1]!;\n return [\n {\n entry: entry.entry,\n from: outgoing.shot,\n to: entry.shot,\n kind: transition.kind,\n start: entry.start,\n end: entry.start + transition.duration,\n duration: transition.duration,\n },\n ];\n },\n );\n\n/**\n * Resolve every output frame in one forward sweep. Frame times come from {@link frameTimes} (`i / fps`, strictly increasing), so a single {@link playbackCursor} walks the timeline once, O(frames + entries) instead of a per-frame scan, landing on the same live entry a per-frame resolve would, so the samples are byte-identical.\n */\nconst frameSamples: (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n times: number[],\n frameDir: string,\n) => IAutoMovieSequenceRenderFrame[] = (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n times: number[],\n frameDir: string,\n): IAutoMovieSequenceRenderFrame[] => {\n const cursor: ReturnType<typeof playbackCursor> = playbackCursor(\n sequence,\n timeline,\n );\n return times.map(\n (time: number, index: number): IAutoMovieSequenceRenderFrame => {\n const sample: ReturnType<typeof cursor> = cursor(time);\n return {\n index,\n timeSeconds: time,\n path: `${frameDir}/${frameName(index)}`,\n shot: sample.shot,\n shotTimeSeconds: sample.time,\n blend:\n sample.blend === null\n ? null\n : {\n shot: sample.blend.shot,\n shotTimeSeconds: sample.blend.time,\n alpha: sample.blend.alpha,\n },\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAa,sBAMyB,UAeF;CAClC,IAAI,MAAM,KAAK,WAAW,MAAM,SAAS,IACvC,MAAM,IAAI,MACR,uBAAuB,MAAM,KAAK,OAAO,yBAAyB,MAAM,SAAS,GAAG,EACtF;CAEF,MAAM,WAAuC,iBAC3C,MAAM,UACN,MAAM,KACR;CACA,MAAM,QAAkB,WACtB,MAAM,KAAK,YAAY,KACvB,SAAS,OACX;CACA,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MACR,uDAAuD,MAAM,KAAK,YAAY,IAAI,gBAAgB,SAAS,QAAQ,sBACrH;CAEF,MAAM,OAAe,eAAe,MAAM,SAAS,EAAE;CACrD,MAAM,WAAmB,MAAM,YAAY,UAAU;CACrD,MAAM,aAAqB,MAAM,cAAc,GAAG,KAAK;CACvD,MAAM,eAAuB,GAAG,SAAS,GAAG,aAAa;CACzD,OAAO;EACL,QAAQ;GAAE,MAAM;GAAY,IAAI,MAAM,SAAS;EAAG;EAClD,aAAa,MAAM,SAAS;EAC5B,WAAW,MAAM,KAAK,YAAY;EAClC,iBAAiB,SAAS;EAC1B,YAAY,MAAM;EAClB;EACA,OAAO,SAAS,QAA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","names":[],"sources":["../src/planSequenceRender.ts"],"sourcesContent":["import { playbackCursor, sequenceTimeline } from \"@automovie/engine\";\nimport type {\n IAutoMoviePlanSequenceRenderProps,\n IAutoMoviePlaybackTimeline,\n IAutoMovieSequence,\n IAutoMovieSequenceRenderFrame,\n IAutoMovieSequenceRenderPlan,\n IAutoMovieSequenceRenderTransitionSpan,\n} from \"@automovie/interface\";\n\nimport { ffmpegArgs } from \"./ffmpegArgs.js\";\nimport { frameName } from \"./frameName.js\";\nimport { framePattern } from \"./framePattern.js\";\nimport { frameTimes } from \"./frameTimes.js\";\nimport { renderPathStem } from \"./renderPathStem.js\";\n\n/**\n * Build the render-layer manifest for a committed sequence. The output FPS is controlled by the render spec; the cut's fps is preserved as editorial metadata. Trim and transition arithmetic is delegated to the engine playback timeline, then copied into the manifest so the capture host has no hidden timing rules.\n *\n * @evidence contracts/development/implementation.md#principled-implementation sequenceTimeline owns trim and overlap arithmetic, frameTimes supplies increasing half-open output samples, and one playbackCursor resolves those samples without changing the sequence's editorial fps.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure The manifest gathers timeline spans, resolved frame samples and paths so a capture host reads one plan instead of independently implementing the cut.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A mismatched render target or empty schedule refuses; output path overrides are caller data and no sequence identity is specially recognized.\n * @evidence contracts/development/common.md#meaningful-documentation The planner documents editorial versus output fps and target equality; manifest members state seconds, trim offsets, blend weights and host paths.\n * @evidence contracts/development/implementation.md#efficient-algorithms For S supplied shots, E timeline entries and F output frames, the engine first indexes all S shots, including unused extras; layout and the forward cursor then cost O(E+F), for O(S+E+F) planning time and peak metadata space. The returned manifest retains O(E+F) records and no per-frame full timeline scan occurs.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work One resolved timeline feeds shot spans, transitions and every frame sample; the forward cursor retains its current entry across increasing sample times only within this call.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned plan retains shot-span and frame metadata proportional to the output schedule; the temporary cursor and timeline are released on return, and planning opens no host resource.\n */\nexport const planSequenceRender: (\n props: IAutoMoviePlanSequenceRenderProps,\n) => IAutoMovieSequenceRenderPlan = (\n props: IAutoMoviePlanSequenceRenderProps,\n): IAutoMovieSequenceRenderPlan => {\n if (props.spec.target !== props.sequence.id)\n throw new Error(\n `render spec target \"${props.spec.target}\" must equal sequence \"${props.sequence.id}\"`,\n );\n\n const timeline: IAutoMoviePlaybackTimeline = sequenceTimeline(\n props.sequence,\n props.shots,\n );\n const times: number[] = frameTimes(\n props.spec.frameFormat.fps,\n timeline.runtime,\n );\n if (times.length === 0)\n throw new Error(\n `planSequenceRender requires at least one frame; fps ${props.spec.frameFormat.fps} and duration ${timeline.runtime} produced zero frames`,\n );\n\n const stem: string = renderPathStem(props.sequence.id);\n const frameDir: string = props.frameDir ?? `frames/${stem}`;\n const outputPath: string = props.outputPath ?? `${stem}.mp4`;\n const inputPattern: string = `${frameDir}/${framePattern()}`;\n return {\n target: { kind: \"sequence\", id: props.sequence.id },\n sequenceFps: props.sequence.fps,\n renderFps: props.spec.frameFormat.fps,\n durationSeconds: timeline.runtime,\n frameCount: times.length,\n times,\n shots: timeline.entries.map(\n (\n entry: IAutoMoviePlaybackTimeline[\"entries\"][number],\n ): IAutoMovieSequenceRenderPlan[\"shots\"][number] => ({\n entry: entry.entry,\n shot: entry.shot,\n start: entry.start,\n end: entry.start + entry.played,\n played: entry.played,\n offset: entry.offset,\n trim: props.sequence.shots[entry.entry]!.trim,\n }),\n ),\n transitionSpans: transitionSpans(props.sequence, timeline),\n frames: frameSamples(props.sequence, timeline, times, frameDir),\n frameDir,\n firstFrame: `${frameDir}/${frameName(0)}`,\n lastFrame: `${frameDir}/${frameName(times.length - 1)}`,\n inputPattern,\n outputPath,\n ffmpegArgs: ffmpegArgs(props.spec, inputPattern, outputPath),\n };\n};\n\nconst transitionSpans: (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n) => IAutoMovieSequenceRenderTransitionSpan[] = (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n): IAutoMovieSequenceRenderTransitionSpan[] =>\n timeline.entries.flatMap(\n (\n entry: IAutoMoviePlaybackTimeline[\"entries\"][number],\n ): IAutoMovieSequenceRenderTransitionSpan[] => {\n const transition: IAutoMovieSequence[\"shots\"][number][\"transition\"] =\n sequence.shots[entry.entry]!.transition;\n if (transition === null) return [];\n const outgoing: IAutoMoviePlaybackTimeline[\"entries\"][number] =\n timeline.entries[entry.entry - 1]!;\n return [\n {\n entry: entry.entry,\n from: outgoing.shot,\n to: entry.shot,\n kind: transition.kind,\n start: entry.start,\n end: entry.start + transition.duration,\n duration: transition.duration,\n },\n ];\n },\n );\n\n/**\n * Resolve every output frame in one forward sweep. Frame times come from {@link frameTimes} (`i / fps`, strictly increasing), so a single {@link playbackCursor} walks the timeline once, O(frames + entries) instead of a per-frame scan, landing on the same live entry a per-frame resolve would, so the samples are byte-identical.\n */\nconst frameSamples: (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n times: number[],\n frameDir: string,\n) => IAutoMovieSequenceRenderFrame[] = (\n sequence: IAutoMovieSequence,\n timeline: IAutoMoviePlaybackTimeline,\n times: number[],\n frameDir: string,\n): IAutoMovieSequenceRenderFrame[] => {\n const cursor: ReturnType<typeof playbackCursor> = playbackCursor(\n sequence,\n timeline,\n );\n return times.map(\n (time: number, index: number): IAutoMovieSequenceRenderFrame => {\n const sample: ReturnType<typeof cursor> = cursor(time);\n return {\n index,\n timeSeconds: time,\n path: `${frameDir}/${frameName(index)}`,\n shot: sample.shot,\n shotTimeSeconds: sample.time,\n blend:\n sample.blend === null\n ? null\n : {\n shot: sample.blend.shot,\n shotTimeSeconds: sample.blend.time,\n alpha: sample.blend.alpha,\n },\n };\n },\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2BA,MAAa,sBAGX,UACiC;CACjC,IAAI,MAAM,KAAK,WAAW,MAAM,SAAS,IACvC,MAAM,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AAC;CACjC,MAAM,WACJ,SAAS,QAAQ,MAAM,QAAQ;CACjC,OAAO,CACL;EACE,OAAO,MAAM;EACb,MAAM,SAAS;EACf,IAAI,MAAM;EACV,MAAM,WAAW;EACjB,OAAO,MAAM;EACb,KAAK,MAAM,QAAQ,WAAW;EAC9B,UAAU,WAAW;CACvB,CACF;AACF,CACF;;;;AAKF,MAAM,gBAMJ,UACA,UACA,OACA,aACoC;CACpC,MAAM,SAA4C,eAChD,UACA,QACF;CACA,OAAO,MAAM,KACV,MAAc,UAAiD;EAC9D,MAAM,SAAoC,OAAO,IAAI;EACrD,OAAO;GACL;GACA,aAAa;GACb,MAAM,GAAG,SAAS,GAAG,UAAU,KAAK;GACpC,MAAM,OAAO;GACb,iBAAiB,OAAO;GACxB,OACE,OAAO,UAAU,OACb,OACA;IACE,MAAM,OAAO,MAAM;IACnB,iBAAiB,OAAO,MAAM;IAC9B,OAAO,OAAO,MAAM;GACtB;EACR;CACF,CACF;AACF"}
@@ -1,3 +1,4 @@
1
+ import type { IAutoMoviePlanViewerFrameTimesRequest } from "@automovie/interface";
1
2
  /**
2
3
  * Plan the film seconds whose frames a still capture writes.
3
4
  *
@@ -15,19 +16,4 @@
15
16
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Each call plans from its arguments alone; there is no shared work to reuse.
16
17
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the returned array is allocated, bounded by the requested range divided by its interval.
17
18
  */
18
- export declare function planViewerFrameTimes(request: {
19
- /** Frames per second of the film's encoded grid. */
20
- fps: number;
21
- /** Film running time in seconds. */
22
- durationSeconds: number;
23
- /** Explicit film seconds, kept as given. */
24
- at?: readonly number[];
25
- /** Start of the range in film seconds, inclusive. */
26
- from?: number;
27
- /** End of the range in film seconds, inclusive. */
28
- to?: number;
29
- /** Range interval in whole frames. */
30
- every?: number;
31
- /** Range interval in seconds, rounded to the nearest frame per sample. */
32
- step?: number;
33
- }): number[];
19
+ export declare function planViewerFrameTimes(request: IAutoM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,CAAC,IAAI,GAAG,MAAM,GAAG,IAAK,CAAC,GAAG,GAAG,CAAC,CAAC;YAChE,IAAI,KAAK,GAAG,IAAI;gBAAE,MAAM;YACxB,IAAI,KAAK,IAAI,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK;gBAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpE,CAAC;IACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;AAC5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"planViewerFrameTimes.mjs","names":[],"sources":["../src/planViewerFrameTimes.ts"],"sourcesContent":["/**\n * Plan the film seconds whose frames a still capture writes.\n *\n * Give either explicit `at` seconds, or a `from`–`to` range sampled every\n * `every` frames or every `step` seconds. Range samples are aligned to the\n * film's frame grid at `fps`, so each still matches a frame the video encodes;\n * explicit seconds are kept as given. The result is sorted, without repeats,\n * and every second lies in `[0, durationSeconds]`.\n *\n * @evidence contracts/development/common.md#meaningful-documentation The comment states both request forms, the frame-grid alignment of ranges, the kept explicit seconds and the result's order and bounds; each option states its unit.\n * @evidence contracts/development/implementation.md#principled-implementation A range is enumerated in whole frame indices, from the first index at or after `from` to the last at or before `to`, so floating-point step sums never drift off the encoded grid; a `step` is converted to the nearest frame index per sample and repeats are removed.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function owns request validation and enumeration; capture and naming belong to renderViewerFrames.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default range or interval is invented: a request without `at` or a complete range, or with both forms, throws.\n * @evidence contracts/development/implementation.md#efficient-algorithms Enumeration is linear in the number of planned frames, plus a sort of explicit seconds; nothing scans the whole film when a short range is requested.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Each call plans from its arguments alone; there is no shared work to reuse.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the returned array is allocated, bounded by the requested range divided by its interval.\n */\nexport function planViewerFrameTimes(request: {\n /** Frames per second of the film's encoded grid. */\n fps: number;\n\n /** Film running time in seconds. */\n durationSeconds: number;\n\n /** Explicit film seconds, kept as given. */\n at?: readonly number[];\n\n /** Start of the range in film seconds, inclusive. */\n from?: number;\n\n /** End of the range in film seconds, inclusive. */\n to?: number;\n\n /** Range interval in whole frames. */\n every?: number;\n\n /** Range interval in seconds, rounded to the nearest frame per sample. */\n step?: number;\n}): number[] {\n const fps: number = request.fps;\n const durationSeconds: number = request.durationSeconds;\n if (!Number.isFinite(fps) || fps <= 0)\n throw new Error(\"fps must be positive and finite\");\n if (!Number.isFinite(durationSeconds) || durationSeconds <= 0)\n throw new Error(\"durationSeconds must be positive and finite\");\n const inFilm: (seconds: number) => boolean = (seconds: number): boolean =>\n Number.isFinite(seconds) && seconds >= 0 && seconds <= durationSeconds;\n const ranged: boolean =\n request.from !== undefined ||\n request.to !== undefined ||\n request.every !== undefined ||\n request.step !== undefined;\n if ((request.at !== undefined) === ranged)\n throw new Error(\"Give either at seconds or a from-to range, not both\");\n\n if (request.at !== undefined) {\n if (request.at.length === 0)\n throw new Error(\"at needs at least one second\");\n for (const seconds of request.at)\n if (!inFilm(seconds))\n throw new Error(`${seconds} lies outside 0-${durationSeconds} s`);\n return [...new Set(request.at)].sort(\n (a: number, b: number): number => a - b,\n );\n }\n\n const from: number | undefined = request.from;\n const to: number | undefined = request.to;\n const every: number | undefined = request.every;\n const step: number | undefined = request.step;\n if (from === undefined || to === undefined)\n throw new Error(\"A range needs both from and to\");\n if (!inFilm(from) || !inFilm(to) || from > to)\n throw new Error(\n `The range must satisfy 0 <= from <= to <= ${durationSeconds}`,\n );\n if ((every === undefined) === (step === undefined))\n throw new Error(\"A range needs exactly one of every or step\");\n if (every !== undefined && (!Number.isSafeInteger(every) || every <= 0))\n throw new Error(\"every must be a positive whole number of frames\");\n if (step !== undefined && (!Number.isFinite(step) || step <= 0))\n throw new Error(\"step must be positive and finite\");\n\n // Enumerate whole frame indices so the samples stay on the encoded grid.\n const first: number = Math.ceil(from * fps - 1e-9);\n const last: number = Math.floor(to * fps + 1e-9);\n const frames: number[] = [];\n if (every !== undefined)\n for (let index: number = first; index <= last; index += every)\n frames.push(index);\n else\n for (let sample: number = 0; ; sample++) {\n const index: number = Math.round((from + sample * step!) * fps);\n if (index > last) break;\n if (index >= first && frames.at(-1) !== index) frames.push(index);\n }\n return frames.map((index: number): number => index / fps);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAgB,qBAAqB,SAqBxB;CACX,MAAM,MAAc,QAAQ;CAC5B,MAAM,kBAA0B,QAAQ;CACxC,IAAI,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAClC,MAAM,IAAI,MAAM,iCAAiC;CACnD,IAAI,CAAC,OAAO,SAAS,eAAe,KAAK,mBAAmB,GAC1D,MAAM,IAAI,MAAM,6CAA6C;CAC/D,MAAM,UAAwC,YAC5C,OAAO,SAAS,OAAO,KAAK,WAAW,KAAK,WAAW;CACzD,MAAM,SACJ,QAAQ,SAAS,KAAA,KACjB,QAAQ,OAAO,KAAA,KACf,QAAQ,UAAU,KAAA,KAClB,QAAQ,SAAS,KAAA;CACnB,IAAK,QAAQ,OAAO,KAAA,MAAe,QACjC,MAAM,IAAI,MAAM,qDAAqD;CAEvE,IAAI,QAAQ,OAAO,KAAA,GAAW;EAC5B,IAAI,QAAQ,GAAG,WAAW,GACxB,MAAM,IAAI,MAAM,8BAA8B;EAChD,KAAK,MAAM,WAAW,QAAQ,IAC5B,IAAI,CAAC,OAAO,OAAO,GACjB,MAAM,IAAI,MAAM,GAAG,QAAQ,kBAAkB,gBAAgB,GAAG;EACpE,OAAO,CAAC,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,MAC7B,GAAW,MAAsB,IAAI,CACxC;CACF;CAEA,MAAM,OAA2B,QAAQ;CACzC,MAAM,KAAyB,QAAQ;CACvC,MAAM,QAA4B,QAAQ;CAC1C,MAAM,OAA2B,QAAQ;CACzC,IAAI,SAAS,KAAA,KAAa,OAAO,KAAA,GAC/B,MAAM,IAAI,MAAM,gCAAgC;CAClD,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,KAAK,OAAO,IACzC,MAAM,IAAI,MACR,6CAA6C,iBAC/C;CACF,IAAK,UAAU,KAAA,OAAgB,SAAS,KAAA,IACtC,MAAM,IAAI,MAAM,4CAA4C;CAC9D,IAAI,UAAU,KAAA,MAAc,CAAC,OAAO,cAAc,KAAK,KAAK,SAAS,IACnE,MAAM,IAAI,MAAM,iDAAiD;CACnE,IAAI,SAAS,KAAA,MAAc,CAAC,OAAO,SAAS,IAAI,KAAK,QAAQ,IAC3D,MAAM,IAAI,MAAM,kCAAkC;CAGpD,MAAM,QAAgB,KAAK,KAAK,OAAO,MAAM,IAAI;CACjD,MAAM,OAAe,KAAK,MAAM,KAAK,MAAM,IAAI;CAC/C,MAAM,SAAmB,CAAC;CAC1B,IAAI,UAAU,KAAA,GACZ,KAAK,IAAI,QAAgB,OAAO,SAAS,MAAM,SAAS,OACtD,OAAO,KAAK,KAAK;MAEnB,KAAK,IAAI,SAAiB,IAAK,UAAU;EACvC,MAAM,QAAgB,KAAK,OAAO,OAAO,SAAS,QAAS,GAAG;EAC9D,IAAI,QAAQ,MAAM;EAClB,IAAI,SAAS,SAAS,OAAO,GAAG,EAAE,MAAM,OAAO,OAAO,KAAK,KAAK;CAClE;CACF,OAAO,OAAO,KAAK,UAA0B,QAAQ,GAAG;AAC1D"}
1
+ {"version":3,"file":"planViewerFrameTimes.mjs","names":[],"sources":["../src/planViewerFrameTimes.ts"],"sourcesContent":["import type { IAutoMoviePlanViewerFrameTimesRequest } from \"@automovie/interface\";\n\n/**\n * Plan the film seconds whose frames a still capture writes.\n *\n * Give either explicit `at` seconds, or a `from`–`to` range sampled every\n * `every` frames or every `step` seconds. Range samples are aligned to the\n * film's frame grid at `fps`, so each still matches a frame the video encodes;\n * explicit seconds are kept as given. The result is sorted, without repeats,\n * and every second lies in `[0, durationSeconds]`.\n *\n * @evidence contracts/development/common.md#meaningful-documentation The comment states both request forms, the frame-grid alignment of ranges, the kept explicit seconds and the result's order and bounds; each option states its unit.\n * @evidence contracts/development/implementation.md#principled-implementation A range is enumerated in whole frame indices, from the first index at or after `from` to the last at or before `to`, so floating-point step sums never drift off the encoded grid; a `step` is converted to the nearest frame index per sample and repeats are removed.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure One pure function owns request validation and enumeration; capture and naming belong to renderViewerFrames.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No default range or interval is invented: a request without `at` or a complete range, or with both forms, throws.\n * @evidence contracts/development/implementation.md#efficient-algorithms Enumeration is linear in the number of planned frames, plus a sort of explicit seconds; nothing scans the whole film when a short range is requested.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work Each call plans from its arguments alone; there is no shared work to reuse.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the returned array is allocated, bounded by the requested range divided by its interval.\n */\nexport function planViewerFrameTimes(\n request: IAutoMoviePlanViewerFrameTimesRequest,\n): number[] {\n const fps: number = request.fps;\n const durationSeconds: number = request.durationSeconds;\n if (!Number.isFinite(fps) || fps <= 0)\n throw new Error(\"fps must be positive and finite\");\n if (!Number.isFinite(durationSeconds) || durationSeconds <= 0)\n throw new Error(\"durationSeconds must be positive and finite\");\n const inFilm: (seconds: number) => boolean = (seconds: number): boolean =>\n Number.isFinite(seconds) && seconds >= 0 && seconds <= durationSeconds;\n const ranged: boolean =\n request.from !== undefined ||\n request.to !== undefined ||\n request.every !== undefined ||\n request.step !== undefined;\n if ((request.at !== undefined) === ranged)\n throw new Error(\"Give either at seconds or a from-to range, not both\");\n\n if (request.at !== undefined) {\n if (request.at.length === 0)\n throw new Error(\"at needs at least one second\");\n for (const seconds of request.at)\n if (!inFilm(seconds))\n throw new Error(`${seconds} lies outside 0-${durationSeconds} s`);\n return [...new Set(request.at)].sort(\n (a: number, b: number): number => a - b,\n );\n }\n\n const from: number | undefined = request.from;\n const to: number | undefined = request.to;\n const every: number | undefined = request.every;\n const step: number | undefined = request.step;\n if (from === undefined || to === undefined)\n throw new Error(\"A range needs both from and to\");\n if (!inFilm(from) || !inFilm(to) || from > to)\n throw new Error(\n `The range must satisfy 0 <= from <= to <= ${durationSeconds}`,\n );\n if ((every === undefined) === (step === undefined))\n throw new Error(\"A range needs exactly one of every or step\");\n if (every !== undefined && (!Number.isSafeInteger(every) || every <= 0))\n throw new Error(\"every must be a positive whole number of frames\");\n if (step !== undefined && (!Number.isFinite(step) || step <= 0))\n throw new Error(\"step must be positive and finite\");\n\n // Enumerate whole frame indices so the samples stay on the encoded grid.\n const first: number = Math.ceil(from * fps - 1e-9);\n const last: number = Math.floor(to * fps + 1e-9);\n const frames: number[] = [];\n if (every !== undefined)\n for (let index: number = first; index <= last; index += every)\n frames.push(index);\n else\n for (let sample: number = 0; ; sample++) {\n const index: number = Math.round((from + sample * step!) * fps);\n if (index > last) break;\n if (index >= first && frames.at(-1) !== index) frames.push(index);\n }\n return frames.map((index: number): number => index / fps);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAgB,qBACd,SACU;CACV,MAAM,MAAc,QAAQ;CAC5B,MAAM,kBAA0B,QAAQ;CACxC,IAAI,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAClC,MAAM,IAAI,MAAM,iCAAiC;CACnD,IAAI,CAAC,OAAO,SAAS,eAAe,KAAK,mBAAmB,GAC1D,MAAM,IAAI,MAAM,6CAA6C;CAC/D,MAAM,UAAwC,YAC5C,OAAO,SAAS,OAAO,KAAK,WAAW,KAAK,WAAW;CACzD,MAAM,SACJ,QAAQ,SAAS,KAAA,KACjB,QAAQ,OAAO,KAAA,KACf,QAAQ,UAAU,KAAA,KAClB,QAAQ,SAAS,KAAA;CACnB,IAAK,QAAQ,OAAO,KAAA,MAAe,QACjC,MAAM,IAAI,MAAM,qDAAqD;CAEvE,IA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ClB,IAAI,SAAS,SAAS,OAAO,GAAG,EAAE,MAAM,OAAO,OAAO,KAAK,KAAK;CAClE;CACF,OAAO,OAAO,KAAK,UAA0B,QAAQ,GAAG;AAC1D"}
@@ -1,5 +1,4 @@
1
- import type { IAutoMovieRenderAndSeeRequest } from "./IAutoMovieRenderAndSeeRequest.js";
2
- import type { IAutoMovieRenderAndSeeResult } from "./IAutoMovieRenderAndSeeResult.js";
1
+ import type { IAutoMovieRenderAndSeeRequest, IAutoMovieRenderAndSeeResult } from "@automovie/interface";
3
2
  /**
4
3
  * Render a clip and return the encoded output plus explicit frame artifacts. The function still performs only deterministic orchestration over injected host I/O; its value is the metadata contract that lets an agent inspect what was captured without guessing paths or sample times.
5
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"renderAndSee.js","sourceRoot":"","sources":["../src/renderAndSee.ts"],"names":[],"mappings":";;;AAEA,qDAA+C;AAE/C;;;;;;;;;;GAUG;AACI,MAAM,YAAY,GAEoB,KAAK,EAChD,OAAsC,EACC,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE;IACzB,eAAe,EAAE,OAAO,CAAC,eAAe;IACxC,GAAG,CAAC,MAAM,IAAA,4BAAW,EACnB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,QAAQ,CACjB,CAAC;CACH,CAAC,CAAC;AAdU,QAAA,YAAY,GAAZ,YAAY,CActB"}
1
+ {"version":3,"file":"renderAndSee.js","sourceRoot":"","sources":["../src/renderAndSee.ts"],"names":[],"mappings":";;;AAKA,qDAA+C;AAE/C;;;;;;;;;;GAUG;AACI,MAAM,YAAY,GAEoB,KAAK,EAChD,OAAsC,EACC,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE;IACzB,eAAe,EAAE,OAAO,CAAC,eAAe;IACxC,GAAG,CAAC,MAAM,IAAA,4BAAW,EACnB,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,eAAe,EACvB,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,QAAQ,CACjB,CAAC;CACH,CAAC,CAAC;AAdU,QAAA,YAAY,GAAZ,YAAY,CActB"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderAndSee.mjs","names":[],"sources":["../src/renderAndSee.ts"],"sourcesContent":["import type { IAutoMovieRenderAndSeeRequest } from \"./IAutoMovieRenderAndSeeRequest.js\";\nimport type { IAutoMovieRenderAndSeeResult } from \"./IAutoMovieRenderAndSeeResult.js\";\nimport { renderVideo } from \"./renderVideo.js\";\n\n/**\n * Render a clip and return the encoded output plus explicit frame artifacts. The function still performs only deterministic orchestration over injected host I/O; its value is the metadata contract that lets an agent inspect what was captured without guessing paths or sample times.\n *\n * @evidence contracts/development/implementation.md#principled-implementation The wrapper executes renderVideo with the supplied spec and seconds, then attaches the requested duration and a shallow spec copy; nested spec objects remain shared with the caller.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Clip execution stays in renderVideo while this entry owns the inspectable artifact envelope used by a host or agent.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The wrapper neither invents capture paths nor suppresses adapter errors, and the returned frames are those the delegated capture loop received.\n * @evidence contracts/development/common.md#meaningful-documentation Request members identify seconds, output paths and adapter ownership; the result documents the spec snapshot, whose nested values callers must keep stable while rendering.\n * @evidence contracts/development/implementation.md#efficient-algorithms Beyond the delegated O(F) frame capture and metadata work, the wrapper performs a constant-size shallow spec copy and object merge.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work This wrapper performs one effectful render per invocation; the returned artifact can be retained by its caller but an equal spec does not authorize sharing host I/O.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned artifact owns its metadata arrays while host adapters own written files and running work; failures propagate from renderVideo without acquiring additional resources.\n */\nexport const renderAndSee: (\n request: IAutoMovieRenderAndSeeRequest,\n) => Promise<IAutoMovieRenderAndSeeResult> = async (\n request: IAutoMovieRenderAndSeeRequest,\n): Promise<IAutoMovieRenderAndSeeResult> => ({\n spec: { ...request.spec },\n durationSeconds: request.durationSeconds,\n ...(await renderVideo(\n request.spec,\n request.durationSeconds,\n request.frameDir,\n request.outputPath,\n request.adapters,\n )),\n});\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAa,eAEgC,OAC3C,aAC2C;CAC3C,MAAM,EAAE,GAAG,QAAQ,KAAK;CACxB,iBAAiB,QAAQ;CACzB,GAAI,MAAM,YACR,QAAQ,MACR,QAAQ,iBACR,QAAQ,UACR,QAAQ,YACR,QAAQ,QACV;AACF"}
1
+ {"version":3,"file":"renderAndSee.mjs","names":[],"sources":["../src/renderAndSee.ts"],"sourcesContent":["import type {\n IAutoMovieRenderAndSeeRequest,\n IAutoMovieRenderAndSeeResult,\n} from \"@automovie/interface\";\n\nimport { renderVideo } from \"./renderVideo.js\";\n\n/**\n * Render a clip and return the encoded output plus explicit frame artifacts. The function still performs only deterministic orchestration over injected host I/O; its value is the metadata contract that lets an agent inspect what was captured without guessing paths or sample times.\n *\n * @evidence contracts/development/implementation.md#principled-implementation The wrapper executes renderVideo with the supplied spec and seconds, then attaches the requested duration and a shallow spec copy; nested spec objects remain shared with the caller.\n * @evidence contracts/development/implementation.md#clear-and-simple-structure Clip execution stays in renderVideo while this entry owns the inspectable artifact envelope used by a host or agent.\n * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The wrapper neither invents capture paths nor suppresses adapter errors, and the returned frames are those the delegated capture loop received.\n * @evidence contracts/development/common.md#meaningful-documentation Request members identify seconds, output paths and adapter ownership; the result documents the spec snapshot, whose nested values callers must keep stable while rendering.\n * @evidence contracts/development/implementation.md#efficient-algorithms Beyond the delegated O(F) frame capture and metadata work, the wrapper performs a constant-size shallow spec copy and object merge.\n * @evidence contracts/development/implementation.md#reuse-equivalent-work This wrapper performs one effectful render per invocation; the returned artifact can be retained by its caller but an equal spec does not authorize sharing host I/O.\n * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned artifact owns its metadata arrays while host adapters own written files and running work; failures propagate from renderVideo without acquiring additional resources.\n */\nexport const renderAndSee: (\n request: IAutoMovieRenderAndSeeRequest,\n) => Promise<IAutoMovieRenderAndSeeResult> = async (\n request: IAutoMovieRenderAndSeeRequest,\n): Promise<IAutoMovieRenderAndSeeResult> => ({\n spec: { ...request.spec },\n durationSeconds: request.durationSeconds,\n ...(await renderVideo(\n request.spec,\n request.durationSeconds,\n request.frameDir,\n request.outputPath,\n request.adapters,\n )),\n});\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAa,eAEgC,OAC3C,aAC2C;CAC3C,MAAM,EAAE,GAAG,QAAQ,KAAK;CACxB,iBAAiB,QAAQ;CACzB,GAAI,MAAM,YACR,QAAQ,MACR,QAAQ,iBACR,QAAQ,UACR,QAAQ,YACR,QAAQ,QACV;AACF"}
@@ -1,41 +1 @@
1
- import { IAutoMovieRenderInventory, IAutoMovieRenderReport, IAutoMovieRenderTarget, IAutoMovieSemanticMask } from "@automovie/interface";
2
- /**
3
- * One caller-supplied shot's measured inventory and explicit budget assessment, without proving an actual draw or automatic render-job gate.
4
- *
5
- * @evidence contracts/development/design.md#principled-representation A shot assessment distinguishes not-run from a report's incomplete status and uses nullable inventory, mask and target fields when no renderer was identified.
6
- * @evidence contracts/development/design.md#minimal-and-owned-surface This record keeps measurement, attribution and sealed target together for one compiled shot's budget decision.
7
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Absent graphics identity is represented by not-run and a reason, not a fabricated renderer or empty passing report.
8
- * @evidence contracts/development/common.md#meaningful-documentation Members explain nullable state, the not-run versus incomplete distinction and how semantic owners resolve through the mask.
9
- */
10
- export interface IAutoMovieRenderBudgetAssessment {
11
- /**
12
- * Compiled shot the measurement belongs to.
13
- */
14
- shot: string;
15
- /**
16
- * The verdict, including the two that are not a pass.
17
- *
18
- * `not-run` is this record's own: no report exists because no renderer identity was supplied. A report's `incomplete` retains its measured findings while one or more analyses have unresolved inputs or bounds; neither state is clearance.
19
- */
20
- status: IAutoMovieRenderReport["status"] | "not-run";
21
- /**
22
- * Why no report exists, or `null` when one does.
23
- */
24
- reason: string | null;
25
- /**
26
- * The bounded verdict, or `null` when the assessment did not run.
27
- */
28
- report: IAutoMovieRenderReport | null;
29
- /**
30
- * The measured cost, or `null` when the assessment did not run.
31
- */
32
- inventory: IAutoMovieRenderInventory | null;
33
- /**
34
- * The palette the report's owners resolve in, or `null` as above.
35
- */
36
- mask: IAutoMovieSemanticMask | null;
37
- /**
38
- * The sealed target, or `null` when the renderer was never identified.
39
- */
40
- target: IAutoMovieRenderTarget | null;
41
- }
1
+ export type { IAutoMovieRenderBudgetAssessment } from "@automovie/interface";