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
@@ -4,50 +4,75 @@ import type {
4
4
  IAutoMovieCapturePlan,
5
5
  IAutoMovieCapturePlanRequest,
6
6
  IAutoMovieCaptureRecord,
7
+ IAutoMovieCaptureStorage,
7
8
  } from "@automovie/interface";
8
9
  import type * as Render from "@automovie/render";
9
10
  import * as fs from "node:fs/promises";
10
11
  import * as path from "node:path";
12
+ import type * as Playwright from "playwright-core";
11
13
 
12
14
  import type { AutoMovieCaptureBackend } from "./AutoMovieCaptureBackend";
13
15
  import type { IAutoMovieChromium } from "./IAutoMovieChromium";
14
16
  import { launchAutoMovieChromium } from "./launchAutoMovieChromium";
15
17
  import { loadAutoMovieProductionModule } from "./loadAutoMovieProductionModule";
18
+ import { readAutoMoviePageTimeout } from "./readAutoMoviePageTimeout";
16
19
  import { readAutoMovieRevision } from "./readAutoMovieRevision";
17
20
  import { serveAutoMovieDrawPage } from "./serveAutoMovieDrawPage";
18
21
 
19
- /** Milliseconds one page call may take before its cell fails: two minutes, room for SwiftShader to draw a large raster of a heavy scene. */
20
- const TIMEOUT: number = 120_000;
21
-
22
22
  /**
23
- * The Node host that draws a production's subjects in headless Chromium: one built draw page, one browser, and any number of sessions, captures and renders through them.
23
+ * The Node host that draws a production's subjects in headless Chromium: one
24
+ * built draw page, one browser, and any number of sessions, captures and
25
+ * renders through them.
24
26
  *
25
- * `open` loads `@automovie/render`, `vite` and `playwright-core` from the production, builds and serves the draw page for a subject module, and launches Chromium with the asked backend. Each `capture` opens a fresh page with the subject and props injected before it loads, describes the subject, plans the request against it, and runs the capture core with `node:fs/promises` as storage and the page's draw function as the draw, so every saved picture comes from the draw function. `close` ends the browser and the server and deletes the built page. `session` opens one subject for any other host that draws through the page, such as `renderAutoMovieVideo`. The `automovie capture` and `automovie render` commands use one host for one subject; a package with many subjects, such as the motion cases, uses one host for all of them.
27
+ * `open` loads `@automovie/render`, `vite` and `playwright-core` from the
28
+ * production, builds and serves the draw page for a subject module, and
29
+ * launches Chromium with the asked backend. Each `capture` opens a fresh page
30
+ * with the subject and props injected before it loads, describes the subject,
31
+ * plans the request against it, and runs the capture core with
32
+ * `node:fs/promises` as storage and the page's draw function as the draw, so
33
+ * every saved picture comes from the draw function. `close` ends the browser
34
+ * and the server and deletes the built page. `session` opens one subject for
35
+ * any other host that draws through the page, such as `renderAutoMovieVideo`.
36
+ * The `automovie capture` and `automovie render` commands use one host for one
37
+ * subject; a package with many subjects, such as the motion cases, uses one
38
+ * host for all of them.
26
39
  *
27
40
  * ```ts
28
- * const host = await AutoMovieCaptureHost.open({ root, module: "src/subjects.ts", backend: "software", env: process.env });
41
+ * const host = await AutoMovieCaptureHost.open({
42
+ * root,
43
+ * module: "src/subjects.ts",
44
+ * backend: "software",
45
+ * env: process.env,
46
+ * });
29
47
  * try {
30
48
  * const record = await host.capture({ request, props: null });
31
49
  * } finally {
32
50
  * await host.close();
33
51
  * }
34
52
  * ```
35
- *
36
- * @evidence contracts/development/common.md#meaningful-documentation States what open loads, builds and launches, every step of a capture, what close releases, and both users, and shows the order.
37
- * @evidence contracts/development/design.md#principled-representation A host is the three long-lived resources a capture needs and the render module they were loaded with; a capture is a request, the module's props and a folder.
38
- * @evidence contracts/development/design.md#minimal-and-owned-surface `open`, `capture`, `close`, and the `backend` the command reports; planning, drawing, files and records are the render package's.
39
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No subject kind is named; the module and its props say what is drawn.
40
53
  */
41
54
  export class AutoMovieCaptureHost {
42
- /** The production's `@automovie/render`, which drew the page; a host that draws through `session` uses it for the rules it applies. */
55
+ /**
56
+ * The production's `@automovie/render`, which drew the page; a host that
57
+ * draws through `session` uses it for the rules it applies.
58
+ */
43
59
  public readonly render: typeof Render;
44
60
 
45
- /** The backend and Chromium version, such as `swiftshader; Chromium 131.0.6778.33`. */
61
+ /**
62
+ * The backend and Chromium version, such as `swiftshader; Chromium
63
+ * 131.0.6778.33`.
64
+ */
46
65
  public readonly backend: string;
47
66
 
48
67
  /** The production's root folder. */
49
68
  private readonly root: string;
50
69
 
70
+ /**
71
+ * Per-call milliseconds for page navigation, draw-function readiness, subject
72
+ * creation and drawing.
73
+ */
74
+ private readonly timeout: number;
75
+
51
76
  /** The launched browser. */
52
77
  private readonly browser: IAutoMovieChromium.IBrowser;
53
78
 
@@ -59,28 +84,26 @@ export class AutoMovieCaptureHost {
59
84
  render: typeof Render;
60
85
  backend: string;
61
86
  root: string;
87
+ timeout: number;
62
88
  browser: IAutoMovieChromium.IBrowser;
63
89
  page: { url: string; close: () => Promise<void> };
64
90
  }) {
65
91
  this.render = props.render;
66
92
  this.backend = props.backend;
67
93
  this.root = props.root;
94
+ this.timeout = props.timeout;
68
95
  this.browser = props.browser;
69
96
  this.page = props.page;
70
97
  }
71
98
 
72
99
  /**
73
- * Load the production's packages, build and serve the draw page for the subject module, and launch Chromium.
74
- *
75
- * It rejects naming a package the production lacks, a missing module, a failed build, and a missing Chromium with the command that installs it; whatever was started before the failure is stopped.
100
+ * Load the production's packages, build and serve the draw page for the
101
+ * subject module, and launch Chromium.
76
102
  *
77
- * @evidence contracts/development/common.md#meaningful-documentation States the three steps, the refusals and the cleanup.
78
- * @evidence contracts/development/implementation.md#principled-implementation Every package comes from the production, so the page draws with the renderer the production installed, and the browser is Playwright's pinned build with the stated backend.
79
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Load, serve, launch; building and launching belong to their own functions.
80
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failure is reported, never answered by another backend or a development server.
81
- * @evidence contracts/development/implementation.md#efficient-algorithms One build and one launch for every capture of the host.
82
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The built page and the browser serve every capture until `close`.
83
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The host owns the server, its scratch folder and the browser until `close`; a failed launch stops the server first.
103
+ * It validates the optional draw-session budget before acquiring resources.
104
+ * It rejects naming a package the production lacks, a missing module, a
105
+ * failed build, and a missing Chromium with the command that installs it;
106
+ * whatever was started before the failure is stopped.
84
107
  */
85
108
  public static async open(props: {
86
109
  /** The production's root folder. */
@@ -94,16 +117,23 @@ export class AutoMovieCaptureHost {
94
117
 
95
118
  /** The environment, read for `CHROME_PATH`. */
96
119
  env: Readonly<Record<string, string | undefined>>;
120
+
121
+ /**
122
+ * Per-call milliseconds for page navigation, draw-function readiness,
123
+ * subject creation and drawing. Defaults to 120,000. Invalid timer delays
124
+ * fail before resources are acquired.
125
+ */
126
+ timeout?: number;
97
127
  }): Promise<AutoMovieCaptureHost> {
98
- const render: typeof Render = loadAutoMovieProductionModule(
128
+ const timeout: number = readAutoMoviePageTimeout(props.timeout);
129
+
130
+ const render: typeof Render = loadAutoMovieProductionModule<typeof Render>(
99
131
  props.root,
100
132
  "@automovie/render",
101
- ) as typeof Render;
102
- const chromium: IAutoMovieChromium = (
103
- loadAutoMovieProductionModule(props.root, "playwright-core") as {
104
- chromium: IAutoMovieChromium;
105
- }
106
- ).chromium;
133
+ );
134
+ const chromium: IAutoMovieChromium = loadAutoMovieProductionModule<
135
+ typeof Playwright
136
+ >(props.root, "playwright-core").chromium;
107
137
 
108
138
  // Vite's CommonJS entry warns once per load; the command loads it on purpose.
109
139
  process.env.VITE_CJS_IGNORE_WARNING = "true";
@@ -124,6 +154,7 @@ export class AutoMovieCaptureHost {
124
154
  render,
125
155
  backend: launched.backend,
126
156
  root: props.root,
157
+ timeout,
127
158
  browser: launched.browser,
128
159
  page,
129
160
  });
@@ -134,17 +165,14 @@ export class AutoMovieCaptureHost {
134
165
  }
135
166
 
136
167
  /**
137
- * Open a fresh page of the served draw page with a subject and its props injected before it loads, and describe the subject through it.
138
- *
139
- * The returned session owns the page; the caller closes it. An uncaught browser error during initialization rejects immediately with the original cause and logs its stack; console errors are forwarded too. A page that installs no draw function or cannot describe its subject rejects, and the page is closed first.
168
+ * Open a fresh page of the served draw page with a subject and its props
169
+ * injected before it loads, and describe the subject through it.
140
170
  *
141
- * @evidence contracts/development/common.md#meaningful-documentation States what is opened and injected, who closes it, and the refusal.
142
- * @evidence contracts/development/implementation.md#principled-implementation Every picture of a capture or a render comes through one such session, so both hosts draw through the same function.
143
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Observe the browser, race opening against a script failure, and close the page on rejection.
144
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A failed open is reported, never retried.
145
- * @evidence contracts/development/implementation.md#efficient-algorithms One page per call.
146
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call is a fresh page, because props differ between subjects.
147
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The page passes to the returned session, or is closed here when opening fails.
171
+ * The returned session owns the page; the caller closes it. An uncaught
172
+ * browser error during initialization rejects immediately with the original
173
+ * cause and logs its stack; console errors are forwarded too. A page that
174
+ * installs no draw function or cannot describe its subject rejects, and the
175
+ * page is closed first.
148
176
  */
149
177
  public async session(props: {
150
178
  /** Name of the subject, or null for the page's only subject. */
@@ -183,7 +211,7 @@ export class AutoMovieCaptureHost {
183
211
  url: this.page.url,
184
212
  props: { subject: props.subject, props: props.props },
185
213
  backend: this.backend,
186
- timeout: TIMEOUT,
214
+ timeout: this.timeout,
187
215
  }),
188
216
  failed,
189
217
  ]);
@@ -194,17 +222,19 @@ export class AutoMovieCaptureHost {
194
222
  }
195
223
 
196
224
  /**
197
- * Capture one subject: open a page with the subject and props injected, plan the request against what it describes, and draw every cell into the folder at `out`.
198
- *
199
- * The revision recorded is the production's git commit. It rejects what the planner or the folder refuses before anything is drawn, and a page that installs no draw function; the page is closed on every outcome.
225
+ * Capture one subject: open a page with the subject and props injected, plan
226
+ * the request against what it describes, and draw every cell into the folder
227
+ * at `out`.
200
228
  *
201
- * @evidence contracts/development/common.md#meaningful-documentation States the steps, the revision and the page's lifetime, and which refusals precede drawing.
202
- * @evidence contracts/development/implementation.md#principled-implementation The capture core plans, writes, records and compares; this host only supplies the subject, the draw and the storage, as law 6 of the campaign asks.
203
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Open the session, plan, open the folder, run, close the page.
204
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Storage is `node:fs/promises` itself, with no adapter.
205
- * @evidence contracts/development/implementation.md#efficient-algorithms One page per capture; drawing is the capture core's loop.
206
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each capture draws afresh, because the subject or the request differs.
207
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The page opened here is closed here; the capture core holds one still at a time.
229
+ * A subject with a sound list is first handed its dialogue mouths: its lines
230
+ * are read from the production root, admitted on the clock
231
+ * `autoMovieVideoFrameRate` gives its frame rate, and planned by
232
+ * `planAutoMovieDialogueMouths`, as the delivery render plans them, so a
233
+ * still shows the mouth the delivered frame at the same second shows. A line
234
+ * the admission refuses fails the capture. The revision recorded is the
235
+ * production's git commit. It rejects what the planner or the folder refuses
236
+ * before anything is drawn, and a page that installs no draw function; the
237
+ * page is closed on every outcome.
208
238
  */
209
239
  public async capture(props: {
210
240
  /** The request, as `parseAutoMovieCapturePlanRequest` read it. */
@@ -213,9 +243,16 @@ export class AutoMovieCaptureHost {
213
243
  /** Data the subject module reads, as JSON, or null. */
214
244
  props: unknown;
215
245
 
216
- /** The capture's root folder, relative to the production or absolute; absent, `media/capture/<subject>` of the production. */
246
+ /**
247
+ * The capture's root folder, relative to the production or absolute;
248
+ * absent, `media/capture/<subject>` of the production.
249
+ */
217
250
  out?: string;
218
251
 
252
+ admitFolder?: (folder: string) => void;
253
+
254
+ storage?: IAutoMovieCaptureStorage;
255
+
219
256
  /** The subject owner's own section of the record, or absent. */
220
257
  section?: Readonly<Record<string, unknown>>;
221
258
  }): Promise<Extract<IAutoMovieCaptureRecord, { state: "complete" }>> {
@@ -225,6 +262,36 @@ export class AutoMovieCaptureHost {
225
262
  props: props.props,
226
263
  });
227
264
  try {
265
+ const root: string = path.resolve(
266
+ this.root,
267
+ props.out ?? path.join("media", "capture", session.subject.name),
268
+ );
269
+ props.admitFolder?.(root);
270
+
271
+ // A film with a sound list speaks in its stills as in its delivered
272
+ // frames: the same lines on the same clock give the same mouths.
273
+ const { sound, fps, durationSeconds } = session.subject;
274
+ if (sound !== undefined) {
275
+ const [numerator, denominator]: readonly [number, number] =
276
+ render.autoMovieVideoFrameRate(fps);
277
+ const frameRate: { numerator: number; denominator: number } = {
278
+ numerator,
279
+ denominator,
280
+ };
281
+ await session.speak(
282
+ render.planAutoMovieDialogueMouths({
283
+ lines: await render.admitAutoMovieFilmDialogue({
284
+ sound,
285
+ frameRate,
286
+ totalFrames: Math.round(durationSeconds * fps),
287
+ read: (file: string): Promise<Uint8Array> =>
288
+ fs.readFile(path.resolve(this.root, file)),
289
+ }),
290
+ speakers: sound.speakers,
291
+ frameRate,
292
+ }),
293
+ );
294
+ }
228
295
  const plan: IAutoMovieCapturePlan = render.planAutoMovieCapture({
229
296
  request: props.request,
230
297
  subject: session.subject,
@@ -232,11 +299,8 @@ export class AutoMovieCaptureHost {
232
299
  });
233
300
  const folder: Render.AutoMovieCaptureFolder =
234
301
  await render.AutoMovieCaptureFolder.open({
235
- storage: fs,
236
- root: path.resolve(
237
- this.root,
238
- props.out ?? path.join("media", "capture", session.subject.name),
239
- ),
302
+ storage: props.storage ?? fs,
303
+ root,
240
304
  round: props.request.round,
241
305
  compare: props.request.compare,
242
306
  });
@@ -255,17 +319,7 @@ export class AutoMovieCaptureHost {
255
319
  }
256
320
  }
257
321
 
258
- /**
259
- * End the browser, stop the server and delete the built page.
260
- *
261
- * @evidence contracts/development/common.md#meaningful-documentation States what is released.
262
- * @evidence contracts/development/implementation.md#principled-implementation The browser ends before the server it loads pages from.
263
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Two releases in order, the second attempted even when the first fails.
264
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A release failure propagates after both are attempted.
265
- * @evidence contracts/development/implementation.md#efficient-algorithms Two calls.
266
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Closing happens once.
267
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The release point of the browser, the server and the scratch folder.
268
- */
322
+ /** End the browser, stop the server and delete the built page. */
269
323
  public async close(): Promise<void> {
270
324
  try {
271
325
  await this.browser.close();
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * One admitted CLI request, discriminated by `command`.
3
3
  *
4
- * `help` and `version` carry nothing because they are standalone requests. `create` and `add` carry their targets exactly as typed; `run` resolves them against the working directory. An explicit `name` is carried as typed; `run` chooses the name when it is absent.
5
- *
6
- * @evidence contracts/development/design.md#principled-representation Each variant carries exactly what its command needs after admission, so `run` performs no further argument parsing, except `capture`, `inspect`, `render` and `review`, whose options are read by the production's renderer's option reader once that renderer is loaded.
7
- * @evidence contracts/development/design.md#minimal-and-owned-surface A closed union over the command name lets `run` switch on one field, and the workspace family is a closed pair instead of a free path.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No variant other than `capture`, `inspect`, `render` and `review` carries unparsed tokens, and theirs are read by the one option reader every host shares rather than a second grammar here.
9
- * @evidence contracts/development/common.md#meaningful-documentation Every variant and member states its meaning and who resolves it.
4
+ * `help` and `version` carry nothing because they are standalone requests.
5
+ * `create` and `add` carry their targets exactly as typed; `run` resolves them
6
+ * against the working directory. An explicit `name` is carried as typed; `run`
7
+ * chooses the name when it is absent.
10
8
  */
11
9
  export type AutoMovieCommand =
12
10
  | {
@@ -18,62 +16,115 @@ export type AutoMovieCommand =
18
16
  command: "version";
19
17
  }
20
18
  | {
21
- /** Install a single production, or with `workspace` a workspace root, into `directory`. */
19
+ /**
20
+ * Install a single production, or with `workspace` a workspace root, into
21
+ * `directory`.
22
+ */
22
23
  command: "create";
23
24
 
24
- /** Target directory as typed, never blank; `run` resolves it against the working directory. */
25
+ /**
26
+ * Target directory as typed, never blank; `run` resolves it against the
27
+ * working directory.
28
+ */
25
29
  directory: string;
26
30
 
27
31
  /** Install a pnpm workspace root instead of a single production. */
28
32
  workspace: boolean;
29
33
 
30
- /** Admit a non-empty target, writing over same-path files and keeping the rest. */
34
+ /**
35
+ * Admit a non-empty target, writing over same-path files and keeping the
36
+ * rest.
37
+ */
31
38
  force: boolean;
32
39
 
33
40
  /** Package name as typed; absent, `run` derives or asks for one. */
34
41
  name?: string;
35
42
  }
36
43
  | {
37
- /** Add one production to the workspace whose root is the working directory. */
44
+ /**
45
+ * Add one production to the workspace whose root is the working
46
+ * directory.
47
+ */
38
48
  command: "add";
39
49
 
40
50
  /** `shorts` for brief → screenplay, `series` for the whole long route. */
41
51
  family: "shorts" | "series";
42
52
 
43
- /** The production's directory under `movies/<family>`, one admitted path segment. */
53
+ /**
54
+ * The production's directory under `movies/<family>`, one admitted path
55
+ * segment.
56
+ */
44
57
  directory: string;
45
58
 
46
- /** Admit a non-empty production directory, writing over same-path files and keeping the rest. */
59
+ /**
60
+ * Admit a non-empty production directory, writing over same-path files
61
+ * and keeping the rest.
62
+ */
47
63
  force: boolean;
48
64
 
49
- /** Package name as typed; absent, `run` derives one from the directory segment. */
65
+ /**
66
+ * Package name as typed; absent, `run` derives one from the directory
67
+ * segment.
68
+ */
50
69
  name?: string;
51
70
  }
52
71
  | {
53
- /** Capture stills of a subject or a video file in the production at the working directory. */
72
+ /**
73
+ * Capture stills of a subject or a video file in the production at the
74
+ * working directory.
75
+ */
54
76
  command: "capture";
55
77
 
56
- /** The tokens after `capture`, as typed; `run` reads them through the production's request grammar, which only the production's `@automovie/render` holds. */
78
+ /**
79
+ * The tokens after `capture`, as typed; `run` reads them through the
80
+ * production's request grammar, which only the production's
81
+ * `@automovie/render` holds.
82
+ */
57
83
  args: string[];
58
84
  }
59
85
  | {
60
- /** Serve the inspector page over a subject module of the production or package at the working directory. */
86
+ /**
87
+ * Serve the inspector page over a subject module of the production or
88
+ * package at the working directory.
89
+ */
61
90
  command: "inspect";
62
91
 
63
- /** The tokens after `inspect`, as typed; `run` reads them through the production's request grammar, as for `capture`. */
92
+ /**
93
+ * The tokens after `inspect`, as typed; `run` reads them through the
94
+ * production's request grammar, as for `capture`.
95
+ */
64
96
  args: string[];
65
97
  }
66
98
  | {
67
- /** Render one subject of the production at the working directory into a video. */
99
+ /**
100
+ * Render one subject of the production at the working directory into a
101
+ * video.
102
+ */
68
103
  command: "render";
69
104
 
70
- /** The tokens after `render`, as typed; `run` reads them with the production's option reader. */
105
+ /**
106
+ * The tokens after `render`, as typed; `run` reads them with the
107
+ * production's option reader.
108
+ */
71
109
  args: string[];
72
110
  }
73
111
  | {
74
112
  /** Record real-time playback of the production's running inspector page. */
75
113
  command: "review";
76
114
 
77
- /** The tokens after `review`, as typed; `run` reads them with the production's option reader. */
115
+ /**
116
+ * The tokens after `review`, as typed; `run` reads them with the
117
+ * production's option reader.
118
+ */
119
+ args: string[];
120
+ }
121
+ | {
122
+ /** Verify scoped production checks and observations. */
123
+ command: "verify";
124
+
125
+ /**
126
+ * The tokens after `verify`, as typed; the verification command reads
127
+ * them.
128
+ */
78
129
  args: string[];
79
130
  };
@@ -0,0 +1,7 @@
1
+ import type ffmpegPath from "ffmpeg-static";
2
+
3
+ /**
4
+ * The `ffmpeg-static` module's declared default export: the path of the binary
5
+ * it downloaded, or null on a platform it has none for.
6
+ */
7
+ export type AutoMovieFfmpegStaticPath = typeof ffmpegPath;