videoclaw 3.0.0-alpha.1

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 (1452) hide show
  1. package/AGENTS.md +165 -0
  2. package/CLAUDE.md +232 -0
  3. package/LICENSE +36 -0
  4. package/README.md +737 -0
  5. package/dist/cli/args.d.ts +59 -0
  6. package/dist/cli/args.d.ts.map +1 -0
  7. package/dist/cli/args.js +279 -0
  8. package/dist/cli/args.js.map +1 -0
  9. package/dist/cli/handlers/analysis.d.ts +3 -0
  10. package/dist/cli/handlers/analysis.d.ts.map +1 -0
  11. package/dist/cli/handlers/analysis.js +111 -0
  12. package/dist/cli/handlers/analysis.js.map +1 -0
  13. package/dist/cli/handlers/audio.d.ts +25 -0
  14. package/dist/cli/handlers/audio.d.ts.map +1 -0
  15. package/dist/cli/handlers/audio.js +321 -0
  16. package/dist/cli/handlers/audio.js.map +1 -0
  17. package/dist/cli/handlers/batch.d.ts +4 -0
  18. package/dist/cli/handlers/batch.d.ts.map +1 -0
  19. package/dist/cli/handlers/batch.js +424 -0
  20. package/dist/cli/handlers/batch.js.map +1 -0
  21. package/dist/cli/handlers/candidates.d.ts +10 -0
  22. package/dist/cli/handlers/candidates.d.ts.map +1 -0
  23. package/dist/cli/handlers/candidates.js +389 -0
  24. package/dist/cli/handlers/candidates.js.map +1 -0
  25. package/dist/cli/handlers/character.d.ts +8 -0
  26. package/dist/cli/handlers/character.d.ts.map +1 -0
  27. package/dist/cli/handlers/character.js +202 -0
  28. package/dist/cli/handlers/character.js.map +1 -0
  29. package/dist/cli/handlers/clone.d.ts +5 -0
  30. package/dist/cli/handlers/clone.d.ts.map +1 -0
  31. package/dist/cli/handlers/clone.js +303 -0
  32. package/dist/cli/handlers/clone.js.map +1 -0
  33. package/dist/cli/handlers/create.d.ts +5 -0
  34. package/dist/cli/handlers/create.d.ts.map +1 -0
  35. package/dist/cli/handlers/create.js +635 -0
  36. package/dist/cli/handlers/create.js.map +1 -0
  37. package/dist/cli/handlers/execution.d.ts +5 -0
  38. package/dist/cli/handlers/execution.d.ts.map +1 -0
  39. package/dist/cli/handlers/execution.js +132 -0
  40. package/dist/cli/handlers/execution.js.map +1 -0
  41. package/dist/cli/handlers/library.d.ts +8 -0
  42. package/dist/cli/handlers/library.d.ts.map +1 -0
  43. package/dist/cli/handlers/library.js +77 -0
  44. package/dist/cli/handlers/library.js.map +1 -0
  45. package/dist/cli/handlers/media-ops.d.ts +7 -0
  46. package/dist/cli/handlers/media-ops.d.ts.map +1 -0
  47. package/dist/cli/handlers/media-ops.js +120 -0
  48. package/dist/cli/handlers/media-ops.js.map +1 -0
  49. package/dist/cli/handlers/media-production.d.ts +56 -0
  50. package/dist/cli/handlers/media-production.d.ts.map +1 -0
  51. package/dist/cli/handlers/media-production.js +673 -0
  52. package/dist/cli/handlers/media-production.js.map +1 -0
  53. package/dist/cli/handlers/motion-overlay.d.ts +10 -0
  54. package/dist/cli/handlers/motion-overlay.d.ts.map +1 -0
  55. package/dist/cli/handlers/motion-overlay.js +651 -0
  56. package/dist/cli/handlers/motion-overlay.js.map +1 -0
  57. package/dist/cli/handlers/multi-shot.d.ts +2 -0
  58. package/dist/cli/handlers/multi-shot.d.ts.map +1 -0
  59. package/dist/cli/handlers/multi-shot.js +424 -0
  60. package/dist/cli/handlers/multi-shot.js.map +1 -0
  61. package/dist/cli/handlers/project-ops.d.ts +14 -0
  62. package/dist/cli/handlers/project-ops.d.ts.map +1 -0
  63. package/dist/cli/handlers/project-ops.js +241 -0
  64. package/dist/cli/handlers/project-ops.js.map +1 -0
  65. package/dist/cli/handlers/prompt-craft.d.ts +8 -0
  66. package/dist/cli/handlers/prompt-craft.d.ts.map +1 -0
  67. package/dist/cli/handlers/prompt-craft.js +397 -0
  68. package/dist/cli/handlers/prompt-craft.js.map +1 -0
  69. package/dist/cli/handlers/provider-registration.d.ts +29 -0
  70. package/dist/cli/handlers/provider-registration.d.ts.map +1 -0
  71. package/dist/cli/handlers/provider-registration.js +225 -0
  72. package/dist/cli/handlers/provider-registration.js.map +1 -0
  73. package/dist/cli/handlers/reference-sheets.d.ts +6 -0
  74. package/dist/cli/handlers/reference-sheets.d.ts.map +1 -0
  75. package/dist/cli/handlers/reference-sheets.js +181 -0
  76. package/dist/cli/handlers/reference-sheets.js.map +1 -0
  77. package/dist/cli/handlers/reporting.d.ts +18 -0
  78. package/dist/cli/handlers/reporting.d.ts.map +1 -0
  79. package/dist/cli/handlers/reporting.js +155 -0
  80. package/dist/cli/handlers/reporting.js.map +1 -0
  81. package/dist/cli/handlers/review-portal.d.ts +8 -0
  82. package/dist/cli/handlers/review-portal.d.ts.map +1 -0
  83. package/dist/cli/handlers/review-portal.js +276 -0
  84. package/dist/cli/handlers/review-portal.js.map +1 -0
  85. package/dist/cli/handlers/show.d.ts +11 -0
  86. package/dist/cli/handlers/show.d.ts.map +1 -0
  87. package/dist/cli/handlers/show.js +136 -0
  88. package/dist/cli/handlers/show.js.map +1 -0
  89. package/dist/cli/handlers/stages.d.ts +6 -0
  90. package/dist/cli/handlers/stages.d.ts.map +1 -0
  91. package/dist/cli/handlers/stages.js +333 -0
  92. package/dist/cli/handlers/stages.js.map +1 -0
  93. package/dist/cli/handlers/studio.d.ts +2 -0
  94. package/dist/cli/handlers/studio.d.ts.map +1 -0
  95. package/dist/cli/handlers/studio.js +159 -0
  96. package/dist/cli/handlers/studio.js.map +1 -0
  97. package/dist/cli/handlers/templates.d.ts +7 -0
  98. package/dist/cli/handlers/templates.d.ts.map +1 -0
  99. package/dist/cli/handlers/templates.js +61 -0
  100. package/dist/cli/handlers/templates.js.map +1 -0
  101. package/dist/cli/provider-adapter.d.ts +3 -0
  102. package/dist/cli/provider-adapter.d.ts.map +1 -0
  103. package/dist/cli/provider-adapter.js +96 -0
  104. package/dist/cli/provider-adapter.js.map +1 -0
  105. package/dist/cli/vclaw.d.ts +15 -0
  106. package/dist/cli/vclaw.d.ts.map +1 -0
  107. package/dist/cli/vclaw.js +318 -0
  108. package/dist/cli/vclaw.js.map +1 -0
  109. package/dist/index.d.ts +79 -0
  110. package/dist/index.d.ts.map +1 -0
  111. package/dist/index.js +68 -0
  112. package/dist/index.js.map +1 -0
  113. package/dist/mcp/index.d.ts +3 -0
  114. package/dist/mcp/index.d.ts.map +1 -0
  115. package/dist/mcp/index.js +3 -0
  116. package/dist/mcp/index.js.map +1 -0
  117. package/dist/mcp/server.d.ts +27 -0
  118. package/dist/mcp/server.d.ts.map +1 -0
  119. package/dist/mcp/server.js +168 -0
  120. package/dist/mcp/server.js.map +1 -0
  121. package/dist/mcp/tools.d.ts +55 -0
  122. package/dist/mcp/tools.d.ts.map +1 -0
  123. package/dist/mcp/tools.js +80 -0
  124. package/dist/mcp/tools.js.map +1 -0
  125. package/dist/video/analyze-output.d.ts +5 -0
  126. package/dist/video/analyze-output.d.ts.map +1 -0
  127. package/dist/video/analyze-output.js +7 -0
  128. package/dist/video/analyze-output.js.map +1 -0
  129. package/dist/video/archive-project.d.ts +14 -0
  130. package/dist/video/archive-project.d.ts.map +1 -0
  131. package/dist/video/archive-project.js +41 -0
  132. package/dist/video/archive-project.js.map +1 -0
  133. package/dist/video/artifact-history.d.ts +8 -0
  134. package/dist/video/artifact-history.d.ts.map +1 -0
  135. package/dist/video/artifact-history.js +12 -0
  136. package/dist/video/artifact-history.js.map +1 -0
  137. package/dist/video/artifact-store.d.ts +8 -0
  138. package/dist/video/artifact-store.d.ts.map +1 -0
  139. package/dist/video/artifact-store.js +37 -0
  140. package/dist/video/artifact-store.js.map +1 -0
  141. package/dist/video/artifact-validation.d.ts +15 -0
  142. package/dist/video/artifact-validation.d.ts.map +1 -0
  143. package/dist/video/artifact-validation.js +287 -0
  144. package/dist/video/artifact-validation.js.map +1 -0
  145. package/dist/video/artifacts.d.ts +112 -0
  146. package/dist/video/artifacts.d.ts.map +1 -0
  147. package/dist/video/artifacts.js +31 -0
  148. package/dist/video/artifacts.js.map +1 -0
  149. package/dist/video/assemble/animate-slides.d.ts +108 -0
  150. package/dist/video/assemble/animate-slides.d.ts.map +1 -0
  151. package/dist/video/assemble/animate-slides.js +152 -0
  152. package/dist/video/assemble/animate-slides.js.map +1 -0
  153. package/dist/video/assemble/animation-styles.d.ts +21 -0
  154. package/dist/video/assemble/animation-styles.d.ts.map +1 -0
  155. package/dist/video/assemble/animation-styles.js +32 -0
  156. package/dist/video/assemble/animation-styles.js.map +1 -0
  157. package/dist/video/assemble/animation-styles.json +97 -0
  158. package/dist/video/assemble/assemble.d.ts +24 -0
  159. package/dist/video/assemble/assemble.d.ts.map +1 -0
  160. package/dist/video/assemble/assemble.js +457 -0
  161. package/dist/video/assemble/assemble.js.map +1 -0
  162. package/dist/video/assemble/audio-concat.d.ts +61 -0
  163. package/dist/video/assemble/audio-concat.d.ts.map +1 -0
  164. package/dist/video/assemble/audio-concat.js +108 -0
  165. package/dist/video/assemble/audio-concat.js.map +1 -0
  166. package/dist/video/assemble/audio-mix-plan.d.ts +84 -0
  167. package/dist/video/assemble/audio-mix-plan.d.ts.map +1 -0
  168. package/dist/video/assemble/audio-mix-plan.js +74 -0
  169. package/dist/video/assemble/audio-mix-plan.js.map +1 -0
  170. package/dist/video/assemble/audio-utils.d.ts +32 -0
  171. package/dist/video/assemble/audio-utils.d.ts.map +1 -0
  172. package/dist/video/assemble/audio-utils.js +91 -0
  173. package/dist/video/assemble/audio-utils.js.map +1 -0
  174. package/dist/video/assemble/cut-segment.d.ts +40 -0
  175. package/dist/video/assemble/cut-segment.d.ts.map +1 -0
  176. package/dist/video/assemble/cut-segment.js +77 -0
  177. package/dist/video/assemble/cut-segment.js.map +1 -0
  178. package/dist/video/assemble/ffmpeg.d.ts +91 -0
  179. package/dist/video/assemble/ffmpeg.d.ts.map +1 -0
  180. package/dist/video/assemble/ffmpeg.js +251 -0
  181. package/dist/video/assemble/ffmpeg.js.map +1 -0
  182. package/dist/video/assemble/gemini-vision-classify.d.ts +37 -0
  183. package/dist/video/assemble/gemini-vision-classify.d.ts.map +1 -0
  184. package/dist/video/assemble/gemini-vision-classify.js +123 -0
  185. package/dist/video/assemble/gemini-vision-classify.js.map +1 -0
  186. package/dist/video/assemble/index.d.ts +47 -0
  187. package/dist/video/assemble/index.d.ts.map +1 -0
  188. package/dist/video/assemble/index.js +40 -0
  189. package/dist/video/assemble/index.js.map +1 -0
  190. package/dist/video/assemble/media-qc.d.ts +44 -0
  191. package/dist/video/assemble/media-qc.d.ts.map +1 -0
  192. package/dist/video/assemble/media-qc.js +181 -0
  193. package/dist/video/assemble/media-qc.js.map +1 -0
  194. package/dist/video/assemble/music.d.ts +51 -0
  195. package/dist/video/assemble/music.d.ts.map +1 -0
  196. package/dist/video/assemble/music.js +171 -0
  197. package/dist/video/assemble/music.js.map +1 -0
  198. package/dist/video/assemble/narration-fit.d.ts +32 -0
  199. package/dist/video/assemble/narration-fit.d.ts.map +1 -0
  200. package/dist/video/assemble/narration-fit.js +59 -0
  201. package/dist/video/assemble/narration-fit.js.map +1 -0
  202. package/dist/video/assemble/overlay.d.ts +81 -0
  203. package/dist/video/assemble/overlay.d.ts.map +1 -0
  204. package/dist/video/assemble/overlay.js +141 -0
  205. package/dist/video/assemble/overlay.js.map +1 -0
  206. package/dist/video/assemble/pdf.d.ts +46 -0
  207. package/dist/video/assemble/pdf.d.ts.map +1 -0
  208. package/dist/video/assemble/pdf.js +111 -0
  209. package/dist/video/assemble/pdf.js.map +1 -0
  210. package/dist/video/assemble/qa-dialogue-lint.d.ts +56 -0
  211. package/dist/video/assemble/qa-dialogue-lint.d.ts.map +1 -0
  212. package/dist/video/assemble/qa-dialogue-lint.js +85 -0
  213. package/dist/video/assemble/qa-dialogue-lint.js.map +1 -0
  214. package/dist/video/assemble/qa-image-filter.d.ts +52 -0
  215. package/dist/video/assemble/qa-image-filter.d.ts.map +1 -0
  216. package/dist/video/assemble/qa-image-filter.js +102 -0
  217. package/dist/video/assemble/qa-image-filter.js.map +1 -0
  218. package/dist/video/assemble/qa-image-vision.d.ts +57 -0
  219. package/dist/video/assemble/qa-image-vision.d.ts.map +1 -0
  220. package/dist/video/assemble/qa-image-vision.js +96 -0
  221. package/dist/video/assemble/qa-image-vision.js.map +1 -0
  222. package/dist/video/assemble/qa-narration-vision.d.ts +53 -0
  223. package/dist/video/assemble/qa-narration-vision.d.ts.map +1 -0
  224. package/dist/video/assemble/qa-narration-vision.js +87 -0
  225. package/dist/video/assemble/qa-narration-vision.js.map +1 -0
  226. package/dist/video/assemble/qa-narration.d.ts +53 -0
  227. package/dist/video/assemble/qa-narration.d.ts.map +1 -0
  228. package/dist/video/assemble/qa-narration.js +85 -0
  229. package/dist/video/assemble/qa-narration.js.map +1 -0
  230. package/dist/video/assemble/stitch-ad.d.ts +88 -0
  231. package/dist/video/assemble/stitch-ad.d.ts.map +1 -0
  232. package/dist/video/assemble/stitch-ad.js +161 -0
  233. package/dist/video/assemble/stitch-ad.js.map +1 -0
  234. package/dist/video/assemble/stitch.d.ts +341 -0
  235. package/dist/video/assemble/stitch.d.ts.map +1 -0
  236. package/dist/video/assemble/stitch.js +607 -0
  237. package/dist/video/assemble/stitch.js.map +1 -0
  238. package/dist/video/assemble/text-card.d.ts +78 -0
  239. package/dist/video/assemble/text-card.d.ts.map +1 -0
  240. package/dist/video/assemble/text-card.js +210 -0
  241. package/dist/video/assemble/text-card.js.map +1 -0
  242. package/dist/video/assemble/title-card.d.ts +39 -0
  243. package/dist/video/assemble/title-card.d.ts.map +1 -0
  244. package/dist/video/assemble/title-card.js +127 -0
  245. package/dist/video/assemble/title-card.js.map +1 -0
  246. package/dist/video/assemble/transcript.d.ts +66 -0
  247. package/dist/video/assemble/transcript.d.ts.map +1 -0
  248. package/dist/video/assemble/transcript.js +200 -0
  249. package/dist/video/assemble/transcript.js.map +1 -0
  250. package/dist/video/assemble/tts-elevenlabs.d.ts +52 -0
  251. package/dist/video/assemble/tts-elevenlabs.d.ts.map +1 -0
  252. package/dist/video/assemble/tts-elevenlabs.js +118 -0
  253. package/dist/video/assemble/tts-elevenlabs.js.map +1 -0
  254. package/dist/video/assemble/tts.d.ts +79 -0
  255. package/dist/video/assemble/tts.d.ts.map +1 -0
  256. package/dist/video/assemble/tts.js +131 -0
  257. package/dist/video/assemble/tts.js.map +1 -0
  258. package/dist/video/assemble/types.d.ts +43 -0
  259. package/dist/video/assemble/types.d.ts.map +1 -0
  260. package/dist/video/assemble/types.js +2 -0
  261. package/dist/video/assemble/types.js.map +1 -0
  262. package/dist/video/assemble/upscale.d.ts +43 -0
  263. package/dist/video/assemble/upscale.d.ts.map +1 -0
  264. package/dist/video/assemble/upscale.js +52 -0
  265. package/dist/video/assemble/upscale.js.map +1 -0
  266. package/dist/video/asset-spec.d.ts +15 -0
  267. package/dist/video/asset-spec.d.ts.map +1 -0
  268. package/dist/video/asset-spec.js +43 -0
  269. package/dist/video/asset-spec.js.map +1 -0
  270. package/dist/video/asset-tag-lookup.d.ts +31 -0
  271. package/dist/video/asset-tag-lookup.d.ts.map +1 -0
  272. package/dist/video/asset-tag-lookup.js +45 -0
  273. package/dist/video/asset-tag-lookup.js.map +1 -0
  274. package/dist/video/atomic-write.d.ts +2 -0
  275. package/dist/video/atomic-write.d.ts.map +1 -0
  276. package/dist/video/atomic-write.js +7 -0
  277. package/dist/video/atomic-write.js.map +1 -0
  278. package/dist/video/audio-platform/native-elevenlabs-sfx.d.ts +29 -0
  279. package/dist/video/audio-platform/native-elevenlabs-sfx.d.ts.map +1 -0
  280. package/dist/video/audio-platform/native-elevenlabs-sfx.js +95 -0
  281. package/dist/video/audio-platform/native-elevenlabs-sfx.js.map +1 -0
  282. package/dist/video/audio-platform/native-elevenlabs-tts.d.ts +30 -0
  283. package/dist/video/audio-platform/native-elevenlabs-tts.d.ts.map +1 -0
  284. package/dist/video/audio-platform/native-elevenlabs-tts.js +95 -0
  285. package/dist/video/audio-platform/native-elevenlabs-tts.js.map +1 -0
  286. package/dist/video/audio-platform/native-flowmusic.d.ts +21 -0
  287. package/dist/video/audio-platform/native-flowmusic.d.ts.map +1 -0
  288. package/dist/video/audio-platform/native-flowmusic.js +137 -0
  289. package/dist/video/audio-platform/native-flowmusic.js.map +1 -0
  290. package/dist/video/audio-platform/native-gemini-tts.d.ts +26 -0
  291. package/dist/video/audio-platform/native-gemini-tts.d.ts.map +1 -0
  292. package/dist/video/audio-platform/native-gemini-tts.js +202 -0
  293. package/dist/video/audio-platform/native-gemini-tts.js.map +1 -0
  294. package/dist/video/audio-platform/native-lyria.d.ts +35 -0
  295. package/dist/video/audio-platform/native-lyria.d.ts.map +1 -0
  296. package/dist/video/audio-platform/native-lyria.js +189 -0
  297. package/dist/video/audio-platform/native-lyria.js.map +1 -0
  298. package/dist/video/audio-platform/native-lyria3.d.ts +36 -0
  299. package/dist/video/audio-platform/native-lyria3.d.ts.map +1 -0
  300. package/dist/video/audio-platform/native-lyria3.js +210 -0
  301. package/dist/video/audio-platform/native-lyria3.js.map +1 -0
  302. package/dist/video/audio-platform/registry.d.ts +82 -0
  303. package/dist/video/audio-platform/registry.d.ts.map +1 -0
  304. package/dist/video/audio-platform/registry.js +189 -0
  305. package/dist/video/audio-platform/registry.js.map +1 -0
  306. package/dist/video/audio-platform/suno-backend.d.ts +11 -0
  307. package/dist/video/audio-platform/suno-backend.d.ts.map +1 -0
  308. package/dist/video/audio-platform/suno-backend.js +33 -0
  309. package/dist/video/audio-platform/suno-backend.js.map +1 -0
  310. package/dist/video/audio-platform/types.d.ts +128 -0
  311. package/dist/video/audio-platform/types.d.ts.map +1 -0
  312. package/dist/video/audio-platform/types.js +9 -0
  313. package/dist/video/audio-platform/types.js.map +1 -0
  314. package/dist/video/batch-queue.d.ts +276 -0
  315. package/dist/video/batch-queue.d.ts.map +1 -0
  316. package/dist/video/batch-queue.js +519 -0
  317. package/dist/video/batch-queue.js.map +1 -0
  318. package/dist/video/blueprint-prompt.d.ts +37 -0
  319. package/dist/video/blueprint-prompt.d.ts.map +1 -0
  320. package/dist/video/blueprint-prompt.js +107 -0
  321. package/dist/video/blueprint-prompt.js.map +1 -0
  322. package/dist/video/brand-definition.d.ts +97 -0
  323. package/dist/video/brand-definition.d.ts.map +1 -0
  324. package/dist/video/brand-definition.js +206 -0
  325. package/dist/video/brand-definition.js.map +1 -0
  326. package/dist/video/brand-dna.d.ts +101 -0
  327. package/dist/video/brand-dna.d.ts.map +1 -0
  328. package/dist/video/brand-dna.js +370 -0
  329. package/dist/video/brand-dna.js.map +1 -0
  330. package/dist/video/brand-prompt.d.ts +13 -0
  331. package/dist/video/brand-prompt.d.ts.map +1 -0
  332. package/dist/video/brand-prompt.js +26 -0
  333. package/dist/video/brand-prompt.js.map +1 -0
  334. package/dist/video/candidate-migrate.d.ts +27 -0
  335. package/dist/video/candidate-migrate.d.ts.map +1 -0
  336. package/dist/video/candidate-migrate.js +119 -0
  337. package/dist/video/candidate-migrate.js.map +1 -0
  338. package/dist/video/category-registry.d.ts +38 -0
  339. package/dist/video/category-registry.d.ts.map +1 -0
  340. package/dist/video/category-registry.js +188 -0
  341. package/dist/video/category-registry.js.map +1 -0
  342. package/dist/video/chain-fallback.d.ts +39 -0
  343. package/dist/video/chain-fallback.d.ts.map +1 -0
  344. package/dist/video/chain-fallback.js +43 -0
  345. package/dist/video/chain-fallback.js.map +1 -0
  346. package/dist/video/character-auto-create.d.ts +72 -0
  347. package/dist/video/character-auto-create.d.ts.map +1 -0
  348. package/dist/video/character-auto-create.js +392 -0
  349. package/dist/video/character-auto-create.js.map +1 -0
  350. package/dist/video/character-consistency.d.ts +3 -0
  351. package/dist/video/character-consistency.d.ts.map +1 -0
  352. package/dist/video/character-consistency.js +69 -0
  353. package/dist/video/character-consistency.js.map +1 -0
  354. package/dist/video/characters.d.ts +44 -0
  355. package/dist/video/characters.d.ts.map +1 -0
  356. package/dist/video/characters.js +96 -0
  357. package/dist/video/characters.js.map +1 -0
  358. package/dist/video/checkpoints.d.ts +16 -0
  359. package/dist/video/checkpoints.d.ts.map +1 -0
  360. package/dist/video/checkpoints.js +29 -0
  361. package/dist/video/checkpoints.js.map +1 -0
  362. package/dist/video/cinema-profile.d.ts +57 -0
  363. package/dist/video/cinema-profile.d.ts.map +1 -0
  364. package/dist/video/cinema-profile.js +89 -0
  365. package/dist/video/cinema-profile.js.map +1 -0
  366. package/dist/video/cinematography.d.ts +299 -0
  367. package/dist/video/cinematography.d.ts.map +1 -0
  368. package/dist/video/cinematography.js +914 -0
  369. package/dist/video/cinematography.js.map +1 -0
  370. package/dist/video/cli-output.d.ts +52 -0
  371. package/dist/video/cli-output.d.ts.map +1 -0
  372. package/dist/video/cli-output.js +81 -0
  373. package/dist/video/cli-output.js.map +1 -0
  374. package/dist/video/cli-schema.d.ts +40 -0
  375. package/dist/video/cli-schema.d.ts.map +1 -0
  376. package/dist/video/cli-schema.js +447 -0
  377. package/dist/video/cli-schema.js.map +1 -0
  378. package/dist/video/cost-estimate.d.ts +37 -0
  379. package/dist/video/cost-estimate.d.ts.map +1 -0
  380. package/dist/video/cost-estimate.js +103 -0
  381. package/dist/video/cost-estimate.js.map +1 -0
  382. package/dist/video/csv-export.d.ts +8 -0
  383. package/dist/video/csv-export.d.ts.map +1 -0
  384. package/dist/video/csv-export.js +133 -0
  385. package/dist/video/csv-export.js.map +1 -0
  386. package/dist/video/dependencies.d.ts +23 -0
  387. package/dist/video/dependencies.d.ts.map +1 -0
  388. package/dist/video/dependencies.js +36 -0
  389. package/dist/video/dependencies.js.map +1 -0
  390. package/dist/video/dialogue-fit.d.ts +23 -0
  391. package/dist/video/dialogue-fit.d.ts.map +1 -0
  392. package/dist/video/dialogue-fit.js +38 -0
  393. package/dist/video/dialogue-fit.js.map +1 -0
  394. package/dist/video/dialogue.d.ts +77 -0
  395. package/dist/video/dialogue.d.ts.map +1 -0
  396. package/dist/video/dialogue.js +143 -0
  397. package/dist/video/dialogue.js.map +1 -0
  398. package/dist/video/director-defaults.d.ts +37 -0
  399. package/dist/video/director-defaults.d.ts.map +1 -0
  400. package/dist/video/director-defaults.js +383 -0
  401. package/dist/video/director-defaults.js.map +1 -0
  402. package/dist/video/director-preflight.d.ts +53 -0
  403. package/dist/video/director-preflight.d.ts.map +1 -0
  404. package/dist/video/director-preflight.js +462 -0
  405. package/dist/video/director-preflight.js.map +1 -0
  406. package/dist/video/doctor-portfolio.d.ts +43 -0
  407. package/dist/video/doctor-portfolio.d.ts.map +1 -0
  408. package/dist/video/doctor-portfolio.js +137 -0
  409. package/dist/video/doctor-portfolio.js.map +1 -0
  410. package/dist/video/doctor.d.ts +13 -0
  411. package/dist/video/doctor.d.ts.map +1 -0
  412. package/dist/video/doctor.js +449 -0
  413. package/dist/video/doctor.js.map +1 -0
  414. package/dist/video/emotion-cues.d.ts +15 -0
  415. package/dist/video/emotion-cues.d.ts.map +1 -0
  416. package/dist/video/emotion-cues.js +37 -0
  417. package/dist/video/emotion-cues.js.map +1 -0
  418. package/dist/video/environment-assets.d.ts +28 -0
  419. package/dist/video/environment-assets.d.ts.map +1 -0
  420. package/dist/video/environment-assets.js +43 -0
  421. package/dist/video/environment-assets.js.map +1 -0
  422. package/dist/video/environment-auto-create.d.ts +20 -0
  423. package/dist/video/environment-auto-create.d.ts.map +1 -0
  424. package/dist/video/environment-auto-create.js +88 -0
  425. package/dist/video/environment-auto-create.js.map +1 -0
  426. package/dist/video/errors.d.ts +35 -0
  427. package/dist/video/errors.d.ts.map +1 -0
  428. package/dist/video/errors.js +117 -0
  429. package/dist/video/errors.js.map +1 -0
  430. package/dist/video/events.d.ts +11 -0
  431. package/dist/video/events.d.ts.map +1 -0
  432. package/dist/video/events.js +32 -0
  433. package/dist/video/events.js.map +1 -0
  434. package/dist/video/execute-autochain.d.ts +65 -0
  435. package/dist/video/execute-autochain.d.ts.map +1 -0
  436. package/dist/video/execute-autochain.js +165 -0
  437. package/dist/video/execute-autochain.js.map +1 -0
  438. package/dist/video/execute.d.ts +27 -0
  439. package/dist/video/execute.d.ts.map +1 -0
  440. package/dist/video/execute.js +477 -0
  441. package/dist/video/execute.js.map +1 -0
  442. package/dist/video/execution-cancel.d.ts +11 -0
  443. package/dist/video/execution-cancel.d.ts.map +1 -0
  444. package/dist/video/execution-cancel.js +85 -0
  445. package/dist/video/execution-cancel.js.map +1 -0
  446. package/dist/video/execution-plan.d.ts +5 -0
  447. package/dist/video/execution-plan.d.ts.map +1 -0
  448. package/dist/video/execution-plan.js +145 -0
  449. package/dist/video/execution-plan.js.map +1 -0
  450. package/dist/video/execution-profile.d.ts +25 -0
  451. package/dist/video/execution-profile.d.ts.map +1 -0
  452. package/dist/video/execution-profile.js +124 -0
  453. package/dist/video/execution-profile.js.map +1 -0
  454. package/dist/video/execution-runtime.d.ts +104 -0
  455. package/dist/video/execution-runtime.d.ts.map +1 -0
  456. package/dist/video/execution-runtime.js +750 -0
  457. package/dist/video/execution-runtime.js.map +1 -0
  458. package/dist/video/execution-seed.d.ts +14 -0
  459. package/dist/video/execution-seed.d.ts.map +1 -0
  460. package/dist/video/execution-seed.js +29 -0
  461. package/dist/video/execution-seed.js.map +1 -0
  462. package/dist/video/execution-status.d.ts +12 -0
  463. package/dist/video/execution-status.d.ts.map +1 -0
  464. package/dist/video/execution-status.js +666 -0
  465. package/dist/video/execution-status.js.map +1 -0
  466. package/dist/video/filmmaking-prompts.d.ts +356 -0
  467. package/dist/video/filmmaking-prompts.d.ts.map +1 -0
  468. package/dist/video/filmmaking-prompts.js +1212 -0
  469. package/dist/video/filmmaking-prompts.js.map +1 -0
  470. package/dist/video/final-media.d.ts +17 -0
  471. package/dist/video/final-media.d.ts.map +1 -0
  472. package/dist/video/final-media.js +78 -0
  473. package/dist/video/final-media.js.map +1 -0
  474. package/dist/video/finish.d.ts +99 -0
  475. package/dist/video/finish.d.ts.map +1 -0
  476. package/dist/video/finish.js +159 -0
  477. package/dist/video/finish.js.map +1 -0
  478. package/dist/video/flow-character-library.d.ts +143 -0
  479. package/dist/video/flow-character-library.d.ts.map +1 -0
  480. package/dist/video/flow-character-library.js +211 -0
  481. package/dist/video/flow-character-library.js.map +1 -0
  482. package/dist/video/flow-markers.d.ts +107 -0
  483. package/dist/video/flow-markers.d.ts.map +1 -0
  484. package/dist/video/flow-markers.js +278 -0
  485. package/dist/video/flow-markers.js.map +1 -0
  486. package/dist/video/gemini-analyze.d.ts +44 -0
  487. package/dist/video/gemini-analyze.d.ts.map +1 -0
  488. package/dist/video/gemini-analyze.js +323 -0
  489. package/dist/video/gemini-analyze.js.map +1 -0
  490. package/dist/video/gemini-continuity.d.ts +40 -0
  491. package/dist/video/gemini-continuity.d.ts.map +1 -0
  492. package/dist/video/gemini-continuity.js +145 -0
  493. package/dist/video/gemini-continuity.js.map +1 -0
  494. package/dist/video/gemini-judge.d.ts +33 -0
  495. package/dist/video/gemini-judge.d.ts.map +1 -0
  496. package/dist/video/gemini-judge.js +218 -0
  497. package/dist/video/gemini-judge.js.map +1 -0
  498. package/dist/video/gemini-key-pool.d.ts +23 -0
  499. package/dist/video/gemini-key-pool.d.ts.map +1 -0
  500. package/dist/video/gemini-key-pool.js +107 -0
  501. package/dist/video/gemini-key-pool.js.map +1 -0
  502. package/dist/video/gen-image-flow.d.ts +187 -0
  503. package/dist/video/gen-image-flow.d.ts.map +1 -0
  504. package/dist/video/gen-image-flow.js +331 -0
  505. package/dist/video/gen-image-flow.js.map +1 -0
  506. package/dist/video/gen-image.d.ts +153 -0
  507. package/dist/video/gen-image.d.ts.map +1 -0
  508. package/dist/video/gen-image.js +263 -0
  509. package/dist/video/gen-image.js.map +1 -0
  510. package/dist/video/generation-telemetry.d.ts +60 -0
  511. package/dist/video/generation-telemetry.d.ts.map +1 -0
  512. package/dist/video/generation-telemetry.js +214 -0
  513. package/dist/video/generation-telemetry.js.map +1 -0
  514. package/dist/video/http-error-safety.d.ts +9 -0
  515. package/dist/video/http-error-safety.d.ts.map +1 -0
  516. package/dist/video/http-error-safety.js +14 -0
  517. package/dist/video/http-error-safety.js.map +1 -0
  518. package/dist/video/image-dimensions.d.ts +7 -0
  519. package/dist/video/image-dimensions.d.ts.map +1 -0
  520. package/dist/video/image-dimensions.js +54 -0
  521. package/dist/video/image-dimensions.js.map +1 -0
  522. package/dist/video/legacy-import.d.ts +11 -0
  523. package/dist/video/legacy-import.d.ts.map +1 -0
  524. package/dist/video/legacy-import.js +181 -0
  525. package/dist/video/legacy-import.js.map +1 -0
  526. package/dist/video/library-clean.d.ts +34 -0
  527. package/dist/video/library-clean.d.ts.map +1 -0
  528. package/dist/video/library-clean.js +340 -0
  529. package/dist/video/library-clean.js.map +1 -0
  530. package/dist/video/lipsync.d.ts +72 -0
  531. package/dist/video/lipsync.d.ts.map +1 -0
  532. package/dist/video/lipsync.js +136 -0
  533. package/dist/video/lipsync.js.map +1 -0
  534. package/dist/video/media-host.d.ts +41 -0
  535. package/dist/video/media-host.d.ts.map +1 -0
  536. package/dist/video/media-host.js +106 -0
  537. package/dist/video/media-host.js.map +1 -0
  538. package/dist/video/metrics.d.ts +30 -0
  539. package/dist/video/metrics.d.ts.map +1 -0
  540. package/dist/video/metrics.js +81 -0
  541. package/dist/video/metrics.js.map +1 -0
  542. package/dist/video/motion-overlay/analyze-reel.d.ts +38 -0
  543. package/dist/video/motion-overlay/analyze-reel.d.ts.map +1 -0
  544. package/dist/video/motion-overlay/analyze-reel.js +185 -0
  545. package/dist/video/motion-overlay/analyze-reel.js.map +1 -0
  546. package/dist/video/motion-overlay/animate-render.d.ts +63 -0
  547. package/dist/video/motion-overlay/animate-render.d.ts.map +1 -0
  548. package/dist/video/motion-overlay/animate-render.js +128 -0
  549. package/dist/video/motion-overlay/animate-render.js.map +1 -0
  550. package/dist/video/motion-overlay/animate.d.ts +37 -0
  551. package/dist/video/motion-overlay/animate.d.ts.map +1 -0
  552. package/dist/video/motion-overlay/animate.js +97 -0
  553. package/dist/video/motion-overlay/animate.js.map +1 -0
  554. package/dist/video/motion-overlay/avatar-host-transport.d.ts +161 -0
  555. package/dist/video/motion-overlay/avatar-host-transport.d.ts.map +1 -0
  556. package/dist/video/motion-overlay/avatar-host-transport.js +325 -0
  557. package/dist/video/motion-overlay/avatar-host-transport.js.map +1 -0
  558. package/dist/video/motion-overlay/avatar-host.d.ts +131 -0
  559. package/dist/video/motion-overlay/avatar-host.d.ts.map +1 -0
  560. package/dist/video/motion-overlay/avatar-host.js +131 -0
  561. package/dist/video/motion-overlay/avatar-host.js.map +1 -0
  562. package/dist/video/motion-overlay/compose-prompt.d.ts +48 -0
  563. package/dist/video/motion-overlay/compose-prompt.d.ts.map +1 -0
  564. package/dist/video/motion-overlay/compose-prompt.js +217 -0
  565. package/dist/video/motion-overlay/compose-prompt.js.map +1 -0
  566. package/dist/video/motion-overlay/execute.d.ts +190 -0
  567. package/dist/video/motion-overlay/execute.d.ts.map +1 -0
  568. package/dist/video/motion-overlay/execute.js +205 -0
  569. package/dist/video/motion-overlay/execute.js.map +1 -0
  570. package/dist/video/motion-overlay/flow-pack.d.ts +65 -0
  571. package/dist/video/motion-overlay/flow-pack.d.ts.map +1 -0
  572. package/dist/video/motion-overlay/flow-pack.js +178 -0
  573. package/dist/video/motion-overlay/flow-pack.js.map +1 -0
  574. package/dist/video/motion-overlay/ingest.d.ts +74 -0
  575. package/dist/video/motion-overlay/ingest.d.ts.map +1 -0
  576. package/dist/video/motion-overlay/ingest.js +172 -0
  577. package/dist/video/motion-overlay/ingest.js.map +1 -0
  578. package/dist/video/motion-overlay/motifs.d.ts +63 -0
  579. package/dist/video/motion-overlay/motifs.d.ts.map +1 -0
  580. package/dist/video/motion-overlay/motifs.js +192 -0
  581. package/dist/video/motion-overlay/motifs.js.map +1 -0
  582. package/dist/video/motion-overlay/motion-style.d.ts +56 -0
  583. package/dist/video/motion-overlay/motion-style.d.ts.map +1 -0
  584. package/dist/video/motion-overlay/motion-style.js +130 -0
  585. package/dist/video/motion-overlay/motion-style.js.map +1 -0
  586. package/dist/video/motion-overlay/plan.d.ts +49 -0
  587. package/dist/video/motion-overlay/plan.d.ts.map +1 -0
  588. package/dist/video/motion-overlay/plan.js +79 -0
  589. package/dist/video/motion-overlay/plan.js.map +1 -0
  590. package/dist/video/motion-overlay/preview.d.ts +36 -0
  591. package/dist/video/motion-overlay/preview.d.ts.map +1 -0
  592. package/dist/video/motion-overlay/preview.js +169 -0
  593. package/dist/video/motion-overlay/preview.js.map +1 -0
  594. package/dist/video/motion-overlay/render-local.d.ts +118 -0
  595. package/dist/video/motion-overlay/render-local.d.ts.map +1 -0
  596. package/dist/video/motion-overlay/render-local.js +298 -0
  597. package/dist/video/motion-overlay/render-local.js.map +1 -0
  598. package/dist/video/motion-overlay/run.d.ts +58 -0
  599. package/dist/video/motion-overlay/run.d.ts.map +1 -0
  600. package/dist/video/motion-overlay/run.js +147 -0
  601. package/dist/video/motion-overlay/run.js.map +1 -0
  602. package/dist/video/motion-overlay/slice.d.ts +29 -0
  603. package/dist/video/motion-overlay/slice.d.ts.map +1 -0
  604. package/dist/video/motion-overlay/slice.js +88 -0
  605. package/dist/video/motion-overlay/slice.js.map +1 -0
  606. package/dist/video/motion-overlay/transcribe.d.ts +49 -0
  607. package/dist/video/motion-overlay/transcribe.d.ts.map +1 -0
  608. package/dist/video/motion-overlay/transcribe.js +180 -0
  609. package/dist/video/motion-overlay/transcribe.js.map +1 -0
  610. package/dist/video/motion-overlay/types.d.ts +82 -0
  611. package/dist/video/motion-overlay/types.d.ts.map +1 -0
  612. package/dist/video/motion-overlay/types.js +12 -0
  613. package/dist/video/motion-overlay/types.js.map +1 -0
  614. package/dist/video/motion-overlay/v2v-transport.d.ts +37 -0
  615. package/dist/video/motion-overlay/v2v-transport.d.ts.map +1 -0
  616. package/dist/video/motion-overlay/v2v-transport.js +178 -0
  617. package/dist/video/motion-overlay/v2v-transport.js.map +1 -0
  618. package/dist/video/motion-overlay/write.d.ts +40 -0
  619. package/dist/video/motion-overlay/write.d.ts.map +1 -0
  620. package/dist/video/motion-overlay/write.js +113 -0
  621. package/dist/video/motion-overlay/write.js.map +1 -0
  622. package/dist/video/multi-shot-artifact.d.ts +19 -0
  623. package/dist/video/multi-shot-artifact.d.ts.map +1 -0
  624. package/dist/video/multi-shot-artifact.js +44 -0
  625. package/dist/video/multi-shot-artifact.js.map +1 -0
  626. package/dist/video/multi-shot-prompt.d.ts +99 -0
  627. package/dist/video/multi-shot-prompt.d.ts.map +1 -0
  628. package/dist/video/multi-shot-prompt.js +466 -0
  629. package/dist/video/multi-shot-prompt.js.map +1 -0
  630. package/dist/video/music-video.d.ts +110 -0
  631. package/dist/video/music-video.d.ts.map +1 -0
  632. package/dist/video/music-video.js +190 -0
  633. package/dist/video/music-video.js.map +1 -0
  634. package/dist/video/narrate.d.ts +58 -0
  635. package/dist/video/narrate.d.ts.map +1 -0
  636. package/dist/video/narrate.js +145 -0
  637. package/dist/video/narrate.js.map +1 -0
  638. package/dist/video/native-dreamina.d.ts +35 -0
  639. package/dist/video/native-dreamina.d.ts.map +1 -0
  640. package/dist/video/native-dreamina.js +532 -0
  641. package/dist/video/native-dreamina.js.map +1 -0
  642. package/dist/video/native-flow-r2v.d.ts +113 -0
  643. package/dist/video/native-flow-r2v.d.ts.map +1 -0
  644. package/dist/video/native-flow-r2v.js +223 -0
  645. package/dist/video/native-flow-r2v.js.map +1 -0
  646. package/dist/video/native-runway.d.ts +41 -0
  647. package/dist/video/native-runway.d.ts.map +1 -0
  648. package/dist/video/native-runway.js +523 -0
  649. package/dist/video/native-runway.js.map +1 -0
  650. package/dist/video/native-seedance.d.ts +74 -0
  651. package/dist/video/native-seedance.d.ts.map +1 -0
  652. package/dist/video/native-seedance.js +461 -0
  653. package/dist/video/native-seedance.js.map +1 -0
  654. package/dist/video/native-veo.d.ts +20 -0
  655. package/dist/video/native-veo.d.ts.map +1 -0
  656. package/dist/video/native-veo.js +390 -0
  657. package/dist/video/native-veo.js.map +1 -0
  658. package/dist/video/next-actions.d.ts +27 -0
  659. package/dist/video/next-actions.d.ts.map +1 -0
  660. package/dist/video/next-actions.js +201 -0
  661. package/dist/video/next-actions.js.map +1 -0
  662. package/dist/video/obsidian-export.d.ts +12 -0
  663. package/dist/video/obsidian-export.d.ts.map +1 -0
  664. package/dist/video/obsidian-export.js +285 -0
  665. package/dist/video/obsidian-export.js.map +1 -0
  666. package/dist/video/obsidian-sync.d.ts +13 -0
  667. package/dist/video/obsidian-sync.d.ts.map +1 -0
  668. package/dist/video/obsidian-sync.js +479 -0
  669. package/dist/video/obsidian-sync.js.map +1 -0
  670. package/dist/video/obsidian-vault.d.ts +8 -0
  671. package/dist/video/obsidian-vault.d.ts.map +1 -0
  672. package/dist/video/obsidian-vault.js +81 -0
  673. package/dist/video/obsidian-vault.js.map +1 -0
  674. package/dist/video/outfit-prompts.d.ts +10 -0
  675. package/dist/video/outfit-prompts.d.ts.map +1 -0
  676. package/dist/video/outfit-prompts.js +14 -0
  677. package/dist/video/outfit-prompts.js.map +1 -0
  678. package/dist/video/outpaint-keyframe.d.ts +95 -0
  679. package/dist/video/outpaint-keyframe.d.ts.map +1 -0
  680. package/dist/video/outpaint-keyframe.js +244 -0
  681. package/dist/video/outpaint-keyframe.js.map +1 -0
  682. package/dist/video/pipeline-manifest.d.ts +4 -0
  683. package/dist/video/pipeline-manifest.d.ts.map +1 -0
  684. package/dist/video/pipeline-manifest.js +13 -0
  685. package/dist/video/pipeline-manifest.js.map +1 -0
  686. package/dist/video/pipeline-manifests/director.json +46 -0
  687. package/dist/video/pipeline-manifests/storyboard.json +46 -0
  688. package/dist/video/platform-specs.d.ts +26 -0
  689. package/dist/video/platform-specs.d.ts.map +1 -0
  690. package/dist/video/platform-specs.js +34 -0
  691. package/dist/video/platform-specs.js.map +1 -0
  692. package/dist/video/playbooks.d.ts +11 -0
  693. package/dist/video/playbooks.d.ts.map +1 -0
  694. package/dist/video/playbooks.js +22 -0
  695. package/dist/video/playbooks.js.map +1 -0
  696. package/dist/video/post-production.d.ts +57 -0
  697. package/dist/video/post-production.d.ts.map +1 -0
  698. package/dist/video/post-production.js +210 -0
  699. package/dist/video/post-production.js.map +1 -0
  700. package/dist/video/preview-portal/audit.d.ts +4 -0
  701. package/dist/video/preview-portal/audit.d.ts.map +1 -0
  702. package/dist/video/preview-portal/audit.js +16 -0
  703. package/dist/video/preview-portal/audit.js.map +1 -0
  704. package/dist/video/preview-portal/discovery.d.ts +23 -0
  705. package/dist/video/preview-portal/discovery.d.ts.map +1 -0
  706. package/dist/video/preview-portal/discovery.js +733 -0
  707. package/dist/video/preview-portal/discovery.js.map +1 -0
  708. package/dist/video/preview-portal/generate.d.ts +42 -0
  709. package/dist/video/preview-portal/generate.d.ts.map +1 -0
  710. package/dist/video/preview-portal/generate.js +101 -0
  711. package/dist/video/preview-portal/generate.js.map +1 -0
  712. package/dist/video/preview-portal/index.d.ts +12 -0
  713. package/dist/video/preview-portal/index.d.ts.map +1 -0
  714. package/dist/video/preview-portal/index.js +8 -0
  715. package/dist/video/preview-portal/index.js.map +1 -0
  716. package/dist/video/preview-portal/publish.d.ts +48 -0
  717. package/dist/video/preview-portal/publish.d.ts.map +1 -0
  718. package/dist/video/preview-portal/publish.js +169 -0
  719. package/dist/video/preview-portal/publish.js.map +1 -0
  720. package/dist/video/preview-portal/render.d.ts +4 -0
  721. package/dist/video/preview-portal/render.d.ts.map +1 -0
  722. package/dist/video/preview-portal/render.js +822 -0
  723. package/dist/video/preview-portal/render.js.map +1 -0
  724. package/dist/video/preview-portal/shared-assets.d.ts +6 -0
  725. package/dist/video/preview-portal/shared-assets.d.ts.map +1 -0
  726. package/dist/video/preview-portal/shared-assets.js +452 -0
  727. package/dist/video/preview-portal/shared-assets.js.map +1 -0
  728. package/dist/video/preview-portal/templates.d.ts +4 -0
  729. package/dist/video/preview-portal/templates.d.ts.map +1 -0
  730. package/dist/video/preview-portal/templates.js +109 -0
  731. package/dist/video/preview-portal/templates.js.map +1 -0
  732. package/dist/video/preview-portal/types.d.ts +246 -0
  733. package/dist/video/preview-portal/types.d.ts.map +1 -0
  734. package/dist/video/preview-portal/types.js +28 -0
  735. package/dist/video/preview-portal/types.js.map +1 -0
  736. package/dist/video/product-references.d.ts +21 -0
  737. package/dist/video/product-references.d.ts.map +1 -0
  738. package/dist/video/product-references.js +25 -0
  739. package/dist/video/product-references.js.map +1 -0
  740. package/dist/video/project-blueprint.d.ts +178 -0
  741. package/dist/video/project-blueprint.d.ts.map +1 -0
  742. package/dist/video/project-blueprint.js +286 -0
  743. package/dist/video/project-blueprint.js.map +1 -0
  744. package/dist/video/project-index.d.ts +82 -0
  745. package/dist/video/project-index.d.ts.map +1 -0
  746. package/dist/video/project-index.js +89 -0
  747. package/dist/video/project-index.js.map +1 -0
  748. package/dist/video/projects.d.ts +3 -0
  749. package/dist/video/projects.d.ts.map +1 -0
  750. package/dist/video/projects.js +18 -0
  751. package/dist/video/projects.js.map +1 -0
  752. package/dist/video/prompt-guidance.d.ts +14 -0
  753. package/dist/video/prompt-guidance.d.ts.map +1 -0
  754. package/dist/video/prompt-guidance.js +44 -0
  755. package/dist/video/prompt-guidance.js.map +1 -0
  756. package/dist/video/prompt-library.d.ts +11 -0
  757. package/dist/video/prompt-library.d.ts.map +1 -0
  758. package/dist/video/prompt-library.js +85 -0
  759. package/dist/video/prompt-library.js.map +1 -0
  760. package/dist/video/prompt-lint.d.ts +146 -0
  761. package/dist/video/prompt-lint.d.ts.map +1 -0
  762. package/dist/video/prompt-lint.js +433 -0
  763. package/dist/video/prompt-lint.js.map +1 -0
  764. package/dist/video/prompt-quality.d.ts +29 -0
  765. package/dist/video/prompt-quality.d.ts.map +1 -0
  766. package/dist/video/prompt-quality.js +532 -0
  767. package/dist/video/prompt-quality.js.map +1 -0
  768. package/dist/video/prompt-rules.d.ts +94 -0
  769. package/dist/video/prompt-rules.d.ts.map +1 -0
  770. package/dist/video/prompt-rules.js +169 -0
  771. package/dist/video/prompt-rules.js.map +1 -0
  772. package/dist/video/provider-adapter-runner.d.ts +5 -0
  773. package/dist/video/provider-adapter-runner.d.ts.map +1 -0
  774. package/dist/video/provider-adapter-runner.js +92 -0
  775. package/dist/video/provider-adapter-runner.js.map +1 -0
  776. package/dist/video/provider-platform/index.d.ts +6 -0
  777. package/dist/video/provider-platform/index.d.ts.map +1 -0
  778. package/dist/video/provider-platform/index.js +6 -0
  779. package/dist/video/provider-platform/index.js.map +1 -0
  780. package/dist/video/provider-platform/registry.d.ts +5 -0
  781. package/dist/video/provider-platform/registry.d.ts.map +1 -0
  782. package/dist/video/provider-platform/registry.js +279 -0
  783. package/dist/video/provider-platform/registry.js.map +1 -0
  784. package/dist/video/provider-platform/route-capabilities.d.ts +133 -0
  785. package/dist/video/provider-platform/route-capabilities.d.ts.map +1 -0
  786. package/dist/video/provider-platform/route-capabilities.js +192 -0
  787. package/dist/video/provider-platform/route-capabilities.js.map +1 -0
  788. package/dist/video/provider-platform/router.d.ts +7 -0
  789. package/dist/video/provider-platform/router.d.ts.map +1 -0
  790. package/dist/video/provider-platform/router.js +150 -0
  791. package/dist/video/provider-platform/router.js.map +1 -0
  792. package/dist/video/provider-platform/security.d.ts +8 -0
  793. package/dist/video/provider-platform/security.d.ts.map +1 -0
  794. package/dist/video/provider-platform/security.js +21 -0
  795. package/dist/video/provider-platform/security.js.map +1 -0
  796. package/dist/video/provider-platform/telemetry.d.ts +24 -0
  797. package/dist/video/provider-platform/telemetry.d.ts.map +1 -0
  798. package/dist/video/provider-platform/telemetry.js +88 -0
  799. package/dist/video/provider-platform/telemetry.js.map +1 -0
  800. package/dist/video/provider-platform/types.d.ts +139 -0
  801. package/dist/video/provider-platform/types.d.ts.map +1 -0
  802. package/dist/video/provider-platform/types.js +17 -0
  803. package/dist/video/provider-platform/types.js.map +1 -0
  804. package/dist/video/provider-status.d.ts +12 -0
  805. package/dist/video/provider-status.d.ts.map +1 -0
  806. package/dist/video/provider-status.js +169 -0
  807. package/dist/video/provider-status.js.map +1 -0
  808. package/dist/video/providers/dreamina-useapi.d.ts +170 -0
  809. package/dist/video/providers/dreamina-useapi.d.ts.map +1 -0
  810. package/dist/video/providers/dreamina-useapi.js +176 -0
  811. package/dist/video/providers/dreamina-useapi.js.map +1 -0
  812. package/dist/video/providers/flowmusic-useapi.d.ts +114 -0
  813. package/dist/video/providers/flowmusic-useapi.d.ts.map +1 -0
  814. package/dist/video/providers/flowmusic-useapi.js +159 -0
  815. package/dist/video/providers/flowmusic-useapi.js.map +1 -0
  816. package/dist/video/providers/google-flow.d.ts +57 -0
  817. package/dist/video/providers/google-flow.d.ts.map +1 -0
  818. package/dist/video/providers/google-flow.js +63 -0
  819. package/dist/video/providers/google-flow.js.map +1 -0
  820. package/dist/video/providers/public-host.d.ts +40 -0
  821. package/dist/video/providers/public-host.d.ts.map +1 -0
  822. package/dist/video/providers/public-host.js +91 -0
  823. package/dist/video/providers/public-host.js.map +1 -0
  824. package/dist/video/providers/runway-useapi.d.ts +159 -0
  825. package/dist/video/providers/runway-useapi.d.ts.map +1 -0
  826. package/dist/video/providers/runway-useapi.js +200 -0
  827. package/dist/video/providers/runway-useapi.js.map +1 -0
  828. package/dist/video/providers/xskill.d.ts +108 -0
  829. package/dist/video/providers/xskill.d.ts.map +1 -0
  830. package/dist/video/providers/xskill.js +233 -0
  831. package/dist/video/providers/xskill.js.map +1 -0
  832. package/dist/video/readiness.d.ts +18 -0
  833. package/dist/video/readiness.d.ts.map +1 -0
  834. package/dist/video/readiness.js +221 -0
  835. package/dist/video/readiness.js.map +1 -0
  836. package/dist/video/reference-sheet-store.d.ts +5 -0
  837. package/dist/video/reference-sheet-store.d.ts.map +1 -0
  838. package/dist/video/reference-sheet-store.js +28 -0
  839. package/dist/video/reference-sheet-store.js.map +1 -0
  840. package/dist/video/reference-sheets.d.ts +40 -0
  841. package/dist/video/reference-sheets.d.ts.map +1 -0
  842. package/dist/video/reference-sheets.js +160 -0
  843. package/dist/video/reference-sheets.js.map +1 -0
  844. package/dist/video/remix-narrated.d.ts +12 -0
  845. package/dist/video/remix-narrated.d.ts.map +1 -0
  846. package/dist/video/remix-narrated.js +73 -0
  847. package/dist/video/remix-narrated.js.map +1 -0
  848. package/dist/video/report-diff.d.ts +89 -0
  849. package/dist/video/report-diff.d.ts.map +1 -0
  850. package/dist/video/report-diff.js +176 -0
  851. package/dist/video/report-diff.js.map +1 -0
  852. package/dist/video/report-history.d.ts +40 -0
  853. package/dist/video/report-history.d.ts.map +1 -0
  854. package/dist/video/report-history.js +74 -0
  855. package/dist/video/report-history.js.map +1 -0
  856. package/dist/video/report.d.ts +15 -0
  857. package/dist/video/report.d.ts.map +1 -0
  858. package/dist/video/report.js +21 -0
  859. package/dist/video/report.js.map +1 -0
  860. package/dist/video/review-ui.d.ts +180 -0
  861. package/dist/video/review-ui.d.ts.map +1 -0
  862. package/dist/video/review-ui.js +2008 -0
  863. package/dist/video/review-ui.js.map +1 -0
  864. package/dist/video/scene-candidate-store.d.ts +12 -0
  865. package/dist/video/scene-candidate-store.d.ts.map +1 -0
  866. package/dist/video/scene-candidate-store.js +134 -0
  867. package/dist/video/scene-candidate-store.js.map +1 -0
  868. package/dist/video/scene-candidates.d.ts +57 -0
  869. package/dist/video/scene-candidates.d.ts.map +1 -0
  870. package/dist/video/scene-candidates.js +149 -0
  871. package/dist/video/scene-candidates.js.map +1 -0
  872. package/dist/video/scene-selection-store.d.ts +5 -0
  873. package/dist/video/scene-selection-store.d.ts.map +1 -0
  874. package/dist/video/scene-selection-store.js +22 -0
  875. package/dist/video/scene-selection-store.js.map +1 -0
  876. package/dist/video/scene-selection.d.ts +83 -0
  877. package/dist/video/scene-selection.d.ts.map +1 -0
  878. package/dist/video/scene-selection.js +225 -0
  879. package/dist/video/scene-selection.js.map +1 -0
  880. package/dist/video/scheduling.d.ts +3 -0
  881. package/dist/video/scheduling.d.ts.map +1 -0
  882. package/dist/video/scheduling.js +16 -0
  883. package/dist/video/scheduling.js.map +1 -0
  884. package/dist/video/scorecard.d.ts +12 -0
  885. package/dist/video/scorecard.d.ts.map +1 -0
  886. package/dist/video/scorecard.js +68 -0
  887. package/dist/video/scorecard.js.map +1 -0
  888. package/dist/video/seedance-asset-library.d.ts +82 -0
  889. package/dist/video/seedance-asset-library.d.ts.map +1 -0
  890. package/dist/video/seedance-asset-library.js +146 -0
  891. package/dist/video/seedance-asset-library.js.map +1 -0
  892. package/dist/video/seedance-blocks.d.ts +56 -0
  893. package/dist/video/seedance-blocks.d.ts.map +1 -0
  894. package/dist/video/seedance-blocks.js +97 -0
  895. package/dist/video/seedance-blocks.js.map +1 -0
  896. package/dist/video/seedance-chain-host.d.ts +42 -0
  897. package/dist/video/seedance-chain-host.d.ts.map +1 -0
  898. package/dist/video/seedance-chain-host.js +128 -0
  899. package/dist/video/seedance-chain-host.js.map +1 -0
  900. package/dist/video/seedance-content-filter.d.ts +80 -0
  901. package/dist/video/seedance-content-filter.d.ts.map +1 -0
  902. package/dist/video/seedance-content-filter.js +293 -0
  903. package/dist/video/seedance-content-filter.js.map +1 -0
  904. package/dist/video/seedance-skill-loader.d.ts +40 -0
  905. package/dist/video/seedance-skill-loader.d.ts.map +1 -0
  906. package/dist/video/seedance-skill-loader.js +53 -0
  907. package/dist/video/seedance-skill-loader.js.map +1 -0
  908. package/dist/video/sfx.d.ts +49 -0
  909. package/dist/video/sfx.d.ts.map +1 -0
  910. package/dist/video/sfx.js +104 -0
  911. package/dist/video/sfx.js.map +1 -0
  912. package/dist/video/shot-grammar.d.ts +103 -0
  913. package/dist/video/shot-grammar.d.ts.map +1 -0
  914. package/dist/video/shot-grammar.js +286 -0
  915. package/dist/video/shot-grammar.js.map +1 -0
  916. package/dist/video/show-bible.d.ts +113 -0
  917. package/dist/video/show-bible.d.ts.map +1 -0
  918. package/dist/video/show-bible.js +140 -0
  919. package/dist/video/show-bible.js.map +1 -0
  920. package/dist/video/soundtrack.d.ts +72 -0
  921. package/dist/video/soundtrack.d.ts.map +1 -0
  922. package/dist/video/soundtrack.js +171 -0
  923. package/dist/video/soundtrack.js.map +1 -0
  924. package/dist/video/stage-guards.d.ts +4 -0
  925. package/dist/video/stage-guards.d.ts.map +1 -0
  926. package/dist/video/stage-guards.js +94 -0
  927. package/dist/video/stage-guards.js.map +1 -0
  928. package/dist/video/status.d.ts +69 -0
  929. package/dist/video/status.d.ts.map +1 -0
  930. package/dist/video/status.js +245 -0
  931. package/dist/video/status.js.map +1 -0
  932. package/dist/video/story-bible.d.ts +70 -0
  933. package/dist/video/story-bible.d.ts.map +1 -0
  934. package/dist/video/story-bible.js +181 -0
  935. package/dist/video/story-bible.js.map +1 -0
  936. package/dist/video/storyboard-grid.d.ts +28 -0
  937. package/dist/video/storyboard-grid.d.ts.map +1 -0
  938. package/dist/video/storyboard-grid.js +231 -0
  939. package/dist/video/storyboard-grid.js.map +1 -0
  940. package/dist/video/storyboard-markdown.d.ts +62 -0
  941. package/dist/video/storyboard-markdown.d.ts.map +1 -0
  942. package/dist/video/storyboard-markdown.js +332 -0
  943. package/dist/video/storyboard-markdown.js.map +1 -0
  944. package/dist/video/storyboard-still-candidates.d.ts +31 -0
  945. package/dist/video/storyboard-still-candidates.d.ts.map +1 -0
  946. package/dist/video/storyboard-still-candidates.js +57 -0
  947. package/dist/video/storyboard-still-candidates.js.map +1 -0
  948. package/dist/video/storyboard-templates.d.ts +28 -0
  949. package/dist/video/storyboard-templates.d.ts.map +1 -0
  950. package/dist/video/storyboard-templates.js +215 -0
  951. package/dist/video/storyboard-templates.js.map +1 -0
  952. package/dist/video/studio/execute.d.ts +142 -0
  953. package/dist/video/studio/execute.d.ts.map +1 -0
  954. package/dist/video/studio/execute.js +270 -0
  955. package/dist/video/studio/execute.js.map +1 -0
  956. package/dist/video/studio/planner.d.ts +3 -0
  957. package/dist/video/studio/planner.d.ts.map +1 -0
  958. package/dist/video/studio/planner.js +110 -0
  959. package/dist/video/studio/planner.js.map +1 -0
  960. package/dist/video/studio/project-context.d.ts +4 -0
  961. package/dist/video/studio/project-context.d.ts.map +1 -0
  962. package/dist/video/studio/project-context.js +20 -0
  963. package/dist/video/studio/project-context.js.map +1 -0
  964. package/dist/video/studio/recipes.d.ts +4 -0
  965. package/dist/video/studio/recipes.d.ts.map +1 -0
  966. package/dist/video/studio/recipes.js +343 -0
  967. package/dist/video/studio/recipes.js.map +1 -0
  968. package/dist/video/studio/session.d.ts +8 -0
  969. package/dist/video/studio/session.d.ts.map +1 -0
  970. package/dist/video/studio/session.js +17 -0
  971. package/dist/video/studio/session.js.map +1 -0
  972. package/dist/video/studio/types.d.ts +59 -0
  973. package/dist/video/studio/types.d.ts.map +1 -0
  974. package/dist/video/studio/types.js +2 -0
  975. package/dist/video/studio/types.js.map +1 -0
  976. package/dist/video/template-store.d.ts +65 -0
  977. package/dist/video/template-store.d.ts.map +1 -0
  978. package/dist/video/template-store.js +168 -0
  979. package/dist/video/template-store.js.map +1 -0
  980. package/dist/video/timeline.d.ts +8 -0
  981. package/dist/video/timeline.d.ts.map +1 -0
  982. package/dist/video/timeline.js +21 -0
  983. package/dist/video/timeline.js.map +1 -0
  984. package/dist/video/title-overlay.d.ts +85 -0
  985. package/dist/video/title-overlay.d.ts.map +1 -0
  986. package/dist/video/title-overlay.js +163 -0
  987. package/dist/video/title-overlay.js.map +1 -0
  988. package/dist/video/types.d.ts +403 -0
  989. package/dist/video/types.d.ts.map +1 -0
  990. package/dist/video/types.js +2 -0
  991. package/dist/video/types.js.map +1 -0
  992. package/dist/video/veo-subprocess.d.ts +27 -0
  993. package/dist/video/veo-subprocess.d.ts.map +1 -0
  994. package/dist/video/veo-subprocess.js +52 -0
  995. package/dist/video/veo-subprocess.js.map +1 -0
  996. package/dist/video/verify-env.d.ts +43 -0
  997. package/dist/video/verify-env.d.ts.map +1 -0
  998. package/dist/video/verify-env.js +156 -0
  999. package/dist/video/verify-env.js.map +1 -0
  1000. package/dist/video/verify-final.d.ts +20 -0
  1001. package/dist/video/verify-final.d.ts.map +1 -0
  1002. package/dist/video/verify-final.js +39 -0
  1003. package/dist/video/verify-final.js.map +1 -0
  1004. package/dist/video/video-context.d.ts +10 -0
  1005. package/dist/video/video-context.d.ts.map +1 -0
  1006. package/dist/video/video-context.js +74 -0
  1007. package/dist/video/video-context.js.map +1 -0
  1008. package/dist/video/vocal-map.d.ts +55 -0
  1009. package/dist/video/vocal-map.d.ts.map +1 -0
  1010. package/dist/video/vocal-map.js +107 -0
  1011. package/dist/video/vocal-map.js.map +1 -0
  1012. package/dist/video/vocal-sync-plan.d.ts +76 -0
  1013. package/dist/video/vocal-sync-plan.d.ts.map +1 -0
  1014. package/dist/video/vocal-sync-plan.js +166 -0
  1015. package/dist/video/vocal-sync-plan.js.map +1 -0
  1016. package/dist/video/voice-clone.d.ts +152 -0
  1017. package/dist/video/voice-clone.d.ts.map +1 -0
  1018. package/dist/video/voice-clone.js +267 -0
  1019. package/dist/video/voice-clone.js.map +1 -0
  1020. package/dist/video/with-retry.d.ts +67 -0
  1021. package/dist/video/with-retry.d.ts.map +1 -0
  1022. package/dist/video/with-retry.js +105 -0
  1023. package/dist/video/with-retry.js.map +1 -0
  1024. package/dist/video/workload.d.ts +20 -0
  1025. package/dist/video/workload.d.ts.map +1 -0
  1026. package/dist/video/workload.js +55 -0
  1027. package/dist/video/workload.js.map +1 -0
  1028. package/dist/video/workspace.d.ts +109 -0
  1029. package/dist/video/workspace.d.ts.map +1 -0
  1030. package/dist/video/workspace.js +132 -0
  1031. package/dist/video/workspace.js.map +1 -0
  1032. package/docs/AGENT_INTEGRATION_RESEARCH.md +123 -0
  1033. package/docs/AI_FILMMAKING_PROMPTS.md +195 -0
  1034. package/docs/ARCHITECTURE.md +257 -0
  1035. package/docs/ASSEMBLE.md +376 -0
  1036. package/docs/BRAND_AGENCY.md +63 -0
  1037. package/docs/CLAWBOT_COVERAGE_PROMPT.md +78 -0
  1038. package/docs/CLI_REFERENCE.md +2638 -0
  1039. package/docs/CONCIERGE_PROMPT.md +139 -0
  1040. package/docs/Claude Code + Higgsfield MCP = FULL Creative Agency.md +179 -0
  1041. package/docs/DEMO_RECORDING.md +61 -0
  1042. package/docs/DEPRECATION.md +79 -0
  1043. package/docs/DIAGRAMS_SOURCE.md +347 -0
  1044. package/docs/DIRECTOR_BLUEPRINT.md +94 -0
  1045. package/docs/GENERATION_TELEMETRY.md +81 -0
  1046. package/docs/IMPROVE_PROMPT.md +76 -0
  1047. package/docs/INFOGRAPHICS_PROMPT.md +83 -0
  1048. package/docs/MASTER_PLAN_ALIGNMENT.md +563 -0
  1049. package/docs/MIGRATION.md +213 -0
  1050. package/docs/MOTION_OVERLAY.md +355 -0
  1051. package/docs/OBSIDIAN.md +300 -0
  1052. package/docs/OPERATIONS.md +142 -0
  1053. package/docs/OPERATOR_HANDOFF.md +108 -0
  1054. package/docs/PRODUCTION_WORKFLOW.md +148 -0
  1055. package/docs/PROJECT_LAYOUT.md +262 -0
  1056. package/docs/PROMPT_QUALITY.md +214 -0
  1057. package/docs/PROVIDER_PLATFORM.md +195 -0
  1058. package/docs/PUBLISHING.md +175 -0
  1059. package/docs/PYTHON_PIPELINE.md +139 -0
  1060. package/docs/REFERENCE_SHEETS.md +469 -0
  1061. package/docs/REFERENCE_VIDEO_SEEDANCE_MOTION_DESIGN_WORKFLOW.md +465 -0
  1062. package/docs/RELEASE_READINESS.md +573 -0
  1063. package/docs/REVIEW_UI_STORYBOARD_WORKFLOW.md +200 -0
  1064. package/docs/SCENE_CANDIDATES.md +518 -0
  1065. package/docs/SKILLS.md +477 -0
  1066. package/docs/SKILL_COHESION_PROMPT.md +88 -0
  1067. package/docs/STORY_BIBLE.md +288 -0
  1068. package/docs/STUDIO.md +96 -0
  1069. package/docs/TEMPLATES.md +143 -0
  1070. package/docs/UNIFICATION_AUDIT.md +321 -0
  1071. package/docs/UPDATE_DOCS_PROMPT.md +78 -0
  1072. package/docs/assets/demo-quickstart.cast +13 -0
  1073. package/docs/assets/demo-quickstart.gif +0 -0
  1074. package/docs/assets/diagram-architecture.jpg +0 -0
  1075. package/docs/assets/diagram-assemble.jpg +0 -0
  1076. package/docs/assets/diagram-lifecycle.jpg +0 -0
  1077. package/docs/assets/diagram-obsidian-loop.jpg +0 -0
  1078. package/docs/assets/diagram-obsidian-vault.jpg +0 -0
  1079. package/docs/assets/diagram-routing.jpg +0 -0
  1080. package/docs/assets/diagram-skills-ecosystem.jpg +0 -0
  1081. package/docs/assets/diagram-story-bible.jpg +0 -0
  1082. package/docs/assets/diagram-studio-goals.jpg +0 -0
  1083. package/docs/assets/docsite-preview.png +0 -0
  1084. package/docs/assets/logo.jpg +0 -0
  1085. package/docs/assets/logo.png +0 -0
  1086. package/docs/preview-portal-audit.md +151 -0
  1087. package/package.json +119 -0
  1088. package/playbooks/seedance-ugc.json +32 -0
  1089. package/playbooks/veo-generic.json +26 -0
  1090. package/references/video/.fixtures/multi-shot-runway-10s.txt +9 -0
  1091. package/references/video/.fixtures/multi-shot-seedance-10s.txt +9 -0
  1092. package/references/video/.fixtures/multi-shot-valid.txt +13 -0
  1093. package/references/video/.fixtures/multi-shot-veo-8s.txt +9 -0
  1094. package/references/video/ai-director-blueprint.md +614 -0
  1095. package/references/video/camera-bible.md +294 -0
  1096. package/references/video/character-reference-sheet.md +14 -0
  1097. package/references/video/checkpoint-protocol.md +26 -0
  1098. package/references/video/clone-ad-template-workflow.md +14 -0
  1099. package/references/video/dialogue-duration-preflight.md +17 -0
  1100. package/references/video/generation-telemetry.md +18 -0
  1101. package/references/video/multi-shot-framework.md +455 -0
  1102. package/references/video/seedance-skills/01-cinematic.md +1329 -0
  1103. package/references/video/seedance-skills/02-3d-cgi.md +884 -0
  1104. package/references/video/seedance-skills/03-cartoon.md +1668 -0
  1105. package/references/video/seedance-skills/04-comic-to-video.md +1810 -0
  1106. package/references/video/seedance-skills/05-fight-scenes.md +741 -0
  1107. package/references/video/seedance-skills/06-motion-design-ad.md +1145 -0
  1108. package/references/video/seedance-skills/07-ecommerce-ad.md +928 -0
  1109. package/references/video/seedance-skills/08-anime-action.md +1145 -0
  1110. package/references/video/seedance-skills/09-product-360.md +988 -0
  1111. package/references/video/seedance-skills/10-music-video.md +1662 -0
  1112. package/references/video/seedance-skills/11-social-hook.md +1874 -0
  1113. package/references/video/seedance-skills/12-brand-story.md +1151 -0
  1114. package/references/video/seedance-skills/13-fashion-lookbook.md +1236 -0
  1115. package/references/video/seedance-skills/14-food-beverage.md +1110 -0
  1116. package/references/video/seedance-skills/15-real-estate.md +2344 -0
  1117. package/references/video/seedance-transport-payloads.md +144 -0
  1118. package/references/video/seedance-ugc-formulas.md +104 -0
  1119. package/references/video/stage-directors.md +47 -0
  1120. package/references/video/style-template-schema.md +40 -0
  1121. package/references/video/veo-prompting-guide.md +42 -0
  1122. package/schemas/video/artifacts/analyze-output.schema.json +60 -0
  1123. package/schemas/video/artifacts/assemble-report.schema.json +116 -0
  1124. package/schemas/video/artifacts/asset-manifest.schema.json +23 -0
  1125. package/schemas/video/artifacts/batch-queue-manifest.schema.json +59 -0
  1126. package/schemas/video/artifacts/brand-definition.schema.json +93 -0
  1127. package/schemas/video/artifacts/brand-dna.schema.json +55 -0
  1128. package/schemas/video/artifacts/brief.schema.json +13 -0
  1129. package/schemas/video/artifacts/clone-plan.schema.json +44 -0
  1130. package/schemas/video/artifacts/dialogue.schema.json +52 -0
  1131. package/schemas/video/artifacts/environment-assets.schema.json +30 -0
  1132. package/schemas/video/artifacts/execution-plan.schema.json +64 -0
  1133. package/schemas/video/artifacts/execution-report.schema.json +37 -0
  1134. package/schemas/video/artifacts/filmmaking-prompts.schema.json +129 -0
  1135. package/schemas/video/artifacts/flow-characters.schema.json +31 -0
  1136. package/schemas/video/artifacts/flow-voices.schema.json +30 -0
  1137. package/schemas/video/artifacts/motion-overlay-plan.schema.json +50 -0
  1138. package/schemas/video/artifacts/multi-shot-prompt.schema.json +90 -0
  1139. package/schemas/video/artifacts/music-video-config.schema.json +108 -0
  1140. package/schemas/video/artifacts/narration.schema.json +54 -0
  1141. package/schemas/video/artifacts/product-references.schema.json +29 -0
  1142. package/schemas/video/artifacts/project-blueprint.schema.json +236 -0
  1143. package/schemas/video/artifacts/publish-report.schema.json +12 -0
  1144. package/schemas/video/artifacts/reference-sheets.schema.json +85 -0
  1145. package/schemas/video/artifacts/review-report.schema.json +12 -0
  1146. package/schemas/video/artifacts/scene-candidates.schema.json +86 -0
  1147. package/schemas/video/artifacts/scene-selection.schema.json +50 -0
  1148. package/schemas/video/artifacts/seedance-assets.schema.json +31 -0
  1149. package/schemas/video/artifacts/sfx.schema.json +31 -0
  1150. package/schemas/video/artifacts/show-bible.schema.json +66 -0
  1151. package/schemas/video/artifacts/soundtrack.schema.json +39 -0
  1152. package/schemas/video/artifacts/story-bible.schema.json +131 -0
  1153. package/schemas/video/artifacts/storyboard.schema.json +58 -0
  1154. package/schemas/video/artifacts/voice-clones.schema.json +37 -0
  1155. package/schemas/video/brand-profile.schema.json +20 -0
  1156. package/schemas/video/errors.json +48 -0
  1157. package/schemas/video/pipeline-manifest.schema.json +51 -0
  1158. package/skills/README.md +113 -0
  1159. package/skills/ai-director/SKILL.md +140 -0
  1160. package/skills/ai-filmmaking/SKILL.md +239 -0
  1161. package/skills/ai-slop-cleaner/SKILL.md +114 -0
  1162. package/skills/brand-agency/SKILL.md +181 -0
  1163. package/skills/brand-presenter/SKILL.md +114 -0
  1164. package/skills/build-fix/SKILL.md +145 -0
  1165. package/skills/bunty/SKILL.md +41 -0
  1166. package/skills/catalog.json +326 -0
  1167. package/skills/character-ad/SKILL.md +154 -0
  1168. package/skills/character-creator/SKILL.md +303 -0
  1169. package/skills/character-library/README.md +12 -0
  1170. package/skills/character-library/SKILL.md +110 -0
  1171. package/skills/clawbot/SKILL.md +26 -0
  1172. package/skills/concierge/SKILL.md +183 -0
  1173. package/skills/configure-notifications/SKILL.md +286 -0
  1174. package/skills/davendra-presenter/SKILL.md +27 -0
  1175. package/skills/davendra-presenter/assets/davendra_intro_1.jpg +0 -0
  1176. package/skills/davendra-presenter/assets/davendra_intro_2.jpg +0 -0
  1177. package/skills/davendra-presenter/assets/davendra_outro_1.jpg +0 -0
  1178. package/skills/davendra-presenter/assets/davendra_outro_2.jpg +0 -0
  1179. package/skills/deep-interview/SKILL.md +358 -0
  1180. package/skills/deepsearch/SKILL.md +38 -0
  1181. package/skills/doctor/SKILL.md +200 -0
  1182. package/skills/graphify/SKILL.md +616 -0
  1183. package/skills/help/SKILL.md +200 -0
  1184. package/skills/higgsfield-generate/SKILL.md +171 -0
  1185. package/skills/improvement-run/SKILL.md +47 -0
  1186. package/skills/motion-reel/SKILL.md +102 -0
  1187. package/skills/movie-director/SKILL.md +338 -0
  1188. package/skills/multi-shot-prompt/SKILL.md +77 -0
  1189. package/skills/nex-presenter/SKILL.md +25 -0
  1190. package/skills/nex-presenter/assets/logo_manifest.json +26 -0
  1191. package/skills/nex-presenter/assets/logo_source.jpg +0 -0
  1192. package/skills/nex-presenter/assets/nex_brief_intro.mp4 +0 -0
  1193. package/skills/nex-presenter/assets/nex_intro_1.jpg +0 -0
  1194. package/skills/nex-presenter/assets/nex_intro_2.jpg +0 -0
  1195. package/skills/nex-presenter/assets/nex_outro_1.jpg +0 -0
  1196. package/skills/nex-presenter/assets/nex_outro_2.jpg +0 -0
  1197. package/skills/nex-presenter/assets/text_overlay.png +0 -0
  1198. package/skills/note/SKILL.md +62 -0
  1199. package/skills/pipeline/SKILL.md +86 -0
  1200. package/skills/review/SKILL.md +38 -0
  1201. package/skills/runway/SKILL.md +131 -0
  1202. package/skills/seedance-prompts/SKILL.md +194 -0
  1203. package/skills/skill/SKILL.md +835 -0
  1204. package/skills/skills-auditor/SKILL.md +73 -0
  1205. package/skills/studio-mode/SKILL.md +148 -0
  1206. package/skills/ugc/SKILL.md +386 -0
  1207. package/skills/ui-ux-pro-max/SKILL.md +386 -0
  1208. package/skills/video-analyze-template/SKILL.md +77 -0
  1209. package/skills/video-clone-ad/SKILL.md +67 -0
  1210. package/skills/video-framework/SKILL.md +201 -0
  1211. package/skills/video-portfolio-ops/SKILL.md +84 -0
  1212. package/skills/video-post/SKILL.md +97 -0
  1213. package/skills/video-production-handoff/SKILL.md +130 -0
  1214. package/skills/video-release-readiness/SKILL.md +93 -0
  1215. package/skills/video-replicator/SKILL.md +368 -0
  1216. package/skills/video-review-ui-qa/SKILL.md +103 -0
  1217. package/skills/video-storyboard/SKILL.md +71 -0
  1218. package/skills/video-thumbnail-lab/SKILL.md +67 -0
  1219. package/skills/web-clone/SKILL.md +366 -0
  1220. package/skills/worker/SKILL.md +106 -0
  1221. package/skills/youtube-audio/SKILL.md +114 -0
  1222. package/src/video/analyze-output.ts +10 -0
  1223. package/src/video/archive-project.ts +65 -0
  1224. package/src/video/artifact-history.ts +23 -0
  1225. package/src/video/artifact-store.ts +59 -0
  1226. package/src/video/artifact-validation.ts +268 -0
  1227. package/src/video/artifacts.ts +156 -0
  1228. package/src/video/assemble/animate-slides.ts +199 -0
  1229. package/src/video/assemble/animation-styles.json +97 -0
  1230. package/src/video/assemble/animation-styles.ts +54 -0
  1231. package/src/video/assemble/assemble.ts +547 -0
  1232. package/src/video/assemble/audio-concat.ts +165 -0
  1233. package/src/video/assemble/audio-mix-plan.ts +150 -0
  1234. package/src/video/assemble/audio-utils.ts +101 -0
  1235. package/src/video/assemble/cut-segment.ts +121 -0
  1236. package/src/video/assemble/ffmpeg.ts +333 -0
  1237. package/src/video/assemble/gemini-vision-classify.ts +153 -0
  1238. package/src/video/assemble/index.ts +247 -0
  1239. package/src/video/assemble/media-qc.ts +252 -0
  1240. package/src/video/assemble/music.ts +261 -0
  1241. package/src/video/assemble/narration-fit.ts +90 -0
  1242. package/src/video/assemble/overlay.ts +225 -0
  1243. package/src/video/assemble/pdf.ts +169 -0
  1244. package/src/video/assemble/qa-dialogue-lint.ts +129 -0
  1245. package/src/video/assemble/qa-image-filter.ts +147 -0
  1246. package/src/video/assemble/qa-image-vision.ts +154 -0
  1247. package/src/video/assemble/qa-narration-vision.ts +135 -0
  1248. package/src/video/assemble/qa-narration.ts +139 -0
  1249. package/src/video/assemble/stitch-ad.ts +222 -0
  1250. package/src/video/assemble/stitch.ts +918 -0
  1251. package/src/video/assemble/text-card.ts +285 -0
  1252. package/src/video/assemble/title-card.ts +186 -0
  1253. package/src/video/assemble/transcript.ts +240 -0
  1254. package/src/video/assemble/tts-elevenlabs.ts +182 -0
  1255. package/src/video/assemble/tts.ts +227 -0
  1256. package/src/video/assemble/types.ts +45 -0
  1257. package/src/video/assemble/upscale.ts +80 -0
  1258. package/src/video/asset-spec.ts +53 -0
  1259. package/src/video/asset-tag-lookup.ts +51 -0
  1260. package/src/video/atomic-write.ts +7 -0
  1261. package/src/video/audio-platform/native-elevenlabs-sfx.ts +128 -0
  1262. package/src/video/audio-platform/native-elevenlabs-tts.ts +119 -0
  1263. package/src/video/audio-platform/native-flowmusic.ts +167 -0
  1264. package/src/video/audio-platform/native-gemini-tts.ts +226 -0
  1265. package/src/video/audio-platform/native-lyria.ts +231 -0
  1266. package/src/video/audio-platform/native-lyria3.ts +244 -0
  1267. package/src/video/audio-platform/registry.ts +220 -0
  1268. package/src/video/audio-platform/suno-backend.ts +36 -0
  1269. package/src/video/audio-platform/types.ts +138 -0
  1270. package/src/video/batch-queue.ts +685 -0
  1271. package/src/video/blueprint-prompt.ts +118 -0
  1272. package/src/video/brand-definition.ts +287 -0
  1273. package/src/video/brand-dna.ts +478 -0
  1274. package/src/video/brand-prompt.ts +28 -0
  1275. package/src/video/candidate-migrate.ts +171 -0
  1276. package/src/video/category-registry.ts +224 -0
  1277. package/src/video/chain-fallback.ts +53 -0
  1278. package/src/video/character-auto-create.ts +547 -0
  1279. package/src/video/character-consistency.ts +85 -0
  1280. package/src/video/characters.ts +145 -0
  1281. package/src/video/checkpoints.ts +60 -0
  1282. package/src/video/cinema-profile.ts +120 -0
  1283. package/src/video/cinematography.ts +1229 -0
  1284. package/src/video/cli-output.ts +94 -0
  1285. package/src/video/cli-schema.ts +505 -0
  1286. package/src/video/cost-estimate.ts +150 -0
  1287. package/src/video/csv-export.ts +150 -0
  1288. package/src/video/dependencies.ts +64 -0
  1289. package/src/video/dialogue-fit.ts +62 -0
  1290. package/src/video/dialogue.ts +221 -0
  1291. package/src/video/director-defaults.ts +432 -0
  1292. package/src/video/director-preflight.ts +543 -0
  1293. package/src/video/doctor-portfolio.ts +197 -0
  1294. package/src/video/doctor.ts +499 -0
  1295. package/src/video/emotion-cues.ts +36 -0
  1296. package/src/video/environment-assets.ts +69 -0
  1297. package/src/video/environment-auto-create.ts +122 -0
  1298. package/src/video/errors.ts +133 -0
  1299. package/src/video/events.ts +42 -0
  1300. package/src/video/execute-autochain.ts +226 -0
  1301. package/src/video/execute.ts +569 -0
  1302. package/src/video/execution-cancel.ts +103 -0
  1303. package/src/video/execution-plan.ts +178 -0
  1304. package/src/video/execution-profile.ts +162 -0
  1305. package/src/video/execution-runtime.ts +975 -0
  1306. package/src/video/execution-seed.ts +46 -0
  1307. package/src/video/execution-status.ts +736 -0
  1308. package/src/video/filmmaking-prompts.ts +1789 -0
  1309. package/src/video/final-media.ts +118 -0
  1310. package/src/video/finish.ts +255 -0
  1311. package/src/video/flow-character-library.ts +342 -0
  1312. package/src/video/flow-markers.ts +330 -0
  1313. package/src/video/gemini-analyze.ts +387 -0
  1314. package/src/video/gemini-continuity.ts +186 -0
  1315. package/src/video/gemini-judge.ts +300 -0
  1316. package/src/video/gemini-key-pool.ts +153 -0
  1317. package/src/video/gen-image-flow.ts +491 -0
  1318. package/src/video/gen-image.ts +392 -0
  1319. package/src/video/generation-telemetry.ts +282 -0
  1320. package/src/video/http-error-safety.ts +13 -0
  1321. package/src/video/image-dimensions.ts +69 -0
  1322. package/src/video/legacy-import.ts +197 -0
  1323. package/src/video/library-clean.ts +399 -0
  1324. package/src/video/lipsync.ts +200 -0
  1325. package/src/video/media-host.ts +153 -0
  1326. package/src/video/metrics.ts +116 -0
  1327. package/src/video/motion-overlay/analyze-reel.ts +200 -0
  1328. package/src/video/motion-overlay/animate-render.ts +176 -0
  1329. package/src/video/motion-overlay/animate.ts +93 -0
  1330. package/src/video/motion-overlay/avatar-host-transport.ts +458 -0
  1331. package/src/video/motion-overlay/avatar-host.ts +238 -0
  1332. package/src/video/motion-overlay/compose-prompt.ts +247 -0
  1333. package/src/video/motion-overlay/execute.ts +355 -0
  1334. package/src/video/motion-overlay/flow-pack.ts +223 -0
  1335. package/src/video/motion-overlay/ingest.ts +210 -0
  1336. package/src/video/motion-overlay/motifs.ts +223 -0
  1337. package/src/video/motion-overlay/motion-style.ts +162 -0
  1338. package/src/video/motion-overlay/plan.ts +111 -0
  1339. package/src/video/motion-overlay/preview.ts +191 -0
  1340. package/src/video/motion-overlay/render-local.ts +441 -0
  1341. package/src/video/motion-overlay/run.ts +217 -0
  1342. package/src/video/motion-overlay/slice.ts +98 -0
  1343. package/src/video/motion-overlay/transcribe.ts +211 -0
  1344. package/src/video/motion-overlay/types.ts +89 -0
  1345. package/src/video/motion-overlay/v2v-transport.ts +209 -0
  1346. package/src/video/motion-overlay/write.ts +142 -0
  1347. package/src/video/multi-shot-artifact.ts +64 -0
  1348. package/src/video/multi-shot-prompt.ts +608 -0
  1349. package/src/video/music-video.ts +324 -0
  1350. package/src/video/narrate.ts +221 -0
  1351. package/src/video/native-dreamina.ts +638 -0
  1352. package/src/video/native-flow-r2v.ts +279 -0
  1353. package/src/video/native-runway.ts +647 -0
  1354. package/src/video/native-seedance.ts +615 -0
  1355. package/src/video/native-veo.ts +470 -0
  1356. package/src/video/next-actions.ts +247 -0
  1357. package/src/video/obsidian-export.ts +336 -0
  1358. package/src/video/obsidian-sync.ts +649 -0
  1359. package/src/video/obsidian-vault.ts +96 -0
  1360. package/src/video/outfit-prompts.ts +14 -0
  1361. package/src/video/outpaint-keyframe.ts +365 -0
  1362. package/src/video/pipeline-manifest.ts +16 -0
  1363. package/src/video/pipeline-manifests/director.json +46 -0
  1364. package/src/video/pipeline-manifests/storyboard.json +46 -0
  1365. package/src/video/platform-specs.ts +50 -0
  1366. package/src/video/playbooks.ts +34 -0
  1367. package/src/video/post-production.ts +277 -0
  1368. package/src/video/preview-portal/audit.ts +20 -0
  1369. package/src/video/preview-portal/discovery.ts +787 -0
  1370. package/src/video/preview-portal/generate.ts +138 -0
  1371. package/src/video/preview-portal/index.ts +41 -0
  1372. package/src/video/preview-portal/publish.ts +215 -0
  1373. package/src/video/preview-portal/render.ts +865 -0
  1374. package/src/video/preview-portal/shared-assets.ts +455 -0
  1375. package/src/video/preview-portal/templates.ts +112 -0
  1376. package/src/video/preview-portal/types.ts +288 -0
  1377. package/src/video/product-references.ts +43 -0
  1378. package/src/video/project-blueprint.ts +458 -0
  1379. package/src/video/project-index.ts +179 -0
  1380. package/src/video/projects.ts +18 -0
  1381. package/src/video/prompt-guidance.ts +64 -0
  1382. package/src/video/prompt-library.ts +96 -0
  1383. package/src/video/prompt-lint.ts +568 -0
  1384. package/src/video/prompt-quality.ts +635 -0
  1385. package/src/video/prompt-rules.ts +209 -0
  1386. package/src/video/provider-adapter-runner.ts +104 -0
  1387. package/src/video/provider-platform/index.ts +5 -0
  1388. package/src/video/provider-platform/registry.ts +286 -0
  1389. package/src/video/provider-platform/route-capabilities.ts +327 -0
  1390. package/src/video/provider-platform/router.ts +221 -0
  1391. package/src/video/provider-platform/security.ts +29 -0
  1392. package/src/video/provider-platform/telemetry.ts +116 -0
  1393. package/src/video/provider-platform/types.ts +192 -0
  1394. package/src/video/provider-status.ts +199 -0
  1395. package/src/video/providers/dreamina-useapi.ts +345 -0
  1396. package/src/video/providers/flowmusic-useapi.ts +252 -0
  1397. package/src/video/providers/google-flow.ts +110 -0
  1398. package/src/video/providers/public-host.ts +128 -0
  1399. package/src/video/providers/runway-useapi.ts +377 -0
  1400. package/src/video/providers/xskill.ts +304 -0
  1401. package/src/video/readiness.ts +284 -0
  1402. package/src/video/reference-sheet-store.ts +40 -0
  1403. package/src/video/reference-sheets.ts +224 -0
  1404. package/src/video/remix-narrated.ts +92 -0
  1405. package/src/video/report-diff.ts +299 -0
  1406. package/src/video/report-history.ts +122 -0
  1407. package/src/video/report.ts +35 -0
  1408. package/src/video/review-ui.ts +2495 -0
  1409. package/src/video/scene-candidate-store.ts +152 -0
  1410. package/src/video/scene-candidates.ts +195 -0
  1411. package/src/video/scene-selection-store.ts +36 -0
  1412. package/src/video/scene-selection.ts +306 -0
  1413. package/src/video/scheduling.ts +18 -0
  1414. package/src/video/scorecard.ts +90 -0
  1415. package/src/video/seedance-asset-library.ts +259 -0
  1416. package/src/video/seedance-blocks.ts +118 -0
  1417. package/src/video/seedance-chain-host.ts +152 -0
  1418. package/src/video/seedance-content-filter.ts +354 -0
  1419. package/src/video/seedance-skill-loader.ts +83 -0
  1420. package/src/video/sfx.ts +159 -0
  1421. package/src/video/shot-grammar.ts +349 -0
  1422. package/src/video/show-bible.ts +235 -0
  1423. package/src/video/soundtrack.ts +257 -0
  1424. package/src/video/stage-guards.ts +112 -0
  1425. package/src/video/status.ts +342 -0
  1426. package/src/video/story-bible.ts +302 -0
  1427. package/src/video/storyboard-grid.ts +320 -0
  1428. package/src/video/storyboard-markdown.ts +434 -0
  1429. package/src/video/storyboard-still-candidates.ts +82 -0
  1430. package/src/video/storyboard-templates.ts +249 -0
  1431. package/src/video/studio/execute.ts +401 -0
  1432. package/src/video/studio/planner.ts +114 -0
  1433. package/src/video/studio/project-context.ts +25 -0
  1434. package/src/video/studio/recipes.ts +346 -0
  1435. package/src/video/studio/session.ts +24 -0
  1436. package/src/video/studio/types.ts +76 -0
  1437. package/src/video/template-store.ts +241 -0
  1438. package/src/video/timeline.ts +32 -0
  1439. package/src/video/title-overlay.ts +234 -0
  1440. package/src/video/types.ts +465 -0
  1441. package/src/video/veo-subprocess.ts +77 -0
  1442. package/src/video/verify-env.ts +206 -0
  1443. package/src/video/verify-final.ts +65 -0
  1444. package/src/video/video-context.ts +92 -0
  1445. package/src/video/vocal-map.ts +155 -0
  1446. package/src/video/vocal-sync-plan.ts +224 -0
  1447. package/src/video/voice-clone.ts +410 -0
  1448. package/src/video/with-retry.ts +149 -0
  1449. package/src/video/workload.ts +87 -0
  1450. package/src/video/workspace.ts +255 -0
  1451. package/tmp/review-station/index.html +4194 -0
  1452. package/tsconfig.json +19 -0
@@ -0,0 +1,1789 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { artifactPathFor, writeArtifact } from './artifact-store.js';
4
+ import {
5
+ audioMix,
6
+ beats,
7
+ captureRealismBlock,
8
+ cameraSpec,
9
+ cameraProse,
10
+ backgroundPlate,
11
+ gradeSpec,
12
+ gradeProse,
13
+ lightingSpec,
14
+ lightingProse,
15
+ musicSyncLine,
16
+ orbitGrammar,
17
+ phoneCaptureBlock,
18
+ type Beat,
19
+ type CameraMove,
20
+ type CaptureRealismOpts,
21
+ type HazeDensity,
22
+ type PlateKind,
23
+ type DetailLevel,
24
+ } from './cinematography.js';
25
+ import type { AssetManifestArtifact, BriefArtifact, StoryboardArtifact } from './artifacts.js';
26
+ import {
27
+ referenceBuildOrder,
28
+ resolveCategory,
29
+ type CategoryDescriptor,
30
+ type ReferenceBuildStep,
31
+ } from './category-registry.js';
32
+ import {
33
+ crossFrameBlock,
34
+ frameMapBlock,
35
+ lastFrameBlock,
36
+ subjectLockBlock,
37
+ buildPositionalDescriptorLine,
38
+ buildIdentityLockLine,
39
+ SINGLE_FULL_FRAME_GUARD,
40
+ POSITIONAL_BINDING,
41
+ type FrameMapEntry,
42
+ type SubjectLockEntry,
43
+ } from './seedance-blocks.js';
44
+ import { listCharacterProfiles, type CharacterProfile } from './characters.js';
45
+ import { readProductReferences } from './product-references.js';
46
+ import { readReferenceSheetsArtifact } from './reference-sheet-store.js';
47
+ import type { ReferenceSheet, ReferenceSheetsArtifact } from './types.js';
48
+ import { ensureProjectWorkspace, readProjectManifest, type VideoProjectWorkspace } from './workspace.js';
49
+ import { withDialogue, type DialogueLine } from './multi-shot-prompt.js';
50
+ import { readProjectBlueprint, type ProjectBlueprintArtifact } from './project-blueprint.js';
51
+ import { renderDirectorLine, forbiddenMovementHits } from './blueprint-prompt.js';
52
+ import { readBrandDefinition, type BrandDefinitionArtifact } from './brand-definition.js';
53
+ import { renderBrandLine } from './brand-prompt.js';
54
+ import { resolveCinemaProfile, type ResolvedCinemaProfile, type CinemaProfileOverrides } from './cinema-profile.js';
55
+
56
+ /**
57
+ * Two-phase gate for the generation function (E5). The intended workflow is
58
+ * (1) lock the storyboard/panel layout + camera language, then (2) generate the
59
+ * heavy video-generation packets. `phase` selects which slice to return:
60
+ * - omitted (default) → full result, byte-identical to today (no behavior change).
61
+ * - `'storyboard'` → storyboard-only: `seedancePackets` is gated to `[]`; the
62
+ * storyboard/camera-language portion (referenceMap,
63
+ * characterSheetPrompts, storyboardGridPrompt) is kept.
64
+ * - `'video'` → full video packets, equivalent to the default.
65
+ */
66
+ export type FilmmakingPhase = 'storyboard' | 'video';
67
+
68
+ export type FilmmakingPromptVariant =
69
+ | 'character-sheet'
70
+ | 'storyboard-grid'
71
+ | 'text-driven'
72
+ | 'storyboard-grid-reference'
73
+ | 'character-sheets-plus-storyboard-grid';
74
+
75
+ export interface FilmmakingReferenceSlot {
76
+ slot: string;
77
+ role: 'character-sheet' | 'storyboard-grid' | 'start-frame' | 'end-frame' | 'reference-image' | 'background-plate';
78
+ label: string;
79
+ path?: string;
80
+ characterName?: string;
81
+ sceneIndex?: number;
82
+ status: 'ready' | 'pending';
83
+ }
84
+
85
+ export interface FilmmakingCharacterSheetPrompt {
86
+ characterName: string;
87
+ mode: 'reference-image' | 'description-only';
88
+ referenceSlots: string[];
89
+ promptText: string;
90
+ }
91
+
92
+ export interface FilmmakingStoryboardPanel {
93
+ panel: number;
94
+ position: string;
95
+ timecode: string;
96
+ beat: string;
97
+ cam: string;
98
+ move: string;
99
+ mood: string;
100
+ }
101
+
102
+ export interface FilmmakingStoryboardGridPrompt {
103
+ variant: 'storyboard-grid';
104
+ panelCount: number;
105
+ rows: number;
106
+ cols: number;
107
+ promptText: string;
108
+ panels: FilmmakingStoryboardPanel[];
109
+ }
110
+
111
+ export interface FilmmakingTimelineBeat {
112
+ /** Timecode span for this beat, e.g. `0:00-0:05`. */
113
+ t: string;
114
+ /** Shot/action direction for this beat. */
115
+ beat: string;
116
+ }
117
+
118
+ export interface FilmmakingSeedancePacket {
119
+ sceneIndex: number;
120
+ variant: Extract<
121
+ FilmmakingPromptVariant,
122
+ 'text-driven' | 'storyboard-grid-reference' | 'character-sheets-plus-storyboard-grid'
123
+ >;
124
+ durationSeconds: number;
125
+ /**
126
+ * OUTPUT-DEPENDENT render resolution (e.g. `720p`, `1080p`). Omitted by
127
+ * default — only populated when the caller threads a resolution through
128
+ * {@link GenerateFilmmakingPromptsOptions.resolution}, so the default packet
129
+ * shape is byte-identical to before.
130
+ */
131
+ resolution?: string;
132
+ /**
133
+ * OUTPUT-DEPENDENT multi-beat scene timeline. A single kinetic shot needs NO
134
+ * timeline; a multi-beat render does. Omitted by default and whenever
135
+ * {@link GenerateFilmmakingPromptsOptions.singleShot} is set; populated only
136
+ * when {@link GenerateFilmmakingPromptsOptions.timeline} is requested AND the
137
+ * render is not single-shot.
138
+ */
139
+ timeline?: FilmmakingTimelineBeat[];
140
+ references: FilmmakingReferenceSlot[];
141
+ promptText: string;
142
+ warnings: string[];
143
+ }
144
+
145
+ export interface FilmmakingPromptIssue {
146
+ code:
147
+ | 'character-description-missing'
148
+ | 'character-description-long'
149
+ | 'storyboard-missing'
150
+ | 'storyboard-grid-pending'
151
+ | 'reference-slot-pending'
152
+ | 'seedance-music-default'
153
+ | 'seedance-block-order'
154
+ | 'forbidden-camera-movement';
155
+ severity: 'warning' | 'error';
156
+ message: string;
157
+ path?: string;
158
+ }
159
+
160
+ export interface FilmmakingPromptsArtifact {
161
+ schemaVersion: 1;
162
+ projectSlug: string;
163
+ generatedAt: string;
164
+ sourceSkill: 'ai-filmmaking';
165
+ durationDefaultSeconds: number;
166
+ referenceMap: FilmmakingReferenceSlot[];
167
+ characterSheetPrompts: FilmmakingCharacterSheetPrompt[];
168
+ storyboardGridPrompt: FilmmakingStoryboardGridPrompt | null;
169
+ seedancePackets: FilmmakingSeedancePacket[];
170
+ issues: FilmmakingPromptIssue[];
171
+ }
172
+
173
+ export interface GenerateFilmmakingPromptsOptions {
174
+ root?: string;
175
+ projectSlug: string;
176
+ durationSeconds?: number;
177
+ storyboardGridPath?: string;
178
+ /**
179
+ * Render the storyboard grid prompt in a silhouette / no-face register so the
180
+ * grid stays usable as a provider `reference_image` (real-person content
181
+ * filters reject photoreal faces). See the multi-shot-framework Anti-patterns.
182
+ */
183
+ noFaces?: boolean;
184
+ /**
185
+ * Visual style/genre — the ai-filmmaking skill treats this as a swappable
186
+ * parameter, not a hardcoded assumption. Known: live-action (default), pixar,
187
+ * anime, noir, influencer/vlog, action/martial-arts, music-video. An unknown
188
+ * value is passed through as a free-form style descriptor.
189
+ */
190
+ genre?: string;
191
+ /**
192
+ * Category id (see `category-registry.ts`). Resolves to a `CategoryDescriptor`
193
+ * that supplies a default genre/style. Default (undefined) → the `cinematic`
194
+ * character descriptor, whose genre is `'live-action'` — i.e. today's default,
195
+ * so this is a no-op for the existing character/cinematic path. An explicit
196
+ * `genre` still wins over the descriptor's genre. Unknown ids throw.
197
+ */
198
+ category?: string;
199
+ /** Aspect ratio stated in every template (default 16:9; 9:16 for vertical/social). */
200
+ aspectRatio?: string;
201
+ /**
202
+ * Storyboard panel count — 9, 12, 15 (default), or 20. Drives the grid layout
203
+ * (3×3 / 3×4 / 3×5 / 4×5, transposed for vertical aspect ratios) and the
204
+ * per-panel timecode breakdown. Mirrors the storyboard-prompt-builder skill.
205
+ */
206
+ panelCount?: number;
207
+ /**
208
+ * Cinematography language density (default `standard`). At `rich`, a quantified
209
+ * cinematography suffix (lens mm, Kelvin, key angle, color-grade hue/sat, audio
210
+ * dB hierarchy, move velocity in ft/s) is appended to the storyboard-grid Style
211
+ * line and the text-driven Seedance STYLE/AUDIO lines. `terse`/`standard` emit
212
+ * exactly today's output (no behavior change).
213
+ */
214
+ detail?: DetailLevel;
215
+ /**
216
+ * Two-phase gate (E5). `'storyboard'` returns the storyboard/camera-language
217
+ * portion only (video `seedancePackets` gated to `[]`); `'video'` and the
218
+ * default (omitted) return the full result. See {@link FilmmakingPhase}.
219
+ */
220
+ phase?: FilmmakingPhase;
221
+ write?: boolean;
222
+ /**
223
+ * Character sheet layout variant (default `'8-shot'` — unchanged behavior).
224
+ * Set to `'6-panel'` to opt into the compact 3-column × 2-row mid-gray sheet
225
+ * built by {@link characterSheetSixPanelPrompt}.
226
+ */
227
+ sheetLayout?: '8-shot' | '6-panel';
228
+ /**
229
+ * Joey opt-in anti-plastic realism block (`captureRealismBlock`). When set, the
230
+ * `rich`-detail storyboard-grid + text-driven CAMERA CAPTURE Style lines append
231
+ * the keystone capture-realism clause. Omitted (default) → byte-identical to
232
+ * today (the suffix is the legacy no-arg form). `wet`/`haze` only apply when
233
+ * `realism` is enabled.
234
+ */
235
+ realism?: CaptureRealismOpts | false;
236
+ /**
237
+ * Cinematography register for the `rich`-detail suffix and the CAMERA CAPTURE
238
+ * block: `'prose'` (Joey 2.0 behaviour wording, no colour-math numerals) or
239
+ * `'numeric'` (Kelvin / key-angle / ratio / hue°). When omitted the resolved
240
+ * {@link resolveCinemaProfile} register applies (HARD DEFAULT `'prose'`).
241
+ */
242
+ register?: 'prose' | 'numeric';
243
+ /**
244
+ * Lighting register id for the `rich`-detail cinematography suffix (default
245
+ * `'neutral-studio'`). Omitted → legacy default. See `lightingSpec`.
246
+ */
247
+ lightingId?: string;
248
+ /**
249
+ * Color-grade register id for the `rich`-detail cinematography suffix (default
250
+ * `'teal-orange'`). Omitted → legacy default. See `gradeSpec`.
251
+ */
252
+ gradeId?: string;
253
+ /**
254
+ * Backdrop plate kind. When set, appends a `backgroundPlate` clause to the
255
+ * storyboard-grid Style line (opt-in, additive). Omitted (default) → no plate
256
+ * clause, output unchanged. The character-sheet prompts keep their own
257
+ * mid-gray default verbatim.
258
+ */
259
+ plateKind?: PlateKind;
260
+ /**
261
+ * Opt-in (WS-C) canonical multi-reference text discipline proven by the user's
262
+ * ARK payloads. When set, EVERY multi-reference Seedance packet additionally
263
+ * emits: (a) a per-character POSITIONAL visual-descriptor line (Center/Left/
264
+ * Right/…, visual descriptors, never proper names), (b) an explicit
265
+ * identity-lock "no face morphing" line, (c) the single-full-frame guard on
266
+ * ALL packets (not only grid-bearing ones), and (d) a diegetic soundscape line
267
+ * when {@link generateAudio} is set (else the existing no-music line). Omitted
268
+ * (default) → output is byte-identical to today.
269
+ */
270
+ textDiscipline?: boolean;
271
+ /**
272
+ * Whether the scene generates audio. Only consulted when {@link textDiscipline}
273
+ * is set: `true` swaps the no-music line for a diegetic soundscape line; `false`
274
+ * (default) keeps the existing no-music line. Mirrors the execution profile's
275
+ * `generateAudio` flag.
276
+ */
277
+ generateAudio?: boolean;
278
+ /**
279
+ * OUTPUT-DEPENDENT render resolution (e.g. `720p`, `1080p`). When set, each
280
+ * generated Seedance packet carries it on `resolution`, so a downstream
281
+ * `buildExecutionPayload` task can submit a per-render resolution instead of a
282
+ * fixed one. Omitted (default) → no `resolution` field, output unchanged.
283
+ */
284
+ resolution?: string;
285
+ /**
286
+ * Emit a multi-beat scene timeline on each Seedance packet. The timeline/
287
+ * scene-timing block is OUTPUT-DEPENDENT: a multi-beat render wants it, a
288
+ * single kinetic shot does not. Default (omitted/false) → no `timeline` field,
289
+ * output byte-identical to today. Ignored when {@link singleShot} is set.
290
+ */
291
+ timeline?: boolean;
292
+ /**
293
+ * Render as a single kinetic shot — no scene-timing/timeline block. When set,
294
+ * packets NEVER carry a `timeline` field (it wins over {@link timeline}).
295
+ * Default (omitted/false) leaves timeline behaviour to {@link timeline}.
296
+ */
297
+ singleShot?: boolean;
298
+ /**
299
+ * The AI-Director Project Blueprint. When provided (or auto-read from
300
+ * `artifacts/project-blueprint.json` when omitted), every scene packet gains a
301
+ * compact prose `DIRECTOR — …` addendum (master palette, look + vibe, the
302
+ * scene's signature lighting setup, present-character silhouette/signature
303
+ * framing, the environment's 5-sensory-words line, and the camera bible's one
304
+ * rule) AND the camera bible's forbidden movements are validated against each
305
+ * packet (a `forbidden-camera-movement` issue per hit). Absent → byte-identical
306
+ * to today.
307
+ */
308
+ blueprint?: ProjectBlueprintArtifact;
309
+ /**
310
+ * The locked brand system (brand-agency skill). When provided (or auto-read
311
+ * from `artifacts/brand-definition.json` when omitted), every scene packet
312
+ * gains a compact prose `BRAND — …` addendum (wordmark, named palette,
313
+ * voice tone) appended after the canonical body and any DIRECTOR addendum.
314
+ * Absent → byte-identical to today.
315
+ */
316
+ brandDefinition?: BrandDefinitionArtifact;
317
+ /**
318
+ * Spoken dialogue woven into every scene packet (the ai-filmmaking "Dialog
319
+ * scenes" discipline: `"X says: …"` / `"Y replies: …"` signals consecutive-
320
+ * order speech so speakers don't collapse into each other). Text-driven
321
+ * packets carry it on the opening FRAME MAP beat; the grid-reference and
322
+ * character-sheets-plus-storyboard-grid variants carry it on the Storyline
323
+ * line. A speaker whose name matches a stored character is rendered by that
324
+ * character's visual descriptor, never the proper name. Character path only.
325
+ * Applies to every scene packet that lacks a {@link dialogueByScene} entry.
326
+ * Omitted (default) → output byte-identical to today.
327
+ */
328
+ dialogue?: DialogueLine;
329
+ /**
330
+ * Per-scene dialogue keyed by `sceneIndex`. A scene with an entry here uses
331
+ * it instead of the blanket {@link dialogue} (so a four-scene piece can put
332
+ * the exchange only on the scene where it happens). A scene without an entry
333
+ * falls back to {@link dialogue} if set, else stays dialogue-free. Empty/
334
+ * omitted → no effect.
335
+ */
336
+ dialogueByScene?: Map<number, DialogueLine>;
337
+ /**
338
+ * Rewrite named `[emotion]` dialogue tags as physical-cue descriptors
339
+ * (`rewriteEmotionAsPhysical`). Consulted for both {@link dialogue} and
340
+ * {@link dialogueByScene}. Default off.
341
+ */
342
+ emotionCues?: boolean;
343
+ }
344
+
345
+ // Quantified cinematography suffix appended only at detail === 'rich'. Built from
346
+ // the shared cinematography emitters so the numbers stay consistent with the
347
+ // multi-shot framework. Deterministic and pure.
348
+ const RICH_CAMERA_MOVE: CameraMove = {
349
+ shot: 'master',
350
+ lens: 35,
351
+ angle: 'eye-level',
352
+ movement: 'dolly',
353
+ };
354
+
355
+ export function richCinematographySuffix(opts: {
356
+ lightingId?: string;
357
+ gradeId?: string;
358
+ realism?: CaptureRealismOpts | false;
359
+ /**
360
+ * Cinematography register. `'numeric'` (default) keeps the legacy Kelvin /
361
+ * key-angle / ratio / hue° tokens via `cameraSpec`/`lightingSpec`/`gradeSpec`
362
+ * — byte-identical to before. `'prose'` swaps in the Joey 2.0 behaviour
363
+ * register (`cameraProse`/`lightingProse`/`gradeProse`) which carries no
364
+ * synthetic colour-math numerals.
365
+ */
366
+ register?: 'prose' | 'numeric';
367
+ } = {}): string {
368
+ const lightingId = opts.lightingId ?? 'neutral-studio';
369
+ const gradeId = opts.gradeId ?? 'teal-orange';
370
+ const register = opts.register ?? 'numeric';
371
+ const base = register === 'prose'
372
+ ? `Cinematography: ${cameraProse(RICH_CAMERA_MOVE.movement, 'rich')}; ` +
373
+ `${lightingProse(lightingId, 'rich')}; ` +
374
+ `${gradeProse(gradeId, 'rich')}.`
375
+ : `Cinematography: ${cameraSpec(RICH_CAMERA_MOVE, 'rich')}; ` +
376
+ `${lightingSpec(lightingId, 'rich')}; ` +
377
+ `${gradeSpec(gradeId, 'rich')}.`;
378
+ if (opts.realism) {
379
+ return `${base} ${captureRealismBlock(opts.realism, 'rich')}`;
380
+ }
381
+ return base;
382
+ }
383
+
384
+ function richAudioSuffix(): string {
385
+ return `Audio: ${audioMix('rich')}.`;
386
+ }
387
+
388
+ export const SUPPORTED_PANEL_COUNTS = [9, 12, 15, 20] as const;
389
+
390
+ // Grid layout per panel count (storyboard-prompt-builder skill). Horizontal
391
+ // orientation keeps cols ≥ rows; a vertical (taller-than-wide) aspect ratio
392
+ // transposes so the sheet reads top-to-bottom.
393
+ function gridLayout(panelCount: number, aspectRatio: string): { rows: number; cols: number } {
394
+ const base: Record<number, { rows: number; cols: number }> = {
395
+ 9: { rows: 3, cols: 3 },
396
+ 12: { rows: 3, cols: 4 },
397
+ 15: { rows: 3, cols: 5 },
398
+ 20: { rows: 4, cols: 5 },
399
+ };
400
+ const layout = base[panelCount] ?? { rows: 3, cols: Math.ceil(panelCount / 3) };
401
+ const [w, h] = aspectRatio.split(':').map((n) => Number(n));
402
+ const vertical = Number.isFinite(w) && Number.isFinite(h) && h > w;
403
+ return vertical ? { rows: layout.cols, cols: layout.rows } : layout;
404
+ }
405
+
406
+ export function resolvePanelCount(panelCount?: number): number {
407
+ if (panelCount === undefined) return 15;
408
+ if (!(SUPPORTED_PANEL_COUNTS as readonly number[]).includes(panelCount)) {
409
+ throw new Error(`filmmaking-prompts: --panels must be one of ${SUPPORTED_PANEL_COUNTS.join(', ')} (got ${panelCount})`);
410
+ }
411
+ return panelCount;
412
+ }
413
+
414
+ export interface GenerateFilmmakingPromptsResult {
415
+ artifact: FilmmakingPromptsArtifact;
416
+ artifactPath?: string;
417
+ }
418
+
419
+ // The ai-filmmaking skill is genre-agnostic: the same skeleton renders
420
+ // photoreal, Pixar 3D, anime, noir, vlog, or stylized work — style is a
421
+ // swappable parameter. These blocks feed the character-sheet STYLE line, the
422
+ // storyboard grid Style descriptors, and the Seedance FORMAT tone, and pick the
423
+ // annotation third line (MOOD default / VOICE for vlog / STYLE for action).
424
+ export interface GenreStyle {
425
+ genre: string;
426
+ charSheetStyle: string;
427
+ gridStyleDescriptors: string;
428
+ annotationThirdLine: 'MOOD' | 'VOICE' | 'STYLE';
429
+ formatTone: string;
430
+ }
431
+
432
+ const GENRE_STYLES: ReadonlyMap<string, GenreStyle> = new Map([
433
+ ['live-action', {
434
+ genre: 'live-action',
435
+ charSheetStyle: 'photorealistic, life-like live action shot on a DSLR camera with 35mm film and muted color tones, do not make it look like a 3D render',
436
+ gridStyleDescriptors: 'live-action, photorealistic, lifelike, 35mm film grain',
437
+ annotationThirdLine: 'MOOD',
438
+ formatTone: 'cinematic grounded realism',
439
+ }],
440
+ ['pixar', {
441
+ genre: 'pixar',
442
+ charSheetStyle: 'stylized 3D render in the visual language of modern Pixar features, soft global illumination, expressive proportions, no photoreal rendering',
443
+ gridStyleDescriptors: 'stylized 3D Pixar-style render, soft global illumination, expressive proportions',
444
+ annotationThirdLine: 'MOOD',
445
+ formatTone: 'stylized 3D animation',
446
+ }],
447
+ ['anime', {
448
+ genre: 'anime',
449
+ charSheetStyle: '2D anime cel-shading, clean line work, painterly backgrounds, no 3D render',
450
+ gridStyleDescriptors: '2D anime cel-shading, clean line work, painterly backgrounds',
451
+ annotationThirdLine: 'MOOD',
452
+ formatTone: '2D anime',
453
+ }],
454
+ ['noir', {
455
+ genre: 'noir',
456
+ charSheetStyle: 'high-contrast black and white film, harsh chiaroscuro lighting, 35mm grain',
457
+ gridStyleDescriptors: 'high-contrast black and white, harsh chiaroscuro, 35mm grain',
458
+ annotationThirdLine: 'MOOD',
459
+ formatTone: 'high-contrast noir',
460
+ }],
461
+ ['influencer', {
462
+ genre: 'influencer',
463
+ charSheetStyle: 'natural daylight, iPhone selfie-camera aesthetic, soft skin tones, no cinematic grade',
464
+ gridStyleDescriptors: 'natural daylight, iPhone selfie-camera aesthetic, soft skin tones',
465
+ annotationThirdLine: 'VOICE',
466
+ formatTone: 'handheld vlog realism',
467
+ }],
468
+ ['action', {
469
+ genre: 'action',
470
+ charSheetStyle: 'photorealistic, life-like live action shot on a DSLR camera with 35mm film and muted color tones, do not make it look like a 3D render',
471
+ gridStyleDescriptors: 'live-action, photorealistic, kinetic, 35mm film grain',
472
+ annotationThirdLine: 'STYLE',
473
+ formatTone: 'kinetic action realism',
474
+ }],
475
+ ['music-video', {
476
+ genre: 'music-video',
477
+ charSheetStyle: 'photorealistic, life-like live action shot on a DSLR camera with 35mm film and muted color tones, do not make it look like a 3D render',
478
+ gridStyleDescriptors: 'live-action, photorealistic, lifelike, 35mm film grain',
479
+ annotationThirdLine: 'MOOD',
480
+ formatTone: 'cinematic music-video energy',
481
+ }],
482
+ ['cgi', {
483
+ genre: 'cgi',
484
+ charSheetStyle: 'photoreal CGI render with ray-traced global illumination and physically-based materials, crisp specular highlights and volumetric light — rendered, not live-action',
485
+ gridStyleDescriptors: 'photoreal CGI render, ray-traced global illumination, PBR materials, volumetric light',
486
+ annotationThirdLine: 'MOOD',
487
+ formatTone: 'photoreal CGI render',
488
+ }],
489
+ ['cartoon', {
490
+ genre: 'cartoon',
491
+ charSheetStyle: 'hand-drawn 2D cartoon with bold clean outlines and flat cel fills, exaggerated proportions, no 3D render',
492
+ gridStyleDescriptors: 'hand-drawn 2D cartoon, bold outlines, flat cel fills, saturated primaries',
493
+ annotationThirdLine: 'MOOD',
494
+ formatTone: '2D cartoon',
495
+ }],
496
+ ]);
497
+
498
+ const GENRE_ALIASES: ReadonlyMap<string, string> = new Map([
499
+ ['photorealistic', 'live-action'], ['photoreal', 'live-action'], ['cinematic', 'live-action'], ['realism', 'live-action'],
500
+ ['3d', 'pixar'], ['animation', 'pixar'],
501
+ ['2d', 'anime'], ['cel', 'anime'],
502
+ ['vlog', 'influencer'], ['social', 'influencer'], ['ugc', 'influencer'],
503
+ ['martial-arts', 'action'], ['fight', 'action'], ['combat', 'action'],
504
+ ['musicvideo', 'music-video'], ['music_video', 'music-video'], ['mv', 'music-video'],
505
+ ]);
506
+
507
+ export function resolveGenreStyle(genre?: string): GenreStyle {
508
+ if (!genre || !genre.trim()) return GENRE_STYLES.get('live-action')!;
509
+ const key = genre.trim().toLowerCase();
510
+ const canonical = GENRE_ALIASES.get(key) ?? key;
511
+ const known = GENRE_STYLES.get(canonical);
512
+ if (known) return known;
513
+ // Unknown genre: pass the user's descriptor straight through (skill is
514
+ // genre-agnostic), defaulting the annotation third line to MOOD.
515
+ return {
516
+ genre: genre.trim(),
517
+ charSheetStyle: `${genre.trim()} style`,
518
+ gridStyleDescriptors: genre.trim(),
519
+ annotationThirdLine: 'MOOD',
520
+ formatTone: genre.trim(),
521
+ };
522
+ }
523
+
524
+ /**
525
+ * Build the per-call CLI override layer for {@link resolveCinemaProfile} from the
526
+ * generate options. Only fields the caller actually set are forwarded so the
527
+ * project manifest + genre + HARD DEFAULT layers fill in the rest. The legacy
528
+ * `realism` option (a {@link CaptureRealismOpts} | false) is mapped onto the
529
+ * profile's boolean `realism` plus its `haze`/`wet` knobs.
530
+ */
531
+ function cinemaOverridesFromOptions(
532
+ options: GenerateFilmmakingPromptsOptions,
533
+ ): CinemaProfileOverrides {
534
+ const overrides: CinemaProfileOverrides = {};
535
+ if (options.detail !== undefined) overrides.detail = options.detail;
536
+ if (options.register !== undefined) overrides.register = options.register;
537
+ if (options.lightingId !== undefined) overrides.lightingId = options.lightingId;
538
+ if (options.gradeId !== undefined) overrides.gradeId = options.gradeId;
539
+ if (options.plateKind !== undefined) overrides.plateKind = options.plateKind;
540
+ if (options.realism !== undefined) {
541
+ if (options.realism === false) {
542
+ overrides.realism = false;
543
+ } else {
544
+ overrides.realism = true;
545
+ if (options.realism.haze !== undefined) overrides.haze = options.realism.haze;
546
+ if (options.realism.wet !== undefined) overrides.wet = options.realism.wet;
547
+ }
548
+ }
549
+ return overrides;
550
+ }
551
+
552
+ /**
553
+ * Project the resolved profile into the cinematography-override bag accepted by
554
+ * {@link buildStoryboardGridPrompt} / {@link seedancePromptText}. `realism:false`
555
+ * disables the capture-realism block; otherwise the resolved haze/wet flow in.
556
+ */
557
+ function cinematicsFromProfile(profile: ResolvedCinemaProfile): {
558
+ realism: CaptureRealismOpts | false;
559
+ register: 'prose' | 'numeric';
560
+ captureRegister: 'cinema' | 'phone';
561
+ lightingId?: string;
562
+ gradeId?: string;
563
+ plateKind: PlateKind;
564
+ } {
565
+ return {
566
+ realism: profile.realism ? { haze: profile.haze, ...(profile.wet ? { wet: true } : {}) } : false,
567
+ register: profile.register,
568
+ captureRegister: profile.captureRegister,
569
+ ...(profile.lightingId !== undefined ? { lightingId: profile.lightingId } : {}),
570
+ ...(profile.gradeId !== undefined ? { gradeId: profile.gradeId } : {}),
571
+ plateKind: profile.plateKind,
572
+ };
573
+ }
574
+
575
+ export async function generateFilmmakingPrompts(
576
+ options: GenerateFilmmakingPromptsOptions,
577
+ ): Promise<GenerateFilmmakingPromptsResult> {
578
+ const root = options.root ?? process.cwd();
579
+ const durationSeconds = options.durationSeconds ?? 15;
580
+ const noFaces = options.noFaces ?? false;
581
+ // Resolve the category descriptor (default → cinematic character descriptor).
582
+ // The descriptor supplies a default genre; an explicit `--genre` still wins.
583
+ // For the cinematic default this yields `'live-action'`, identical to today's
584
+ // behavior — purely internal plumbing, no output change on the character path.
585
+ // `subjectType` selects the branch: `'character'` (default) keeps today's
586
+ // cinematic/character path verbatim; `'product'` takes the additive
587
+ // product-subject branch below.
588
+ const descriptor = resolveCategory(options.category);
589
+ const effectiveGenre = options.genre ?? descriptor.genre;
590
+ const genreStyle = resolveGenreStyle(effectiveGenre);
591
+ const aspectRatio = options.aspectRatio?.trim() || '16:9';
592
+ const panelCount = resolvePanelCount(options.panelCount);
593
+ const workspace = await ensureProjectWorkspace(options.projectSlug, root);
594
+ // Resolve the cinema profile ONCE: project manifest < CLI overrides, with the
595
+ // genre + HARD DEFAULT below them (Joey 2.0: rich + realism + prose by default).
596
+ // With ZERO flags and no project block this yields the full photoreal treatment.
597
+ const manifest = await readProjectManifest(workspace);
598
+ const profile = resolveCinemaProfile(
599
+ manifest?.cinemaProfile,
600
+ cinemaOverridesFromOptions(options),
601
+ effectiveGenre,
602
+ );
603
+ const detail = profile.detail;
604
+ const brief = await readOptionalArtifact<BriefArtifact>(workspace, 'brief');
605
+ const generatedAt = new Date().toISOString();
606
+
607
+ if (descriptor.subjectType === 'product') {
608
+ return generateProductPrompts({
609
+ options,
610
+ workspace,
611
+ brief,
612
+ descriptor,
613
+ genreStyle,
614
+ aspectRatio,
615
+ durationSeconds,
616
+ detail,
617
+ profile,
618
+ generatedAt,
619
+ });
620
+ }
621
+
622
+ const storyboard = await readOptionalArtifact<StoryboardArtifact>(workspace, 'storyboard');
623
+ const assetManifest = await readOptionalArtifact<AssetManifestArtifact>(workspace, 'asset-manifest');
624
+ const referenceSheets = await readReferenceSheetsArtifact(root, options.projectSlug);
625
+ const characters = await listCharacterProfiles(workspace);
626
+ // Director layer: the explicit option wins; otherwise auto-read the persisted
627
+ // blueprint (graceful null when absent → byte-identical legacy output).
628
+ const blueprint = options.blueprint ?? (await readProjectBlueprint(root, options.projectSlug)) ?? undefined;
629
+ // Brand layer: the explicit option wins; otherwise auto-read the persisted
630
+ // brand definition (graceful null when absent → byte-identical legacy output).
631
+ const brandDefinition = options.brandDefinition ?? (await readBrandDefinition(root, options.projectSlug)) ?? undefined;
632
+ const issues: FilmmakingPromptIssue[] = [];
633
+
634
+ const sheetLayout = options.sheetLayout ?? '8-shot';
635
+ const referenceMap = buildReferenceMap(referenceSheets, characters, assetManifest);
636
+ const characterSheetPrompts = buildCharacterSheetPrompts(characters, referenceMap, issues, genreStyle, aspectRatio, sheetLayout);
637
+ // Character lock: carry each character's identity description + its @imageN
638
+ // slot forward into the Seedance Variant A SUBJECT lines (verbatim reuse is
639
+ // the skill's most important rule).
640
+ const characterContext = new Map<string, { slot?: string; description: string }>();
641
+ for (const character of characters) {
642
+ const slot = referenceMap.find((s) => s.role === 'character-sheet' && s.characterName === character.name && s.status === 'ready');
643
+ characterContext.set(character.name, {
644
+ ...(slot ? { slot: slot.slot } : {}),
645
+ description: cleanSentence(character.description ?? `${character.name}, visually distinctive lead character`),
646
+ });
647
+ }
648
+ const storyboardGridPrompt = storyboard
649
+ ? buildStoryboardGridPrompt(storyboard, brief, characterSheetPrompts, noFaces, genreStyle, aspectRatio, panelCount, durationSeconds, detail, cinematicsFromProfile(profile))
650
+ : null;
651
+ if (!storyboard) {
652
+ issues.push({
653
+ code: 'storyboard-missing',
654
+ severity: 'warning',
655
+ message: 'No storyboard artifact exists; Seedance packets fall back to text-driven prompts.',
656
+ path: 'artifacts/storyboard.json',
657
+ });
658
+ }
659
+
660
+ if (storyboardGridPrompt) {
661
+ const storyboardGridPath = options.storyboardGridPath?.trim();
662
+ referenceMap.push({
663
+ slot: nextSlot(referenceMap.length),
664
+ role: 'storyboard-grid',
665
+ label: '9-panel storyboard grid',
666
+ ...(storyboardGridPath ? { path: storyboardGridPath } : {}),
667
+ status: storyboardGridPath ? 'ready' : 'pending',
668
+ });
669
+ if (!storyboardGridPath) {
670
+ issues.push({
671
+ code: 'storyboard-grid-pending',
672
+ severity: 'warning',
673
+ message: 'Storyboard grid prompt was generated, but no rendered grid image is attached yet.',
674
+ });
675
+ }
676
+ }
677
+
678
+ // Two-phase gate (E5): in storyboard phase, omit the heavy video-generation
679
+ // packets (and their packet-only issues) — return the storyboard/camera-
680
+ // language portion only. Default/video phase builds the full packets.
681
+ const seedancePackets = options.phase === 'storyboard'
682
+ ? []
683
+ : buildSeedancePackets({
684
+ storyboard,
685
+ brief,
686
+ referenceMap,
687
+ durationSeconds,
688
+ noFaces,
689
+ genreStyle,
690
+ aspectRatio,
691
+ characterContext,
692
+ detail,
693
+ profile,
694
+ issues,
695
+ textDiscipline: options.textDiscipline ?? false,
696
+ generateAudio: options.generateAudio ?? false,
697
+ ...(options.resolution !== undefined ? { resolution: options.resolution } : {}),
698
+ // A single kinetic shot carries no timeline; otherwise honour the opt-in.
699
+ emitTimeline: !(options.singleShot ?? false) && (options.timeline ?? false),
700
+ ...(blueprint ? { blueprint } : {}),
701
+ ...(brandDefinition ? { brandDefinition } : {}),
702
+ ...(options.dialogue ? { dialogue: options.dialogue } : {}),
703
+ ...(options.dialogueByScene && options.dialogueByScene.size > 0 ? { dialogueByScene: options.dialogueByScene } : {}),
704
+ ...(options.dialogue || (options.dialogueByScene && options.dialogueByScene.size > 0)
705
+ ? { emotionCues: options.emotionCues ?? false }
706
+ : {}),
707
+ });
708
+
709
+ const artifact: FilmmakingPromptsArtifact = {
710
+ schemaVersion: 1,
711
+ projectSlug: options.projectSlug,
712
+ generatedAt,
713
+ sourceSkill: 'ai-filmmaking',
714
+ durationDefaultSeconds: durationSeconds,
715
+ referenceMap,
716
+ characterSheetPrompts,
717
+ storyboardGridPrompt,
718
+ seedancePackets,
719
+ issues,
720
+ };
721
+
722
+ if (!options.write) return { artifact };
723
+ return {
724
+ artifact,
725
+ artifactPath: await writeArtifact(workspace, 'filmmaking-prompts', artifact),
726
+ };
727
+ }
728
+
729
+ // ---------------------------------------------------------------------------
730
+ // Product-subject branch (descriptor.subjectType === 'product').
731
+ //
732
+ // Additive path: NO character sheets, NO storyboard-grid character lock. Each
733
+ // product becomes a text-driven Seedance packet whose timeline follows the
734
+ // descriptor's beat template (ad-hook-feature-cta / turntable / lookbook), with
735
+ // orbit grammar woven in for orbit/turntable camera vocabularies and the
736
+ // product reference assets carried as @imageN reference slots.
737
+ // ---------------------------------------------------------------------------
738
+ async function generateProductPrompts(input: {
739
+ options: GenerateFilmmakingPromptsOptions;
740
+ workspace: VideoProjectWorkspace;
741
+ brief: BriefArtifact | undefined;
742
+ descriptor: CategoryDescriptor;
743
+ genreStyle: GenreStyle;
744
+ aspectRatio: string;
745
+ durationSeconds: number;
746
+ detail: DetailLevel;
747
+ profile: ResolvedCinemaProfile;
748
+ generatedAt: string;
749
+ }): Promise<GenerateFilmmakingPromptsResult> {
750
+ const { options, workspace, brief, descriptor, genreStyle, aspectRatio, durationSeconds, detail, profile, generatedAt } = input;
751
+ const issues: FilmmakingPromptIssue[] = [];
752
+ const { products } = await readProductReferences(workspace);
753
+
754
+ const productList = products.length > 0
755
+ ? products
756
+ : [{ name: brief?.title ?? 'the product', referenceAssets: [] as string[] }];
757
+ if (products.length === 0) {
758
+ issues.push({
759
+ code: 'reference-slot-pending',
760
+ severity: 'warning',
761
+ message: 'No product-references.json found; product packets fall back to a description-only hero from the brief.',
762
+ path: 'artifacts/product-references.json',
763
+ });
764
+ }
765
+
766
+ const referenceMap: FilmmakingReferenceSlot[] = [];
767
+ for (const product of productList) {
768
+ for (const asset of product.referenceAssets) {
769
+ referenceMap.push({
770
+ slot: nextSlot(referenceMap.length),
771
+ role: 'reference-image',
772
+ label: `${product.name} reference`,
773
+ path: asset,
774
+ status: 'ready',
775
+ });
776
+ }
777
+ }
778
+
779
+ const orbitKind = descriptor.beatTemplate === 'turntable' ? 'product-rotation' : 'camera-orbit';
780
+ const useOrbit = descriptor.cameraVocab === 'orbit' || descriptor.beatTemplate === 'turntable';
781
+
782
+ // Two-phase gate (E5): storyboard phase omits the video-generation packets.
783
+ const productPackets: FilmmakingSeedancePacket[] = productList.map((product, index) => {
784
+ const productSlots = referenceMap.filter((slot) => slot.label === `${product.name} reference`);
785
+ const productBeats = beats(descriptor.beatTemplate, durationSeconds, descriptor.hookSeconds);
786
+ return {
787
+ sceneIndex: index,
788
+ variant: 'text-driven',
789
+ durationSeconds,
790
+ // OUTPUT-DEPENDENT params (omitted unless requested → default byte-stable).
791
+ ...(options.resolution ? { resolution: options.resolution } : {}),
792
+ ...(!(options.singleShot ?? false) && (options.timeline ?? false)
793
+ ? {
794
+ timeline: productBeats.map((beat) => ({
795
+ t: `${formatSeconds(Math.round(beat.start))}-${formatSeconds(Math.round(beat.end))}`,
796
+ beat: `${beat.label.toUpperCase()}: ${beat.direction}`,
797
+ })),
798
+ }
799
+ : {}),
800
+ references: productSlots,
801
+ promptText: productPromptText({
802
+ product,
803
+ productSlots,
804
+ brief,
805
+ descriptor,
806
+ genreStyle,
807
+ aspectRatio,
808
+ durationSeconds,
809
+ detail,
810
+ profile,
811
+ productBeats,
812
+ useOrbit,
813
+ orbitKind,
814
+ }),
815
+ warnings: productSlots.filter((slot) => slot.status === 'pending').map((slot) => `${slot.slot} ${slot.label} is pending.`),
816
+ };
817
+ });
818
+ const seedancePackets = options.phase === 'storyboard' ? [] : productPackets;
819
+
820
+ const artifact: FilmmakingPromptsArtifact = {
821
+ schemaVersion: 1,
822
+ projectSlug: options.projectSlug,
823
+ generatedAt,
824
+ sourceSkill: 'ai-filmmaking',
825
+ durationDefaultSeconds: durationSeconds,
826
+ referenceMap,
827
+ characterSheetPrompts: [],
828
+ storyboardGridPrompt: null,
829
+ seedancePackets,
830
+ issues,
831
+ };
832
+
833
+ if (!options.write) return { artifact };
834
+ return {
835
+ artifact,
836
+ artifactPath: await writeArtifact(workspace, 'filmmaking-prompts', artifact),
837
+ };
838
+ }
839
+
840
+ function productPromptText(input: {
841
+ product: { name: string; referenceAssets: string[] };
842
+ productSlots: FilmmakingReferenceSlot[];
843
+ brief: BriefArtifact | undefined;
844
+ descriptor: CategoryDescriptor;
845
+ genreStyle: GenreStyle;
846
+ aspectRatio: string;
847
+ durationSeconds: number;
848
+ detail: DetailLevel;
849
+ profile: ResolvedCinemaProfile;
850
+ productBeats: Beat[];
851
+ useOrbit: boolean;
852
+ orbitKind: 'product-rotation' | 'camera-orbit';
853
+ }): string {
854
+ const { product, productSlots, brief, descriptor, genreStyle, aspectRatio, durationSeconds, detail, profile, productBeats, useOrbit, orbitKind } = input;
855
+ const productName = cleanSentence(product.name) || 'the product';
856
+ const subjectDescription = cleanSentence(brief?.intent ?? '') || `the hero product, ${productName}`;
857
+ const refLine = productSlots.length > 0
858
+ ? `REFERENCE: ${productSlots.map((slot) => `${slot.slot} (${slot.label})`).join(', ')} — match the product's exact form, color, finish, and proportions.`
859
+ : 'REFERENCE: no reference image attached — render the product faithfully from the description.';
860
+ const heroNote = descriptor.beatTemplate === 'turntable'
861
+ ? 'Open and close on the hero three-quarter angle; the rotation must return cleanly to that hero framing.'
862
+ : '';
863
+ const orbitLine = useOrbit ? `CAMERA: ${orbitGrammar(orbitKind)}` : '';
864
+ const lines = [
865
+ `FORMAT: ${durationSeconds} seconds / ${genreStyle.formatTone} / ${aspectRatio} / ${descriptor.label}`,
866
+ '',
867
+ `PRODUCT: ${productName} — ${subjectDescription}.`,
868
+ refLine,
869
+ orbitLine,
870
+ heroNote,
871
+ `STYLE: ${genreStyle.gridStyleDescriptors}. Aspect ratio ${aspectRatio} held across every shot.${detail === 'rich' ? ` ${richCinematographySuffix(richSuffixOptsFromProfile(profile))}` : ''}`,
872
+ `AUDIO: diegetic product sound only, natural ambience, no voice-over unless the brief asks.${detail === 'rich' ? ` ${richAudioSuffix()}` : ''}`,
873
+ '',
874
+ `TIMELINE (must cover full 0:00-${formatSeconds(durationSeconds)}):`,
875
+ ...productBeats.map((beat) => (
876
+ `${formatSeconds(Math.round(beat.start))}-${formatSeconds(Math.round(beat.end))} ${beat.label.toUpperCase()}: ${beat.direction}.`
877
+ )),
878
+ ];
879
+ return lines.filter(Boolean).join('\n');
880
+ }
881
+
882
+ /**
883
+ * Map a reference slot's role onto its canonical build step (the banana-pro-
884
+ * director discipline). `background-plate` is the scene-context-free `base-ref`;
885
+ * the character sheet is the `sheet`; every in-context frame is a `scene-plate`.
886
+ */
887
+ function buildStepForRole(role: FilmmakingReferenceSlot['role']): ReferenceBuildStep {
888
+ switch (role) {
889
+ case 'background-plate':
890
+ return 'base-ref';
891
+ case 'character-sheet':
892
+ return 'sheet';
893
+ case 'storyboard-grid':
894
+ case 'start-frame':
895
+ case 'end-frame':
896
+ case 'reference-image':
897
+ return 'scene-plate';
898
+ }
899
+ }
900
+
901
+ function buildReferenceMap(
902
+ referenceSheets: ReferenceSheetsArtifact,
903
+ characters: CharacterProfile[],
904
+ assetManifest: AssetManifestArtifact | undefined,
905
+ ): FilmmakingReferenceSlot[] {
906
+ // Collect every slot first (the `slot` field is assigned last, once the final
907
+ // build-order is known, so `@imageN == array order` per WS0).
908
+ const collected: Omit<FilmmakingReferenceSlot, 'slot'>[] = [];
909
+ for (const character of characters) {
910
+ const identitySheet = findIdentitySheet(referenceSheets, character.name);
911
+ const path = firstCharacterReference(character, identitySheet);
912
+ collected.push({
913
+ role: 'character-sheet',
914
+ label: `${character.name} character sheet`,
915
+ characterName: character.name,
916
+ ...(path ? { path } : {}),
917
+ status: path ? 'ready' : 'pending',
918
+ });
919
+ }
920
+
921
+ for (const asset of assetManifest?.assets ?? []) {
922
+ if (asset.kind !== 'image') continue;
923
+ if (asset.role === 'background-plate') {
924
+ // A scene-context-free background/base plate (no sceneIndex required).
925
+ if (collected.some((slot) => slot.role === 'background-plate' && slot.path === asset.path)) continue;
926
+ collected.push({
927
+ role: 'background-plate',
928
+ label: 'Background plate',
929
+ path: asset.path,
930
+ status: 'ready',
931
+ });
932
+ continue;
933
+ }
934
+ if (!Number.isInteger(asset.sceneIndex)) continue;
935
+ if (collected.some((slot) => slot.path === asset.path && slot.sceneIndex === asset.sceneIndex)) continue;
936
+ collected.push({
937
+ role: 'start-frame',
938
+ label: `Scene ${asset.sceneIndex} start frame`,
939
+ path: asset.path,
940
+ sceneIndex: asset.sceneIndex,
941
+ status: 'ready',
942
+ });
943
+ }
944
+
945
+ // Consult the canonical reference build order (base-ref -> sheet -> scene-plate)
946
+ // and group the collected slots by build step. The sort is STABLE, so within a
947
+ // step the original collection order is preserved — and the canonical character
948
+ // sheet (a `sheet` step) is never displaced/replaced by a scene plate. A default
949
+ // single-character project (sheet only) keeps its original order unchanged.
950
+ const order = referenceBuildOrder('character');
951
+ const rank = new Map<ReferenceBuildStep, number>(order.map((step, index) => [step, index] as const));
952
+ const ordered = collected
953
+ .map((slot, index) => ({ slot, index }))
954
+ .sort((left, right) => {
955
+ const leftRank = rank.get(buildStepForRole(left.slot.role)) ?? order.length;
956
+ const rightRank = rank.get(buildStepForRole(right.slot.role)) ?? order.length;
957
+ if (leftRank !== rightRank) return leftRank - rightRank;
958
+ return left.index - right.index;
959
+ })
960
+ .map((entry) => entry.slot);
961
+
962
+ return ordered.map((slot, index) => ({ slot: nextSlot(index), ...slot }));
963
+ }
964
+
965
+ function buildCharacterSheetPrompts(
966
+ characters: CharacterProfile[],
967
+ referenceMap: FilmmakingReferenceSlot[],
968
+ issues: FilmmakingPromptIssue[],
969
+ genreStyle: GenreStyle,
970
+ aspectRatio: string,
971
+ sheetLayout: '8-shot' | '6-panel' = '8-shot',
972
+ ): FilmmakingCharacterSheetPrompt[] {
973
+ return characters.map((character) => {
974
+ const slots = referenceMap.filter((slot) => slot.role === 'character-sheet' && slot.characterName === character.name);
975
+ const readySlots = slots.filter((slot) => slot.status === 'ready').map((slot) => slot.slot);
976
+ const mode = readySlots.length > 0 ? 'reference-image' : 'description-only';
977
+ const description = cleanSentence(character.description ?? `${character.name}, visually distinctive lead character`);
978
+ const wordCount = description.split(/\s+/).filter(Boolean).length;
979
+ if (!character.description) {
980
+ issues.push({
981
+ code: 'character-description-missing',
982
+ severity: 'warning',
983
+ message: `${character.name} has no stored identity description; generated prompt uses a fallback.`,
984
+ });
985
+ } else if (wordCount > 100) {
986
+ // The skill calls >100 words an outright failure: bloat dilutes the
987
+ // identity signal and bakes scene contamination into the reference.
988
+ issues.push({
989
+ code: 'character-description-long',
990
+ severity: 'error',
991
+ message: `${character.name} identity description is ${wordCount} words; ai-filmmaking treats >100 as a failure (target 30-60). Trim scene effects/atmosphere down to identity-locking traits.`,
992
+ });
993
+ } else if (wordCount > 60) {
994
+ issues.push({
995
+ code: 'character-description-long',
996
+ severity: 'warning',
997
+ message: `${character.name} identity description is ${wordCount} words; ai-filmmaking target is 30-60 words.`,
998
+ });
999
+ }
1000
+ return {
1001
+ characterName: character.name,
1002
+ mode,
1003
+ referenceSlots: readySlots,
1004
+ promptText: sheetLayout === '6-panel'
1005
+ ? characterSheetSixPanelPrompt(description, genreStyle.charSheetStyle, aspectRatio)
1006
+ : mode === 'reference-image'
1007
+ ? characterSheetReferencePrompt(readySlots, genreStyle.charSheetStyle, aspectRatio)
1008
+ : characterSheetDescriptionPrompt(description, genreStyle.charSheetStyle, aspectRatio),
1009
+ };
1010
+ });
1011
+ }
1012
+
1013
+ function buildStoryboardGridPrompt(
1014
+ storyboard: StoryboardArtifact,
1015
+ brief: BriefArtifact | undefined,
1016
+ characterPrompts: FilmmakingCharacterSheetPrompt[],
1017
+ noFaces = false,
1018
+ genreStyle: GenreStyle = resolveGenreStyle(),
1019
+ aspectRatio = '16:9',
1020
+ panelCount = 15,
1021
+ durationSeconds = 15,
1022
+ detail: DetailLevel = 'standard',
1023
+ // Resolved cinema-profile overrides (default {} → byte-identical legacy output).
1024
+ cinematics: {
1025
+ realism?: CaptureRealismOpts | false;
1026
+ register?: 'prose' | 'numeric';
1027
+ captureRegister?: 'cinema' | 'phone';
1028
+ lightingId?: string;
1029
+ gradeId?: string;
1030
+ plateKind?: PlateKind;
1031
+ } = {},
1032
+ ): FilmmakingStoryboardGridPrompt {
1033
+ const { rows, cols } = gridLayout(panelCount, aspectRatio);
1034
+ const panels = buildPanels(storyboard, panelCount, durationSeconds, cols);
1035
+ const characters = characterPrompts
1036
+ .map((prompt) => `${prompt.characterName.toUpperCase()}: ${characterLine(prompt)}`)
1037
+ .join('\n');
1038
+ const sceneType = brief?.productionMode === 'director' ? 'cinematic director scene' : 'cinematic sequence';
1039
+ const location = brief?.title ?? storyboard.projectSlug;
1040
+ const third = genreStyle.annotationThirdLine; // MOOD | VOICE | STYLE
1041
+ const noFaceClause = noFaces
1042
+ ? ' Render ALL figures as backlit silhouettes, shot from behind, or at distance — faces obscured, in shadow, or turned away, with NO clear frontal facial features (this keeps the sheet usable as a provider reference image despite real-person content filters).'
1043
+ : '';
1044
+ // At `rich`, append a cinematography suffix to the Style line. `terse`/`standard`
1045
+ // keep the line byte-identical to today. When any cinema-profile override is set
1046
+ // (realism / register / lighting / grade), pass them through; otherwise the
1047
+ // no-arg call reproduces today's legacy suffix exactly.
1048
+ const hasCinematicsOverride =
1049
+ cinematics.realism !== undefined
1050
+ || cinematics.register !== undefined
1051
+ || cinematics.lightingId !== undefined
1052
+ || cinematics.gradeId !== undefined;
1053
+ const richStyleSuffix = detail === 'rich'
1054
+ ? ` ${hasCinematicsOverride ? richCinematographySuffix({
1055
+ ...(cinematics.realism !== undefined ? { realism: cinematics.realism } : {}),
1056
+ ...(cinematics.register !== undefined ? { register: cinematics.register } : {}),
1057
+ ...(cinematics.lightingId !== undefined ? { lightingId: cinematics.lightingId } : {}),
1058
+ ...(cinematics.gradeId !== undefined ? { gradeId: cinematics.gradeId } : {}),
1059
+ }) : richCinematographySuffix()}`
1060
+ : '';
1061
+ // Opt-in backdrop plate clause. Omitted → no clause, Style line unchanged.
1062
+ const plateClause = cinematics.plateKind !== undefined
1063
+ ? ` Backdrop: ${backgroundPlate(cinematics.plateKind, detail)}.`
1064
+ : '';
1065
+ const promptText = [
1066
+ // A) Title & format header
1067
+ `Create a professional ${durationSeconds}-second ${genreStyle.formatTone} storyboard sheet for "${location}" — a complete production presentation page of ${panelCount} sequential cinematic panels arranged in a clean ${rows}×${cols} grid layout, depicting ONE CONTINUOUS ${sceneType}.`,
1068
+ '',
1069
+ // B) Style declaration
1070
+ `Style: Cinematic, production-grade, ${genreStyle.gridStyleDescriptors}.${noFaceClause} Aspect ratio = ${aspectRatio} page layout.${richStyleSuffix}${plateClause}`,
1071
+ '',
1072
+ // C) Character descriptions + lock
1073
+ 'CHARACTER LOCK - all recurring characters must appear IDENTICAL across every panel (same face, same build, same clothing, same props). Use the descriptions below as the source of truth. If reference images are attached, treat them as additional identity anchors and match them precisely.',
1074
+ characters || 'NO NAMED CHARACTER: preserve the same subject, setting, palette, and camera language across all panels.',
1075
+ '',
1076
+ // D) Visual tone
1077
+ `Visual tone: consistent colour grade, lighting logic, and lens language across all ${panelCount} panels — establish it once and hold it. This is one continuous moment in ${location}: same geography, same lighting, same wardrobe, same props.`,
1078
+ '',
1079
+ // E) Storyboard layout details
1080
+ `Storyboard sheet layout: a clean ${rows}×${cols} grid on a neutral production board, thin clean separators between panels, each panel numbered with its timecode label, a short shot description beneath. UNDER EACH panel a thin off-white annotation strip with three short lines in a clean, high-contrast sans-serif font legible at rendered size: CAM, MOVE, and ${third}. Notes must read as short uppercase slug lines, not sentences. No readable UI text, no logos unless already part of the brief. Camera moves naturally around the action as if shot in a single continuous take broken into ${panelCount} sequential beats.`,
1081
+ '',
1082
+ // F) Scene breakdown (read left-to-right, top-to-bottom)
1083
+ 'Narrative - read left-to-right, top-to-bottom:',
1084
+ // Aspect ratio is part of the prompt — state it on every shot, not just the
1085
+ // header (ai-filmmaking pitfall: "Forgetting aspect ratio on shots 2-9").
1086
+ ...panels.map((panel) => (
1087
+ `Panel ${panel.panel} ${panel.timecode} (${panel.position}): ${panel.beat}. CAM: ${panel.cam}. MOVE: ${panel.move}. ${third}: ${panel.mood}. ASPECT: ${aspectRatio}.`
1088
+ )),
1089
+ '',
1090
+ // G/H) Art-direction + rendering footer
1091
+ `Art direction: vary the framing every panel (wide -> medium -> close-up -> over-the-shoulder), build intensity through the middle, peak near the end, then resolve. Distribute character detail across panels — faces in close-ups, full wardrobe in wides. Render quality: masterpiece, production-ready, ${aspectRatio} professional storyboard sheet.`,
1092
+ ].join('\n');
1093
+ return {
1094
+ variant: 'storyboard-grid',
1095
+ panelCount,
1096
+ rows,
1097
+ cols,
1098
+ promptText,
1099
+ panels,
1100
+ };
1101
+ }
1102
+
1103
+ function buildSeedancePackets(input: {
1104
+ storyboard: StoryboardArtifact | undefined;
1105
+ brief: BriefArtifact | undefined;
1106
+ referenceMap: FilmmakingReferenceSlot[];
1107
+ durationSeconds: number;
1108
+ noFaces?: boolean;
1109
+ genreStyle: GenreStyle;
1110
+ aspectRatio: string;
1111
+ characterContext: Map<string, { slot?: string; description: string }>;
1112
+ detail: DetailLevel;
1113
+ /** Resolved cinema profile driving register / realism / capture register. */
1114
+ profile: ResolvedCinemaProfile;
1115
+ issues: FilmmakingPromptIssue[];
1116
+ textDiscipline?: boolean;
1117
+ generateAudio?: boolean;
1118
+ /** OUTPUT-DEPENDENT render resolution; omitted → no `resolution` field. */
1119
+ resolution?: string;
1120
+ /**
1121
+ * Emit the multi-beat scene timeline on each packet. Already gated by the
1122
+ * caller for the single-shot case, so here it is a plain populate flag.
1123
+ */
1124
+ emitTimeline?: boolean;
1125
+ /** Director blueprint; when present each packet gains the prose addendum and
1126
+ * forbidden-movement validation. Absent → byte-identical legacy. */
1127
+ blueprint?: ProjectBlueprintArtifact;
1128
+ /** Locked brand system; when present each packet gains the prose-only BRAND
1129
+ * addendum after any DIRECTOR line. Absent → byte-identical legacy. */
1130
+ brandDefinition?: BrandDefinitionArtifact;
1131
+ /** Blanket dialogue for every scene lacking a `dialogueByScene` entry. */
1132
+ dialogue?: DialogueLine;
1133
+ /** Per-scene dialogue keyed by sceneIndex; wins over `dialogue` for that scene. */
1134
+ dialogueByScene?: Map<number, DialogueLine>;
1135
+ /** Rewrite named dialogue emotions as physical cues; with either dialogue source. */
1136
+ emotionCues?: boolean;
1137
+ }): FilmmakingSeedancePacket[] {
1138
+ const scenes = input.storyboard?.scenes ?? [];
1139
+ const characterSlots = input.referenceMap.filter((slot) => slot.role === 'character-sheet');
1140
+ const gridSlot = input.referenceMap.find((slot) => slot.role === 'storyboard-grid');
1141
+ // Does the blueprint forbid handheld? Reuses the forbidden-move matcher so the
1142
+ // grid-reference packet can drop its handheld boilerplate (see seedancePromptText).
1143
+ const forbidHandheld = input.blueprint ? forbiddenMovementHits(input.blueprint, 'handheld').length > 0 : false;
1144
+ if (gridSlot?.status === 'pending') {
1145
+ input.issues.push({
1146
+ code: 'reference-slot-pending',
1147
+ severity: 'warning',
1148
+ message: `${gridSlot.slot} is reserved for the storyboard grid, but the rendered grid image is not attached yet.`,
1149
+ });
1150
+ }
1151
+ if (input.genreStyle?.genre !== 'music-video') {
1152
+ input.issues.push({
1153
+ code: 'seedance-music-default',
1154
+ severity: 'warning',
1155
+ message: 'Seedance packets default to NO MUSIC unless a scene prompt explicitly asks for music.',
1156
+ });
1157
+ }
1158
+ return scenes.map((scene) => {
1159
+ const startFrame = input.referenceMap.find((slot) => slot.role === 'start-frame' && slot.sceneIndex === scene.sceneIndex);
1160
+ const references = [
1161
+ ...characterSlots.filter((slot) => !scene.characters?.length || scene.characters.includes(slot.characterName ?? '')),
1162
+ ...(gridSlot ? [gridSlot] : []),
1163
+ ...(startFrame ? [startFrame] : []),
1164
+ ];
1165
+ const variant = gridSlot && characterSlots.length > 0
1166
+ ? 'character-sheets-plus-storyboard-grid'
1167
+ : gridSlot
1168
+ ? 'storyboard-grid-reference'
1169
+ : 'text-driven';
1170
+ // Per-scene dialogue wins over the blanket dialogue; either is optional.
1171
+ const sceneDialogue = input.dialogueByScene?.get(scene.sceneIndex) ?? input.dialogue;
1172
+ const promptText = seedancePromptText({
1173
+ scene,
1174
+ brief: input.brief,
1175
+ references,
1176
+ variant,
1177
+ durationSeconds: scene.durationSeconds ?? input.durationSeconds,
1178
+ noFaces: input.noFaces ?? false,
1179
+ genreStyle: input.genreStyle,
1180
+ aspectRatio: input.aspectRatio,
1181
+ characterContext: input.characterContext,
1182
+ detail: input.detail,
1183
+ profile: input.profile,
1184
+ textDiscipline: input.textDiscipline ?? false,
1185
+ generateAudio: input.generateAudio ?? false,
1186
+ forbidHandheld,
1187
+ ...(sceneDialogue ? { dialogue: sceneDialogue, emotionCues: input.emotionCues ?? false } : {}),
1188
+ });
1189
+ // QA gate (WS6): only the text-driven packet follows the 10-block contract;
1190
+ // grid variants intentionally use the grid-reference body shape.
1191
+ // Block-order QA runs on the canonical 10-block body (BEFORE the director
1192
+ // addendum, which appends after the last block and never reorders).
1193
+ if (variant === 'text-driven') {
1194
+ const blockIssue = checkSeedanceBlockOrder(promptText);
1195
+ if (blockIssue) input.issues.push(blockIssue);
1196
+ }
1197
+ // Director layer: append the prose-only DIRECTOR addendum and validate the
1198
+ // scene's camera direction against the camera bible's forbidden movements.
1199
+ let finalPromptText = promptText;
1200
+ if (input.blueprint) {
1201
+ const directorLine = renderDirectorLine(input.blueprint, {
1202
+ characterNames: scene.characters ?? [],
1203
+ sceneText: `${scene.description ?? ''} ${scene.scenePrompt?.animationPrompt ?? ''}`,
1204
+ });
1205
+ if (directorLine) finalPromptText = `${promptText}\n\n${directorLine}`;
1206
+ for (const hit of forbiddenMovementHits(input.blueprint, promptText)) {
1207
+ input.issues.push({
1208
+ code: 'forbidden-camera-movement',
1209
+ severity: 'warning',
1210
+ message: `scene ${scene.sceneIndex}: camera movement "${hit}" is forbidden by the project blueprint camera bible.`,
1211
+ });
1212
+ }
1213
+ }
1214
+ // Brand layer: append the prose-only BRAND addendum after any DIRECTOR line.
1215
+ if (input.brandDefinition) {
1216
+ const brandLine = renderBrandLine(input.brandDefinition);
1217
+ if (brandLine) finalPromptText = `${finalPromptText}\n\n${brandLine}`;
1218
+ }
1219
+ const packetDurationSeconds = scene.durationSeconds ?? input.durationSeconds;
1220
+ const action = cleanSentence(scene.scenePrompt?.animationPrompt ?? scene.description);
1221
+ return {
1222
+ sceneIndex: scene.sceneIndex,
1223
+ variant,
1224
+ durationSeconds: packetDurationSeconds,
1225
+ // OUTPUT-DEPENDENT params (omitted unless requested → default byte-stable).
1226
+ ...(input.resolution ? { resolution: input.resolution } : {}),
1227
+ ...(input.emitTimeline
1228
+ ? { timeline: weaveDialogueIntoFrameMap(
1229
+ threeBeatFrameMap(packetDurationSeconds, action, input.aspectRatio),
1230
+ sceneDialogue,
1231
+ input.characterContext,
1232
+ input.emotionCues ?? false,
1233
+ ) }
1234
+ : {}),
1235
+ references,
1236
+ promptText: finalPromptText,
1237
+ warnings: references.filter((reference) => reference.status === 'pending')
1238
+ .map((reference) => `${reference.slot} ${reference.label} is pending.`),
1239
+ };
1240
+ });
1241
+ }
1242
+
1243
+ // Canonical 10-block order for the text-driven Seedance master-prompt (WS6).
1244
+ // Source of truth shared by seedancePromptText (which emits them) and
1245
+ // checkSeedanceBlockOrder (which validates them) so they cannot drift.
1246
+ const SEEDANCE_BLOCK_ORDER = [
1247
+ 'SCENE & MOOD',
1248
+ 'FRAME MAP',
1249
+ 'SUBJECT LOCK',
1250
+ 'CROSS-FRAME',
1251
+ 'MOVEMENT',
1252
+ 'LAST FRAME',
1253
+ 'WORLD PLATE',
1254
+ 'SOUND BED',
1255
+ 'CAPTURE REALISM',
1256
+ 'CAMERA CAPTURE',
1257
+ ] as const;
1258
+
1259
+ /**
1260
+ * QA validator (WS6): confirm a text-driven Seedance packet carries all ten
1261
+ * Joey master-prompt blocks in the canonical order. Returns a warning-level
1262
+ * {@link FilmmakingPromptIssue} when a block is missing or out of sequence, or
1263
+ * `null` when the packet is well-formed. Pure/deterministic — operates on the
1264
+ * rendered prompt text only.
1265
+ */
1266
+ export function checkSeedanceBlockOrder(promptText: string): FilmmakingPromptIssue | null {
1267
+ let last = -1;
1268
+ for (const block of SEEDANCE_BLOCK_ORDER) {
1269
+ const idx = promptText.indexOf(block);
1270
+ if (idx === -1) {
1271
+ return {
1272
+ code: 'seedance-block-order',
1273
+ severity: 'warning',
1274
+ message: `text-driven Seedance packet is missing the "${block}" block (expected the 10-block order: ${SEEDANCE_BLOCK_ORDER.join(' → ')}).`,
1275
+ };
1276
+ }
1277
+ if (idx < last) {
1278
+ return {
1279
+ code: 'seedance-block-order',
1280
+ severity: 'warning',
1281
+ message: `text-driven Seedance packet has the "${block}" block out of order (expected the 10-block order: ${SEEDANCE_BLOCK_ORDER.join(' → ')}).`,
1282
+ };
1283
+ }
1284
+ last = idx;
1285
+ }
1286
+ return null;
1287
+ }
1288
+
1289
+ /** @internal — exported for testing the text-driven AUDIO / MOOD branch only. */
1290
+ export function seedancePromptText(input: {
1291
+ scene: StoryboardArtifact['scenes'][number];
1292
+ brief: BriefArtifact | undefined;
1293
+ references: FilmmakingReferenceSlot[];
1294
+ variant: FilmmakingSeedancePacket['variant'];
1295
+ durationSeconds: number;
1296
+ noFaces?: boolean;
1297
+ genreStyle?: GenreStyle;
1298
+ aspectRatio?: string;
1299
+ characterContext?: Map<string, { slot?: string; description: string }>;
1300
+ detail?: DetailLevel;
1301
+ /**
1302
+ * Resolved cinema profile. Drives the prose-vs-numeric register, whether the
1303
+ * CAPTURE REALISM block fires (realism), its haze/wet knobs, and the cinema-vs-
1304
+ * phone capture register. Omitted → the legacy default (numeric register,
1305
+ * realism on with the legacy no-arg capture block) so existing callers/tests
1306
+ * stay byte-stable.
1307
+ */
1308
+ profile?: ResolvedCinemaProfile;
1309
+ /**
1310
+ * Opt-in (WS-C) canonical multi-reference text discipline. Default false →
1311
+ * output byte-identical to today. See {@link GenerateFilmmakingPromptsOptions.textDiscipline}.
1312
+ */
1313
+ textDiscipline?: boolean;
1314
+ /** Scene audio flag, only consulted when {@link textDiscipline} is set. */
1315
+ generateAudio?: boolean;
1316
+ /**
1317
+ * The active blueprint forbids handheld camera. When set, the
1318
+ * `storyboard-grid-reference` packet drops its default "Handheld camera moments
1319
+ * may be used" boilerplate so it does not contradict the blueprint (and the
1320
+ * forbidden-move checker no longer flags its own boilerplate). Default false →
1321
+ * the clause stays, byte-identical to legacy.
1322
+ */
1323
+ forbidHandheld?: boolean;
1324
+ /**
1325
+ * Spoken dialogue (ai-filmmaking "Dialog scenes"): the text-driven packet
1326
+ * carries it on the opening FRAME MAP beat; the grid variants carry it on the
1327
+ * Storyline line. Speakers matching {@link characterContext} render as their
1328
+ * visual descriptor. Absent (default) → output byte-identical to today.
1329
+ */
1330
+ dialogue?: DialogueLine;
1331
+ /** Rewrite named dialogue emotions as physical cues; only with `dialogue`. */
1332
+ emotionCues?: boolean;
1333
+ }): string {
1334
+ const genreStyle = input.genreStyle ?? resolveGenreStyle();
1335
+ const aspectRatio = input.aspectRatio ?? '16:9';
1336
+ const detail = input.detail ?? 'standard';
1337
+ const textDiscipline = input.textDiscipline ?? false;
1338
+ const profile = input.profile;
1339
+ const characterRefs = input.references.filter((reference) => reference.role === 'character-sheet');
1340
+ const gridRef = input.references.find((reference) => reference.role === 'storyboard-grid');
1341
+ const startFrame = input.references.find((reference) => reference.role === 'start-frame');
1342
+ const duration = `${input.durationSeconds} seconds`;
1343
+ const action = cleanSentence(input.scene.scenePrompt?.animationPrompt ?? input.scene.description);
1344
+ const noFaceLine = input.noFaces
1345
+ ? 'Keep all figures as backlit silhouettes, backs, or distance with faces obscured (content-filter safe).'
1346
+ : '';
1347
+ // Spoken-dialogue clause (ai-filmmaking Dialog scenes). Speakers that match a
1348
+ // stored character render as their visual descriptor, never a proper name —
1349
+ // the same character-lock discipline as SUBJECT LOCK. Absent → `speak` is the
1350
+ // identity function and every variant stays byte-identical to today.
1351
+ const dialogue = input.dialogue ? dialogueWithDescriptors(input.dialogue, input.characterContext) : undefined;
1352
+ const speak = (line: string): string => (
1353
+ dialogue ? withDialogue(line, dialogue, { emotionCues: input.emotionCues ?? false }) : line
1354
+ );
1355
+ // Opt-in WS-C discipline lines, computed once and spliced into each variant.
1356
+ // All-empty (default) → byte-identical output. The positional descriptor reuses
1357
+ // the same scene.characters → stored-descriptor mapping as SUBJECT LOCK, so the
1358
+ // emitted text is a visual descriptor per subject, never a proper name.
1359
+ const positionalLine = textDiscipline
1360
+ ? buildPositionalDescriptorLine(subjectLockEntriesFromContext(input))
1361
+ : '';
1362
+ const identityLockLine = textDiscipline ? buildIdentityLockLine() : '';
1363
+ // Music suffix on the grid variants. Default keeps the hardcoded "NO MUSIC"; with
1364
+ // text-discipline on it follows the scene's generateAudio flag (audio → diegetic).
1365
+ const gridMusicClause = textDiscipline && input.generateAudio
1366
+ ? 'NO TEXT ON SCREEN. Diegetic soundscape — natural ambience, environmental foley, and subject-driven sound, no added music.'
1367
+ : 'NO TEXT ON SCREEN, NO MUSIC.';
1368
+ // Invariant: ANY packet that references a storyboard grid OR a character
1369
+ // reference sheet must carry the single-frame guard, or the sheet/grid leaks
1370
+ // into the video as an animated split-screen / reproduced reference card.
1371
+ // Character sheets are themselves multi-panel layouts, so a character-sheets
1372
+ // packet needs the guard even when no storyboard grid is attached. With
1373
+ // text-discipline on, the guard is unconditional. Enforce it once at the exit
1374
+ // so a new variant can't silently omit it. `withGridGuard` is a no-op when the
1375
+ // body already includes the guard text (the explicit branches keep it inline).
1376
+ const withGridGuard = (body: string): string => (
1377
+ (gridRef || textDiscipline || characterRefs.length > 0) && !body.includes(SINGLE_FULL_FRAME_GUARD)
1378
+ ? `${body}\n${SINGLE_FULL_FRAME_GUARD}`
1379
+ : body
1380
+ );
1381
+ if (input.variant === 'character-sheets-plus-storyboard-grid' && gridRef) {
1382
+ // The per-character header lines carry the sheet label (which may include a
1383
+ // proper name). With text-discipline on they are suppressed in favour of the
1384
+ // positional visual-descriptor line (visual descriptors only, never names).
1385
+ const characterHeaders = textDiscipline
1386
+ ? []
1387
+ : characterRefs.map((reference, index) => `Character ${index + 1}: ${reference.slot} (${reference.label})`);
1388
+ return withGridGuard([
1389
+ ...characterHeaders,
1390
+ positionalLine,
1391
+ '',
1392
+ `Use the provided character sheets and cinematic storyboard grid ${gridRef.slot} as visual and motion reference. Create a ${duration} ${genreStyle.formatTone} sequence at ${aspectRatio}. ${SINGLE_FULL_FRAME_GUARD} Follow the panel order, camera logic, motion, and framing consistently and temporally. ${gridMusicClause}`,
1393
+ identityLockLine,
1394
+ noFaceLine,
1395
+ startFrame ? `Use ${startFrame.slot} as the scene start-frame continuity anchor.` : '',
1396
+ '',
1397
+ `Storyline: ${speak(action)}`,
1398
+ ].filter(Boolean).join('\n'));
1399
+ }
1400
+ if (input.variant === 'storyboard-grid-reference' && gridRef) {
1401
+ // Drop the handheld-realism boilerplate when the blueprint forbids handheld
1402
+ // (otherwise the clause contradicts the bible and trips its own forbidden-move
1403
+ // checker). No blueprint / handheld allowed → clause stays, byte-identical.
1404
+ const handheldClause = input.forbidHandheld ? '' : 'Handheld camera moments may be used to boost realism. ';
1405
+ return withGridGuard([
1406
+ positionalLine,
1407
+ `Use the provided cinematic storyboard grid ${gridRef.slot} as visual and motion reference. Create a ${duration} ${genreStyle.formatTone} sequence at ${aspectRatio}. ${SINGLE_FULL_FRAME_GUARD} Follow the panel order, camera logic, motion and camera framing consistently. ${handheldClause}${gridMusicClause}`,
1408
+ identityLockLine,
1409
+ noFaceLine,
1410
+ startFrame ? `Use ${startFrame.slot} as the scene start-frame continuity anchor.` : '',
1411
+ '',
1412
+ `Storyline: ${speak(action)}`,
1413
+ ].filter(Boolean).join('\n'));
1414
+ }
1415
+ // Variant A (text-driven) — the Joey 10-block Seedance master-prompt (WS6, now
1416
+ // the default packet shape). The blocks are assembled in a fixed contract order
1417
+ // (SCENE & MOOD → FRAME MAP → SUBJECT LOCK → CROSS-FRAME → MOVEMENT → LAST FRAME
1418
+ // → WORLD PLATE → SOUND BED → CAPTURE REALISM → CAMERA CAPTURE) using the
1419
+ // shared seedance-blocks.ts / cinematography.ts emitters. `terse`/`standard`
1420
+ // detail emit no quantified cinematography tokens; `rich` appends them.
1421
+ // SOUND BED. With text-discipline on, the diegetic-vs-no-music choice is keyed
1422
+ // on the scene's generateAudio flag (audio → diegetic soundscape; otherwise the
1423
+ // existing no-music line). Default (text-discipline off) keeps today's wording.
1424
+ const soundBed = genreStyle.genre === 'music-video'
1425
+ ? `SOUND BED: Music-driven — ${musicSyncLine(undefined, detail)}.`
1426
+ : textDiscipline && input.generateAudio
1427
+ ? `SOUND BED: Diegetic soundscape — natural ambience, environmental foley, and subject-driven sound, no added music.${detail === 'rich' ? ` ${richAudioSuffix()}` : ''}`
1428
+ : `SOUND BED: No music. Natural ambience and subject-driven sound only.${detail === 'rich' ? ` ${richAudioSuffix()}` : ''}`;
1429
+ // FRAME MAP rows; with dialogue, the spoken line is baked into the opening
1430
+ // beat (the guide's "bake it into the TIMELINE in quoted brackets" rule).
1431
+ // Same weave as the machine-readable `timeline` field (shared helper).
1432
+ const frameMap = weaveDialogueIntoFrameMap(
1433
+ threeBeatFrameMap(input.durationSeconds, action, aspectRatio),
1434
+ input.dialogue,
1435
+ input.characterContext,
1436
+ input.emotionCues ?? false,
1437
+ );
1438
+ return withGridGuard([
1439
+ `SCENE & MOOD: ${duration} ${genreStyle.formatTone} at ${aspectRatio}. ${cleanSentence(input.brief?.intent ?? input.scene.description)}.`,
1440
+ '',
1441
+ frameMapBlock(frameMap),
1442
+ '',
1443
+ subjectLockBlock(subjectLockEntriesFromContext(input)),
1444
+ positionalLine,
1445
+ identityLockLine,
1446
+ '',
1447
+ crossFrameBlock(),
1448
+ '',
1449
+ timecodedMovementBlock(input.durationSeconds, action, aspectRatio, detail),
1450
+ '',
1451
+ lastFrameBlock('resolved final beat, clean composition'),
1452
+ '',
1453
+ `WORLD PLATE: ${input.brief?.title ?? input.scene.description}.`,
1454
+ '',
1455
+ soundBed,
1456
+ '',
1457
+ captureRealismLine(profile, detail),
1458
+ '',
1459
+ `CAMERA CAPTURE: ${genreStyle.gridStyleDescriptors}, ${aspectRatio} held across every shot.${detail === 'rich' ? ` ${richCinematographySuffix(richSuffixOptsFromProfile(profile))}` : ''}`,
1460
+ noFaceLine,
1461
+ ].filter(Boolean).join('\n'));
1462
+ }
1463
+
1464
+ /**
1465
+ * Render the CAPTURE REALISM block from the resolved cinema profile.
1466
+ * - no profile (legacy callers) → today's `captureRealismBlock({}, detail)`.
1467
+ * - realism off → a single line stating capture realism is dialled off.
1468
+ * - phone capture register → the Joey 2.0 phone-capture (UGC) block.
1469
+ * - cinema capture register → the anti-plastic capture-realism block with the
1470
+ * profile's haze/wet knobs.
1471
+ */
1472
+ function captureRealismLine(profile: ResolvedCinemaProfile | undefined, detail: DetailLevel): string {
1473
+ if (!profile) {
1474
+ return `CAPTURE REALISM: ${captureRealismBlock({}, detail)}`;
1475
+ }
1476
+ if (!profile.realism) {
1477
+ return 'CAPTURE REALISM: realism dialled off — render the scene without the anti-plastic capture-realism treatment.';
1478
+ }
1479
+ if (profile.captureRegister === 'phone') {
1480
+ return `CAPTURE REALISM: ${phoneCaptureBlock({}, detail)}`;
1481
+ }
1482
+ return `CAPTURE REALISM: ${captureRealismBlock({ haze: profile.haze, ...(profile.wet ? { wet: true } : {}) }, detail)}`;
1483
+ }
1484
+
1485
+ /**
1486
+ * Build the {@link richCinematographySuffix} opts bag from the resolved profile.
1487
+ * No profile (legacy callers) → `{ realism: {} }`, byte-identical to before.
1488
+ */
1489
+ function richSuffixOptsFromProfile(profile: ResolvedCinemaProfile | undefined): Parameters<typeof richCinematographySuffix>[0] {
1490
+ if (!profile) {
1491
+ return { realism: {} };
1492
+ }
1493
+ return {
1494
+ realism: profile.realism ? { haze: profile.haze, ...(profile.wet ? { wet: true } : {}) } : false,
1495
+ register: profile.register,
1496
+ ...(profile.lightingId !== undefined ? { lightingId: profile.lightingId } : {}),
1497
+ ...(profile.gradeId !== undefined ? { gradeId: profile.gradeId } : {}),
1498
+ };
1499
+ }
1500
+
1501
+ // Above this runtime (seconds) a single Seedance packet is treated as a genuine
1502
+ // multi-cut sequence, matching cinema-worldbuilder-pro-2.0's shot-complexity
1503
+ // guidance: "4–8 seconds — one strong character action, single locked
1504
+ // composition" (one main idea per shot) vs "12–15 seconds — 2–3 simple beats
1505
+ // with hard cuts inside the prompt". A 9–10s scene stays a single flowing shot;
1506
+ // 11s+ earns the per-shot hard-cut Movement form.
1507
+ const MULTI_CUT_DURATION_THRESHOLD_SECONDS = 10;
1508
+
1509
+ // TIMECODED MOVEMENT block (Joey discipline): the Movement block carries per-beat
1510
+ // timestamps inline. The beats are sourced from the SAME three-beat timeline split
1511
+ // as the FRAME MAP (threeBeatFrameMap → 0:00 / d÷3 / 2d÷3 / d) so the two blocks
1512
+ // stay aligned, and the camera move per beat reuses cameraSpec(RICH_CAMERA_MOVE,
1513
+ // detail) so detail (terse/standard/rich) still governs quantified-token emission.
1514
+ //
1515
+ // The FORM depends on genuine multi-shot intent so the packet does not contradict
1516
+ // itself (cinema-worldbuilder-pro-2.0 Universal Rule #6 reserves the inline
1517
+ // per-shot "Hard cut to" form "for any multi-cut sequence"; Rule #21 is "one main
1518
+ // idea per shot"):
1519
+ // - SINGLE-SHOT (≤ MULTI_CUT_DURATION_THRESHOLD_SECONDS): one flowing paragraph
1520
+ // with the per-beat timestamps inline and NO "Shot N" / "Hard cut to" labels —
1521
+ // matching the skill's single-shot Movement example, which is one continuous
1522
+ // evolving take. This is the FRAME MAP's "wide establish → medium develop →
1523
+ // resolved close" rendered as one shot, not three cuts.
1524
+ // - MULTI-CUT (above the threshold): "Shot 1 (…): … Hard cut to Shot 2 (…): …"
1525
+ // per the skill's multi-shot Movement example and cut-trigger rule.
1526
+ // Pure/deterministic — no Date, no Math.random, no I/O.
1527
+ function timecodedMovementBlock(
1528
+ durationSeconds: number,
1529
+ action: string,
1530
+ aspectRatio: string,
1531
+ detail: DetailLevel,
1532
+ ): string {
1533
+ const beats = threeBeatFrameMap(durationSeconds, action, aspectRatio);
1534
+ const move = cameraSpec(RICH_CAMERA_MOVE, detail);
1535
+ if (durationSeconds > MULTI_CUT_DURATION_THRESHOLD_SECONDS) {
1536
+ const shots = beats.map((beat, index) => {
1537
+ const lead = index === 0 ? `Shot ${index + 1}` : `Hard cut to Shot ${index + 1}`;
1538
+ return `${lead} (${beat.t}): ${move} — ${beat.beat}.`;
1539
+ });
1540
+ return `MOVEMENT: ${shots.join(' ')}`;
1541
+ }
1542
+ // Single-shot: one continuous take. Lead the paragraph with the camera move once,
1543
+ // then evolve the same locked composition across the inline-timestamped beats.
1544
+ const flow = beats.map((beat) => `${beat.beat} (${beat.t}).`).join(' ');
1545
+ return `MOVEMENT: ${move} held across one continuous take — ${flow}`;
1546
+ }
1547
+
1548
+ // FRAME MAP rows for the text-driven packet — the original three-beat timeline
1549
+ // (wide establish → medium develop → resolved close), now emitted as ordered
1550
+ // FrameMapEntry rows keyed on the same 0:00 / d÷3 / 2d÷3 / d split.
1551
+ function threeBeatFrameMap(durationSeconds: number, action: string, aspectRatio: string): FrameMapEntry[] {
1552
+ const third = Math.floor(durationSeconds / 3);
1553
+ const twoThirds = Math.floor((durationSeconds * 2) / 3);
1554
+ return [
1555
+ { t: `0:00-${formatSeconds(third)}`, beat: `Wide establishing shot, ${aspectRatio} — ${action}` },
1556
+ { t: `${formatSeconds(third)}-${formatSeconds(twoThirds)}`, beat: `Medium shot, ${aspectRatio} — preserve subject identity and geography while the action develops` },
1557
+ { t: `${formatSeconds(twoThirds)}-${formatSeconds(durationSeconds)}`, beat: `Close-up or resolved final frame, ${aspectRatio} — complete the scene beat cleanly` },
1558
+ ];
1559
+ }
1560
+
1561
+ // SUBJECT LOCK entries from the carried character context. Per WS0/WS5, @imageN
1562
+ // slots are emitted as hard binding labels ONLY when POSITIONAL_BINDING is true;
1563
+ // otherwise each character's locked identity description is carried as a
1564
+ // descriptor-only guidance label (visual descriptor, never a proper name as the
1565
+ // binding key). Falls back to a single primary-subject entry when no characters
1566
+ // are present on the scene.
1567
+ function subjectLockEntriesFromContext(input: {
1568
+ scene: StoryboardArtifact['scenes'][number];
1569
+ characterContext?: Map<string, { slot?: string; description: string }>;
1570
+ }): SubjectLockEntry[] {
1571
+ const names = input.scene.characters ?? [];
1572
+ if (names.length === 0) return [];
1573
+ return names.map((name, index) => {
1574
+ const ctx = input.characterContext?.get(name);
1575
+ const label = ctx?.description ?? name;
1576
+ const slot = POSITIONAL_BINDING && ctx?.slot ? ctx.slot : `subject ${index + 1}`;
1577
+ return { label, slot };
1578
+ });
1579
+ }
1580
+
1581
+ // Render dialogue speakers through the character-lock discipline: a speaker
1582
+ // whose name matches a stored character is replaced by that character's locked
1583
+ // visual descriptor (exact-name match, same as the scene.characters lookup),
1584
+ // so the packet never carries a proper name. Unmatched speakers (e.g. "She",
1585
+ // "He") pass through unchanged.
1586
+ function dialogueWithDescriptors(
1587
+ dialogue: DialogueLine,
1588
+ characterContext?: Map<string, { slot?: string; description: string }>,
1589
+ ): DialogueLine {
1590
+ if (!characterContext) return dialogue;
1591
+ const resolve = (speaker: string): string => characterContext.get(speaker)?.description ?? speaker;
1592
+ return {
1593
+ ...dialogue,
1594
+ speaker: resolve(dialogue.speaker),
1595
+ ...(dialogue.secondSpeaker
1596
+ ? { secondSpeaker: { ...dialogue.secondSpeaker, speaker: resolve(dialogue.secondSpeaker.speaker) } }
1597
+ : {}),
1598
+ };
1599
+ }
1600
+
1601
+ // Bake spoken dialogue onto the FIRST beat of a frame map — the ai-filmmaking
1602
+ // "bake dialogue into the opening beat" rule. Resolves each speaker to its
1603
+ // locked visual descriptor first (never a proper name), then applies the
1604
+ // says:/replies: notation. Pure; returns `beats` unchanged when there is no
1605
+ // dialogue or no beats, so the default path stays byte-identical. Shared by the
1606
+ // prose FRAME MAP and the machine-readable `timeline` field so the two can't
1607
+ // drift (the timeline previously omitted the dialogue the prose carried).
1608
+ function weaveDialogueIntoFrameMap(
1609
+ beats: FrameMapEntry[],
1610
+ dialogue: DialogueLine | undefined,
1611
+ characterContext: Map<string, { slot?: string; description: string }> | undefined,
1612
+ emotionCues: boolean,
1613
+ ): FrameMapEntry[] {
1614
+ const opening = beats[0];
1615
+ if (!dialogue || !opening) return beats;
1616
+ const resolved = dialogueWithDescriptors(dialogue, characterContext);
1617
+ const next = beats.slice();
1618
+ next[0] = { ...opening, beat: withDialogue(opening.beat, resolved, { emotionCues }) };
1619
+ return next;
1620
+ }
1621
+
1622
+ export function characterSheetReferencePrompt(referenceSlots: string[], style: string, aspectRatio: string): string {
1623
+ return `Create a professional character reference sheet for the attached character using ${referenceSlots.join(', ')} as strong reference, 1:1 similarity, ${style}. Divide the sheet into four vertical columns for a total of eight shots. The top row shows full-body views from head to toe: front, side, three-quarter, and back. No cropping at ankles, knees, or head. The bottom row contains four matching face close-ups, including front and profile views. Use clean neutral studio lighting. Background: even neutral mid-gray seamless, no seam line, no gradient, subject rendered at true natural tone against the neutral gray. Aspect ratio = ${aspectRatio}.`;
1624
+ }
1625
+
1626
+ export function characterSheetDescriptionPrompt(description: string, style: string, aspectRatio: string): string {
1627
+ return `Create a professional character reference sheet for ${description}. Divide the sheet into four vertical columns for a total of eight shots. The top row shows full-body views from head to toe: front, side, three-quarter, and back. No cropping at ankles, knees, or head. The bottom row contains four matching face close-ups, including front and profile views. Style: ${style}. Use clean neutral studio lighting, no scene-specific lighting. Background: even neutral mid-gray seamless, no seam line, no gradient, subject rendered at true natural tone against the neutral gray. Aspect ratio = ${aspectRatio}.`;
1628
+ }
1629
+
1630
+ export function characterSheetSixPanelPrompt(description: string, style: string, aspectRatio: string): string {
1631
+ return [
1632
+ `A 6-panel character reference sheet arranged as a 3-column by 2-row grid in a single ${aspectRatio} frame, thin clean white gutters between panels.`,
1633
+ `Each panel shows the same single character — ${description}.`,
1634
+ 'Panel 1 (top-left): full body front. Panel 2 (top-center): side profile close headshot, left side. Panel 3 (top-right): full body back.',
1635
+ 'Panel 4 (bottom-left): side profile close headshot, right side. Panel 5 (bottom-center): front face close headshot. Panel 6 (bottom-right): detail shot (hands / accessory / held prop).',
1636
+ 'Even neutral mid-gray seamless backdrop applied uniformly across all six panels, no seam line, no gradient.',
1637
+ `Style: ${style}. Identical character identity locked across all six panels — same face, skin, hair, wardrobe, accessories, proportions in every cell.`,
1638
+ ].join(' ');
1639
+ }
1640
+
1641
+ function buildPanels(
1642
+ storyboard: StoryboardArtifact,
1643
+ panelCount: number,
1644
+ durationSeconds: number,
1645
+ cols: number,
1646
+ ): FilmmakingStoryboardPanel[] {
1647
+ const scenes = storyboard.scenes.length > 0 ? storyboard.scenes : [{
1648
+ sceneIndex: 0,
1649
+ description: 'Opening visual beat',
1650
+ }];
1651
+ return Array.from({ length: panelCount }, (_, index) => {
1652
+ // Map each panel onto a scene proportionally so N panels spread across the
1653
+ // available scenes instead of cycling 1:1.
1654
+ const scene = scenes[Math.min(Math.floor((index / panelCount) * scenes.length), scenes.length - 1)];
1655
+ const row = Math.floor(index / cols) + 1;
1656
+ const col = (index % cols) + 1;
1657
+ return {
1658
+ panel: index + 1,
1659
+ position: `row ${row}, col ${col}`,
1660
+ timecode: panelTimecode(index, panelCount, durationSeconds),
1661
+ beat: shortBeat(scene.description, index, scenes.length),
1662
+ cam: cameraLine(index),
1663
+ move: moveLine(index),
1664
+ mood: actBeat(index, panelCount),
1665
+ };
1666
+ });
1667
+ }
1668
+
1669
+ // Split totalSeconds evenly across panelCount panels → [MM:SS - MM:SS] per panel.
1670
+ function panelTimecode(index: number, panelCount: number, totalSeconds: number): string {
1671
+ const start = Math.round((index / panelCount) * totalSeconds);
1672
+ const end = Math.round(((index + 1) / panelCount) * totalSeconds);
1673
+ const fmt = (s: number) => `${String(Math.floor(s / 60)).padStart(2, '0')}:${String(s % 60).padStart(2, '0')}`;
1674
+ return `[${fmt(start)} - ${fmt(end)}]`;
1675
+ }
1676
+
1677
+ // Padding verbs for panels beyond the scene count — vary the phrasing per
1678
+ // padding-step so a long sheet over few scenes reads as a developing sequence
1679
+ // ("Hold on …", "Push closer on …") instead of the same "Resolved echo of …"
1680
+ // line repeated down the page.
1681
+ const BEAT_DEVELOPMENTS = ['Hold on', 'Push closer on', 'Linger on', 'Resolve on'];
1682
+
1683
+ function shortBeat(value: string, index: number, sceneCount: number): string {
1684
+ const cleaned = cleanSentence(value).split(/\s+/).slice(0, 12).join(' ');
1685
+ if (index >= sceneCount) {
1686
+ const develop = BEAT_DEVELOPMENTS[(index - sceneCount) % BEAT_DEVELOPMENTS.length];
1687
+ return `${develop} ${cleaned.toLowerCase()}`;
1688
+ }
1689
+ return cleaned;
1690
+ }
1691
+
1692
+ const CAMERA_VOCAB = [
1693
+ 'WIDE. LOW TRACK',
1694
+ 'MEDIUM. WHIP PAN',
1695
+ 'CLOSE. STATIC',
1696
+ 'OVER SHOULDER. PUSH',
1697
+ 'WIDE. SLOW ORBIT',
1698
+ 'MEDIUM CLOSE. HANDHELD',
1699
+ 'LOW ANGLE. PUSH IN',
1700
+ 'PROFILE. TRACK',
1701
+ 'CLOSE. SOFT HOLD',
1702
+ 'HIGH ANGLE. CRANE DOWN',
1703
+ 'MACRO. RACK FOCUS',
1704
+ 'DUTCH. SNAP ZOOM',
1705
+ ];
1706
+
1707
+ // Never repeat a framing in consecutive panels (skill: vary shot types).
1708
+ function cameraLine(index: number): string {
1709
+ return CAMERA_VOCAB[index % CAMERA_VOCAB.length];
1710
+ }
1711
+
1712
+ // Camera-movement slugs for the MOVE annotation line. Previously this echoed the
1713
+ // scene DESCRIPTION (the beat text) into MOVE — so the strip read e.g.
1714
+ // "MOVE: THE DHUAAN CANDLE JAR ON DARK SLATE" instead of an actual move. CAM
1715
+ // already carries the shot/framing; MOVE is the distinct camera-motion slug.
1716
+ const MOVE_VOCAB = [
1717
+ 'SLOW PUSH-IN',
1718
+ 'LOCKED',
1719
+ 'DOLLY IN',
1720
+ 'CRANE DOWN',
1721
+ 'HANDHELD DRIFT',
1722
+ 'SLOW ORBIT',
1723
+ 'TRACK WITH SUBJECT',
1724
+ 'TILT UP',
1725
+ 'PULL BACK',
1726
+ 'RACK FOCUS',
1727
+ 'WHIP PAN',
1728
+ 'STATIC HOLD',
1729
+ ];
1730
+
1731
+ function moveLine(index: number): string {
1732
+ return MOVE_VOCAB[index % MOVE_VOCAB.length];
1733
+ }
1734
+
1735
+ // Three-act emotional progression across the panels (storyboard-prompt-builder):
1736
+ // setup -> inciting -> rising tension -> climax -> denouement.
1737
+ function actBeat(index: number, panelCount: number): string {
1738
+ const p = (index + 1) / panelCount;
1739
+ if (p <= 0.2) return 'SETUP. ESTABLISH.';
1740
+ if (p <= 0.4) return 'INCITING. SHIFT.';
1741
+ if (p <= 0.7) return 'RISING. BUILD TENSION.';
1742
+ if (p <= 0.87) return 'CLIMAX. PEAK INTENSITY.';
1743
+ return 'DENOUEMENT. RESOLVE.';
1744
+ }
1745
+
1746
+ function characterLine(prompt: FilmmakingCharacterSheetPrompt): string {
1747
+ if (prompt.mode === 'reference-image') return `Locked by ${prompt.referenceSlots.join(', ')}. Keep face, build, wardrobe, and props identical.`;
1748
+ return prompt.promptText
1749
+ .replace(/^Create a professional character reference sheet for\s+/i, '')
1750
+ .split('. Divide the sheet')[0] ?? prompt.characterName;
1751
+ }
1752
+
1753
+ function findIdentitySheet(referenceSheets: ReferenceSheetsArtifact, characterName: string): ReferenceSheet | undefined {
1754
+ return referenceSheets.sheets.find((sheet) => (
1755
+ sheet.type === 'identity'
1756
+ && (sheet.characterName === characterName || sheet.name === characterName)
1757
+ ));
1758
+ }
1759
+
1760
+ function firstCharacterReference(character: CharacterProfile, sheet: ReferenceSheet | undefined): string | null {
1761
+ if (character.referenceAssets[0]) return character.referenceAssets[0];
1762
+ const pathRef = sheet?.references.find((reference) => 'path' in reference);
1763
+ return pathRef && 'path' in pathRef ? pathRef.path : null;
1764
+ }
1765
+
1766
+ async function readOptionalArtifact<T>(
1767
+ workspace: VideoProjectWorkspace,
1768
+ name: Parameters<typeof artifactPathFor>[1],
1769
+ ): Promise<T | undefined> {
1770
+ const path = artifactPathFor(workspace, name);
1771
+ if (!existsSync(path)) return undefined;
1772
+ return JSON.parse(await readFile(path, 'utf-8')) as T;
1773
+ }
1774
+
1775
+ function nextSlot(index: number): string {
1776
+ return `@image${index + 1}`;
1777
+ }
1778
+
1779
+ function cleanSentence(value: string): string {
1780
+ return value
1781
+ .replace(/\s+/g, ' ')
1782
+ .replace(/\[[^\]]+\]/g, '')
1783
+ .trim()
1784
+ .replace(/[.。]+$/g, '');
1785
+ }
1786
+
1787
+ function formatSeconds(seconds: number): string {
1788
+ return `0:${String(seconds).padStart(2, '0')}`;
1789
+ }