@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,165 @@
1
+ import { basename, join, resolve } from "node:path";
2
+ import { AssetLedgerSchema } from "@anvpx/motion-schema";
3
+ import { parseFlags, textFlag, usageError } from "../args.js";
4
+ import { EXIT } from "../exit-codes.js";
5
+ const USAGE = `mk assets import <file...> --dir <assets dir> --licence <spdx> --source-url <url> [--attribution <text>] [--ledger <file>] [--json]
6
+
7
+ Copy local files into <assets dir>, hash the copied bytes and append one ledger row per file
8
+ (path, sourceUrl, licence, attribution, sha256). Re-running the same call is a no-op when the
9
+ bytes match; a different hash at an existing path exits 2 naming the file. Remote URLs are refused.
10
+ --dir <d> destination directory (created when missing)
11
+ --licence <id> SPDX identifier for every file in this call (required)
12
+ --source-url <u> provenance URL for every file in this call (required; the ledger schema needs it)
13
+ --attribution <t> optional attribution text for every file in this call
14
+ --ledger <f> ledger path (default <dir>/assets.json)
15
+ --json print one JSON summary line
16
+ `;
17
+ const FLAGS = {
18
+ dir: { type: "string" },
19
+ licence: { type: "string" },
20
+ "source-url": { type: "string" },
21
+ attribution: { type: "string" },
22
+ ledger: { type: "string" },
23
+ json: { type: "boolean" },
24
+ };
25
+ const REMOTE = /^[a-z][a-z0-9+.-]*:\/\//i;
26
+ /** One `import` file: refused when remote, unreadable or nameless. */
27
+ async function inspectFile(file, io) {
28
+ if (REMOTE.test(file)) {
29
+ io.stderr(`mk assets import: refusing remote path "${file}"; download it first\n`);
30
+ return EXIT.USAGE;
31
+ }
32
+ const name = basename(file);
33
+ if (name === "" || name === "." || name === "..") {
34
+ io.stderr(`mk assets import: cannot import "${file}": it has no file name\n`);
35
+ return EXIT.USAGE;
36
+ }
37
+ if (!(await io.host.exists(file))) {
38
+ io.stderr(`mk assets import: no such file "${file}"\n`);
39
+ return EXIT.USAGE;
40
+ }
41
+ const sha256 = await io.host.sha256File(file);
42
+ if (sha256 === undefined) {
43
+ io.stderr(`mk assets import: cannot hash "${file}"\n`);
44
+ return EXIT.USAGE;
45
+ }
46
+ return { name, sha256 };
47
+ }
48
+ /** Reads and validates the ledger; a missing file starts an empty ledger. */
49
+ async function readLedger(path, io) {
50
+ if (!(await io.host.exists(path)))
51
+ return [];
52
+ let parsed;
53
+ try {
54
+ parsed = JSON.parse(await io.host.readText(path));
55
+ }
56
+ catch (error) {
57
+ io.stderr(`mk assets import: cannot read ledger ${path}: ${error.message}\n`);
58
+ return EXIT.USAGE;
59
+ }
60
+ const valid = AssetLedgerSchema.safeParse(parsed);
61
+ if (!valid.success) {
62
+ const problems = valid.error.issues
63
+ .map((issue) => `${issue.path.join("/") || "/"}: ${issue.message}`)
64
+ .join("; ");
65
+ io.stderr(`mk assets import: ledger ${path} is invalid: ${problems}\n`);
66
+ return EXIT.USAGE;
67
+ }
68
+ return [...valid.data];
69
+ }
70
+ /** Copies one file and returns the ledger row; exits 2 when the existing path has other bytes. */
71
+ async function importOne(file, inspected, dir, rows, shared, io) {
72
+ const existing = rows.find((row) => row.path === inspected.name);
73
+ if (existing !== undefined && existing.sha256 !== inspected.sha256) {
74
+ io.stderr(`mk assets import: "${inspected.name}" already has different bytes in the ledger (${existing.sha256.slice(0, 12)} != ${inspected.sha256.slice(0, 12)}); remove the row or rename the file\n`);
75
+ return EXIT.USAGE;
76
+ }
77
+ if (existing !== undefined) {
78
+ return {
79
+ row: { file, path: inspected.name, sha256: inspected.sha256 },
80
+ skipped: true,
81
+ };
82
+ }
83
+ const destination = join(dir, inspected.name);
84
+ try {
85
+ await io.host.copyFile(file, destination);
86
+ }
87
+ catch (error) {
88
+ io.stderr(`mk assets import: cannot copy "${file}" to ${destination}: ${error.message}\n`);
89
+ return EXIT.USAGE;
90
+ }
91
+ const copied = await io.host.sha256File(destination);
92
+ if (copied !== inspected.sha256) {
93
+ io.stderr(`mk assets import: "${file}" changed while copying; nothing written\n`);
94
+ return EXIT.ERROR;
95
+ }
96
+ rows.push({
97
+ path: inspected.name,
98
+ sourceUrl: shared.sourceUrl,
99
+ licence: shared.licence,
100
+ ...(shared.attribution === undefined ? {} : { attribution: shared.attribution }),
101
+ sha256: inspected.sha256,
102
+ });
103
+ return { row: { file, path: inspected.name, sha256: inspected.sha256 }, skipped: false };
104
+ }
105
+ const byPath = (a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0;
106
+ export const assetsCommand = {
107
+ name: "assets",
108
+ summary: "import local asset files into a directory with validated ledger rows",
109
+ async run(args, io) {
110
+ const [subcommand, ...files] = args;
111
+ if (subcommand !== "import") {
112
+ return usageError("assets", USAGE, 'expected "import"', io).code;
113
+ }
114
+ const parsed = parseFlags("assets", USAGE, files, FLAGS, io);
115
+ if (parsed.kind === "exit")
116
+ return parsed.code;
117
+ const sources = parsed.positionals;
118
+ if (sources.length === 0) {
119
+ return usageError("assets", USAGE, "missing <file...>", io).code;
120
+ }
121
+ const dirFlag = textFlag(parsed.flags, "dir");
122
+ if (dirFlag === undefined) {
123
+ return usageError("assets", USAGE, "--dir <assets dir> is required", io).code;
124
+ }
125
+ const licence = textFlag(parsed.flags, "licence");
126
+ if (licence === undefined || licence.trim() === "") {
127
+ return usageError("assets", USAGE, "--licence <spdx> is required", io).code;
128
+ }
129
+ const sourceUrl = textFlag(parsed.flags, "source-url");
130
+ if (sourceUrl === undefined || sourceUrl.trim() === "") {
131
+ return usageError("assets", USAGE, "--source-url <url> is required (the ledger row needs provenance)", io).code;
132
+ }
133
+ const attribution = textFlag(parsed.flags, "attribution");
134
+ const dir = resolve(dirFlag);
135
+ const ledgerPath = resolve(textFlag(parsed.flags, "ledger") ?? join(dir, "assets.json"));
136
+ const rows = await readLedger(ledgerPath, io);
137
+ if (typeof rows === "number")
138
+ return rows;
139
+ const summary = { imported: [], skipped: [] };
140
+ for (const file of sources) {
141
+ const inspected = await inspectFile(file, io);
142
+ if (typeof inspected === "number")
143
+ return inspected;
144
+ const result = await importOne(file, inspected, dir, rows, {
145
+ sourceUrl,
146
+ licence,
147
+ ...(attribution === undefined ? {} : { attribution }),
148
+ }, io);
149
+ if (typeof result === "number")
150
+ return result;
151
+ (result.skipped ? summary.skipped : summary.imported).push(result.row);
152
+ }
153
+ if (summary.imported.length > 0) {
154
+ const text = `${JSON.stringify([...rows].sort(byPath), null, 2)}\n`;
155
+ await io.host.writeTextAtomic(ledgerPath, text);
156
+ }
157
+ if (parsed.flags.json === true) {
158
+ io.stdout(`${JSON.stringify({ ok: true, ledger: ledgerPath, ...summary })}\n`);
159
+ }
160
+ else {
161
+ io.stdout(`assets import ok | ${summary.imported.length} imported, ${summary.skipped.length} unchanged -> ${ledgerPath}\n`);
162
+ }
163
+ return EXIT.OK;
164
+ },
165
+ };
@@ -0,0 +1,16 @@
1
+ import type { Command } from "../types.ts";
2
+ type BuiltWord = {
3
+ w: string;
4
+ start: number;
5
+ end: number;
6
+ };
7
+ /**
8
+ * Split a scene into cue chunks of at most CUE_MAX_WORDS, **on clause
9
+ * boundaries first**. A cue that starts mid-clause ("in it is built, one cue at a
10
+ * time.") is the defect this avoids: a blind review of the first 3D film caught
11
+ * exactly that, so the splitter now prefers a sentence end, then a comma near the
12
+ * cap, and only cuts blind when there is no boundary at all.
13
+ */
14
+ export declare const splitCueWords: (words: readonly BuiltWord[]) => BuiltWord[][];
15
+ export declare const captionsCommand: Command;
16
+ export {};
@@ -0,0 +1,462 @@
1
+ import { resolveTimeline, validateStoryboardFull } from "@anvpx/motion-build";
2
+ import { TimingManifestSchema } from "@anvpx/motion-schema";
3
+ import { parseFlags, textFlag, usageError } from "../args.js";
4
+ import { EXIT } from "../exit-codes.js";
5
+ import { readJsonFile } from "../storyboard/load.js";
6
+ import { formatErrors } from "../template/env.js";
7
+ import { wordTimingBlocker } from "../voice/portability.js";
8
+ import { formatSrt, formatVtt, parseCues } from "./cues.js";
9
+ const USAGE = `mk captions [<voice-manifest.json>] [--storyboard <board.json>] [--out ops.json] [--srt <file>] [--vtt <file>] [--from-srt <file> | --from-vtt <file>] [--json]
10
+
11
+ Turn voice word timings into one karaoke caption overlay per narrated scene, written as RFC 6902
12
+ \`add\` operations for \`mk patch --ops\`. Words are shifted to scene-relative time; words past the
13
+ scene's authored/auto duration are omitted and reported per scene, never silently kept.
14
+ --storyboard b the storyboard the manifest belongs to (required to emit ops)
15
+ --out f write the ops JSON array here (default: print it on stdout)
16
+ --srt f also export the manifest as SRT
17
+ --vtt f also export the manifest as WebVTT
18
+ --from-srt f instead of a manifest: convert SRT cues into caption overlays (needs --storyboard)
19
+ --from-vtt f instead of a manifest: convert WebVTT cues into caption overlays (needs --storyboard)
20
+ --fail-on-skip refuse the import when any SRT/VTT cue is malformed and skipped
21
+ `;
22
+ const FLAGS = {
23
+ storyboard: { type: "string" },
24
+ out: { type: "string" },
25
+ srt: { type: "string" },
26
+ vtt: { type: "string" },
27
+ "from-srt": { type: "string" },
28
+ "from-vtt": { type: "string" },
29
+ json: { type: "boolean" },
30
+ "fail-on-skip": { type: "boolean" },
31
+ };
32
+ const round = (value) => Math.round(value * 1000) / 1000;
33
+ const CAPTION_MAX_TEXT = 140;
34
+ const baseTimeline = (board) => {
35
+ const timeline = resolveTimeline(board);
36
+ if (!timeline.ok)
37
+ return EXIT.USAGE;
38
+ return timeline.value.scenes.map((scene) => ({
39
+ id: scene.id,
40
+ start: scene.start,
41
+ duration: scene.duration,
42
+ }));
43
+ };
44
+ /** A4/A1: words on the scene clock, clamped to the authored/auto bound; never overlaps. */
45
+ const sceneWords = (row, bound, fallback) => {
46
+ const source = row.words && row.words.length > 0 ? row.words : fallback;
47
+ const words = [];
48
+ let omitted = 0;
49
+ let cursor = 0;
50
+ for (const word of source) {
51
+ const start = round(Math.max(0, word.start - row.start));
52
+ const end = round(Math.min(bound, word.end - row.start));
53
+ if (start >= bound - 1e-6 || end <= start || start < cursor) {
54
+ omitted += 1;
55
+ continue;
56
+ }
57
+ words.push({ w: word.w, start, end });
58
+ cursor = end;
59
+ }
60
+ return { words, omitted };
61
+ };
62
+ /** Cue budget: broadcast captions rarely hold more than this many words. */
63
+ const CUE_MAX_WORDS = 12;
64
+ const SENTENCE_END = /[.!?…]$/;
65
+ const CLAUSE_END = /[,;:—–]$/;
66
+ /**
67
+ * Split a scene into cue chunks of at most CUE_MAX_WORDS, **on clause
68
+ * boundaries first**. A cue that starts mid-clause ("in it is built, one cue at a
69
+ * time.") is the defect this avoids: a blind review of the first 3D film caught
70
+ * exactly that, so the splitter now prefers a sentence end, then a comma near the
71
+ * cap, and only cuts blind when there is no boundary at all.
72
+ */
73
+ export const splitCueWords = (words) => {
74
+ if (words.length === 0)
75
+ return [[]];
76
+ /** @type {BuiltWord[][]} */
77
+ const sentences = [];
78
+ let run = [];
79
+ for (const word of words) {
80
+ run.push(word);
81
+ if (SENTENCE_END.test(word.w)) {
82
+ sentences.push(run);
83
+ run = [];
84
+ }
85
+ }
86
+ if (run.length > 0)
87
+ sentences.push(run);
88
+ const cues = [];
89
+ for (const sentence of sentences) {
90
+ if (sentence.length === 0)
91
+ continue;
92
+ if (sentence.length <= CUE_MAX_WORDS) {
93
+ cues.push(sentence);
94
+ continue;
95
+ }
96
+ // An over-long sentence keeps the even chunk size it always had, but a clause
97
+ // end within two words of a cut wins: a cue must not start mid-clause for the
98
+ // sake of an exact word count.
99
+ const count = Math.ceil(sentence.length / CUE_MAX_WORDS);
100
+ const size = Math.ceil(sentence.length / count);
101
+ const clauseAt = (index) => {
102
+ const word = sentence[index];
103
+ return word !== undefined && CLAUSE_END.test(word.w);
104
+ };
105
+ let start = 0;
106
+ const MIN_PIECE = 4;
107
+ while (sentence.length - start > CUE_MAX_WORDS) {
108
+ let cut = start + size;
109
+ for (let shift = 0; shift <= 2; shift += 1) {
110
+ const after = start + size - 1 + shift;
111
+ const before = start + size - 1 - shift;
112
+ if (clauseAt(after)) {
113
+ cut = after + 1;
114
+ break;
115
+ }
116
+ if (clauseAt(before)) {
117
+ cut = before + 1;
118
+ break;
119
+ }
120
+ }
121
+ cut = Math.min(cut, start + CUE_MAX_WORDS);
122
+ // A cut that leaves a stub ("bridge.") is worse than an even split.
123
+ if (sentence.length - cut < MIN_PIECE)
124
+ cut = sentence.length;
125
+ if (cut - start < MIN_PIECE)
126
+ cut = Math.min(sentence.length, start + CUE_MAX_WORDS);
127
+ if (cut <= start)
128
+ cut = start + 1;
129
+ cues.push(sentence.slice(start, cut));
130
+ start = cut;
131
+ }
132
+ if (start < sentence.length)
133
+ cues.push(sentence.slice(start));
134
+ }
135
+ return cues.length === 0 ? [[]] : cues;
136
+ };
137
+ /** One `add /scenes/-` op per caption cue, with a per-scene captioned/omitted report. */
138
+ const planFromManifest = (board, manifest) => {
139
+ const timed = baseTimeline(board);
140
+ if (typeof timed === "number")
141
+ return timed;
142
+ const byId = new Map(timed.map((scene) => [scene.id, scene]));
143
+ const ops = [];
144
+ // Regenerating captions is idempotent: drop the previous caption overlays first
145
+ // (descending, so earlier indexes stay valid) instead of appending a second set.
146
+ const stale = board.scenes
147
+ .map((scene, index) => ({ scene, index }))
148
+ .filter(({ scene }) => scene.type === "caption" && scene.layer === "overlay")
149
+ .map(({ index }) => index)
150
+ .sort((a, b) => b - a);
151
+ for (const index of stale)
152
+ ops.push({ op: "remove", path: `/scenes/${index}` });
153
+ const report = [];
154
+ let words = 0;
155
+ let omitted = 0;
156
+ let scenes = 0;
157
+ for (const row of manifest.scenes) {
158
+ const scene = byId.get(row.id);
159
+ if (scene === undefined) {
160
+ report.push(`scene "${row.id}": not in the storyboard; skipped`);
161
+ continue;
162
+ }
163
+ const bound = round(scene.duration);
164
+ const fallback = manifest.audio?.words.filter((word) => word.start >= row.start - 1e-6 && word.start < row.start + bound) ?? [];
165
+ const built = sceneWords(row, bound, fallback);
166
+ words += built.words.length;
167
+ omitted += built.omitted;
168
+ if (built.words.length === 0) {
169
+ report.push(`scene "${row.id}": no words inside ${bound}s (${built.omitted} omitted); no caption`);
170
+ continue;
171
+ }
172
+ scenes += 1;
173
+ const cues = splitCueWords(built.words);
174
+ cues.forEach((cue, index) => {
175
+ const first = cue[0];
176
+ const last = cue[cue.length - 1];
177
+ if (first === undefined || last === undefined)
178
+ return;
179
+ const single = cues.length === 1;
180
+ let offset = single ? 0 : round(Math.max(0, first.start - 0.12));
181
+ let duration = single
182
+ ? bound
183
+ : round(Math.max(0.35, Math.min(bound, last.end + 0.25) - offset));
184
+ if (offset + duration > bound)
185
+ duration = round(bound - offset);
186
+ if (duration <= 0) {
187
+ offset = 0;
188
+ duration = bound;
189
+ }
190
+ const cueWords = cue.map((word) => ({
191
+ w: word.w,
192
+ start: single ? word.start : round(Math.max(0, word.start - offset)),
193
+ end: single ? word.end : round(Math.max(0.01, word.end - offset)),
194
+ }));
195
+ ops.push({
196
+ op: "add",
197
+ path: "/scenes/-",
198
+ value: {
199
+ id: cues.length === 1 ? `cap-${row.id}` : `cap-${row.id}-${index + 1}`,
200
+ type: "caption",
201
+ layer: "overlay",
202
+ over: row.id,
203
+ ...(offset > 0 ? { offset } : {}),
204
+ duration,
205
+ props: { words: cueWords },
206
+ },
207
+ });
208
+ });
209
+ report.push(`scene "${row.id}": ${built.words.length} words in ${cues.length} cue(s)` +
210
+ (built.omitted > 0 ? `, ${built.omitted} omitted past ${bound}s` : ""));
211
+ }
212
+ if (scenes === 0 || words === 0) {
213
+ return EXIT.USAGE;
214
+ }
215
+ return { ops, report, words, omitted };
216
+ };
217
+ /** SRT/VTT cues -> overlays placed by scene + offset; text-only captions (no word timings). */
218
+ const planFromCues = (board, cues, io) => {
219
+ const valid = validateStoryboardFull(board);
220
+ if (!valid.ok) {
221
+ io.stderr(`mk captions: storyboard is invalid: ${formatErrors(valid.errors)}\n`);
222
+ return EXIT.USAGE;
223
+ }
224
+ const timed = baseTimeline(valid.value);
225
+ if (typeof timed === "number") {
226
+ io.stderr("mk captions: cannot resolve the storyboard timeline\n");
227
+ return EXIT.USAGE;
228
+ }
229
+ const ops = [];
230
+ const report = [];
231
+ let words = 0;
232
+ let omitted = 0;
233
+ let index = 0;
234
+ for (const cue of cues) {
235
+ const scene = timed.find((candidate) => cue.start >= candidate.start - 1e-6 &&
236
+ cue.start < candidate.start + candidate.duration - 1e-6);
237
+ if (scene === undefined) {
238
+ omitted += 1;
239
+ report.push(`cue "${cue.text.slice(0, 24)}": outside every base scene; omitted`);
240
+ continue;
241
+ }
242
+ const start = round(Math.max(0, cue.start - scene.start));
243
+ const end = round(Math.min(cue.end, scene.start + scene.duration) - cue.start);
244
+ if (end <= 0) {
245
+ omitted += 1;
246
+ continue;
247
+ }
248
+ if (cue.text.length > CAPTION_MAX_TEXT) {
249
+ omitted += 1;
250
+ report.push(`cue "${cue.text.slice(0, 24)}": ${cue.text.length} chars (max ${CAPTION_MAX_TEXT}); omitted`);
251
+ continue;
252
+ }
253
+ index += 1;
254
+ words += cue.text.split(/\s+/).filter(Boolean).length;
255
+ ops.push({
256
+ op: "add",
257
+ path: "/scenes/-",
258
+ value: {
259
+ id: `cap-cue-${index}`,
260
+ type: "caption",
261
+ layer: "overlay",
262
+ over: scene.id,
263
+ offset: start,
264
+ duration: end,
265
+ props: { text: cue.text },
266
+ },
267
+ });
268
+ report.push(`cue ${index} over "${scene.id}" at ${start}s for ${round(end)}s`);
269
+ }
270
+ if (ops.length === 0)
271
+ return EXIT.USAGE;
272
+ return { ops, report, words, omitted };
273
+ };
274
+ /** Applies the ops in memory and validates, so `mk patch --ops` cannot fail on our output. */
275
+ const validateOps = (board, plan, io) => {
276
+ const validBoard = validateStoryboardFull(board);
277
+ if (!validBoard.ok) {
278
+ io.stderr(`mk captions: storyboard is invalid: ${formatErrors(validBoard.errors)}\n`);
279
+ return EXIT.USAGE;
280
+ }
281
+ const adds = plan.ops.filter((op) => op.op === "add").map((op) => op.value);
282
+ const next = {
283
+ ...validBoard.value,
284
+ // Regeneration replaces the previous caption overlays, so the validation board
285
+ // must not carry the stale set the plan just asked to remove.
286
+ scenes: [
287
+ ...validBoard.value.scenes.filter((scene) => !(scene.type === "caption" && scene.layer === "overlay")),
288
+ ...adds,
289
+ ],
290
+ };
291
+ const valid = validateStoryboardFull(next);
292
+ if (valid.ok)
293
+ return undefined;
294
+ io.stderr(`mk captions: the caption overlays would not validate: ${formatErrors(valid.errors)}\n`);
295
+ return EXIT.USAGE;
296
+ };
297
+ const writeFile = async (path, text, io) => {
298
+ try {
299
+ await io.host.writeText(path, text);
300
+ return undefined;
301
+ }
302
+ catch (error) {
303
+ io.stderr(`mk captions: cannot write ${path}: ${error.message}\n`);
304
+ return EXIT.ERROR;
305
+ }
306
+ };
307
+ export const captionsCommand = {
308
+ name: "captions",
309
+ summary: "turn voice word timings (or SRT/VTT) into caption overlay ops; export SRT/VTT",
310
+ async run(args, io) {
311
+ const parsed = parseFlags("captions", USAGE, args, FLAGS, io);
312
+ if (parsed.kind === "exit")
313
+ return parsed.code;
314
+ const [manifestPath, ...extra] = parsed.positionals;
315
+ if (extra.length > 0) {
316
+ return usageError("captions", USAGE, `unexpected argument "${extra[0]}"`, io).code;
317
+ }
318
+ const storyboard = textFlag(parsed.flags, "storyboard");
319
+ const fromSrt = textFlag(parsed.flags, "from-srt");
320
+ const fromVtt = textFlag(parsed.flags, "from-vtt");
321
+ if (fromSrt !== undefined && fromVtt !== undefined) {
322
+ return usageError("captions", USAGE, "--from-srt and --from-vtt conflict", io).code;
323
+ }
324
+ if ((fromSrt !== undefined || fromVtt !== undefined) && manifestPath !== undefined) {
325
+ return usageError("captions", USAGE, "give a manifest or --from-*, not both", io).code;
326
+ }
327
+ const importPath = fromSrt ?? fromVtt;
328
+ if (manifestPath === undefined && importPath === undefined) {
329
+ return usageError("captions", USAGE, "missing <voice-manifest.json> or --from-srt/--from-vtt", io).code;
330
+ }
331
+ const wantsOps = textFlag(parsed.flags, "out") !== undefined || storyboard !== undefined;
332
+ const wantsExport = textFlag(parsed.flags, "srt") !== undefined || textFlag(parsed.flags, "vtt") !== undefined;
333
+ if (wantsOps && storyboard === undefined) {
334
+ return usageError("captions", USAGE, "--storyboard is required to emit caption ops", io).code;
335
+ }
336
+ if (!wantsOps && !wantsExport) {
337
+ return usageError("captions", USAGE, "nothing to do: give --out, --storyboard, --srt or --vtt", io).code;
338
+ }
339
+ let board;
340
+ if (wantsOps) {
341
+ const loaded = await readJsonFile(storyboard, io.host);
342
+ if (!loaded.ok) {
343
+ io.stderr(`mk captions: ${loaded.message}\n`);
344
+ return EXIT.USAGE;
345
+ }
346
+ board = loaded.value;
347
+ }
348
+ let plan;
349
+ let manifest;
350
+ let skippedCues = 0;
351
+ if (importPath !== undefined) {
352
+ let text;
353
+ try {
354
+ text = await io.host.readText(importPath);
355
+ }
356
+ catch {
357
+ io.stderr(`mk captions: cannot read ${importPath}\n`);
358
+ return EXIT.USAGE;
359
+ }
360
+ const cueParse = parseCues(text, fromSrt !== undefined ? "srt" : "vtt");
361
+ skippedCues = cueParse.skipped;
362
+ const cues = cueParse.cues;
363
+ if (cues.length === 0) {
364
+ io.stderr(`mk captions: ${importPath} has no readable cues\n`);
365
+ return EXIT.USAGE;
366
+ }
367
+ // Same policy as the main path's `omitted` words: a dropped cue is reported.
368
+ if (skippedCues > 0) {
369
+ io.stderr(`mk captions: skipped ${skippedCues} malformed cue(s)\n`);
370
+ if (parsed.flags["fail-on-skip"] === true)
371
+ return EXIT.USAGE;
372
+ }
373
+ const planned = planFromCues(board, cues, io);
374
+ if (typeof planned === "number")
375
+ return planned;
376
+ plan = planned;
377
+ }
378
+ else {
379
+ const loaded = await readJsonFile(manifestPath, io.host);
380
+ if (!loaded.ok) {
381
+ io.stderr(`mk captions: ${loaded.message}\n`);
382
+ return EXIT.USAGE;
383
+ }
384
+ const parsedManifest = TimingManifestSchema.safeParse(loaded.value);
385
+ if (!parsedManifest.success) {
386
+ const problems = parsedManifest.error.issues
387
+ .map((issue) => `${issue.path.join("/") || "/"}: ${issue.message}`)
388
+ .join("; ");
389
+ io.stderr(`mk captions: invalid voice manifest: ${problems}\n`);
390
+ return EXIT.USAGE;
391
+ }
392
+ manifest = parsedManifest.data;
393
+ const hasWords = manifest.scenes.some((scene) => (scene.words?.length ?? 0) > 0) ||
394
+ (manifest.audio?.words.length ?? 0) > 0;
395
+ if (!hasWords) {
396
+ io.stderr(`${wordTimingBlocker().message}\n`);
397
+ return EXIT.USAGE;
398
+ }
399
+ if (wantsOps) {
400
+ const valid = validateStoryboardFull(board);
401
+ if (!valid.ok) {
402
+ io.stderr(`mk captions: storyboard is invalid: ${formatErrors(valid.errors)}\n`);
403
+ return EXIT.USAGE;
404
+ }
405
+ const planned = planFromManifest(valid.value, manifest);
406
+ if (typeof planned === "number") {
407
+ io.stderr("mk captions: no scene of the storyboard has words inside its bound\n");
408
+ return EXIT.USAGE;
409
+ }
410
+ plan = planned;
411
+ }
412
+ }
413
+ if (plan !== undefined) {
414
+ const invalid = validateOps(board, plan, io);
415
+ if (invalid !== undefined)
416
+ return invalid;
417
+ for (const line of plan.report)
418
+ io.stderr(`${line}\n`);
419
+ const text = `${JSON.stringify(plan.ops, null, 2)}\n`;
420
+ const out = textFlag(parsed.flags, "out");
421
+ if (out === undefined) {
422
+ io.stdout(text);
423
+ }
424
+ else {
425
+ const written = await writeFile(out, text, io);
426
+ if (written !== undefined)
427
+ return written;
428
+ const summary = `captions ok | ${plan.ops.length} overlays, ${plan.words} words, ${plan.omitted} omitted -> ${out}`;
429
+ if (parsed.flags.json === true) {
430
+ io.stdout(`${JSON.stringify({ ok: true, out, overlays: plan.ops.length, words: plan.words, omitted: plan.omitted, skipped: skippedCues })}\n`);
431
+ }
432
+ else {
433
+ io.stdout(`${summary}\n`);
434
+ }
435
+ }
436
+ }
437
+ if (manifest !== undefined) {
438
+ const exportCues = manifest.scenes
439
+ .filter((scene) => (scene.words?.length ?? 0) > 0)
440
+ .map((scene) => ({
441
+ start: scene.start,
442
+ end: round(scene.start + scene.duration),
443
+ text: (scene.words ?? []).map((word) => word.w).join(" "),
444
+ }));
445
+ const srt = textFlag(parsed.flags, "srt");
446
+ if (srt !== undefined) {
447
+ const written = await writeFile(srt, formatSrt(exportCues), io);
448
+ if (written !== undefined)
449
+ return written;
450
+ io.stdout(`captions srt | ${exportCues.length} cues -> ${srt}\n`);
451
+ }
452
+ const vtt = textFlag(parsed.flags, "vtt");
453
+ if (vtt !== undefined) {
454
+ const written = await writeFile(vtt, formatVtt(exportCues), io);
455
+ if (written !== undefined)
456
+ return written;
457
+ io.stdout(`captions vtt | ${exportCues.length} cues -> ${vtt}\n`);
458
+ }
459
+ }
460
+ return EXIT.OK;
461
+ },
462
+ };
@@ -0,0 +1,19 @@
1
+ /** Cue parsing/formatting for SRT and WebVTT (the caption interchange formats). */
2
+ export interface Cue {
3
+ readonly start: number;
4
+ readonly end: number;
5
+ readonly text: string;
6
+ }
7
+ export interface ParsedCues {
8
+ readonly cues: Cue[];
9
+ /** Malformed cue blocks dropped rather than silently ignored. */
10
+ readonly skipped: number;
11
+ }
12
+ /**
13
+ * Parses cue blocks; an index line and the WEBVTT header are ignored. Malformed
14
+ * cues are counted in `skipped` instead of silently disappearing, so the caller
15
+ * can report them (same policy as the main path's `omitted` word count).
16
+ */
17
+ export declare function parseCues(text: string, kind: "srt" | "vtt"): ParsedCues;
18
+ export declare function formatSrt(cues: readonly Cue[]): string;
19
+ export declare function formatVtt(cues: readonly Cue[]): string;