automovie 0.3.4 → 0.4.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 (331) hide show
  1. package/README.md +40 -139
  2. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.d.ts +5 -2
  3. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js +6 -2
  4. package/lib/AUTOMOVIE_CAPTURE_OPTIONS.js.map +1 -1
  5. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.d.ts +3 -1
  6. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js +3 -1
  7. package/lib/AUTOMOVIE_DEFAULT_PROJECT_NAME.js.map +1 -1
  8. package/lib/AUTOMOVIE_INSPECT_OPTIONS.d.ts +5 -2
  9. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js +5 -2
  10. package/lib/AUTOMOVIE_INSPECT_OPTIONS.js.map +1 -1
  11. package/lib/AUTOMOVIE_RENDER_OPTIONS.d.ts +6 -2
  12. package/lib/AUTOMOVIE_RENDER_OPTIONS.js +8 -2
  13. package/lib/AUTOMOVIE_RENDER_OPTIONS.js.map +1 -1
  14. package/lib/AUTOMOVIE_REVIEW_OPTIONS.d.ts +3 -1
  15. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js +12 -1
  16. package/lib/AUTOMOVIE_REVIEW_OPTIONS.js.map +1 -1
  17. package/lib/AutoMovieCaptureBackend.d.ts +4 -6
  18. package/lib/AutoMovieCaptureHost.d.ts +73 -53
  19. package/lib/AutoMovieCaptureHost.js +89 -56
  20. package/lib/AutoMovieCaptureHost.js.map +1 -1
  21. package/lib/AutoMovieCommand.d.ts +69 -20
  22. package/lib/AutoMovieFfmpegStaticPath.d.ts +6 -0
  23. package/lib/AutoMovieFfmpegStaticPath.js +3 -0
  24. package/lib/AutoMovieFfmpegStaticPath.js.map +1 -0
  25. package/lib/AutoMovieMp4Boxes.d.ts +78 -0
  26. package/lib/AutoMovieMp4Boxes.js +227 -0
  27. package/lib/AutoMovieMp4Boxes.js.map +1 -0
  28. package/lib/AutoMovieRenderOutputReservation.d.ts +18 -0
  29. package/lib/AutoMovieRenderOutputReservation.js +118 -0
  30. package/lib/AutoMovieRenderOutputReservation.js.map +1 -0
  31. package/lib/IAutoMovieChromium.d.ts +13 -57
  32. package/lib/IAutoMovieDeliveryAudioTrack.d.ts +17 -0
  33. package/lib/IAutoMovieDeliveryAudioTrack.js +3 -0
  34. package/lib/IAutoMovieDeliveryAudioTrack.js.map +1 -0
  35. package/lib/IAutoMovieDeliveryProfileFinding.d.ts +21 -0
  36. package/lib/IAutoMovieDeliveryProfileFinding.js +3 -0
  37. package/lib/IAutoMovieDeliveryProfileFinding.js.map +1 -0
  38. package/lib/IAutoMovieFfmpegSources.d.ts +11 -0
  39. package/lib/IAutoMovieFfmpegSources.js +3 -0
  40. package/lib/IAutoMovieFfmpegSources.js.map +1 -0
  41. package/lib/IAutoMovieReviewObservation.d.ts +66 -0
  42. package/lib/IAutoMovieReviewObservation.js +3 -0
  43. package/lib/IAutoMovieReviewObservation.js.map +1 -0
  44. package/lib/IAutoMovieVerification.d.ts +163 -0
  45. package/lib/IAutoMovieVerification.js +3 -0
  46. package/lib/IAutoMovieVerification.js.map +1 -0
  47. package/lib/auditAutoMovieAlphaSamples.d.ts +23 -0
  48. package/lib/auditAutoMovieAlphaSamples.js +183 -0
  49. package/lib/auditAutoMovieAlphaSamples.js.map +1 -0
  50. package/lib/auditAutoMovieDeliveryProfile.d.ts +33 -0
  51. package/lib/auditAutoMovieDeliveryProfile.js +93 -0
  52. package/lib/auditAutoMovieDeliveryProfile.js.map +1 -0
  53. package/lib/captureAutoMovie.d.ts +23 -11
  54. package/lib/captureAutoMovie.js +102 -18
  55. package/lib/captureAutoMovie.js.map +1 -1
  56. package/lib/createAutoMovieDeliveryAudioLog.d.ts +31 -0
  57. package/lib/createAutoMovieDeliveryAudioLog.js +110 -0
  58. package/lib/createAutoMovieDeliveryAudioLog.js.map +1 -0
  59. package/lib/createAutoMovieDeliveryAudioScan.d.ts +39 -0
  60. package/lib/createAutoMovieDeliveryAudioScan.js +125 -0
  61. package/lib/createAutoMovieDeliveryAudioScan.js.map +1 -0
  62. package/lib/createAutoMovieVerificationInputScope.d.ts +19 -0
  63. package/lib/createAutoMovieVerificationInputScope.js +147 -0
  64. package/lib/createAutoMovieVerificationInputScope.js.map +1 -0
  65. package/lib/createAutoMovieVerificationMediaHash.d.ts +5 -0
  66. package/lib/createAutoMovieVerificationMediaHash.js +61 -0
  67. package/lib/createAutoMovieVerificationMediaHash.js.map +1 -0
  68. package/lib/decodeAutoMovieDeliveryAudio.d.ts +24 -0
  69. package/lib/decodeAutoMovieDeliveryAudio.js +77 -0
  70. package/lib/decodeAutoMovieDeliveryAudio.js.map +1 -0
  71. package/lib/deriveAutoMovieProjectName.d.ts +14 -11
  72. package/lib/deriveAutoMovieProjectName.js +14 -11
  73. package/lib/deriveAutoMovieProjectName.js.map +1 -1
  74. package/lib/findAutoMovieFreePort.d.ts +5 -10
  75. package/lib/findAutoMovieFreePort.js +5 -10
  76. package/lib/findAutoMovieFreePort.js.map +1 -1
  77. package/lib/formatAutoMovieInspectUrl.d.ts +6 -10
  78. package/lib/formatAutoMovieInspectUrl.js +6 -10
  79. package/lib/formatAutoMovieInspectUrl.js.map +1 -1
  80. package/lib/hashAutoMovieFile.d.ts +5 -0
  81. package/lib/hashAutoMovieFile.js +16 -0
  82. package/lib/hashAutoMovieFile.js.map +1 -0
  83. package/lib/importAutoMovieVerificationEntry.d.mts +2 -0
  84. package/lib/importAutoMovieVerificationEntry.mjs +6 -0
  85. package/lib/importAutoMovieVerificationEntry.mjs.map +1 -0
  86. package/lib/index.d.ts +9 -0
  87. package/lib/index.js +9 -0
  88. package/lib/index.js.map +1 -1
  89. package/lib/inspectAutoMovie.d.ts +15 -9
  90. package/lib/inspectAutoMovie.js +25 -9
  91. package/lib/inspectAutoMovie.js.map +1 -1
  92. package/lib/inspectAutoMovieVerificationCapture.d.ts +15 -0
  93. package/lib/inspectAutoMovieVerificationCapture.js +221 -0
  94. package/lib/inspectAutoMovieVerificationCapture.js.map +1 -0
  95. package/lib/inspectAutoMovieVerificationDelivery.d.ts +13 -0
  96. package/lib/inspectAutoMovieVerificationDelivery.js +247 -0
  97. package/lib/inspectAutoMovieVerificationDelivery.js.map +1 -0
  98. package/lib/inspectAutoMovieVerificationReview.d.ts +11 -0
  99. package/lib/inspectAutoMovieVerificationReview.js +141 -0
  100. package/lib/inspectAutoMovieVerificationReview.js.map +1 -0
  101. package/lib/launchAutoMovieChromium.d.ts +9 -11
  102. package/lib/launchAutoMovieChromium.js +10 -11
  103. package/lib/launchAutoMovieChromium.js.map +1 -1
  104. package/lib/listAutoMovieReleaseFindings.d.ts +9 -0
  105. package/lib/listAutoMovieReleaseFindings.js +58 -0
  106. package/lib/listAutoMovieReleaseFindings.js.map +1 -0
  107. package/lib/loadAutoMovieProductionModule.d.ts +11 -10
  108. package/lib/loadAutoMovieProductionModule.js +18 -10
  109. package/lib/loadAutoMovieProductionModule.js.map +1 -1
  110. package/lib/loadAutoMovieVerificationModule.d.ts +6 -0
  111. package/lib/loadAutoMovieVerificationModule.js +246 -0
  112. package/lib/loadAutoMovieVerificationModule.js.map +1 -0
  113. package/lib/planAutoMovieChromiumLaunch.d.ts +7 -13
  114. package/lib/planAutoMovieChromiumLaunch.js +7 -13
  115. package/lib/planAutoMovieChromiumLaunch.js.map +1 -1
  116. package/lib/planAutoMovieDeliveryAudioDecode.d.ts +10 -0
  117. package/lib/planAutoMovieDeliveryAudioDecode.js +29 -0
  118. package/lib/planAutoMovieDeliveryAudioDecode.js.map +1 -0
  119. package/lib/planAutoMovieDeliveryDecode.d.ts +19 -0
  120. package/lib/planAutoMovieDeliveryDecode.js +57 -0
  121. package/lib/planAutoMovieDeliveryDecode.js.map +1 -0
  122. package/lib/planAutoMovieDeliveryInput.d.ts +11 -0
  123. package/lib/planAutoMovieDeliveryInput.js +26 -0
  124. package/lib/planAutoMovieDeliveryInput.js.map +1 -0
  125. package/lib/planAutoMovieModulePageViteConfig.d.ts +13 -10
  126. package/lib/planAutoMovieModulePageViteConfig.js +13 -10
  127. package/lib/planAutoMovieModulePageViteConfig.js.map +1 -1
  128. package/lib/promptAutoMovieProjectName.d.ts +6 -10
  129. package/lib/promptAutoMovieProjectName.js +6 -10
  130. package/lib/promptAutoMovieProjectName.js.map +1 -1
  131. package/lib/publishAutoMovieRenderAttempt.d.ts +32 -0
  132. package/lib/publishAutoMovieRenderAttempt.js +91 -0
  133. package/lib/publishAutoMovieRenderAttempt.js.map +1 -0
  134. package/lib/readAutoMovieAddArguments.d.ts +10 -11
  135. package/lib/readAutoMovieAddArguments.js +10 -11
  136. package/lib/readAutoMovieAddArguments.js.map +1 -1
  137. package/lib/readAutoMovieCaptureHostOptions.d.ts +19 -17
  138. package/lib/readAutoMovieCaptureHostOptions.js +16 -17
  139. package/lib/readAutoMovieCaptureHostOptions.js.map +1 -1
  140. package/lib/readAutoMovieCommandArguments.d.ts +6 -9
  141. package/lib/readAutoMovieCommandArguments.js +9 -10
  142. package/lib/readAutoMovieCommandArguments.js.map +1 -1
  143. package/lib/readAutoMovieCreateArguments.d.ts +7 -11
  144. package/lib/readAutoMovieCreateArguments.js +7 -11
  145. package/lib/readAutoMovieCreateArguments.js.map +1 -1
  146. package/lib/readAutoMovieDeliveryAudioTrack.d.ts +21 -0
  147. package/lib/readAutoMovieDeliveryAudioTrack.js +104 -0
  148. package/lib/readAutoMovieDeliveryAudioTrack.js.map +1 -0
  149. package/lib/readAutoMovieDeliveryDecode.d.ts +19 -0
  150. package/lib/readAutoMovieDeliveryDecode.js +209 -0
  151. package/lib/readAutoMovieDeliveryDecode.js.map +1 -0
  152. package/lib/readAutoMovieDeliveryProbe.d.ts +35 -0
  153. package/lib/readAutoMovieDeliveryProbe.js +363 -0
  154. package/lib/readAutoMovieDeliveryProbe.js.map +1 -0
  155. package/lib/readAutoMovieErrorCode.d.ts +9 -0
  156. package/lib/readAutoMovieErrorCode.js +18 -0
  157. package/lib/readAutoMovieErrorCode.js.map +1 -0
  158. package/lib/readAutoMovieInspectHostOptions.d.ts +15 -16
  159. package/lib/readAutoMovieInspectHostOptions.js +11 -15
  160. package/lib/readAutoMovieInspectHostOptions.js.map +1 -1
  161. package/lib/readAutoMovieNameOption.d.ts +4 -10
  162. package/lib/readAutoMovieNameOption.js +4 -10
  163. package/lib/readAutoMovieNameOption.js.map +1 -1
  164. package/lib/readAutoMoviePageTimeout.d.ts +13 -0
  165. package/lib/readAutoMoviePageTimeout.js +21 -0
  166. package/lib/readAutoMoviePageTimeout.js.map +1 -0
  167. package/lib/readAutoMovieRenderOptions.d.ts +24 -16
  168. package/lib/readAutoMovieRenderOptions.js +23 -16
  169. package/lib/readAutoMovieRenderOptions.js.map +1 -1
  170. package/lib/readAutoMovieReviewObservation.d.ts +6 -0
  171. package/lib/readAutoMovieReviewObservation.js +108 -0
  172. package/lib/readAutoMovieReviewObservation.js.map +1 -0
  173. package/lib/readAutoMovieReviewOptions.d.ts +32 -24
  174. package/lib/readAutoMovieReviewOptions.js +82 -18
  175. package/lib/readAutoMovieReviewOptions.js.map +1 -1
  176. package/lib/readAutoMovieRevision.d.ts +3 -9
  177. package/lib/readAutoMovieRevision.js +3 -9
  178. package/lib/readAutoMovieRevision.js.map +1 -1
  179. package/lib/readAutoMovieVerifyOptions.d.ts +17 -0
  180. package/lib/readAutoMovieVerifyOptions.js +45 -0
  181. package/lib/readAutoMovieVerifyOptions.js.map +1 -0
  182. package/lib/readAutoMovieVideoProbe.d.ts +6 -10
  183. package/lib/readAutoMovieVideoProbe.js +20 -13
  184. package/lib/readAutoMovieVideoProbe.js.map +1 -1
  185. package/lib/recordAutoMoviePlayback.d.ts +18 -11
  186. package/lib/recordAutoMoviePlayback.js +26 -13
  187. package/lib/recordAutoMoviePlayback.js.map +1 -1
  188. package/lib/renderAutoMovie.d.ts +16 -10
  189. package/lib/renderAutoMovie.js +31 -14
  190. package/lib/renderAutoMovie.js.map +1 -1
  191. package/lib/renderAutoMovieScaffoldNextSteps.d.ts +10 -10
  192. package/lib/renderAutoMovieScaffoldNextSteps.js +10 -10
  193. package/lib/renderAutoMovieVideo.d.ts +53 -15
  194. package/lib/renderAutoMovieVideo.js +290 -45
  195. package/lib/renderAutoMovieVideo.js.map +1 -1
  196. package/lib/resolveAutoMovieFfmpeg.d.ts +12 -15
  197. package/lib/resolveAutoMovieFfmpeg.js +12 -17
  198. package/lib/resolveAutoMovieFfmpeg.js.map +1 -1
  199. package/lib/reviewAutoMovie.d.ts +10 -10
  200. package/lib/reviewAutoMovie.js +15 -10
  201. package/lib/reviewAutoMovie.js.map +1 -1
  202. package/lib/reviewAutoMovieFile.d.ts +21 -0
  203. package/lib/reviewAutoMovieFile.js +378 -0
  204. package/lib/reviewAutoMovieFile.js.map +1 -0
  205. package/lib/run.d.ts +32 -18
  206. package/lib/run.js +67 -23
  207. package/lib/run.js.map +1 -1
  208. package/lib/runAutoMovieDeliveryAudioDecode.d.ts +18 -0
  209. package/lib/runAutoMovieDeliveryAudioDecode.js +28 -0
  210. package/lib/runAutoMovieDeliveryAudioDecode.js.map +1 -0
  211. package/lib/runAutoMovieDeliveryDecode.d.ts +19 -0
  212. package/lib/runAutoMovieDeliveryDecode.js +42 -0
  213. package/lib/runAutoMovieDeliveryDecode.js.map +1 -0
  214. package/lib/runAutoMovieDeliveryReferenceDecode.d.ts +28 -0
  215. package/lib/runAutoMovieDeliveryReferenceDecode.js +77 -0
  216. package/lib/runAutoMovieDeliveryReferenceDecode.js.map +1 -0
  217. package/lib/runAutoMovieDeliverySourceAudioDecode.d.ts +20 -0
  218. package/lib/runAutoMovieDeliverySourceAudioDecode.js +56 -0
  219. package/lib/runAutoMovieDeliverySourceAudioDecode.js.map +1 -0
  220. package/lib/runAutoMovieFfmpeg.d.ts +15 -10
  221. package/lib/runAutoMovieFfmpeg.js +36 -13
  222. package/lib/runAutoMovieFfmpeg.js.map +1 -1
  223. package/lib/runAutoMovieVerification.d.ts +28 -0
  224. package/lib/runAutoMovieVerification.js +393 -0
  225. package/lib/runAutoMovieVerification.js.map +1 -0
  226. package/lib/sameAutoMovieReviewFile.d.ts +2 -0
  227. package/lib/sameAutoMovieReviewFile.js +57 -0
  228. package/lib/sameAutoMovieReviewFile.js.map +1 -0
  229. package/lib/selectAutoMovieProjectName.d.ts +8 -11
  230. package/lib/selectAutoMovieProjectName.js +8 -11
  231. package/lib/selectAutoMovieProjectName.js.map +1 -1
  232. package/lib/serveAutoMovieDrawPage.d.ts +14 -11
  233. package/lib/serveAutoMovieDrawPage.js +14 -11
  234. package/lib/serveAutoMovieDrawPage.js.map +1 -1
  235. package/lib/serveAutoMovieInspectorPage.d.ts +4 -8
  236. package/lib/serveAutoMovieInspectorPage.js +3 -9
  237. package/lib/serveAutoMovieInspectorPage.js.map +1 -1
  238. package/lib/verifyAutoMovie.d.ts +19 -0
  239. package/lib/verifyAutoMovie.js +44 -0
  240. package/lib/verifyAutoMovie.js.map +1 -0
  241. package/lib/writeAutoMovieModulePage.d.ts +17 -12
  242. package/lib/writeAutoMovieModulePage.js +13 -11
  243. package/lib/writeAutoMovieModulePage.js.map +1 -1
  244. package/lib/writeAutoMovieVerificationReceipt.d.ts +2 -0
  245. package/lib/writeAutoMovieVerificationReceipt.js +75 -0
  246. package/lib/writeAutoMovieVerificationReceipt.js.map +1 -0
  247. package/package.json +8 -8
  248. package/src/AUTOMOVIE_CAPTURE_OPTIONS.ts +6 -2
  249. package/src/AUTOMOVIE_DEFAULT_PROJECT_NAME.ts +3 -1
  250. package/src/AUTOMOVIE_INSPECT_OPTIONS.ts +5 -2
  251. package/src/AUTOMOVIE_RENDER_OPTIONS.ts +8 -2
  252. package/src/AUTOMOVIE_REVIEW_OPTIONS.ts +12 -1
  253. package/src/AutoMovieCaptureBackend.ts +4 -6
  254. package/src/AutoMovieCaptureHost.ts +122 -68
  255. package/src/AutoMovieCommand.ts +71 -20
  256. package/src/AutoMovieFfmpegStaticPath.ts +7 -0
  257. package/src/AutoMovieMp4Boxes.ts +263 -0
  258. package/src/AutoMovieRenderOutputReservation.ts +97 -0
  259. package/src/IAutoMovieChromium.ts +13 -57
  260. package/src/IAutoMovieDeliveryAudioTrack.ts +19 -0
  261. package/src/IAutoMovieDeliveryProfileFinding.ts +24 -0
  262. package/src/IAutoMovieFfmpegSources.ts +13 -0
  263. package/src/IAutoMovieReviewObservation.ts +59 -0
  264. package/src/IAutoMovieVerification.ts +207 -0
  265. package/src/auditAutoMovieAlphaSamples.ts +201 -0
  266. package/src/auditAutoMovieDeliveryProfile.ts +125 -0
  267. package/src/captureAutoMovie.ts +137 -28
  268. package/src/createAutoMovieDeliveryAudioLog.ts +141 -0
  269. package/src/createAutoMovieDeliveryAudioScan.ts +150 -0
  270. package/src/createAutoMovieVerificationInputScope.ts +156 -0
  271. package/src/createAutoMovieVerificationMediaHash.ts +32 -0
  272. package/src/decodeAutoMovieDeliveryAudio.ts +95 -0
  273. package/src/deriveAutoMovieProjectName.ts +14 -11
  274. package/src/findAutoMovieFreePort.ts +5 -10
  275. package/src/formatAutoMovieInspectUrl.ts +6 -10
  276. package/src/hashAutoMovieFile.ts +12 -0
  277. package/src/importAutoMovieVerificationEntry.mts +6 -0
  278. package/src/index.ts +9 -0
  279. package/src/inspectAutoMovie.ts +28 -11
  280. package/src/inspectAutoMovieVerificationCapture.ts +292 -0
  281. package/src/inspectAutoMovieVerificationDelivery.ts +301 -0
  282. package/src/inspectAutoMovieVerificationReview.ts +130 -0
  283. package/src/launchAutoMovieChromium.ts +14 -12
  284. package/src/listAutoMovieReleaseFindings.ts +87 -0
  285. package/src/loadAutoMovieProductionModule.ts +22 -15
  286. package/src/loadAutoMovieVerificationModule.ts +278 -0
  287. package/src/planAutoMovieChromiumLaunch.ts +7 -13
  288. package/src/planAutoMovieDeliveryAudioDecode.ts +26 -0
  289. package/src/planAutoMovieDeliveryDecode.ts +66 -0
  290. package/src/planAutoMovieDeliveryInput.ts +25 -0
  291. package/src/planAutoMovieModulePageViteConfig.ts +13 -10
  292. package/src/promptAutoMovieProjectName.ts +6 -10
  293. package/src/publishAutoMovieRenderAttempt.ts +89 -0
  294. package/src/readAutoMovieAddArguments.ts +10 -11
  295. package/src/readAutoMovieCaptureHostOptions.ts +22 -17
  296. package/src/readAutoMovieCommandArguments.ts +8 -10
  297. package/src/readAutoMovieCreateArguments.ts +7 -11
  298. package/src/readAutoMovieDeliveryAudioTrack.ts +137 -0
  299. package/src/readAutoMovieDeliveryDecode.ts +269 -0
  300. package/src/readAutoMovieDeliveryProbe.ts +499 -0
  301. package/src/readAutoMovieErrorCode.ts +13 -0
  302. package/src/readAutoMovieInspectHostOptions.ts +15 -16
  303. package/src/readAutoMovieNameOption.ts +4 -10
  304. package/src/readAutoMoviePageTimeout.ts +19 -0
  305. package/src/readAutoMovieRenderOptions.ts +34 -16
  306. package/src/readAutoMovieReviewObservation.ts +146 -0
  307. package/src/readAutoMovieReviewOptions.ts +133 -28
  308. package/src/readAutoMovieRevision.ts +3 -9
  309. package/src/readAutoMovieVerifyOptions.ts +50 -0
  310. package/src/readAutoMovieVideoProbe.ts +24 -13
  311. package/src/recordAutoMoviePlayback.ts +26 -13
  312. package/src/renderAutoMovie.ts +38 -17
  313. package/src/renderAutoMovieScaffoldNextSteps.ts +10 -10
  314. package/src/renderAutoMovieVideo.ts +474 -85
  315. package/src/resolveAutoMovieFfmpeg.ts +17 -24
  316. package/src/reviewAutoMovie.ts +21 -16
  317. package/src/reviewAutoMovieFile.ts +479 -0
  318. package/src/run.ts +75 -25
  319. package/src/runAutoMovieDeliveryAudioDecode.ts +45 -0
  320. package/src/runAutoMovieDeliveryDecode.ts +63 -0
  321. package/src/runAutoMovieDeliveryReferenceDecode.ts +107 -0
  322. package/src/runAutoMovieDeliverySourceAudioDecode.ts +71 -0
  323. package/src/runAutoMovieFfmpeg.ts +48 -14
  324. package/src/runAutoMovieVerification.ts +487 -0
  325. package/src/sameAutoMovieReviewFile.ts +23 -0
  326. package/src/selectAutoMovieProjectName.ts +8 -11
  327. package/src/serveAutoMovieDrawPage.ts +16 -12
  328. package/src/serveAutoMovieInspectorPage.ts +6 -9
  329. package/src/verifyAutoMovie.ts +67 -0
  330. package/src/writeAutoMovieModulePage.ts +17 -12
  331. package/src/writeAutoMovieVerificationReceipt.ts +51 -0
package/lib/run.js CHANGED
@@ -47,6 +47,7 @@ const renderAutoMovie_1 = require("./renderAutoMovie");
47
47
  const renderAutoMovieScaffoldNextSteps_1 = require("./renderAutoMovieScaffoldNextSteps");
48
48
  const reviewAutoMovie_1 = require("./reviewAutoMovie");
49
49
  const selectAutoMovieProjectName_1 = require("./selectAutoMovieProjectName");
50
+ const verifyAutoMovie_1 = require("./verifyAutoMovie");
50
51
  const USAGE = `automovie: scaffold an automovie project, and capture, render and review it
51
52
 
52
53
  Usage:
@@ -55,8 +56,11 @@ Usage:
55
56
  automovie capture --module <file> [--props <json>] [--backend software|gpu] [--out <dir>] [<request>]
56
57
  automovie capture --file <video> [--out <dir>] [<request>]
57
58
  automovie inspect --module <file> [--props <json>] [--port <n>] [<request>]
59
+ automovie verify [--module <file>] [--subject <id>] [--only <check>] [--run] [--require <stage>] [--json]
58
60
  automovie render --module <file> [--subject <name>] [--props <json>] [--out <dir>] [--backend software|gpu]
59
61
  automovie review --url <inspector address> --seconds <s> [--out <dir>]
62
+ automovie review --file <video> (--at <s> | --from <s> --to <s>) --note <text> [--out <dir>]
63
+ automovie review --mark <review.json> [--file <video>] [--out <dir>]
60
64
 
61
65
  Commands:
62
66
  create A single production, or with --workspace a pnpm workspace
@@ -71,6 +75,8 @@ Commands:
71
75
  subjects a module offers and print its address, whose query
72
76
  is the request. Needs @automovie/render, @automovie/viewer,
73
77
  react, react-dom and vite there; Ctrl+C stops it.
78
+ verify Read selected production observations or run their declared
79
+ checks. --require gates an adopted stage.
74
80
  render In a production, draw every frame of one subject through the
75
81
  draw page in headless Chromium and encode film.mp4 with
76
82
  render-report.json. Needs what capture needs, and FFmpeg.
@@ -90,11 +96,18 @@ Options:
90
96
  called with; default null.
91
97
  --file capture: an encoded video file instead of a subject.
92
98
  --backend capture, render: software (SwiftShader, the default) or gpu.
99
+ --timeout-ms capture, render: budget per browser navigation, subject
100
+ preparation or draw call (default 120000 ms).
93
101
  --out capture: the folder; default media/capture/<subject>.
94
102
  render: default media/automovie/<subject>/videos.
95
103
  review: default media/automovie/review.
96
104
  --url review: the running inspector page's address.
97
- --seconds review: wall-clock seconds of playback recorded.
105
+ --seconds review: wall-clock seconds of Inspector playback recorded.
106
+ --at review: point in film seconds, or select --from and --to.
107
+ --mark review: reopen exact source bytes or rebind with --file and a new time.
108
+ --reviewer review: with --decision accepted|needs-repair and --viewed still|playback|listening,
109
+ explicitly record the named reviewer's decision. Use --at for a still,
110
+ or --from and --to for playback or listening.
98
111
  <request> capture, inspect: --subject, --at, --from, --to, --rate, --events,
99
112
  --views, --passes, --marks, --label, --round, --compare and
100
113
  every other key of the capture request grammar; render takes
@@ -103,30 +116,44 @@ Options:
103
116
  -v, --version Print the version as a standalone request.
104
117
  `;
105
118
  /**
106
- * The `automovie` CLI entry. `argv` is the full process vector; its first two positions (executable and script) are skipped.
119
+ * The `automovie` CLI entry. `argv` is the full process vector; its first two
120
+ * positions (executable and script) are skipped.
107
121
  *
108
- * - `help` and `version` write to stdout; the version is read from this package's `package.json`.
109
- * - `create` writes a single production, or with `--workspace` a workspace root, into the directory resolved against the working directory. The name is the typed `--name`, else derived from the target's basename; for the working directory itself the terminal is asked, offering `automovie-examples`, which is used without asking when no terminal is attached.
110
- * - `add` fills missing scaffold catalog entries in the working directory's `pnpm-workspace.yaml` and writes a production into `movies/<family>/<directory>`. Its name is `--name` or the npm-safe name derived from the directory segment.
111
- * - `capture` runs `captureAutoMovie` in the working directory as the production, resolving to its status: 1 when a cell was not drawn.
112
- * - `inspect` runs `inspectAutoMovie` in the working directory, serving the inspector page until the process is interrupted.
113
- * - `render` runs `renderAutoMovie` in the working directory as the production, resolving to 0 once the video is written.
114
- * - `review` runs `reviewAutoMovie`, resolving to 1 when the recorded page reported a script error.
122
+ * - `help` and `version` write to stdout; the version is read from this package's
123
+ * `package.json`.
124
+ * - `create` writes a single production, or with `--workspace` a workspace root,
125
+ * into the directory resolved against the working directory. The name is the
126
+ * typed `--name`, else derived from the target's basename; for the working
127
+ * directory itself the terminal is asked, offering `automovie-examples`,
128
+ * which is used without asking when no terminal is attached.
129
+ * - `add` fills missing scaffold catalog entries in the working directory's
130
+ * `pnpm-workspace.yaml` and writes a production into
131
+ * `movies/<family>/<directory>`. Its name is `--name` or the npm-safe name
132
+ * derived from the directory segment.
133
+ * - `capture` runs `captureAutoMovie` in the working directory as the production,
134
+ * resolving to its status: 1 when a cell was not drawn.
135
+ * - `inspect` runs `inspectAutoMovie` in the working directory, serving the
136
+ * inspector page until the process is interrupted.
137
+ * - `render` runs `renderAutoMovie` in the working directory as the production,
138
+ * resolving to 0 once the video is written.
139
+ * - `review` runs `reviewAutoMovie`, resolving to 1 when the recorded page
140
+ * reported a script error.
115
141
  *
116
- * `create` and `add` take their files from `createAutoMovieScaffold` and refuse a non-empty target without `--force`, which writes over same-path files and keeps every other file. On success they list the written files relative to the target, then the next steps. A failed write stops there and leaves the files already written.
142
+ * `create` and `add` take their files from `createAutoMovieScaffold` and refuse
143
+ * a non-empty target without `--force`, which writes over same-path files and
144
+ * keeps every other file. On success they list the written files relative to
145
+ * the target, then the next steps. A failed write stops there and leaves the
146
+ * files already written.
117
147
  *
118
- * Resolves to the process exit code, 0 after queuing the requested stdout text or 1 after queuing a caught error's message and distinct `cause` objects' messages without stacks. A repeated cause ends the chain. Reading or stringifying an unusual thrown value, or writing stderr, can itself throw. The executable assigns the result to `process.exitCode` so queued output can drain.
148
+ * Resolves to the process exit code, 0 after queuing the requested stdout text
149
+ * or 1 after queuing a caught error's message and distinct `cause` objects'
150
+ * messages without stacks. A repeated cause ends the chain. Reading or
151
+ * stringifying an unusual thrown value, or writing stderr, can itself throw.
152
+ * The executable assigns the result to `process.exitCode` so queued output can
153
+ * drain.
119
154
  *
120
155
  * @param argv The full process vector.
121
156
  * @returns The exit code.
122
- *
123
- * @evidence contracts/development/implementation.md#principled-implementation Parsing finishes before the scaffold is created, the whole file map exists before the first write, and path.resolve binds every target to the current working directory. describeError follows distinct cause values with a set to terminate cycles, but assumes their message access and string conversion do not throw.
124
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This dispatcher delegates admission, name choice, the prompt and closing text to CLI owners and the file map to the template package, keeping only the write. Only bin.ts invokes it at module load, so importing run does not execute a request.
125
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts `add` checks only the working directory for `pnpm-workspace.yaml` and never searches ancestors. The catch reports failures without stacks and never retries a write or rolls back files.
126
- * @evidence contracts/development/common.md#meaningful-documentation The comment gives argv ownership, every command's effect, name and target choice, retained file effects, and the returned status.
127
- * @evidence contracts/development/implementation.md#efficient-algorithms For n files, creation reads the scaffold once and each file is written once with its directory ensured; listing scans the written paths once. Failure formatting additionally walks the distinct cause chain.
128
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Every command takes fresh filesystem observations and reads the installed scaffold anew.
129
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The file map and listing text scale with scaffold size; the cause set scales with chain length without a fixed cap. The prompt closes its terminal interface before returning. This dispatcher owns no descriptor; queued stdout and stderr bytes belong to the process streams.
130
157
  */
131
158
  async function run(argv) {
132
159
  try {
@@ -150,6 +177,12 @@ async function run(argv) {
150
177
  args: command.args,
151
178
  root: process.cwd(),
152
179
  });
180
+ if (command.command === "verify")
181
+ return await (0, verifyAutoMovie_1.verifyAutoMovie)({
182
+ args: command.args,
183
+ root: process.cwd(),
184
+ env: process.env,
185
+ });
153
186
  if (command.command === "render")
154
187
  return await (0, renderAutoMovie_1.renderAutoMovie)({
155
188
  args: command.args,
@@ -189,7 +222,9 @@ async function run(argv) {
189
222
  }
190
223
  }
191
224
  /**
192
- * Write one created installation into `directory`, then list the written files and the next steps. A non-empty directory is refused unless `force` is set, which writes over same-path files and keeps every other file.
225
+ * Write one created installation into `directory`, then list the written files
226
+ * and the next steps. A non-empty directory is refused unless `force` is set,
227
+ * which writes over same-path files and keeps every other file.
193
228
  */
194
229
  function write(directory, props, force, workspaceFile) {
195
230
  const files = (0, template_1.createAutoMovieScaffold)(props);
@@ -210,7 +245,10 @@ function write(directory, props, force, workspaceFile) {
210
245
  .join("\n") +
211
246
  (0, renderAutoMovieScaffoldNextSteps_1.renderAutoMovieScaffoldNextSteps)(directory, props.kind));
212
247
  }
213
- /** Replace an incomplete catalog atomically. A concurrent updater or editor leaves this invocation free to retry. */
248
+ /**
249
+ * Replace an incomplete catalog atomically. A concurrent updater or editor
250
+ * leaves this invocation free to retry.
251
+ */
214
252
  function completeCatalogs(file) {
215
253
  const target = fs.realpathSync(file);
216
254
  const source = fs.readFileSync(target, "utf8");
@@ -244,14 +282,20 @@ function completeCatalogs(file) {
244
282
  }
245
283
  }
246
284
  /**
247
- * This package's version, read at runtime from the sibling `package.json` (`require`, not an `import`, so it stays outside `rootDir`). `__dirname` resolves to `src` under ttsx and `lib` when published; the file sits one level up in both.
285
+ * This package's version, read at runtime from the sibling `package.json`
286
+ * (`require`, not an `import`, so it stays outside `rootDir`). `__dirname`
287
+ * resolves to `src` under ttsx and `lib` when published; the file sits one
288
+ * level up in both.
248
289
  */
249
290
  function packageVersion() {
250
291
  const manifest = require(path.join(__dirname, "..", "package.json"));
251
292
  return manifest.version;
252
293
  }
253
294
  /**
254
- * One stderr block: the error's message, then each distinct cause value's message on its own `caused by:` line. Values outside `Error` are stringified and end the chain. Repeated object identity or primitive value stops traversal; getters and string conversion can throw.
295
+ * One stderr block: the error's message, then each distinct cause value's
296
+ * message on its own `caused by:` line. Values outside `Error` are stringified
297
+ * and end the chain. Repeated object identity or primitive value stops
298
+ * traversal; getters and string conversion can throw.
255
299
  */
256
300
  function describeError(error) {
257
301
  const lines = [];
package/lib/run.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"run.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IACF,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,CAAC;AAQD;;;;;GAKG;AACH,SAAS,aAAa,CAAC,KAAc;IACnC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAiB,IAAI,GAAG,EAAE,CAAC;IACrC,IAAI,OAAO,GAAY,KAAK,CAAC;IAC7B,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE,CAAC;QAC5D,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,MAAM,OAAO,GACX,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,OAAO,EAAE,CAAC,CAAC;QACrE,OAAO,GAAG,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { IAutoMovieDeliveryContentAudit, IAutoMovieLoudnessMeter } from "@automovie/interface";
2
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
3
+ /**
4
+ * Audits audio from the same encoded artifact as the video decode. Uses
5
+ * streamed PCM for content, the decoder's native sample clock for coverage and
6
+ * the container's presented duration to separate codec padding.
7
+ *
8
+ * @param binary The FFmpeg executable already resolved by the delivery host.
9
+ * @param path The encoded artifact to decode without modification.
10
+ * @param streamIndex The primary audio stream observed in the input listing.
11
+ * @param thresholds The audio silence threshold and minimum duration.
12
+ * @param run The established FFmpeg process owner with separate output
13
+ * consumers.
14
+ * @param meter Creates the render's loudness meter, when the decoded loudness
15
+ * and true peak are measured.
16
+ * @returns Audio evidence or a reason decoded content is uncovered.
17
+ */
18
+ export declare function runAutoMovieDeliveryAudioDecode(binary: string, path: string, streamIndex: number, thresholds: IAutoMovieDeliveryContentAudit.IThresholds["silence"], run: typeof runAutoMovieFfmpeg, meter?: (channels: 1 | 2) => IAutoMovieLoudnessMeter): Promise<IAutoMovieDeliveryContentAudit.Stream>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAutoMovieDeliveryAudioDecode = runAutoMovieDeliveryAudioDecode;
4
+ const decodeAutoMovieDeliveryAudio_1 = require("./decodeAutoMovieDeliveryAudio");
5
+ const planAutoMovieDeliveryAudioDecode_1 = require("./planAutoMovieDeliveryAudioDecode");
6
+ const readAutoMovieDeliveryAudioTrack_1 = require("./readAutoMovieDeliveryAudioTrack");
7
+ /**
8
+ * Audits audio from the same encoded artifact as the video decode. Uses
9
+ * streamed PCM for content, the decoder's native sample clock for coverage and
10
+ * the container's presented duration to separate codec padding.
11
+ *
12
+ * @param binary The FFmpeg executable already resolved by the delivery host.
13
+ * @param path The encoded artifact to decode without modification.
14
+ * @param streamIndex The primary audio stream observed in the input listing.
15
+ * @param thresholds The audio silence threshold and minimum duration.
16
+ * @param run The established FFmpeg process owner with separate output
17
+ * consumers.
18
+ * @param meter Creates the render's loudness meter, when the decoded loudness
19
+ * and true peak are measured.
20
+ * @returns Audio evidence or a reason decoded content is uncovered.
21
+ */
22
+ async function runAutoMovieDeliveryAudioDecode(binary, path, streamIndex, thresholds, run, meter) {
23
+ const track = await (0, readAutoMovieDeliveryAudioTrack_1.readAutoMovieDeliveryAudioTrack)(path, streamIndex);
24
+ if (track.status === "uncovered")
25
+ return track;
26
+ return (0, decodeAutoMovieDeliveryAudio_1.decodeAutoMovieDeliveryAudio)(binary, (0, planAutoMovieDeliveryAudioDecode_1.planAutoMovieDeliveryAudioDecode)(path), streamIndex, thresholds, run, track, meter);
27
+ }
28
+ //# sourceMappingURL=runAutoMovieDeliveryAudioDecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAutoMovieDeliveryAudioDecode.js","sourceRoot":"","sources":["../src/runAutoMovieDeliveryAudioDecode.ts"],"names":[],"mappings":";;;AAKA,iFAA8E;AAC9E,yFAAsF;AACtF,uFAAoF;AAGpF;;;;;;;;;;;;;;GAcG;AACI,KAAK,0CACV,MAAc,EACd,IAAY,EACZ,WAAmB,EACnB,UAAiE,EACjE,GAA8B,EAC9B,KAAoD;IAEpD,MAAM,KAAK,GAAG,MAAM,IAAA,iEAA+B,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACvE,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,KAAK,CAAC;IAC/C,OAAO,IAAA,2DAA4B,EACjC,MAAM,EACN,IAAA,mEAAgC,EAAC,IAAI,CAAC,EACtC,WAAW,EACX,UAAU,EACV,GAAG,EACH,KAAK,EACL,KAAK,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { IAutoMovieDeliveryContentAudit, IAutoMovieLoudnessMeter } from "@automovie/interface";
2
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
3
+ type Audit = IAutoMovieDeliveryContentAudit.IProps;
4
+ /**
5
+ * Decodes one encoded delivery to obtain native timing and content evidence.
6
+ * The primary video decode also inventories the source. Audio is decoded only
7
+ * when the source lists a primary audio stream.
8
+ *
9
+ * @param binary The resolved FFmpeg executable.
10
+ * @param artifact The same delivery artifact whose bytes the host hashes.
11
+ * @param expected The commissioned frame count and rational frame rate.
12
+ * @param thresholds Effective video detector and silence thresholds.
13
+ * @param run Process owner with separate binary and text output channels.
14
+ * @param meter Creates the render's loudness meter, when the decoded audio's
15
+ * loudness and true peak are measured.
16
+ * @returns Native evidence, absence or reasoned uncovered status per stream.
17
+ */
18
+ export declare function runAutoMovieDeliveryDecode(binary: string, artifact: string, expected: Pick<Audit["expected"], "frameCount" | "frameRate">, thresholds: Audit["thresholds"], run?: typeof runAutoMovieFfmpeg, meter?: (channels: 1 | 2) => IAutoMovieLoudnessMeter): Promise<Audit["streams"]>;
19
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAutoMovieDeliveryDecode = runAutoMovieDeliveryDecode;
4
+ const planAutoMovieDeliveryDecode_1 = require("./planAutoMovieDeliveryDecode");
5
+ const readAutoMovieDeliveryDecode_1 = require("./readAutoMovieDeliveryDecode");
6
+ const runAutoMovieDeliveryAudioDecode_1 = require("./runAutoMovieDeliveryAudioDecode");
7
+ const runAutoMovieFfmpeg_1 = require("./runAutoMovieFfmpeg");
8
+ /**
9
+ * Decodes one encoded delivery to obtain native timing and content evidence.
10
+ * The primary video decode also inventories the source. Audio is decoded only
11
+ * when the source lists a primary audio stream.
12
+ *
13
+ * @param binary The resolved FFmpeg executable.
14
+ * @param artifact The same delivery artifact whose bytes the host hashes.
15
+ * @param expected The commissioned frame count and rational frame rate.
16
+ * @param thresholds Effective video detector and silence thresholds.
17
+ * @param run Process owner with separate binary and text output channels.
18
+ * @param meter Creates the render's loudness meter, when the decoded audio's
19
+ * loudness and true peak are measured.
20
+ * @returns Native evidence, absence or reasoned uncovered status per stream.
21
+ */
22
+ async function runAutoMovieDeliveryDecode(binary, artifact, expected, thresholds, run = runAutoMovieFfmpeg_1.runAutoMovieFfmpeg, meter) {
23
+ try {
24
+ const log = await run(binary, (0, planAutoMovieDeliveryDecode_1.planAutoMovieDeliveryDecode)(artifact, expected.frameRate, thresholds));
25
+ const decoded = (0, readAutoMovieDeliveryDecode_1.readAutoMovieDeliveryDecode)(log, expected);
26
+ const audio = decoded.audioIndex === undefined
27
+ ? decoded.audio
28
+ : await (0, runAutoMovieDeliveryAudioDecode_1.runAutoMovieDeliveryAudioDecode)(binary, artifact, decoded.audioIndex, thresholds.silence, run, meter);
29
+ return { video: decoded.video, audio };
30
+ }
31
+ catch (error) {
32
+ const reason = error instanceof Error ? error.message : String(error);
33
+ return {
34
+ video: { status: "uncovered", reason },
35
+ audio: {
36
+ status: "uncovered",
37
+ reason: "The delivery input stream listing was incomplete",
38
+ },
39
+ };
40
+ }
41
+ }
42
+ //# sourceMappingURL=runAutoMovieDeliveryDecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAutoMovieDeliveryDecode.js","sourceRoot":"","sources":["../src/runAutoMovieDeliveryDecode.ts"],"names":[],"mappings":";;;AAKA,+EAA4E;AAC5E,+EAA4E;AAC5E,uFAAoF;AACpF,6DAA0D;AAI1D;;;;;;;;;;;;;GAaG;AACI,KAAK,qCACV,MAAc,EACd,QAAgB,EAChB,QAA6D,EAC7D,UAA+B,EAC/B,GAAG,GAA8B,uCAAkB,EACnD,KAAoD;IAEpD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,GAAG,CACnB,MAAM,EACN,IAAA,yDAA2B,EAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CACtE,CAAC;QACF,MAAM,OAAO,GAAG,IAAA,yDAA2B,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC3D,MAAM,KAAK,GACT,OAAO,CAAC,UAAU,KAAK,SAAS;YAC9B,CAAC,CAAC,OAAO,CAAC,KAAK;YACf,CAAC,CAAC,MAAM,IAAA,iEAA+B,EACnC,MAAM,EACN,QAAQ,EACR,OAAO,CAAC,UAAU,EAClB,UAAU,CAAC,OAAO,EAClB,GAAG,EACH,KAAK,CACN,CAAC;QACR,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO;YACL,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;YACtC,KAAK,EAAE;gBACL,MAAM,EAAE,WAAW;gBACnB,MAAM,EAAE,kDAAkD;aAC3D;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { IAutoMovieDeliveryContentAudit } from "@automovie/interface";
2
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
3
+ type Audit = IAutoMovieDeliveryContentAudit.IProps;
4
+ type Stream = IAutoMovieDeliveryContentAudit.Stream;
5
+ /**
6
+ * Measures what the encoder was given, with the same detectors and thresholds
7
+ * as the delivered file: the drawn image sequence and the soundtrack as the
8
+ * encoder pads and cuts it. The audit attributes a delivered black, frozen or
9
+ * silent interval to the drawn source when this reference shows it too.
10
+ *
11
+ * Both inputs are read from the encoder's own argument vector, so the reference
12
+ * is exactly what produced the delivery: the first `-i` with the `-framerate`
13
+ * before it is the picture, a second `-i` is the soundtrack, and the last `-t`
14
+ * is the cut. Call it while the drawn frames still exist.
15
+ *
16
+ * @param binary The FFmpeg executable already resolved by the delivery host.
17
+ * @param encoder The argument vector the delivery encode ran with.
18
+ * @param expected The commissioned frame count and rational frame rate.
19
+ * @param thresholds The effective detector settings of the delivery audit.
20
+ * @param run The established FFmpeg process owner.
21
+ * @returns Reference evidence per medium: decoded, missing when the encoder had
22
+ * no soundtrack, or uncovered with its reason.
23
+ */
24
+ export declare function runAutoMovieDeliveryReferenceDecode(binary: string, encoder: readonly string[], expected: Pick<Audit["expected"], "frameCount" | "frameRate">, thresholds: Audit["thresholds"], run?: typeof runAutoMovieFfmpeg): Promise<{
25
+ video: Stream;
26
+ audio: Stream;
27
+ }>;
28
+ export {};
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAutoMovieDeliveryReferenceDecode = runAutoMovieDeliveryReferenceDecode;
4
+ const planAutoMovieDeliveryDecode_1 = require("./planAutoMovieDeliveryDecode");
5
+ const readAutoMovieDeliveryDecode_1 = require("./readAutoMovieDeliveryDecode");
6
+ const runAutoMovieDeliverySourceAudioDecode_1 = require("./runAutoMovieDeliverySourceAudioDecode");
7
+ const runAutoMovieFfmpeg_1 = require("./runAutoMovieFfmpeg");
8
+ /**
9
+ * Measures what the encoder was given, with the same detectors and thresholds
10
+ * as the delivered file: the drawn image sequence and the soundtrack as the
11
+ * encoder pads and cuts it. The audit attributes a delivered black, frozen or
12
+ * silent interval to the drawn source when this reference shows it too.
13
+ *
14
+ * Both inputs are read from the encoder's own argument vector, so the reference
15
+ * is exactly what produced the delivery: the first `-i` with the `-framerate`
16
+ * before it is the picture, a second `-i` is the soundtrack, and the last `-t`
17
+ * is the cut. Call it while the drawn frames still exist.
18
+ *
19
+ * @param binary The FFmpeg executable already resolved by the delivery host.
20
+ * @param encoder The argument vector the delivery encode ran with.
21
+ * @param expected The commissioned frame count and rational frame rate.
22
+ * @param thresholds The effective detector settings of the delivery audit.
23
+ * @param run The established FFmpeg process owner.
24
+ * @returns Reference evidence per medium: decoded, missing when the encoder had
25
+ * no soundtrack, or uncovered with its reason.
26
+ */
27
+ async function runAutoMovieDeliveryReferenceDecode(binary, encoder, expected, thresholds, run = runAutoMovieFfmpeg_1.runAutoMovieFfmpeg) {
28
+ const inputs = readEncoderInputs(encoder);
29
+ if (inputs === null) {
30
+ const reason = "The delivery encoder arguments name no picture input";
31
+ return {
32
+ video: { status: "uncovered", reason },
33
+ audio: { status: "uncovered", reason },
34
+ };
35
+ }
36
+ let video;
37
+ try {
38
+ const log = await run(binary, (0, planAutoMovieDeliveryDecode_1.planAutoMovieDeliveryDecode)(inputs.picture, expected.frameRate, thresholds, ["-framerate", inputs.frameRate]));
39
+ video = (0, readAutoMovieDeliveryDecode_1.readAutoMovieDeliveryDecode)(log, expected).video;
40
+ }
41
+ catch (error) {
42
+ video = {
43
+ status: "uncovered",
44
+ reason: error instanceof Error ? error.message : String(error),
45
+ };
46
+ }
47
+ const audio = inputs.soundtrack === null
48
+ ? { status: "missing" }
49
+ : inputs.seconds === null
50
+ ? {
51
+ status: "uncovered",
52
+ reason: "The delivery encoder arguments name no duration",
53
+ }
54
+ : await (0, runAutoMovieDeliverySourceAudioDecode_1.runAutoMovieDeliverySourceAudioDecode)(binary, inputs.soundtrack, inputs.seconds, thresholds.silence, run);
55
+ return { video, audio };
56
+ }
57
+ /**
58
+ * Reads the picture input, its frame rate, an optional soundtrack and the cut
59
+ * from an encoder vector.
60
+ */
61
+ function readEncoderInputs(encoder) {
62
+ const first = encoder.indexOf("-i");
63
+ const rate = encoder.lastIndexOf("-framerate", first);
64
+ const picture = encoder[first + 1];
65
+ const frameRate = encoder[rate + 1];
66
+ if (first < 0 || rate < 0 || picture === undefined || frameRate === undefined)
67
+ return null;
68
+ const second = encoder.indexOf("-i", first + 2);
69
+ const cut = encoder.lastIndexOf("-t");
70
+ return {
71
+ picture,
72
+ frameRate,
73
+ soundtrack: second < 0 ? null : (encoder[second + 1] ?? null),
74
+ seconds: cut < 0 ? null : (encoder[cut + 1] ?? null),
75
+ };
76
+ }
77
+ //# sourceMappingURL=runAutoMovieDeliveryReferenceDecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAutoMovieDeliveryReferenceDecode.js","sourceRoot":"","sources":["../src/runAutoMovieDeliveryReferenceDecode.ts"],"names":[],"mappings":";;;AAEA,+EAA4E;AAC5E,+EAA4E;AAC5E,mGAAgG;AAChG,6DAA0D;AAK1D;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,8CACV,MAAc,EACd,OAA0B,EAC1B,QAA6D,EAC7D,UAA+B,EAC/B,GAAG,GAA8B,uCAAkB;IAEnD,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,OAAO;YACL,KAAK,EAAE,EAAE,M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AAW,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IACpC,IAAI,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,OAAO,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;QAC3E,OAAO,IAAI,CAAC;IACd,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO;QACL,OAAO;QACP,SAAS;QACT,UAAU,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;QAC7D,OAAO,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;KACrD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { IAutoMovieDeliveryContentAudit } from "@automovie/interface";
2
+ import { runAutoMovieFfmpeg } from "./runAutoMovieFfmpeg";
3
+ /**
4
+ * Audits a soundtrack exactly as the delivery encoder feeds it: resampled to 48
5
+ * kHz stereo, padded with silence and cut at the encoder's own duration,
6
+ * rounded to the nearest sample. The cut is made inside the filter graph, ahead
7
+ * of the frame log, so the log and the PCM see the same samples; an output `-t`
8
+ * would shorten only the PCM. This is the source the encoded audio is compared
9
+ * with. Uncompressed PCM has no codec padding, so every decoded sample is
10
+ * presented.
11
+ *
12
+ * @param binary The FFmpeg executable already resolved by the delivery host.
13
+ * @param soundtrack The soundtrack file the encoder read.
14
+ * @param seconds The encoder's own `-t` argument, unchanged.
15
+ * @param thresholds The audio silence threshold and minimum duration.
16
+ * @param run The established FFmpeg process owner with separate output
17
+ * consumers.
18
+ * @returns Source audio evidence as stream zero, or a reason it is uncovered.
19
+ */
20
+ export declare function runAutoMovieDeliverySourceAudioDecode(binary: string, soundtrack: string, seconds: string, thresholds: IAutoMovieDeliveryContentAudit.IThresholds["silence"], run: typeof runAutoMovieFfmpeg): Promise<IAutoMovieDeliveryContentAudit.Stream>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runAutoMovieDeliverySourceAudioDecode = runAutoMovieDeliverySourceAudioDecode;
4
+ const decodeAutoMovieDeliveryAudio_1 = require("./decodeAutoMovieDeliveryAudio");
5
+ /** The delivery encoder's soundtrack rate, in Hz. */
6
+ const SOURCE_SAMPLE_RATE = 48_000;
7
+ /**
8
+ * Audits a soundtrack exactly as the delivery encoder feeds it: resampled to 48
9
+ * kHz stereo, padded with silence and cut at the encoder's own duration,
10
+ * rounded to the nearest sample. The cut is made inside the filter graph, ahead
11
+ * of the frame log, so the log and the PCM see the same samples; an output `-t`
12
+ * would shorten only the PCM. This is the source the encoded audio is compared
13
+ * with. Uncompressed PCM has no codec padding, so every decoded sample is
14
+ * presented.
15
+ *
16
+ * @param binary The FFmpeg executable already resolved by the delivery host.
17
+ * @param soundtrack The soundtrack file the encoder read.
18
+ * @param seconds The encoder's own `-t` argument, unchanged.
19
+ * @param thresholds The audio silence threshold and minimum duration.
20
+ * @param run The established FFmpeg process owner with separate output
21
+ * consumers.
22
+ * @returns Source audio evidence as stream zero, or a reason it is uncovered.
23
+ */
24
+ async function runAutoMovieDeliverySourceAudioDecode(binary, soundtrack, seconds, thresholds, run) {
25
+ const samples = Math.round(Number(seconds) * SOURCE_SAMPLE_RATE);
26
+ if (!Number.isSafeInteger(samples) || samples < 1)
27
+ return {
28
+ status: "uncovered",
29
+ reason: "The encoder's soundtrack duration is not a positive sample count",
30
+ };
31
+ return (0, decodeAutoMovieDeliveryAudio_1.decodeAutoMovieDeliveryAudio)(binary, [
32
+ "-hide_banner",
33
+ "-nostdin",
34
+ "-nostats",
35
+ "-xerror",
36
+ "-i",
37
+ soundtrack,
38
+ "-map",
39
+ "0:a:0",
40
+ "-vn",
41
+ "-af",
42
+ [
43
+ "aresample=" + SOURCE_SAMPLE_RATE,
44
+ "aformat=sample_fmts=flt:channel_layouts=stereo",
45
+ "apad=whole_len=" + samples,
46
+ "atrim=end_sample=" + samples,
47
+ "ashowinfo",
48
+ ].join(","),
49
+ "-c:a",
50
+ "pcm_f32le",
51
+ "-f",
52
+ "f32le",
53
+ "pipe:1",
54
+ ], 0, thresholds, run, undefined);
55
+ }
56
+ //# sourceMappingURL=runAutoMovieDeliverySourceAudioDecode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runAutoMovieDeliverySourceAudioDecode.js","sourceRoot":"","sources":["../src/runAutoMovieDeliverySourceAudioDecode.ts"],"names":[],"mappings":";;;AAEA,iFAA8E;AAG9E,qDAAqD;AACrD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACI,KAAK,gDACV,MAAc,EACd,UAAkB,EAClB,OAAe,EACf,UAAiE,EACjE,GAA8B;IAE9B,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,CAAC;IACjE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,OAAO,GAAG,CAAC;QAC/C,OAAO;YACL,MAAM,EAAE,WAAW;YACnB,MAAM,EACJ,kEAAkE;SACrE,CAAC;IACJ,OAAO,IAAA,2DAA4B,EACjC,MAAM,EACN;QACE,cAAc;QACd,UAAU;QACV,UAAU;QACV,SAAS;QACT,IAAI;QACJ,UAAU;QACV,MAAM;QACN,OAAO;QACP,KAAK;QACL,KAAK;QACL;YACE,YAAY,GAAG,kBAAkB;YACjC,gDAAgD;YAChD,iBAAiB,GAAG,OAAO;YAC3B,mBAAmB,GAAG,OAAO;YAC7B,WAAW;SACZ,CAAC,IAAI,CAAC,GAAG,CAAC;QACX,MAAM;QACN,WAAW;QACX,IAAI;QACJ,OAAO;QACP,QAAQ;KACT,EACD,CAAC,EACD,UAAU,EACV,GAAG,EACH,SAAS,CACV,CAAC;AACJ,CAAC"}
@@ -1,14 +1,19 @@
1
+ /** Optional consumers for a decoder that produces binary and text evidence. */
2
+ interface IAutoMovieFfmpegOutput {
3
+ stdout?: (chunk: Buffer) => void;
4
+ stderr?: (chunk: string) => void;
5
+ }
1
6
  /**
2
- * Run FFmpeg once with the given arguments, resolving with its error output when it exits as `accept` allows and rejecting otherwise.
7
+ * Run FFmpeg once with the given arguments, resolving with its error output
8
+ * when it exits as `accept` allows and rejecting otherwise.
3
9
  *
4
- * FFmpeg writes its log, including a probe of every input, to its error output, so that text is what callers read. By default only exit status 0 is accepted; a probe that names no output exits 1 by design and accepts it. A rejection names the binary, the exit status and the last lines of the log.
10
+ * FFmpeg writes its log, including a probe of every input, to its error output,
11
+ * so that text is what callers read. By default only exit status 0 is accepted;
12
+ * a probe that names no output exits 1 by design and accepts it. A rejection
13
+ * names the binary, the exit status and the last lines of the log.
5
14
  *
6
- * @evidence contracts/development/common.md#meaningful-documentation States what is resolved, the acceptance rule and its default, and what a rejection names.
7
- * @evidence contracts/development/implementation.md#principled-implementation `child_process.spawn` without a shell passes each argument as it is, so a path with spaces or quotes needs no escaping.
8
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Spawn, collect the error output, settle on exit.
9
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failed run is never retried, and a failure to start rejects with its cause.
10
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the log FFmpeg writes.
11
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each run is its own process.
12
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The child process ends before the promise settles; its log is held until then.
15
+ * Output consumers, when provided, receive chunks as the child writes them. A
16
+ * consumer failure terminates the child and rejects after it has closed.
13
17
  */
14
- export declare function runAutoMovieFfmpeg(binary: string, args: readonly string[], accept?: (code: number | null) => boolean): Promise<string>;
18
+ export declare function runAutoMovieFfmpeg(binary: string, args: readonly string[], accept?: (code: number | null) => boolean, output?: IAutoMovieFfmpegOutput): Promise<string>;
19
+ export {};
@@ -5,32 +5,55 @@ const node_child_process_1 = require("node:child_process");
5
5
  /** Lines of FFmpeg's error output kept for a failure message. */
6
6
  const TAIL = 12;
7
7
  /**
8
- * Run FFmpeg once with the given arguments, resolving with its error output when it exits as `accept` allows and rejecting otherwise.
8
+ * Run FFmpeg once with the given arguments, resolving with its error output
9
+ * when it exits as `accept` allows and rejecting otherwise.
9
10
  *
10
- * FFmpeg writes its log, including a probe of every input, to its error output, so that text is what callers read. By default only exit status 0 is accepted; a probe that names no output exits 1 by design and accepts it. A rejection names the binary, the exit status and the last lines of the log.
11
+ * FFmpeg writes its log, including a probe of every input, to its error output,
12
+ * so that text is what callers read. By default only exit status 0 is accepted;
13
+ * a probe that names no output exits 1 by design and accepts it. A rejection
14
+ * names the binary, the exit status and the last lines of the log.
11
15
  *
12
- * @evidence contracts/development/common.md#meaningful-documentation States what is resolved, the acceptance rule and its default, and what a rejection names.
13
- * @evidence contracts/development/implementation.md#principled-implementation `child_process.spawn` without a shell passes each argument as it is, so a path with spaces or quotes needs no escaping.
14
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Spawn, collect the error output, settle on exit.
15
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failed run is never retried, and a failure to start rejects with its cause.
16
- * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the log FFmpeg writes.
17
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each run is its own process.
18
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The child process ends before the promise settles; its log is held until then.
16
+ * Output consumers, when provided, receive chunks as the child writes them. A
17
+ * consumer failure terminates the child and rejects after it has closed.
19
18
  */
20
- function runAutoMovieFfmpeg(binary, args, accept = (code) => code === 0) {
19
+ function runAutoMovieFfmpeg(binary, args, accept = (code) => code === 0, output) {
21
20
  return new Promise((resolve, reject) => {
22
21
  const child = (0, node_child_process_1.spawn)(binary, [...args], {
23
- stdio: ["ignore", "ignore", "pipe"],
22
+ stdio: [
23
+ "ignore",
24
+ output?.stdout === undefined ? "ignore" : "pipe",
25
+ "pipe",
26
+ ],
24
27
  windowsHide: true,
25
28
  });
26
29
  let log = "";
30
+ let refusal;
31
+ const consume = (stream, reader, chunk) => {
32
+ if (reader === undefined || refusal !== undefined)
33
+ return;
34
+ try {
35
+ reader(chunk);
36
+ }
37
+ catch (cause) {
38
+ const reason = cause instanceof Error ? cause.message : String(cause);
39
+ refusal = new Error(`FFmpeg ${binary} ${stream} consumer failed: ${reason}`, { cause });
40
+ child.kill();
41
+ }
42
+ };
43
+ child.stdout?.on("data", (chunk) => consume("stdout", output?.stdout, chunk));
27
44
  child.stderr.setEncoding("utf8");
28
45
  child.stderr.on("data", (chunk) => {
29
46
  log += chunk;
47
+ consume("stderr", output?.stderr, chunk);
48
+ });
49
+ child.on("error", (error) => {
50
+ if (refusal === undefined)
51
+ reject(new Error(`FFmpeg ${binary} did not start`, { cause: error }));
30
52
  });
31
- child.on("error", (error) => reject(new Error(`FFmpeg ${binary} did not start`, { cause: error })));
32
53
  child.on("close", (code) => {
33
- if (accept(code))
54
+ if (refusal !== undefined)
55
+ reject(refusal);
56
+ else if (accept(code))
34
57
  resolve(log);
35
58
  else
36
59
  reject(new Error(`FFmpeg ${binary} exited with ${code}:\n${log.trimEnd().split(/\r?\n/u).slice(-TAIL).join("\n")}`));