@anvpx/motion-cli 0.1.94 → 0.1.95

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 (882) hide show
  1. package/dist/approval/approval.d.ts +11 -3
  2. package/dist/approval/approval.js +20 -8
  3. package/dist/approval/command.js +43 -12
  4. package/dist/approval/hash.d.ts +6 -1
  5. package/dist/approval/hash.js +35 -6
  6. package/dist/captions/command.js +15 -3
  7. package/dist/captions/cues.d.ts +11 -2
  8. package/dist/captions/cues.js +13 -4
  9. package/dist/commands.js +2 -0
  10. package/dist/doctor/command.js +8 -2
  11. package/dist/integration/interaction.integration.d.ts +1 -0
  12. package/dist/integration/interaction.integration.js +95 -0
  13. package/dist/integration/preview.integration.js +12 -4
  14. package/dist/interaction/command.d.ts +4 -0
  15. package/dist/interaction/command.js +219 -0
  16. package/dist/interaction/document.d.ts +55 -0
  17. package/dist/interaction/document.js +104 -0
  18. package/dist/interaction/driver.d.ts +29 -0
  19. package/dist/interaction/driver.js +278 -0
  20. package/dist/mcp/server.d.ts +12 -5
  21. package/dist/mcp/server.js +41 -19
  22. package/dist/mut-demo/.out/smoke/boot.js +90 -0
  23. package/dist/mut-demo/.out/smoke/runtime/compose.js +43 -0
  24. package/dist/mut-demo/.out/smoke/runtime/easing.js +45 -0
  25. package/dist/mut-demo/.out/smoke/runtime/mount.js +153 -0
  26. package/dist/mut-demo/.out/smoke/runtime/timeline.js +199 -0
  27. package/dist/mut-demo/.out/smoke/scenes/count/scene.js +6 -0
  28. package/dist/mut-demo/.out/smoke/scenes/intro/scene.js +6 -0
  29. package/dist/mut-demo/.out/smoke/scenes/outro/scene.js +6 -0
  30. package/dist/mut-demo/.out/smoke/scenes/path/scene.js +6 -0
  31. package/dist/mut-demo/.out/smoke/scenes/signals/scene.js +6 -0
  32. package/dist/mut-demo/.out/smoke/shared/format.js +59 -0
  33. package/dist/mut-demo/.out/smoke/shared/motion.js +117 -0
  34. package/dist/mut-demo/.out/template-flow/out/project/boot.js +88 -0
  35. package/dist/mut-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
  36. package/dist/mut-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
  37. package/dist/mut-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
  38. package/dist/mut-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
  39. package/dist/mut-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
  40. package/dist/mut-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
  41. package/dist/mut-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
  42. package/dist/mut-demo/.out/template-flow/out/project/shared/format.js +59 -0
  43. package/dist/mut-demo/.out/template-flow/out/project/shared/motion.js +117 -0
  44. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
  45. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
  46. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
  47. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
  48. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
  49. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
  50. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
  51. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
  52. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
  53. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
  54. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
  55. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
  56. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
  57. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
  58. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
  59. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
  60. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
  61. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
  62. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
  63. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
  64. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
  65. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
  66. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
  67. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
  68. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
  69. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
  70. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
  71. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
  72. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
  73. package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
  74. package/dist/mut-demo/analyze/command.d.ts +2 -0
  75. package/dist/mut-demo/analyze/command.js +190 -0
  76. package/dist/mut-demo/approval/approval.d.ts +43 -0
  77. package/dist/mut-demo/approval/approval.js +155 -0
  78. package/dist/mut-demo/approval/command.d.ts +2 -0
  79. package/dist/mut-demo/approval/command.js +286 -0
  80. package/dist/mut-demo/approval/gate.d.ts +7 -0
  81. package/dist/mut-demo/approval/gate.js +23 -0
  82. package/dist/mut-demo/approval/hash.d.ts +76 -0
  83. package/dist/mut-demo/approval/hash.js +493 -0
  84. package/dist/mut-demo/args.d.ts +30 -0
  85. package/dist/mut-demo/args.js +53 -0
  86. package/dist/mut-demo/assets/command.d.ts +2 -0
  87. package/dist/mut-demo/assets/command.js +165 -0
  88. package/dist/mut-demo/captions/command.d.ts +16 -0
  89. package/dist/mut-demo/captions/command.js +462 -0
  90. package/dist/mut-demo/captions/cues.d.ts +19 -0
  91. package/dist/mut-demo/captions/cues.js +70 -0
  92. package/dist/mut-demo/catalog/command.d.ts +2 -0
  93. package/dist/mut-demo/catalog/command.js +60 -0
  94. package/dist/mut-demo/catalog/format.d.ts +13 -0
  95. package/dist/mut-demo/catalog/format.js +54 -0
  96. package/dist/mut-demo/cli.d.ts +3 -0
  97. package/dist/mut-demo/cli.js +35 -0
  98. package/dist/mut-demo/commands.d.ts +3 -0
  99. package/dist/mut-demo/commands.js +65 -0
  100. package/dist/mut-demo/compare/command.d.ts +4 -0
  101. package/dist/mut-demo/compare/command.js +144 -0
  102. package/dist/mut-demo/contact/argv.d.ts +24 -0
  103. package/dist/mut-demo/contact/argv.js +45 -0
  104. package/dist/mut-demo/contact/command.d.ts +2 -0
  105. package/dist/mut-demo/contact/command.js +79 -0
  106. package/dist/mut-demo/desktop/command.d.ts +21 -0
  107. package/dist/mut-demo/desktop/command.js +120 -0
  108. package/dist/mut-demo/doctor/checks.d.ts +25 -0
  109. package/dist/mut-demo/doctor/checks.js +584 -0
  110. package/dist/mut-demo/doctor/command.d.ts +4 -0
  111. package/dist/mut-demo/doctor/command.js +94 -0
  112. package/dist/mut-demo/doctor/format.d.ts +7 -0
  113. package/dist/mut-demo/doctor/format.js +41 -0
  114. package/dist/mut-demo/doctor/heal.d.ts +14 -0
  115. package/dist/mut-demo/doctor/heal.js +71 -0
  116. package/dist/mut-demo/doctor/pins.d.ts +8 -0
  117. package/dist/mut-demo/doctor/pins.js +28 -0
  118. package/dist/mut-demo/doctor/skills.d.ts +15 -0
  119. package/dist/mut-demo/doctor/skills.js +58 -0
  120. package/dist/mut-demo/doctor/types.d.ts +36 -0
  121. package/dist/mut-demo/doctor/types.js +1 -0
  122. package/dist/mut-demo/doctor/vendored.d.ts +15 -0
  123. package/dist/mut-demo/doctor/vendored.js +90 -0
  124. package/dist/mut-demo/doctor/version.d.ts +8 -0
  125. package/dist/mut-demo/doctor/version.js +11 -0
  126. package/dist/mut-demo/exit-codes.d.ts +16 -0
  127. package/dist/mut-demo/exit-codes.js +15 -0
  128. package/dist/mut-demo/fit/command.d.ts +5 -0
  129. package/dist/mut-demo/fit/command.js +154 -0
  130. package/dist/mut-demo/fit/solve.d.ts +21 -0
  131. package/dist/mut-demo/fit/solve.js +80 -0
  132. package/dist/mut-demo/fit/target.d.ts +18 -0
  133. package/dist/mut-demo/fit/target.js +47 -0
  134. package/dist/mut-demo/generate3d/command.d.ts +3 -0
  135. package/dist/mut-demo/generate3d/command.js +38 -0
  136. package/dist/mut-demo/generate3d/run.d.ts +39 -0
  137. package/dist/mut-demo/generate3d/run.js +77 -0
  138. package/dist/mut-demo/icon/command.d.ts +2 -0
  139. package/dist/mut-demo/icon/command.js +113 -0
  140. package/dist/mut-demo/index.d.ts +18 -0
  141. package/dist/mut-demo/index.js +16 -0
  142. package/dist/mut-demo/install-mk.d.ts +31 -0
  143. package/dist/mut-demo/install-mk.js +168 -0
  144. package/dist/mut-demo/integration/interaction.integration.d.ts +1 -0
  145. package/dist/mut-demo/integration/interaction.integration.js +95 -0
  146. package/dist/mut-demo/integration/preview.integration.d.ts +1 -0
  147. package/dist/mut-demo/integration/preview.integration.js +61 -0
  148. package/dist/mut-demo/integration/smoke.integration.d.ts +1 -0
  149. package/dist/mut-demo/integration/smoke.integration.js +91 -0
  150. package/dist/mut-demo/interaction/command.d.ts +4 -0
  151. package/dist/mut-demo/interaction/command.js +219 -0
  152. package/dist/mut-demo/interaction/document.d.ts +55 -0
  153. package/dist/mut-demo/interaction/document.js +104 -0
  154. package/dist/mut-demo/interaction/driver.d.ts +29 -0
  155. package/dist/mut-demo/interaction/driver.js +278 -0
  156. package/dist/mut-demo/main.d.ts +2 -0
  157. package/dist/mut-demo/main.js +4 -0
  158. package/dist/mut-demo/mcp/server.d.ts +89 -0
  159. package/dist/mut-demo/mcp/server.js +479 -0
  160. package/dist/mut-demo/node-io.d.ts +14 -0
  161. package/dist/mut-demo/node-io.js +153 -0
  162. package/dist/mut-demo/optimize/command.d.ts +12 -0
  163. package/dist/mut-demo/optimize/command.js +110 -0
  164. package/dist/mut-demo/packs/command.d.ts +2 -0
  165. package/dist/mut-demo/packs/command.js +109 -0
  166. package/dist/mut-demo/parent-demo/.out/smoke/boot.js +90 -0
  167. package/dist/mut-demo/parent-demo/.out/smoke/runtime/compose.js +43 -0
  168. package/dist/mut-demo/parent-demo/.out/smoke/runtime/easing.js +45 -0
  169. package/dist/mut-demo/parent-demo/.out/smoke/runtime/mount.js +153 -0
  170. package/dist/mut-demo/parent-demo/.out/smoke/runtime/timeline.js +199 -0
  171. package/dist/mut-demo/parent-demo/.out/smoke/scenes/count/scene.js +6 -0
  172. package/dist/mut-demo/parent-demo/.out/smoke/scenes/intro/scene.js +6 -0
  173. package/dist/mut-demo/parent-demo/.out/smoke/scenes/outro/scene.js +6 -0
  174. package/dist/mut-demo/parent-demo/.out/smoke/scenes/path/scene.js +6 -0
  175. package/dist/mut-demo/parent-demo/.out/smoke/scenes/signals/scene.js +6 -0
  176. package/dist/mut-demo/parent-demo/.out/smoke/shared/format.js +59 -0
  177. package/dist/mut-demo/parent-demo/.out/smoke/shared/motion.js +117 -0
  178. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/boot.js +88 -0
  179. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
  180. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
  181. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
  182. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
  183. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
  184. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
  185. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
  186. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/shared/format.js +59 -0
  187. package/dist/mut-demo/parent-demo/.out/template-flow/out/project/shared/motion.js +117 -0
  188. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
  189. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
  190. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
  191. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
  192. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
  193. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
  194. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
  195. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
  196. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
  197. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
  198. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
  199. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
  200. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
  201. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
  202. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
  203. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
  204. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
  205. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
  206. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
  207. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
  208. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
  209. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
  210. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
  211. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
  212. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
  213. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
  214. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
  215. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
  216. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
  217. package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
  218. package/dist/mut-demo/parent-demo/analyze/command.d.ts +2 -0
  219. package/dist/mut-demo/parent-demo/analyze/command.js +190 -0
  220. package/dist/mut-demo/parent-demo/approval/approval.d.ts +43 -0
  221. package/dist/mut-demo/parent-demo/approval/approval.js +155 -0
  222. package/dist/mut-demo/parent-demo/approval/command.d.ts +2 -0
  223. package/dist/mut-demo/parent-demo/approval/command.js +286 -0
  224. package/dist/mut-demo/parent-demo/approval/gate.d.ts +7 -0
  225. package/dist/mut-demo/parent-demo/approval/gate.js +23 -0
  226. package/dist/mut-demo/parent-demo/approval/hash.d.ts +76 -0
  227. package/dist/mut-demo/parent-demo/approval/hash.js +493 -0
  228. package/dist/mut-demo/parent-demo/args.d.ts +30 -0
  229. package/dist/mut-demo/parent-demo/args.js +53 -0
  230. package/dist/mut-demo/parent-demo/assets/command.d.ts +2 -0
  231. package/dist/mut-demo/parent-demo/assets/command.js +165 -0
  232. package/dist/mut-demo/parent-demo/captions/command.d.ts +16 -0
  233. package/dist/mut-demo/parent-demo/captions/command.js +462 -0
  234. package/dist/mut-demo/parent-demo/captions/cues.d.ts +19 -0
  235. package/dist/mut-demo/parent-demo/captions/cues.js +70 -0
  236. package/dist/mut-demo/parent-demo/catalog/command.d.ts +2 -0
  237. package/dist/mut-demo/parent-demo/catalog/command.js +60 -0
  238. package/dist/mut-demo/parent-demo/catalog/format.d.ts +13 -0
  239. package/dist/mut-demo/parent-demo/catalog/format.js +54 -0
  240. package/dist/mut-demo/parent-demo/cli.d.ts +3 -0
  241. package/dist/mut-demo/parent-demo/cli.js +35 -0
  242. package/dist/mut-demo/parent-demo/commands.d.ts +3 -0
  243. package/dist/mut-demo/parent-demo/commands.js +65 -0
  244. package/dist/mut-demo/parent-demo/compare/command.d.ts +4 -0
  245. package/dist/mut-demo/parent-demo/compare/command.js +144 -0
  246. package/dist/mut-demo/parent-demo/contact/argv.d.ts +24 -0
  247. package/dist/mut-demo/parent-demo/contact/argv.js +45 -0
  248. package/dist/mut-demo/parent-demo/contact/command.d.ts +2 -0
  249. package/dist/mut-demo/parent-demo/contact/command.js +79 -0
  250. package/dist/mut-demo/parent-demo/desktop/command.d.ts +21 -0
  251. package/dist/mut-demo/parent-demo/desktop/command.js +120 -0
  252. package/dist/mut-demo/parent-demo/doctor/checks.d.ts +25 -0
  253. package/dist/mut-demo/parent-demo/doctor/checks.js +584 -0
  254. package/dist/mut-demo/parent-demo/doctor/command.d.ts +4 -0
  255. package/dist/mut-demo/parent-demo/doctor/command.js +94 -0
  256. package/dist/mut-demo/parent-demo/doctor/format.d.ts +7 -0
  257. package/dist/mut-demo/parent-demo/doctor/format.js +41 -0
  258. package/dist/mut-demo/parent-demo/doctor/heal.d.ts +14 -0
  259. package/dist/mut-demo/parent-demo/doctor/heal.js +71 -0
  260. package/dist/mut-demo/parent-demo/doctor/pins.d.ts +8 -0
  261. package/dist/mut-demo/parent-demo/doctor/pins.js +28 -0
  262. package/dist/mut-demo/parent-demo/doctor/skills.d.ts +15 -0
  263. package/dist/mut-demo/parent-demo/doctor/skills.js +58 -0
  264. package/dist/mut-demo/parent-demo/doctor/types.d.ts +36 -0
  265. package/dist/mut-demo/parent-demo/doctor/types.js +1 -0
  266. package/dist/mut-demo/parent-demo/doctor/vendored.d.ts +15 -0
  267. package/dist/mut-demo/parent-demo/doctor/vendored.js +90 -0
  268. package/dist/mut-demo/parent-demo/doctor/version.d.ts +8 -0
  269. package/dist/mut-demo/parent-demo/doctor/version.js +11 -0
  270. package/dist/mut-demo/parent-demo/exit-codes.d.ts +16 -0
  271. package/dist/mut-demo/parent-demo/exit-codes.js +15 -0
  272. package/dist/mut-demo/parent-demo/fit/command.d.ts +5 -0
  273. package/dist/mut-demo/parent-demo/fit/command.js +154 -0
  274. package/dist/mut-demo/parent-demo/fit/solve.d.ts +21 -0
  275. package/dist/mut-demo/parent-demo/fit/solve.js +80 -0
  276. package/dist/mut-demo/parent-demo/fit/target.d.ts +18 -0
  277. package/dist/mut-demo/parent-demo/fit/target.js +47 -0
  278. package/dist/mut-demo/parent-demo/generate3d/command.d.ts +3 -0
  279. package/dist/mut-demo/parent-demo/generate3d/command.js +38 -0
  280. package/dist/mut-demo/parent-demo/generate3d/run.d.ts +39 -0
  281. package/dist/mut-demo/parent-demo/generate3d/run.js +77 -0
  282. package/dist/mut-demo/parent-demo/icon/command.d.ts +2 -0
  283. package/dist/mut-demo/parent-demo/icon/command.js +113 -0
  284. package/dist/mut-demo/parent-demo/index.d.ts +18 -0
  285. package/dist/mut-demo/parent-demo/index.js +16 -0
  286. package/dist/mut-demo/parent-demo/install-mk.d.ts +31 -0
  287. package/dist/mut-demo/parent-demo/install-mk.js +168 -0
  288. package/dist/mut-demo/parent-demo/integration/interaction.integration.d.ts +1 -0
  289. package/dist/mut-demo/parent-demo/integration/interaction.integration.js +95 -0
  290. package/dist/mut-demo/parent-demo/integration/preview.integration.d.ts +1 -0
  291. package/dist/mut-demo/parent-demo/integration/preview.integration.js +61 -0
  292. package/dist/mut-demo/parent-demo/integration/smoke.integration.d.ts +1 -0
  293. package/dist/mut-demo/parent-demo/integration/smoke.integration.js +91 -0
  294. package/dist/mut-demo/parent-demo/interaction/command.d.ts +4 -0
  295. package/dist/mut-demo/parent-demo/interaction/command.js +219 -0
  296. package/dist/mut-demo/parent-demo/interaction/document.d.ts +55 -0
  297. package/dist/mut-demo/parent-demo/interaction/document.js +104 -0
  298. package/dist/mut-demo/parent-demo/interaction/driver.d.ts +29 -0
  299. package/dist/mut-demo/parent-demo/interaction/driver.js +278 -0
  300. package/dist/mut-demo/parent-demo/main.d.ts +2 -0
  301. package/dist/mut-demo/parent-demo/main.js +4 -0
  302. package/dist/mut-demo/parent-demo/mcp/server.d.ts +89 -0
  303. package/dist/mut-demo/parent-demo/mcp/server.js +479 -0
  304. package/dist/mut-demo/parent-demo/node-io.d.ts +14 -0
  305. package/dist/mut-demo/parent-demo/node-io.js +153 -0
  306. package/dist/mut-demo/parent-demo/optimize/command.d.ts +12 -0
  307. package/dist/mut-demo/parent-demo/optimize/command.js +110 -0
  308. package/dist/mut-demo/parent-demo/packs/command.d.ts +2 -0
  309. package/dist/mut-demo/parent-demo/packs/command.js +109 -0
  310. package/dist/mut-demo/parent-demo/patch/apply.d.ts +36 -0
  311. package/dist/mut-demo/parent-demo/patch/apply.js +186 -0
  312. package/dist/mut-demo/parent-demo/patch/command.d.ts +2 -0
  313. package/dist/mut-demo/parent-demo/patch/command.js +92 -0
  314. package/dist/mut-demo/parent-demo/plugin/install.d.ts +40 -0
  315. package/dist/mut-demo/parent-demo/plugin/install.js +170 -0
  316. package/dist/mut-demo/parent-demo/preview/command.d.ts +10 -0
  317. package/dist/mut-demo/parent-demo/preview/command.js +945 -0
  318. package/dist/mut-demo/parent-demo/preview/manifest.d.ts +105 -0
  319. package/dist/mut-demo/parent-demo/preview/manifest.js +19 -0
  320. package/dist/mut-demo/parent-demo/preview/pack.d.ts +24 -0
  321. package/dist/mut-demo/parent-demo/preview/pack.js +53 -0
  322. package/dist/mut-demo/parent-demo/preview/plan.d.ts +61 -0
  323. package/dist/mut-demo/parent-demo/preview/plan.js +205 -0
  324. package/dist/mut-demo/parent-demo/preview/provenance.d.ts +23 -0
  325. package/dist/mut-demo/parent-demo/preview/provenance.js +38 -0
  326. package/dist/mut-demo/parent-demo/publish/command.d.ts +2 -0
  327. package/dist/mut-demo/parent-demo/publish/command.js +230 -0
  328. package/dist/mut-demo/parent-demo/publish/player.d.ts +61 -0
  329. package/dist/mut-demo/parent-demo/publish/player.js +728 -0
  330. package/dist/mut-demo/parent-demo/publish/static.d.ts +16 -0
  331. package/dist/mut-demo/parent-demo/publish/static.js +78 -0
  332. package/dist/mut-demo/parent-demo/qc.d.ts +2 -0
  333. package/dist/mut-demo/parent-demo/qc.js +192 -0
  334. package/dist/mut-demo/parent-demo/scene/author.d.ts +16 -0
  335. package/dist/mut-demo/parent-demo/scene/author.js +519 -0
  336. package/dist/mut-demo/parent-demo/scene/command.d.ts +2 -0
  337. package/dist/mut-demo/parent-demo/scene/command.js +110 -0
  338. package/dist/mut-demo/parent-demo/scene/ops.d.ts +23 -0
  339. package/dist/mut-demo/parent-demo/scene/ops.js +151 -0
  340. package/dist/mut-demo/parent-demo/state/command.d.ts +2 -0
  341. package/dist/mut-demo/parent-demo/state/command.js +128 -0
  342. package/dist/mut-demo/parent-demo/state/evidence.d.ts +73 -0
  343. package/dist/mut-demo/parent-demo/state/evidence.js +1 -0
  344. package/dist/mut-demo/parent-demo/storyboard/check.d.ts +21 -0
  345. package/dist/mut-demo/parent-demo/storyboard/check.js +39 -0
  346. package/dist/mut-demo/parent-demo/storyboard/containment.d.ts +24 -0
  347. package/dist/mut-demo/parent-demo/storyboard/containment.js +43 -0
  348. package/dist/mut-demo/parent-demo/storyboard/custom.d.ts +15 -0
  349. package/dist/mut-demo/parent-demo/storyboard/custom.js +133 -0
  350. package/dist/mut-demo/parent-demo/storyboard/edit.d.ts +19 -0
  351. package/dist/mut-demo/parent-demo/storyboard/edit.js +39 -0
  352. package/dist/mut-demo/parent-demo/storyboard/load.d.ts +11 -0
  353. package/dist/mut-demo/parent-demo/storyboard/load.js +52 -0
  354. package/dist/mut-demo/parent-demo/storyboard/report.d.ts +5 -0
  355. package/dist/mut-demo/parent-demo/storyboard/report.js +8 -0
  356. package/dist/mut-demo/parent-demo/template/coerce.d.ts +6 -0
  357. package/dist/mut-demo/parent-demo/template/coerce.js +44 -0
  358. package/dist/mut-demo/parent-demo/template/command.d.ts +5 -0
  359. package/dist/mut-demo/parent-demo/template/command.js +163 -0
  360. package/dist/mut-demo/parent-demo/template/env.d.ts +38 -0
  361. package/dist/mut-demo/parent-demo/template/env.js +40 -0
  362. package/dist/mut-demo/parent-demo/template/fork.d.ts +8 -0
  363. package/dist/mut-demo/parent-demo/template/fork.js +156 -0
  364. package/dist/mut-demo/parent-demo/template/format.d.ts +21 -0
  365. package/dist/mut-demo/parent-demo/template/format.js +177 -0
  366. package/dist/mut-demo/parent-demo/template/list.d.ts +27 -0
  367. package/dist/mut-demo/parent-demo/template/list.js +171 -0
  368. package/dist/mut-demo/parent-demo/template/new.d.ts +6 -0
  369. package/dist/mut-demo/parent-demo/template/new.js +335 -0
  370. package/dist/mut-demo/parent-demo/testing/env.d.ts +9 -0
  371. package/dist/mut-demo/parent-demo/testing/env.js +49 -0
  372. package/dist/mut-demo/parent-demo/testing/fakes.d.ts +39 -0
  373. package/dist/mut-demo/parent-demo/testing/fakes.js +100 -0
  374. package/dist/mut-demo/parent-demo/testing/fixtures.d.ts +8 -0
  375. package/dist/mut-demo/parent-demo/testing/fixtures.js +6 -0
  376. package/dist/mut-demo/parent-demo/testing/probe.d.ts +15 -0
  377. package/dist/mut-demo/parent-demo/testing/probe.js +20 -0
  378. package/dist/mut-demo/parent-demo/testing/project.d.ts +22 -0
  379. package/dist/mut-demo/parent-demo/testing/project.js +26 -0
  380. package/dist/mut-demo/parent-demo/tooling/session.d.ts +40 -0
  381. package/dist/mut-demo/parent-demo/tooling/session.js +106 -0
  382. package/dist/mut-demo/parent-demo/types.d.ts +64 -0
  383. package/dist/mut-demo/parent-demo/types.js +1 -0
  384. package/dist/mut-demo/parent-demo/verify/audio-loudness.d.ts +81 -0
  385. package/dist/mut-demo/parent-demo/verify/audio-loudness.js +306 -0
  386. package/dist/mut-demo/parent-demo/verify/caption.d.ts +23 -0
  387. package/dist/mut-demo/parent-demo/verify/caption.fixtures.d.ts +148 -0
  388. package/dist/mut-demo/parent-demo/verify/caption.fixtures.js +66 -0
  389. package/dist/mut-demo/parent-demo/verify/caption.js +105 -0
  390. package/dist/mut-demo/parent-demo/verify/command.d.ts +2 -0
  391. package/dist/mut-demo/parent-demo/verify/command.js +190 -0
  392. package/dist/mut-demo/parent-demo/verify/determinism.d.ts +30 -0
  393. package/dist/mut-demo/parent-demo/verify/determinism.js +59 -0
  394. package/dist/mut-demo/parent-demo/verify/expectation.d.ts +15 -0
  395. package/dist/mut-demo/parent-demo/verify/expectation.js +19 -0
  396. package/dist/mut-demo/parent-demo/verify/flash.d.ts +55 -0
  397. package/dist/mut-demo/parent-demo/verify/flash.js +147 -0
  398. package/dist/mut-demo/parent-demo/verify/media-events.d.ts +61 -0
  399. package/dist/mut-demo/parent-demo/verify/media-events.js +174 -0
  400. package/dist/mut-demo/parent-demo/verify/motion-coherence.d.ts +99 -0
  401. package/dist/mut-demo/parent-demo/verify/motion-coherence.js +274 -0
  402. package/dist/mut-demo/parent-demo/verify/platform.d.ts +33 -0
  403. package/dist/mut-demo/parent-demo/verify/platform.js +59 -0
  404. package/dist/mut-demo/parent-demo/verify/probe.d.ts +14 -0
  405. package/dist/mut-demo/parent-demo/verify/probe.js +23 -0
  406. package/dist/mut-demo/parent-demo/verify/report.d.ts +15 -0
  407. package/dist/mut-demo/parent-demo/verify/report.js +45 -0
  408. package/dist/mut-demo/parent-demo/verify/run.d.ts +32 -0
  409. package/dist/mut-demo/parent-demo/verify/run.js +64 -0
  410. package/dist/mut-demo/parent-demo/version/command.d.ts +5 -0
  411. package/dist/mut-demo/parent-demo/version/command.js +52 -0
  412. package/dist/mut-demo/parent-demo/voice/command.d.ts +3 -0
  413. package/dist/mut-demo/parent-demo/voice/command.js +77 -0
  414. package/dist/mut-demo/parent-demo/voice/manifest.d.ts +33 -0
  415. package/dist/mut-demo/parent-demo/voice/manifest.js +69 -0
  416. package/dist/mut-demo/parent-demo/voice/portability.d.ts +27 -0
  417. package/dist/mut-demo/parent-demo/voice/portability.js +41 -0
  418. package/dist/mut-demo/parent-demo/voice/run.d.ts +29 -0
  419. package/dist/mut-demo/parent-demo/voice/run.js +224 -0
  420. package/dist/mut-demo/parent-demo/workflow/build.d.ts +2 -0
  421. package/dist/mut-demo/parent-demo/workflow/build.js +33 -0
  422. package/dist/mut-demo/parent-demo/workflow/draft.d.ts +9 -0
  423. package/dist/mut-demo/parent-demo/workflow/draft.js +230 -0
  424. package/dist/mut-demo/parent-demo/workflow/finish.d.ts +23 -0
  425. package/dist/mut-demo/parent-demo/workflow/finish.js +28 -0
  426. package/dist/mut-demo/parent-demo/workflow/project.d.ts +82 -0
  427. package/dist/mut-demo/parent-demo/workflow/project.js +224 -0
  428. package/dist/mut-demo/parent-demo/workflow/provenance.d.ts +18 -0
  429. package/dist/mut-demo/parent-demo/workflow/provenance.js +36 -0
  430. package/dist/mut-demo/parent-demo/workflow/render.d.ts +78 -0
  431. package/dist/mut-demo/parent-demo/workflow/render.js +922 -0
  432. package/dist/mut-demo/parent-demo/workflow/still.d.ts +5 -0
  433. package/dist/mut-demo/parent-demo/workflow/still.js +79 -0
  434. package/dist/mut-demo/parent-demo/workflow/validate.d.ts +2 -0
  435. package/dist/mut-demo/parent-demo/workflow/validate.js +49 -0
  436. package/dist/mut-demo/patch/apply.d.ts +36 -0
  437. package/dist/mut-demo/patch/apply.js +186 -0
  438. package/dist/mut-demo/patch/command.d.ts +2 -0
  439. package/dist/mut-demo/patch/command.js +92 -0
  440. package/dist/mut-demo/plugin/install.d.ts +40 -0
  441. package/dist/mut-demo/plugin/install.js +170 -0
  442. package/dist/mut-demo/preview/command.d.ts +10 -0
  443. package/dist/mut-demo/preview/command.js +945 -0
  444. package/dist/mut-demo/preview/manifest.d.ts +105 -0
  445. package/dist/mut-demo/preview/manifest.js +19 -0
  446. package/dist/mut-demo/preview/pack.d.ts +24 -0
  447. package/dist/mut-demo/preview/pack.js +53 -0
  448. package/dist/mut-demo/preview/plan.d.ts +61 -0
  449. package/dist/mut-demo/preview/plan.js +205 -0
  450. package/dist/mut-demo/preview/provenance.d.ts +23 -0
  451. package/dist/mut-demo/preview/provenance.js +38 -0
  452. package/dist/mut-demo/publish/command.d.ts +2 -0
  453. package/dist/mut-demo/publish/command.js +230 -0
  454. package/dist/mut-demo/publish/player.d.ts +61 -0
  455. package/dist/mut-demo/publish/player.js +728 -0
  456. package/dist/mut-demo/publish/static.d.ts +16 -0
  457. package/dist/mut-demo/publish/static.js +78 -0
  458. package/dist/mut-demo/qc.d.ts +2 -0
  459. package/dist/mut-demo/qc.js +192 -0
  460. package/dist/mut-demo/scene/author.d.ts +16 -0
  461. package/dist/mut-demo/scene/author.js +519 -0
  462. package/dist/mut-demo/scene/command.d.ts +2 -0
  463. package/dist/mut-demo/scene/command.js +110 -0
  464. package/dist/mut-demo/scene/ops.d.ts +23 -0
  465. package/dist/mut-demo/scene/ops.js +151 -0
  466. package/dist/mut-demo/state/command.d.ts +2 -0
  467. package/dist/mut-demo/state/command.js +128 -0
  468. package/dist/mut-demo/state/evidence.d.ts +73 -0
  469. package/dist/mut-demo/state/evidence.js +1 -0
  470. package/dist/mut-demo/storyboard/check.d.ts +21 -0
  471. package/dist/mut-demo/storyboard/check.js +39 -0
  472. package/dist/mut-demo/storyboard/containment.d.ts +24 -0
  473. package/dist/mut-demo/storyboard/containment.js +43 -0
  474. package/dist/mut-demo/storyboard/custom.d.ts +15 -0
  475. package/dist/mut-demo/storyboard/custom.js +133 -0
  476. package/dist/mut-demo/storyboard/edit.d.ts +19 -0
  477. package/dist/mut-demo/storyboard/edit.js +39 -0
  478. package/dist/mut-demo/storyboard/load.d.ts +11 -0
  479. package/dist/mut-demo/storyboard/load.js +52 -0
  480. package/dist/mut-demo/storyboard/report.d.ts +5 -0
  481. package/dist/mut-demo/storyboard/report.js +8 -0
  482. package/dist/mut-demo/template/coerce.d.ts +6 -0
  483. package/dist/mut-demo/template/coerce.js +44 -0
  484. package/dist/mut-demo/template/command.d.ts +5 -0
  485. package/dist/mut-demo/template/command.js +163 -0
  486. package/dist/mut-demo/template/env.d.ts +38 -0
  487. package/dist/mut-demo/template/env.js +40 -0
  488. package/dist/mut-demo/template/fork.d.ts +8 -0
  489. package/dist/mut-demo/template/fork.js +156 -0
  490. package/dist/mut-demo/template/format.d.ts +21 -0
  491. package/dist/mut-demo/template/format.js +177 -0
  492. package/dist/mut-demo/template/list.d.ts +27 -0
  493. package/dist/mut-demo/template/list.js +171 -0
  494. package/dist/mut-demo/template/new.d.ts +6 -0
  495. package/dist/mut-demo/template/new.js +335 -0
  496. package/dist/mut-demo/testing/env.d.ts +9 -0
  497. package/dist/mut-demo/testing/env.js +49 -0
  498. package/dist/mut-demo/testing/fakes.d.ts +39 -0
  499. package/dist/mut-demo/testing/fakes.js +100 -0
  500. package/dist/mut-demo/testing/fixtures.d.ts +8 -0
  501. package/dist/mut-demo/testing/fixtures.js +6 -0
  502. package/dist/mut-demo/testing/probe.d.ts +15 -0
  503. package/dist/mut-demo/testing/probe.js +20 -0
  504. package/dist/mut-demo/testing/project.d.ts +22 -0
  505. package/dist/mut-demo/testing/project.js +26 -0
  506. package/dist/mut-demo/tooling/session.d.ts +40 -0
  507. package/dist/mut-demo/tooling/session.js +106 -0
  508. package/dist/mut-demo/types.d.ts +64 -0
  509. package/dist/mut-demo/types.js +1 -0
  510. package/dist/mut-demo/verify/audio-loudness.d.ts +81 -0
  511. package/dist/mut-demo/verify/audio-loudness.js +306 -0
  512. package/dist/mut-demo/verify/caption.d.ts +23 -0
  513. package/dist/mut-demo/verify/caption.fixtures.d.ts +148 -0
  514. package/dist/mut-demo/verify/caption.fixtures.js +66 -0
  515. package/dist/mut-demo/verify/caption.js +105 -0
  516. package/dist/mut-demo/verify/command.d.ts +2 -0
  517. package/dist/mut-demo/verify/command.js +190 -0
  518. package/dist/mut-demo/verify/determinism.d.ts +30 -0
  519. package/dist/mut-demo/verify/determinism.js +59 -0
  520. package/dist/mut-demo/verify/expectation.d.ts +15 -0
  521. package/dist/mut-demo/verify/expectation.js +19 -0
  522. package/dist/mut-demo/verify/flash.d.ts +55 -0
  523. package/dist/mut-demo/verify/flash.js +147 -0
  524. package/dist/mut-demo/verify/media-events.d.ts +61 -0
  525. package/dist/mut-demo/verify/media-events.js +174 -0
  526. package/dist/mut-demo/verify/motion-coherence.d.ts +99 -0
  527. package/dist/mut-demo/verify/motion-coherence.js +274 -0
  528. package/dist/mut-demo/verify/platform.d.ts +33 -0
  529. package/dist/mut-demo/verify/platform.js +59 -0
  530. package/dist/mut-demo/verify/probe.d.ts +14 -0
  531. package/dist/mut-demo/verify/probe.js +23 -0
  532. package/dist/mut-demo/verify/report.d.ts +15 -0
  533. package/dist/mut-demo/verify/report.js +45 -0
  534. package/dist/mut-demo/verify/run.d.ts +32 -0
  535. package/dist/mut-demo/verify/run.js +64 -0
  536. package/dist/mut-demo/version/command.d.ts +5 -0
  537. package/dist/mut-demo/version/command.js +52 -0
  538. package/dist/mut-demo/voice/command.d.ts +3 -0
  539. package/dist/mut-demo/voice/command.js +77 -0
  540. package/dist/mut-demo/voice/manifest.d.ts +33 -0
  541. package/dist/mut-demo/voice/manifest.js +69 -0
  542. package/dist/mut-demo/voice/portability.d.ts +27 -0
  543. package/dist/mut-demo/voice/portability.js +41 -0
  544. package/dist/mut-demo/voice/run.d.ts +29 -0
  545. package/dist/mut-demo/voice/run.js +224 -0
  546. package/dist/mut-demo/workflow/build.d.ts +2 -0
  547. package/dist/mut-demo/workflow/build.js +33 -0
  548. package/dist/mut-demo/workflow/draft.d.ts +9 -0
  549. package/dist/mut-demo/workflow/draft.js +230 -0
  550. package/dist/mut-demo/workflow/finish.d.ts +23 -0
  551. package/dist/mut-demo/workflow/finish.js +28 -0
  552. package/dist/mut-demo/workflow/project.d.ts +82 -0
  553. package/dist/mut-demo/workflow/project.js +224 -0
  554. package/dist/mut-demo/workflow/provenance.d.ts +18 -0
  555. package/dist/mut-demo/workflow/provenance.js +36 -0
  556. package/dist/mut-demo/workflow/render.d.ts +78 -0
  557. package/dist/mut-demo/workflow/render.js +922 -0
  558. package/dist/mut-demo/workflow/still.d.ts +5 -0
  559. package/dist/mut-demo/workflow/still.js +79 -0
  560. package/dist/mut-demo/workflow/validate.d.ts +2 -0
  561. package/dist/mut-demo/workflow/validate.js +49 -0
  562. package/dist/node-io.js +1 -0
  563. package/dist/parent-demo/.out/smoke/boot.js +90 -0
  564. package/dist/parent-demo/.out/smoke/runtime/compose.js +43 -0
  565. package/dist/parent-demo/.out/smoke/runtime/easing.js +45 -0
  566. package/dist/parent-demo/.out/smoke/runtime/mount.js +153 -0
  567. package/dist/parent-demo/.out/smoke/runtime/timeline.js +199 -0
  568. package/dist/parent-demo/.out/smoke/scenes/count/scene.js +6 -0
  569. package/dist/parent-demo/.out/smoke/scenes/intro/scene.js +6 -0
  570. package/dist/parent-demo/.out/smoke/scenes/outro/scene.js +6 -0
  571. package/dist/parent-demo/.out/smoke/scenes/path/scene.js +6 -0
  572. package/dist/parent-demo/.out/smoke/scenes/signals/scene.js +6 -0
  573. package/dist/parent-demo/.out/smoke/shared/format.js +59 -0
  574. package/dist/parent-demo/.out/smoke/shared/motion.js +117 -0
  575. package/dist/parent-demo/.out/template-flow/out/project/boot.js +88 -0
  576. package/dist/parent-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
  577. package/dist/parent-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
  578. package/dist/parent-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
  579. package/dist/parent-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
  580. package/dist/parent-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
  581. package/dist/parent-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
  582. package/dist/parent-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
  583. package/dist/parent-demo/.out/template-flow/out/project/shared/format.js +59 -0
  584. package/dist/parent-demo/.out/template-flow/out/project/shared/motion.js +117 -0
  585. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
  586. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
  587. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
  588. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
  589. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
  590. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
  591. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
  592. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
  593. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
  594. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
  595. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
  596. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
  597. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
  598. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
  599. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
  600. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
  601. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
  602. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
  603. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
  604. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
  605. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
  606. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
  607. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
  608. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
  609. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
  610. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
  611. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
  612. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
  613. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
  614. package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
  615. package/dist/parent-demo/analyze/command.d.ts +2 -0
  616. package/dist/parent-demo/analyze/command.js +190 -0
  617. package/dist/parent-demo/approval/approval.d.ts +43 -0
  618. package/dist/parent-demo/approval/approval.js +155 -0
  619. package/dist/parent-demo/approval/command.d.ts +2 -0
  620. package/dist/parent-demo/approval/command.js +286 -0
  621. package/dist/parent-demo/approval/gate.d.ts +7 -0
  622. package/dist/parent-demo/approval/gate.js +23 -0
  623. package/dist/parent-demo/approval/hash.d.ts +76 -0
  624. package/dist/parent-demo/approval/hash.js +493 -0
  625. package/dist/parent-demo/args.d.ts +30 -0
  626. package/dist/parent-demo/args.js +53 -0
  627. package/dist/parent-demo/assets/command.d.ts +2 -0
  628. package/dist/parent-demo/assets/command.js +165 -0
  629. package/dist/parent-demo/captions/command.d.ts +16 -0
  630. package/dist/parent-demo/captions/command.js +462 -0
  631. package/dist/parent-demo/captions/cues.d.ts +19 -0
  632. package/dist/parent-demo/captions/cues.js +70 -0
  633. package/dist/parent-demo/catalog/command.d.ts +2 -0
  634. package/dist/parent-demo/catalog/command.js +60 -0
  635. package/dist/parent-demo/catalog/format.d.ts +13 -0
  636. package/dist/parent-demo/catalog/format.js +54 -0
  637. package/dist/parent-demo/cli.d.ts +3 -0
  638. package/dist/parent-demo/cli.js +35 -0
  639. package/dist/parent-demo/commands.d.ts +3 -0
  640. package/dist/parent-demo/commands.js +65 -0
  641. package/dist/parent-demo/compare/command.d.ts +4 -0
  642. package/dist/parent-demo/compare/command.js +144 -0
  643. package/dist/parent-demo/contact/argv.d.ts +24 -0
  644. package/dist/parent-demo/contact/argv.js +45 -0
  645. package/dist/parent-demo/contact/command.d.ts +2 -0
  646. package/dist/parent-demo/contact/command.js +79 -0
  647. package/dist/parent-demo/desktop/command.d.ts +21 -0
  648. package/dist/parent-demo/desktop/command.js +120 -0
  649. package/dist/parent-demo/doctor/checks.d.ts +25 -0
  650. package/dist/parent-demo/doctor/checks.js +584 -0
  651. package/dist/parent-demo/doctor/command.d.ts +4 -0
  652. package/dist/parent-demo/doctor/command.js +94 -0
  653. package/dist/parent-demo/doctor/format.d.ts +7 -0
  654. package/dist/parent-demo/doctor/format.js +41 -0
  655. package/dist/parent-demo/doctor/heal.d.ts +14 -0
  656. package/dist/parent-demo/doctor/heal.js +71 -0
  657. package/dist/parent-demo/doctor/pins.d.ts +8 -0
  658. package/dist/parent-demo/doctor/pins.js +28 -0
  659. package/dist/parent-demo/doctor/skills.d.ts +15 -0
  660. package/dist/parent-demo/doctor/skills.js +58 -0
  661. package/dist/parent-demo/doctor/types.d.ts +36 -0
  662. package/dist/parent-demo/doctor/types.js +1 -0
  663. package/dist/parent-demo/doctor/vendored.d.ts +15 -0
  664. package/dist/parent-demo/doctor/vendored.js +90 -0
  665. package/dist/parent-demo/doctor/version.d.ts +8 -0
  666. package/dist/parent-demo/doctor/version.js +11 -0
  667. package/dist/parent-demo/exit-codes.d.ts +16 -0
  668. package/dist/parent-demo/exit-codes.js +15 -0
  669. package/dist/parent-demo/fit/command.d.ts +5 -0
  670. package/dist/parent-demo/fit/command.js +154 -0
  671. package/dist/parent-demo/fit/solve.d.ts +21 -0
  672. package/dist/parent-demo/fit/solve.js +80 -0
  673. package/dist/parent-demo/fit/target.d.ts +18 -0
  674. package/dist/parent-demo/fit/target.js +47 -0
  675. package/dist/parent-demo/generate3d/command.d.ts +3 -0
  676. package/dist/parent-demo/generate3d/command.js +38 -0
  677. package/dist/parent-demo/generate3d/run.d.ts +39 -0
  678. package/dist/parent-demo/generate3d/run.js +77 -0
  679. package/dist/parent-demo/icon/command.d.ts +2 -0
  680. package/dist/parent-demo/icon/command.js +113 -0
  681. package/dist/parent-demo/index.d.ts +18 -0
  682. package/dist/parent-demo/index.js +16 -0
  683. package/dist/parent-demo/install-mk.d.ts +31 -0
  684. package/dist/parent-demo/install-mk.js +168 -0
  685. package/dist/parent-demo/integration/interaction.integration.d.ts +1 -0
  686. package/dist/parent-demo/integration/interaction.integration.js +95 -0
  687. package/dist/parent-demo/integration/preview.integration.d.ts +1 -0
  688. package/dist/parent-demo/integration/preview.integration.js +61 -0
  689. package/dist/parent-demo/integration/smoke.integration.d.ts +1 -0
  690. package/dist/parent-demo/integration/smoke.integration.js +91 -0
  691. package/dist/parent-demo/interaction/command.d.ts +4 -0
  692. package/dist/parent-demo/interaction/command.js +219 -0
  693. package/dist/parent-demo/interaction/document.d.ts +55 -0
  694. package/dist/parent-demo/interaction/document.js +104 -0
  695. package/dist/parent-demo/interaction/driver.d.ts +29 -0
  696. package/dist/parent-demo/interaction/driver.js +278 -0
  697. package/dist/parent-demo/main.d.ts +2 -0
  698. package/dist/parent-demo/main.js +4 -0
  699. package/dist/parent-demo/mcp/server.d.ts +89 -0
  700. package/dist/parent-demo/mcp/server.js +479 -0
  701. package/dist/parent-demo/node-io.d.ts +14 -0
  702. package/dist/parent-demo/node-io.js +153 -0
  703. package/dist/parent-demo/optimize/command.d.ts +12 -0
  704. package/dist/parent-demo/optimize/command.js +110 -0
  705. package/dist/parent-demo/packs/command.d.ts +2 -0
  706. package/dist/parent-demo/packs/command.js +109 -0
  707. package/dist/parent-demo/patch/apply.d.ts +36 -0
  708. package/dist/parent-demo/patch/apply.js +186 -0
  709. package/dist/parent-demo/patch/command.d.ts +2 -0
  710. package/dist/parent-demo/patch/command.js +92 -0
  711. package/dist/parent-demo/plugin/install.d.ts +40 -0
  712. package/dist/parent-demo/plugin/install.js +170 -0
  713. package/dist/parent-demo/preview/command.d.ts +10 -0
  714. package/dist/parent-demo/preview/command.js +945 -0
  715. package/dist/parent-demo/preview/manifest.d.ts +105 -0
  716. package/dist/parent-demo/preview/manifest.js +19 -0
  717. package/dist/parent-demo/preview/pack.d.ts +24 -0
  718. package/dist/parent-demo/preview/pack.js +53 -0
  719. package/dist/parent-demo/preview/plan.d.ts +61 -0
  720. package/dist/parent-demo/preview/plan.js +205 -0
  721. package/dist/parent-demo/preview/provenance.d.ts +23 -0
  722. package/dist/parent-demo/preview/provenance.js +38 -0
  723. package/dist/parent-demo/publish/command.d.ts +2 -0
  724. package/dist/parent-demo/publish/command.js +230 -0
  725. package/dist/parent-demo/publish/player.d.ts +61 -0
  726. package/dist/parent-demo/publish/player.js +728 -0
  727. package/dist/parent-demo/publish/static.d.ts +16 -0
  728. package/dist/parent-demo/publish/static.js +78 -0
  729. package/dist/parent-demo/qc.d.ts +2 -0
  730. package/dist/parent-demo/qc.js +192 -0
  731. package/dist/parent-demo/scene/author.d.ts +16 -0
  732. package/dist/parent-demo/scene/author.js +519 -0
  733. package/dist/parent-demo/scene/command.d.ts +2 -0
  734. package/dist/parent-demo/scene/command.js +110 -0
  735. package/dist/parent-demo/scene/ops.d.ts +23 -0
  736. package/dist/parent-demo/scene/ops.js +151 -0
  737. package/dist/parent-demo/state/command.d.ts +2 -0
  738. package/dist/parent-demo/state/command.js +128 -0
  739. package/dist/parent-demo/state/evidence.d.ts +73 -0
  740. package/dist/parent-demo/state/evidence.js +1 -0
  741. package/dist/parent-demo/storyboard/check.d.ts +21 -0
  742. package/dist/parent-demo/storyboard/check.js +39 -0
  743. package/dist/parent-demo/storyboard/containment.d.ts +24 -0
  744. package/dist/parent-demo/storyboard/containment.js +43 -0
  745. package/dist/parent-demo/storyboard/custom.d.ts +15 -0
  746. package/dist/parent-demo/storyboard/custom.js +133 -0
  747. package/dist/parent-demo/storyboard/edit.d.ts +19 -0
  748. package/dist/parent-demo/storyboard/edit.js +39 -0
  749. package/dist/parent-demo/storyboard/load.d.ts +11 -0
  750. package/dist/parent-demo/storyboard/load.js +52 -0
  751. package/dist/parent-demo/storyboard/report.d.ts +5 -0
  752. package/dist/parent-demo/storyboard/report.js +8 -0
  753. package/dist/parent-demo/template/coerce.d.ts +6 -0
  754. package/dist/parent-demo/template/coerce.js +44 -0
  755. package/dist/parent-demo/template/command.d.ts +5 -0
  756. package/dist/parent-demo/template/command.js +163 -0
  757. package/dist/parent-demo/template/env.d.ts +38 -0
  758. package/dist/parent-demo/template/env.js +40 -0
  759. package/dist/parent-demo/template/fork.d.ts +8 -0
  760. package/dist/parent-demo/template/fork.js +156 -0
  761. package/dist/parent-demo/template/format.d.ts +21 -0
  762. package/dist/parent-demo/template/format.js +177 -0
  763. package/dist/parent-demo/template/list.d.ts +27 -0
  764. package/dist/parent-demo/template/list.js +171 -0
  765. package/dist/parent-demo/template/new.d.ts +6 -0
  766. package/dist/parent-demo/template/new.js +335 -0
  767. package/dist/parent-demo/testing/env.d.ts +9 -0
  768. package/dist/parent-demo/testing/env.js +49 -0
  769. package/dist/parent-demo/testing/fakes.d.ts +39 -0
  770. package/dist/parent-demo/testing/fakes.js +100 -0
  771. package/dist/parent-demo/testing/fixtures.d.ts +8 -0
  772. package/dist/parent-demo/testing/fixtures.js +6 -0
  773. package/dist/parent-demo/testing/probe.d.ts +15 -0
  774. package/dist/parent-demo/testing/probe.js +20 -0
  775. package/dist/parent-demo/testing/project.d.ts +22 -0
  776. package/dist/parent-demo/testing/project.js +26 -0
  777. package/dist/parent-demo/tooling/session.d.ts +40 -0
  778. package/dist/parent-demo/tooling/session.js +106 -0
  779. package/dist/parent-demo/types.d.ts +64 -0
  780. package/dist/parent-demo/types.js +1 -0
  781. package/dist/parent-demo/verify/audio-loudness.d.ts +81 -0
  782. package/dist/parent-demo/verify/audio-loudness.js +306 -0
  783. package/dist/parent-demo/verify/caption.d.ts +23 -0
  784. package/dist/parent-demo/verify/caption.fixtures.d.ts +148 -0
  785. package/dist/parent-demo/verify/caption.fixtures.js +66 -0
  786. package/dist/parent-demo/verify/caption.js +105 -0
  787. package/dist/parent-demo/verify/command.d.ts +2 -0
  788. package/dist/parent-demo/verify/command.js +190 -0
  789. package/dist/parent-demo/verify/determinism.d.ts +30 -0
  790. package/dist/parent-demo/verify/determinism.js +59 -0
  791. package/dist/parent-demo/verify/expectation.d.ts +15 -0
  792. package/dist/parent-demo/verify/expectation.js +19 -0
  793. package/dist/parent-demo/verify/flash.d.ts +55 -0
  794. package/dist/parent-demo/verify/flash.js +147 -0
  795. package/dist/parent-demo/verify/media-events.d.ts +61 -0
  796. package/dist/parent-demo/verify/media-events.js +174 -0
  797. package/dist/parent-demo/verify/motion-coherence.d.ts +99 -0
  798. package/dist/parent-demo/verify/motion-coherence.js +274 -0
  799. package/dist/parent-demo/verify/platform.d.ts +33 -0
  800. package/dist/parent-demo/verify/platform.js +59 -0
  801. package/dist/parent-demo/verify/probe.d.ts +14 -0
  802. package/dist/parent-demo/verify/probe.js +23 -0
  803. package/dist/parent-demo/verify/report.d.ts +15 -0
  804. package/dist/parent-demo/verify/report.js +45 -0
  805. package/dist/parent-demo/verify/run.d.ts +32 -0
  806. package/dist/parent-demo/verify/run.js +64 -0
  807. package/dist/parent-demo/version/command.d.ts +5 -0
  808. package/dist/parent-demo/version/command.js +52 -0
  809. package/dist/parent-demo/voice/command.d.ts +3 -0
  810. package/dist/parent-demo/voice/command.js +77 -0
  811. package/dist/parent-demo/voice/manifest.d.ts +33 -0
  812. package/dist/parent-demo/voice/manifest.js +69 -0
  813. package/dist/parent-demo/voice/portability.d.ts +27 -0
  814. package/dist/parent-demo/voice/portability.js +41 -0
  815. package/dist/parent-demo/voice/run.d.ts +29 -0
  816. package/dist/parent-demo/voice/run.js +224 -0
  817. package/dist/parent-demo/workflow/build.d.ts +2 -0
  818. package/dist/parent-demo/workflow/build.js +33 -0
  819. package/dist/parent-demo/workflow/draft.d.ts +9 -0
  820. package/dist/parent-demo/workflow/draft.js +230 -0
  821. package/dist/parent-demo/workflow/finish.d.ts +23 -0
  822. package/dist/parent-demo/workflow/finish.js +28 -0
  823. package/dist/parent-demo/workflow/project.d.ts +82 -0
  824. package/dist/parent-demo/workflow/project.js +224 -0
  825. package/dist/parent-demo/workflow/provenance.d.ts +18 -0
  826. package/dist/parent-demo/workflow/provenance.js +36 -0
  827. package/dist/parent-demo/workflow/render.d.ts +78 -0
  828. package/dist/parent-demo/workflow/render.js +922 -0
  829. package/dist/parent-demo/workflow/still.d.ts +5 -0
  830. package/dist/parent-demo/workflow/still.js +79 -0
  831. package/dist/parent-demo/workflow/validate.d.ts +2 -0
  832. package/dist/parent-demo/workflow/validate.js +49 -0
  833. package/dist/plugin/install.d.ts +3 -3
  834. package/dist/plugin/install.js +2 -2
  835. package/dist/preview/command.js +166 -92
  836. package/dist/preview/manifest.d.ts +2 -0
  837. package/dist/publish/command.js +189 -29
  838. package/dist/publish/player.d.ts +42 -6
  839. package/dist/publish/player.js +660 -40
  840. package/dist/scene/author.d.ts +1 -1
  841. package/dist/scene/author.js +250 -10
  842. package/dist/state/evidence.d.ts +4 -2
  843. package/dist/state/evidence.js +17 -4
  844. package/dist/template/env.d.ts +4 -0
  845. package/dist/template/env.js +3 -1
  846. package/dist/template/format.js +28 -12
  847. package/dist/template/list.d.ts +13 -1
  848. package/dist/template/list.js +61 -6
  849. package/dist/template/new.js +37 -4
  850. package/dist/testing/env.d.ts +1 -0
  851. package/dist/testing/env.js +32 -2
  852. package/dist/testing/fakes.d.ts +7 -1
  853. package/dist/testing/fakes.js +7 -2
  854. package/dist/types.d.ts +5 -0
  855. package/dist/verify/audio-loudness.d.ts +38 -3
  856. package/dist/verify/audio-loudness.js +123 -3
  857. package/dist/verify/caption.d.ts +23 -0
  858. package/dist/verify/caption.fixtures.d.ts +148 -0
  859. package/dist/verify/caption.fixtures.js +66 -0
  860. package/dist/verify/caption.js +105 -0
  861. package/dist/verify/command.js +42 -13
  862. package/dist/verify/determinism.d.ts +5 -5
  863. package/dist/verify/determinism.js +6 -6
  864. package/dist/verify/flash.d.ts +55 -0
  865. package/dist/verify/flash.js +147 -0
  866. package/dist/verify/motion-coherence.d.ts +99 -0
  867. package/dist/verify/motion-coherence.js +274 -0
  868. package/dist/verify/platform.d.ts +3 -3
  869. package/dist/verify/platform.js +5 -5
  870. package/dist/verify/run.d.ts +5 -0
  871. package/dist/verify/run.js +11 -0
  872. package/dist/voice/portability.d.ts +27 -0
  873. package/dist/voice/portability.js +41 -0
  874. package/dist/voice/run.js +31 -17
  875. package/dist/workflow/build.js +11 -3
  876. package/dist/workflow/draft.js +24 -9
  877. package/dist/workflow/project.d.ts +10 -1
  878. package/dist/workflow/project.js +29 -3
  879. package/dist/workflow/render.d.ts +41 -2
  880. package/dist/workflow/render.js +212 -52
  881. package/dist/workflow/still.js +30 -13
  882. package/package.json +6 -5
@@ -0,0 +1,945 @@
1
+ import { createHash } from "node:crypto";
2
+ import { basename, dirname, join, resolve } from "node:path";
3
+ import { validateMusicBed } from "@anvpx/motion-audio";
4
+ import { AUDIO_DIR_NAME, CUSTOM_SCENE_TYPE, clipsFromManifest, frozenClips, frozenCopyProblems, frozenMusic, isContiguous, mixAtDeliveryLevel, parseAudioManifest, placementsFromTimeline, readRelativeClosure, resolveSceneDir, resolveTimeline, validateStoryboardFull, } from "@anvpx/motion-build";
5
+ import { canonicalJson } from "@anvpx/motion-schema";
6
+ import { buildApprovalInputManifest, hashApprovalInput, storyboardHash, } from "../approval/hash.js";
7
+ import { parseFlags, requireStoryboard, textFlag, usageError } from "../args.js";
8
+ import { EXIT } from "../exit-codes.js";
9
+ import { derivedInteraction, resolveInteraction } from "../interaction/document.js";
10
+ import { checkStoryboard, rootError } from "../storyboard/check.js";
11
+ import { sceneContainment } from "../storyboard/containment.js";
12
+ import { readJsonFile } from "../storyboard/load.js";
13
+ import { formatFindings } from "../storyboard/report.js";
14
+ import { defaultEnv } from "../template/env.js";
15
+ import { DRAFT_FPS } from "../verify/expectation.js";
16
+ import { platformLookup } from "../verify/platform.js";
17
+ import { makeDraftCommand } from "../workflow/draft.js";
18
+ import { stillCommand } from "../workflow/still.js";
19
+ import { CHECKLIST, defaultOut, PREVIEW_JSON, packDir, } from "./manifest.js";
20
+ import { clearPngs, contactSheet, listPngs, nameStills, } from "./pack.js";
21
+ import { CLIP_MAX_SEC, CLIP_SCENE_SEC, capClip, DARK_COUNT, distinctPicks, sceneInfos, shouldRunClip, stillCandidates, stillPlan, } from "./plan.js";
22
+ import { readProvenance, resolvePair } from "./provenance.js";
23
+ const USAGE = `mk preview <storyboard.json> [--stills 6 | --every] [--full] [--budget-sec 90] [--out <dir>] [--assets <dir>] [--ledger <assets.json>] [--audio <manifest>] [--allow-silent] [--music <bed.wav>] [--music-volume <n>] [--music-license <file>] [--interaction <interaction.json>] [--json]
24
+
25
+ Build the proposal pack the user approves, into <out>/<name>.preview, <name> = the storyboard file name without .json (default <out> = <storyboard dir>/out):
26
+ preview.json hash, template, frame, scenes, stills, lint, estimate, approval checklist
27
+ contact.png one image tiling the stills (look at this, show it to the user)
28
+ stills/NN-<scene>-<theme>.png
29
+ clip.mp4 --full: every scene at its real duration, 960 px, ${DRAFT_FPS} fps;
30
+ otherwise each scene capped at ${CLIP_SCENE_SEC} s and the whole trailer <= ${CLIP_MAX_SEC} s
31
+ Stills: first scene, last scene, each scene type once (an overlay off screen at its scene's still counts as a scene), then an even spread; ${DARK_COUNT} extra stills in the paired theme when
32
+ the template has one. Order of work: stills, contact sheet, clip. If --budget-sec runs out the clip is skipped
33
+ (preview.json says so, exit 0); stills are never skipped. Validation or lint errors exit 2.
34
+ --stills n base stills (1-24, default 6)
35
+ --every one still per base scene at 70% of it (instead of --stills); overlays show where they cover that moment
36
+ --full render the complete board as one continuous clip; no trailer sampling
37
+ --budget-sec n time budget (default 90; --full raises the default to 900)
38
+ --audio <manifest>
39
+ voice TimingManifest: mix each scene's wav (the manifest's sibling
40
+ audio/ dir, <id>.wav) under clip.mp4 with the same mix args as
41
+ the final render; absent means a silent clip (audible:false).
42
+ The audiovisual binding (manifest + wavs + mix) enters
43
+ inputManifestSha256.
44
+ --allow-silent permit a silent preview when the board has narration; only
45
+ when the user explicitly wants silent output
46
+ --music <bed.wav> opt-in CC0 bed; with --audio it ducks under narration, without
47
+ --audio it is the film's only sound and runs to the picture end;
48
+ same buildMusicMixArgs as final; volume via --music-volume,
49
+ license receipt via --music-license. Bed + volume + licenseEvidenceSha256
50
+ enter inputManifestSha256.
51
+ --music-volume <n> bed level within (0, 1] (default 0.5)
52
+ --music-license <file> license-evidence file hashed into the receipt
53
+ --interaction <file> fold a recorded ADR-0013 transcript into the stills and clip; the
54
+ transcript is part of inputManifestSha256, so editing it re-arms approval
55
+ --json print preview.json instead of the summary line
56
+ Scratch builds live in <out>/<name>.preview-work. Then show the pack and, after an explicit yes: mk approve <storyboard.json>
57
+ `;
58
+ const FLAGS = {
59
+ stills: { type: "string" },
60
+ every: { type: "boolean" },
61
+ full: { type: "boolean" },
62
+ "budget-sec": { type: "string" },
63
+ out: { type: "string" },
64
+ assets: { type: "string" },
65
+ ledger: { type: "string" },
66
+ audio: { type: "string" },
67
+ "allow-silent": { type: "boolean" },
68
+ music: { type: "string" },
69
+ "music-volume": { type: "string" },
70
+ "music-license": { type: "string" },
71
+ interaction: { type: "string" },
72
+ json: { type: "boolean" },
73
+ };
74
+ const DEFAULT_STILLS = 6;
75
+ const MAX_STILLS = 24;
76
+ const DEFAULT_BUDGET_SEC = 90;
77
+ const MAX_LINT_ITEMS = 10;
78
+ /** The clip is a derived trailer; authored-work lint (reading time, hold) does not apply to it. */
79
+ const clipDraft = makeDraftCommand({ lint: false });
80
+ const ESTIMATE_NOTE = "estimate: measured draft ms per frame x total frames at the storyboard fps; delivery quality is slower";
81
+ const MS = 1000;
82
+ /** A copy of `io` whose stdout/stderr are captured, so wrapped commands stay quiet. */
83
+ const captured = (io) => {
84
+ const out = [];
85
+ const err = [];
86
+ return { io: { ...io, stdout: (t) => out.push(t), stderr: (t) => err.push(t) }, out, err };
87
+ };
88
+ /** `--stills` as a count (1-24); an exit code on a bad value or a clash with `--every`. */
89
+ function stillCount(flags, every, io) {
90
+ const given = textFlag(flags, "stills");
91
+ if (every && given !== undefined) {
92
+ return { code: usageError("preview", USAGE, "--every and --stills conflict", io).code };
93
+ }
94
+ const count = Number(given ?? DEFAULT_STILLS);
95
+ if (Number.isInteger(count) && count >= 1 && count <= MAX_STILLS)
96
+ return { count };
97
+ return {
98
+ code: usageError("preview", USAGE, `--stills must be an integer 1-${MAX_STILLS}`, io).code,
99
+ };
100
+ }
101
+ function readOptions(flags, storyboard, io) {
102
+ const every = flags.every === true;
103
+ const full = flags.full === true;
104
+ const counted = stillCount(flags, every, io);
105
+ if ("code" in counted)
106
+ return counted.code;
107
+ const stills = counted.count;
108
+ const defaultBudget = full ? 900 : DEFAULT_BUDGET_SEC;
109
+ const budgetSec = Number(textFlag(flags, "budget-sec") ?? defaultBudget);
110
+ if (!Number.isFinite(budgetSec) || budgetSec <= 0) {
111
+ return usageError("preview", USAGE, "--budget-sec must be a positive number", io).code;
112
+ }
113
+ const assets = textFlag(flags, "assets");
114
+ const ledger = textFlag(flags, "ledger");
115
+ const audio = textFlag(flags, "audio");
116
+ const allowSilent = flags["allow-silent"] === true;
117
+ const music = textFlag(flags, "music");
118
+ const musicVolumeRaw = textFlag(flags, "music-volume");
119
+ const musicLicense = textFlag(flags, "music-license");
120
+ const interaction = textFlag(flags, "interaction");
121
+ if (musicVolumeRaw !== undefined) {
122
+ const n = Number(musicVolumeRaw);
123
+ if (!Number.isFinite(n) || n <= 0 || n > 1) {
124
+ return usageError("preview", USAGE, "--music-volume must be within (0, 1]", io).code;
125
+ }
126
+ }
127
+ if ((musicVolumeRaw !== undefined || musicLicense !== undefined) && music === undefined) {
128
+ return usageError("preview", USAGE, "--music-volume/--music-license need --music", io).code;
129
+ }
130
+ return {
131
+ stills,
132
+ every,
133
+ full,
134
+ budgetSec,
135
+ out: resolve(textFlag(flags, "out") ?? defaultOut(storyboard)),
136
+ extra: [
137
+ ...(assets === undefined ? [] : ["--assets", assets]),
138
+ ...(ledger === undefined ? [] : ["--ledger", ledger]),
139
+ ],
140
+ ...(assets === undefined ? {} : { assetsDir: resolve(assets) }),
141
+ ...(ledger === undefined ? {} : { ledgerPath: ledger }),
142
+ ...(audio === undefined ? {} : { audioManifest: audio }),
143
+ allowSilent,
144
+ ...(music === undefined ? {} : { musicPath: music }),
145
+ ...(musicVolumeRaw === undefined ? {} : { musicVolume: Number(musicVolumeRaw) }),
146
+ ...(musicLicense === undefined ? {} : { musicLicensePath: musicLicense }),
147
+ ...(interaction === undefined ? {} : { interactionPath: interaction }),
148
+ };
149
+ }
150
+ /** Copies every `<dir>/themes/*.json` of the project into a scratch project. */
151
+ async function copyThemes(host, from, to) {
152
+ const dir = join(from, "themes");
153
+ const names = (await host.listDir(dir).catch(() => [])).filter((n) => n.endsWith(".json"));
154
+ for (const name of names)
155
+ await host.copyFile(join(dir, name), join(to, "themes", name));
156
+ }
157
+ const CUSTOM_FILES = ["scene.js", "fragment.html", "style.css"];
158
+ /**
159
+ * Copies authored scene directories beside a derived storyboard, so a relative
160
+ * `props.dir` still resolves after the storyboard is rewritten into a scratch dir.
161
+ */
162
+ export async function copyCustomScenes(host, board, origin, targetDir) {
163
+ const base = dirname(resolve(origin));
164
+ for (const scene of board.scenes) {
165
+ if (scene.type !== CUSTOM_SCENE_TYPE)
166
+ continue;
167
+ const dir = scene.props.dir;
168
+ if (typeof dir !== "string")
169
+ continue;
170
+ const resolved = resolveSceneDir(base, dir);
171
+ if (!resolved.ok)
172
+ continue;
173
+ // Never copy bytes that resolve outside the project through a link.
174
+ const containment = sceneContainment(base, resolved.dir, CUSTOM_FILES);
175
+ if (!containment.dirInside || containment.escapedFiles.length > 0) {
176
+ throw new Error(`custom scene "${dir}" resolves outside the storyboard directory (symlink)`);
177
+ }
178
+ for (const file of CUSTOM_FILES) {
179
+ const from = join(resolved.dir, file);
180
+ if (await host.exists(from))
181
+ await host.copyFile(from, join(targetDir, dir, file));
182
+ }
183
+ // Relative helpers emitted beside scene.js must resolve in the scratch copy too.
184
+ const jsPath = join(resolved.dir, "scene.js");
185
+ if (await host.exists(jsPath)) {
186
+ const closure = await readRelativeClosure(await host.readText(jsPath), async (helper) => {
187
+ const check = sceneContainment(base, resolved.dir, [helper]);
188
+ if (!check.dirInside || check.escapedFiles.length > 0) {
189
+ throw new Error(`custom scene helper "${helper}" resolves outside the scene (symlink)`);
190
+ }
191
+ const full = join(resolved.dir, helper);
192
+ return (await host.exists(full)) ? host.readText(full) : undefined;
193
+ });
194
+ for (const helper of closure.files) {
195
+ await host.copyFile(join(resolved.dir, helper.path), join(targetDir, dir, helper.path));
196
+ }
197
+ }
198
+ }
199
+ }
200
+ /** Writes a derived storyboard (+ its transcript, themes, extra theme files) into its own scratch dir. */
201
+ async function scratch(io, work, name, board, projectDir, extraThemes = [], origin, interaction) {
202
+ const dir = join(work, name);
203
+ await io.host.writeTextAtomic(join(dir, "storyboard.json"), `${JSON.stringify(board, null, 2)}\n`);
204
+ if (origin !== undefined)
205
+ await copyCustomScenes(io.host, board, origin, dir);
206
+ await copyThemes(io.host, projectDir, dir);
207
+ for (const theme of extraThemes) {
208
+ await io.host.writeTextAtomic(join(dir, "themes", `${theme.id}.json`), theme.text);
209
+ }
210
+ if (interaction !== undefined) {
211
+ // The scratch board is a derived document (voice timing, capped trailer, paired theme);
212
+ // its digest differs, so the transcript is re-stamped to keep the same event fold.
213
+ const path = join(dir, "interaction.json");
214
+ await io.host.writeTextAtomic(path, canonicalJson(derivedInteraction(interaction, board)));
215
+ return {
216
+ storyboard: join(dir, "storyboard.json"),
217
+ project: join(dir, "project"),
218
+ interaction: path,
219
+ };
220
+ }
221
+ return { storyboard: join(dir, "storyboard.json"), project: join(dir, "project") };
222
+ }
223
+ /** Runs `mk still` quietly; returns the PNGs it wrote (ordered like the `--at` list) or an exit code. */
224
+ async function capture(io, scratchDir, picks, extra, clock, spent) {
225
+ const stillsDir = join(scratchDir.project, "stills");
226
+ await clearPngs(io.host, stillsDir);
227
+ const quiet = captured(io);
228
+ const began = clock();
229
+ const at = picks.map((p) => p.t).join(",");
230
+ const interaction = scratchDir.interaction === undefined ? [] : ["--interaction", scratchDir.interaction];
231
+ const code = await stillCommand.run([scratchDir.storyboard, "--at", at, "--out", scratchDir.project, ...extra, ...interaction], quiet.io);
232
+ spent.ms += clock() - began;
233
+ if (code !== 0) {
234
+ io.stderr(quiet.err.join(""));
235
+ return code;
236
+ }
237
+ const files = await listPngs(io.host, stillsDir);
238
+ if (files.length !== picks.length) {
239
+ io.stderr(`mk preview: expected ${picks.length} stills, hyperframes wrote ${files.length}\n`);
240
+ return EXIT.ERROR;
241
+ }
242
+ return files;
243
+ }
244
+ const stripNarration = (board) => ({
245
+ ...board,
246
+ scenes: board.scenes.map((entry) => {
247
+ const { narration: _narration, ...scene } = entry;
248
+ return scene;
249
+ }),
250
+ });
251
+ /** Voice total for the full board, or undefined when the manifest cannot resolve yet. */
252
+ async function voiceTotal(io, board, audioManifest) {
253
+ try {
254
+ const parsed = parseAudioManifest(JSON.parse(await io.host.readText(audioManifest)));
255
+ if (!parsed.ok)
256
+ return undefined;
257
+ const timeline = resolveTimeline(board, parsed.manifest);
258
+ return timeline.ok ? timeline.value.total : undefined;
259
+ }
260
+ catch {
261
+ // Unreadable/invalid manifests fail closed in clipDraft below.
262
+ return undefined;
263
+ }
264
+ }
265
+ /** Full-length audible clip: voice-timed build so clip video total equals narration total. */
266
+ async function makeAudibleClip(io, board, projectDir, work, pack, extra, clock, audioManifest, origin, interaction) {
267
+ const clip = await scratch(io, work, "clip", stripNarration(board), projectDir, [], origin, interaction);
268
+ const quiet = captured(io);
269
+ const began = clock();
270
+ const interactionFlags = clip.interaction === undefined ? [] : ["--interaction", clip.interaction];
271
+ const code = await clipDraft.run([
272
+ clip.storyboard,
273
+ "--out",
274
+ clip.project,
275
+ ...extra,
276
+ ...interactionFlags,
277
+ "--audio",
278
+ audioManifest,
279
+ ], quiet.io);
280
+ const ms = clock() - began;
281
+ if (code !== 0) {
282
+ const why = quiet.err.join("").trim().split("\n")[0] ?? "";
283
+ return {
284
+ result: {
285
+ status: "skipped",
286
+ reason: `draft failed (exit ${code}${why === "" ? "" : `: ${why}`})`,
287
+ },
288
+ msPerFrame: undefined,
289
+ };
290
+ }
291
+ await io.host.copyFile(join(clip.project, "draft.mp4"), join(pack, "clip.mp4"));
292
+ const voiceSec = await voiceTotal(io, board, audioManifest);
293
+ const fallback = resolveTimeline(board);
294
+ const sec = voiceSec ?? (fallback.ok ? fallback.value.total : 0);
295
+ return {
296
+ result: { status: "ok", file: "clip.mp4", sec, full: true },
297
+ msPerFrame: ms / Math.max(1, Math.round(sec * DRAFT_FPS)),
298
+ };
299
+ }
300
+ async function makeClip(io, board, projectDir, work, pack, extra, clock, audioManifest, origin, full, interaction) {
301
+ // With --audio or --full the clip is the full review, not a capped trailer.
302
+ if (audioManifest !== undefined) {
303
+ return makeAudibleClip(io, board, projectDir, work, pack, extra, clock, audioManifest, origin, interaction);
304
+ }
305
+ const plan = full
306
+ ? (() => {
307
+ const stripped = stripNarration(board);
308
+ const timeline = resolveTimeline(stripped);
309
+ return { storyboard: stripped, totalSec: timeline.ok ? timeline.value.total : 0 };
310
+ })()
311
+ : capClip(board);
312
+ const clip = await scratch(io, work, "clip", plan.storyboard, projectDir, [], origin, interaction);
313
+ const quiet = captured(io);
314
+ const began = clock();
315
+ const interactionFlags = clip.interaction === undefined ? [] : ["--interaction", clip.interaction];
316
+ const code = await clipDraft.run([clip.storyboard, "--out", clip.project, ...extra, ...interactionFlags], quiet.io);
317
+ const ms = clock() - began;
318
+ if (code !== 0) {
319
+ const why = quiet.err.join("").trim().split("\n")[0] ?? "";
320
+ const reason = `draft failed (exit ${code}${why === "" ? "" : `: ${why}`})`;
321
+ return { result: { status: "skipped", reason }, msPerFrame: undefined };
322
+ }
323
+ await io.host.copyFile(join(clip.project, "draft.mp4"), join(pack, "clip.mp4"));
324
+ const frames = Math.max(1, Math.round(plan.totalSec * DRAFT_FPS));
325
+ return {
326
+ result: { status: "ok", file: "clip.mp4", sec: plan.totalSec, full },
327
+ msPerFrame: ms / frames,
328
+ };
329
+ }
330
+ const summary = (m, pack, storyboard, overlays) => {
331
+ const paired = m.stills.filter((s) => s.theme !== m.theme).length;
332
+ const from = m.template === null
333
+ ? "free storyboard"
334
+ : `template ${m.template} ${m.blueprint} style ${m.style}`;
335
+ const clip = m.clip.status === "ok" ? `clip ${m.clip.sec}s${m.clip.full ? " full" : ""}` : "clip skipped";
336
+ const continuity = m.continuity.status === "warn"
337
+ ? ` | continuity WARN jump ${m.continuity.maxJump ?? "?"} at ${m.continuity.atSec ?? "?"}s`
338
+ : "";
339
+ const est = m.estFullRenderSec === null
340
+ ? "est render n/a"
341
+ : `est render ~${Math.max(1, Math.round(m.estFullRenderSec / 60))}m`;
342
+ return (`preview ok | ${from} | ${m.scenes.length} scenes + ${overlays} overlays ${m.totalSec}s ${m.frame.width}x${m.frame.height} | pack ${pack} | ` +
343
+ `contact.png ${m.stills.length - paired} stills (+${paired} paired) ${clip} | ${est} (estimate) | ` +
344
+ `lint ${m.lint.errors} err ${m.lint.warnings} warn${continuity} | approve: mk approve ${storyboard}\n`);
345
+ };
346
+ const round = (value) => Math.round(value * 100) / 100;
347
+ /** Reads, validates and lints the storyboard; findings go to stderr with exit 2. */
348
+ async function loadBoard(storyboard, io) {
349
+ const loaded = await readJsonFile(storyboard, io.host);
350
+ if (!loaded.ok && loaded.kind === "io") {
351
+ io.stderr(`mk preview: ${loaded.message}\n`);
352
+ return EXIT.USAGE;
353
+ }
354
+ const report = loaded.ok
355
+ ? checkStoryboard(loaded.value, { platforms: await platformLookup(io.host) })
356
+ : { errors: [rootError(loaded.message)], warnings: [] };
357
+ const valid = loaded.ok ? validateStoryboardFull(loaded.value) : undefined;
358
+ if (report.errors.length > 0 || valid === undefined || !valid.ok) {
359
+ io.stderr(formatFindings([...report.errors, ...report.warnings]));
360
+ return EXIT.USAGE;
361
+ }
362
+ const infos = sceneInfos(valid.value);
363
+ if (infos === undefined)
364
+ return EXIT.USAGE;
365
+ const overlays = valid.value.scenes.filter((s) => s.layer === "overlay").length;
366
+ return {
367
+ board: valid.value,
368
+ report,
369
+ infos,
370
+ candidates: stillCandidates(valid.value),
371
+ overlays,
372
+ };
373
+ }
374
+ /** Stills in the storyboard's theme, plus the paired theme for the most distinct scenes. */
375
+ async function shootStills(ctx, pair, spent) {
376
+ const { io, board, projectDir, options, work, clock } = ctx;
377
+ const theme = board.meta.theme;
378
+ const picks = options.every
379
+ ? stillPlan(ctx.infos, ctx.infos.length)
380
+ : stillPlan(ctx.candidates, options.stills);
381
+ const light = await scratch(io, work, "light", board, projectDir, [], ctx.storyboard, ctx.interaction);
382
+ const files = await capture(io, light, picks, options.extra, clock, spent);
383
+ if (typeof files === "number")
384
+ return files;
385
+ const taken = picks.map((pick, i) => ({ pick, theme, source: files[i] ?? "" }));
386
+ if (pair !== undefined) {
387
+ const extra = distinctPicks(picks, DARK_COUNT);
388
+ const paired = { ...board, meta: { ...board.meta, theme: pair.id } };
389
+ const scratchDir = await scratch(io, work, "paired", paired, projectDir, [pair], ctx.storyboard, ctx.interaction);
390
+ const darkFiles = await capture(io, scratchDir, extra, options.extra, clock, spent);
391
+ if (typeof darkFiles === "number")
392
+ return darkFiles;
393
+ for (const [i, pick] of extra.entries()) {
394
+ taken.push({ pick, theme: pair.id, source: darkFiles[i] ?? "" });
395
+ }
396
+ }
397
+ return nameStills(taken, theme);
398
+ }
399
+ /** Copies the named stills into the pack and tiles them into contact.png. */
400
+ async function packStills(ctx, named) {
401
+ const { io, pack, work } = ctx;
402
+ const dir = join(pack, "stills");
403
+ await clearPngs(io.host, dir);
404
+ for (const still of named)
405
+ await io.host.copyFile(still.source, join(dir, still.name));
406
+ const files = named.map((s) => join(dir, s.name));
407
+ return contactSheet(io, files, join(work, "contact.txt"), join(pack, "contact.png"));
408
+ }
409
+ /** The clip, unless the stills already used the budget (then a labelled skip). */
410
+ async function clipOrSkip(ctx, stillsMs) {
411
+ const { io, pack, options, clock, began } = ctx;
412
+ await io.host.remove(join(pack, "clip.mp4"));
413
+ const elapsed = clock() - began;
414
+ if (options.full || shouldRunClip(elapsed, stillsMs, options.budgetSec * MS)) {
415
+ return makeClip(io, ctx.board, ctx.projectDir, ctx.work, pack, options.extra, clock, options.audioManifest, ctx.storyboard, options.full, ctx.interaction);
416
+ }
417
+ const used = `${Math.round(elapsed / MS)} s used of ${options.budgetSec} s`;
418
+ return {
419
+ result: { status: "skipped", reason: `budget: ${used}; raise --budget-sec` },
420
+ msPerFrame: undefined,
421
+ };
422
+ }
423
+ /**
424
+ * Best-effort luminance scan of the produced clip. A large jump at a cut or a
425
+ * near-white/near-black frame is a warning, not a hard failure: a deliberate
426
+ * hard cut can be valid, but the skill must design or justify it.
427
+ */
428
+ async function measureContinuity(io, clipFile) {
429
+ const unknown = {
430
+ status: "unknown",
431
+ maxJump: null,
432
+ atSec: null,
433
+ brightFrames: 0,
434
+ darkFrames: 0,
435
+ };
436
+ const res = await io.run("ffmpeg", [
437
+ "-hide_banner",
438
+ "-nostats",
439
+ "-i",
440
+ clipFile,
441
+ "-vf",
442
+ "signalstats,metadata=print:key=lavfi.signalstats.YAVG",
443
+ "-f",
444
+ "null",
445
+ "-",
446
+ ]);
447
+ const frames = [];
448
+ const lines = (res.stderr || res.stdout).split(/\r?\n/);
449
+ for (let i = 0; i < lines.length; i += 1) {
450
+ const time = /pts_time:([0-9.]+)/.exec(lines[i] ?? "");
451
+ if (time === null)
452
+ continue;
453
+ const avg = /YAVG=([0-9.]+)/.exec(lines[i + 1] ?? "");
454
+ if (avg === null)
455
+ continue;
456
+ frames.push({ t: Number(time[1]), y: Number(avg[1]) });
457
+ }
458
+ if (frames.length === 0)
459
+ return unknown;
460
+ let maxJump = 0;
461
+ let atSec = 0;
462
+ let brightFrames = 0;
463
+ let darkFrames = 0;
464
+ for (let i = 0; i < frames.length; i += 1) {
465
+ const frame = frames[i];
466
+ const previous = frames[i - 1];
467
+ if (frame.y >= 235)
468
+ brightFrames += 1;
469
+ if (frame.y <= 10)
470
+ darkFrames += 1;
471
+ if (previous !== undefined) {
472
+ const jump = Math.abs(frame.y - previous.y);
473
+ if (jump > maxJump) {
474
+ maxJump = jump;
475
+ atSec = frame.t;
476
+ }
477
+ }
478
+ }
479
+ const status = maxJump > 70 || brightFrames > 0 || darkFrames > 0 ? "warn" : "ok";
480
+ return {
481
+ status,
482
+ maxJump: round(maxJump),
483
+ atSec: round(atSec),
484
+ brightFrames,
485
+ darkFrames,
486
+ };
487
+ }
488
+ const stillRow = (s) => ({
489
+ file: `stills/${s.name}`,
490
+ scene: s.pick.id,
491
+ t: s.pick.t,
492
+ theme: s.theme,
493
+ });
494
+ /** The invocation inputs recorded in the pack; absolute so a later `mk approve` matches exactly. */
495
+ const inputsOf = (options) => ({
496
+ assetsDir: options.assetsDir ?? null,
497
+ ledger: options.ledgerPath === undefined ? null : resolve(options.ledgerPath),
498
+ audioManifest: options.audioManifest === undefined ? null : resolve(options.audioManifest),
499
+ music: options.musicPath === undefined ? null : resolve(options.musicPath),
500
+ musicVolume: options.musicVolume ?? null,
501
+ musicLicense: options.musicLicensePath === undefined ? null : resolve(options.musicLicensePath),
502
+ ...(options.interactionPath === undefined
503
+ ? {}
504
+ : { interaction: resolve(options.interactionPath) }),
505
+ });
506
+ function manifestOf(ctx, facts) {
507
+ const { board, infos, report, options } = ctx;
508
+ const { provenance, clip } = facts;
509
+ const totalSec = round(Math.max(...infos.map((i) => i.start + i.duration)));
510
+ const estimate = clip.msPerFrame === undefined
511
+ ? null
512
+ : Math.round((clip.msPerFrame * totalSec * board.meta.fps) / MS);
513
+ const { width, height, fps } = board.meta;
514
+ const checklist = CHECKLIST.map((item) => item.id === "not-shown" && facts.audioMix.audible
515
+ ? {
516
+ ...item,
517
+ text: facts.audioMix.musicSha === null
518
+ ? "the user knows what is NOT previewed: motion between stills and any scene without a still"
519
+ : "the user knows what is NOT previewed: motion between stills and any scene without a still (music bed included in clip)",
520
+ }
521
+ : { ...item });
522
+ return {
523
+ hash: facts.hash,
524
+ inputManifest: facts.inputManifest,
525
+ inputManifestSha256: facts.inputManifestSha256,
526
+ storyboard: basename(ctx.storyboard),
527
+ inputs: inputsOf(options),
528
+ template: provenance?.template ?? null,
529
+ blueprint: provenance?.blueprint ?? null,
530
+ style: provenance?.style ?? null,
531
+ theme: board.meta.theme,
532
+ pair: facts.pair?.id ?? null,
533
+ frame: { width, height, fps },
534
+ totalSec,
535
+ scenes: infos.map((i) => ({ id: i.id, type: i.type, start: i.start, duration: i.duration })),
536
+ stills: facts.named.map(stillRow),
537
+ contact: "contact.png",
538
+ clip: clip.result,
539
+ continuity: facts.continuity,
540
+ estFullRenderSec: estimate,
541
+ estimateNote: ESTIMATE_NOTE,
542
+ lint: {
543
+ errors: report.errors.length,
544
+ warnings: report.warnings.length,
545
+ items: report.warnings.slice(0, MAX_LINT_ITEMS).map((w) => `${w.path || "/"}: ${w.message}`),
546
+ },
547
+ budgetSec: options.budgetSec,
548
+ elapsedSec: round((ctx.clock() - ctx.began) / MS),
549
+ audioMix: facts.audioMix,
550
+ checklist: checklist.map((item) => ({ ...item, done: false })),
551
+ };
552
+ }
553
+ /** Parses flags, loads and validates the storyboard; an exit code on any problem (or `--help`). */
554
+ async function start(args, io, clock) {
555
+ const parsed = parseFlags("preview", USAGE, args, FLAGS, io);
556
+ if (parsed.kind === "exit")
557
+ return parsed.code;
558
+ const storyboard = requireStoryboard("preview", USAGE, parsed.positionals, io);
559
+ if (typeof storyboard !== "string")
560
+ return storyboard.code;
561
+ const options = readOptions(parsed.flags, storyboard, io);
562
+ if (typeof options === "number")
563
+ return options;
564
+ const began = clock();
565
+ const loaded = await loadBoard(storyboard, io);
566
+ if (typeof loaded === "number")
567
+ return loaded;
568
+ const resolved = options.interactionPath === undefined
569
+ ? undefined
570
+ : await resolveInteraction("preview", storyboard, options.interactionPath, io);
571
+ if (resolved !== undefined && !resolved.ok)
572
+ return resolved.code;
573
+ const narrated = loaded.board.scenes.some((scene) => scene.layer !== "overlay" && (scene.narration?.trim() ?? "") !== "");
574
+ if (narrated && options.audioManifest === undefined && !options.allowSilent) {
575
+ io.stderr("mk preview: this board has narration but no --audio. Run `mk voice <storyboard> --preset <id>`, then preview with --audio <manifest> --full; pass --allow-silent only when the user explicitly wants silent output.\n");
576
+ return EXIT.USAGE;
577
+ }
578
+ const ctx = {
579
+ ...loaded,
580
+ io,
581
+ storyboard,
582
+ options,
583
+ ...(resolved === undefined ? {} : { interaction: resolved.interaction }),
584
+ projectDir: dirname(resolve(storyboard)),
585
+ work: `${packDir(options.out, storyboard)}-work`,
586
+ pack: packDir(options.out, storyboard),
587
+ clock,
588
+ began,
589
+ };
590
+ return { ctx, json: parsed.flags.json === true };
591
+ }
592
+ /** `mk preview`; `env` and `clock` are injectable for tests. */
593
+ const resolvePreview = async (io, ctx) => {
594
+ try {
595
+ const manifest = await buildApprovalInputManifest(io.host, ctx.storyboard, {
596
+ ...(ctx.options.assetsDir === undefined ? {} : { assetsDir: ctx.options.assetsDir }),
597
+ ...(ctx.options.ledgerPath === undefined ? {} : { ledgerPath: ctx.options.ledgerPath }),
598
+ ...(ctx.options.audioManifest === undefined
599
+ ? {}
600
+ : { audioManifest: ctx.options.audioManifest }),
601
+ ...(ctx.options.musicPath === undefined ? {} : { music: ctx.options.musicPath }),
602
+ ...(ctx.options.musicVolume === undefined ? {} : { musicVolume: ctx.options.musicVolume }),
603
+ ...(ctx.options.musicLicensePath === undefined
604
+ ? {}
605
+ : { musicLicense: ctx.options.musicLicensePath }),
606
+ ...(ctx.options.interactionPath === undefined
607
+ ? {}
608
+ : { interaction: ctx.options.interactionPath }),
609
+ });
610
+ return { manifest, sha: hashApprovalInput(manifest) };
611
+ }
612
+ catch (error) {
613
+ const hint = ctx.options.audioManifest === undefined
614
+ ? ""
615
+ : `; rerun \`mk preview ${ctx.storyboard} --audio ${ctx.options.audioManifest}\` after fixing the audio inputs`;
616
+ io.stderr(`mk preview: ${error.message}${hint}\n`);
617
+ return EXIT.USAGE;
618
+ }
619
+ };
620
+ const SILENT_AUDIO_MIX = {
621
+ manifestSha: null,
622
+ wavSha: null,
623
+ audible: false,
624
+ musicSha: null,
625
+ musicVolume: null,
626
+ musicLicenseSha: null,
627
+ };
628
+ /** Builds the `--audio`/`--music` flag text used in rerun hints. */
629
+ const previewAudioFlags = (opts) => [
630
+ ...(opts.audioManifest === undefined ? [] : [`--audio ${opts.audioManifest}`]),
631
+ ...(opts.musicPath === undefined ? [] : [`--music ${opts.musicPath}`]),
632
+ ...(opts.musicVolume === undefined ? [] : [`--music-volume ${opts.musicVolume}`]),
633
+ ...(opts.musicLicensePath === undefined ? [] : [`--music-license ${opts.musicLicensePath}`]),
634
+ ].join(" ");
635
+ /**
636
+ * Mixes the exact final inputs under the preview clip with the same args as the
637
+ * final render. Narration is optional: a valid bed with no `--audio` is a
638
+ * music-only film sized by the picture duration, not a usage error or silence.
639
+ */
640
+ const mixPreviewClip = async (io, pack, work, audioManifest, storyboard, expected, musicOpts = {}, durationSec) => {
641
+ const flags = previewAudioFlags({
642
+ ...(audioManifest === undefined ? {} : { audioManifest }),
643
+ ...musicOpts,
644
+ });
645
+ const rerun = `rerun \`mk preview ${storyboard}${flags === "" ? "" : ` ${flags}`}\` after fixing the audio inputs`;
646
+ let manifestSha = null;
647
+ let wavSha = null;
648
+ let clips = [];
649
+ let frozenNarration = [];
650
+ // AU-01: freeze the exact bytes ffmpeg consumes (ABA-proof) and mix with the
651
+ // same build authority as the final render (no second pipeline).
652
+ const frozenDir = join(work, ".frozen-audio");
653
+ const checks = [];
654
+ if (audioManifest !== undefined) {
655
+ let text;
656
+ try {
657
+ text = await io.host.readText(audioManifest);
658
+ }
659
+ catch (error) {
660
+ io.stderr(`mk preview: cannot read --audio manifest: ${error.message}; ${rerun}\n`);
661
+ return EXIT.USAGE;
662
+ }
663
+ let raw;
664
+ try {
665
+ raw = JSON.parse(text);
666
+ }
667
+ catch (error) {
668
+ io.stderr(`mk preview: invalid --audio manifest: ${error.message}; ${rerun}\n`);
669
+ return EXIT.USAGE;
670
+ }
671
+ const parsed = parseAudioManifest(raw);
672
+ if (!parsed.ok) {
673
+ io.stderr(`mk preview: invalid --audio manifest: ${parsed.problems.join("; ")}; ${rerun}\n`);
674
+ return EXIT.USAGE;
675
+ }
676
+ const audioDir = join(dirname(resolve(audioManifest)), AUDIO_DIR_NAME);
677
+ // Place the voice sequence on the film timeline (transitions start scenes
678
+ // early), not on the manifest's cumulative starts.
679
+ const boardLoaded = await readJsonFile(storyboard, io.host);
680
+ const validBoard = boardLoaded.ok ? validateStoryboardFull(boardLoaded.value) : undefined;
681
+ const timeline = validBoard?.ok === true ? resolveTimeline(validBoard.value, parsed.manifest) : undefined;
682
+ const placements = timeline?.ok === true ? placementsFromTimeline(timeline.value) : undefined;
683
+ clips = clipsFromManifest(parsed.manifest, audioDir, placements);
684
+ if (clips.length === 0) {
685
+ io.stderr(`mk preview: --audio manifest has no scenes; nothing to mix; ${rerun}\n`);
686
+ return EXIT.USAGE;
687
+ }
688
+ for (const clip of clips) {
689
+ const digest = await io.host.sha256File(clip.wav);
690
+ if (digest === undefined) {
691
+ io.stderr(`mk preview: missing narration wav for scene "${clip.id}": ${clip.wav}; ${rerun}\n`);
692
+ return EXIT.USAGE;
693
+ }
694
+ // AU-01 MEDIUM: ungated --audio must reject silent wavs like the manifest
695
+ // path does (EMPTY_SHA256); never mix silence as narration.
696
+ if (digest === "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") {
697
+ io.stderr(`mk preview: narration wav is silent/empty for scene "${clip.id}": ${clip.wav}; ${rerun}\n`);
698
+ return EXIT.USAGE;
699
+ }
700
+ }
701
+ frozenNarration = frozenClips(clips, frozenDir);
702
+ const frozenDigests = [];
703
+ try {
704
+ for (const [index, clip] of frozenNarration.entries()) {
705
+ const source = clips[index];
706
+ if (source === undefined)
707
+ continue;
708
+ await io.host.copyFile(source.wav, clip.wav);
709
+ const frozenSha = await io.host.sha256File(clip.wav);
710
+ frozenDigests.push(frozenSha ?? "");
711
+ checks.push({
712
+ label: `narration "${clip.id}"`,
713
+ actualSha256: frozenSha,
714
+ expectedSha256: expected.mix?.clips[index]?.wavSha,
715
+ });
716
+ }
717
+ }
718
+ catch (error) {
719
+ io.stderr(`mk preview: cannot freeze narration wavs: ${error.message}; ${rerun}\n`);
720
+ return EXIT.ERROR;
721
+ }
722
+ manifestSha = createHash("sha256").update(text).digest("hex");
723
+ wavSha = createHash("sha256").update(frozenDigests.join("\n")).digest("hex");
724
+ }
725
+ // RA-02: never certify audible from hashes alone. The clip must exist and
726
+ // the mix must succeed before audible:true is returned.
727
+ const clipFile = join(pack, "clip.mp4");
728
+ if (!(await io.host.exists(clipFile))) {
729
+ io.stderr(`mk preview: audible output requires a playable clip but ${clipFile} is missing (clip skipped or failed); raise --budget-sec and ${rerun}\n`);
730
+ return EXIT.USAGE;
731
+ }
732
+ const mixedFile = join(pack, "clip-audible.mp4");
733
+ let mixBed;
734
+ let musicSha = null;
735
+ let musicVolume = null;
736
+ let musicLicenseSha = null;
737
+ if (musicOpts.musicPath !== undefined) {
738
+ const validated = validateMusicBed(musicOpts.musicVolume === undefined
739
+ ? { wav: musicOpts.musicPath }
740
+ : { wav: musicOpts.musicPath, volume: musicOpts.musicVolume });
741
+ if (!validated.ok) {
742
+ io.stderr(`mk preview: invalid --music bed: ${validated.hint}; ${rerun}\n`);
743
+ return EXIT.USAGE;
744
+ }
745
+ const bedDigest = await io.host.sha256File(musicOpts.musicPath);
746
+ if (bedDigest === undefined) {
747
+ io.stderr(`mk preview: music bed wav not found: ${musicOpts.musicPath}; ${rerun}\n`);
748
+ return EXIT.USAGE;
749
+ }
750
+ if (bedDigest === "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") {
751
+ io.stderr(`mk preview: music bed wav is silent/empty: ${musicOpts.musicPath}; ${rerun}\n`);
752
+ return EXIT.USAGE;
753
+ }
754
+ if (musicOpts.musicLicensePath !== undefined) {
755
+ const licDigest = await io.host.sha256File(musicOpts.musicLicensePath);
756
+ if (licDigest === undefined) {
757
+ io.stderr(`mk preview: cannot read --music-license ${musicOpts.musicLicensePath}: not found; ${rerun}\n`);
758
+ return EXIT.USAGE;
759
+ }
760
+ musicLicenseSha = licDigest;
761
+ }
762
+ const frozenBed = frozenMusic({ wav: musicOpts.musicPath, volume: validated.bed.volume }, frozenDir);
763
+ try {
764
+ await io.host.copyFile(musicOpts.musicPath, frozenBed.wav);
765
+ }
766
+ catch (error) {
767
+ io.stderr(`mk preview: cannot freeze music bed: ${error.message}; ${rerun}\n`);
768
+ return EXIT.ERROR;
769
+ }
770
+ const frozenBedSha = await io.host.sha256File(frozenBed.wav);
771
+ checks.push({
772
+ label: "music bed",
773
+ actualSha256: frozenBedSha,
774
+ expectedSha256: expected.music?.sha256,
775
+ });
776
+ if (musicLicenseSha !== null) {
777
+ checks.push({
778
+ label: "music license evidence",
779
+ actualSha256: musicLicenseSha,
780
+ expectedSha256: expected.music?.licenseEvidenceSha256 ?? undefined,
781
+ });
782
+ }
783
+ musicSha = frozenBedSha ?? null;
784
+ musicVolume = validated.bed.volume;
785
+ mixBed = frozenBed;
786
+ }
787
+ // ADR-0008 D2: the audible clip must mix the bytes the preview manifest
788
+ // describes. An edit during the copy that is restored before the post-media
789
+ // re-resolve is invisible to that re-resolve; the frozen copy is not. The
790
+ // clip list must also still line up with the manifest's mix (count, id,
791
+ // start, mode): the manifest is re-read for the mix, so an extra or reordered
792
+ // clip must not ride along on matching file digests.
793
+ const frozenProblems = frozenCopyProblems(checks);
794
+ if (expected.mix !== undefined) {
795
+ if (expected.mix.clips.length !== clips.length) {
796
+ frozenProblems.push(`the previewed mix has ${expected.mix.clips.length} clips but ${clips.length} were prepared`);
797
+ }
798
+ for (const [index, clip] of clips.entries()) {
799
+ const want = expected.mix.clips[index];
800
+ if (want !== undefined && (want.id !== clip.id || want.start !== clip.start)) {
801
+ frozenProblems.push(`narration ${index + 1} does not match the previewed clip "${want.id}" at ${want.start}s`);
802
+ }
803
+ }
804
+ const mode = clips.length === 1 ? "single" : isContiguous(clips) ? "concat" : "adelay";
805
+ if (expected.mix.mode !== mode) {
806
+ frozenProblems.push(`the previewed mix mode "${expected.mix.mode}" does not match "${mode}"`);
807
+ }
808
+ }
809
+ if (frozenProblems.length > 0) {
810
+ io.stderr(`mk preview: inputs changed while the pack was produced; the pack was not written (${frozenProblems.join("; ")}); ${rerun}\n`);
811
+ return EXIT.USAGE;
812
+ }
813
+ const delivery = await mixAtDeliveryLevel((argv) => io.run("ffmpeg", argv), {
814
+ videoIn: clipFile,
815
+ clips: frozenNarration,
816
+ ...(mixBed === undefined ? {} : { music: mixBed }),
817
+ ...(durationSec === undefined ? {} : { durationSec }),
818
+ out: mixedFile,
819
+ swap: async (from, to) => {
820
+ await io.host.copyFile(from, to);
821
+ await io.host.remove(from);
822
+ },
823
+ });
824
+ if (!delivery.ok) {
825
+ const why = delivery.problems[0] ?? "";
826
+ io.stderr(`mk preview: audible clip mix failed${why === "" ? "" : `: ${why}`}; ${rerun}\n`);
827
+ return EXIT.ERROR;
828
+ }
829
+ if (!(await io.host.exists(mixedFile))) {
830
+ io.stderr(`mk preview: audible clip mix produced no file; ${rerun}\n`);
831
+ return EXIT.ERROR;
832
+ }
833
+ await io.host.copyFile(mixedFile, clipFile);
834
+ await io.host.remove(mixedFile);
835
+ return { manifestSha, wavSha, audible: true, musicSha, musicVolume, musicLicenseSha };
836
+ };
837
+ export const makePreviewCommand = (env = defaultEnv, clock = () => performance.now()) => ({
838
+ name: "preview",
839
+ summary: "build the short proposal pack (contact sheet, stills, clip) for approval",
840
+ async run(args, io) {
841
+ const started = await start(args, io, clock);
842
+ if (typeof started === "number")
843
+ return started;
844
+ const { ctx, json } = started;
845
+ // Never leave a stale manifest from an interrupted earlier run next to a
846
+ // different clip. The new manifest is written only after all media exists.
847
+ await io.host.remove(join(ctx.pack, PREVIEW_JSON));
848
+ const { storyboard } = ctx;
849
+ const provenance = await readProvenance(io.host, storyboard);
850
+ const pair = resolvePair(env(), io, provenance, ctx.board.meta.theme);
851
+ const spent = { ms: 0 };
852
+ // RA-01: freeze the approval identity before any media is produced. The
853
+ // post-media re-resolve below must match, or the pack is unusable: the
854
+ // identity must describe the bytes the reviewer actually saw.
855
+ const snapshot = await resolvePreview(io, ctx);
856
+ if (typeof snapshot === "number")
857
+ return snapshot;
858
+ const frozenHash = await storyboardHash(io.host, storyboard);
859
+ const named = await shootStills(ctx, pair, spent);
860
+ if (typeof named === "number")
861
+ return named;
862
+ const packed = await packStills(ctx, named);
863
+ if (packed !== EXIT.OK)
864
+ return packed;
865
+ const clip = await clipOrSkip(ctx, spent.ms);
866
+ const continuity = clip.result.status === "ok"
867
+ ? await measureContinuity(io, join(ctx.pack, "clip.mp4"))
868
+ : {
869
+ status: "unknown",
870
+ maxJump: null,
871
+ atSec: null,
872
+ brightFrames: 0,
873
+ darkFrames: 0,
874
+ };
875
+ if (continuity.status === "warn") {
876
+ io.stderr(`mk preview: continuity WARN (jump ${continuity.maxJump ?? "?"} at ${continuity.atSec ?? "?"}s); change the cut with a crossfade/match/bridge and re-preview --full before asking for approval\n`);
877
+ }
878
+ let audioMix;
879
+ const musicOnly = ctx.options.audioManifest === undefined && ctx.options.musicPath !== undefined;
880
+ if (ctx.options.audioManifest === undefined && !musicOnly) {
881
+ audioMix = SILENT_AUDIO_MIX;
882
+ }
883
+ else {
884
+ // RA-02: an audiovisual pack is only audible after a playable mixed
885
+ // clip exists. A budget-skipped clip never certifies from hashes. A
886
+ // music-only film is audiovisual too: the bed is its only sound.
887
+ if (clip.result.status !== "ok") {
888
+ const why = clip.result.status === "skipped" ? ` (${clip.result.reason})` : " (missing)";
889
+ const flags = previewAudioFlags({
890
+ ...(ctx.options.audioManifest === undefined
891
+ ? {}
892
+ : { audioManifest: ctx.options.audioManifest }),
893
+ ...(ctx.options.musicPath === undefined ? {} : { musicPath: ctx.options.musicPath }),
894
+ ...(ctx.options.musicVolume === undefined
895
+ ? {}
896
+ : { musicVolume: ctx.options.musicVolume }),
897
+ ...(ctx.options.musicLicensePath === undefined
898
+ ? {}
899
+ : { musicLicensePath: ctx.options.musicLicensePath }),
900
+ });
901
+ io.stderr(`mk preview: ${musicOnly ? "--music" : "--audio"} requires an audible clip but the clip was skipped${why}; raise --budget-sec and rerun \`mk preview ${storyboard}${flags === "" ? "" : ` ${flags}`}\`\n`);
902
+ return EXIT.USAGE;
903
+ }
904
+ const mixed = await mixPreviewClip(io, ctx.pack, ctx.work, ctx.options.audioManifest, storyboard, snapshot.manifest, {
905
+ ...(ctx.options.musicPath === undefined ? {} : { musicPath: ctx.options.musicPath }),
906
+ ...(ctx.options.musicVolume === undefined
907
+ ? {}
908
+ : { musicVolume: ctx.options.musicVolume }),
909
+ ...(ctx.options.musicLicensePath === undefined
910
+ ? {}
911
+ : { musicLicensePath: ctx.options.musicLicensePath }),
912
+ }, Math.max(...ctx.infos.map((info) => info.start + info.duration)));
913
+ if (typeof mixed === "number")
914
+ return mixed;
915
+ audioMix = mixed;
916
+ }
917
+ // RA-01: an edit that landed while stills/clip/mix ran must not silently
918
+ // rebind the pack to bytes the reviewer never saw. Fail closed without
919
+ // writing preview.json; `mk approve` also rechecks the binding.
920
+ const reverified = await resolvePreview(io, ctx);
921
+ if (typeof reverified === "number")
922
+ return reverified;
923
+ if (reverified.sha !== snapshot.sha) {
924
+ io.stderr(`mk preview: inputs changed while the pack was produced; the pack was not written. Rerun \`mk preview ${storyboard}\`.\n`);
925
+ return EXIT.USAGE;
926
+ }
927
+ const manifest = manifestOf(ctx, {
928
+ hash: frozenHash,
929
+ inputManifest: snapshot.manifest,
930
+ inputManifestSha256: snapshot.sha,
931
+ provenance,
932
+ pair,
933
+ named,
934
+ clip,
935
+ continuity,
936
+ audioMix,
937
+ });
938
+ const text = `${JSON.stringify(manifest, null, 2)}\n`;
939
+ await io.host.writeTextAtomic(join(ctx.pack, PREVIEW_JSON), text);
940
+ io.stdout(json ? text : summary(manifest, ctx.pack, storyboard, ctx.overlays));
941
+ io.stderr(formatFindings(ctx.report.warnings.slice(0, MAX_LINT_ITEMS)));
942
+ return EXIT.OK;
943
+ },
944
+ });
945
+ export const previewCommand = makePreviewCommand();