@slatesvideo/shared 0.7.5 → 0.7.7

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 (1008) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +2 -2
  3. package/dist/manual/content.d.ts +1 -1
  4. package/dist/manual/content.js +1 -1
  5. package/dist/operations/index.d.ts +903 -104
  6. package/dist/operations/index.js +1303 -323
  7. package/dist/operations/surface.d.ts +3 -2
  8. package/dist/operations/surface.js +43 -5
  9. package/dist/prompts/agent-doctrine.d.ts +6 -0
  10. package/dist/prompts/agent-doctrine.js +62 -13
  11. package/dist/prompts/generation-policy.js +1 -1
  12. package/dist/prompts/guide-discovery.d.ts +13 -1
  13. package/dist/prompts/guide-discovery.js +18 -8
  14. package/dist/prompts/model-capabilities.d.ts +30 -2
  15. package/dist/prompts/model-capabilities.js +169 -27
  16. package/dist/prompts/model-facts.d.ts +1 -1
  17. package/dist/prompts/model-facts.js +52 -40
  18. package/dist/prompts/partials.generated.js +5 -3
  19. package/dist/prompts/prompting-tips.d.ts +1 -1
  20. package/dist/prompts/prompting-tips.js +73 -28
  21. package/dist/prompts/shot-spec.d.ts +1 -1
  22. package/dist/skills/content.js +37 -29
  23. package/dist/skills/hyperframes-content.d.ts +3 -0
  24. package/dist/skills/hyperframes-content.js +337 -0
  25. package/dist/skills/hyperframes.d.ts +44 -0
  26. package/dist/skills/hyperframes.js +108 -0
  27. package/exports/slates-chatgpt-images/generated/SKILL.md +1 -1
  28. package/exports/slates-chatgpt-images/generated/slates-chatgpt-images.skill +0 -0
  29. package/exports/slates-prompt-builder/generated/SKILL.md +5 -5
  30. package/exports/slates-prompt-builder/generated/reference-character.md +3 -1
  31. package/exports/slates-prompt-builder/generated/reference-gpt-image-2-5.md +5 -5
  32. package/exports/slates-prompt-builder/generated/reference-kling.md +43 -2
  33. package/exports/slates-prompt-builder/generated/reference-nano-banana.md +60 -49
  34. package/exports/slates-prompt-builder/generated/reference-omni-flash.md +41 -9
  35. package/exports/slates-prompt-builder/generated/reference-seedance-2-5.md +34 -4
  36. package/exports/slates-prompt-builder/generated/reference-seedance.md +29 -1
  37. package/exports/slates-prompt-builder/generated/slates-prompt-builder-manifest.json +31 -31
  38. package/exports/slates-prompt-builder/generated/slates-prompt-builder.skill +0 -0
  39. package/package.json +1 -1
  40. package/skills/_partials/cinematic-card.md +1 -1
  41. package/skills/_partials/image-defaults.md +3 -5
  42. package/skills/_partials/living-performance-short.md +2 -0
  43. package/skills/_partials/living-performance.md +22 -0
  44. package/skills/_partials/model-routing.md +8 -8
  45. package/skills/_partials/thresholds.md +1 -1
  46. package/skills/hyperframes/LICENSE-hyperframes +190 -0
  47. package/skills/hyperframes/NOTICE +20 -0
  48. package/skills/hyperframes/SLATES-MAPPING.md +59 -0
  49. package/skills/hyperframes/embedded-captions/CATALOG.md +91 -0
  50. package/skills/hyperframes/embedded-captions/SKILL.md +283 -0
  51. package/skills/hyperframes/embedded-captions/assets/fonts/char-widths.json +2211 -0
  52. package/skills/hyperframes/embedded-captions/assets/strokefonts/HersheyScript1.svg +242 -0
  53. package/skills/hyperframes/embedded-captions/assets/strokefonts/HersheyScriptMed.svg +242 -0
  54. package/skills/hyperframes/embedded-captions/dna/README.md +148 -0
  55. package/skills/hyperframes/embedded-captions/dna/chrome.json +68 -0
  56. package/skills/hyperframes/embedded-captions/dna/cream.json +69 -0
  57. package/skills/hyperframes/embedded-captions/dna/documentary.json +62 -0
  58. package/skills/hyperframes/embedded-captions/dna/editorial.json +70 -0
  59. package/skills/hyperframes/embedded-captions/dna/glitch.json +82 -0
  60. package/skills/hyperframes/embedded-captions/dna/ink.json +65 -0
  61. package/skills/hyperframes/embedded-captions/dna/keynote.json +62 -0
  62. package/skills/hyperframes/embedded-captions/dna/loud.json +75 -0
  63. package/skills/hyperframes/embedded-captions/dna/neon.json +58 -0
  64. package/skills/hyperframes/embedded-captions/dna/velocity.json +89 -0
  65. package/skills/hyperframes/embedded-captions/modes/cinematic/README.md +48 -0
  66. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/champion/spec.md +98 -0
  67. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/champion/template.html +188 -0
  68. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/memory-wall/spec.md +134 -0
  69. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/memory-wall/template.html +179 -0
  70. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/portrait-header/spec.md +81 -0
  71. package/skills/hyperframes/embedded-captions/modes/cinematic/_archive/portrait-header/template.html +170 -0
  72. package/skills/hyperframes/embedded-captions/modes/cinematic/cinematic-cream/spec.md +16 -0
  73. package/skills/hyperframes/embedded-captions/modes/cinematic/cinematic-cream/template.html +217 -0
  74. package/skills/hyperframes/embedded-captions/modes/cinematic/engine.html +346 -0
  75. package/skills/hyperframes/embedded-captions/modes/standard/_anatomy.md +233 -0
  76. package/skills/hyperframes/embedded-captions/modes/standard/_motion.md +192 -0
  77. package/skills/hyperframes/embedded-captions/modes/standard/fonts/build-fonts-css.cjs +97 -0
  78. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/anton-latin-400-normal.woff2 +0 -0
  79. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/audiowide-latin-400-normal.woff2 +0 -0
  80. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/baloo-2-latin-400-normal.woff2 +0 -0
  81. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/baloo-2-latin-700-normal.woff2 +0 -0
  82. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/bangers-latin-400-normal.woff2 +0 -0
  83. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/bodoni-moda-latin-400-normal.woff2 +0 -0
  84. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/bodoni-moda-latin-700-normal.woff2 +0 -0
  85. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/caveat-latin-400-normal.woff2 +0 -0
  86. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/caveat-latin-700-normal.woff2 +0 -0
  87. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/chakra-petch-latin-500-normal.woff2 +0 -0
  88. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/chakra-petch-latin-700-normal.woff2 +0 -0
  89. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/cinzel-latin-400-normal.woff2 +0 -0
  90. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/cinzel-latin-700-normal.woff2 +0 -0
  91. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/cormorant-garamond-latin-400-normal.woff2 +0 -0
  92. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/cormorant-garamond-latin-700-normal.woff2 +0 -0
  93. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/creepster-latin-400-normal.woff2 +0 -0
  94. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/fredoka-latin-400-normal.woff2 +0 -0
  95. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/fredoka-latin-700-normal.woff2 +0 -0
  96. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-400-normal.woff2 +0 -0
  97. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-500-italic.woff2 +0 -0
  98. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-500-normal.woff2 +0 -0
  99. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-600-italic.woff2 +0 -0
  100. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-600-normal.woff2 +0 -0
  101. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-700-normal.woff2 +0 -0
  102. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-800-normal.woff2 +0 -0
  103. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/inter-latin-900-normal.woff2 +0 -0
  104. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/monoton-latin-400-normal.woff2 +0 -0
  105. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/orbitron-latin-400-normal.woff2 +0 -0
  106. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/orbitron-latin-700-normal.woff2 +0 -0
  107. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/permanent-marker-latin-400-normal.woff2 +0 -0
  108. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/press-start-2p-latin-400-normal.woff2 +0 -0
  109. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/rajdhani-latin-500-normal.woff2 +0 -0
  110. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/rajdhani-latin-700-normal.woff2 +0 -0
  111. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/saira-stencil-one-latin-400-normal.woff2 +0 -0
  112. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/shippori-mincho-latin-400-normal.woff2 +0 -0
  113. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/shippori-mincho-latin-700-normal.woff2 +0 -0
  114. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/sora-latin-400-normal.woff2 +0 -0
  115. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/sora-latin-700-normal.woff2 +0 -0
  116. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/space-grotesk-latin-400-normal.woff2 +0 -0
  117. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/space-grotesk-latin-700-normal.woff2 +0 -0
  118. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/special-elite-latin-400-normal.woff2 +0 -0
  119. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/teko-latin-400-normal.woff2 +0 -0
  120. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/teko-latin-700-normal.woff2 +0 -0
  121. package/skills/hyperframes/embedded-captions/modes/standard/fonts/files/vt323-latin-400-normal.woff2 +0 -0
  122. package/skills/hyperframes/embedded-captions/references/aesthetic-principles.md +167 -0
  123. package/skills/hyperframes/embedded-captions/references/anti-patterns.md +188 -0
  124. package/skills/hyperframes/embedded-captions/references/bespoke-vs-presets.md +178 -0
  125. package/skills/hyperframes/embedded-captions/references/caption-grouping.md +130 -0
  126. package/skills/hyperframes/embedded-captions/references/composition-craft.md +522 -0
  127. package/skills/hyperframes/embedded-captions/references/direction-catalog.md +138 -0
  128. package/skills/hyperframes/embedded-captions/references/example-renders/champion.html +371 -0
  129. package/skills/hyperframes/embedded-captions/references/example-renders/memory-wall.html +334 -0
  130. package/skills/hyperframes/embedded-captions/references/failure-modes.md +145 -0
  131. package/skills/hyperframes/embedded-captions/references/layout-heuristics.md +238 -0
  132. package/skills/hyperframes/embedded-captions/references/motion-vocabulary.md +148 -0
  133. package/skills/hyperframes/embedded-captions/references/rail.md +68 -0
  134. package/skills/hyperframes/embedded-captions/references/reference-bar.md +47 -0
  135. package/skills/hyperframes/embedded-captions/references/scene-types.md +94 -0
  136. package/skills/hyperframes/embedded-captions/references/typographic-moves.md +266 -0
  137. package/skills/hyperframes/embedded-captions/references/typography-presets.md +63 -0
  138. package/skills/hyperframes/embedded-captions/scripts/audio-envelope.cjs +95 -0
  139. package/skills/hyperframes/embedded-captions/scripts/check-occlusion.cjs +253 -0
  140. package/skills/hyperframes/embedded-captions/scripts/check-overflow.cjs +195 -0
  141. package/skills/hyperframes/embedded-captions/scripts/check-rail-climax.cjs +237 -0
  142. package/skills/hyperframes/embedded-captions/scripts/check-timing.cjs +173 -0
  143. package/skills/hyperframes/embedded-captions/scripts/fill-timings.cjs +124 -0
  144. package/skills/hyperframes/embedded-captions/scripts/fit-fonts.cjs +158 -0
  145. package/skills/hyperframes/embedded-captions/scripts/fixtures/heroless/theme.json +11 -0
  146. package/skills/hyperframes/embedded-captions/scripts/gen-stroke-path.py +57 -0
  147. package/skills/hyperframes/embedded-captions/scripts/hf-cli.cjs +33 -0
  148. package/skills/hyperframes/embedded-captions/scripts/inject-fonts.cjs +169 -0
  149. package/skills/hyperframes/embedded-captions/scripts/lib-dna.cjs +201 -0
  150. package/skills/hyperframes/embedded-captions/scripts/make-cinematic.cjs +1206 -0
  151. package/skills/hyperframes/embedded-captions/scripts/make-composition.cjs +405 -0
  152. package/skills/hyperframes/embedded-captions/scripts/make-theme.cjs +8621 -0
  153. package/skills/hyperframes/embedded-captions/scripts/make-theme.test.mjs +131 -0
  154. package/skills/hyperframes/embedded-captions/scripts/matte.cjs +268 -0
  155. package/skills/hyperframes/embedded-captions/scripts/measure-layout.cjs +294 -0
  156. package/skills/hyperframes/embedded-captions/scripts/prepare.sh +39 -0
  157. package/skills/hyperframes/embedded-captions/scripts/preview-frames.cjs +296 -0
  158. package/skills/hyperframes/embedded-captions/scripts/preview-frames.test.mjs +24 -0
  159. package/skills/hyperframes/embedded-captions/scripts/render-and-composite.sh +425 -0
  160. package/skills/hyperframes/embedded-captions/scripts/render-theme.sh +34 -0
  161. package/skills/hyperframes/embedded-captions/scripts/safe-zones.cjs +816 -0
  162. package/skills/hyperframes/embedded-captions/scripts/transcribe.cjs +327 -0
  163. package/skills/hyperframes/embedded-captions/scripts/transcribe.test.mjs +69 -0
  164. package/skills/hyperframes/embedded-captions/themes/README.md +243 -0
  165. package/skills/hyperframes/embedded-captions/themes/anchor.json +27 -0
  166. package/skills/hyperframes/embedded-captions/themes/arcade.json +51 -0
  167. package/skills/hyperframes/embedded-captions/themes/aurora.json +41 -0
  168. package/skills/hyperframes/embedded-captions/themes/biolume.json +35 -0
  169. package/skills/hyperframes/embedded-captions/themes/brush.json +74 -0
  170. package/skills/hyperframes/embedded-captions/themes/chalkboard.json +52 -0
  171. package/skills/hyperframes/embedded-captions/themes/dossier.json +56 -0
  172. package/skills/hyperframes/embedded-captions/themes/graffiti.json +62 -0
  173. package/skills/hyperframes/embedded-captions/themes/hologram.json +41 -0
  174. package/skills/hyperframes/embedded-captions/themes/inkwater.json +43 -0
  175. package/skills/hyperframes/embedded-captions/themes/laser.json +46 -0
  176. package/skills/hyperframes/embedded-captions/themes/lastpage.json +33 -0
  177. package/skills/hyperframes/embedded-captions/themes/neonsign.json +53 -0
  178. package/skills/hyperframes/embedded-captions/themes/ordnance.json +54 -0
  179. package/skills/hyperframes/embedded-captions/themes/papercut.json +37 -0
  180. package/skills/hyperframes/embedded-captions/themes/popup.json +46 -0
  181. package/skills/hyperframes/embedded-captions/themes/ransom.json +62 -0
  182. package/skills/hyperframes/embedded-captions/themes/scoreboard.json +54 -0
  183. package/skills/hyperframes/embedded-captions/themes/spectrum.json +46 -0
  184. package/skills/hyperframes/embedded-captions/themes/stardust.json +29 -0
  185. package/skills/hyperframes/embedded-captions/themes/stomp.json +43 -0
  186. package/skills/hyperframes/embedded-captions/themes/terminal.json +49 -0
  187. package/skills/hyperframes/embedded-captions/themes/thunder.json +44 -0
  188. package/skills/hyperframes/embedded-captions/themes/transit.json +44 -0
  189. package/skills/hyperframes/embedded-captions/themes/vhs.json +47 -0
  190. package/skills/hyperframes/faceless-explainer/SKILL.md +241 -0
  191. package/skills/hyperframes/faceless-explainer/references/cut-catalog.md +215 -0
  192. package/skills/hyperframes/faceless-explainer/references/motion-language.md +156 -0
  193. package/skills/hyperframes/faceless-explainer/references/story-design.md +255 -0
  194. package/skills/hyperframes/faceless-explainer/references/visual-design.md +146 -0
  195. package/skills/hyperframes/faceless-explainer/scripts/assemble-index.mjs +625 -0
  196. package/skills/hyperframes/faceless-explainer/scripts/assemble-index.test.mjs +127 -0
  197. package/skills/hyperframes/faceless-explainer/scripts/audio.mjs +338 -0
  198. package/skills/hyperframes/faceless-explainer/scripts/audio.test.mjs +341 -0
  199. package/skills/hyperframes/faceless-explainer/scripts/build-frame.mjs +554 -0
  200. package/skills/hyperframes/faceless-explainer/scripts/captions.mjs +524 -0
  201. package/skills/hyperframes/faceless-explainer/scripts/captions.test.mjs +219 -0
  202. package/skills/hyperframes/faceless-explainer/scripts/frame-packets.mjs +27 -0
  203. package/skills/hyperframes/faceless-explainer/scripts/frame-packets.test.mjs +66 -0
  204. package/skills/hyperframes/faceless-explainer/scripts/lib/assets.mjs +56 -0
  205. package/skills/hyperframes/faceless-explainer/scripts/lib/bgm-volume.mjs +4 -0
  206. package/skills/hyperframes/faceless-explainer/scripts/lib/captured-fonts.mjs +58 -0
  207. package/skills/hyperframes/faceless-explainer/scripts/lib/dimensions.mjs +45 -0
  208. package/skills/hyperframes/faceless-explainer/scripts/lib/frame-packets-core.mjs +194 -0
  209. package/skills/hyperframes/faceless-explainer/scripts/lib/host-audio.mjs +28 -0
  210. package/skills/hyperframes/faceless-explainer/scripts/lib/pad-frame-duration.mjs +36 -0
  211. package/skills/hyperframes/faceless-explainer/scripts/lib/storyboard.mjs +249 -0
  212. package/skills/hyperframes/faceless-explainer/scripts/lib/tokens.mjs +211 -0
  213. package/skills/hyperframes/faceless-explainer/scripts/lib/transition-registry.mjs +38 -0
  214. package/skills/hyperframes/faceless-explainer/scripts/lib/transitions.json +71 -0
  215. package/skills/hyperframes/faceless-explainer/scripts/transitions.mjs +384 -0
  216. package/skills/hyperframes/faceless-explainer/scripts/transitions.test.mjs +70 -0
  217. package/skills/hyperframes/faceless-explainer/sub-agents/frame-worker.md +12 -0
  218. package/skills/hyperframes/figma/SKILL.md +134 -0
  219. package/skills/hyperframes/figma/scripts/verify-motion.mjs +153 -0
  220. package/skills/hyperframes/general-video/SKILL.md +168 -0
  221. package/skills/hyperframes/general-video/scripts/frame-packets.mjs +38 -0
  222. package/skills/hyperframes/general-video/scripts/frame-packets.test.mjs +80 -0
  223. package/skills/hyperframes/general-video/scripts/lib/frame-packets-core.mjs +194 -0
  224. package/skills/hyperframes/general-video/sub-agents/frame-worker.md +34 -0
  225. package/skills/hyperframes/hyperframes/SKILL.md +154 -0
  226. package/skills/hyperframes/hyperframes/references/brief-contract.md +108 -0
  227. package/skills/hyperframes/hyperframes/references/brief-format.md +72 -0
  228. package/skills/hyperframes/hyperframes/references/capability-menu.md +47 -0
  229. package/skills/hyperframes/hyperframes/references/frame-worker-core.md +80 -0
  230. package/skills/hyperframes/hyperframes/references/intent-interview.md +73 -0
  231. package/skills/hyperframes/hyperframes/references/pitch-round.md +40 -0
  232. package/skills/hyperframes/hyperframes/references/plugin-installation.md +43 -0
  233. package/skills/hyperframes/hyperframes/references/production-loop.md +26 -0
  234. package/skills/hyperframes/hyperframes/references/review-loop.md +37 -0
  235. package/skills/hyperframes/hyperframes/references/route-briefs.md +11 -0
  236. package/skills/hyperframes/hyperframes/references/routes/embedded-captions.md +11 -0
  237. package/skills/hyperframes/hyperframes/references/routes/faceless-explainer.md +12 -0
  238. package/skills/hyperframes/hyperframes/references/routes/general-video.md +12 -0
  239. package/skills/hyperframes/hyperframes/references/routes/motion-graphics.md +11 -0
  240. package/skills/hyperframes/hyperframes/references/routes/music-to-video.md +12 -0
  241. package/skills/hyperframes/hyperframes/references/routes/pr-to-video.md +28 -0
  242. package/skills/hyperframes/hyperframes/references/routes/product-launch-video.md +13 -0
  243. package/skills/hyperframes/hyperframes/references/routes/remotion-to-hyperframes.md +9 -0
  244. package/skills/hyperframes/hyperframes/references/routes/slideshow.md +11 -0
  245. package/skills/hyperframes/hyperframes/references/routes/talking-head-recut.md +11 -0
  246. package/skills/hyperframes/hyperframes/references/script-format.md +52 -0
  247. package/skills/hyperframes/hyperframes/references/skill-lifecycle.md +35 -0
  248. package/skills/hyperframes/hyperframes/references/storyboard-format.md +99 -0
  249. package/skills/hyperframes/hyperframes/references/subagent-dispatch.md +35 -0
  250. package/skills/hyperframes/hyperframes/references/workflow-catalog.md +10 -0
  251. package/skills/hyperframes/hyperframes/scripts/lib/frame-packets-core.mjs +194 -0
  252. package/skills/hyperframes/hyperframes/scripts/plugin-cli.mjs +88 -0
  253. package/skills/hyperframes/hyperframes/scripts/plugin-cli.test.mjs +117 -0
  254. package/skills/hyperframes/hyperframes-animation/SKILL.md +88 -0
  255. package/skills/hyperframes/hyperframes-animation/adapters/animate-text.md +64 -0
  256. package/skills/hyperframes/hyperframes-animation/adapters/animejs.md +130 -0
  257. package/skills/hyperframes/hyperframes-animation/adapters/css-animations.md +143 -0
  258. package/skills/hyperframes/hyperframes-animation/adapters/gsap-easing-and-stagger.md +199 -0
  259. package/skills/hyperframes/hyperframes-animation/adapters/gsap-timeline-and-labels.md +96 -0
  260. package/skills/hyperframes/hyperframes-animation/adapters/gsap-transforms-and-perf.md +129 -0
  261. package/skills/hyperframes/hyperframes-animation/adapters/gsap.md +105 -0
  262. package/skills/hyperframes/hyperframes-animation/adapters/html-in-canvas-patterns.md +507 -0
  263. package/skills/hyperframes/hyperframes-animation/adapters/lottie.md +130 -0
  264. package/skills/hyperframes/hyperframes-animation/adapters/three.md +176 -0
  265. package/skills/hyperframes/hyperframes-animation/adapters/typegpu.md +182 -0
  266. package/skills/hyperframes/hyperframes-animation/adapters/waapi.md +101 -0
  267. package/skills/hyperframes/hyperframes-animation/blueprints/agent-progress-theater.md +76 -0
  268. package/skills/hyperframes/hyperframes-animation/blueprints/camera-journey.md +61 -0
  269. package/skills/hyperframes/hyperframes-animation/blueprints/comparison-split.md +27 -0
  270. package/skills/hyperframes/hyperframes-animation/blueprints/constellation-hub.md +63 -0
  271. package/skills/hyperframes/hyperframes-animation/blueprints/cta-morph-press.md +63 -0
  272. package/skills/hyperframes/hyperframes-animation/blueprints/cursor-ui-demo.md +89 -0
  273. package/skills/hyperframes/hyperframes-animation/blueprints/dataviz-countup.md +59 -0
  274. package/skills/hyperframes/hyperframes-animation/blueprints/device-surface-showcase.md +68 -0
  275. package/skills/hyperframes/hyperframes-animation/blueprints/fixed-anchor-cycle.md +46 -0
  276. package/skills/hyperframes/hyperframes-animation/blueprints/grid-card-assemble.md +81 -0
  277. package/skills/hyperframes/hyperframes-animation/blueprints/kinetic-type-beats.md +133 -0
  278. package/skills/hyperframes/hyperframes-animation/blueprints/logo-assemble-lockup.md +121 -0
  279. package/skills/hyperframes/hyperframes-animation/blueprints/overwhelm-surround.md +58 -0
  280. package/skills/hyperframes/hyperframes-animation/blueprints/panel-edit-live-sync.md +73 -0
  281. package/skills/hyperframes/hyperframes-animation/blueprints/prompt-type-submit-generate.md +85 -0
  282. package/skills/hyperframes/hyperframes-animation/blueprints/spatial-pan-stations.md +37 -0
  283. package/skills/hyperframes/hyperframes-animation/blueprints/ticker-takeover.md +29 -0
  284. package/skills/hyperframes/hyperframes-animation/blueprints/titlecard-reveal.md +80 -0
  285. package/skills/hyperframes/hyperframes-animation/blueprints/transcript-scroll-artifact-reveal.md +45 -0
  286. package/skills/hyperframes/hyperframes-animation/blueprints/typewriter-reveal.md +51 -0
  287. package/skills/hyperframes/hyperframes-animation/blueprints/video-text-pivot.md +30 -0
  288. package/skills/hyperframes/hyperframes-animation/blueprints/zoom-out-workspace-reveal.md +68 -0
  289. package/skills/hyperframes/hyperframes-animation/blueprints-index.md +202 -0
  290. package/skills/hyperframes/hyperframes-animation/examples/brand-reveal-assemble-zoom.html +382 -0
  291. package/skills/hyperframes/hyperframes-animation/examples/comparison-split-cards.html +649 -0
  292. package/skills/hyperframes/hyperframes-animation/examples/concept-demo-decode-pan.html +520 -0
  293. package/skills/hyperframes/hyperframes-animation/examples/cta-morph-press.html +468 -0
  294. package/skills/hyperframes/hyperframes-animation/examples/cta-orbit-collapse.html +1298 -0
  295. package/skills/hyperframes/hyperframes-animation/examples/demo-page-scroll-spotlight.html +759 -0
  296. package/skills/hyperframes/hyperframes-animation/examples/hook-counter-burst.html +729 -0
  297. package/skills/hyperframes/hyperframes-animation/examples/messaging-multi-phrase.html +352 -0
  298. package/skills/hyperframes/hyperframes-animation/examples/metric-video-text-pivot.html +779 -0
  299. package/skills/hyperframes/hyperframes-animation/examples/problem-mockup-overwhelm.html +1374 -0
  300. package/skills/hyperframes/hyperframes-animation/examples/proof-logo-chain.html +861 -0
  301. package/skills/hyperframes/hyperframes-animation/examples/takeover-ticker-displace.html +347 -0
  302. package/skills/hyperframes/hyperframes-animation/examples/workflow-approve-press.html +606 -0
  303. package/skills/hyperframes/hyperframes-animation/references/motion-blur.md +134 -0
  304. package/skills/hyperframes/hyperframes-animation/rules/3d-camera-flight.md +180 -0
  305. package/skills/hyperframes/hyperframes-animation/rules/3d-page-scroll.md +135 -0
  306. package/skills/hyperframes/hyperframes-animation/rules/3d-text-depth-layers.md +128 -0
  307. package/skills/hyperframes/hyperframes-animation/rules/ai-tracking-box.md +139 -0
  308. package/skills/hyperframes/hyperframes-animation/rules/ambient-glow-bloom.md +133 -0
  309. package/skills/hyperframes/hyperframes-animation/rules/anchored-layout-expand.md +148 -0
  310. package/skills/hyperframes/hyperframes-animation/rules/asr-keyword-glow.md +128 -0
  311. package/skills/hyperframes/hyperframes-animation/rules/avatar-cloud-network.md +145 -0
  312. package/skills/hyperframes/hyperframes-animation/rules/camera-cursor-tracking.md +133 -0
  313. package/skills/hyperframes/hyperframes-animation/rules/card-morph-anchor.md +134 -0
  314. package/skills/hyperframes/hyperframes-animation/rules/center-outward-expansion.md +88 -0
  315. package/skills/hyperframes/hyperframes-animation/rules/chart-scrub-readout.md +151 -0
  316. package/skills/hyperframes/hyperframes-animation/rules/chromatic-glitch.md +150 -0
  317. package/skills/hyperframes/hyperframes-animation/rules/context-sensitive-cursor.md +140 -0
  318. package/skills/hyperframes/hyperframes-animation/rules/control-target-sync.md +131 -0
  319. package/skills/hyperframes/hyperframes-animation/rules/coordinate-target-zoom.md +138 -0
  320. package/skills/hyperframes/hyperframes-animation/rules/counting-dynamic-scale.md +115 -0
  321. package/skills/hyperframes/hyperframes-animation/rules/css-marker-patterns.md +208 -0
  322. package/skills/hyperframes/hyperframes-animation/rules/cursor-click-ripple.md +104 -0
  323. package/skills/hyperframes/hyperframes-animation/rules/cursor-drag.md +141 -0
  324. package/skills/hyperframes/hyperframes-animation/rules/depth-of-field-blur.md +112 -0
  325. package/skills/hyperframes/hyperframes-animation/rules/depth-scatter-assemble.md +139 -0
  326. package/skills/hyperframes/hyperframes-animation/rules/discrete-text-sequence.md +146 -0
  327. package/skills/hyperframes/hyperframes-animation/rules/dynamic-content-sequencing.md +149 -0
  328. package/skills/hyperframes/hyperframes-animation/rules/gradient-text-sweep.md +136 -0
  329. package/skills/hyperframes/hyperframes-animation/rules/gsap-effects.md +196 -0
  330. package/skills/hyperframes/hyperframes-animation/rules/hacker-flip-3d.md +123 -0
  331. package/skills/hyperframes/hyperframes-animation/rules/kinetic-beat-slam.md +137 -0
  332. package/skills/hyperframes/hyperframes-animation/rules/motion-blur-streak.md +187 -0
  333. package/skills/hyperframes/hyperframes-animation/rules/multi-cursor-choreography.md +133 -0
  334. package/skills/hyperframes/hyperframes-animation/rules/multi-phase-camera.md +129 -0
  335. package/skills/hyperframes/hyperframes-animation/rules/nudge-curve.md +47 -0
  336. package/skills/hyperframes/hyperframes-animation/rules/orbit-3d-entry.md +148 -0
  337. package/skills/hyperframes/hyperframes-animation/rules/particle-burst.md +149 -0
  338. package/skills/hyperframes/hyperframes-animation/rules/physics-press-reaction.md +101 -0
  339. package/skills/hyperframes/hyperframes-animation/rules/press-release-spring.md +108 -0
  340. package/skills/hyperframes/hyperframes-animation/rules/reactive-displacement.md +92 -0
  341. package/skills/hyperframes/hyperframes-animation/rules/scale-swap-transition.md +88 -0
  342. package/skills/hyperframes/hyperframes-animation/rules/sine-wave-loop.md +85 -0
  343. package/skills/hyperframes/hyperframes-animation/rules/split-tilt-cards.md +123 -0
  344. package/skills/hyperframes/hyperframes-animation/rules/spring-pop-entrance.md +107 -0
  345. package/skills/hyperframes/hyperframes-animation/rules/stat-bars-and-fills.md +145 -0
  346. package/skills/hyperframes/hyperframes-animation/rules/svg-icon-enrichment.md +141 -0
  347. package/skills/hyperframes/hyperframes-animation/rules/svg-path-draw.md +122 -0
  348. package/skills/hyperframes/hyperframes-animation/rules/theme-crossfade-morph.md +126 -0
  349. package/skills/hyperframes/hyperframes-animation/rules/vertical-spring-ticker.md +104 -0
  350. package/skills/hyperframes/hyperframes-animation/rules/viewport-change.md +148 -0
  351. package/skills/hyperframes/hyperframes-animation/rules/waterfall-entry.md +81 -0
  352. package/skills/hyperframes/hyperframes-animation/rules-index.md +113 -0
  353. package/skills/hyperframes/hyperframes-animation/scripts/animation-map-sampling.mjs +40 -0
  354. package/skills/hyperframes/hyperframes-animation/scripts/animation-map-sampling.test.mjs +48 -0
  355. package/skills/hyperframes/hyperframes-animation/scripts/animation-map.mjs +659 -0
  356. package/skills/hyperframes/hyperframes-animation/scripts/animation-map.test.mjs +444 -0
  357. package/skills/hyperframes/hyperframes-animation/scripts/package-loader.mjs +415 -0
  358. package/skills/hyperframes/hyperframes-animation/scripts/package-loader.test.mjs +114 -0
  359. package/skills/hyperframes/hyperframes-animation/techniques.md +507 -0
  360. package/skills/hyperframes/hyperframes-animation/transitions/TRANSITION-REGISTRY.md +168 -0
  361. package/skills/hyperframes/hyperframes-animation/transitions/catalog.md +127 -0
  362. package/skills/hyperframes/hyperframes-animation/transitions/css-3d.md +12 -0
  363. package/skills/hyperframes/hyperframes-animation/transitions/css-blur.md +51 -0
  364. package/skills/hyperframes/hyperframes-animation/transitions/css-cover.md +43 -0
  365. package/skills/hyperframes/hyperframes-animation/transitions/css-destruction.md +95 -0
  366. package/skills/hyperframes/hyperframes-animation/transitions/css-dissolve.md +66 -0
  367. package/skills/hyperframes/hyperframes-animation/transitions/css-distortion.md +45 -0
  368. package/skills/hyperframes/hyperframes-animation/transitions/css-grid.md +10 -0
  369. package/skills/hyperframes/hyperframes-animation/transitions/css-light.md +49 -0
  370. package/skills/hyperframes/hyperframes-animation/transitions/css-mechanical.md +30 -0
  371. package/skills/hyperframes/hyperframes-animation/transitions/css-other.md +25 -0
  372. package/skills/hyperframes/hyperframes-animation/transitions/css-push.md +41 -0
  373. package/skills/hyperframes/hyperframes-animation/transitions/css-radial.md +37 -0
  374. package/skills/hyperframes/hyperframes-animation/transitions/css-scale.md +24 -0
  375. package/skills/hyperframes/hyperframes-animation/transitions/overview.md +153 -0
  376. package/skills/hyperframes/hyperframes-audio/SKILL.md +475 -0
  377. package/skills/hyperframes/hyperframes-audio/references/attributes.md +138 -0
  378. package/skills/hyperframes/hyperframes-audio/references/diagnosis.md +276 -0
  379. package/skills/hyperframes/hyperframes-audio/references/fx-registry.md +84 -0
  380. package/skills/hyperframes/hyperframes-audio/references/presets.md +216 -0
  381. package/skills/hyperframes/hyperframes-audio/scripts/carve.mjs +572 -0
  382. package/skills/hyperframes/hyperframes-audio/scripts/carve.test.mjs +254 -0
  383. package/skills/hyperframes/hyperframes-cli/SKILL.md +194 -0
  384. package/skills/hyperframes/hyperframes-cli/references/beats.md +19 -0
  385. package/skills/hyperframes/hyperframes-cli/references/cloud.md +163 -0
  386. package/skills/hyperframes/hyperframes-cli/references/cloudrun.md +62 -0
  387. package/skills/hyperframes/hyperframes-cli/references/compare-and-batch.md +105 -0
  388. package/skills/hyperframes/hyperframes-cli/references/doctor-browser.md +57 -0
  389. package/skills/hyperframes/hyperframes-cli/references/init-and-scaffold.md +74 -0
  390. package/skills/hyperframes/hyperframes-cli/references/lambda.md +185 -0
  391. package/skills/hyperframes/hyperframes-cli/references/lint-validate-inspect.md +132 -0
  392. package/skills/hyperframes/hyperframes-cli/references/preview-render.md +193 -0
  393. package/skills/hyperframes/hyperframes-cli/references/upgrade-info-misc.md +134 -0
  394. package/skills/hyperframes/hyperframes-core/SKILL.md +100 -0
  395. package/skills/hyperframes/hyperframes-core/references/composition-patterns.md +224 -0
  396. package/skills/hyperframes/hyperframes-core/references/creator-editing-recipes.md +439 -0
  397. package/skills/hyperframes/hyperframes-core/references/data-attributes.md +80 -0
  398. package/skills/hyperframes/hyperframes-core/references/determinism-rules.md +53 -0
  399. package/skills/hyperframes/hyperframes-core/references/full-screen-motion.md +67 -0
  400. package/skills/hyperframes/hyperframes-core/references/minimal-composition.md +69 -0
  401. package/skills/hyperframes/hyperframes-core/references/sub-compositions.md +176 -0
  402. package/skills/hyperframes/hyperframes-core/references/tailwind.md +104 -0
  403. package/skills/hyperframes/hyperframes-core/references/tracks-and-clips.md +121 -0
  404. package/skills/hyperframes/hyperframes-core/references/variables-and-media.md +109 -0
  405. package/skills/hyperframes/hyperframes-creative/SKILL.md +73 -0
  406. package/skills/hyperframes/hyperframes-creative/frame-presets/biennale-yellow/FRAME.md +289 -0
  407. package/skills/hyperframes/hyperframes-creative/frame-presets/biennale-yellow/caption-skin.html +221 -0
  408. package/skills/hyperframes/hyperframes-creative/frame-presets/biennale-yellow/frame-showcase.html +1214 -0
  409. package/skills/hyperframes/hyperframes-creative/frame-presets/blockframe/FRAME.md +275 -0
  410. package/skills/hyperframes/hyperframes-creative/frame-presets/blockframe/caption-skin.html +224 -0
  411. package/skills/hyperframes/hyperframes-creative/frame-presets/blockframe/frame-showcase.html +1347 -0
  412. package/skills/hyperframes/hyperframes-creative/frame-presets/blue-professional/FRAME.md +307 -0
  413. package/skills/hyperframes/hyperframes-creative/frame-presets/blue-professional/caption-skin.html +223 -0
  414. package/skills/hyperframes/hyperframes-creative/frame-presets/blue-professional/frame-showcase.html +1372 -0
  415. package/skills/hyperframes/hyperframes-creative/frame-presets/bold-poster/FRAME.md +275 -0
  416. package/skills/hyperframes/hyperframes-creative/frame-presets/bold-poster/caption-skin.html +230 -0
  417. package/skills/hyperframes/hyperframes-creative/frame-presets/bold-poster/frame-showcase.html +1140 -0
  418. package/skills/hyperframes/hyperframes-creative/frame-presets/broadside/FRAME.md +284 -0
  419. package/skills/hyperframes/hyperframes-creative/frame-presets/broadside/caption-skin.html +225 -0
  420. package/skills/hyperframes/hyperframes-creative/frame-presets/broadside/frame-showcase.html +1166 -0
  421. package/skills/hyperframes/hyperframes-creative/frame-presets/capsule/FRAME.md +284 -0
  422. package/skills/hyperframes/hyperframes-creative/frame-presets/capsule/caption-skin.html +224 -0
  423. package/skills/hyperframes/hyperframes-creative/frame-presets/capsule/frame-showcase.html +1465 -0
  424. package/skills/hyperframes/hyperframes-creative/frame-presets/cartesian/FRAME.md +278 -0
  425. package/skills/hyperframes/hyperframes-creative/frame-presets/cartesian/caption-skin.html +222 -0
  426. package/skills/hyperframes/hyperframes-creative/frame-presets/cartesian/frame-showcase.html +1263 -0
  427. package/skills/hyperframes/hyperframes-creative/frame-presets/cobalt-grid/FRAME.md +265 -0
  428. package/skills/hyperframes/hyperframes-creative/frame-presets/cobalt-grid/caption-skin.html +238 -0
  429. package/skills/hyperframes/hyperframes-creative/frame-presets/cobalt-grid/frame-showcase.html +1468 -0
  430. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/FRAME.md +277 -0
  431. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/caption-skin.html +224 -0
  432. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/EBGaramond-400.woff2 +0 -0
  433. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/EBGaramond-700.woff2 +0 -0
  434. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/Inter-400.woff2 +0 -0
  435. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/Inter-700.woff2 +0 -0
  436. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/JetBrainsMono-400.woff2 +0 -0
  437. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/JetBrainsMono-700.woff2 +0 -0
  438. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/OFL-eb-garamond.txt +93 -0
  439. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/OFL-inter.txt +93 -0
  440. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/fonts/OFL-jetbrains-mono.txt +93 -0
  441. package/skills/hyperframes/hyperframes-creative/frame-presets/code-editorial/frame-showcase.html +1438 -0
  442. package/skills/hyperframes/hyperframes-creative/frame-presets/coral/FRAME.md +314 -0
  443. package/skills/hyperframes/hyperframes-creative/frame-presets/coral/caption-skin.html +226 -0
  444. package/skills/hyperframes/hyperframes-creative/frame-presets/coral/frame-showcase.html +1268 -0
  445. package/skills/hyperframes/hyperframes-creative/frame-presets/creative-mode/FRAME.md +333 -0
  446. package/skills/hyperframes/hyperframes-creative/frame-presets/creative-mode/caption-skin.html +227 -0
  447. package/skills/hyperframes/hyperframes-creative/frame-presets/creative-mode/frame-showcase.html +1330 -0
  448. package/skills/hyperframes/hyperframes-creative/frame-presets/daisy-days/FRAME.md +274 -0
  449. package/skills/hyperframes/hyperframes-creative/frame-presets/daisy-days/caption-skin.html +230 -0
  450. package/skills/hyperframes/hyperframes-creative/frame-presets/daisy-days/frame-showcase.html +1444 -0
  451. package/skills/hyperframes/hyperframes-creative/frame-presets/editorial-forest/FRAME.md +265 -0
  452. package/skills/hyperframes/hyperframes-creative/frame-presets/editorial-forest/caption-skin.html +223 -0
  453. package/skills/hyperframes/hyperframes-creative/frame-presets/editorial-forest/frame-showcase.html +1273 -0
  454. package/skills/hyperframes/hyperframes-creative/palettes/bold-energetic.md +14 -0
  455. package/skills/hyperframes/hyperframes-creative/palettes/clean-corporate.md +14 -0
  456. package/skills/hyperframes/hyperframes-creative/palettes/dark-premium.md +14 -0
  457. package/skills/hyperframes/hyperframes-creative/palettes/jewel-rich.md +14 -0
  458. package/skills/hyperframes/hyperframes-creative/palettes/monochrome.md +14 -0
  459. package/skills/hyperframes/hyperframes-creative/palettes/nature-earth.md +14 -0
  460. package/skills/hyperframes/hyperframes-creative/palettes/neon-electric.md +14 -0
  461. package/skills/hyperframes/hyperframes-creative/palettes/pastel-soft.md +14 -0
  462. package/skills/hyperframes/hyperframes-creative/palettes/warm-editorial.md +14 -0
  463. package/skills/hyperframes/hyperframes-creative/references/audio-reactive.md +76 -0
  464. package/skills/hyperframes/hyperframes-creative/references/beat-direction.md +164 -0
  465. package/skills/hyperframes/hyperframes-creative/references/composition-patterns.md +199 -0
  466. package/skills/hyperframes/hyperframes-creative/references/data-in-motion.md +19 -0
  467. package/skills/hyperframes/hyperframes-creative/references/design-adherence.md +19 -0
  468. package/skills/hyperframes/hyperframes-creative/references/design-picker.md +123 -0
  469. package/skills/hyperframes/hyperframes-creative/references/design-spec.md +55 -0
  470. package/skills/hyperframes/hyperframes-creative/references/house-style.md +73 -0
  471. package/skills/hyperframes/hyperframes-creative/references/motion-principles.md +151 -0
  472. package/skills/hyperframes/hyperframes-creative/references/narration.md +92 -0
  473. package/skills/hyperframes/hyperframes-creative/references/prompt-expansion.md +68 -0
  474. package/skills/hyperframes/hyperframes-creative/references/story-spine.md +45 -0
  475. package/skills/hyperframes/hyperframes-creative/references/storyboard-recipe.md +57 -0
  476. package/skills/hyperframes/hyperframes-creative/references/typography.md +218 -0
  477. package/skills/hyperframes/hyperframes-creative/references/video-composition.md +63 -0
  478. package/skills/hyperframes/hyperframes-creative/references/visual-styles.md +457 -0
  479. package/skills/hyperframes/hyperframes-creative/scripts/contrast-report.mjs +538 -0
  480. package/skills/hyperframes/hyperframes-creative/scripts/extract-audio-data.py +199 -0
  481. package/skills/hyperframes/hyperframes-creative/scripts/package-loader.mjs +415 -0
  482. package/skills/hyperframes/hyperframes-creative/scripts/package-loader.test.mjs +114 -0
  483. package/skills/hyperframes/hyperframes-creative/templates/design-picker.html +1432 -0
  484. package/skills/hyperframes/hyperframes-keyframes/SKILL.md +263 -0
  485. package/skills/hyperframes/hyperframes-keyframes/agents/openai.yaml +4 -0
  486. package/skills/hyperframes/hyperframes-keyframes/references/keyframe-patterns.md +108 -0
  487. package/skills/hyperframes/hyperframes-registry/SKILL.md +147 -0
  488. package/skills/hyperframes/hyperframes-registry/examples/add-block.md +51 -0
  489. package/skills/hyperframes/hyperframes-registry/examples/add-component.md +73 -0
  490. package/skills/hyperframes/hyperframes-registry/references/component-quality-bar.md +250 -0
  491. package/skills/hyperframes/hyperframes-registry/references/contributing.md +180 -0
  492. package/skills/hyperframes/hyperframes-registry/references/demo-html-pattern.md +54 -0
  493. package/skills/hyperframes/hyperframes-registry/references/discovery.md +217 -0
  494. package/skills/hyperframes/hyperframes-registry/references/install-locations.md +45 -0
  495. package/skills/hyperframes/hyperframes-registry/references/placeholder-material.md +149 -0
  496. package/skills/hyperframes/hyperframes-registry/references/templates.md +417 -0
  497. package/skills/hyperframes/hyperframes-registry/references/wiring-blocks.md +61 -0
  498. package/skills/hyperframes/hyperframes-registry/references/wiring-components.md +39 -0
  499. package/skills/hyperframes/hyperframes-studio/SKILL.md +140 -0
  500. package/skills/hyperframes/media-use/SKILL.md +102 -0
  501. package/skills/hyperframes/media-use/audio/assets/sfx/CREDITS.md +35 -0
  502. package/skills/hyperframes/media-use/audio/assets/sfx/chime.mp3 +0 -0
  503. package/skills/hyperframes/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
  504. package/skills/hyperframes/media-use/audio/assets/sfx/click.mp3 +0 -0
  505. package/skills/hyperframes/media-use/audio/assets/sfx/error.mp3 +0 -0
  506. package/skills/hyperframes/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
  507. package/skills/hyperframes/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
  508. package/skills/hyperframes/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
  509. package/skills/hyperframes/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
  510. package/skills/hyperframes/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
  511. package/skills/hyperframes/media-use/audio/assets/sfx/key-press.mp3 +0 -0
  512. package/skills/hyperframes/media-use/audio/assets/sfx/manifest.json +97 -0
  513. package/skills/hyperframes/media-use/audio/assets/sfx/notification.mp3 +0 -0
  514. package/skills/hyperframes/media-use/audio/assets/sfx/ping.mp3 +0 -0
  515. package/skills/hyperframes/media-use/audio/assets/sfx/pop.mp3 +0 -0
  516. package/skills/hyperframes/media-use/audio/assets/sfx/riser.mp3 +0 -0
  517. package/skills/hyperframes/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
  518. package/skills/hyperframes/media-use/audio/assets/sfx/typing.mp3 +0 -0
  519. package/skills/hyperframes/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
  520. package/skills/hyperframes/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
  521. package/skills/hyperframes/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
  522. package/skills/hyperframes/media-use/audio/references/bgm.md +76 -0
  523. package/skills/hyperframes/media-use/audio/references/captions/authoring.md +163 -0
  524. package/skills/hyperframes/media-use/audio/references/captions/motion.md +87 -0
  525. package/skills/hyperframes/media-use/audio/references/captions/transcript-handling.md +97 -0
  526. package/skills/hyperframes/media-use/audio/references/remove-background.md +143 -0
  527. package/skills/hyperframes/media-use/audio/references/requirements.md +29 -0
  528. package/skills/hyperframes/media-use/audio/references/sfx.md +42 -0
  529. package/skills/hyperframes/media-use/audio/references/transcribe.md +52 -0
  530. package/skills/hyperframes/media-use/audio/references/tts-to-captions.md +35 -0
  531. package/skills/hyperframes/media-use/audio/references/tts.md +260 -0
  532. package/skills/hyperframes/media-use/audio/scripts/audio.mjs +311 -0
  533. package/skills/hyperframes/media-use/audio/scripts/audio.test.mjs +159 -0
  534. package/skills/hyperframes/media-use/audio/scripts/gemini-pipeline.test.mjs +131 -0
  535. package/skills/hyperframes/media-use/audio/scripts/heygen-tts.mjs +122 -0
  536. package/skills/hyperframes/media-use/audio/scripts/heygen-tts.test.mjs +38 -0
  537. package/skills/hyperframes/media-use/audio/scripts/heygen-voice.mjs +98 -0
  538. package/skills/hyperframes/media-use/audio/scripts/heygen-voice.test.mjs +233 -0
  539. package/skills/hyperframes/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
  540. package/skills/hyperframes/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
  541. package/skills/hyperframes/media-use/audio/scripts/lib/bgm-volume.mjs +4 -0
  542. package/skills/hyperframes/media-use/audio/scripts/lib/bgm.mjs +257 -0
  543. package/skills/hyperframes/media-use/audio/scripts/lib/bgm.test.mjs +74 -0
  544. package/skills/hyperframes/media-use/audio/scripts/lib/concurrency.mjs +14 -0
  545. package/skills/hyperframes/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
  546. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-auth.mjs +43 -0
  547. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-auth.py +52 -0
  548. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-auth.test.mjs +86 -0
  549. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-auth_test.py +90 -0
  550. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-tts.mjs +122 -0
  551. package/skills/hyperframes/media-use/audio/scripts/lib/gemini-tts.test.mjs +243 -0
  552. package/skills/hyperframes/media-use/audio/scripts/lib/heygen.mjs +197 -0
  553. package/skills/hyperframes/media-use/audio/scripts/lib/heygen.test.mjs +185 -0
  554. package/skills/hyperframes/media-use/audio/scripts/lib/host-audio.mjs +28 -0
  555. package/skills/hyperframes/media-use/audio/scripts/lib/host-audio.test.mjs +106 -0
  556. package/skills/hyperframes/media-use/audio/scripts/lib/media-record.mjs +114 -0
  557. package/skills/hyperframes/media-use/audio/scripts/lib/media-record.test.mjs +205 -0
  558. package/skills/hyperframes/media-use/audio/scripts/lib/python.mjs +77 -0
  559. package/skills/hyperframes/media-use/audio/scripts/lib/python.test.mjs +136 -0
  560. package/skills/hyperframes/media-use/audio/scripts/lib/sfx.mjs +165 -0
  561. package/skills/hyperframes/media-use/audio/scripts/lib/sfx.test.mjs +121 -0
  562. package/skills/hyperframes/media-use/audio/scripts/lib/tts.mjs +389 -0
  563. package/skills/hyperframes/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
  564. package/skills/hyperframes/media-use/audio/scripts/lib/tts.test.mjs +230 -0
  565. package/skills/hyperframes/media-use/audio/scripts/lyria-recipe.py +136 -0
  566. package/skills/hyperframes/media-use/audio/scripts/wait-bgm.mjs +175 -0
  567. package/skills/hyperframes/media-use/audio/scripts/wait-bgm.test.mjs +108 -0
  568. package/skills/hyperframes/media-use/luts/README.md +28 -0
  569. package/skills/hyperframes/media-use/luts/index.json +57 -0
  570. package/skills/hyperframes/media-use/references/audio.md +20 -0
  571. package/skills/hyperframes/media-use/references/grading.md +160 -0
  572. package/skills/hyperframes/media-use/references/media-treatment-recipes.md +929 -0
  573. package/skills/hyperframes/media-use/references/media-treatments.md +202 -0
  574. package/skills/hyperframes/media-use/references/memory.md +37 -0
  575. package/skills/hyperframes/media-use/references/meta.md +61 -0
  576. package/skills/hyperframes/media-use/references/operations.md +327 -0
  577. package/skills/hyperframes/media-use/references/resolve.md +150 -0
  578. package/skills/hyperframes/media-use/references/setup-providers.md +81 -0
  579. package/skills/hyperframes/media-use/references/telemetry-dashboard.md +49 -0
  580. package/skills/hyperframes/media-use/scripts/audio-duck.mjs +113 -0
  581. package/skills/hyperframes/media-use/scripts/compatibility.test.mjs +96 -0
  582. package/skills/hyperframes/media-use/scripts/dither.mjs +328 -0
  583. package/skills/hyperframes/media-use/scripts/dither.test.mjs +176 -0
  584. package/skills/hyperframes/media-use/scripts/eval.mjs +369 -0
  585. package/skills/hyperframes/media-use/scripts/lib/config-lock.mjs +45 -0
  586. package/skills/hyperframes/media-use/scripts/lib/cutlist.mjs +184 -0
  587. package/skills/hyperframes/media-use/scripts/lib/duck.mjs +95 -0
  588. package/skills/hyperframes/media-use/scripts/lib/error-diffusion.mjs +230 -0
  589. package/skills/hyperframes/media-use/scripts/lib/index-gen.mjs +63 -0
  590. package/skills/hyperframes/media-use/scripts/lib/manifest.mjs +279 -0
  591. package/skills/hyperframes/media-use/scripts/lib/media-fetch.mjs +85 -0
  592. package/skills/hyperframes/media-use/scripts/lib/media-home.mjs +20 -0
  593. package/skills/hyperframes/media-use/scripts/lib/npx-sync.mjs +57 -0
  594. package/skills/hyperframes/media-use/scripts/lib/parakeet-words.mjs +27 -0
  595. package/skills/hyperframes/media-use/scripts/lib/prefs-store.mjs +180 -0
  596. package/skills/hyperframes/media-use/scripts/lib/recipe-store.mjs +367 -0
  597. package/skills/hyperframes/media-use/scripts/lib/telemetry.mjs +210 -0
  598. package/skills/hyperframes/media-use/scripts/lib/transcriptCutFade.mjs +21 -0
  599. package/skills/hyperframes/media-use/scripts/lib/words.mjs +18 -0
  600. package/skills/hyperframes/media-use/scripts/prefs.mjs +70 -0
  601. package/skills/hyperframes/media-use/scripts/recipe.mjs +103 -0
  602. package/skills/hyperframes/media-use/scripts/resolve-plugin.test.mjs +62 -0
  603. package/skills/hyperframes/media-use/scripts/resolve.mjs +31 -0
  604. package/skills/hyperframes/media-use/scripts/transcribe.mjs +194 -0
  605. package/skills/hyperframes/media-use/scripts/transcribe.test.mjs +112 -0
  606. package/skills/hyperframes/media-use/scripts/transcript-cut.mjs +270 -0
  607. package/skills/hyperframes/media-use/scripts/transcript-cut.test.mjs +117 -0
  608. package/skills/hyperframes/motion-graphics/SKILL.md +174 -0
  609. package/skills/hyperframes/motion-graphics/agents/builder.md +45 -0
  610. package/skills/hyperframes/motion-graphics/agents/director.md +54 -0
  611. package/skills/hyperframes/motion-graphics/agents/finalize.md +17 -0
  612. package/skills/hyperframes/motion-graphics/catalog-map.md +52 -0
  613. package/skills/hyperframes/motion-graphics/categories/asset-fusion/module.md +37 -0
  614. package/skills/hyperframes/motion-graphics/categories/charts/module.md +24 -0
  615. package/skills/hyperframes/motion-graphics/categories/kinetic-type/module.md +19 -0
  616. package/skills/hyperframes/motion-graphics/categories/logo-reveal/module.md +17 -0
  617. package/skills/hyperframes/motion-graphics/categories/lower-thirds/module.md +20 -0
  618. package/skills/hyperframes/motion-graphics/categories/maps/bake-basemap.mjs +273 -0
  619. package/skills/hyperframes/motion-graphics/categories/maps/module.md +61 -0
  620. package/skills/hyperframes/motion-graphics/categories/news/module.md +56 -0
  621. package/skills/hyperframes/motion-graphics/categories/stat/module.md +23 -0
  622. package/skills/hyperframes/motion-graphics/categories/tweet/module.md +16 -0
  623. package/skills/hyperframes/motion-graphics/categories/webpage/module.md +30 -0
  624. package/skills/hyperframes/motion-graphics/grounding/PROTOCOL.md +64 -0
  625. package/skills/hyperframes/motion-graphics/grounding/locate.mjs +228 -0
  626. package/skills/hyperframes/motion-graphics/phases/source/guide.md +21 -0
  627. package/skills/hyperframes/motion-graphics/references/builder-contract.md +38 -0
  628. package/skills/hyperframes/motion-graphics/references/motion-vocabulary.md +47 -0
  629. package/skills/hyperframes/motion-graphics/references/shot-plan-ir.md +54 -0
  630. package/skills/hyperframes/motion-graphics/samples/asset-fusion/_ref-circle-highlight.html +306 -0
  631. package/skills/hyperframes/music-to-video/SKILL.md +210 -0
  632. package/skills/hyperframes/music-to-video/references/frame-skeleton.md +100 -0
  633. package/skills/hyperframes/music-to-video/references/montage.md +55 -0
  634. package/skills/hyperframes/music-to-video/references/motion-primitive-catalog.md +75 -0
  635. package/skills/hyperframes/music-to-video/references/motion-primitives/3d-card-flip/index.html +53 -0
  636. package/skills/hyperframes/music-to-video/references/motion-primitives/3d-card-flip/scene.html +119 -0
  637. package/skills/hyperframes/music-to-video/references/motion-primitives/assets/gsap.min.js +11 -0
  638. package/skills/hyperframes/music-to-video/references/motion-primitives/bg-flow-field/index.html +53 -0
  639. package/skills/hyperframes/music-to-video/references/motion-primitives/bg-flow-field/scene.html +294 -0
  640. package/skills/hyperframes/music-to-video/references/motion-primitives/binary-decrypt/index.html +54 -0
  641. package/skills/hyperframes/music-to-video/references/motion-primitives/binary-decrypt/scene.html +85 -0
  642. package/skills/hyperframes/music-to-video/references/motion-primitives/blur-resolve/index.html +53 -0
  643. package/skills/hyperframes/music-to-video/references/motion-primitives/blur-resolve/scene.html +60 -0
  644. package/skills/hyperframes/music-to-video/references/motion-primitives/braam-punch/index.html +53 -0
  645. package/skills/hyperframes/music-to-video/references/motion-primitives/braam-punch/scene.html +100 -0
  646. package/skills/hyperframes/music-to-video/references/motion-primitives/chromatic-split/index.html +53 -0
  647. package/skills/hyperframes/music-to-video/references/motion-primitives/chromatic-split/scene.html +111 -0
  648. package/skills/hyperframes/music-to-video/references/motion-primitives/chrome-sweep/index.html +53 -0
  649. package/skills/hyperframes/music-to-video/references/motion-primitives/chrome-sweep/scene.html +68 -0
  650. package/skills/hyperframes/music-to-video/references/motion-primitives/counting-punch/index.html +54 -0
  651. package/skills/hyperframes/music-to-video/references/motion-primitives/counting-punch/scene.html +119 -0
  652. package/skills/hyperframes/music-to-video/references/motion-primitives/crash-zoom-in/index.html +53 -0
  653. package/skills/hyperframes/music-to-video/references/motion-primitives/crash-zoom-in/scene.html +120 -0
  654. package/skills/hyperframes/music-to-video/references/motion-primitives/datamosh-smear/index.html +55 -0
  655. package/skills/hyperframes/music-to-video/references/motion-primitives/datamosh-smear/scene.html +131 -0
  656. package/skills/hyperframes/music-to-video/references/motion-primitives/directional-fill/index.html +53 -0
  657. package/skills/hyperframes/music-to-video/references/motion-primitives/directional-fill/scene.html +103 -0
  658. package/skills/hyperframes/music-to-video/references/motion-primitives/dolly-zoom/index.html +53 -0
  659. package/skills/hyperframes/music-to-video/references/motion-primitives/dolly-zoom/scene.html +102 -0
  660. package/skills/hyperframes/music-to-video/references/motion-primitives/electric-arc/index.html +54 -0
  661. package/skills/hyperframes/music-to-video/references/motion-primitives/electric-arc/scene.html +105 -0
  662. package/skills/hyperframes/music-to-video/references/motion-primitives/flash-cut/index.html +53 -0
  663. package/skills/hyperframes/music-to-video/references/motion-primitives/flash-cut/scene.html +97 -0
  664. package/skills/hyperframes/music-to-video/references/motion-primitives/gooey-metaball/index.html +54 -0
  665. package/skills/hyperframes/music-to-video/references/motion-primitives/gooey-metaball/scene.html +206 -0
  666. package/skills/hyperframes/music-to-video/references/motion-primitives/hard-cut/index.html +53 -0
  667. package/skills/hyperframes/music-to-video/references/motion-primitives/hard-cut/scene.html +82 -0
  668. package/skills/hyperframes/music-to-video/references/motion-primitives/hypercut-whip/index.html +53 -0
  669. package/skills/hyperframes/music-to-video/references/motion-primitives/hypercut-whip/scene.html +44 -0
  670. package/skills/hyperframes/music-to-video/references/motion-primitives/iris-open/index.html +53 -0
  671. package/skills/hyperframes/music-to-video/references/motion-primitives/iris-open/scene.html +69 -0
  672. package/skills/hyperframes/music-to-video/references/motion-primitives/kinetic-letter-in/index.html +53 -0
  673. package/skills/hyperframes/music-to-video/references/motion-primitives/kinetic-letter-in/scene.html +64 -0
  674. package/skills/hyperframes/music-to-video/references/motion-primitives/liquid-morph/index.html +53 -0
  675. package/skills/hyperframes/music-to-video/references/motion-primitives/liquid-morph/scene.html +96 -0
  676. package/skills/hyperframes/music-to-video/references/motion-primitives/mask-reveal/index.html +53 -0
  677. package/skills/hyperframes/music-to-video/references/motion-primitives/mask-reveal/scene.html +74 -0
  678. package/skills/hyperframes/music-to-video/references/motion-primitives/mosaic-pack/index.html +53 -0
  679. package/skills/hyperframes/music-to-video/references/motion-primitives/mosaic-pack/scene.html +89 -0
  680. package/skills/hyperframes/music-to-video/references/motion-primitives/neon-flicker/index.html +53 -0
  681. package/skills/hyperframes/music-to-video/references/motion-primitives/neon-flicker/scene.html +73 -0
  682. package/skills/hyperframes/music-to-video/references/motion-primitives/outline-to-fill/index.html +53 -0
  683. package/skills/hyperframes/music-to-video/references/motion-primitives/outline-to-fill/scene.html +82 -0
  684. package/skills/hyperframes/music-to-video/references/motion-primitives/palette-flip/index.html +53 -0
  685. package/skills/hyperframes/music-to-video/references/motion-primitives/palette-flip/scene.html +97 -0
  686. package/skills/hyperframes/music-to-video/references/motion-primitives/particle-burst/index.html +53 -0
  687. package/skills/hyperframes/music-to-video/references/motion-primitives/particle-burst/scene.html +106 -0
  688. package/skills/hyperframes/music-to-video/references/motion-primitives/pixel-dissolve/index.html +53 -0
  689. package/skills/hyperframes/music-to-video/references/motion-primitives/pixel-dissolve/scene.html +86 -0
  690. package/skills/hyperframes/music-to-video/references/motion-primitives/radial-burst-lines/index.html +53 -0
  691. package/skills/hyperframes/music-to-video/references/motion-primitives/radial-burst-lines/scene.html +130 -0
  692. package/skills/hyperframes/music-to-video/references/motion-primitives/screen-shake/index.html +53 -0
  693. package/skills/hyperframes/music-to-video/references/motion-primitives/screen-shake/scene.html +78 -0
  694. package/skills/hyperframes/music-to-video/references/motion-primitives/slot-machine-reveal/index.html +53 -0
  695. package/skills/hyperframes/music-to-video/references/motion-primitives/slot-machine-reveal/scene.html +100 -0
  696. package/skills/hyperframes/music-to-video/references/motion-primitives/spotlight-sweep/index.html +53 -0
  697. package/skills/hyperframes/music-to-video/references/motion-primitives/spotlight-sweep/scene.html +102 -0
  698. package/skills/hyperframes/music-to-video/references/motion-primitives/staggered-exit/index.html +53 -0
  699. package/skills/hyperframes/music-to-video/references/motion-primitives/staggered-exit/scene.html +82 -0
  700. package/skills/hyperframes/music-to-video/references/motion-primitives/text-spectral-rays/USAGE.md +42 -0
  701. package/skills/hyperframes/music-to-video/references/motion-primitives/text-spectral-rays/index.html +53 -0
  702. package/skills/hyperframes/music-to-video/references/motion-primitives/text-spectral-rays/scene.html +280 -0
  703. package/skills/hyperframes/music-to-video/references/motion-primitives/text-wave-distort/index.html +54 -0
  704. package/skills/hyperframes/music-to-video/references/motion-primitives/text-wave-distort/scene.html +106 -0
  705. package/skills/hyperframes/music-to-video/references/motion-primitives/tile-mosaic/index.html +53 -0
  706. package/skills/hyperframes/music-to-video/references/motion-primitives/tile-mosaic/scene.html +109 -0
  707. package/skills/hyperframes/music-to-video/references/motion-primitives/typewriter-reveal/index.html +53 -0
  708. package/skills/hyperframes/music-to-video/references/motion-primitives/typewriter-reveal/scene.html +91 -0
  709. package/skills/hyperframes/music-to-video/references/motion-primitives/word-grid-burst/index.html +53 -0
  710. package/skills/hyperframes/music-to-video/references/motion-primitives/word-grid-burst/scene.html +96 -0
  711. package/skills/hyperframes/music-to-video/references/planning.md +104 -0
  712. package/skills/hyperframes/music-to-video/references/storyboard-format.md +94 -0
  713. package/skills/hyperframes/music-to-video/references/template-catalog.md +106 -0
  714. package/skills/hyperframes/music-to-video/references/templates/card-flyby/index.html +527 -0
  715. package/skills/hyperframes/music-to-video/references/templates/card-flyby/program.json +13 -0
  716. package/skills/hyperframes/music-to-video/references/templates/held-message-living-field/index.html +485 -0
  717. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/asphalt-031.png +0 -0
  718. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bark-014.png +0 -0
  719. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/brick.png +0 -0
  720. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-075-a.png +0 -0
  721. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-101.png +0 -0
  722. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-102.png +0 -0
  723. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/bricks-104.png +0 -0
  724. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/carpet.png +0 -0
  725. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-034.png +0 -0
  726. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-042-a.png +0 -0
  727. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-046.png +0 -0
  728. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete-047-a.png +0 -0
  729. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/concrete.png +0 -0
  730. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/diamond-plate-009.png +0 -0
  731. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-080.png +0 -0
  732. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/fabric-083.png +0 -0
  733. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-001.png +0 -0
  734. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-004.png +0 -0
  735. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/grass-005.png +0 -0
  736. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-037.png +0 -0
  737. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-054.png +0 -0
  738. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-068.png +0 -0
  739. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-080.png +0 -0
  740. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-103.png +0 -0
  741. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/ground-104.png +0 -0
  742. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/lava.png +0 -0
  743. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/leather-037.png +0 -0
  744. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-012.png +0 -0
  745. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/marble-016.png +0 -0
  746. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-032.png +0 -0
  747. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-038.png +0 -0
  748. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-041-a.png +0 -0
  749. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-046-b.png +0 -0
  750. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-048-a.png +0 -0
  751. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-049-a.png +0 -0
  752. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-055-a.png +0 -0
  753. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal-061-b.png +0 -0
  754. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/metal.png +0 -0
  755. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/onyx.png +0 -0
  756. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/painted-plaster-017.png +0 -0
  757. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-138.png +0 -0
  758. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/paving-stones-150.png +0 -0
  759. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/plaster-001.png +0 -0
  760. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-007.png +0 -0
  761. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-008-a.png +0 -0
  762. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-009-c.png +0 -0
  763. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-a.png +0 -0
  764. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-012-b.png +0 -0
  765. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/road-013-a.png +0 -0
  766. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-058.png +0 -0
  767. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock-063.png +0 -0
  768. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/rock.png +0 -0
  769. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow-015.png +0 -0
  770. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/snow.png +0 -0
  771. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/tiles-138.png +0 -0
  772. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/travertine-009.png +0 -0
  773. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-049.png +0 -0
  774. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-051.png +0 -0
  775. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-058.png +0 -0
  776. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-066.png +0 -0
  777. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-092.png +0 -0
  778. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-094.png +0 -0
  779. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-051.png +0 -0
  780. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-064.png +0 -0
  781. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood-floor-070.png +0 -0
  782. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/assets/texture-mask-text/masks/wood.png +0 -0
  783. package/skills/hyperframes/music-to-video/references/templates/held-text-strobe-burst/index.html +302 -0
  784. package/skills/hyperframes/music-to-video/references/templates/intro-kinetic-cascade/index.html +610 -0
  785. package/skills/hyperframes/music-to-video/references/templates/intro-kinetic-cascade/program.json +41 -0
  786. package/skills/hyperframes/music-to-video/references/templates/logo-split-lockup-pulse/assets/fredoka-700.woff2 +0 -0
  787. package/skills/hyperframes/music-to-video/references/templates/logo-split-lockup-pulse/index.html +596 -0
  788. package/skills/hyperframes/music-to-video/references/templates/poster-tile-mosaic/index.html +589 -0
  789. package/skills/hyperframes/music-to-video/references/templates/poster-tile-mosaic/program.json +25 -0
  790. package/skills/hyperframes/music-to-video/references/templates/roll-flipbook-word-cycle/index.html +267 -0
  791. package/skills/hyperframes/music-to-video/references/templates/split-anchor-word-slot/index.html +594 -0
  792. package/skills/hyperframes/music-to-video/references/templates/split-anchor-word-slot/program.json +39 -0
  793. package/skills/hyperframes/music-to-video/references/templates/typewriter-phrase-keyword-shuffle/index.html +238 -0
  794. package/skills/hyperframes/music-to-video/scripts/analyze-beatgrid.py +542 -0
  795. package/skills/hyperframes/music-to-video/scripts/assemble-index.mjs +220 -0
  796. package/skills/hyperframes/music-to-video/scripts/lib/storyboard.mjs +249 -0
  797. package/skills/hyperframes/music-to-video/scripts/stage-assets.mjs +58 -0
  798. package/skills/hyperframes/music-to-video/scripts/validate-plan.mjs +161 -0
  799. package/skills/hyperframes/music-to-video/sub-agents/frame-worker.md +49 -0
  800. package/skills/hyperframes/pr-to-video/SKILL.md +273 -0
  801. package/skills/hyperframes/pr-to-video/references/code-vocabulary.md +113 -0
  802. package/skills/hyperframes/pr-to-video/references/cut-catalog.md +215 -0
  803. package/skills/hyperframes/pr-to-video/references/motion-language.md +156 -0
  804. package/skills/hyperframes/pr-to-video/references/story-design.md +230 -0
  805. package/skills/hyperframes/pr-to-video/references/visual-design.md +164 -0
  806. package/skills/hyperframes/pr-to-video/scripts/assemble-index.mjs +631 -0
  807. package/skills/hyperframes/pr-to-video/scripts/assemble-index.test.mjs +130 -0
  808. package/skills/hyperframes/pr-to-video/scripts/audio.mjs +338 -0
  809. package/skills/hyperframes/pr-to-video/scripts/build-frame.mjs +589 -0
  810. package/skills/hyperframes/pr-to-video/scripts/captions.mjs +524 -0
  811. package/skills/hyperframes/pr-to-video/scripts/captions.test.mjs +260 -0
  812. package/skills/hyperframes/pr-to-video/scripts/fetch-people-avatars.mjs +157 -0
  813. package/skills/hyperframes/pr-to-video/scripts/fetch-pr.mjs +234 -0
  814. package/skills/hyperframes/pr-to-video/scripts/frame-contract.test.mjs +209 -0
  815. package/skills/hyperframes/pr-to-video/scripts/frame-packets.mjs +62 -0
  816. package/skills/hyperframes/pr-to-video/scripts/ingest.mjs +561 -0
  817. package/skills/hyperframes/pr-to-video/scripts/lib/assets.mjs +56 -0
  818. package/skills/hyperframes/pr-to-video/scripts/lib/bgm-volume.mjs +4 -0
  819. package/skills/hyperframes/pr-to-video/scripts/lib/captured-fonts.mjs +58 -0
  820. package/skills/hyperframes/pr-to-video/scripts/lib/dimensions.mjs +45 -0
  821. package/skills/hyperframes/pr-to-video/scripts/lib/frame-contract.mjs +54 -0
  822. package/skills/hyperframes/pr-to-video/scripts/lib/frame-packets-core.mjs +194 -0
  823. package/skills/hyperframes/pr-to-video/scripts/lib/host-audio.mjs +28 -0
  824. package/skills/hyperframes/pr-to-video/scripts/lib/pad-frame-duration.mjs +36 -0
  825. package/skills/hyperframes/pr-to-video/scripts/lib/storyboard.mjs +249 -0
  826. package/skills/hyperframes/pr-to-video/scripts/lib/tokens.mjs +211 -0
  827. package/skills/hyperframes/pr-to-video/scripts/lib/transition-registry.mjs +38 -0
  828. package/skills/hyperframes/pr-to-video/scripts/lib/transitions.json +71 -0
  829. package/skills/hyperframes/pr-to-video/scripts/preflight.mjs +51 -0
  830. package/skills/hyperframes/pr-to-video/scripts/project-dir.mjs +92 -0
  831. package/skills/hyperframes/pr-to-video/scripts/transitions.mjs +383 -0
  832. package/skills/hyperframes/pr-to-video/scripts/workflow-guardrails.test.mjs +198 -0
  833. package/skills/hyperframes/pr-to-video/sub-agents/frame-worker.md +38 -0
  834. package/skills/hyperframes/product-launch-video/SKILL.md +268 -0
  835. package/skills/hyperframes/product-launch-video/references/cut-catalog.md +220 -0
  836. package/skills/hyperframes/product-launch-video/references/motion-language.md +156 -0
  837. package/skills/hyperframes/product-launch-video/references/story-design.md +508 -0
  838. package/skills/hyperframes/product-launch-video/references/visual-design.md +126 -0
  839. package/skills/hyperframes/product-launch-video/scripts/assemble-index.mjs +773 -0
  840. package/skills/hyperframes/product-launch-video/scripts/assemble-index.test.mjs +127 -0
  841. package/skills/hyperframes/product-launch-video/scripts/audio.mjs +338 -0
  842. package/skills/hyperframes/product-launch-video/scripts/audio.test.mjs +399 -0
  843. package/skills/hyperframes/product-launch-video/scripts/build-frame-subsets.test.mjs +152 -0
  844. package/skills/hyperframes/product-launch-video/scripts/build-frame.mjs +552 -0
  845. package/skills/hyperframes/product-launch-video/scripts/captions.mjs +524 -0
  846. package/skills/hyperframes/product-launch-video/scripts/captions.test.mjs +219 -0
  847. package/skills/hyperframes/product-launch-video/scripts/capture-skill-guardrails.test.mjs +39 -0
  848. package/skills/hyperframes/product-launch-video/scripts/frame-packets.mjs +27 -0
  849. package/skills/hyperframes/product-launch-video/scripts/frame-packets.test.mjs +144 -0
  850. package/skills/hyperframes/product-launch-video/scripts/lib/assets.mjs +56 -0
  851. package/skills/hyperframes/product-launch-video/scripts/lib/bgm-volume.mjs +4 -0
  852. package/skills/hyperframes/product-launch-video/scripts/lib/captured-fonts.mjs +58 -0
  853. package/skills/hyperframes/product-launch-video/scripts/lib/dimensions.mjs +45 -0
  854. package/skills/hyperframes/product-launch-video/scripts/lib/frame-packets-core.mjs +194 -0
  855. package/skills/hyperframes/product-launch-video/scripts/lib/host-audio.mjs +28 -0
  856. package/skills/hyperframes/product-launch-video/scripts/lib/pad-frame-duration.mjs +36 -0
  857. package/skills/hyperframes/product-launch-video/scripts/lib/pad-frame-duration.test.mjs +76 -0
  858. package/skills/hyperframes/product-launch-video/scripts/lib/storyboard.mjs +249 -0
  859. package/skills/hyperframes/product-launch-video/scripts/lib/tokens.mjs +218 -0
  860. package/skills/hyperframes/product-launch-video/scripts/lib/tokens.test.mjs +57 -0
  861. package/skills/hyperframes/product-launch-video/scripts/lib/transition-registry.mjs +38 -0
  862. package/skills/hyperframes/product-launch-video/scripts/lib/transitions.json +71 -0
  863. package/skills/hyperframes/product-launch-video/scripts/media-contract.test.mjs +200 -0
  864. package/skills/hyperframes/product-launch-video/scripts/stage-assets.mjs +39 -0
  865. package/skills/hyperframes/product-launch-video/scripts/stage-assets.test.mjs +52 -0
  866. package/skills/hyperframes/product-launch-video/scripts/transitions.mjs +383 -0
  867. package/skills/hyperframes/product-launch-video/scripts/transitions.test.mjs +68 -0
  868. package/skills/hyperframes/product-launch-video/sub-agents/frame-worker.md +21 -0
  869. package/skills/hyperframes/remotion-to-hyperframes/SKILL.md +132 -0
  870. package/skills/hyperframes/remotion-to-hyperframes/assets/.gitkeep +0 -0
  871. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/run.sh +249 -0
  872. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md +41 -0
  873. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/expected.json +26 -0
  874. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/compositions/title.html +31 -0
  875. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/index.html +46 -0
  876. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/package.json +14 -0
  877. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/remotion.config.ts +13 -0
  878. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/Root.tsx +13 -0
  879. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/TitleCard.tsx +34 -0
  880. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/index.ts +4 -0
  881. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/tsconfig.json +15 -0
  882. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/README.md +54 -0
  883. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/expected.json +29 -0
  884. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/compositions/scene-1.html +35 -0
  885. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/compositions/scene-2.html +35 -0
  886. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/compositions/scene-3.html +36 -0
  887. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/index.html +75 -0
  888. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/package.json +14 -0
  889. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/remotion.config.ts +13 -0
  890. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/MultiScene.tsx +105 -0
  891. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/Root.tsx +13 -0
  892. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/index.ts +4 -0
  893. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/tsconfig.json +15 -0
  894. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh +34 -0
  895. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/README.md +85 -0
  896. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/expected.json +41 -0
  897. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/compositions/scene-1.html +52 -0
  898. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/compositions/scene-2.html +99 -0
  899. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/compositions/scene-3.html +55 -0
  900. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/index.html +70 -0
  901. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/package.json +15 -0
  902. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/remotion.config.ts +13 -0
  903. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Root.tsx +27 -0
  904. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Stargazed.tsx +37 -0
  905. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/AnimatedNumber.tsx +23 -0
  906. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/StatCard.tsx +59 -0
  907. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/UnderlinedText.tsx +47 -0
  908. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/index.ts +4 -0
  909. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/OutroScene.tsx +18 -0
  910. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/StatsScene.tsx +34 -0
  911. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/TitleScene.tsx +55 -0
  912. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/tsconfig.json +15 -0
  913. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/README.md +51 -0
  914. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/01-use-state.tsx +29 -0
  915. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/02-use-effect-deps.tsx +29 -0
  916. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/03-async-metadata.tsx +39 -0
  917. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx +30 -0
  918. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx +38 -0
  919. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/06-warnings-only.tsx +36 -0
  920. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/07-custom-hook.tsx +28 -0
  921. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx +41 -0
  922. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/expected.json +85 -0
  923. package/skills/hyperframes/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/validate.sh +110 -0
  924. package/skills/hyperframes/remotion-to-hyperframes/references/api-map.md +142 -0
  925. package/skills/hyperframes/remotion-to-hyperframes/references/escape-hatch.md +115 -0
  926. package/skills/hyperframes/remotion-to-hyperframes/references/eval.md +140 -0
  927. package/skills/hyperframes/remotion-to-hyperframes/references/fonts.md +112 -0
  928. package/skills/hyperframes/remotion-to-hyperframes/references/limitations.md +136 -0
  929. package/skills/hyperframes/remotion-to-hyperframes/references/lottie.md +119 -0
  930. package/skills/hyperframes/remotion-to-hyperframes/references/media.md +166 -0
  931. package/skills/hyperframes/remotion-to-hyperframes/references/parameters.md +172 -0
  932. package/skills/hyperframes/remotion-to-hyperframes/references/sequencing.md +251 -0
  933. package/skills/hyperframes/remotion-to-hyperframes/references/timing.md +165 -0
  934. package/skills/hyperframes/remotion-to-hyperframes/references/transitions.md +114 -0
  935. package/skills/hyperframes/remotion-to-hyperframes/scripts/.gitkeep +0 -0
  936. package/skills/hyperframes/remotion-to-hyperframes/scripts/frame_strip.sh +107 -0
  937. package/skills/hyperframes/remotion-to-hyperframes/scripts/lint_source.py +370 -0
  938. package/skills/hyperframes/remotion-to-hyperframes/scripts/render_diff.sh +103 -0
  939. package/skills/hyperframes/remotion-to-hyperframes/scripts/tests/fixtures/blocker.tsx +50 -0
  940. package/skills/hyperframes/remotion-to-hyperframes/scripts/tests/fixtures/clean.tsx +46 -0
  941. package/skills/hyperframes/remotion-to-hyperframes/scripts/tests/smoke.sh +90 -0
  942. package/skills/hyperframes/slideshow/SKILL.md +526 -0
  943. package/skills/hyperframes/slideshow/references/standalone-harness.md +1017 -0
  944. package/skills/hyperframes/talking-head-recut/NOTICE.md +39 -0
  945. package/skills/hyperframes/talking-head-recut/SKILL.md +1204 -0
  946. package/skills/hyperframes/talking-head-recut/assets/fonts/Caveat-400-latin.woff2 +0 -0
  947. package/skills/hyperframes/talking-head-recut/assets/fonts/Caveat-700-latin.woff2 +0 -0
  948. package/skills/hyperframes/talking-head-recut/assets/fonts/Inter-400-latin.woff2 +0 -0
  949. package/skills/hyperframes/talking-head-recut/assets/fonts/Inter-700-latin.woff2 +0 -0
  950. package/skills/hyperframes/talking-head-recut/assets/fonts/LXGWWenKaiTC-400-latin.woff2 +0 -0
  951. package/skills/hyperframes/talking-head-recut/assets/fonts/Virgil.woff2 +0 -0
  952. package/skills/hyperframes/talking-head-recut/assets/vendor/gsap.min.js +10 -0
  953. package/skills/hyperframes/talking-head-recut/media-contract.test.mjs +24 -0
  954. package/skills/hyperframes/talking-head-recut/references/DESIGN_INDEX.md +145 -0
  955. package/skills/hyperframes/talking-head-recut/references/frames/clean.html +92 -0
  956. package/skills/hyperframes/talking-head-recut/references/frames/hairline.html +171 -0
  957. package/skills/hyperframes/talking-head-recut/references/frames/polaroid.html +131 -0
  958. package/skills/hyperframes/talking-head-recut/references/layouts/overlay.html +164 -0
  959. package/skills/hyperframes/talking-head-recut/references/layouts/pip.html +143 -0
  960. package/skills/hyperframes/talking-head-recut/references/layouts/split.html +121 -0
  961. package/skills/hyperframes/talking-head-recut/references/layouts/stack.html +109 -0
  962. package/skills/hyperframes/talking-head-recut/references/styles/academic.html +172 -0
  963. package/skills/hyperframes/talking-head-recut/references/styles/audit.html +170 -0
  964. package/skills/hyperframes/talking-head-recut/references/styles/editorial.html +189 -0
  965. package/skills/hyperframes/talking-head-recut/references/styles/geom.html +181 -0
  966. package/skills/hyperframes/talking-head-recut/references/styles/minimal.html +130 -0
  967. package/skills/hyperframes/talking-head-recut/references/styles/spotlight.html +142 -0
  968. package/skills/hyperframes/talking-head-recut/references/styles/swiss.html +188 -0
  969. package/skills/hyperframes/talking-head-recut/references/styles/terminal.html +196 -0
  970. package/skills/hyperframes/talking-head-recut/references/styles/whiteboard.html +170 -0
  971. package/skills/hyperframes/talking-head-recut/references/styles/xhs.html +206 -0
  972. package/skills/slates-blocking-to-prompt.md +27 -0
  973. package/skills/slates-captions.md +81 -0
  974. package/skills/slates-character-identity.md +3 -1
  975. package/skills/slates-chatgpt-images.md +1 -1
  976. package/skills/slates-cinematic-look.md +2 -2
  977. package/skills/slates-cost-discipline.md +4 -6
  978. package/skills/slates-cuts.md +46 -0
  979. package/skills/slates-direct-response-ad.md +4 -6
  980. package/skills/slates-edit-and-iterate.md +11 -6
  981. package/skills/slates-layer-brand-captions.md +87 -0
  982. package/skills/slates-layer-lower-third.md +85 -0
  983. package/skills/slates-layer-title.md +82 -0
  984. package/skills/slates-model-selection.md +12 -14
  985. package/skills/slates-motion.md +57 -0
  986. package/skills/slates-one-prompt-film.md +6 -6
  987. package/skills/slates-previs-blocking.md +2 -0
  988. package/skills/slates-project-organization.md +11 -10
  989. package/skills/slates-prompting-elevenlabs.md +1 -1
  990. package/skills/{slates-prompting-flux-2-max.md → slates-prompting-flux-3.md} +46 -80
  991. package/skills/slates-prompting-gpt-image-2-5.md +5 -5
  992. package/skills/slates-prompting-kling-v3.md +42 -3
  993. package/skills/slates-prompting-ltx-2-5.md +32 -4
  994. package/skills/slates-prompting-minimax-h3.md +30 -1
  995. package/skills/{slates-prompting-nano-banana-2.md → slates-prompting-nano-banana-2-1.md} +58 -48
  996. package/skills/slates-prompting-omni-flash.md +42 -10
  997. package/skills/slates-prompting-seed-audio.md +1 -1
  998. package/skills/slates-prompting-seedance-2-5.md +33 -4
  999. package/skills/slates-prompting-seedance.md +29 -2
  1000. package/skills/slates-prompting-seedream-5-lite.md +2 -2
  1001. package/skills/slates-prompting-wan-3.md +143 -0
  1002. package/skills/slates-script-craft.md +3 -3
  1003. package/skills/slates-shot-variety.md +4 -4
  1004. package/skills/slates-storyboard-from-script.md +6 -6
  1005. package/skills/slates-style-prompting.md +9 -9
  1006. package/skills/slates-transitions.md +40 -0
  1007. package/skills/slates-ugc-influencer-ad.md +6 -6
  1008. package/skills/slates-vision-feedback-loop.md +2 -2
@@ -1,7 +1,8 @@
1
1
  import { MAX_IMAGE_VARIATIONS } from '../prompts/generation-policy.js';
2
+ import { STYLE_LIBRARY, DEFAULT_STYLE_ID } from '../prompts/style-library.js';
2
3
  import { discoverGuides, guideCatalog } from '../prompts/guide-discovery.js';
3
4
  import { retrieveGuide } from '../prompts/guide-retrieval.js';
4
- import { MINIMAX_MAX_REFERENCE, minimaxMaxReferenceTokens, MODEL_CAPABILITIES, GPT_QUALITY_TIERS, DEFAULT_GPT_QUALITY, GPT_BACKGROUNDS } from '../prompts/model-capabilities.js';
5
+ import { MINIMAX_MAX_REFERENCE, minimaxMaxReferenceTokens, MODEL_CAPABILITIES, RETIRED_MODELS, retiredModelOfKey, GPT_QUALITY_TIERS, DEFAULT_GPT_QUALITY, GPT_BACKGROUNDS } from '../prompts/model-capabilities.js';
5
6
  // Operations layer — the ONE place every Slates agent tool is defined.
6
7
  // Both the MCP server and the CLI register these as their tool / command
7
8
  // surface. Every operation:
@@ -18,6 +19,7 @@ import { SlatesCloudClient, SlatesCloudHttpError } from '../clients/cloud.js';
18
19
  import { SlatesDesktopClient } from '../clients/desktop.js';
19
20
  import { BlenderBridgeClient, BLENDER_SETUP_HINT, RENDER_TIMEOUT_MS } from '../clients/blender.js';
20
21
  import { SKILLS } from '../skills/content.js';
22
+ import { HYPERFRAMES_MAPPING, findHyperframesGuide, hyperframesCard, hyperframesCatalog, hyperframesFilesOf, hyperframesGuideHeader, hyperframesSkillBodies, loadHyperframes } from '../skills/hyperframes.js';
21
23
  import { appManualIndex, appManualSections } from '../manual/index.js';
22
24
  // Reference-capacity prose is DERIVED, never hand-typed — root CLAUDE.md:
23
25
  // "never hand-type a fact an LLM will read". These helpers read MODEL_FACTS.
@@ -77,6 +79,32 @@ export class OperationCancelledError extends Error {
77
79
  super(`Cancelled by the user${detail ? ` — ${detail}` : ''}.`);
78
80
  }
79
81
  }
82
+ /**
83
+ * A generation refused because this session has not read its model's guide.
84
+ * Eric, 2026-10-23, after a Seedance test was prompted before its guide was
85
+ * read: *"That needs to be a hard blocker."* Nothing was generated or charged.
86
+ */
87
+ export class GuideNotReadError extends Error {
88
+ model;
89
+ guide;
90
+ code = 'GUIDE_NOT_READ';
91
+ constructor(model, guide) {
92
+ super(`Refused: this session has not read ${guide}, the guide for ${model}. Nothing was generated or charged. ` +
93
+ `Call slates_get_prompting_guide with topic "${guide}", rewrite the prompt against it, then call this again. Its card:
94
+
95
+ ` +
96
+ describeCraftCard(guide));
97
+ this.model = model;
98
+ this.guide = guide;
99
+ }
100
+ }
101
+ /** Refuse the generation when the session keeps a ledger and `model`'s guide is not in it. A seat with no model id names its guide. */
102
+ function requireGuideRead(ctx, model, guide = model ? resolveGuideTopic(model) : null) {
103
+ if (!ctx?.guidesRead || !model)
104
+ return;
105
+ if (guide && !ctx.guidesRead.has(guide))
106
+ throw new GuideNotReadError(model, guide);
107
+ }
80
108
  /** Throw if the caller has cancelled. Call between billable items, never inside one. */
81
109
  function throwIfCancelled(ctx, detail) {
82
110
  if (ctx.signal?.aborted)
@@ -123,6 +151,8 @@ const CENTS_PER_CREDIT = 3; // peg: 1 credit = 3¢ billed = 2¢ COGS (mirror of
123
151
  * desktop loop imports it instead of declaring its own.
124
152
  */
125
153
  export const DEVIATION_FACTOR = 1.2;
154
+ /** For an asset param that takes a UUID only (no resolveAssetRefs in its run). */
155
+ const ASSET_UUID_ONLY = 'Asset UUID, not a badge code: pass the code to slates_list_assets as search to resolve it.';
126
156
  /**
127
157
  * The confirm-gate sentence, rendered ONCE from CONFIRM_CREDITS.
128
158
  *
@@ -134,7 +164,17 @@ export const DEVIATION_FACTOR = 1.2;
134
164
  // The consent half rides every generation tool because a host may drop the
135
165
  // server instructions: Codex CLI 0.159.1 passed none to the model (probes
136
166
  // 2026-09-30 and 2026-10-02), so a small spend had no approval rule in view.
137
- const CONFIRM_GATE_SENTENCE = `Show the user the estimate and wait for their OK before any generation, however small. Cost above ${CONFIRM_CREDITS} credits (and, on image and video, any attached reference) also returns requires_confirm — pass confirm=true only to relay that OK.`;
167
+ //
168
+ // `alsoWhen` names a second trigger, only on an op whose run gates on it.
169
+ const confirmGateSentence = (alsoWhen) => `Show the user the estimate and wait for their OK before any generation, however small. Cost above ${CONFIRM_CREDITS} credits${alsoWhen ? `, or ${alsoWhen},` : ''} also returns requires_confirm — pass confirm=true only to relay that OK.`;
170
+ const CONFIRM_GATE_SENTENCE = confirmGateSentence();
171
+ /** Longest source clip motion transfer reads, by characterOrientation: the run bills at most this. */
172
+ const MOTION_TRANSFER_MAX_SECONDS = { video: 30, image: 10 };
173
+ const STYLE_DESCRIBE = (omitted) => `Art style. ${omitted} Canonical styles: ${STYLE_LIBRARY.filter((s) => s.id !== DEFAULT_STYLE_ID).map((s) => s.id).join(', ')}. Or pass any free-text instruction, e.g. 'turn this into a real person'.`;
174
+ /** The character, location and look ops read and write Library items (slate routes-library.ts); new work uses the Library op named. */
175
+ const LIBRARY_TWIN = (op, does) => ` These are Library items: ${op} ${does}.`;
176
+ /** The confirm param, one wording: it relays the user's OK of a quoted spend. */
177
+ const CONFIRM_PARAM = `Set true only to relay the user's explicit OK of this exact spend.`;
138
178
  // Declared HERE, above every op, because `slates_estimate_generation_cost`
139
179
  // renders them into its `duration` description at MODULE LOAD — a const
140
180
  // declared below the first schema that reads it is a temporal-dead-zone
@@ -293,7 +333,7 @@ function backgroundSubmitted(kind, ids, extra, note) {
293
333
  // ── Workspace + identity ────────────────────────────────────────
294
334
  export const getWorkspaceState = {
295
335
  id: 'slates_get_workspace_state',
296
- description: 'Snapshot of the user\'s Slates workspace: the project list (most recent first) plus the active project in full when you name one.',
336
+ description: 'Snapshot of the user\'s Slates workspace: the project list (most recent first) plus the active project in full when you name one. It also returns generationDefaults (the default image and video model and image settings) for when the user states no preference.',
297
337
  input: z.object({
298
338
  projectId: z.string().optional(),
299
339
  limit: z.number().int().min(1).max(200).optional().describe('How many projects to list, newest first. Default 40.'),
@@ -335,6 +375,17 @@ export const getWorkspaceState = {
335
375
  });
336
376
  },
337
377
  };
378
+ const clipName = (c) => c.code ?? c.label ?? 'a clip';
379
+ /** "here" and "this" on the timeline, in one line: the playhead, the clips under it and the words spoken there. */
380
+ function describePlace(t) {
381
+ const under = t.underPlayhead.map(clipName);
382
+ const words = t.underPlayhead.map((c) => c.words).find(Boolean);
383
+ return (`On the timeline "${t.name}" the playhead is at ${t.playhead.timecode}` +
384
+ (under.length ? `, over ${under.join(', ')}` : ', over no clip') +
385
+ (t.selectedClips.length ? `; selected clips: ${t.selectedClips.map(clipName).join(', ')}` : '') +
386
+ (words ? `; spoken around it: "${words}"` : '') +
387
+ '.');
388
+ }
338
389
  /**
339
390
  * What the user has selected in the app RIGHT NOW. The selection band in every
340
391
  * grid (images, clips, audio, storyboard shots) reports its ids to the desktop,
@@ -346,7 +397,7 @@ export const getSelection = {
346
397
  description:
347
398
  // Lean on purpose: WHEN to call it is the doctrine's ASSET CODES line, and
348
399
  // this description is paid on every desktop turn (lockstep § 7).
349
- 'The user\'s live selection in the Slates app: ticked cards (with codes) and the image open in the viewer.',
400
+ 'The user\'s live selection in the Slates app: ticked cards (with codes), the image open in the viewer, and where they are on the open timeline (playhead, selected clips, the clips under the playhead and the words spoken there).',
350
401
  input: z.object({}).strict(),
351
402
  async run(_input, ctx) {
352
403
  await ctx.desktop().requireCapability('selection', 'reading the live selection');
@@ -370,6 +421,9 @@ export const getSelection = {
370
421
  }
371
422
  if (viewed)
372
423
  lines.push(`Open in the viewer: ${describe(viewed)}.`);
424
+ const place = r.timeline ?? null;
425
+ if (place)
426
+ lines.push(describePlace(place));
373
427
  if (lines.length === 0) {
374
428
  lines.push('Nothing is selected and no image is open in the viewer. Ask the user to select the cards in Slates (click or drag), or to name the codes.');
375
429
  }
@@ -388,6 +442,7 @@ export const getSelection = {
388
442
  viewing: viewed
389
443
  ? { project_id: r.viewing.projectId, item: viewed, updated_at: r.viewing.updatedAt }
390
444
  : null,
445
+ timeline: place,
391
446
  },
392
447
  };
393
448
  },
@@ -433,6 +488,8 @@ export const setSelection = {
433
488
  const VIEW_LENSES = ['board', 'media', 'script'];
434
489
  const VIEW_CUT_SIDES = ['bottom', 'left', 'right'];
435
490
  const VIEW_DOCK_SECTIONS = ['storyboards', 'library', 'folders', 'pinned'];
491
+ // W3: the one window's two layouts (`WINDOW_LAYOUTS`).
492
+ const VIEW_WINDOW_LAYOUTS = ['plan', 'edit'];
436
493
  // 1.6.1: what the user is looking at. Mirrors slate's `@shared/types/view` (lockstep check 12).
437
494
  const VIEW_BOARD_LEVELS = ['film', 'scenes', 'shot'];
438
495
  const VIEW_BOARD_FILTERS = ['all', 'with-clip', 'without-clip'];
@@ -440,6 +497,33 @@ const VIEW_MEDIA_TABS = ['all', 'images', 'videos', 'audio'];
440
497
  const VIEW_SETTINGS_PANES = ['account', 'ai', 'storage', 'logs', 'general', 'keys'];
441
498
  /** What each dock section is called on screen. */
442
499
  const DOCK_SECTION_NAMES = { storyboards: 'Boards', library: 'Library', folders: 'Folders', pinned: 'Pinned' };
500
+ // Delivery ids and dimensions come from the desktop catalog, not model capabilities.
501
+ const deliveryAspectInput = z.string().min(1).describe('Delivery format id from slates_get_variant_grid.formats; the desktop validates it and supplies dimensions.');
502
+ const gridSelectionInput = z.object({ rowKeys: z.array(z.string()), aspects: z.array(deliveryAspectInput) }).strict();
503
+ const deliveryInput = z.object({
504
+ formats: z.array(deliveryAspectInput).min(1),
505
+ shortSide: z.number().int().positive().optional().describe('Optional short side supported by the desktop delivery settings.'),
506
+ mode: z.enum(['fill', 'fit']).optional().describe('Fill crops around focus; fit pads the frame.'),
507
+ }).strict();
508
+ const taxonomyInput = z.object({
509
+ concept: z.string().min(1), variant: z.string().min(1),
510
+ hook: z.string().optional(), body: z.string().optional(), cast: z.string().optional(),
511
+ vf: z.string().optional(), icp: z.string().optional(), lp: z.string().optional(),
512
+ }).strict().describe('Naming fields. Prefill recorded variation choices by position, never infer them from labels. The desktop owns filename formatting and collision resolution.');
513
+ const slotBindingInput = z.object({
514
+ key: z.string(), label: z.string().optional(), choicePosition: z.number().int().nonnegative().optional(),
515
+ sectionId: z.string().optional(), alternativeId: z.string().optional(), shotIds: z.array(z.string().uuid()).optional().describe('Shot ids (UUIDs only, from slates_list_shots).'),
516
+ }).strict();
517
+ const gridBindingInput = z.object({
518
+ familyId: z.string(), variationId: z.string().nullable().optional(),
519
+ slots: z.object({ hook: slotBindingInput.optional(), body: slotBindingInput.optional(), endCard: slotBindingInput.optional() }).strict().optional(),
520
+ intendedShotIds: z.array(z.string().uuid()).optional().describe('Shot ids (UUIDs only, from slates_list_shots).'),
521
+ }).strict().describe('Explicit existing-cut slot bindings; creates no combinations or nested sequences.');
522
+ const cutOptionsInput = {
523
+ delivery: deliveryInput.nullable().optional().describe('Delivery formats and framing defaults; null restores legacy Master export.'),
524
+ taxonomy: taxonomyInput.nullable().optional(),
525
+ gridBinding: gridBindingInput.nullable().optional(),
526
+ };
443
527
  /** 1.6.1: what the user is looking at, in the words on screen. Empty parts are left out. */
444
528
  const describeLooking = (v) => {
445
529
  const parts = [];
@@ -484,21 +568,30 @@ const describeLooking = (v) => {
484
568
  return parts.length ? ' ' + parts.join(' ') : '';
485
569
  };
486
570
  const describeView = (v) => {
487
- const where = v.cut.full
488
- ? 'filling the workspace'
489
- : v.cut.open
490
- ? v.cut.side === 'bottom'
491
- ? `a ${v.cut.height}px band under the ${v.lens} tab`
492
- : `a ${v.cut.width}px column on the ${v.cut.side} of the ${v.lens} tab`
493
- : 'closed, resting as one line at the bottom';
571
+ const under = v.window ? 'along the bottom of the window' : `under the ${v.lens} tab`;
572
+ const where = v.window && !v.window.timeline
573
+ ? 'hidden'
574
+ : v.cut.full
575
+ ? 'filling the workspace'
576
+ : v.cut.open
577
+ ? v.cut.side === 'bottom'
578
+ ? `a ${v.cut.height}px band ${under}`
579
+ : `a ${v.cut.width}px column on the ${v.cut.side} of the ${v.lens} tab`
580
+ : 'closed, resting as one line at the bottom';
581
+ const areas = v.window
582
+ ? [v.window.lens && `the ${v.lens} tab`, v.window.viewer && 'the Viewer', v.window.inspector && (v.window.inspector === 'column' ? 'the Inspector drawer open' : 'the Inspector drawer shut for want of room'), v.window.timeline && 'the timeline'].filter(Boolean)
583
+ : [];
494
584
  const agent = v.studioAgent.enabled
495
585
  ? v.studioAgent.open
496
- ? `the Studio Agent panel is open (${v.studioAgent.width}px)`
497
- : 'the Studio Agent panel is closed'
498
- : 'the Studio Agent is switched off in Settings';
499
- return (`The ${v.lens} tab is showing. The timeline is ${where}. ` +
586
+ ? `the Slates Director panel is open (${v.studioAgent.width}px)`
587
+ : 'the Slates Director panel is closed'
588
+ : 'Slates Director is switched off in Settings';
589
+ return (`The ${v.lens} tab is ${v.window && !v.window.lens ? 'hidden' : 'showing'}. The timeline is ${where}. ` +
500
590
  `The project navigator is ${v.leftDock.open ? `open (${v.leftDock.width}px)` : 'closed'}, and ${agent}.` +
501
591
  (v.leftDock.folded?.length ? ` Folded in the navigator: ${v.leftDock.folded.map((f) => DOCK_SECTION_NAMES[f] ?? f).join(', ')}.` : '') +
592
+ (v.window
593
+ ? ` The window is in the ${v.window.layout === 'edit' ? 'Edit' : 'Plan'} layout, showing ${areas.length > 1 ? `${areas.slice(0, -1).join(', ')} and ${areas.at(-1)}` : areas[0] ?? 'none of its areas'}.`
594
+ : '') +
502
595
  (v.script ? ` The Script page shows ${v.script.details ? 'Words + shots (each shot\'s picture beside its words)' : 'Words (the words alone)'}.` : '') +
503
596
  describeLooking(v));
504
597
  };
@@ -509,7 +602,7 @@ const describeView = (v) => {
509
602
  */
510
603
  export const getView = {
511
604
  id: 'slates_get_view',
512
- description: "What the user is looking at in Slates: Home or a project, the tab (Media, Script or Board), the open board and its View and Filter, Media's tab, chosen folder and narrowing, a Library page, the picture viewer, the timeline Viewer's mode and clip, Compare, the animatic, Settings, whether the prompt box is hidden, the timeline and the side panels, and any dialog or menu open over the page. Read it before telling the user where to click.",
605
+ description: "What the user is looking at in Slates: Home or a project, the tab (Media, Script or Board), the open board and its View and Filter, Media's tab, chosen folder and narrowing, a Library page, the picture viewer, the timeline Viewer's mode and clip, Compare, the animatic, Settings, whether the prompt box is hidden, the timeline and the side panels, and, from a desktop with the one-window layout, the window's layout (Plan or Edit, which areas show, the Viewer's Inspector drawer open or shut for want of room), and any dialog or menu open over the page. New desktops also report cut.format and the selected variant grid rows and aspects. Read it before telling the user where to click.",
513
606
  input: z.object({}).strict(),
514
607
  async run(_input, ctx) {
515
608
  await ctx.desktop().requireCapability('view', 'the window layout');
@@ -537,7 +630,7 @@ export const getView = {
537
630
  */
538
631
  export const setView = {
539
632
  id: 'slates_set_view',
540
- description: "Change what the user is looking at, as their own clicks would: open a project or go Home, switch tab, open a board, jump to a scene, set the Board's View and Filter, set Media's tab, folder and narrowing, jump to a card in Media, open a Library page, a picture in the picture viewer or a clip in the timeline's Viewer, Compare, the animatic or Settings on a pane, show or hide the prompt box, open or park the timeline or switch the cut on it, open a Shot's panel on Script. Only the fields you name change; the app clamps sizes, answers with what it settled on, and names any field it could not apply. A project change is applied alone (it restores that project's own view). Use it when the user asks you to show or open something, not to answer a question they can see for themselves.",
633
+ description: "Change what the user is looking at, as their own clicks would: open a project or go Home, switch tab, open a board, jump to a scene, set the Board's View and Filter, set Media's tab, folder and narrowing, jump to a card in Media, open a Library page, a picture in the picture viewer or a clip in the timeline's Viewer, Compare, the animatic or Settings on a pane, show or hide the prompt box, open or park the timeline or switch the cut on it, open a Shot's panel on Script, set the side panels (the project navigator and its folded sections, the Slates Director panel), the Script page's Words or Words + shots and its text size, the Board's card size and linked clips, and on a desktop with the one-window layout the layout and which areas show. Only the fields you name change; the app clamps sizes, answers with what it settled on, and names any field it could not apply. A project change is applied alone (it restores that project's own view). Use it when the user asks you to show or open something, not to answer a question they can see for themselves.",
541
634
  input: z
542
635
  .object({
543
636
  projectId: z.string().nullable().optional().describe('Open this project, or null for Home. Applied alone.'),
@@ -549,10 +642,12 @@ export const setView = {
549
642
  side: z
550
643
  .enum(VIEW_CUT_SIDES)
551
644
  .optional()
552
- .describe('Where the timeline is parked. A column suits a wide monitor; picking a side opens the timeline.'),
645
+ .describe('Where the timeline is parked; picking a side opens the timeline. On a desktop with the one-window layout it always runs along the bottom: another side comes back as a note and is not applied.'),
553
646
  height: z.number().optional().describe("The bottom band's height in px."),
554
- width: z.number().optional().describe("The side column's width in px."),
647
+ width: z.number().optional().describe("The side column's width in px; with the one-window layout, the Viewer's width in the Plan layout."),
555
648
  timelineId: z.string().optional().describe('The named cut to show on the timeline (slates_list_timelines).'),
649
+ format: deliveryAspectInput.optional().describe('Preview this delivery format; requires ad-variant-export.'),
650
+ gridSelection: gridSelectionInput.optional().describe('Selected existing grid rows and delivery formats; requires ad-variant-export. Does not export.'),
556
651
  })
557
652
  .strict()
558
653
  .optional(),
@@ -575,7 +670,7 @@ export const setView = {
575
670
  })
576
671
  .strict()
577
672
  .optional()
578
- .describe('The Studio Agent panel on the right. It cannot be opened while the agent is off in Settings.'),
673
+ .describe('The Slates Director panel on the right. It cannot be opened while the agent is off in Settings.'),
579
674
  script: z
580
675
  .object({
581
676
  details: z.boolean().optional().describe("Words + shots (true): each shot's picture beside its words on the Script page. Words (false): the words alone."),
@@ -621,6 +716,16 @@ export const setView = {
621
716
  animatic: z.object({ open: z.boolean(), fromShotId: z.string().optional() }).strict().optional().describe('Play the board as a rough cut from a Shot (the Board or Script tab must be showing).'),
622
717
  settings: z.object({ open: z.boolean(), pane: z.enum(VIEW_SETTINGS_PANES).optional() }).strict().optional().describe('Open Settings, on a pane (ai is AI tools, keys is API keys).'),
623
718
  composer: z.object({ open: z.boolean() }).strict().optional().describe('Show or hide the prompt box.'),
719
+ window: z
720
+ .object({
721
+ layout: z.enum(VIEW_WINDOW_LAYOUTS).optional().describe('edit gives the Viewer the room, with Media, Board and Script a column at its left; plan gives it to them, with the Viewer a column at their right.'),
722
+ viewer: z.boolean().optional().describe('Show or hide the Viewer.'),
723
+ inspector: z.boolean().optional().describe("Open or shut the Inspector, the Viewer's drawer (opening it shows the Viewer); in a window with no room, Media, Board and Script fold to make room."),
724
+ lensWidth: z.number().optional().describe("The Media, Board and Script column's width in px in the Edit layout."),
725
+ })
726
+ .strict()
727
+ .optional()
728
+ .describe('The one window (desktops with it): its layout and which areas show.'),
624
729
  })
625
730
  .strict(),
626
731
  async run(input, ctx) {
@@ -636,6 +741,17 @@ export const setView = {
636
741
  input.script?.panelShotId !== undefined;
637
742
  if (widened)
638
743
  await ctx.desktop().requireCapability('view-v2', 'showing and opening things in the window');
744
+ if (input.cut?.format !== undefined || input.cut?.gridSelection !== undefined) {
745
+ await ctx.desktop().requireCapability('ad-variant-export', 'delivery preview and variant grid selection');
746
+ }
747
+ // A desktop from before the one window has no capability token for it, and refuses a patch holding only
748
+ // `window` as empty; its view report has no `window`, so read that first.
749
+ if (input.window !== undefined && Object.entries(input).every(([k, v]) => k === 'window' || v === undefined)) {
750
+ const current = await ctx.desktop().get('/agent/view');
751
+ if (current.view && current.view.window === undefined) {
752
+ return { text: 'Nothing was changed: this Slates has no one-window layout; update Slates.', data: { view: current.view } };
753
+ }
754
+ }
639
755
  const r = await ctx.desktop().post('/agent/view', input);
640
756
  if (!r.view) {
641
757
  return { text: r.reason ? `Nothing was changed (${r.reason}).` : 'Nothing was changed.', data: { view: null } };
@@ -644,7 +760,11 @@ export const setView = {
644
760
  const noFolds = input.leftDock?.folded !== undefined && r.view.leftDock.folded === undefined
645
761
  ? " This Slates cannot fold the navigator's sections; update Slates."
646
762
  : '';
647
- return { text: describeView(r.view) + noFolds, data: { view: r.view } };
763
+ // A desktop from before the one window takes the patch and ignores `window`.
764
+ const noWindow = input.window !== undefined && r.view.window === undefined
765
+ ? ' This Slates has no one-window layout, so window was not applied; update Slates.'
766
+ : '';
767
+ return { text: describeView(r.view) + noFolds + noWindow, data: { view: r.view } };
648
768
  },
649
769
  };
650
770
  /**
@@ -856,7 +976,7 @@ export const getUsage = {
856
976
  };
857
977
  export const getAppSettings = {
858
978
  id: 'slates_get_app_settings',
859
- description: "The app's own settings an agent may read: the app version, the projects folder, which tab a never-opened project lands on (newProjectLens), whether ChatGPT images is on, and (from Slates 1.6.1) who does the Studio Agent's thinking (studioAgentHost: slates, codex or claude) with each host's model and thinking level ('' is its default). Never keys or sign-in.",
979
+ description: "The app's own settings an agent may read: the app version, the projects folder, which tab a never-opened project lands on (newProjectLens), whether ChatGPT images is on, and (from Slates 1.6.1) who does Slates Director's thinking (studioAgentHost: slates, codex or claude) with each host's model and thinking level ('' is its default). Never keys or sign-in.",
860
980
  input: z.object({}).strict(),
861
981
  async run(_input, ctx) {
862
982
  await ctx.desktop().requireCapability('app-settings', 'app settings');
@@ -866,7 +986,7 @@ export const getAppSettings = {
866
986
  const HOST_KEYS = ['studioAgentHost', 'studioAgentCodexModel', 'studioAgentCodexEffort', 'studioAgentClaudeModel', 'studioAgentClaudeEffort'];
867
987
  export const setAppSettings = {
868
988
  id: 'slates_set_app_settings',
869
- description: "Change an app setting the user asked you to: newProjectLens (the tab a never-opened project lands on: media, script or board), chatGptImagesEnabled (Settings → AI tools → ChatGPT images), or who does the Studio Agent's thinking: studioAgentHost (slates, codex for the user's own Codex on their ChatGPT plan, claude for their own Claude Code on their Claude plan) and each host's model and thinking level, ids from the host's own list or '' for its default. The projects folder, keys and sign-in are the user's to change.",
989
+ description: "Change an app setting the user asked you to: newProjectLens (the tab a never-opened project lands on: media, script or board), chatGptImagesEnabled (Settings → AI tools → ChatGPT images), or who does Slates Director's thinking: studioAgentHost (slates, codex for the user's own Codex on their ChatGPT plan, claude for their own Claude Code on their Claude plan) and each host's model and thinking level, ids from the host's own list or '' for its default. The projects folder, keys and sign-in are the user's to change.",
870
990
  input: z
871
991
  .object({
872
992
  newProjectLens: z.enum(['media', 'script', 'board']).optional(),
@@ -882,7 +1002,7 @@ export const setAppSettings = {
882
1002
  await ctx.desktop().requireCapability('app-settings', 'app settings');
883
1003
  // An older desktop has the route but not these keys: ask it by capability, so it says "update Slates".
884
1004
  if (HOST_KEYS.some((key) => input[key] !== undefined)) {
885
- await ctx.desktop().requireCapability('agent-host', "choosing who does the Studio Agent's thinking");
1005
+ await ctx.desktop().requireCapability('agent-host', "choosing who does Slates Director's thinking");
886
1006
  }
887
1007
  return ok(await ctx.desktop().post('/agent/app-settings', input));
888
1008
  },
@@ -913,9 +1033,67 @@ export const linkAssetSource = {
913
1033
  }));
914
1034
  },
915
1035
  };
1036
+ export const transcribeAsset = {
1037
+ id: 'slates_transcribe_asset',
1038
+ billable: false,
1039
+ description: "Transcribe a video or audio asset's speech into words timed to within a frame, as the card's Transcribe command does. Free: it runs on the user's machine and spends no credits. The first run downloads the speech models once (the result's downloadedModelsMB says how much) and can take minutes; if the call times out, the desktop keeps working, so read slates_get_asset_transcript before trying again. A repeat, or another asset with the same bytes, reuses the stored transcript (reused: true); force re-runs it, and an edited transcript (edited: true) is kept unless forced. noSpeech: true means the audio holds no speech. slates_add_captions transcribes on its own, so call this when you want the words themselves.",
1040
+ input: z
1041
+ .object({
1042
+ projectId: z.string().uuid(),
1043
+ assetId: z.string().min(1).describe('A video or audio asset: its code (VID-V3) or id.'),
1044
+ force: z.boolean().optional().describe('Transcribe again even when a stored transcript exists.'),
1045
+ })
1046
+ .strict(),
1047
+ async run(input, ctx) {
1048
+ await ctx.desktop().requireCapability('transcripts', 'transcripts');
1049
+ const id = (await resolveAssetRefs(ctx, input.projectId, [input.assetId])).get(input.assetId).id;
1050
+ const r = await ctx.desktop().post('/agent/assets/transcribe', { assetId: id, ...(input.force ? { force: true } : {}) });
1051
+ const what = r.noSpeech ? 'No speech in this asset.' : r.reused ? 'Reused the stored transcript.' : 'Transcribed.';
1052
+ const models = r.downloadedModelsMB ? ` Downloaded ${r.downloadedModelsMB} MB of speech models first.` : '';
1053
+ return ok(r, `${what}${models} ${JSON.stringify(r)}`);
1054
+ },
1055
+ };
1056
+ export const getAssetTranscript = {
1057
+ id: 'slates_get_asset_transcript',
1058
+ description: "Read an asset's stored transcript: its words with their times in the asset's own seconds, whether it holds speech, whether the user edited it, and when it was made. Never transcribes: transcript null with a hint means nobody has transcribed it yet (slates_transcribe_asset, free).",
1059
+ input: z
1060
+ .object({
1061
+ projectId: z.string().uuid(),
1062
+ assetId: z.string().min(1).describe('A video or audio asset: its code (VID-V3) or id.'),
1063
+ })
1064
+ .strict(),
1065
+ async run(input, ctx) {
1066
+ await ctx.desktop().requireCapability('transcripts', 'transcripts');
1067
+ const id = (await resolveAssetRefs(ctx, input.projectId, [input.assetId])).get(input.assetId).id;
1068
+ return ok(await ctx.desktop().get('/agent/assets/transcript', { assetId: id }));
1069
+ },
1070
+ };
1071
+ export const editAssetTranscript = {
1072
+ id: 'slates_edit_asset_transcript',
1073
+ billable: false,
1074
+ description: "Correct an asset's transcript by sending its whole text back, edited, as the transcript editor in the app does: a corrected word keeps its time, a removed word goes, and a new word takes time shared out from its neighbours (the silence between them, or the word before it). Paragraph breaks are free; only the words count. By default the captions heard from this asset are made again from the corrected words, on the same tracks in the same style (recaption false skips that); captions estimated from the Shot's line or written from your own words are left alone. Read the current text first with slates_get_asset_transcript. Free. The machine's own words stay stored, so slates_transcribe_asset with force starts fresh.",
1075
+ input: z
1076
+ .object({
1077
+ projectId: z.string().uuid(),
1078
+ assetId: z.string().min(1).describe('A video or audio asset with a transcript: its code (VID-V3) or id.'),
1079
+ text: z.string().min(1).describe('The whole transcript, edited. Words are separated by spaces or line breaks.'),
1080
+ recaption: z.boolean().optional().describe("Make this asset's captions again from the edited words. Default true."),
1081
+ })
1082
+ .strict(),
1083
+ async run(input, ctx) {
1084
+ await ctx.desktop().requireCapability('transcript-edit', 'transcript editing');
1085
+ const id = (await resolveAssetRefs(ctx, input.projectId, [input.assetId])).get(input.assetId).id;
1086
+ const r = await ctx.desktop().post('/agent/assets/transcript/edit', {
1087
+ assetId: id, text: input.text, ...(input.recaption === false ? { recaption: false } : {}),
1088
+ });
1089
+ const c = r.changed;
1090
+ const summary = { assetId: id, changed: c, recaptioned: r.recaptioned };
1091
+ return ok(summary, `Saved: ${c.corrected} corrected, ${c.added} added, ${c.removed} removed.${r.recaptioned.length ? ` Remade ${r.recaptioned.length} caption clip${r.recaptioned.length === 1 ? '' : 's'}: ${r.recaptioned.join(', ')}.` : ''}`);
1092
+ },
1093
+ };
916
1094
  export const extractVideoFrame = {
917
1095
  id: 'slates_extract_video_frame',
918
- description: "Save one frame of a clip as a new picture in Media, as the clip card's camera does: at 'first', 'last' (default 'first') or a second. Free. The usual continuity move: extract a clip's last frame and use it as the next clip's first frame.",
1096
+ description: "Save one frame of a clip as a new picture in Media, as the clip card's camera does: at 'first', 'last' (default 'first') or a second. Free. The usual continuity move: extract a clip's last frame and use it as the next clip's first frame. To only look at a clip, use slates_get_asset_video_frames; this one adds a picture to the project.",
919
1097
  input: z
920
1098
  .object({
921
1099
  projectId: z.string().uuid(),
@@ -940,7 +1118,7 @@ export const getMe = {
940
1118
  };
941
1119
  export const getCreditBalance = {
942
1120
  id: 'slates_get_credit_balance',
943
- description: 'Current Slates credit balance (abstract credits — never expire). Call before any generation that costs credits.',
1121
+ description: 'Current credit balance only (credits never expire); slates_get_me also returns identity and license tier. Read it to answer a balance question or to check there is enough for a quoted total.',
944
1122
  input: z.object({}).strict(),
945
1123
  async run(_input, ctx) {
946
1124
  const r = await ctx.cloud().get('/api/agent/credits/balance');
@@ -956,7 +1134,8 @@ export const listAvailableModels = {
956
1134
  }),
957
1135
  async run(input, ctx) {
958
1136
  const r = await ctx.cloud().get('/api/agent/models');
959
- let models = r.models;
1137
+ // The server keeps a retired seat's keys for older desktops; an agent is never offered them.
1138
+ let models = r.models.filter((m) => !retiredModelOfKey(m.model));
960
1139
  if (input.filter) {
961
1140
  const q = input.filter.toLowerCase();
962
1141
  models = models.filter((m) => m.model.toLowerCase().includes(q));
@@ -964,16 +1143,16 @@ export const listAvailableModels = {
964
1143
  // Compact text table — "key credits" lines are ~5x denser than the raw
965
1144
  // JSON registry (the full pretty-printed dump was an ~8k-token leak).
966
1145
  const table = models.map((m) => `${m.model} ${creditCost(m)}`).join('\n');
967
- return {
968
- text: `${models.length} COST keys (credits per generation)${input.filter ? ` matching "${input.filter}"` : ''}. ` +
969
- `NOTE: these are billing keys for cost lookup ONLY — the \`model\` param on the generate ops takes a BASE id. ` +
970
- // Derived from the SSOT arrays, not restated: a hand-written list here
971
- // drifts the moment a model lands (it already omitted omni-flash).
972
- `slates_generate_video: ${VIDEO_MODELS.join(' | ')} (duration/videoResolution as separate params). ` +
973
- `slates_generate_audio: ${AUDIO_MODELS.join(' | ')} (durationSeconds as a separate param):\n` +
974
- table,
975
- data: { count: models.length },
976
- };
1146
+ const text = `${models.length} COST keys (credits per generation)${input.filter ? ` matching "${input.filter}"` : ''}. ` +
1147
+ `NOTE: these are billing keys for cost lookup ONLY — the \`model\` param on the generate ops takes a BASE id. ` +
1148
+ // Derived from the SSOT arrays, not restated: a hand-written list here
1149
+ // drifts the moment a model lands (it already omitted omni-flash).
1150
+ `slates_generate_video: ${VIDEO_MODELS.join(' | ')} (duration/videoResolution as separate params). ` +
1151
+ `slates_generate_audio: ${AUDIO_MODELS.join(' | ')} (durationSeconds as a separate param):\n` +
1152
+ table;
1153
+ // The whole text rides in `data` too: the MCP server mirrors `data` as structuredContent, and a host that
1154
+ // shows only structuredContent (Claude Code) otherwise hands the model `{count}` and no prices (2026-10-18).
1155
+ return { text, data: { count: models.length, text } };
977
1156
  },
978
1157
  };
979
1158
  // ── Video model vocabulary ──────────────────────────────────────
@@ -996,7 +1175,17 @@ export const VIDEO_MODELS = [
996
1175
  // not here; edit models live on slates_edit_video, same as the Kling and Omni
997
1176
  // Flash ones.
998
1177
  'seedance-2.5',
1178
+ // Gemini Omni Flash, version 1.1 since 2026-10-17: swapped in place, same id,
1179
+ // fal's `google/gemini-omni-flash/v1.1/*` endpoints.
999
1180
  'omni-flash',
1181
+ // Wan 3.0 (Alibaba, added 2026-10-17): 2-30s at 480p-1080p, sound on or off,
1182
+ // start and end frames OR references (10 images, 5 videos, 5 audio clips).
1183
+ // Reference video seconds bill on top of output seconds, so it has a vref key.
1184
+ 'wan-3.0',
1185
+ // Kling 4.0 (added 2026-10-23 beside 3.0, which stays the default Kling):
1186
+ // one row with no Standard/Pro split, frames or text only, sound always on.
1187
+ // `kling-v4.0` never starts with `kling-v3.0`, so no 3.0 branch can take it.
1188
+ 'kling-v4.0',
1000
1189
  // MiniMax H3, three seats in one family. Base H3 (2026-08-27) is the
1001
1190
  // AUTHORED-AUDIO seat — three directable sound layers in one pass, declared
1002
1191
  // reference relationships, 480p to 4K. H3 Max (2026-08-27) is fal's
@@ -1013,7 +1202,7 @@ export const VIDEO_MODELS = [
1013
1202
  'minimax-h3-max',
1014
1203
  'minimax-h3-max-turbo',
1015
1204
  // LTX-2.5, two seats in one family (2026-08-29). Base is the VOLUME seat —
1016
- // cheapest 1080p second with sound included, free native audio at every tier,
1205
+ // cheapest native 1080p second with sound included, free native audio at every tier,
1017
1206
  // the only row reaching 1440p, and clips up to 20s.
1018
1207
  // Pro is the fidelity seat and is NOT a superset: shorter ladder (no
1019
1208
  // 1440p/4K), shorter clips (6/8/10 only) and ~1/3 dearer.
@@ -1041,8 +1230,10 @@ const VIDEO_ASPECT_RATIOS = aspectRatioUnion(VIDEO_MODELS, AGENT_ROUTE_PROVIDER)
1041
1230
  const VIDEO_RESOLUTIONS = videoResolutionUnion(VIDEO_MODELS);
1042
1231
  /** Widest legal duration window across every video model. */
1043
1232
  const VIDEO_DURATION_BOUNDS = durationBounds(VIDEO_MODELS);
1044
- /** Omni Flash's combined reference-image cap, read from the SSOT (7). */
1233
+ /** Omni Flash's combined reference-image cap, read from the SSOT (10 on 1.1). */
1045
1234
  const omniFlashRefCap = getModelCapability('omni-flash')?.maxIngredientImages ?? 0;
1235
+ /** Omni Flash's per-clip reference-video ceiling in seconds, read from the SSOT. */
1236
+ const omniFlashRefClipMax = getModelCapability('omni-flash')?.referenceVideoDuration?.max ?? 0;
1046
1237
  /** Every resolution token any video model speaks, for the forgiving cost-key
1047
1238
  * parser. Derived, so 768p and 2k arrived with the models rather than with a
1048
1239
  * later bug report. */
@@ -1086,6 +1277,9 @@ const MINIMAX_FREE_REF_IMAGES_BY_MODEL = {
1086
1277
  * in slate/src/shared/pricing.ts.
1087
1278
  */
1088
1279
  const LTX_MODELS = new Set(['ltx-2-5', 'ltx-2-5-pro']);
1280
+ /** Max billed seconds on a Wan 3.0 take: 30s of output plus 15s of reference
1281
+ * video, which fal bills "in addition to output duration". */
1282
+ const WAN_3_VREF_MAX_TOTAL = 45;
1089
1283
  /** K for the `-ref{K}` suffix: images past the free five, capped by the model's
1090
1284
  * own declared ceiling. 0 for h3-max (no reference transport) and for anything
1091
1285
  * that is not a MiniMax row. Mirrors refImageSurchargeCount() in
@@ -1116,6 +1310,13 @@ export const EDIT_VIDEO_MODELS = [
1116
1310
  'omni-flash-edit',
1117
1311
  'seedance-2.5-edit',
1118
1312
  ];
1313
+ // The op's default, not MODEL_FACTS' edit tier default: the desktop route defaults to the same Kling
1314
+ // engine (slate routes.ts, /agent/generation/edit-video), so moving it is a two-repo change.
1315
+ const EDIT_VIDEO_DEFAULT = 'kling-v3.0-omni-edit';
1316
+ /** The edit engines that take character and style references (elements); the run refuses them on the rest. */
1317
+ const EDIT_VIDEO_ELEMENT_MODELS = EDIT_VIDEO_MODELS.filter((m) => (getModelCapability(m)?.maxIngredientImages ?? 0) > 0);
1318
+ const EDIT_VIDEO_ELEMENT_CAP = Math.max(...EDIT_VIDEO_ELEMENT_MODELS.map((m) => getModelCapability(m)?.maxIngredientImages ?? 0));
1319
+ const EDIT_VIDEO_ELEMENTS_ONLY = `Only ${EDIT_VIDEO_ELEMENT_MODELS.join(' and ')} take them; the other engines refuse them.`;
1119
1320
  /**
1120
1321
  * Source-clip length an edit engine accepts, read from the SSOT.
1121
1322
  *
@@ -1131,14 +1332,14 @@ function editClipBounds(model) {
1131
1332
  throw new Error(`editClipBounds: no duration capability for "${model}"`);
1132
1333
  return { min: d.min, max: d.max };
1133
1334
  }
1134
- /** Resolutions any edit engine exposes as a PARAM. Only Seedance's edit price
1135
- * moves with resolution; the Kling and Omni Flash rows are fixed to the source. */
1136
- const EDIT_VIDEO_RESOLUTIONS = videoResolutionUnion(['seedance-2.5-edit']);
1335
+ /** Resolutions any edit engine exposes as a PARAM. Seedance's and Omni Flash
1336
+ * 1.1's edit prices move with resolution; the Kling rows follow the source. */
1337
+ const EDIT_VIDEO_RESOLUTIONS = videoResolutionUnion(['seedance-2.5-edit', 'omni-flash-edit']);
1137
1338
  export const estimateGenerationCost = {
1138
1339
  id: 'slates_estimate_generation_cost',
1139
- description: 'Quote credits before any generate_* op. Accepts the generation model ids and parameters (edit seats other than Kling, lip-sync and motion-transfer engines need an exact registry cost key), or an exact registry cost key. Pairs with the confirm gate.',
1340
+ description: 'Quote credits before any generate_* op. For saved Shots, a board or a scene, quote with slates_get_board_quote instead. Accepts the generation model ids and parameters (edit seats other than Kling, lip-sync and motion-transfer engines need an exact registry cost key), or an exact registry cost key. Show the user the total and wait for their OK before the generate call; the result flags requires_confirm above the threshold and carries the model\'s prompting card.',
1140
1341
  input: z.object({
1141
- model: z.string().describe('Base model id as passed to the generate op (e.g. "seedance-2", "kling-v3.0-std", "nano-banana-2") or an exact registry cost key ("nano-banana-2-2k", "seedance-2-1080p-8s")'),
1342
+ model: z.string().describe('Base model id as passed to the generate op (e.g. "seedance-2", "kling-v3.0-std", "nano-banana-2-1") or an exact registry cost key ("nano-banana-2-1-2k", "seedance-2-1080p-8s")'),
1142
1343
  quantity: z.number().int().min(1).max(10).optional().describe('Number of generations (default 1)'),
1143
1344
  // Video windows and resolutions GENERATED from MODEL_CAPABILITIES. The
1144
1345
  // hand-typed "Video 3-15" here was wrong the day seedance-2.5 (4-30s)
@@ -1154,17 +1355,23 @@ export const estimateGenerationCost = {
1154
1355
  videoResolution: zEnum(VIDEO_RESOLUTIONS).optional().describe('Video only. Omitted, each model quotes at its own default. Per-model ladders: see slates_generate_video\'s videoResolution.'),
1155
1356
  resolution: z.enum(['1k', '2k', '3k', '4k']).optional().describe('Image only. Omit for the model default; pass the same value to generation.'),
1156
1357
  quality: z.enum(GPT_QUALITY_TIERS).optional().describe(`GPT Image tier; default ${DEFAULT_GPT_QUALITY}.`),
1157
- aspectRatio: z.string().optional().describe('GPT Image only: 1:1, 4:3 and 3:4 cost more than 16:9.'),
1158
- sound: z.boolean().optional().describe('Kling 3.0: the audio flag changes the cost key. Omitted means sound on, as generation bills it; pass false to price a silent take. Kling 4K keys include audio.'),
1159
- seedanceFace: z.boolean().optional().describe('Seedance Face row, for an AI character\'s face (pricier key).'),
1358
+ aspectRatio: z.string().optional().describe('GPT Image: the frame shape changes the price; pass the generation\'s value.'),
1359
+ sound: z.boolean().optional().describe('Kling 3.0: a silent take prices differently from one with sound. Omitted means sound on, as generation bills it; pass false to price a silent take. Kling 4K keys include audio.'),
1360
+ seedanceFace: z.boolean().optional().describe('Seedance Face row, for an AI character\'s face.'),
1160
1361
  seedanceRealFace: z.boolean().optional().describe('Seedance with a consented real person (premium key).'),
1161
1362
  videoRefSeconds: z.number().nonnegative().optional().describe('Combined reference-video seconds, measured from the clips.'),
1162
1363
  audioRefSeconds: z.number().nonnegative().optional().describe('Combined reference-audio seconds, including attached character voices.'),
1163
1364
  referenceImages: z.number().int().min(0).optional().describe(`MiniMax H3 rows only — how many reference IMAGES the generation will carry. Each image past the row's free allowance is a paid dimension of the cost key, so a quote that omits this UNDER-REPORTS a reference-heavy job. The allowances differ: minimax-h3 gives ${MINIMAX_FREE_REF_IMAGES_BY_MODEL['minimax-h3']} free, minimax-h3-max gives ${MINIMAX_FREE_REF_IMAGES_BY_MODEL['minimax-h3-max']}. Ignored by every other model. Start/end frames are free on both rows and are not reference images.`),
1164
1365
  }),
1165
1366
  async run(input, ctx) {
1367
+ // A retired seat is never quoted: its keys still bill older desktops, and `nano-banana-2-1k` (the
1368
+ // retired Nano Banana 2 at 1K) would otherwise answer an agent that meant Nano Banana 2.1.
1369
+ const retired = retiredModelOfKey(input.model);
1370
+ if (retired) {
1371
+ throw new Error(`${retired} was retired and ${RETIRED_MODELS[retired]} replaced it. Quote ${RETIRED_MODELS[retired]} with the same parameters.`);
1372
+ }
1166
1373
  const registry = await ctx.cloud().get('/api/agent/models');
1167
- const byKey = new Map(registry.models.map((m) => [m.model, creditCost(m)]));
1374
+ const byKey = new Map(registry.models.filter((m) => !retiredModelOfKey(m.model)).map((m) => [m.model, creditCost(m)]));
1168
1375
  // 1) exact registry cost key
1169
1376
  let key = byKey.has(input.model) ? input.model : null;
1170
1377
  // 2) image base id + resolution (+ quality for GPT Image 2.5)
@@ -1356,7 +1563,7 @@ export const estimateGenerationCost = {
1356
1563
  // ── Projects ────────────────────────────────────────────────────
1357
1564
  export const listProjects = {
1358
1565
  id: 'slates_list_projects',
1359
- description: 'List all Slates projects in the desktop workspace.',
1566
+ description: 'Full records for every project in the desktop workspace, unbounded. To start a session use slates_get_workspace_state instead: the compact list, the active project and generation defaults.',
1360
1567
  input: z.object({}).strict(),
1361
1568
  async run(_input, ctx) {
1362
1569
  const r = await ctx.desktop().get('/agent/projects');
@@ -1365,7 +1572,7 @@ export const listProjects = {
1365
1572
  };
1366
1573
  export const createProject = {
1367
1574
  id: 'slates_create_project',
1368
- description: 'Create a new Slates project. Returns the new project record.',
1575
+ description: 'Create a new Slates project, only when the user asks for one; otherwise work in the current project (slates_get_workspace_state). Returns the new project record.',
1369
1576
  input: z.object({ name: z.string().min(1).max(120) }),
1370
1577
  async run(input, ctx) {
1371
1578
  const r = await ctx.desktop().post('/agent/projects', { name: input.name });
@@ -1471,7 +1678,7 @@ function describeResolvedRefs(refInputs, resolved) {
1471
1678
  }
1472
1679
  export const listAssets = {
1473
1680
  id: 'slates_list_assets',
1474
- description: 'List assets in a Slates project as COMPACT rows (id, code, label, type) — newest first, default limit 50. Each asset carries its short code (IMG-A12 / VID-V3 / AUD-S1 — the badge the user sees on the gallery card) and label. When the user names an asset by code ("use IMG-A36 as the reference"), pass it as `search` to resolve the assetId. Always speak about assets by code + label, never by UUID. A favorited asset carries `isFavorite: true` (absent means not favorited). NOTE: generate_* results already return the new asset ids — do NOT call this to find an asset you just created.',
1681
+ description: 'List assets in a Slates project as compact rows (id, code, label, type) — newest first, default limit 50. Each asset carries its short code (IMG-A12 / VID-V3 / AUD-S1 — the badge the user sees on the gallery card) and label. When the user names an asset by code ("use IMG-A36 as the reference"), pass it as `search` to resolve the assetId. Always speak about assets by code + label, never by UUID. A favorited asset carries `isFavorite: true` (absent means not favorited). Generate results already return new asset ids, so do not list to find one you just created.',
1475
1682
  input: z.object({
1476
1683
  projectId: z.string().uuid(),
1477
1684
  type: z.enum(['image', 'video', 'audio']).optional().describe('Only this asset type'),
@@ -1508,7 +1715,7 @@ export const listAssets = {
1508
1715
  };
1509
1716
  export const getAssetImage = {
1510
1717
  id: 'slates_get_asset_image',
1511
- description: 'Read an asset image off disk and return it inline as base64 so the calling LLM sees the actual pixels. The response also carries the asset\'s short code (e.g. IMG-A12) and human label — USE these when referring to the asset in chat with the user (e.g. "I\'m using IMG-A12 — Beach Sunset as the first frame") so they can match it to the badged thumbnail in the Slates gallery. Default JPEG 85% ≤1024px long-edge for token economy. Pass fullRes=true for the original PNG.',
1718
+ description: 'Read an asset image off disk and return it inline as base64 so the calling LLM sees the actual pixels. The response also carries the asset\'s short code (e.g. IMG-A12) and human label; use these when referring to the asset in chat with the user (e.g. "I\'m using IMG-A12 — Beach Sunset as the first frame") so they can match it to the badged thumbnail in the Slates gallery. Default JPEG 85% ≤1024px long-edge for token economy. Pass fullRes=true for the original PNG. Takes the asset UUID, not a badge code.',
1512
1719
  input: z.object({
1513
1720
  id: z.string().uuid(),
1514
1721
  fullRes: z.boolean().optional(),
@@ -1534,7 +1741,7 @@ export const getAssetsBatch = {
1534
1741
  id: 'slates_get_assets_batch',
1535
1742
  description: 'Fetch up to 8 image-asset thumbnails inline in a single call. Use this when picking the right reference from a project gallery — one round trip beats N. Each returned image carries its short code (IMG-A12) and label. Video assets are not supported here — call slates_get_asset_video_frames for those.',
1536
1743
  input: z.object({
1537
- ids: z.array(z.string().uuid()).min(1).max(8).describe('1-8 image-asset ids. Order is preserved in the response.'),
1744
+ ids: z.array(z.string().uuid()).min(1).max(8).describe('1-8 image-asset UUIDs (not badge codes). Order is preserved in the response.'),
1538
1745
  }),
1539
1746
  async run(input, ctx) {
1540
1747
  const r = await ctx.desktop().post('/agent/assets/batch-images', { ids: input.ids });
@@ -1565,7 +1772,7 @@ export const getAssetVideoFrames = {
1565
1772
  id: 'slates_get_asset_video_frames',
1566
1773
  description: 'Extract evenly-spaced sampled still frames from a video asset and return them inline as JPEGs. Inspect visible appearance, composition and identity before revising a prompt. Stills do not verify continuous motion, timing, lip sync or sound; actual playback through a capable host is needed for those claims. Default 3 samples; count can request more. The response includes the asset code and label; use them when discussing the clip.',
1567
1774
  input: z.object({
1568
- id: z.string().uuid(),
1775
+ id: z.string().uuid().describe(ASSET_UUID_ONLY),
1569
1776
  count: z.number().int().min(1).max(8).optional().describe('Number of frames to extract. Default 3.'),
1570
1777
  }),
1571
1778
  async run(input, ctx) {
@@ -1615,11 +1822,12 @@ export const connectChatGpt = {
1615
1822
  };
1616
1823
  export const generateChatGptImage = {
1617
1824
  id: 'slates_generate_chatgpt_image',
1618
- description: 'Generate an image through the local Codex host using the connected ChatGPT account, then save it in Slates with its exact submitted prompt, reference lineage and measured dimensions. Uses ChatGPT account limits, never Slates credits or a paid API fallback. Check slates_get_chatgpt_status first. Supply a new UUID requestId once per intended generation; reuse it for retries to avoid duplicate generation/import. No explicit image model, quality or size controls are exposed. Prompt may request visual properties without guaranteeing them. Background returns a generationId for slates_get_generation_status.',
1825
+ description: 'Generate an image through the local Codex host using the connected ChatGPT account, then save it in Slates with its exact submitted prompt, reference lineage and measured dimensions. Uses ChatGPT account limits, never Slates credits or a paid API fallback. Check slates_get_chatgpt_status first. Supply a new UUID requestId once per intended generation; reuse it for retries to avoid duplicate generation/import. No explicit image model, quality or size controls are exposed. Prompt may request visual properties without guaranteeing them. Background returns a generationId for slates_get_generation_status. After an error, start no new run unless the user asks; a retry reuses the same requestId.',
1619
1826
  input: z.object({ projectId: z.string().uuid(), requestId: z.string().uuid(), prompt: z.string().min(1),
1620
1827
  aspectRatio: z.enum(CHATGPT_FRAMING_RATIOS).optional().describe('Optional framing request appended verbally to the prompt, not an exact output-size guarantee.'),
1621
1828
  referenceAssetIds: z.array(z.string().min(1)).optional(), background: z.boolean().optional(), folderId: folderIdField }),
1622
1829
  async run(input, ctx) {
1830
+ requireGuideRead(ctx, 'ChatGPT images', 'slates-chatgpt-images');
1623
1831
  const desktop = ctx.desktop();
1624
1832
  await desktop.requireCapability('chatgpt-image-generation', 'ChatGPT image generation');
1625
1833
  // A desktop before the folder rule ignores folderId and files at the root.
@@ -1757,7 +1965,7 @@ export const moveAssetsToFolder = {
1757
1965
  id: 'slates_move_assets_to_folder',
1758
1966
  description: 'Move one or more assets into a folder, or to the project root (folderId=null).',
1759
1967
  input: z.object({
1760
- assetIds: z.array(z.string().uuid()).min(1),
1968
+ assetIds: z.array(z.string().uuid()).min(1).describe(ASSET_UUID_ONLY),
1761
1969
  folderId: z.string().uuid().nullable(),
1762
1970
  }),
1763
1971
  async run(input, ctx) {
@@ -1768,7 +1976,7 @@ export const setAssetFavorite = {
1768
1976
  id: 'slates_set_asset_favorite',
1769
1977
  description: 'Mark or unmark one asset as a favorite. The heart persists on the card in the app, and slates_list_assets reports it as isFavorite.',
1770
1978
  input: z.object({
1771
- assetId: z.string().uuid(),
1979
+ assetId: z.string().uuid().describe(ASSET_UUID_ONLY),
1772
1980
  favorite: z.boolean(),
1773
1981
  }),
1774
1982
  async run(input, ctx) {
@@ -1780,7 +1988,7 @@ export const exportAssets = {
1780
1988
  id: 'slates_export_assets',
1781
1989
  description: 'Copy the ORIGINAL files of one or more assets (images, clips or audio) into a directory on this machine, named by their codes (IMG-A12.png). Never overwrites: a clash gets -2, -3. The project is untouched. Works for an image-only project with no shot, video or timeline. Returns each exported path and any asset whose file is missing.',
1782
1990
  input: z.object({
1783
- assetIds: z.array(z.string().uuid()).min(1),
1991
+ assetIds: z.array(z.string().uuid()).min(1).describe(ASSET_UUID_ONLY),
1784
1992
  directory: z.string().min(1).describe('Absolute path; created if it does not exist.'),
1785
1993
  }),
1786
1994
  async run(input, ctx) {
@@ -1886,7 +2094,7 @@ export const copyAssetsToProject = {
1886
2094
  };
1887
2095
  export const moveEntityToProject = {
1888
2096
  id: 'slates_move_entity_to_project',
1889
- description: "Move a Library item (a character, location, product, look…) into another project, taking every image it references with it; it lands in the target's category of the same name. This is the fix when slates_move_assets_to_project refuses an asset because a Library item still uses it: the image can't leave on its own, but the whole item can. Refuses (rather than cascading) if one of its images is ALSO used by something else — copy the images instead in that case. mentioningShots lists this project's Shots that mention it: they keep the words and fire without it until it comes back. Board frames are not movable this way; moving a frame's image out would empty the shot.",
2097
+ description: "Move a Library item (a character, location, product, look…) into another project, taking every image it references with it; it lands in the target's category of the same name. This is the fix when slates_move_assets_to_project refuses an asset because a Library item still uses it: the image can't leave on its own, but the whole item can. Refuses (rather than cascading) if one of its images is also used by something else; then use slates_copy_library_item_to_project to copy the whole item, or slates_copy_assets_to_project for the images alone. mentioningShots lists this project's Shots that mention it: they keep the words and fire without it until it comes back. Board frames are not movable this way; moving a frame's image out would empty the shot.",
1890
2098
  input: z.object({
1891
2099
  kind: z
1892
2100
  .enum(['library', 'character', 'environment', 'style'])
@@ -1906,7 +2114,7 @@ export const moveEntityToProject = {
1906
2114
  // ── Characters ──────────────────────────────────────────────────
1907
2115
  export const listCharacters = {
1908
2116
  id: 'slates_list_characters',
1909
- description: 'List characters in a Slates project.',
2117
+ description: 'List characters in a Slates project.' + LIBRARY_TWIN('slates_list_library', 'lists them with every other Library item, each with its category and mention (@name; looks #name)'),
1910
2118
  input: z.object({ projectId: z.string().uuid() }),
1911
2119
  async run(input, ctx) {
1912
2120
  return ok(await ctx.desktop().get('/agent/characters', { projectId: input.projectId }));
@@ -1914,12 +2122,12 @@ export const listCharacters = {
1914
2122
  };
1915
2123
  export const createCharacter = {
1916
2124
  id: 'slates_create_character',
1917
- description: 'Create a new character in a Slates project.',
2125
+ description: 'Create a new character in a Slates project.' + LIBRARY_TWIN('slates_create_library_item', 'creates one in a category you choose and returns its @mention'),
1918
2126
  input: z.object({
1919
2127
  projectId: z.string().uuid(),
1920
2128
  name: z.string().min(1).max(120),
1921
2129
  description: z.string().optional(),
1922
- style: z.string().max(200).optional().describe("Art style. Omit to inherit the reference's style (the default). Canonical styles: photoreal, anime, painterly, 3d-render, comic. Or pass any free-text instruction, e.g. 'turn this into a real person'."),
2130
+ style: z.string().max(200).optional().describe(STYLE_DESCRIBE("Omitted: keeps the reference's medium (Slates 1.6.2 and older use realistic).")),
1923
2131
  }),
1924
2132
  async run(input, ctx) {
1925
2133
  return ok(await ctx.desktop().post('/agent/characters', input));
@@ -1927,10 +2135,10 @@ export const createCharacter = {
1927
2135
  };
1928
2136
  export const setCharacterIdentity = {
1929
2137
  id: 'slates_set_character_identity_asset',
1930
- description: 'Bind one image asset as the character identity (or clear with assetId=null). The user sees the character card update live.',
2138
+ description: 'Bind one image asset as the character identity (or clear with assetId=null). The user sees the character card update live.' + LIBRARY_TWIN('slates_update_library_item', 'edits the same row'),
1931
2139
  input: z.object({
1932
2140
  characterId: z.string().uuid(),
1933
- assetId: z.string().uuid().nullable(),
2141
+ assetId: z.string().uuid().nullable().describe(ASSET_UUID_ONLY),
1934
2142
  }),
1935
2143
  async run(input, ctx) {
1936
2144
  return ok(await ctx.desktop().post('/agent/characters/update', {
@@ -1942,7 +2150,7 @@ export const setCharacterIdentity = {
1942
2150
  // ── Environments ────────────────────────────────────────────────
1943
2151
  export const listEnvironments = {
1944
2152
  id: 'slates_list_environments',
1945
- description: 'List the locations (environments) in a Slates project.',
2153
+ description: 'List the locations (environments) in a Slates project.' + LIBRARY_TWIN('slates_list_library', 'lists them with every other Library item, each with its category and mention (@name; looks #name)'),
1946
2154
  input: z.object({ projectId: z.string().uuid() }),
1947
2155
  async run(input, ctx) {
1948
2156
  return ok(await ctx.desktop().get('/agent/environments', { projectId: input.projectId }));
@@ -1950,12 +2158,12 @@ export const listEnvironments = {
1950
2158
  };
1951
2159
  export const createEnvironment = {
1952
2160
  id: 'slates_create_environment',
1953
- description: 'Create a new location (environment) in a Slates project.',
2161
+ description: 'Create a new location (environment) in a Slates project.' + LIBRARY_TWIN('slates_create_library_item', 'creates one in a category you choose and returns its @mention'),
1954
2162
  input: z.object({
1955
2163
  projectId: z.string().uuid(),
1956
2164
  name: z.string().min(1).max(120),
1957
2165
  description: z.string().optional(),
1958
- style: z.string().max(200).optional().describe("Art style. Omit to inherit the reference's style (the default). Canonical styles: photoreal, anime, painterly, 3d-render, comic. Or pass any free-text instruction, e.g. 'turn this into a real person'."),
2166
+ style: z.string().max(200).optional().describe(STYLE_DESCRIBE("Omitted: keeps the reference's medium (Slates 1.6.2 and older use realistic).")),
1959
2167
  }),
1960
2168
  async run(input, ctx) {
1961
2169
  return ok(await ctx.desktop().post('/agent/environments', input));
@@ -1964,14 +2172,14 @@ export const createEnvironment = {
1964
2172
  export const generateCharacterIdentity = {
1965
2173
  id: 'slates_generate_character_identity',
1966
2174
  billable: true,
1967
- description: "Generate one character identity sheet from a base portrait asset and bind it as the character's canonical reference. Call after slates_create_character. Read slates-character-identity before calling and quote the cost from slates_estimate_generation_cost.",
2175
+ description: "Generate one identity sheet (a portrait plus front and back full-body views) from a base portrait and bind it as the item's canonical picture. Works on a character or any Library thing; the item must exist (slates_create_character or slates_create_library_item). Craft: slates-character-identity. Show the user the estimate from slates_estimate_generation_cost and wait for their OK before calling: this tool has no confirm gate.",
1968
2176
  input: z.object({
1969
2177
  characterId: z.string().uuid().describe('A character, or the id of any Library thing: both sheet tools run on any thing, and the result binds as its image.'),
1970
2178
  projectId: z.string().uuid(),
1971
- baseAssetId: z.string().uuid().describe('The base portrait asset the identity is generated from.'),
2179
+ baseAssetId: z.string().uuid().describe('The base portrait asset the identity is generated from. ' + ASSET_UUID_ONLY),
1972
2180
  userNotes: z.string().optional().describe('Extra instruction, e.g. "use the woman on the left".'),
1973
2181
  model: z
1974
- .enum(['nano-banana-2', 'nano-banana-2-lite', 'nano-banana-pro', 'gpt-image-2-5-flare', 'gpt-image-2-5-sunburst'])
2182
+ .enum(['nano-banana-2-1', 'gpt-image-2-5-flare', 'gpt-image-2-5-sunburst'])
1975
2183
  .optional()
1976
2184
  .describe(`Image model for the sheet. Omit for the sheet tool's seat (${toolModelFor('character-sheet')}), which is what the app's own button uses. Pass another only to compare seats side by side.`),
1977
2185
  }),
@@ -1982,14 +2190,15 @@ export const generateCharacterIdentity = {
1982
2190
  // model's price and generate another, silently. Same failure `generateImage`
1983
2191
  // and `editImage` gate against; this op was simply missed when the gate was
1984
2192
  // introduced, and the 2.5 swap is what makes it reachable in practice.
2193
+ requireGuideRead(ctx, input.model ?? toolModelFor('character-sheet'));
1985
2194
  if (isGptImageModel(input.model)) {
1986
2195
  await ctx.desktop().requireCapability('image-models-v3', `${input.model} character identity`);
1987
2196
  }
1988
- else if (input.model === 'nano-banana-pro' || input.model === 'nano-banana-2-lite') {
1989
- await ctx.desktop().requireCapability('image-models-v2', `${input.model} character identity`);
2197
+ else if (isImageModelV4(input.model)) {
2198
+ await ctx.desktop().requireCapability('image-models-v4', `${input.model} character identity`);
1990
2199
  }
1991
2200
  // 1.5.8 renders an unnamed model as Nano Banana 2 and every model at 2k, so
1992
- // only an explicit Nano Banana model runs there as quoted.
2201
+ // an unnamed or GPT Image seat needs a desktop that renders the seat quoted.
1993
2202
  if (!input.model || isGptImageModel(input.model)) {
1994
2203
  await ctx.desktop().requireCapability('sheet-tool-seats', 'sheet tools on the default image seat');
1995
2204
  }
@@ -2005,7 +2214,7 @@ export const generateCharacterIdentity = {
2005
2214
  export const generateEnvironmentPlate = {
2006
2215
  id: 'slates_generate_environment_plate',
2007
2216
  billable: true,
2008
- description: "Generate one clean establishing image from an optional base image and bind it as the location's canonical reference. Call after slates_create_environment and quote the cost from slates_estimate_generation_cost.",
2217
+ description: "Generate one clean, empty establishing image of a place from an optional base image and bind it as the item's canonical picture. Works on a location or any Library thing; the item must exist (slates_create_environment or slates_create_library_item). Show the user the estimate from slates_estimate_generation_cost and wait for their OK before calling: this tool has no confirm gate.",
2009
2218
  input: z.object({
2010
2219
  environmentId: z.string().uuid().describe('A location, or the id of any Library thing: both sheet tools run on any thing, and the result binds as its image.'),
2011
2220
  projectId: z.string().uuid(),
@@ -2017,6 +2226,7 @@ export const generateEnvironmentPlate = {
2017
2226
  userNotes: z.string().optional(),
2018
2227
  }),
2019
2228
  async run(input, ctx) {
2229
+ requireGuideRead(ctx, toolModelFor('environment-plate'));
2020
2230
  // 1.5.8 always renders the plate on Nano Banana 2 at 2k, never the seat quoted.
2021
2231
  await ctx.desktop().requireCapability('sheet-tool-seats', 'sheet tools on the default image seat');
2022
2232
  return ok(await ctx.desktop().post('/agent/environments/generate-plate', {
@@ -2041,7 +2251,7 @@ export const createStoryboard = {
2041
2251
  description: 'Create a new board (storyboard) with a default first scene. Returns the board record.',
2042
2252
  input: z.object({
2043
2253
  projectId: z.string().uuid(),
2044
- name: z.string().min(1).max(120),
2254
+ name: z.string().min(1).max(80),
2045
2255
  description: z.string().optional(),
2046
2256
  }),
2047
2257
  async run(input, ctx) {
@@ -2088,7 +2298,7 @@ export const addFrame = {
2088
2298
  projectId: z.string().uuid(),
2089
2299
  storyboardId: z.string().uuid(),
2090
2300
  sceneId: z.string().uuid(),
2091
- assetId: z.string().uuid(),
2301
+ assetId: z.string().uuid().describe(ASSET_UUID_ONLY),
2092
2302
  shotLabel: z.string().optional(),
2093
2303
  notes: z.string().optional(),
2094
2304
  position: z.number().int().min(0).optional(),
@@ -2179,12 +2389,10 @@ async function previewAssets(ctx, refs) {
2179
2389
  /** Derived compatibility export for callers enumerating the 3k ladder. */
2180
2390
  export const THREE_K_IMAGE_MODELS = Object.keys(MODEL_CAPABILITIES).filter((id) => MODEL_CAPABILITIES[id].imageResolutions?.includes('3k'));
2181
2391
  export const IMAGE_MODELS = [
2182
- 'nano-banana-2',
2183
- 'nano-banana-2-lite',
2184
- 'nano-banana-pro',
2392
+ 'nano-banana-2-1',
2185
2393
  'gpt-image-2-5-flare',
2186
2394
  'gpt-image-2-5-sunburst',
2187
- 'flux-2-max',
2395
+ 'flux-3',
2188
2396
  'seedream-5-lite',
2189
2397
  ];
2190
2398
  /** True for either GPT Image 2.5 seat. Flare and Sunburst differ in latency
@@ -2192,6 +2400,17 @@ export const IMAGE_MODELS = [
2192
2400
  export function isGptImageModel(model) {
2193
2401
  return model === 'gpt-image-2-5-flare' || model === 'gpt-image-2-5-sunburst';
2194
2402
  }
2403
+ /**
2404
+ * The seats that arrived 2026-10-23, which only a desktop advertising
2405
+ * `image-models-v4` knows. 🚨 A NEW TOKEN, as v3 was for GPT Image 2.5: an older
2406
+ * desktop has neither id in its registry and would fall back to its Nano Banana
2407
+ * path while this op quotes the new seat's price.
2408
+ */
2409
+ export function isImageModelV4(model) {
2410
+ return model === 'nano-banana-2-1' || model === 'flux-3';
2411
+ }
2412
+ /** The one image seat with a headless path (no projectId): the MCP asks the proxy for it directly. */
2413
+ const HEADLESS_IMAGE_MODEL = 'nano-banana-2-1';
2195
2414
  /**
2196
2415
  * The aspect ratios an image generation can carry — the UNION over what these
2197
2416
  * models declare in `MODEL_CAPABILITIES`, generated so the enum cannot hold a
@@ -2209,9 +2428,8 @@ export function isGptImageModel(model) {
2209
2428
  const IMAGE_ASPECT_RATIOS = aspectRatioUnion(IMAGE_MODELS);
2210
2429
  // Registry cost-key for an image model+resolution. Mirrors imageCreditKey()
2211
2430
  // in slate/src/shared/pricing.ts — MUST byte-match it (the same hard rule as
2212
- // videoCostKey): NB2/NB Pro price per resolution, FLUX.2 Max prices per
2213
- // resolution (1k is the bare key), NB2 Lite/Seedream are flat, GPT Image 2.5 is
2214
- // quality × resolution-class over ALL FIVE exposed tiers.
2431
+ // videoCostKey): Nano Banana 2.1 and FLUX 3 price per resolution, Seedream is
2432
+ // flat, GPT Image 2.5 is quality × resolution-class over ALL FIVE exposed tiers.
2215
2433
  //
2216
2434
  // 🚨 THE KEY SUFFIX IS `med` WHILE THE WIRE VALUE IS `medium` — the one
2217
2435
  // tier name that differs between fal's enum and our cost keys, inherited from
@@ -2239,17 +2457,13 @@ function gptKeyAspect(aspectRatio) {
2239
2457
  // `imageCreditKey`. Before that check existed the byte-match was a comment and
2240
2458
  // a hope — the two are in different repos and nothing compared them.
2241
2459
  export function imageCostKey(model, resolution, quality = DEFAULT_GPT_QUALITY, aspectRatio) {
2242
- if (model === 'flux-2-max')
2243
- return resolution === '1k' ? 'flux-2-max' : `flux-2-max-${resolution}`;
2460
+ if (model === 'flux-3')
2461
+ return `flux-3-${resolution}`;
2244
2462
  if (model === 'seedream-5-lite')
2245
2463
  return 'seedream-5-lite';
2246
- if (model === 'nano-banana-2-lite')
2247
- return 'nano-banana-2-lite';
2248
- if (model === 'nano-banana-pro')
2249
- return `nano-banana-pro-${resolution}`;
2250
2464
  if (isGptImageModel(model))
2251
2465
  return `${model}-${gptKeyTier(quality)}-${resolution}${gptKeyAspect(aspectRatio)}`;
2252
- return `nano-banana-2-${resolution}`;
2466
+ return `nano-banana-2-1-${resolution}`;
2253
2467
  }
2254
2468
  /**
2255
2469
  * Image settings on the price list that cost less per image than `than`: each
@@ -2301,41 +2515,40 @@ const DEFAULT_IMAGE_MODEL = defaultModelFor('image');
2301
2515
  if (!IMAGE_MODELS.includes(DEFAULT_IMAGE_MODEL)) {
2302
2516
  throw new Error(`slates_generate_image: default image seat ${DEFAULT_IMAGE_MODEL} is not in IMAGE_MODELS`);
2303
2517
  }
2304
- /** The headless path's one fal batch: `maxBatchImages` owns it (nano-banana-2 is the only batching model). */
2305
- const HEADLESS_BATCH_CAP = MODEL_CAPABILITIES['nano-banana-2']?.maxBatchImages ?? 1;
2518
+ /** The headless path's one provider request: `maxBatchImages` owns it. Nano Banana 2.1 declares none, so one image. */
2519
+ const HEADLESS_BATCH_CAP = MODEL_CAPABILITIES[HEADLESS_IMAGE_MODEL]?.maxBatchImages ?? 1;
2306
2520
  /** A 1.5.8 desktop's own clamp on a project batch, frozen with that build. */
2307
2521
  const LEGACY_DESKTOP_IMAGE_BATCH = 4;
2308
2522
  export const generateImage = {
2309
2523
  id: 'slates_generate_image',
2310
2524
  billable: true,
2311
2525
  description:
2312
- // Rules first: Claude Code keeps only the first 2,048 characters of a tool
2313
- // description, and the generated roster below runs past that cut.
2314
- 'Generate an image via Slates credits. Pass projectId to save into a Slates project (asset appears live in the desktop UI). All models except nano-banana-2 REQUIRE projectId (no headless path). You MUST pass aspectRatio (the server returns requires_clarification when missing); resolution defaults to the model\'s own. ' +
2315
- CONFIRM_GATE_SENTENCE +
2526
+ // Rules only: Claude Code keeps the first 2,048 characters of a tool
2527
+ // description, so the generated roster lives on the model param, as on the
2528
+ // video and audio ops (it pushed the default seat's line past the cut).
2529
+ `Generate an image via Slates credits. Pass projectId to save into a Slates project (asset appears live in the desktop UI). All models except ${HEADLESS_IMAGE_MODEL} require projectId (no headless path). ` + 'Pass aspectRatio (the server returns requires_clarification when missing); resolution defaults to the model\'s own. ' +
2530
+ confirmGateSentence('any referenceAssetIds') +
2316
2531
  ' MCP/CLI generation always charges credits. The estimate returns the model\'s prompting card; load its slates-prompting-* guide with slates_get_prompting_guide for anything the card leaves out. ' +
2317
2532
  // GENERATED from the skill file's own never-use list -- the one piece of
2318
2533
  // prompting doctrine that is ALWAYS in context, because the agent has
2319
2534
  // demonstrably skipped the call that would have taught it.
2320
- describeBannedTokens('image') +
2321
- // GENERATED from MODEL_FACTS — the hand-typed model list that stood here
2322
- // was a third copy of the routing doctrine, and it had already gone stale
2323
- // (it still described nano-banana-2-lite by a capability the param owns).
2324
- `\n${describeRouting('image')}\n` +
2325
- 'Full table: the slates-model-selection skill.',
2535
+ describeBannedTokens('image'),
2326
2536
  input: z.object({
2327
2537
  prompt: z.string().min(1).max(4000),
2328
- model: zEnum(IMAGE_MODELS).optional().describe(`Image model. Omitted: ${DEFAULT_IMAGE_MODEL} with projectId, nano-banana-2 (the only headless seat) without. Routing: slates-model-selection skill.`),
2329
- projectId: z.string().uuid().optional().describe('Save into this Slates project. Renderer refreshes live. Required for every model except nano-banana-2.'),
2538
+ // Routing GENERATED from MODEL_FACTS.
2539
+ model: zEnum(IMAGE_MODELS).optional().describe(`Image model. Omitted: ${DEFAULT_IMAGE_MODEL} with projectId, ${HEADLESS_IMAGE_MODEL} (the only headless seat) without.\n` +
2540
+ `${describeRouting('image')}\n` +
2541
+ 'Full table: the slates-model-selection skill.'),
2542
+ projectId: z.string().uuid().optional().describe(`Save into this Slates project. Renderer refreshes live. Required for every model except ${HEADLESS_IMAGE_MODEL}.`),
2330
2543
  resolution: z.enum(['1k', '2k', '3k', '4k']).optional().describe('Omit for the selected model default. Override for a specific delivery size; use the same setting when estimating.'),
2331
2544
  quality: z.enum(GPT_QUALITY_TIERS).optional().describe(`GPT Image only. Default ${DEFAULT_GPT_QUALITY}; estimate the chosen tier before generation.`),
2332
2545
  backgroundMode: z.enum(GPT_BACKGROUNDS).optional().describe('GPT Image only. transparent = alpha channel. Free.'),
2333
2546
  aspectRatio: zEnum(IMAGE_ASPECT_RATIOS).optional().describe(`Pick from the use case: cinematic 16:9 · TikTok/Reels 9:16 · IG square 1:1 · ultra-wide 21:9. 1:1 costs most on GPT Image. Per model: ${describeAspectRatios(IMAGE_MODELS)}`),
2334
- count: z.number().int().min(1).max(MAX_IMAGE_VARIATIONS).optional().describe(`Variations of this one prompt: every image gets the same prompt, so different subjects are separate calls. Up to ${MAX_IMAGE_VARIATIONS} with projectId; headless caps at ${HEADLESS_BATCH_CAP}.`),
2335
- referenceImageUrls: z.array(z.string().url()).max(14).optional().describe('Headless (no projectId) nano-banana-2 only. With a projectId, upload via slates_upload_reference_image. Label every image role in the prompt.'),
2336
- referenceAssetIds: z.array(z.string()).max(16).optional().describe("Project assets as references — UUIDs or badge codes (\"IMG-A8\"), resolved at call time. Requires projectId. Caps: GPT Image 16, nano-banana-2 14, FLUX/Seedream lower. Label every reference role in the prompt."),
2547
+ count: z.number().int().min(1).max(MAX_IMAGE_VARIATIONS).optional().describe(`Variations of this one prompt: every image gets the same prompt, so different subjects are separate calls. Up to ${MAX_IMAGE_VARIATIONS} with projectId; headless caps at ${HEADLESS_BATCH_CAP}. A 2x2 or 3x3 grid in one picture is a Shot's or the prompt box's Grid (params.gridMode), not count.`),
2548
+ referenceImageUrls: z.array(z.string().url()).max(14).optional().describe(`Headless (no projectId) ${HEADLESS_IMAGE_MODEL} only. With a projectId, upload via slates_upload_reference_image. Label every image role in the prompt.`),
2549
+ referenceAssetIds: z.array(z.string()).max(16).optional().describe(`Project assets as references — UUIDs or badge codes ("IMG-A8"), resolved at call time. Requires projectId. Caps: ${describeReferenceImageCaps(IMAGE_MODELS)}. Label every reference role in the prompt.`),
2337
2550
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
2338
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate.'),
2551
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
2339
2552
  folderId: z.string().uuid().nullable().optional().describe(`${FOLDER_DESCRIBE} Needs projectId.`),
2340
2553
  }),
2341
2554
  async run(input, ctx) {
@@ -2350,10 +2563,11 @@ export const generateImage = {
2350
2563
  // that echoes a prompt -- the clarification and confirm gates are PRE-spend,
2351
2564
  // which is where a rewrite is still free.
2352
2565
  // Omitted model: the default seat when there is a project to route through,
2353
- // nano-banana-2 without one, because it is the only headless seat. The
2566
+ // HEADLESS_IMAGE_MODEL without one, because it is the only headless seat. The
2354
2567
  // desktop resolves the same seat for its cost and plan-model guards
2355
2568
  // (`imageModelFor`, slate src/main/studio-agent/guards.ts): change both together.
2356
- const imageModel = input.model ?? (input.projectId ? DEFAULT_IMAGE_MODEL : 'nano-banana-2');
2569
+ const imageModel = input.model ?? (input.projectId ? DEFAULT_IMAGE_MODEL : HEADLESS_IMAGE_MODEL);
2570
+ requireGuideRead(ctx, imageModel);
2357
2571
  const promptWarning = bannedTokenWarning(input.prompt, 'image', promptingSkillFor(imageModel));
2358
2572
  input = { ...input, resolution: input.resolution ?? defaultImageResolutionFor(imageModel) };
2359
2573
  if (!input.aspectRatio || !input.resolution) {
@@ -2380,9 +2594,9 @@ export const generateImage = {
2380
2594
  return ok({ requires_clarification: true, missing: ['resolution'],
2381
2595
  message: `${imageModel} accepts ${resolutions.join(', ')}.` });
2382
2596
  }
2383
- // Only nano-banana-2 has a headless path — everything else routes through
2384
- // the desktop generation pipeline, which needs a project.
2385
- if (imageModel !== 'nano-banana-2' && !input.projectId) {
2597
+ // Only HEADLESS_IMAGE_MODEL has a headless path — everything else routes
2598
+ // through the desktop generation pipeline, which needs a project.
2599
+ if (imageModel !== HEADLESS_IMAGE_MODEL && !input.projectId) {
2386
2600
  return ok({
2387
2601
  requires_clarification: true,
2388
2602
  missing: ['projectId'],
@@ -2408,16 +2622,16 @@ export const generateImage = {
2408
2622
  message: 'background=true routes through the desktop generation pipeline (so slates_get_generation_status can poll it) — pass a projectId, or drop background for a blocking headless run.',
2409
2623
  });
2410
2624
  }
2411
- // 🚨 THE HEADLESS PATH ASKS FAL FOR A BATCH, so a provider ceiling binds
2412
- // here and nowhere else. It is nano-banana-2 only, and Nano Banana's
2413
- // `num_images` maximum is 4 (fal schema, 2026-09-09). Refused rather than
2414
- // clamped: a silent clamp would make four images against a request for ten
2415
- // and read to the caller as a partial failure it should retry.
2625
+ // 🚨 THE HEADLESS PATH IS ONE PROVIDER REQUEST, so its batch bound binds
2626
+ // here and nowhere else: `maxBatchImages` on HEADLESS_IMAGE_MODEL, which
2627
+ // Nano Banana 2.1 leaves unset (one image; model-capabilities.ts says why).
2628
+ // Refused rather than clamped: a silent clamp would make one image against a
2629
+ // request for ten and read to the caller as a partial failure to retry.
2416
2630
  if (!input.projectId && (input.count ?? 1) > HEADLESS_BATCH_CAP) {
2417
2631
  return ok({
2418
2632
  requires_clarification: true,
2419
2633
  missing: ['projectId'],
2420
- message: `count above ${HEADLESS_BATCH_CAP} needs a projectId. The headless path asks for one batch and nano-banana-2 caps a batch at ${HEADLESS_BATCH_CAP}; with a projectId the desktop fires them as separate generations and the limit is ${MAX_IMAGE_VARIATIONS}.`,
2634
+ message: `count above ${HEADLESS_BATCH_CAP} needs a projectId. The headless path is one request and ${HEADLESS_IMAGE_MODEL} caps it at ${HEADLESS_BATCH_CAP}; with a projectId the desktop fires them as separate generations and the limit is ${MAX_IMAGE_VARIATIONS}.`,
2421
2635
  });
2422
2636
  }
2423
2637
  let refEcho = '';
@@ -2434,18 +2648,17 @@ export const generateImage = {
2434
2648
  await ctx.desktop().requireCapability('background-generation', 'background generation');
2435
2649
  }
2436
2650
  // New-roster models need a desktop that knows them — an older desktop's
2437
- // allowlist would silently fall back to nano-banana-2 while we quote the
2438
- // new model's price.
2651
+ // allowlist would silently fall back to its Nano Banana path while we quote
2652
+ // the new model's price.
2439
2653
  if (input.projectId && isGptImageModel(imageModel)) {
2440
2654
  // 🚨 v3, NOT v2. GPT Image 2.5 landed 2026-09-09 with new ids and a
2441
2655
  // five-rung ladder; a desktop that only knows v2 has neither, so it would
2442
- // fall back to nano-banana-2 while this op quotes a 2.5 price — precisely
2656
+ // fall back to its Nano Banana path while this op quotes a 2.5 price — precisely
2443
2657
  // the failure the gate was built to stop. Reusing v2 reintroduces it.
2444
2658
  await ctx.desktop().requireCapability('image-models-v3', `${imageModel} generation`);
2445
2659
  }
2446
- else if (input.projectId &&
2447
- (imageModel === 'nano-banana-pro' || imageModel === 'nano-banana-2-lite')) {
2448
- await ctx.desktop().requireCapability('image-models-v2', `${imageModel} generation`);
2660
+ else if (input.projectId && isImageModelV4(imageModel)) {
2661
+ await ctx.desktop().requireCapability('image-models-v4', `${imageModel} generation`);
2449
2662
  }
2450
2663
  // 1.5.8 clamps a project batch to its own 4 and bills 4 against this op's quote for all of them.
2451
2664
  if (input.projectId && (input.count ?? 1) > LEGACY_DESKTOP_IMAGE_BATCH) {
@@ -2605,38 +2818,37 @@ export const generateImage = {
2605
2818
  // to `/edit` 422s on the missing `image_urls` field.
2606
2819
  const hasReferenceImages = !!input.referenceImageUrls && input.referenceImageUrls.length > 0;
2607
2820
  const endpoint = hasReferenceImages
2608
- ? 'fal-ai/nano-banana-2/edit'
2609
- : 'fal-ai/nano-banana-2';
2821
+ ? 'google/nano-banana-2.1/edit'
2822
+ : 'google/nano-banana-2.1';
2610
2823
  const proxyResult = await cloud.post('/proxy/generate', {
2611
2824
  provider: 'fal',
2612
2825
  type: 'image',
2613
2826
  model: costKey,
2614
2827
  endpoint,
2828
+ // The body the desktop's `buildFalNanoBananaRequest` (slate src/main/api/fal.ts)
2829
+ // sends, field for field; the proxy derives the cost key from it
2830
+ // (slates-api src/lib/fal-image-keys.ts).
2615
2831
  params: {
2616
2832
  prompt: input.prompt,
2617
2833
  aspect_ratio: input.aspectRatio ?? '1:1',
2618
2834
  // 🚨 THE RESOLUTION HAS TO BE ON THE WIRE, BECAUSE IT IS IN THE KEY.
2619
- // `imageCostKey` above bills `nano-banana-2-{resolution}`, and until
2620
- // 2026-09-10 this body omitted the field entirely — so fal rendered at
2621
- // its own default while we charged for whatever rung the caller asked
2622
- // for. The enum is fal's (`1K`/`2K`/`4K`), the same one the desktop's
2623
- // `buildFalNB2Request` sends, and the proxy now recovers the rung from it
2624
- // rather than trusting the key (`lib/fal-image-keys.ts`).
2625
- // `3k` cannot reach here — the capability guard above refuses a rung
2626
- // nano-banana-2 does not declare — so the map is deliberately partial
2627
- // rather than carrying a rung this model has no key for.
2835
+ // `imageCostKey` above bills `nano-banana-2-1-{resolution}`; until
2836
+ // 2026-09-10 this body omitted the field and fal rendered at its own
2837
+ // default while we charged for the rung asked. The enum is fal's
2838
+ // (`1K`/`2K`/`4K`), and the proxy recovers the rung from it rather than
2839
+ // trusting the key. `3k` cannot reach here: the capability guard above
2840
+ // refuses a rung the model does not declare.
2628
2841
  resolution: { '1k': '1K', '2k': '2K', '4k': '4K' }[resolution] ?? '2K',
2629
- // 🚨 THE HEADLESS PATH IS THE ONE PLACE WE ASK FAL FOR A BATCH, so it
2630
- // is the one place a provider's own `num_images` ceiling binds — and
2631
- // Nano Banana's is 4 (fal schema, read 2026-09-09), against the op's
2632
- // limit of 10. Everything else fans out through the desktop as N
2633
- // separate single-image generations, where no batch ceiling exists.
2634
- // Guarded above rather than clamped here: silently making 4 when 10
2635
- // were asked for would bill 4 and look like a partial failure.
2636
- //
2637
- // The proxy bills this COUNT (it multiplies the single-image key by it),
2638
- // which is what the confirm gate above has always quoted.
2842
+ // Sent, never left to fal's default: a default is a bill nobody chose.
2843
+ // `medium` is what the key's thinking allowance prices; the proxy
2844
+ // refuses `high`, which no key prices.
2845
+ thinking_level: 'medium',
2846
+ // One image per request (HEADLESS_BATCH_CAP, guarded above). The proxy
2847
+ // bills this count against the single-image key.
2639
2848
  num_images: input.count ?? 1,
2849
+ // Nano Banana 2's posture, kept: fal's string enum "1"-"6", default "4".
2850
+ safety_tolerance: '5',
2851
+ output_format: 'png',
2640
2852
  ...(hasReferenceImages
2641
2853
  ? { image_urls: input.referenceImageUrls }
2642
2854
  : {}),
@@ -2706,22 +2918,23 @@ async function pollProxyJob(cloud, jobId, options = {}) {
2706
2918
  /** References an edit carries beside the source, which is image 1 of the same request. */
2707
2919
  const editReferenceCap = (model) => Math.max(0, (MODEL_CAPABILITIES[model]?.maxRefImages ?? 1) - 1);
2708
2920
  /** The models a 1.5.8 desktop sends edit references on, frozen with that build: on every other model it drops them and bills the edit in full. */
2709
- const LEGACY_EDIT_REFERENCE_MODELS = ['nano-banana-2', 'nano-banana-2-lite', 'nano-banana-pro'];
2921
+ const LEGACY_EDIT_REFERENCE_MODELS = ['nano-banana-2', 'nano-banana-2-lite', 'nano-banana-pro']; // 1.5.8's ids, retired since
2710
2922
  export const editImage = {
2711
2923
  id: 'slates_edit_image',
2712
2924
  billable: true,
2713
- description: 'Surgically edit an image asset with a text instruction (e.g. \'make the jacket red\') instead of regenerating from scratch — use when ~90% of the image is already right. The result is a NEW asset (prompt prefixed \'[Edit]\'); the source is untouched. Default model ' + toolModelFor('image-edit') + ' (the image-edit tool seat, the model the app\'s Edit box opens on). Every model also takes referenceAssetIds, up to its reference cap less one: the source is image 1 of the request. Use slates-edit-and-iterate for missing edit craft; reuse current guidance already in context.',
2925
+ description: 'Surgically edit an image asset with a text instruction (e.g. \'make the jacket red\') instead of regenerating from scratch — use when ~90% of the image is already right. The result is a NEW asset (prompt prefixed \'[Edit]\'); the source is untouched. Default model ' + toolModelFor('image-edit') + ' (the image-edit tool seat, the model the app\'s Edit box opens on). Every model also takes referenceAssetIds, up to its reference cap less one: the source is image 1 of the request. Use slates-edit-and-iterate for missing edit craft; reuse current guidance already in context. ' +
2926
+ CONFIRM_GATE_SENTENCE,
2714
2927
  input: z.object({
2715
2928
  projectId: z.string().uuid(),
2716
- sourceAssetId: z.string().uuid().describe('Image asset to edit. Must exist in the project.'),
2717
- prompt: z.string().min(1).max(4000).describe('The change, not the whole image.'),
2929
+ sourceAssetId: z.string().uuid().describe('Image asset to edit. Must exist in the project. ' + ASSET_UUID_ONLY),
2930
+ prompt: z.string().min(1).max(4000).describe('The change, not the whole image. @name and #look words attach nothing here: pass those pictures in referenceAssetIds.'),
2718
2931
  editModel: zEnum(IMAGE_MODELS).optional(),
2719
- referenceAssetIds: z.array(z.string().uuid()).max(Math.max(...IMAGE_MODELS.map(editReferenceCap))).optional().describe(`Images beside the source, which is image 1. Each model's own cap: ${IMAGE_MODELS.map((m) => `${m} ${editReferenceCap(m)}`).join(', ')}.`),
2720
- resolution: z.enum(['1k', '2k', '3k', '4k']).optional().describe('3k = GPT Image/seedream-5-lite; nano-banana-2-lite is 1k only.'),
2932
+ referenceAssetIds: z.array(z.string().uuid().describe(ASSET_UUID_ONLY)).max(Math.max(...IMAGE_MODELS.map(editReferenceCap))).optional().describe(`Images beside the source, which is image 1. Each model's own cap: ${IMAGE_MODELS.map((m) => `${m} ${editReferenceCap(m)}`).join(', ')}.`),
2933
+ resolution: z.enum(['1k', '2k', '3k', '4k']).optional().describe('3k = GPT Image/seedream-5-lite only.'),
2721
2934
  quality: z.enum(GPT_QUALITY_TIERS).optional().describe(`GPT Image tier; default ${DEFAULT_GPT_QUALITY}.`),
2722
2935
  backgroundMode: z.enum(GPT_BACKGROUNDS).optional().describe('GPT Image only. transparent = alpha channel. Free.'),
2723
2936
  aspectRatio: z.string().optional(),
2724
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate.'),
2937
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
2725
2938
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
2726
2939
  }),
2727
2940
  async run(input, ctx) {
@@ -2732,6 +2945,7 @@ export const editImage = {
2732
2945
  }
2733
2946
  // The image-edit tool's seat (TOOL_SEAT), the model the app's own Edit uses.
2734
2947
  const editModel = input.editModel ?? toolModelFor('image-edit');
2948
+ requireGuideRead(ctx, editModel);
2735
2949
  const resolution = input.resolution ?? defaultImageResolutionFor(editModel);
2736
2950
  if (isGptImageModel(editModel)) {
2737
2951
  // 🚨 v3, LIKE generateImage — this site was missed once already.
@@ -2741,8 +2955,8 @@ export const editImage = {
2741
2955
  // at a quoted 2.5 price. Exactly the bug the gate exists to stop.
2742
2956
  await desktop.requireCapability('image-models-v3', `${editModel} editing`);
2743
2957
  }
2744
- else if (editModel === 'nano-banana-pro' || editModel === 'nano-banana-2-lite') {
2745
- await desktop.requireCapability('image-models-v2', `${editModel} editing`);
2958
+ else if (isImageModelV4(editModel)) {
2959
+ await desktop.requireCapability('image-models-v4', `${editModel} editing`);
2746
2960
  }
2747
2961
  if (input.referenceAssetIds?.length && !LEGACY_EDIT_REFERENCE_MODELS.includes(editModel)) {
2748
2962
  await desktop.requireCapability('edit-references-all-models', `references on a ${editModel} edit`);
@@ -2753,7 +2967,7 @@ export const editImage = {
2753
2967
  // FLUX / Seedream route to dedicated edit endpoints priced under '-edit' keys.
2754
2968
  // Mirrors `editCreditKey` in the desktop's src/shared/imageEdit.ts, which
2755
2969
  // this package cannot import: change both together.
2756
- const costKey = editModel === 'flux-2-max' || editModel === 'seedream-5-lite'
2970
+ const costKey = editModel === 'flux-3' || editModel === 'seedream-5-lite'
2757
2971
  ? `${imageCostKey(editModel, resolution)}-edit`
2758
2972
  : imageCostKey(editModel, resolution, input.quality, input.aspectRatio);
2759
2973
  const cloud = ctx.cloud();
@@ -2844,7 +3058,7 @@ export const editImage = {
2844
3058
  * with no `confirm`, the op answers with the price and the exact prompt, and spends nothing.
2845
3059
  */
2846
3060
  /** The seats the viewer's Cells box offers. Mirrors slate's `GRID_EXTRACT_MODELS` (`shared/prompts/storyboard-grids.ts`), which this package cannot import. */
2847
- const GRID_EXTRACT_SEATS = ['nano-banana-2', 'flux-2-max', 'seedream-5-lite'];
3061
+ const GRID_EXTRACT_SEATS = ['nano-banana-2-1', 'flux-3', 'seedream-5-lite'];
2848
3062
  export const extractGridCells = {
2849
3063
  id: 'slates_extract_grid_cells',
2850
3064
  billable: true,
@@ -2862,10 +3076,11 @@ export const extractGridCells = {
2862
3076
  aspectRatio: z.string().optional().describe("Output aspect ratio, one the seat offers. Default: the ratio nearest the grid's own shape."),
2863
3077
  prompt: z.string().max(2500).optional().describe('Words for every cell (what the shot is). On the default seat @name and #look attach their pictures; the crop is image 1.'),
2864
3078
  referenceAssetIds: z.array(z.string()).max(13).optional().describe('Pictures added beside the crop (default seat only), UUIDs or badge codes.'),
2865
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate after explicit user OK.'),
3079
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
2866
3080
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
2867
3081
  }),
2868
3082
  async run(input, ctx) {
3083
+ requireGuideRead(ctx, input.model ?? toolModelFor('grid-extract'));
2869
3084
  const desktop = ctx.desktop();
2870
3085
  await desktop.requireCapability('grid-extract', 'extracting grid cells');
2871
3086
  if (input.background)
@@ -3067,10 +3282,38 @@ export function videoCostKey(input) {
3067
3282
  }
3068
3283
  return `${tier}-${input.duration}s${input.sound !== false ? '-audio' : ''}`;
3069
3284
  }
3285
+ if (input.model === 'kling-v4.0') {
3286
+ // Mirrors kling4CreditKey() in slate/src/shared/pricing.ts. Output seconds
3287
+ // at the chosen resolution, flat: sound is always on and multi-shot does
3288
+ // not move the price (a multi-shot take bills the sum of its shots, which
3289
+ // is the duration the desktop quotes). Never `kling-v3-…`: a v4 key must
3290
+ // not resolve to a 3.0 row.
3291
+ const res = input.videoResolution ?? defaultVideoResolutionFor(input.model);
3292
+ return `kling-v4-${res}-${input.duration}s`;
3293
+ }
3070
3294
  if (input.model === 'omni-flash') {
3071
- // Mirrors omniFlashCreditKey() in slate/src/shared/pricing.ts — flat 720p
3072
- // rate, audio native + included, no resolution/audio key dimension.
3073
- return `omni-flash-${input.duration}s`;
3295
+ // Mirrors omniFlashCreditKey() in slate/src/shared/pricing.ts. Omni Flash
3296
+ // 1.1 prices each output second by resolution, so the key carries it. Audio
3297
+ // is native and included, and references do not move fal's 1.1 price.
3298
+ // 1.0's flat `omni-flash-{N}s` keys are legacy: only desktops released
3299
+ // before the swap send them.
3300
+ const res = input.videoResolution ?? defaultVideoResolutionFor(input.model);
3301
+ return `omni-flash-${res}-${input.duration}s`;
3302
+ }
3303
+ if (input.model === 'wan-3.0') {
3304
+ // Mirrors wanCreditKey() in slate/src/shared/pricing.ts. Output seconds at
3305
+ // the chosen resolution. A reference video adds its own seconds ("billed in
3306
+ // addition to output duration", fal) and flips to `-vref-{res}-{T}s`,
3307
+ // T = in + out. Sound on or off, reference images and reference audio do
3308
+ // not move the price.
3309
+ const res = input.videoResolution ?? defaultVideoResolutionFor(input.model);
3310
+ const vrefSecs = input.videoRefSeconds ?? 0;
3311
+ if (vrefSecs > 0) {
3312
+ // ceil(x - 0.05) matches the server's probe rounding, so quote = bill.
3313
+ const total = Math.min(WAN_3_VREF_MAX_TOTAL, Math.ceil(vrefSecs - 0.05) + input.duration);
3314
+ return `wan-3.0-vref-${res}-${total}s`;
3315
+ }
3316
+ return `wan-3.0-${res}-${input.duration}s`;
3074
3317
  }
3075
3318
  throw new Error(`Unknown video model: ${input.model}`);
3076
3319
  }
@@ -3084,9 +3327,11 @@ export function klingEditCostKey(model, duration) {
3084
3327
  }
3085
3328
  // Omni Flash video-edit cost key — mirrors omniFlashCreditKey() in
3086
3329
  // slate/src/shared/pricing.ts (must byte-match; checked by the slates-api
3087
- // pricing-consistency script). Duration is the CEILED source-clip length.
3088
- export function omniFlashEditCostKey(duration) {
3089
- return `omni-flash-edit-${duration}s`;
3330
+ // pricing-consistency script). Duration is the CEILED source-clip length. The
3331
+ // resolution is the output's, because Omni Flash 1.1 prices edit seconds by it.
3332
+ export function omniFlashEditCostKey(duration, videoResolution) {
3333
+ const res = videoResolution ?? defaultVideoResolutionFor('omni-flash-edit');
3334
+ return `omni-flash-edit-${res}-${duration}s`;
3090
3335
  }
3091
3336
  /** Max billed (input + output) seconds on a Seedance video-reference gen.
3092
3337
  * 2.0: refs 2–15s + output 4–15s. 2.5: refs to 30s + output to 30s. */
@@ -3253,6 +3498,22 @@ function resolveVideoModel(raw) {
3253
3498
  'gemini-omni-flash': 'omni-flash',
3254
3499
  'gemini-omni-flash-preview': 'omni-flash',
3255
3500
  'omni-flash-preview': 'omni-flash',
3501
+ 'gemini-omni-1.1-flash': 'omni-flash',
3502
+ 'gemini-omni-flash-1.1': 'omni-flash',
3503
+ 'omni-flash-1.1': 'omni-flash',
3504
+ 'wan-3': 'wan-3.0',
3505
+ 'wan-3-0': 'wan-3.0',
3506
+ 'wan3': 'wan-3.0',
3507
+ 'wan3.0': 'wan-3.0',
3508
+ 'alibaba-wan-3.0': 'wan-3.0',
3509
+ wan: 'wan-3.0',
3510
+ // Kling 4.0 spellings. The bare `kling` and `kling-v3` keep meaning 3.0,
3511
+ // the default Kling.
3512
+ 'kling-v4': 'kling-v4.0',
3513
+ 'kling-v4-0': 'kling-v4.0',
3514
+ 'kling-4': 'kling-v4.0',
3515
+ 'kling-4.0': 'kling-v4.0',
3516
+ 'kling4': 'kling-v4.0',
3256
3517
  // The MAX and TURBO spellings must come out as themselves. Bare `minimax`,
3257
3518
  // `h3` and `hailuo-3` all mean the BASE row — it holds the full ladder and
3258
3519
  // the references, and it is cheaper than Max at the tier they share.
@@ -3333,8 +3594,8 @@ export const generateVideo = {
3333
3594
  description: 'Generate video via Slates credits. Choose the model with slates-model-selection. Video models prompt very differently: the estimate returns the chosen model\'s prompting card, and its full guide (' +
3334
3595
  VIDEO_MODEL_GUIDES +
3335
3596
  ') covers modes the card leaves out, via slates_get_prompting_guide. Read slates-content-policy when the scene involves conflict, creatures, crowds, destruction, weapons, or young characters. projectId, aspectRatio, and duration are required (requires_clarification otherwise). ' +
3336
- CONFIRM_GATE_SENTENCE +
3337
- ' Image-to-video via firstFrameAssetId; first+last frames on every model except Omni Flash; ingredients via ingredientAssetIds (Kling Omni, Seedance, Omni Flash, H3 and H3 Max; Kling Std/Pro only with a first frame). Asset params take UUIDs or badge codes ("IMG-A8"). ' +
3597
+ confirmGateSentence('any image reference (frame, ingredient, character, environment or style)') +
3598
+ ' Image-to-video via firstFrameAssetId; a last frame via lastFrameAssetId and ingredients via ingredientAssetIds, each param stating which models take it. Asset params take UUIDs or badge codes ("IMG-A8"). ' +
3338
3599
  // GENERATED from the skill's own slop-token list. Always in context on both
3339
3600
  // surfaces, so it survives an agent that skips slates_get_prompting_guide.
3340
3601
  describeBannedTokens('video'),
@@ -3371,7 +3632,7 @@ export const generateVideo = {
3371
3632
  // demand, by the one session that needs it. If you are about to explain
3372
3633
  // WHY here, you are writing the skill in the wrong file.
3373
3634
  firstFrameAssetId: z.string().optional().describe('Starting frame for image-to-video (UUID or badge code, resolved at call time).'),
3374
- lastFrameAssetId: z.string().optional().describe('Ending frame; every model except Omni Flash. Pairs with firstFrameAssetId.'),
3635
+ lastFrameAssetId: z.string().optional().describe('Ending frame. Pairs with firstFrameAssetId.'),
3375
3636
  ingredientAssetIds: z.array(z.string()).max(30).optional().describe(
3376
3637
  // Caps DERIVED from MODEL_CAPABILITIES — the hand-typed list omitted
3377
3638
  // kling-v3.0-omni-pro entirely and read as if 7 were an Omni Flash-only rule.
@@ -3386,19 +3647,19 @@ export const generateVideo = {
3386
3647
  // The capacity sentences are DERIVED from MODEL_FACTS (see
3387
3648
  // multimodalRefSummary) rather than hand-typed, so a cap change in one
3388
3649
  // place cannot leave a stale number in a description an LLM reads.
3389
- videoReferenceAssetIds: z.array(z.string()).optional().describe(`Reference VIDEOS, cited in the prompt as "video 1", "video 2"… in the order given. ${multimodalRefModels().join(' / ')} only; per-model caps are on audioReferenceAssetIds. On Seedance, billing switches to the vref key (input+output seconds) — pass videoReferenceSecondsEach. Over the cap is REFUSED, never trimmed.`),
3650
+ videoReferenceAssetIds: z.array(z.string()).optional().describe(`Reference VIDEOS, cited in the prompt as "video 1", "video 2"… in the order given. ${multimodalRefModels().join(' / ')} only; per-model caps are on audioReferenceAssetIds. On Seedance and Wan 3.0, billing switches to the vref key (input+output seconds); Omni Flash caps each clip at ${omniFlashRefClipMax}s. Pass videoReferenceSecondsEach. Over the cap is REFUSED, never trimmed.`),
3390
3651
  videoReferenceSecondsEach: z.array(z.number()).optional().describe('REQUIRED with videoReferenceAssetIds, same order and length: each clip\'s duration in seconds. Feeds the vref cost key; the server re-probes and corrects an understated value upward.'),
3391
3652
  audioReferenceAssetIds: z.array(z.string()).optional().describe(`Reference AUDIO, cited as "audio 1", "audio 2"… in the order given. ${multimodalRefModels().join(' / ')} only. No surcharge on Seedance; on H3 Max, audio counts toward the reference-token pool. ${multimodalRefModels().map(multimodalRefSummary).join(' ')}`),
3392
3653
  audioReferenceSpokenText: z.array(z.string()).optional().describe('The exact words in each reference clip — same order and length as audioReferenceAssetIds, "" for a clip with no speech. The model RE-TRANSCRIBES a take rather than using it verbatim, so audio decides voice/accent/timing and only this decides the WORDS. Omit it and the words are a guess.'),
3393
- sound: z.boolean().optional().describe('Kling (every tier) and LTX: sound on (default) or silent (false); Kling bills audio as its own key. Seedance, Omni Flash and H3 always generate audio.'),
3394
- audioLanguage: z.enum(['EN', 'ZH', 'JA', 'KO', 'ES']).optional().describe('Any Kling model with sound on — language for dialogue.'),
3395
- generateMusic: z.boolean().optional().describe('Any Kling model with sound on — auto-generate background music.'),
3396
- seedanceFace: z.boolean().optional().describe('Seedance ONLY: a reference shows an AI CHARACTER\'s face. Without it, faces are blocked; with it the generation costs ~45% more. A REAL person fails here with [REAL_FACE_DETECTED] — see seedanceRealFace.'),
3397
- seedanceRealFace: z.boolean().optional().describe('Seedance ONLY: a reference shows a REAL person. The real-person tier, about 1.4x the Face price (about 2x faceless) — quote it first. REQUIRES realFaceConsent=true.'),
3654
+ sound: z.boolean().optional().describe('Kling 3.0 (every tier), LTX and Wan 3.0: sound on (default) or silent (false); Kling 3.0 bills audio as its own key. Seedance, Omni Flash, H3 and Kling 4.0 always generate audio.'),
3655
+ audioLanguage: z.enum(['EN', 'ZH', 'JA', 'KO', 'ES']).optional().describe('Any Kling 3.0 model with sound on — language for dialogue.'),
3656
+ generateMusic: z.boolean().optional().describe('Any Kling 3.0 model with sound on — auto-generate background music.'),
3657
+ seedanceFace: z.boolean().optional().describe('Seedance only: a reference shows an AI character\'s face. Without it, faces are blocked; the estimate prices it. A real person fails here with [REAL_FACE_DETECTED]; see seedanceRealFace.'),
3658
+ seedanceRealFace: z.boolean().optional().describe('Seedance ONLY: a reference shows a REAL person. The real-person tier, priced above Face: estimate it with the flag set first. REQUIRES realFaceConsent=true.'),
3398
3659
  realFaceConsent: z.boolean().optional().describe('MANDATORY with seedanceRealFace: true ONLY after the user has explicitly confirmed they hold rights/consent to this likeness and it does not impersonate or misrepresent them. Refused without it; public figures fail on every tier.'),
3399
3660
  negativePrompt: z.string().optional(),
3400
3661
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
3401
- confirm: z.boolean().optional().describe('Set true after explicit user OK to bypass the confirm gate (which fires for almost every video gen since they\'re expensive).'),
3662
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
3402
3663
  folderId: folderIdField,
3403
3664
  }),
3404
3665
  async run(input, ctx) {
@@ -3416,6 +3677,7 @@ export const generateVideo = {
3416
3677
  `pass the base id and set duration / videoResolution as separate params.`);
3417
3678
  }
3418
3679
  input.model = resolved.model;
3680
+ requireGuideRead(ctx, input.model);
3419
3681
  if (input.duration == null && resolved.duration != null)
3420
3682
  input.duration = resolved.duration;
3421
3683
  if (input.videoResolution == null && resolved.videoResolution != null)
@@ -3472,31 +3734,101 @@ export const generateVideo = {
3472
3734
  const capErr = assertVideoCapabilities(input);
3473
3735
  if (capErr)
3474
3736
  return ok(capErr);
3475
- // Omni Flash's SHAPE constraints — t2v, single-start-frame i2v, or ref2v
3476
- // with reference IMAGES. No last frame, no video/audio refs. (Its duration
3477
- // and resolution are covered by the capability gate above; the 3-10s check
3478
- // that used to live here was a hand-typed duplicate of registry data.)
3737
+ // Omni Flash 1.1's SHAPE constraints. Frames ride image-to-video (a start
3738
+ // frame and an optional end frame); references ride reference-to-video (up
3739
+ // to 10 images and 3 videos, each within the per-clip cap). With references, the desktop
3740
+ // sends a start frame as reference image 1 (as it did on 1.0), so it counts
3741
+ // toward the image cap; a last frame has no slot there and is refused. There
3742
+ // is no audio reference at all (Google: "Uploading audio references is
3743
+ // unsupported"). Counts are read from the capability SSOT; duration and
3744
+ // resolution are covered by the capability gate above.
3479
3745
  if (input.model === 'omni-flash') {
3480
- if (input.lastFrameAssetId ||
3481
- input.videoReferenceAssetId || input.audioReferenceAssetId ||
3482
- (input.videoReferenceAssetIds?.length ?? 0) > 0 ||
3483
- (input.audioReferenceAssetIds?.length ?? 0) > 0) {
3484
- return ok({
3485
- requires_clarification: true,
3486
- missing: [],
3487
- message: `Omni Flash takes a prompt, an optional start frame, and up to ${omniFlashRefCap} reference IMAGES — last frames and video/audio references are not supported. Drop those, or switch to seedance-2.5 (video/audio refs, last frame).`,
3488
- });
3746
+ const cap = getModelCapability('omni-flash');
3747
+ const maxVideos = cap?.maxReferenceVideos ?? 0;
3748
+ const videoRefs = (input.videoReferenceAssetIds?.length ?? 0) + (input.videoReferenceAssetId ? 1 : 0);
3749
+ const audioRefs = (input.audioReferenceAssetIds?.length ?? 0) + (input.audioReferenceAssetId ? 1 : 0);
3750
+ const imageRefs = (input.ingredientAssetIds?.length ?? 0) +
3751
+ (input.characterAssetIds?.length ?? 0) +
3752
+ (input.environmentAssetIds?.length ?? 0) +
3753
+ (input.styleAssetIds?.length ?? 0);
3754
+ const hasRefs = imageRefs + videoRefs > 0;
3755
+ const refCount = imageRefs + (hasRefs && input.firstFrameAssetId ? 1 : 0);
3756
+ const shapeError = audioRefs > 0
3757
+ ? 'Omni Flash takes no audio references. Drop them, or switch to seedance-2.5 or wan-3.0, which read reference audio.'
3758
+ : hasRefs && input.lastFrameAssetId
3759
+ ? 'Omni Flash takes a last frame only without references: references ride a different endpoint, with no end-frame slot. Drop the last frame or the references.'
3760
+ : input.lastFrameAssetId && !input.firstFrameAssetId
3761
+ ? 'Omni Flash needs a start frame (firstFrameAssetId) with a last frame.'
3762
+ : refCount > omniFlashRefCap
3763
+ ? `Omni Flash takes at most ${omniFlashRefCap} reference images combined, a start frame included (you passed ${refCount}). Trim the list.`
3764
+ : videoRefs > maxVideos
3765
+ ? `Omni Flash takes at most ${maxVideos} reference videos (you passed ${videoRefs}).`
3766
+ : [input.videoReferenceSeconds ?? 0, ...(input.videoReferenceSecondsEach ?? [])].some((d) => d > omniFlashRefClipMax + 0.05)
3767
+ ? `Each Omni Flash reference video must be ${omniFlashRefClipMax}s or shorter. Trim it first with slates_trim_video.`
3768
+ : null;
3769
+ if (shapeError) {
3770
+ return ok({ requires_clarification: true, missing: [], message: shapeError });
3489
3771
  }
3490
- const refCount = (input.ingredientAssetIds?.length ?? 0) +
3772
+ }
3773
+ // Wan 3.0's SHAPE constraints. The same split as Omni Flash: image-to-video
3774
+ // takes a start frame and an optional end frame, reference-to-video takes
3775
+ // images, videos and audio, and Alibaba calls the two modes "mutually
3776
+ // exclusive". The reference endpoint has no frame slot, so frames with
3777
+ // references are refused, never dropped (the MiniMax H3 rule, slate
3778
+ // .claude/rules/models.md invariant 7). Caps are read from the SSOT.
3779
+ if (input.model === 'wan-3.0') {
3780
+ const cap = getModelCapability('wan-3.0');
3781
+ const imageRefs = (input.ingredientAssetIds?.length ?? 0) +
3491
3782
  (input.characterAssetIds?.length ?? 0) +
3492
3783
  (input.environmentAssetIds?.length ?? 0) +
3493
3784
  (input.styleAssetIds?.length ?? 0);
3494
- if (refCount > omniFlashRefCap) {
3495
- return ok({
3496
- requires_clarification: true,
3497
- missing: [],
3498
- message: `Omni Flash takes at most ${omniFlashRefCap} reference images combined (you passed ${refCount}). Trim the list.`,
3499
- });
3785
+ const videoRefs = (input.videoReferenceAssetIds?.length ?? 0) + (input.videoReferenceAssetId ? 1 : 0);
3786
+ const audioRefs = (input.audioReferenceAssetIds?.length ?? 0) + (input.audioReferenceAssetId ? 1 : 0);
3787
+ const refImages = imageRefs;
3788
+ const refAll = refImages + videoRefs + audioRefs;
3789
+ const videoSecs = [input.videoReferenceSeconds ?? 0, ...(input.videoReferenceSecondsEach ?? [])].reduce((n, d) => n + (d > 0 ? d : 0), 0);
3790
+ const maxVideoSecs = cap?.maxReferenceVideoSeconds ?? 15;
3791
+ const overCap = [
3792
+ [refImages, cap?.maxIngredientImages, 'reference images'],
3793
+ [videoRefs, cap?.maxReferenceVideos, 'reference videos'],
3794
+ [audioRefs, cap?.maxReferenceAudio, 'reference audio clips'],
3795
+ [refAll, cap?.maxReferenceFilesTotal, 'reference files across all types'],
3796
+ ].find(([n, max]) => max !== undefined && n > max);
3797
+ const shapeError = refAll > 0 && (input.firstFrameAssetId || input.lastFrameAssetId)
3798
+ ? 'Wan 3.0 takes first/last frames OR references, not both: Alibaba calls the two modes mutually exclusive. Drop one side.'
3799
+ : input.lastFrameAssetId && !input.firstFrameAssetId
3800
+ ? 'Wan 3.0 needs a start frame (firstFrameAssetId) with a last frame.'
3801
+ : overCap
3802
+ ? `Wan 3.0 takes at most ${overCap[1]} ${overCap[2]} (you passed ${overCap[0]}).`
3803
+ : videoSecs > maxVideoSecs + 0.05
3804
+ ? `Wan 3.0 takes at most ${maxVideoSecs}s of reference video in total (you passed ${videoSecs.toFixed(1)}s). Trim a clip first with slates_trim_video.`
3805
+ : null;
3806
+ if (shapeError) {
3807
+ return ok({ requires_clarification: true, missing: [], message: shapeError });
3808
+ }
3809
+ }
3810
+ // Kling 4.0's SHAPE constraint: FRAMES, NEVER REFERENCES. Only fal's
3811
+ // `kling/v4/image-to-video` (start frame plus an optional end frame) and
3812
+ // `kling/v4/text-to-video` are sold; its reference-to-video is not, so a
3813
+ // reference id has no transport and is refused rather than dropped (the
3814
+ // LTX rule below). An end frame needs the start frame: text-to-video has
3815
+ // no frame slot at all.
3816
+ if (input.model === 'kling-v4.0') {
3817
+ const refs = (input.ingredientAssetIds?.length ?? 0) +
3818
+ (input.characterAssetIds?.length ?? 0) +
3819
+ (input.environmentAssetIds?.length ?? 0) +
3820
+ (input.styleAssetIds?.length ?? 0) +
3821
+ (input.videoReferenceAssetIds?.length ?? 0) +
3822
+ (input.audioReferenceAssetIds?.length ?? 0) +
3823
+ (input.videoReferenceAssetId ? 1 : 0) +
3824
+ (input.audioReferenceAssetId ? 1 : 0);
3825
+ const shapeError = refs > 0
3826
+ ? 'kling-v4.0 takes a prompt and up to two frames (start and/or end); it reads no reference images, video or audio. Drop them, or switch to kling-v3.0-omni, which reads reference images.'
3827
+ : input.lastFrameAssetId && !input.firstFrameAssetId
3828
+ ? 'kling-v4.0 needs a start frame (firstFrameAssetId) with a last frame.'
3829
+ : null;
3830
+ if (shapeError) {
3831
+ return ok({ requires_clarification: true, missing: [], message: shapeError });
3500
3832
  }
3501
3833
  }
3502
3834
  // LTX-2.5's SHAPE constraint: FRAMES, NEVER REFERENCES. fal publishes
@@ -3696,21 +4028,24 @@ export const generateVideo = {
3696
4028
  // The quote needs a length for EVERY reference clip, in both shapes. A
3697
4029
  // missing one doesn't fail the generation (the server probes and corrects
3698
4030
  // upward) — it silently under-quotes, which is worse than asking.
4031
+ // Wan 3.0 bills reference video seconds on top of output seconds too, and
4032
+ // Omni Flash's per-clip cap needs every length to check.
3699
4033
  const isSeedance = input.model.startsWith('seedance');
3700
- if (input.videoReferenceAssetId && isSeedance && !input.videoReferenceSeconds) {
4034
+ const needsRefSeconds = isSeedance || input.model === 'wan-3.0' || input.model === 'omni-flash';
4035
+ if (input.videoReferenceAssetId && needsRefSeconds && !input.videoReferenceSeconds) {
3701
4036
  return ok({
3702
4037
  requires_clarification: true,
3703
4038
  missing: ['videoReferenceSeconds'],
3704
- message: 'A Seedance video reference bills on combined input+output seconds (on a 2.5 Face row, max(input, output) + output). Pass videoReferenceSeconds (the reference clip\'s duration, shown in slates_list_assets) so the pre-flight quote matches the bill.',
4039
+ message: `A Seedance or Wan 3.0 video reference bills on combined input+output seconds (on a Seedance 2.5 Face row, max(input, output) + output), and Omni Flash caps each clip at ${omniFlashRefClipMax}s. Pass videoReferenceSeconds (the reference clip's duration, shown in slates_list_assets) so the pre-flight quote matches the bill.`,
3705
4040
  });
3706
4041
  }
3707
4042
  const pluralRefCount = input.videoReferenceAssetIds?.length ?? 0;
3708
- if (pluralRefCount > 0 && isSeedance &&
4043
+ if (pluralRefCount > 0 && needsRefSeconds &&
3709
4044
  (input.videoReferenceSecondsEach?.length ?? 0) !== pluralRefCount) {
3710
4045
  return ok({
3711
4046
  requires_clarification: true,
3712
4047
  missing: ['videoReferenceSecondsEach'],
3713
- message: `A Seedance video reference bills on combined input+output seconds (on a 2.5 Face row, max(input, output) + output). Pass videoReferenceSecondsEach with exactly ${pluralRefCount} duration${pluralRefCount === 1 ? '' : 's'}, in the same order as videoReferenceAssetIds (durations are shown in slates_list_assets), so the pre-flight quote matches the bill.`,
4048
+ message: `A Seedance or Wan 3.0 video reference bills on combined input+output seconds (on a Seedance 2.5 Face row, max(input, output) + output), and Omni Flash caps each clip at ${omniFlashRefClipMax}s. Pass videoReferenceSecondsEach with exactly ${pluralRefCount} duration${pluralRefCount === 1 ? '' : 's'}, in the same order as videoReferenceAssetIds (durations are shown in slates_list_assets), so the pre-flight quote matches the bill.`,
3714
4049
  });
3715
4050
  }
3716
4051
  const cloud = ctx.cloud();
@@ -3906,7 +4241,7 @@ export const generateVideo = {
3906
4241
  */
3907
4242
  export const listVoices = {
3908
4243
  id: 'slates_list_voices',
3909
- description: `Browse ${TTS_MODEL} preset voices. Pass a returned voiceId to slates_generate_audio. Filters AND together.`,
4244
+ description: `Browse the ${TTS_MODEL} preset voices; browsing spends nothing. Pass a returned voiceId to slates_generate_audio with model ${TTS_MODEL}. Filters AND together.`,
3910
4245
  input: z.object({
3911
4246
  gender: z.string().optional().describe('male | female'),
3912
4247
  accent: z.string().optional().describe('Region ("GB") or languageCode ("en-GB"); available accents come from the shelf.'),
@@ -3948,7 +4283,7 @@ export const listVoices = {
3948
4283
  line: shelf.line,
3949
4284
  count: voices.length,
3950
4285
  voices,
3951
- next: `Pass a voiceId to slates_generate_audio (model ${TTS_MODEL}) as voiceId. To keep one on a character for reuse, generate a clip with it and set slates_update_character voiceAssetId.`,
4286
+ next: `Pass a voiceId to slates_generate_audio (model ${TTS_MODEL}) as voiceId. To keep one for reuse, generate a clip with it and set it as a Library item's voice (slates_update_library_item voiceAssetId).`,
3952
4287
  });
3953
4288
  },
3954
4289
  };
@@ -3956,9 +4291,9 @@ export const listVoices = {
3956
4291
  export const generateAudio = {
3957
4292
  id: 'slates_generate_audio',
3958
4293
  billable: true,
3959
- description: `Generate project audio using credits. Choose the surface via the model routing below. ` +
4294
+ description: `Generate speech (voice-over), a scene sound bed or a sound effect into a project, using credits. The model param lists the surfaces and their routing. ` +
3960
4295
  'The estimate returns the chosen surface\'s prompting card; its full guide (slates-prompting-seed-audio | slates-prompting-elevenlabs | slates-prompting-inworld-tts) covers what the card leaves out. ' +
3961
- 'Seed Audio bills the requested duration, which is appended to the prompt regardless of output length. Kling "SFX:" / "Ambient noise:" syntax does not transfer. ' +
4296
+ 'Seed Audio bills the requested duration, which is appended to the prompt regardless of output length. ' +
3962
4297
  CONFIRM_GATE_SENTENCE,
3963
4298
  input: z.object({
3964
4299
  projectId: z.string().uuid().describe('Slates project the audio asset lands in. Required — the renderer refreshes live.'),
@@ -3994,7 +4329,7 @@ export const generateAudio = {
3994
4329
  .min(TTS_VOICE_CLONE.designPromptChars.min)
3995
4330
  .max(TTS_VOICE_CLONE.designPromptChars.max)
3996
4331
  .optional()
3997
- .describe(`${TTS_MODEL} — a voice from words (${TTS_VOICE_CLONE.designPromptChars.min}-${TTS_VOICE_CLONE.designPromptChars.max} chars) for a character with no recording; keep it via slates_update_character voiceAssetId.`),
4332
+ .describe(`${TTS_MODEL} — a voice from words (${TTS_VOICE_CLONE.designPromptChars.min}-${TTS_VOICE_CLONE.designPromptChars.max} chars) for a character with no recording; keep it via slates_update_library_item voiceAssetId.`),
3998
4333
  speed: z.number().min(0.5).max(2).optional().describe('seed-audio only — 0.5-2.0. Reach for it when dialogue races or drags against picture.'),
3999
4334
  volume: z.number().min(0.5).max(2).optional().describe('seed-audio only — output gain, 0.5-2.0 (1 = unchanged). Prefer the timeline fader for mix decisions.'),
4000
4335
  pitch: z.number().int().min(-12).max(12).optional().describe('seed-audio only — semitones. Small moves; ±3 is already a lot.'),
@@ -4011,10 +4346,11 @@ export const generateAudio = {
4011
4346
  .optional()
4012
4347
  .describe('seed-audio only — ONE image asset to score what is in frame. MUTUALLY EXCLUSIVE with audioReferenceAssetIds.'),
4013
4348
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
4014
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate after explicit user OK.'),
4349
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
4015
4350
  folderId: folderIdField,
4016
4351
  }),
4017
4352
  run: async (input, ctx) => {
4353
+ requireGuideRead(ctx, input.model);
4018
4354
  // A desktop before the folder rule ignores folderId and files at the root.
4019
4355
  if (input.folderId !== undefined)
4020
4356
  await ctx.desktop().requireCapability('media-folder', 'choosing the folder a result lands in');
@@ -4052,7 +4388,7 @@ export const generateAudio = {
4052
4388
  return ok({
4053
4389
  requires_clarification: true,
4054
4390
  missing: ['voiceId'],
4055
- message: `${TTS_MODEL} needs a voice — exactly one of three. Speaking AS a character: pass its voiceAssetId (slates_list_characters) as voiceReferenceAssetId. A stock voice: slates_list_voices lists presets by gender, accent and age; pass one's voiceId. No recording of the voice: voiceDescription (words), or voiceReferenceAssetId with any clean clip of one speaker. A voice worth reusing can be kept on a character with slates_update_character, but nothing requires that — ask the user which they want only when the request does not say.`,
4391
+ message: `${TTS_MODEL} needs a voice — exactly one of three. Speaking AS a character: pass its voiceAssetId (slates_list_characters) as voiceReferenceAssetId. A stock voice: slates_list_voices lists presets by gender, accent and age; pass one's voiceId. No recording of the voice: voiceDescription (words), or voiceReferenceAssetId with any clean clip of one speaker. A voice worth reusing can be kept on a Library item with slates_update_library_item, but nothing requires that — ask the user which they want only when the request does not say.`,
4056
4392
  });
4057
4393
  }
4058
4394
  if (voiceSources.length > 1) {
@@ -4211,21 +4547,21 @@ async function quoteToolBlocks(ctx, stem, seconds, voiceStep) {
4211
4547
  export const generateLipSync = {
4212
4548
  id: 'slates_generate_lip_sync',
4213
4549
  billable: true,
4214
- description: 'Lip-sync a still image (avatar) or a video clip to audio. KLING-ONLY — this tool wraps Kling\'s dedicated lip-sync endpoints and nothing else: sourceType=video re-syncs a clip, sourceType=image animates a still avatar (avatar-standard, or avatar-pro for the premium seat). Quote each with slates_estimate_generation_cost rather than from memory. Audio from TTS (ttsText + ttsVoice) or an uploaded file. Billed per 5s of the output (the clip, or on a still the voice track). For a Seedance version, do NOT look for an engine switch here — run a normal slates_generate_video on seedance-2 with the clip attached as a video reference and the dialogue written into the prompt; that is the same call, with the prompt visible and editable. The craft is slates-prompting-lip-sync; the confirm response shows the exact cost before anything is charged. projectId is REQUIRED. ' +
4215
- CONFIRM_GATE_SENTENCE,
4550
+ description: 'Lip-sync a still image (avatar) or a video clip to audio. Kling only: this tool wraps Kling\'s dedicated lip-sync endpoints and nothing else: sourceType=video re-syncs a clip, sourceType=image animates a still avatar (avatar-standard, or avatar-pro for the premium seat). Quote each with slates_estimate_generation_cost rather than from memory. Audio from TTS (ttsText + ttsVoice) or an uploaded file. Billed per 5s of the output (the clip, or on a still the voice track). For a Seedance version there is no engine switch here: run a normal slates_generate_video on seedance-2 with the clip attached as a video reference and the dialogue written into the prompt; that is the same call, with the prompt visible and editable. The craft is slates-prompting-lip-sync; the confirm response shows the exact cost before anything is charged. projectId is required. ' +
4551
+ confirmGateSentence('a length it cannot read'),
4216
4552
  input: z.object({
4217
4553
  projectId: z.string().uuid().describe('Slates project the source asset lives in. The new lip-synced video lands here.'),
4218
- sourceAssetId: z.string().uuid().describe('Asset id of the still image (avatar flow) or video clip (lip-sync flow). Must already exist in the project — use slates_upload_reference_image or slates_generate_image / slates_generate_video first if needed.'),
4554
+ sourceAssetId: z.string().uuid().describe('Asset id of the still image (avatar flow) or video clip (lip-sync flow). Must already exist in the project — use slates_upload_reference_image or slates_generate_image / slates_generate_video first if needed. ' + ASSET_UUID_ONLY),
4219
4555
  sourceType: z.enum(['image', 'video']).describe('"image" = animate a still portrait (avatar). "video" = re-sync an existing talking-head clip. Determines pricing — be deliberate.'),
4220
4556
  audioMethod: z.enum(['tts', 'upload']).describe('"tts" = generate speech from ttsText. "upload" = use the file at audioFilePath (absolute path on the user\'s machine).'),
4221
- ttsText: z.string().min(1).max(2000).optional().describe('Required when audioMethod=tts. The exact words the avatar/clip will speak.'),
4557
+ ttsText: z.string().min(1).max(2000).optional().describe('Required when audioMethod=tts. The exact words the avatar/clip will speak, up to 120 characters (longer is cut off); for a longer line upload audio or make it with slates_generate_audio.'),
4222
4558
  ttsVoice: z.string().optional().describe('Voice id (e.g. "oversea_male1"). See slates-prompting-lip-sync skill for the voice catalog.'),
4223
4559
  ttsLanguage: z.enum(['EN', 'ZH', 'JA', 'KO', 'ES']).optional().describe('TTS language. Default EN.'),
4224
4560
  ttsSpeed: z.number().min(0.5).max(2).optional().describe('TTS speech rate. Default 1.0. Range 0.5-2.0.'),
4225
4561
  audioFilePath: z.string().optional().describe('Required when audioMethod=upload. Absolute path to the audio file on the user\'s machine (mp3, wav, m4a).'),
4226
- avatarModel: z.enum(['avatar-standard', 'avatar-pro']).optional().describe('Image-source only. avatar-standard (~14 credits/5s) for general use. avatar-pro (~29 credits/5s) for sharper face fidelity.'),
4562
+ avatarModel: z.enum(['avatar-standard', 'avatar-pro']).optional().describe('Image-source only. avatar-standard for general use; avatar-pro for sharper face fidelity. Price each with slates_estimate_generation_cost.'),
4227
4563
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
4228
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate. Required for avatar-pro.'),
4564
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
4229
4565
  }),
4230
4566
  async run(input, ctx) {
4231
4567
  if (input.audioMethod === 'tts' && !input.ttsText) {
@@ -4245,6 +4581,7 @@ export const generateLipSync = {
4245
4581
  const stem = input.sourceType === 'video'
4246
4582
  ? 'kling-lip-sync-video'
4247
4583
  : input.avatarModel === 'avatar-pro' ? 'kling-lip-sync-avatar-pro' : 'kling-lip-sync-avatar';
4584
+ requireGuideRead(ctx, stem);
4248
4585
  // Billed per 5s block of the output: the clip's length on a video source;
4249
4586
  // on a still, the voice track's — typed words at the desktop's reading pace
4250
4587
  // (`lipSyncEstimate`, 13 characters a second, so this quote is the Generate
@@ -4333,24 +4670,25 @@ export const generateLipSync = {
4333
4670
  export const generateMotionTransfer = {
4334
4671
  id: 'slates_generate_motion_transfer',
4335
4672
  billable: true,
4336
- description: 'Transfer the motion from a reference video onto a target image character. KLING-ONLY — this tool wraps Kling Motion Control and nothing else: kling-mc-std or kling-mc-pro, structured skeleton/depth retargeting, billed per 5s of the driving clip. For a Seedance version, do NOT look for an engine switch here — run a normal slates_generate_video on seedance-2 with the driving clip attached as a video reference and the motion described in the prompt ("the character from image 1 performs the exact motion from video 1"); that is the same call, with the prompt visible and editable. The craft is slates-prompting-motion-transfer; the confirm response shows the exact cost before anything is charged. projectId is REQUIRED — both assets must exist in the project. ' +
4337
- CONFIRM_GATE_SENTENCE,
4673
+ description: 'Transfer the motion from a reference video onto a target image character. KLING-ONLY — this tool wraps Kling Motion Control and nothing else: kling-mc-std or kling-mc-pro, structured skeleton/depth retargeting, billed per 5s of the driving clip. For a Seedance version there is no engine switch here: run a normal slates_generate_video on seedance-2 with the driving clip attached as a video reference and the motion described in the prompt ("the character from image 1 performs the exact motion from video 1"); that is the same call, with the prompt visible and editable. The craft is slates-prompting-motion-transfer; the confirm response shows the exact cost before anything is charged. projectId is REQUIRED — both assets must exist in the project. ' +
4674
+ confirmGateSentence('a source length it cannot read'),
4338
4675
  input: z.object({
4339
4676
  projectId: z.string().uuid().describe('Slates project. Both source and target assets must live here.'),
4340
- sourceVideoAssetId: z.string().uuid().describe('Asset id of the reference video — its motion will be retargeted onto the target image. Must already exist in the project. Up to 30s with characterOrientation video, 10s with image; billed per 5s block.'),
4341
- targetImageAssetId: z.string().uuid().describe('Asset id of the target image (the character that will perform the motion). Must already exist in the project.'),
4677
+ sourceVideoAssetId: z.string().uuid().describe(`Asset id of the reference video — its motion will be retargeted onto the target image. Must already exist in the project. Up to ${MOTION_TRANSFER_MAX_SECONDS.video}s with characterOrientation video, ${MOTION_TRANSFER_MAX_SECONDS.image}s with image; billed per 5s block.` + ' ' + ASSET_UUID_ONLY),
4678
+ targetImageAssetId: z.string().uuid().describe('Asset id of the target image (the character that will perform the motion). Must already exist in the project. ' + ASSET_UUID_ONLY),
4342
4679
  motionModel: z.enum(['kling-mc-std', 'kling-mc-pro']).optional().describe('kling-mc-std general motion; kling-mc-pro cleaner anatomy — default. Quote both with slates_estimate_generation_cost.'),
4343
4680
  characterOrientation: z.enum(['video', 'image']).optional().describe('"video" = use the source video\'s framing. "image" = use the target image\'s framing. Default video.'),
4344
4681
  prompt: z.string().optional().describe('Optional refinement. Read slates-prompting-motion-transfer.'),
4345
4682
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
4346
- confirm: z.boolean().optional().describe('Set true to bypass the confirm gate. Required — both tiers exceed.'),
4683
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
4347
4684
  }),
4348
4685
  async run(input, ctx) {
4349
4686
  const motionModel = input.motionModel ?? 'kling-mc-pro';
4687
+ requireGuideRead(ctx, motionModel);
4350
4688
  // Billed per 5s block of the driving clip, which the output follows, up to
4351
4689
  // the orientation's maximum (the desktop's `motionTransferEstimate`).
4352
4690
  const clipSeconds = await recordedSeconds(ctx.desktop(), input.projectId, input.sourceVideoAssetId);
4353
- const seconds = clipSeconds == null ? null : Math.min(clipSeconds, (input.characterOrientation ?? 'video') === 'video' ? 30 : 10);
4691
+ const seconds = clipSeconds == null ? null : Math.min(clipSeconds, MOTION_TRANSFER_MAX_SECONDS[input.characterOrientation ?? 'video']);
4354
4692
  const { costKey, totalCents, blocks } = await quoteToolBlocks(ctx, motionModel, seconds, false);
4355
4693
  // Cost confirm gate. Motion transfer is mechanical — the model
4356
4694
  // applies source motion to target image deterministically. We don't
@@ -4442,26 +4780,27 @@ export const editVideo = {
4442
4780
  // point to in a tool result) and go stale on the next rate change; the
4443
4781
  // windows are owned by MODEL_CAPABILITIES and are generated below into the
4444
4782
  // params that enforce them.
4445
- 'Edit an EXISTING video clip with one instruction — character swap, environment change, style transfer — in one pass, no masking. Original motion, camera, and audio are preserved; only what the prompt names changes. Use when a clip is ~90% right (fix it, don\'t re-roll it) or to AI-edit the user\'s own footage. Engines: Kling O3 edit (default — subject/style refs via elements), omni-flash-edit (PROMPT-ONLY, no refs, priced level with Kling O3 Edit Standard; the first pick in the routing guide for footage-synced edits), or seedance-2.5-edit (the only engine that takes a clip over 15s; seedanceFace:true for AI-character faces). Clip-length and resolution windows per engine are on the `model` param. Cost is per second of OUTPUT (≈ clip length, rounded up), and an edit bills input + output seconds on Seedance and output seconds on Kling and Omni Flash — read the quote from the confirm gate or slates_estimate_generation_cost, never from memory. Subjects to swap IN go as characterAssetIds (frontal + angle images become Kling elements — Kling models only); style refs as styleAssetIds; max 4 combined. The edited clip saves as a NEW asset linked to its parent (chain edits freely). Routing: Kling edit is the default (element lock + audio intact); omni-flash-edit for cheap prompt-only footage-synced swaps; Seedance edit for style-transfer-heavy jobs — see slates-model-selection. Prompting: slates-prompting-kling-v3 §Edit / slates-prompting-omni-flash.',
4783
+ 'Edit an EXISTING video clip with one instruction — character swap, environment change, style transfer — in one pass, no masking. Original motion, camera, and audio are preserved; only what the prompt names changes. Use when a clip is ~90% right (fix it, don\'t re-roll it) or to AI-edit the user\'s own footage. Engine routing, clip-length and resolution windows are on the `model` param (subject and style refs: ' + EDIT_VIDEO_ELEMENT_MODELS.join(' and ') + ' only); seedanceFace:true for AI-character faces on seedance-2.5-edit. Cost is per second: output seconds on Kling and Omni Flash, input + output on Seedance; quote it with slates_estimate_generation_cost. Subjects to swap IN go as characterAssetIds (frontal + angle images become Kling elements — Kling models only); style refs as styleAssetIds; max 4 combined. The edited clip saves as a NEW asset linked to its parent (chain edits freely). Routing: the `model` param and slates-model-selection. Prompting: slates-prompting-kling-v3 §Edit / slates-prompting-omni-flash. ' +
4784
+ confirmGateSentence('any character or style reference'),
4446
4785
  input: z.object({
4447
4786
  projectId: z.string().uuid().describe('Project the source clip lives in.'),
4448
- sourceVideoAssetId: z.string().describe('The VIDEO asset to edit — UUID or badge code ("VID-V3", bare "V3"); codes resolve against the project at call time. Kling: 3–15s clips; omni-flash-edit: 3–10s.'),
4787
+ sourceVideoAssetId: z.string().describe('The VIDEO asset to edit — UUID or badge code ("VID-V3", bare "V3"); codes resolve against the project at call time. Clip-length windows per engine are on `model`.'),
4449
4788
  prompt: z.string().min(1).max(2500).describe('The change, not the whole scene — e.g. "replace the man with @marcus", "make it a rainy night", "turn the street into a neon Tokyo alley". Mention subjects with @name; the transport compiles them to Kling\'s @ElementN notation (Kling models). For omni-flash-edit keep it simple and add "Keep everything else the same."'),
4450
4789
  // Clip windows and resolutions GENERATED from MODEL_CAPABILITIES.
4451
4790
  model: zEnum(EDIT_VIDEO_MODELS).optional().describe(
4452
4791
  // Routing GENERATED from MODEL_FACTS; the paragraph that stood here was
4453
4792
  // hand-written and carried per-second prices, which drift and which the
4454
4793
  // agent's own REAL NUMBERS ONLY rule forbids it repeating.
4455
- `Default kling-v3.0-omni-edit. Neither omni-flash-edit nor seedance-2.5-edit takes character/style refs on this op.\n` +
4794
+ `Default ${EDIT_VIDEO_DEFAULT}. Character and style references: ${EDIT_VIDEO_ELEMENTS_ONLY}\n` +
4456
4795
  `${describeRouting('video', 'edit')}\n` +
4457
4796
  `Source-clip length per engine: ${describeDurations(EDIT_VIDEO_MODELS)}. Output resolution: ${describeVideoResolutions(EDIT_VIDEO_MODELS)}`),
4458
- characterAssetIds: z.array(z.string()).max(4).optional().describe('Subject/element image assets to swap IN (UUIDs or badge codes). Each becomes a Kling element (@ElementN). KLING MODELS ONLY — rejected on omni-flash-edit.'),
4459
- styleAssetIds: z.array(z.string()).max(4).optional().describe('Style/appearance reference images (@ImageN). Max 4 combined with characterAssetIds. KLING MODELS ONLY — rejected on omni-flash-edit.'),
4797
+ characterAssetIds: z.array(z.string()).max(EDIT_VIDEO_ELEMENT_CAP).optional().describe('Subject/element image assets to swap IN (UUIDs or badge codes). Each becomes an element (@ElementN). ' + EDIT_VIDEO_ELEMENTS_ONLY),
4798
+ styleAssetIds: z.array(z.string()).max(EDIT_VIDEO_ELEMENT_CAP).optional().describe(`Style/appearance reference images (@ImageN). Max ${EDIT_VIDEO_ELEMENT_CAP} combined with characterAssetIds. ` + EDIT_VIDEO_ELEMENTS_ONLY),
4460
4799
  keepAudio: z.boolean().optional().describe('Preserve the original audio track (default true; Kling models only — omni-flash-edit and seedance-2.5-edit output carry their own audio).'),
4461
- videoResolution: zEnum(EDIT_VIDEO_RESOLUTIONS).optional().describe(`seedance-2.5-edit ONLY (default ${defaultVideoResolutionFor('seedance-2.5-edit')}). Ignored by the Kling and Omni Flash engines, whose output follows the source clip.`),
4462
- seedanceFace: z.boolean().optional().describe('seedance-2.5-edit ONLY: set true when a CHARACTER FACE is visible in the clip. Without it a face is blocked outright; with it the edit costs about 40-50% more. A face edit submitted without this flag is rejected, not silently downgraded.'),
4800
+ videoResolution: zEnum(EDIT_VIDEO_RESOLUTIONS).optional().describe(`seedance-2.5-edit (default ${defaultVideoResolutionFor('seedance-2.5-edit')}) and omni-flash-edit (default ${defaultVideoResolutionFor('omni-flash-edit')}; its 1080p and 4K are upscales). Ignored by the Kling engines, whose output follows the source clip.`),
4801
+ seedanceFace: z.boolean().optional().describe(`seedance-2.5-edit ONLY: set true when a CHARACTER FACE is visible in the clip. Without it a face is blocked outright; with it the edit is priced higher: quote it with slates_estimate_generation_cost by its cost key as model (${seedanceEditCostKey({ duration: SEEDANCE_25_EDIT_MIN_SECONDS, videoResolution: defaultVideoResolutionFor('seedance-2.5-edit'), seedanceFace: true })} for ${SEEDANCE_25_EDIT_MIN_SECONDS}s at ${defaultVideoResolutionFor('seedance-2.5-edit')}). A face edit submitted without this flag is rejected, not silently downgraded.`),
4463
4802
  background: z.boolean().optional().describe(BACKGROUND_DESCRIBE),
4464
- confirm: z.boolean().optional().describe('Set true to bypass the cost confirm gate after the user OKs the spend.'),
4803
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM),
4465
4804
  folderId: folderIdField,
4466
4805
  }),
4467
4806
  async run(input, ctx) {
@@ -4473,14 +4812,15 @@ export const editVideo = {
4473
4812
  if (input.background) {
4474
4813
  await desktop.requireCapability('background-generation', 'background generation');
4475
4814
  }
4476
- const model = input.model ?? 'kling-v3.0-omni-edit';
4815
+ const model = input.model ?? EDIT_VIDEO_DEFAULT;
4816
+ requireGuideRead(ctx, model);
4477
4817
  const isOmniFlashEdit = model === 'omni-flash-edit';
4478
4818
  const isSeedanceEdit = model === 'seedance-2.5-edit';
4479
4819
  // Source-clip window, read from the capability SSOT per engine — never a
4480
4820
  // model-id ternary. (Kling 3–15s, Omni Flash 3–10s, Seedance 2.5 4–30s.)
4481
4821
  const { min: minClipSeconds, max: maxClipSeconds } = editClipBounds(model);
4482
- if ((isOmniFlashEdit || isSeedanceEdit) && ((input.characterAssetIds?.length ?? 0) > 0 || (input.styleAssetIds?.length ?? 0) > 0)) {
4483
- throw new Error(`${model} takes the prompt and the source clip only on this op — no character/style reference images. Drop the refs, or switch to kling-v3.0-omni-edit which supports elements.`);
4822
+ if (!EDIT_VIDEO_ELEMENT_MODELS.includes(model) && ((input.characterAssetIds?.length ?? 0) > 0 || (input.styleAssetIds?.length ?? 0) > 0)) {
4823
+ throw new Error(`${model} takes the prompt and the source clip only on this op — no character/style reference images. Drop the refs, or switch to ${EDIT_VIDEO_ELEMENT_MODELS.join(' or ')}, which take them.`);
4484
4824
  }
4485
4825
  // Resolve refs (UUIDs or badge codes) against the project AT CALL TIME.
4486
4826
  const refInputs = [
@@ -4494,8 +4834,8 @@ export const editVideo = {
4494
4834
  const characterAssetIds = (input.characterAssetIds ?? []).map(rid);
4495
4835
  const styleAssetIds = (input.styleAssetIds ?? []).map(rid);
4496
4836
  const refEcho = describeResolvedRefs(refInputs, resolved);
4497
- if (characterAssetIds.length + styleAssetIds.length > 4) {
4498
- throw new Error('Kling O3 edit takes max 4 combined subject + style references.');
4837
+ if (characterAssetIds.length + styleAssetIds.length > EDIT_VIDEO_ELEMENT_CAP) {
4838
+ throw new Error(`${model} takes at most ${EDIT_VIDEO_ELEMENT_CAP} subject and style references combined.`);
4499
4839
  }
4500
4840
  // The billed key needs the clip's duration (ceiled). Read it from the
4501
4841
  // project's asset records — the desktop route independently re-validates.
@@ -4528,7 +4868,7 @@ export const editVideo = {
4528
4868
  seedanceFace: input.seedanceFace === true,
4529
4869
  })
4530
4870
  : isOmniFlashEdit
4531
- ? omniFlashEditCostKey(billedSeconds)
4871
+ ? omniFlashEditCostKey(billedSeconds, (input.videoResolution ?? defaultVideoResolutionFor('omni-flash-edit')))
4532
4872
  : klingEditCostKey(model, billedSeconds);
4533
4873
  const cloud = ctx.cloud();
4534
4874
  const registry = await cloud.get('/api/agent/models');
@@ -4609,7 +4949,7 @@ export const editVideo = {
4609
4949
  // ── Trim a video to an exact window (fit-to-model primitive) ────
4610
4950
  export const trimVideo = {
4611
4951
  id: 'slates_trim_video',
4612
- description: 'Trim a video asset to an exact [inSec, outSec] window and save the result as a NEW clip linked to the original (the original is untouched). This is the fit-to-model primitive: an 11s clip will not run on omni-flash-edit (3–10s), a 16s one not on Kling edit (3–15s), and a Seedance 2.0 video reference must be 2–15s (2.5 takes up to 30s combined) — trim it first, then edit the trimmed clip. EXACT re-encode (not a keyframe-snapped cut) so the result honors hard duration caps to the frame; any phone rotation flag is baked into the pixels in the same pass. The new clip lands with correct duration/width/height immediately. inSec defaults to 0. Pass pieces to cut the window into SEVERAL clips in one call, as the Trim & split dialog does (split points, or Auto-split by longest piece, with seconds shared between neighbours); every new clip comes back.',
4952
+ description: 'Trim a video asset to an exact [inSec, outSec] window and save the result as a NEW clip linked to the original (the original is untouched). This is the fit-to-model primitive: when a clip is longer than the edit or reference window the chosen model accepts (its `model` param and estimate state the window), trim it first, then edit the trimmed clip. Exact re-encode (not a keyframe-snapped cut) so the result honors hard duration caps to the frame; any phone rotation flag is baked into the pixels in the same pass. The new clip lands with correct duration/width/height immediately. inSec defaults to 0. Pass pieces to cut the window into SEVERAL clips in one call, as the Trim & split dialog does (split points, or Auto-split by longest piece, with seconds shared between neighbours); every new clip comes back.',
4613
4953
  input: z.object({
4614
4954
  projectId: z.string().uuid().describe('Project the clip lives in.'),
4615
4955
  assetId: z
@@ -4671,7 +5011,7 @@ export const trimVideo = {
4671
5011
  // ── Generation status (background mode) ─────────────────────────
4672
5012
  export const getGenerationStatus = {
4673
5013
  id: 'slates_get_generation_status',
4674
- description: 'Poll one generation by id. Returns status (pending/processing/completed/failed/cancelled), the error message on failure, and the finished asset record (with id, code, filePath) on completion. Use after submitting any generate_* op with background=true. ALWAYS pass waitSeconds (use 45) — the call long-polls internally and returns early the moment the generation reaches a terminal state, so ONE call replaces a dozen rapid polls (each poll turn re-reads your whole context; rapid polling is the #1 orchestration-cost leak). Video generations commonly take 1-5 minutes: expect 1-4 long-poll calls, never a tight loop. Generations survive app restarts (the desktop resumes in-flight provider jobs on boot).',
5014
+ description: 'Poll one generation by id after a background=true submit. Returns status (pending/processing/completed/failed/cancelled), the error message on failure, and the finished asset record (with id, code, filePath) on completion. Pass waitSeconds 45: the call long-polls and returns the moment the generation ends, so one call replaces many quick polls, each of which re-reads your whole context. A video commonly takes a few long-poll calls. Generations survive app restarts (the desktop resumes in-flight provider jobs on boot).',
4675
5015
  input: z.object({
4676
5016
  generationId: z.string().uuid(),
4677
5017
  waitSeconds: z
@@ -4731,15 +5071,95 @@ export const listGenerations = {
4731
5071
  }));
4732
5072
  },
4733
5073
  };
4734
- const exportCutsInput = z.object({ projectId: z.string().uuid(), directory: z.string(), manifestId: z.string().min(1),
5074
+ const legacyExportCutsInput = z.object({ projectId: z.string().uuid(), directory: z.string(), manifestId: z.string().min(1),
4735
5075
  action: z.enum(['start', 'status', 'cancel']).optional().describe('start (default) begins, or re-attaches to a running export; status reads it; cancel stops after the output being rendered.'),
4736
- items: z.array(z.object({ timelineId: z.string().uuid(), format: z.enum(['mp4', 'xml']) })).min(1).optional().describe('Required to start.') });
5076
+ items: z.array(z.object({ timelineId: z.string().uuid(), format: z.enum(['mp4', 'xml']) }).strict()).min(1).optional().describe('Required to start.') }).strict();
5077
+ const adCopyInput = z.object({ destinationUrl: z.string().optional(), primaryText: z.string().optional(), headline: z.string().optional(), cta: z.string().optional() }).strict();
5078
+ const batchExportCutsInput = z.object({
5079
+ version: z.literal(2).describe('Use version 2 with batchId and items for delivery-format batches. Omit version for legacy directory/manifestId requests.'),
5080
+ projectId: z.string().uuid(), batchId: z.string().min(1).describe('Required for version 2. Reuse this id and the same items to reattach or retry.'),
5081
+ exportRoot: z.string().optional().describe('Optional export root; the desktop remembers it and creates a fresh batch folder.'),
5082
+ items: z.array(z.object({ timelineId: z.string().uuid(), aspects: z.array(deliveryAspectInput).min(1).optional(),
5083
+ formats: z.array(z.enum(['mp4', 'xml'])).min(1).optional(), taxonomy: taxonomyInput.optional() }).strict()).min(1),
5084
+ copy: adCopyInput.optional().describe('User-entered batch ad copy and destination defaults. Omission leaves them empty; never copy script or video text here.'),
5085
+ outputCopy: z.record(adCopyInput).optional().describe('Per-output ad copy overrides keyed by the desktop receipt output key.'),
5086
+ }).strict();
5087
+ // MCP requires an object at the schema root; the CLI also reads its shape for
5088
+ // project defaults and flag coercion. Validate the two wire contracts intact.
5089
+ const exportCutsInput = z.object({
5090
+ ...legacyExportCutsInput.partial().shape,
5091
+ ...batchExportCutsInput.partial().shape,
5092
+ projectId: z.string().uuid(),
5093
+ items: z.array(z.union([batchExportCutsInput.shape.items.element, legacyExportCutsInput.shape.items.unwrap().element])).min(1).optional().describe('Required for version 2 start/retry and legacy start. Version 2 selects existing timelineIds with aspects/formats/taxonomy; legacy selects timelineId/format.'),
5094
+ }).strict().superRefine((input, ctx) => {
5095
+ const parsed = (input.version === 2 ? batchExportCutsInput : legacyExportCutsInput).safeParse(input);
5096
+ if (!parsed.success)
5097
+ for (const issue of parsed.error.issues)
5098
+ ctx.addIssue(issue);
5099
+ });
4737
5100
  export const exportCuts = {
4738
- id: 'slates_export_cuts', description: 'Export explicit named cuts to distinct local files with a frozen manifest of timeline settings, media, script revisions and generation provenance. Returns at once while rendering continues; poll with action status. Starting again with the same manifestId and selection retries unfinished outputs under the same filenames and skips finished ones. Existing outputs are never overwritten, and export never generates media. Uses current video/XML fidelity limits.',
5101
+ id: 'slates_export_cuts', description: 'Start or retry a background export of existing named cuts to local files without generating media or spending credits. Version 2 selects cuts × delivery aspects from slates_get_variant_grid and returns batchId, manifestPath and frozen named outputs immediately; poll slates_get_export_batch. Repeating the same batchId and selection reattaches or retries unfinished outputs; completed files are checked and never overwritten. Naming, delivery and provenance are frozen by the desktop. CSV contains completed MP4s only and is unverified against a live Meta import. Missing takes are reported per cut, never filled. Version 2 requires ad-variant-export; update Slates on capability refusal. Legacy directory/manifestId/items/action requests remain supported. For one cut, slates_export_video is enough.',
5102
+ billable: false,
4739
5103
  input: exportCutsInput,
4740
5104
  async run(input, ctx) {
4741
- await ctx.desktop().requireCapability('named-cuts', 'named cuts');
4742
- return ok(await ctx.desktop().post('/agent/timeline/export-cuts', input));
5105
+ const desktop = ctx.desktop();
5106
+ await desktop.requireCapability('named-cuts', 'named cuts');
5107
+ if (input.version === 2)
5108
+ await desktop.requireCapability('ad-variant-export', 'ad variant batch export and retry');
5109
+ return ok(await desktop.post('/agent/timeline/export-cuts', input));
5110
+ },
5111
+ };
5112
+ export const getExportBatch = {
5113
+ id: 'slates_get_export_batch', description: 'Inspect the status of an ad variant export batch, or list saved batches in a project when batchId is omitted. Returns receipts and per-output states immediately through GET, including after a desktop restart. Never starts or retries a render and never spends credits. Requires ad-variant-export; update Slates on capability refusal.',
5114
+ billable: false,
5115
+ input: z.object({ projectId: z.string().uuid(), batchId: z.string().min(1).optional() }).strict(),
5116
+ async run(input, ctx) {
5117
+ const desktop = ctx.desktop();
5118
+ await desktop.requireCapability('ad-variant-export', 'ad variant export batch status and listing');
5119
+ if (input.batchId !== undefined)
5120
+ return ok(await desktop.get('/agent/timeline/export-cuts/status', input));
5121
+ return ok(await desktop.get('/agent/timeline/export-batches', { projectId: input.projectId }));
5122
+ },
5123
+ };
5124
+ export const cancelExportBatch = {
5125
+ id: 'slates_cancel_export_batch', description: 'Stop an ad variant export now, or after the current output finishes. mode now aborts active encoding; after-current preserves the current output before stopping. Completed files and frozen names remain available for retry with slates_export_cuts. Never generates media or spends credits. Requires ad-variant-export; update Slates on capability refusal.',
5126
+ billable: false,
5127
+ input: z.object({ projectId: z.string().uuid(), batchId: z.string().min(1), mode: z.enum(['now', 'after-current']) }).strict(),
5128
+ async run(input, ctx) {
5129
+ await ctx.desktop().requireCapability('ad-variant-export', 'ad variant export cancellation');
5130
+ return ok(await ctx.desktop().post('/agent/timeline/export-cuts/cancel', input));
5131
+ },
5132
+ };
5133
+ export const getVariantGrid = {
5134
+ id: 'slates_get_variant_grid', description: 'Read the variant grid of existing named cuts, recorded slot choices, missing takes and delivery format ids with actual dimensions. Shows absent combinations without creating them; missing-take prices are local quotes, never generation requests. Select existing timelineIds and returned aspects for slates_export_cuts. Requires ad-variant-export; update Slates on capability refusal.',
5135
+ billable: false,
5136
+ input: z.object({ projectId: z.string().uuid() }).strict(),
5137
+ async run(input, ctx) {
5138
+ await ctx.desktop().requireCapability('ad-variant-export', 'the ad variant grid and delivery catalog');
5139
+ return ok(await ctx.desktop().get('/agent/timeline/variant-grid', input));
5140
+ },
5141
+ };
5142
+ const reframeReportInput = z.object({ projectId: z.string().uuid(), timelineId: z.string().uuid(), aspect: deliveryAspectInput, clipId: z.string().uuid().optional() }).strict();
5143
+ export const getReframeReport = {
5144
+ id: 'slates_get_reframe_report', description: 'Inspect effective delivery framing, computed dimensions, kept frame percentage, upscale and stale-take or missing-media warnings for a cut or one clip. Read before reframing; warnings never trigger generation or disable export. Requires ad-variant-export; update Slates on capability refusal.',
5145
+ billable: false,
5146
+ input: reframeReportInput,
5147
+ async run(input, ctx) {
5148
+ await ctx.desktop().requireCapability('ad-variant-export', 'delivery framing reports');
5149
+ return ok(await ctx.desktop().get('/agent/timeline/reframe-report', input));
5150
+ },
5151
+ };
5152
+ const reframeClipInput = reframeReportInput.extend({ clipId: z.string().uuid(), framing: z.object({
5153
+ mode: z.enum(['fill', 'fit']).optional(), focusX: z.number().min(0).max(1).optional(),
5154
+ focusY: z.number().min(0).max(1).optional(), zoom: z.number().min(1).optional(),
5155
+ }).strict().nullable().describe('Normalized focus and zoom for this clip/aspect. Null resets the override; the desktop binds it to the current take.') });
5156
+ export const reframeClip = {
5157
+ id: 'slates_reframe_clip', description: 'Set or reset a clip framing override for one delivery aspect and return the desktop computed framing report. Changes focus, fill/fit and zoom without duplicating the timeline or generating media. Requires ad-variant-export; update Slates on capability refusal.',
5158
+ billable: false,
5159
+ input: reframeClipInput,
5160
+ async run(input, ctx) {
5161
+ await ctx.desktop().requireCapability('ad-variant-export', 'clip delivery reframing');
5162
+ return ok(await ctx.desktop().post('/agent/timeline/reframe', input));
4743
5163
  },
4744
5164
  };
4745
5165
  export const listTimelines = {
@@ -4751,10 +5171,13 @@ export const listTimelines = {
4751
5171
  },
4752
5172
  };
4753
5173
  export const saveTimeline = {
4754
- id: 'slates_save_timeline', description: 'Create a named cut, or rename the explicit timelineId. Existing cuts and the legacy default stay intact.',
4755
- input: z.object({ projectId: z.string().uuid(), timelineId: z.string().uuid().optional(), name: z.string().min(1) }),
5174
+ id: 'slates_save_timeline', description: 'Create a named cut, or rename the explicit timelineId, with optional delivery, naming taxonomy and explicit variant grid bindings. Existing cuts and the legacy default stay intact. New fields require ad-variant-export; null clears them. Read delivery ids and dimensions from slates_get_variant_grid; never infer slot roles from labels.',
5175
+ input: z.object({ projectId: z.string().uuid(), timelineId: z.string().uuid().optional(), name: z.string().min(1), ...cutOptionsInput }),
4756
5176
  async run(input, ctx) {
4757
5177
  await ctx.desktop().requireCapability('named-cuts', 'named cuts');
5178
+ if (input.delivery !== undefined || input.taxonomy !== undefined || input.gridBinding !== undefined) {
5179
+ await ctx.desktop().requireCapability('ad-variant-export', 'cut delivery, naming and grid bindings');
5180
+ }
4758
5181
  return ok(await ctx.desktop().post('/agent/timelines', input));
4759
5182
  },
4760
5183
  };
@@ -4791,7 +5214,7 @@ export const getTimeline = {
4791
5214
  };
4792
5215
  export const addClipToTimeline = {
4793
5216
  id: 'slates_add_clip_to_timeline',
4794
- description: "Append a video or audio asset from the project to the project's timeline (or place it at an explicit startFrame). Defaults match the desktop UI: video clips go to the end of the first video track; audio clips (music, voiceover, AI audio) go after the last clip on the first AUDIO track and are mixed under the video on export. An empty timeline auto-adopts the first video clip's resolution and frame rate; later higher-resolution clips raise the canvas. Overlapping video clips resolve top-track-wins. Optionally trim with sourceInFrame/sourceOutFrame (frames at the SOURCE fps). Use slates_get_timeline first to see current clips and pick positions.",
5217
+ description: "Append a video or audio asset from the project to the project's timeline (or place it at an explicit startFrame). Defaults match the desktop UI: video clips go to the end of the first video track; audio clips (music, voiceover, AI audio) go after the last clip on the first AUDIO track and are mixed under the video on export. An empty timeline auto-adopts the first video clip's resolution and frame rate; later higher-resolution clips raise the canvas. Overlapping video clips resolve top-track-wins. Optionally trim with sourceInFrame/sourceOutFrame (frames at the SOURCE fps). Use slates_get_timeline first to see current clips and pick positions. To lay a board's chosen clips in board order, use slates_edit_cut (build) instead.",
4795
5218
  input: z.object({
4796
5219
  projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
4797
5220
  assetId: z.string().uuid().describe('Video or audio asset already in the project.'),
@@ -4839,14 +5262,150 @@ export const reorderClips = {
4839
5262
  };
4840
5263
  export const removeClip = {
4841
5264
  id: 'slates_remove_clip',
4842
- description: "Remove a clip from the timeline (the source asset is untouched). Leaves a gap at the clip's old position — MP4 export renders gaps as black; call slates_reorder_clips afterwards to close gaps.",
4843
- input: z.object({ clipId: z.string().uuid() }),
5265
+ description: "Remove a clip from the timeline (the source asset is untouched). By default it leaves a gap at the clip's old position, which MP4 export renders as black. ripple: true closes the gap instead: the lane's later clips move left by the clip's length (needs projectId). An overlay track's text and image clips keep their times, and the gap is just no overlay.",
5266
+ input: z.object({
5267
+ clipId: z.string().uuid(),
5268
+ ripple: z.boolean().optional().describe("Close the gap: the lane's later clips move up. Needs projectId."),
5269
+ projectId: z.string().uuid().optional(),
5270
+ }),
4844
5271
  async run(input, ctx) {
4845
5272
  const desktop = ctx.desktop();
4846
5273
  await desktop.requireCapability('timeline', 'timeline editing');
5274
+ if (input.ripple) {
5275
+ await desktop.requireCapability('timeline-editing', 'ripple delete');
5276
+ if (!input.projectId)
5277
+ throw new Error('ripple needs projectId.');
5278
+ }
4847
5279
  return ok(await desktop.post('/agent/timeline/remove-clip', input));
4848
5280
  },
4849
5281
  };
5282
+ // ── Transitions on cuts (timeline engine plan E2) ──────────────
5283
+ // A cut is two clips that meet on one lane. The kinds are the desktop's (GET /agent/timeline returns
5284
+ // them as transitionKinds), so none is typed here; an unknown kind is refused with the list.
5285
+ const transitionShape = {
5286
+ kind: z.string().optional().describe("A kind from slates_get_timeline's transitionKinds for this lane: picture kinds on video and overlay lanes, sound kinds on audio lanes. Default: a dissolve, or a crossfade on sound."),
5287
+ durationFrames: z.number().int().positive().optional().describe('How long it lasts, in timeline frames. Default 0.5 s, shortened to what the clips allow; a length you name that is too long is refused with the longest that fits.'),
5288
+ durationSec: z.number().positive().optional().describe('The same, in seconds.'),
5289
+ alignment: z.enum(['center', 'start', 'end']).optional().describe('center (default) straddles the cut; start begins at the cut; end finishes at it.'),
5290
+ params: z.record(z.string(), z.unknown()).optional().describe("The kind's settings. freeze: true holds the edge frame where the media runs short. On a picture transition, audio: false stops the clips' sound crossfading with it."),
5291
+ };
5292
+ export const addTransition = {
5293
+ id: 'slates_add_transition',
5294
+ description: "Put a transition (dissolve, wipe, crossfade and the other kinds) on a cut between two clips that meet on one lane, as the Cut's clip menu does. Name the cut by fromClipId and toClipId, or by one clipId and side ('end' runs this clip into the next, 'start' the last clip into this one). A cut holds one transition, so adding where one exists changes it. It never refuses short media: the result's shortHandles says how many frames are missing and offers the fixes (slates_update_transition fix: freeze or shorten). For a fade to or from black, set the clip's fades with slates_update_clip instead. The open Cut shows the change.",
5295
+ input: z.object({
5296
+ projectId: z.string().uuid(),
5297
+ fromClipId: z.string().uuid().optional().describe('The clip before the cut.'),
5298
+ toClipId: z.string().uuid().optional().describe('The clip after the cut.'),
5299
+ clipId: z.string().uuid().optional().describe('One clip of the cut, with side.'),
5300
+ side: z.enum(['start', 'end']).optional().describe("With clipId: 'end' (default) or 'start'."),
5301
+ ...transitionShape,
5302
+ }),
5303
+ async run(input, ctx) {
5304
+ const desktop = ctx.desktop();
5305
+ await desktop.requireCapability('timeline-transitions', 'transitions');
5306
+ if (!input.fromClipId && !input.toClipId && !input.clipId)
5307
+ throw new Error('Name the cut: fromClipId and toClipId, or clipId with side.');
5308
+ return ok(await desktop.post('/agent/timeline/add-transition', input));
5309
+ },
5310
+ };
5311
+ export const updateTransition = {
5312
+ id: 'slates_update_transition',
5313
+ description: "Change a transition's kind, length, alignment or settings by its id (slates_get_timeline lists them under transitions), or apply one of the two fixes for short media: fix 'freeze' holds the edge frame for the missing frames, fix 'shorten' cuts it to the longest the media covers. Only the fields you name change. Returns the transition with its span and any frames still missing.",
5314
+ input: z.object({
5315
+ projectId: z.string().uuid(),
5316
+ transitionId: z.string().uuid(),
5317
+ fix: z.enum(['freeze', 'shorten']).optional().describe('Instead of other fields: the short-media fix.'),
5318
+ ...transitionShape,
5319
+ }),
5320
+ async run(input, ctx) {
5321
+ const desktop = ctx.desktop();
5322
+ await desktop.requireCapability('timeline-transitions', 'transitions');
5323
+ return ok(await desktop.post('/agent/timeline/update-transition', input));
5324
+ },
5325
+ };
5326
+ export const removeTransition = {
5327
+ id: 'slates_remove_transition',
5328
+ description: 'Take a transition off its cut, leaving a plain cut; the clips are untouched. The id is in slates_get_timeline under transitions.',
5329
+ input: z.object({ projectId: z.string().uuid(), transitionId: z.string().uuid() }),
5330
+ async run(input, ctx) {
5331
+ const desktop = ctx.desktop();
5332
+ await desktop.requireCapability('timeline-transitions', 'transitions');
5333
+ return ok(await desktop.post('/agent/timeline/remove-transition', input));
5334
+ },
5335
+ };
5336
+ // ── Editing clips on the timeline (timeline engine plan E3) ────
5337
+ // One tool for the edits that move clip edges and positions; slates_update_clip holds a clip's own
5338
+ // settings. Both run through the same core as the Cut's own tools.
5339
+ export const editTimelineClips = {
5340
+ id: 'slates_edit_timeline_clips',
5341
+ description: "Trim, roll, ripple, slip, move or split clips on the timeline, as the Cut's tools do; the source files are untouched (to cut a new file, use slates_trim_video). trim moves one edge (edge, then frame or deltaFrames): mode overwrite (default) covers a neighbour it grows into, ripple moves the lane's later clips by the change, roll moves the cut shared with the clip that meets this edge. A trim cuts media and never changes speed. slip changes which part of the media a clip shows without moving it (deltaFrames in timeline frames, or deltaSourceFrames in the file's). move takes clipId or clipIds, keeps their spacing, to startFrame or by deltaFrames, optionally onto trackId (a lane of the same type); mode overwrite cuts what they land on, insert pushes the lane's later clips right (a landing inside a clip moves to its nearer edge). split cuts at frame (or sec) every clip under it on the timeline, or only clipIds. Returns the clips it wrote as they now stand, the ids it deleted, the cut's durationFrames and any staleTransitions (whose clips no longer meet); a refused edit says why.",
5342
+ input: z.object({
5343
+ projectId: z.string().uuid(),
5344
+ action: z.enum(['trim', 'slip', 'move', 'split']),
5345
+ clipId: z.string().uuid().optional(),
5346
+ clipIds: z.array(z.string().uuid()).min(1).optional().describe('move or split: several clips of one timeline.'),
5347
+ edge: z.enum(['start', 'end']).optional().describe('trim: which edge.'),
5348
+ frame: z.number().int().min(0).optional().describe('trim: where the edge goes. split: where to cut. Timeline frames.'),
5349
+ sec: z.number().min(0).optional().describe('split: where to cut, in seconds.'),
5350
+ deltaFrames: z.number().int().optional().describe('trim, slip or move: how far, in timeline frames; negative is left (slip: earlier media).'),
5351
+ deltaSourceFrames: z.number().int().optional().describe("slip: how far, in the file's own frames."),
5352
+ startFrame: z.number().int().min(0).optional().describe('move: where the first clip lands.'),
5353
+ trackId: z.string().uuid().optional().describe('move: another lane of the same type.'),
5354
+ timelineId: z.string().uuid().optional().describe("split without clipIds: a named cut; omit for the project's timeline."),
5355
+ mode: z.enum(['overwrite', 'ripple', 'roll', 'insert']).optional().describe('trim: overwrite, ripple or roll. move: overwrite or insert.'),
5356
+ }),
5357
+ async run(input, ctx) {
5358
+ const desktop = ctx.desktop();
5359
+ await desktop.requireCapability('timeline-editing', 'editing clips on the timeline');
5360
+ const { action, ...body } = input;
5361
+ if ((action === 'trim' || action === 'slip') && !input.clipId)
5362
+ throw new Error(`${action} needs a clipId.`);
5363
+ if (action === 'trim' && !input.edge)
5364
+ throw new Error("trim needs an edge: 'start' or 'end'.");
5365
+ if (action === 'move' && !input.clipId && !input.clipIds)
5366
+ throw new Error('move needs clipId or clipIds.');
5367
+ if (action === 'split' && input.frame === undefined && input.sec === undefined)
5368
+ throw new Error('split needs a frame or sec.');
5369
+ if (action === 'trim')
5370
+ return ok(await desktop.post('/agent/timeline/trim-clip', body));
5371
+ if (action === 'slip')
5372
+ return ok(await desktop.post('/agent/timeline/slip-clip', body));
5373
+ if (action === 'move')
5374
+ return ok(await desktop.post('/agent/timeline/move-clip', body));
5375
+ return ok(await desktop.post('/agent/timeline/split-clip', body));
5376
+ },
5377
+ };
5378
+ export const updateClip = {
5379
+ id: 'slates_update_clip',
5380
+ description: "Set a timeline clip's own speed, volume, split edit (J-cut or L-cut) and fades, as the Cut's Inspector does. Only the fields you name change; null puts one back to the default. speed keeps the clip's media in and out points and its start and changes its length (2 is twice as fast, half as long); with ripple: true the lane's later clips move by the change, otherwise a longer clip covers what follows. audioOffsetFrames, on a video clip, moves its own sound against its picture in sync: below 0 is a J-cut (the sound starts first), above 0 an L-cut (it runs on). Fades are frames: fadeIn/fadeOut for the picture, audioFadeIn/audioFadeOut for the sound. volume is linear gain (1 = 0 dB, 0 = silent). look, on a clip with a picture, is the Inspector's Blend, Grain and Colour, sent whole: blend mixes the picture with what is under it (multiply darkens, screen lightens, overlay and soft-light add contrast), grain is film grain from 0 to 1, saturation is colour from 0 (black and white) through 1 (as shot) to 2; null clears the look.",
5381
+ input: z.object({
5382
+ projectId: z.string().uuid(),
5383
+ clipId: z.string().uuid(),
5384
+ speed: z.number().positive().nullable().optional().describe('1 is normal speed; null is too, at the natural length of the clip.'),
5385
+ volume: z.number().min(0).nullable().optional().describe('Linear gain under the lane fader; 1 is unchanged.'),
5386
+ audioOffsetFrames: z.number().int().nullable().optional().describe('Video clips: the split edit, in timeline frames.'),
5387
+ fadeInFrames: z.number().int().min(0).nullable().optional(),
5388
+ fadeOutFrames: z.number().int().min(0).nullable().optional(),
5389
+ audioFadeInFrames: z.number().int().min(0).nullable().optional(),
5390
+ audioFadeOutFrames: z.number().int().min(0).nullable().optional(),
5391
+ look: z.object({
5392
+ blend: z.enum(['normal', 'multiply', 'screen', 'overlay', 'soft-light']).optional(),
5393
+ grain: z.number().min(0).max(1).optional(),
5394
+ saturation: z.number().min(0).max(2).optional(),
5395
+ }).strict().nullable().optional().describe('The whole look, at least one field; a field left out is its default (normal, no grain, colour 1). null clears it.'),
5396
+ ripple: z.boolean().optional().describe("With speed: move the lane's later clips instead of covering them."),
5397
+ }),
5398
+ async run(input, ctx) {
5399
+ const desktop = ctx.desktop();
5400
+ await desktop.requireCapability('timeline-editing', "a clip's speed, volume, split edit and fades");
5401
+ // An empty look would clear the clip's look without saying so; null is how to ask for that.
5402
+ if (input.look && Object.keys(input.look).length === 0)
5403
+ throw new Error('look needs at least one of blend, grain or saturation; send look: null to clear it');
5404
+ if (input.look !== undefined)
5405
+ await desktop.requireCapability('clip-look', "a clip's blend, grain and colour");
5406
+ return ok(await desktop.post('/agent/timeline/update-clip', input));
5407
+ },
5408
+ };
4850
5409
  export const manageTimelineMarker = {
4851
5410
  id: 'slates_manage_timeline_marker',
4852
5411
  description: "Add, change or delete a marker on the timeline, as the Cut's ruler and marker menus do (slates_get_timeline lists them under timeline.markers). create: frame, optional name and color. update: markerId plus any of frame, name, color. delete: markerId. The color is one of the app's marker colours by name (e.g. Red); any other is refused with the list. The open Cut shows the change.",
@@ -4871,19 +5430,356 @@ export const manageTimelineMarker = {
4871
5430
  };
4872
5431
  export const addTimelineTrack = {
4873
5432
  id: 'slates_add_timeline_track',
4874
- description: "Add a track to the project's timeline (default: an audio track, for layering voiceover + music + AI audio). The new track is appended below existing tracks. Returns the new track and the full timeline.",
5433
+ description: "Add a track to the project's timeline (default: an audio track, for layering voiceover + music + AI audio). A video or audio track is appended below the existing tracks; an overlay track, for text and image overlays, goes on top so it draws over every other track. Returns the new track and the full timeline.",
4875
5434
  input: z.object({
4876
5435
  projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
4877
- type: z.enum(['video', 'audio']).optional().describe('Default: audio.'),
4878
- name: z.string().optional().describe("Default: 'Audio N' / 'Video N'."),
5436
+ type: z.enum(['video', 'audio', 'overlay']).optional().describe('Default: audio. overlay needs a desktop with text and image overlays.'),
5437
+ name: z.string().optional().describe("Default: 'Audio N', 'Video N' or 'Overlay N'."),
4879
5438
  }),
4880
5439
  async run(input, ctx) {
4881
5440
  const desktop = ctx.desktop();
4882
5441
  await desktop.requireCapability('timeline-tracks', 'timeline tracks + audio mixing');
5442
+ if (input.type === 'overlay')
5443
+ await desktop.requireCapability('timeline-overlays', 'text and image overlays');
4883
5444
  await requireNamedCut(desktop, input.timelineId);
4884
5445
  return ok(await desktop.post('/agent/timeline/add-track', input));
4885
5446
  },
4886
5447
  };
5448
+ // Text and image overlays (slate's finished-ads plan, L1). The look's lists, limits, ranges and defaults
5449
+ // mirror slate's `src/shared/textStyles.ts`, `src/shared/overlays.ts` and `src/main/editor/overlays.ts`,
5450
+ // and the batch cap slate's `src/main/agent/routes-editor.ts`, which this package cannot import;
5451
+ // lockstep check 12 fails when they differ. The 0..1 position and
5452
+ // opacity are fractions by definition, not a desktop choice.
5453
+ const TEXT_STYLE_IDS = ['word-pop', 'keyword', 'subtitle', 'headline', 'clean'];
5454
+ const TEXT_STYLE_DEFAULT = 'subtitle';
5455
+ const OVERLAY_TEXT_MAX = 2000;
5456
+ const OVERLAY_WORDS_MAX = 2000;
5457
+ const OVERLAY_WORD_TEXT_MAX = 200;
5458
+ const OVERLAY_SIZE_RANGE = { min: 0.25, max: 4 };
5459
+ const OVERLAY_WIDTH_RANGE = { min: 0.01, max: 1 };
5460
+ const OVERLAY_DEFAULT_SECONDS = 3;
5461
+ const OVERLAY_BATCH_MAX = 500;
5462
+ /** Text the desktop accepts: not blank (it trims before checking), at most `max` characters. A pattern, not a refine, so the JSON schema a host checks says it too. */
5463
+ const overlayText = (max) => z.string().max(max).regex(/\S/, 'must not be blank');
5464
+ const overlayPlacementInput = {
5465
+ startSec: z.number().min(0).optional().describe('Where the clip starts, in timeline seconds. startSec or startFrame is required, not both.'),
5466
+ startFrame: z.number().int().min(0).optional().describe('Where the clip starts, in timeline frames.'),
5467
+ durationSec: z.number().positive().optional().describe(`How long it shows, in seconds. Default: ${OVERLAY_DEFAULT_SECONDS}.`),
5468
+ endFrame: z.number().int().min(1).optional().describe('The frame it ends before, instead of durationSec.'),
5469
+ trackId: z.string().uuid().optional().describe('An overlay track (slates_add_timeline_track, type overlay). Default: the topmost unlocked, shown overlay track with room, or a new one on top.'),
5470
+ };
5471
+ const overlayPositionInput = {
5472
+ x: z.number().min(0).max(1).optional().describe("The centre's distance from the left edge, as a fraction of the frame's width."),
5473
+ y: z.number().min(0).max(1).optional().describe("The centre's distance from the top edge, as a fraction of the frame's height."),
5474
+ };
5475
+ const textSizeInput = z
5476
+ .number().min(OVERLAY_SIZE_RANGE.min).max(OVERLAY_SIZE_RANGE.max)
5477
+ .describe(`A multiple of the style's text size, ${OVERLAY_SIZE_RANGE.min} to ${OVERLAY_SIZE_RANGE.max}; 1 is the style's own.`);
5478
+ const imageWidthInput = z
5479
+ .number().min(OVERLAY_WIDTH_RANGE.min).max(OVERLAY_WIDTH_RANGE.max)
5480
+ .describe(`Its width as a fraction of the frame's width, ${OVERLAY_WIDTH_RANGE.min} to ${OVERLAY_WIDTH_RANGE.max}; the height follows the picture.`);
5481
+ const textLookInput = {
5482
+ style: z.enum(TEXT_STYLE_IDS).optional().describe(`Default: ${TEXT_STYLE_DEFAULT}. word-pop lights up the spoken word when the clip has words.`),
5483
+ ...overlayPositionInput,
5484
+ size: textSizeInput.optional(),
5485
+ color: z.string().regex(/^#[0-9a-fA-F]{6}$/).optional().describe('The text colour as #rrggbb. Default: the style\'s.'),
5486
+ };
5487
+ const overlayWordsInput = z
5488
+ .array(z
5489
+ .object({ text: overlayText(OVERLAY_WORD_TEXT_MAX), start: z.number().min(0), end: z.number().min(0) })
5490
+ .strict()
5491
+ .refine((w) => w.end > w.start, { message: 'end must be after start' }))
5492
+ .max(OVERLAY_WORDS_MAX)
5493
+ .describe("Word timings in timeline seconds, for captions that follow the voice; each word's end comes after its start.");
5494
+ /** An item must start once: startSec or startFrame, and end at most once: durationSec or endFrame. Refused here, naming it. */
5495
+ function requireOverlayStart(items) {
5496
+ items.forEach((item, i) => {
5497
+ if (item.startSec === undefined && item.startFrame === undefined)
5498
+ throw new Error(`items[${i}] needs startSec or startFrame.`);
5499
+ if (item.startSec !== undefined && item.startFrame !== undefined)
5500
+ throw new Error(`items[${i}]: give startSec or startFrame, not both.`);
5501
+ if (item.durationSec !== undefined && item.endFrame !== undefined)
5502
+ throw new Error(`items[${i}]: give durationSec or endFrame, not both.`);
5503
+ });
5504
+ }
5505
+ const overlayCount = (r, what) => {
5506
+ const n = r.clips?.length ?? 0;
5507
+ return `Added ${n} ${what}${n === 1 ? '' : 's'}.`;
5508
+ };
5509
+ export const addTextClip = {
5510
+ id: 'slates_add_text_clip',
5511
+ description: "Put text on the timeline: captions, a headline, a keyword, a call to action. Each item is one text clip on an overlay track, drawn over the video in preview and export; a batch lands in one transaction, all or none. Captions that follow the voice: one clip per line, with each word's timing in words. Read slates_get_timeline first for the frame rate and where clips sit. Returns the clips and the timeline. Change one later with slates_update_overlay_clip, remove it with slates_remove_clip.",
5512
+ input: z.object({
5513
+ projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
5514
+ items: z
5515
+ .array(z
5516
+ .object({
5517
+ text: overlayText(OVERLAY_TEXT_MAX).describe('What it says.'),
5518
+ words: overlayWordsInput.optional(),
5519
+ ...textLookInput,
5520
+ ...overlayPlacementInput,
5521
+ })
5522
+ .strict())
5523
+ .min(1)
5524
+ .max(OVERLAY_BATCH_MAX),
5525
+ }),
5526
+ async run(input, ctx) {
5527
+ const desktop = ctx.desktop();
5528
+ await desktop.requireCapability('timeline-overlays', 'text and image overlays');
5529
+ await requireNamedCut(desktop, input.timelineId);
5530
+ requireOverlayStart(input.items);
5531
+ const r = await desktop.post('/agent/timeline/add-text', input);
5532
+ return ok(r, `${overlayCount(r, 'text clip')} ${JSON.stringify(r)}`);
5533
+ },
5534
+ };
5535
+ export const addImageOverlay = {
5536
+ id: 'slates_add_image_overlay',
5537
+ description: "Put a picture over the video on the timeline: a logo, a product shot, an end card, a badge. Each item is one image clip on an overlay track, drawn in preview and export; a batch lands in one transaction, all or none. The picture is an image asset already in the project. Returns the clips and the timeline. Change one later with slates_update_overlay_clip, remove it with slates_remove_clip.",
5538
+ input: z.object({
5539
+ projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
5540
+ items: z
5541
+ .array(z
5542
+ .object({
5543
+ assetId: z.string().min(1).describe('An image asset in the project: its code (IMG-A12) or id.'),
5544
+ ...overlayPositionInput,
5545
+ width: imageWidthInput.optional().describe(`${imageWidthInput.description} Default: half.`),
5546
+ opacity: z.number().min(0).max(1).optional().describe('Default: 1, fully opaque.'),
5547
+ ...overlayPlacementInput,
5548
+ })
5549
+ .strict())
5550
+ .min(1)
5551
+ .max(OVERLAY_BATCH_MAX),
5552
+ }),
5553
+ async run(input, ctx) {
5554
+ const desktop = ctx.desktop();
5555
+ await desktop.requireCapability('timeline-overlays', 'text and image overlays');
5556
+ await requireNamedCut(desktop, input.timelineId);
5557
+ requireOverlayStart(input.items);
5558
+ const refs = await resolveAssetRefs(ctx, input.projectId, input.items.map((item) => item.assetId));
5559
+ const items = input.items.map((item, i) => {
5560
+ const asset = refs.get(item.assetId);
5561
+ if (!asset)
5562
+ throw new Error(`items[${i}].assetId "${item.assetId}" is not an asset in this project (slates_list_assets).`);
5563
+ return { ...item, assetId: asset.id };
5564
+ });
5565
+ const r = await desktop.post('/agent/timeline/add-image-overlay', { ...input, items });
5566
+ return ok(r, `${overlayCount(r, 'image overlay')} ${JSON.stringify(r)}`);
5567
+ },
5568
+ };
5569
+ export const updateOverlayClip = {
5570
+ id: 'slates_update_overlay_clip',
5571
+ description: "Change a text clip's words or look, or an image overlay's place, size and opacity. Only the fields you name change; null puts one back to the style's or the default. words replaces a text clip's timings, and [] drops them; new text keeps the old timings, so send words with it. When the clip shows does not change here: to move one, remove it (slates_remove_clip) and add it again. A batch lands in one transaction, all or none. Returns the changed clips.",
5572
+ input: z.object({
5573
+ projectId: z.string().uuid(),
5574
+ items: z
5575
+ .array(z
5576
+ .object({
5577
+ clipId: z.string().uuid().describe('A text or image clip (slates_get_timeline).'),
5578
+ text: overlayText(OVERLAY_TEXT_MAX).optional().describe('Text clips: what it says.'),
5579
+ words: overlayWordsInput.optional(),
5580
+ style: z.enum(TEXT_STYLE_IDS).nullable().optional().describe(`Text clips. null: ${TEXT_STYLE_DEFAULT}.`),
5581
+ x: z.number().min(0).max(1).nullable().optional().describe("The centre's distance from the left edge, as a fraction of the frame's width."),
5582
+ y: z.number().min(0).max(1).nullable().optional().describe("The centre's distance from the top edge, as a fraction of the frame's height."),
5583
+ size: textSizeInput.nullable().optional().describe(`Text clips: ${textSizeInput.description}`),
5584
+ color: z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional().describe('Text clips: #rrggbb.'),
5585
+ width: imageWidthInput.nullable().optional().describe(`Image clips: ${imageWidthInput.description}`),
5586
+ opacity: z.number().min(0).max(1).nullable().optional().describe('Image clips.'),
5587
+ })
5588
+ .strict()
5589
+ .refine((item) => Object.keys(item).some((k) => k !== 'clipId'), { message: 'name at least one field to change besides clipId' }))
5590
+ .min(1)
5591
+ .max(OVERLAY_BATCH_MAX),
5592
+ }),
5593
+ async run(input, ctx) {
5594
+ const desktop = ctx.desktop();
5595
+ await desktop.requireCapability('timeline-overlays', 'text and image overlays');
5596
+ return ok(await desktop.post('/agent/timeline/update-overlay', input));
5597
+ },
5598
+ };
5599
+ const KEYFRAME_PROPERTY_IDS = ['positionX', 'positionY', 'scale', 'rotation', 'opacity', 'cropLeft', 'cropTop', 'cropRight', 'cropBottom', 'focusX', 'focusY', 'zoom'];
5600
+ const keyframeEasing = z.union([
5601
+ z.enum(['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'hold']),
5602
+ z.object({ cubicBezier: z.tuple([z.number().min(0).max(1), z.number(), z.number().min(0).max(1), z.number()]) }).strict(),
5603
+ ]);
5604
+ const keyframeList = z
5605
+ .array(z
5606
+ .object({
5607
+ frame: z.number().int().min(0).describe("Frames from the clip's start, at the timeline's frame rate."),
5608
+ value: z.number().finite(),
5609
+ easing: keyframeEasing.optional().describe('The curve from this key to the next. Default linear; hold jumps at the next key.'),
5610
+ })
5611
+ .strict())
5612
+ .max(500);
5613
+ export const setClipKeyframes = {
5614
+ id: 'slates_set_clip_keyframes',
5615
+ description: "Animate or set a timeline clip's transform with keyframes: a punch-in, a slow push, a Ken Burns move, a slide, a spin, a fade, a crop. Each property you name gets exactly the keys you send ([] clears it back to its static value); properties you leave out keep theirs, and all of them land in one transaction. One key holds a value for the whole clip. Frames count from the clip's start. Units: positionX/positionY move the picture's centre in frame widths/heights (0.1 = a tenth of the frame right or down, -4..4); scale multiplies the framed size about the frame's centre (1 = as framed, 0.01..20); rotation is degrees clockwise; opacity 0..1; cropLeft/Top/Right/Bottom remove that fraction of the source from its side (0..0.99); focusX/focusY (0..1) and zoom (1..20) animate the clip's reframe for the aspect being exported. Drawn by the Cut's monitor and its export alike, both the timeline engine. Returns the clip's keys; slates_get_timeline lists every clip's keys in timeline.keyframes. Requires timeline-keyframes; update Slates on capability refusal.",
5616
+ input: z.object({
5617
+ projectId: z.string().uuid(),
5618
+ timelineId: z.string().uuid(),
5619
+ clipId: z.string().uuid().describe('A clip on that timeline (slates_get_timeline).'),
5620
+ properties: z
5621
+ .object(Object.fromEntries(KEYFRAME_PROPERTY_IDS.map((id) => [id, keyframeList.optional()])))
5622
+ .strict()
5623
+ .refine((p) => Object.keys(p).length > 0, { message: 'name at least one property' })
5624
+ .describe('Each property to set, with its keys. Example punch-in over one second at 24 fps: {"scale":[{"frame":0,"value":1,"easing":"ease-in-out"},{"frame":24,"value":1.25}]}.'),
5625
+ }),
5626
+ async run(input, ctx) {
5627
+ const desktop = ctx.desktop();
5628
+ await desktop.requireCapability('timeline-keyframes', 'clip keyframes');
5629
+ return ok(await desktop.post('/agent/timeline/keyframes', input));
5630
+ },
5631
+ };
5632
+ // Captions (slate's finished-ads plan L2) and HTML layers (the engine plan's E4). The caption default,
5633
+ // the emphasis tiers and the registry's item types mirror slate's `src/main/transcription/captions.ts`,
5634
+ // `src/shared/captionBuild.ts` and `src/main/layers/registry.ts`; lockstep check 12 fails when they differ.
5635
+ const CAPTION_STYLE_DEFAULT = 'word-pop';
5636
+ const CAPTION_TIERS = ['regular', 'italic', 'emphasis', 'slam'];
5637
+ const MOTION_REGISTRY_TYPES = ['block', 'component', 'example'];
5638
+ /** Mirrors slate's src/main/layers/captionComponents.ts: the caption-* components checked to draw fed words. */
5639
+ const CAPTION_COMPONENTS = [
5640
+ 'caption-highlight', 'caption-pill-karaoke', 'caption-weight-shift', 'caption-glitch-rgb', 'caption-neon-glow',
5641
+ 'caption-gradient-fill', 'caption-kinetic-slam', 'caption-clip-wipe', 'caption-matrix-decode', 'caption-particle-burst',
5642
+ 'caption-neon-accent', 'caption-editorial-emphasis',
5643
+ ];
5644
+ const htmlCompositionInput = z.string().min(1).describe('A composition: a whole HTML document whose GSAP timeline is registered on window.__timelines.');
5645
+ const htmlVariablesInput = z.record(z.union([z.string(), z.number(), z.boolean()])).describe("Values for the composition's or block's declared variables, by name: text, numbers or true/false.");
5646
+ export const addCaptions = {
5647
+ id: 'slates_add_captions',
5648
+ billable: false,
5649
+ description: "Caption the speech in a cut: one text clip per phrase on an overlay track, each carrying its words so the spoken word lights up on the frame it is said. Free; any transcription it needs runs on the user's machine. source transcript (the default) uses the words heard in each clip, aligned to within a frame, transcribing first when needed; script spreads the clip's Shot line over the speech, with estimated timing; words takes your own timed words in timeline seconds. By default every clip with sound is captioned on a new Captions track on top. Phrases follow the caption rules unless you pass your own; tiers mark emphasis per word. The result lists mismatches, where what was heard differs from the Shot's written line (the caption shows what was said: fix the line or the captions), and skipped clips with the reason. Craft: slates_get_prompting_guide (topic: slates-captions). Change a text caption later with slates_update_overlay_clip, and a component or html caption layer with slates_update_html_clip.",
5650
+ input: z
5651
+ .object({
5652
+ projectId: z.string().uuid(),
5653
+ timelineId: z.string().uuid().describe('The cut (slates_get_timeline or slates_list_timelines).'),
5654
+ clipIds: z.array(z.string().uuid()).min(1).optional().describe('Video or audio clips whose speech to caption. Default with transcript: every clip with sound.'),
5655
+ source: z.enum(['transcript', 'script', 'words']).optional().describe('Default: words when you pass words, else transcript.'),
5656
+ words: overlayWordsInput.min(1).optional().describe('With source words: the words and their times in timeline seconds.'),
5657
+ style: z.enum(TEXT_STYLE_IDS).optional().describe(`Default: ${CAPTION_STYLE_DEFAULT}, which lights up the spoken word.`),
5658
+ phrases: z
5659
+ .array(z.tuple([z.number().int().min(0), z.number().int().min(1)]))
5660
+ .min(1)
5661
+ .optional()
5662
+ .describe("Your own phrases as [from, to) word index ranges, in order and not overlapping: from is the phrase's first word, to is one past its last. Words count across the whole call in timeline order, and only those inside each clip's in and out points: a trimmed clip's earlier words are not counted (see slates-captions)."),
5663
+ tiers: z
5664
+ .record(z.string().regex(/^\d+$/, 'a word index'), z.enum(CAPTION_TIERS))
5665
+ .optional()
5666
+ .describe('Emphasis by word index (the same count as phrases). Unnamed words are regular. Drawn only by components: caption-editorial-emphasis sets italic and emphasis (slam draws as emphasis); kinetic-slam, clip-wipe, particle-burst, neon-glow and neon-accent colour emphasis and slam words as keywords. The text styles show regular.'),
5667
+ trackId: z.string().uuid().optional().describe('An overlay track to use. Default: a new Captions track on top.'),
5668
+ component: z.enum(CAPTION_COMPONENTS).optional().describe("A caption component instead of text clips: one HTML clip animating every word in that component's look (style does not apply). Preview them with slates_list_motion_blocks (query: caption, type: component)."),
5669
+ html: htmlCompositionInput.optional().describe("Your own caption layer instead of a component or text clips: a composition that reads var WORDS = [{ text, start, end }], RAW_GROUPS (phrases as [first, last] word indexes), KEYWORDS (a Set of emphasis word indexes) and DURATION, which Slates fills from the words, phrases and tiers. The slates-layer-brand-captions guide is one ready to use and adapt. Its declared values become the clip's Inspector controls. Not with component or style."),
5670
+ variables: htmlVariablesInput.optional().describe(`${htmlVariablesInput.description} With html.`),
5671
+ })
5672
+ .strict(),
5673
+ async run(input, ctx) {
5674
+ await ctx.desktop().requireCapability('captions', 'captions');
5675
+ if (input.component)
5676
+ await ctx.desktop().requireCapability('caption-components', 'caption components');
5677
+ if (input.html !== undefined)
5678
+ await ctx.desktop().requireCapability('caption-html', 'caption layers of your own');
5679
+ if (input.html !== undefined && input.component)
5680
+ throw new Error('html is your own caption layer and component a ready one. Pass one or the other.');
5681
+ if (input.html !== undefined && input.style)
5682
+ throw new Error('style is for text-clip captions; your html brings its own look. Pass one or the other.');
5683
+ if (input.variables && input.html === undefined)
5684
+ throw new Error('variables go with html, the composition that declares them.');
5685
+ if (input.component && input.style)
5686
+ throw new Error('style is for text-clip captions; a component brings its own look. Pass one or the other.');
5687
+ if (input.words && input.source && input.source !== 'words')
5688
+ throw new Error(`words go with source words; source ${input.source} finds its own.`);
5689
+ if (input.source === 'words' && !input.words)
5690
+ throw new Error('source words needs words: [{ text, start, end }] in timeline seconds.');
5691
+ const r = await ctx.desktop().post('/agent/timeline/add-captions', input);
5692
+ const lines = [
5693
+ input.component || input.html !== undefined
5694
+ ? `Added one ${input.component ?? 'caption layer'} clip over ${r.words} words (timing ${r.timing.join(', ')}) on ${r.createdTrack ? 'a new' : 'the'} track ${r.trackId}. ${describeFindings(r.findings)}`
5695
+ : `Added ${r.phrases} caption clip${r.phrases === 1 ? '' : 's'} (${r.words} words, timing ${r.timing.join(', ')}) on ${r.createdTrack ? 'a new' : 'the'} track ${r.trackId}.`,
5696
+ r.mismatches.length ? `Heard ≠ written in ${r.mismatches.length} place${r.mismatches.length === 1 ? '' : 's'}: ${r.mismatches.map((m) => `"${m.heard}" for "${m.written}" at ${m.start}s`).join('; ')}.` : '',
5697
+ r.skipped.length ? `Skipped: ${r.skipped.map((s) => `${s.clipId} (${s.reason})`).join('; ')}.` : '',
5698
+ ].filter(Boolean);
5699
+ return ok(r, `${lines.join(' ')} ${JSON.stringify(r)}`);
5700
+ },
5701
+ };
5702
+ const describeFindings = (f) => {
5703
+ if (!f)
5704
+ return '';
5705
+ const list = (items) => items.map((i) => `${i.code}: ${i.message}${i.selector ? ` (${i.selector})` : ''}${i.fixHint ? ` Fix: ${i.fixHint}` : ''}`).join('; ');
5706
+ if (f.errors.length)
5707
+ return `Check found ${f.errors.length} error${f.errors.length === 1 ? '' : 's'}; fix ${f.errors.length === 1 ? 'it' : 'them'} before moving on: ${list(f.errors)}.${f.warnings.length ? ` Warnings: ${list(f.warnings)}.` : ''}`;
5708
+ return f.warnings.length ? `Check passed with ${f.warnings.length} warning${f.warnings.length === 1 ? '' : 's'}: ${list(f.warnings)}.` : 'Check passed.';
5709
+ };
5710
+ export const addHtmlClip = {
5711
+ id: 'slates_add_html_clip',
5712
+ description: "Put an HTML motion layer on the timeline: an animated caption, lower third, end card, title, logo sting or background plate, drawn on an overlay track in preview and export. An HTML clip is a composition, an HTML document with a GSAP timeline registered on window.__timelines. Pass your own html, or block with the name of a registry block (slates_list_motion_blocks) and its variables; html with block replaces the block's document and keeps its files. Slates' composition check runs before the clip lands and its findings come back here: fix every error with slates_update_html_clip before moving on. Keep a transparent foreground and a background plate on separate tracks. Free. Read slates_get_timeline first for the frame rate and where clips sit. Craft: slates_get_prompting_guide (topic: slates-motion).",
5713
+ input: z
5714
+ .object({
5715
+ projectId: z.string().uuid(),
5716
+ timelineId: z.string().uuid().describe('The cut (slates_get_timeline or slates_list_timelines).'),
5717
+ trackId: z.string().uuid().optional().describe('An overlay track (slates_add_timeline_track, type overlay). Without it the desktop picks or makes one; createdTrack says which.'),
5718
+ startFrame: z.number().int().min(0).describe('Where the clip starts, in timeline frames.'),
5719
+ endFrame: z.number().int().min(1).optional().describe('The frame it ends before. Give endFrame or durationSec, not both; without either, the duration the composition or block declares.'),
5720
+ durationSec: z.number().positive().optional().describe('How long it shows, in seconds.'),
5721
+ html: htmlCompositionInput.optional().describe(`${htmlCompositionInput.description} html, block or both.`),
5722
+ block: z.string().min(1).optional().describe('A registry block name from slates_list_motion_blocks.'),
5723
+ variables: htmlVariablesInput.optional(),
5724
+ })
5725
+ .strict(),
5726
+ async run(input, ctx) {
5727
+ await ctx.desktop().requireCapability('html-clips', 'HTML layers');
5728
+ if (input.html === undefined && input.block === undefined)
5729
+ throw new Error('Give html (a composition document) or block (a registry block name).');
5730
+ if (input.endFrame !== undefined && input.durationSec !== undefined)
5731
+ throw new Error('Give endFrame or durationSec, not both.');
5732
+ const r = await ctx.desktop().post('/agent/timeline/add-html-clip', input);
5733
+ return ok(r, `Added HTML clip ${r.clipId} on ${r.createdTrack ? 'a new' : 'the'} track ${r.trackId}. ${describeFindings(r.findings)} ${JSON.stringify(r)}`);
5734
+ },
5735
+ };
5736
+ export const updateHtmlClip = {
5737
+ id: 'slates_update_html_clip',
5738
+ description: "Change an HTML clip's composition or its variables. Slates' composition check runs again and its findings come back here: fix every error before moving on. Only what you pass changes. To move or retime one, remove it (slates_remove_clip) and add it again.",
5739
+ input: z
5740
+ .object({
5741
+ projectId: z.string().uuid(),
5742
+ clipId: z.string().uuid().describe('An HTML clip (slates_get_timeline).'),
5743
+ html: htmlCompositionInput.optional().describe(`${htmlCompositionInput.description} Replaces the whole document.`),
5744
+ variables: htmlVariablesInput.nullable().optional().describe(`${htmlVariablesInput.description} Replaces them all; null clears them.`),
5745
+ })
5746
+ .strict(),
5747
+ async run(input, ctx) {
5748
+ await ctx.desktop().requireCapability('html-clips', 'HTML layers');
5749
+ if (input.html === undefined && input.variables === undefined)
5750
+ throw new Error('Pass html or variables to change.');
5751
+ const r = await ctx.desktop().post('/agent/timeline/update-html-clip', input);
5752
+ return ok(r, `Updated HTML clip ${r.clipId}. ${describeFindings(r.findings)} ${JSON.stringify(r)}`);
5753
+ },
5754
+ };
5755
+ export const checkComposition = {
5756
+ id: 'slates_check_composition',
5757
+ description: "Check a composition before it lands, with Slates' composition check: its errors and warnings, each with a code, a message and, where it has one, the selector it found. Writes nothing. slates_add_html_clip and slates_update_html_clip run the same check, so use this one while drafting.",
5758
+ input: z.object({ html: htmlCompositionInput }).strict(),
5759
+ async run(input, ctx) {
5760
+ await ctx.desktop().requireCapability('html-clips', 'HTML layers');
5761
+ const r = await ctx.desktop().post('/agent/compositions/check', input);
5762
+ return ok(r, `${describeFindings(r)} ${JSON.stringify(r)}`);
5763
+ },
5764
+ };
5765
+ export const listMotionBlocks = {
5766
+ id: 'slates_list_motion_blocks',
5767
+ description: "Search the motion block library for ready-made motion layers, such as captions, lower thirds and end cards: each item's name, type, title, description and tags. The list is the library at the version this Slates build runs, so every item in it draws here. Put a block on the timeline with slates_add_html_clip (block: its name).",
5768
+ input: z
5769
+ .object({
5770
+ query: z.string().min(1).max(200).optional().describe('Words to match, such as "lower third" or "kinetic caption".'),
5771
+ type: z.enum(MOTION_REGISTRY_TYPES).optional().describe('Default: block, the items slates_add_html_clip takes.'),
5772
+ })
5773
+ .strict(),
5774
+ async run(input, ctx) {
5775
+ await ctx.desktop().requireCapability('html-clips', 'HTML layers');
5776
+ const r = await ctx.desktop().get('/agent/compositions/registry', { query: input.query, type: input.type });
5777
+ const rows = r.items.map((i) => `- ${i.name} (${i.type})${i.title ? `: ${i.title}` : ''}${i.description ? ` — ${i.description}` : ''}${i.tags?.length ? ` [${i.tags.join(', ')}]` : ''}`);
5778
+ const shown = r.total > r.items.length ? `${r.items.length} of ${r.total} registry items (search to narrow it)` : `${r.items.length} registry item${r.items.length === 1 ? '' : 's'}`;
5779
+ const from = r.offline ? `the list saved ${r.fetchedAt} (the registry could not be reached)` : `${r.source}, fetched ${r.fetchedAt}`;
5780
+ return ok(r, `${shown} from ${from}.\n${rows.join('\n')}`);
5781
+ },
5782
+ };
4887
5783
  export const updateTimelineTrack = {
4888
5784
  id: 'slates_update_timeline_track',
4889
5785
  description: 'Update a timeline track: rename, mute/unmute, lock/unlock, or set its volume fader (linear gain, -∞ to +12 dB). Track volume applies to both preview and MP4 export — audio-track clips are mixed at this gain; a muted video track still shows video but its embedded audio is silenced.',
@@ -4916,18 +5812,25 @@ export const removeTimelineTrack = {
4916
5812
  };
4917
5813
  export const updateTimelineSettings = {
4918
5814
  id: 'slates_update_timeline_settings',
4919
- description: "Update the project timeline's output settings: resolution, frame rate (24/30/60 — all clips are conformed to it on export), and masterVolume, the output fader (linear gain, -∞ to +12 dB) applied to the final mix in both preview and MP4 export (use it to prevent clipping when stacking loud tracks). Note these are normally auto-managed: the first video clip sets fps + resolution, and higher-res clips raise the canvas. Changing frameRate after clips are placed retimes them — avoid unless the timeline is empty.",
5815
+ description: "Update a timeline's output settings: resolution, frame rate (24/30/60; all clips are conformed to it on export), masterVolume, or delivery formats, naming taxonomy and explicit variant grid bindings. New fields require ad-variant-export; null clears them. Read aspects and dimensions from slates_get_variant_grid. Delivery-only updates on an explicit timeline return the computed formats. masterVolume is the output fader (linear gain: 0 is silent, 1 is unity, 4 is the maximum boost) applied to the preview and the final mix; use it to prevent clipping when stacking loud tracks. These are normally auto-managed: the first video clip sets fps and resolution, higher-res clips raise the canvas, and delivery preserves the master aspect. Changing frameRate keeps clip positions, lengths and markers in seconds, rounded to the nearest new frame.",
4920
5816
  input: z.object({
4921
5817
  projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
4922
5818
  width: z.number().int().min(16).optional(),
4923
5819
  height: z.number().int().min(16).optional(),
4924
5820
  frameRate: z.union([z.literal(24), z.literal(30), z.literal(60)]).optional(),
4925
5821
  masterVolume: z.number().min(0).max(4).optional().describe('Output fader as LINEAR gain: 0 = -∞ (silent), 1 = 0 dB (unity), ~3.98 = +12 dB (max boost).'),
5822
+ ...cutOptionsInput,
4926
5823
  }),
4927
5824
  async run(input, ctx) {
4928
5825
  const desktop = ctx.desktop();
4929
5826
  await desktop.requireCapability('timeline-tracks', 'timeline tracks + audio mixing');
4930
5827
  await requireNamedCut(desktop, input.timelineId);
5828
+ if (input.delivery !== undefined || input.taxonomy !== undefined || input.gridBinding !== undefined) {
5829
+ await desktop.requireCapability('ad-variant-export', 'cut delivery, naming and grid bindings');
5830
+ }
5831
+ if (input.timelineId && input.delivery !== undefined && Object.keys(input).every(key => ['projectId', 'timelineId', 'delivery'].includes(key))) {
5832
+ return ok(await desktop.post('/agent/timeline/delivery', input));
5833
+ }
4931
5834
  return ok(await desktop.post('/agent/timeline/update-settings', input));
4932
5835
  },
4933
5836
  };
@@ -4935,7 +5838,8 @@ export const updateTimelineSettings = {
4935
5838
  const ABSOLUTE_PATH_RE = /^([A-Za-z]:[\\/]|\/)/;
4936
5839
  export const exportVideo = {
4937
5840
  id: 'slates_export_video',
4938
- description: "Render the project's timeline to an MP4 file on disk via the desktop app's ffmpeg pipeline (H.264 + AAC, gaps rendered as black). No dialogs — pass an absolute outputPath ending in .mp4. Fails if the file exists unless overwrite=true. Blocks until encoding finishes (can take minutes for long timelines) and returns the real file size and probed duration. After success, consider slates_reveal_file to show the file to the user. Requires at least one video clip on the timeline.",
5841
+ billable: false,
5842
+ description: "Render the project's timeline to an MP4 file on disk through the desktop app's timeline engine, the renderer its monitor shows, so the file matches the preview (H.264 + AAC, every video lane composited with its transitions, fades and keyframes, gaps rendered as black; the Slates window must be open). No dialogs — pass an absolute outputPath ending in .mp4. Fails if the file exists unless overwrite=true. Blocks until encoding finishes (can take minutes for long timelines) and returns the real file size and probed duration. After success, consider slates_reveal_file to show the file to the user. Requires at least one video clip on the timeline. Pass exactly one of projectId (the project's default timeline) or timelineId (a named cut).",
4939
5843
  input: z
4940
5844
  .object({
4941
5845
  projectId: z.string().uuid().optional(),
@@ -4946,6 +5850,7 @@ export const exportVideo = {
4946
5850
  .refine((p) => ABSOLUTE_PATH_RE.test(p), { message: 'outputPath must be absolute' })
4947
5851
  .describe('Absolute path for the rendered file, ending in .mp4 (e.g. C:\\Users\\you\\Videos\\ad.mp4 or /Users/you/ad.mp4). slates_get_project_directory gives a sensible default folder.'),
4948
5852
  overwrite: z.boolean().optional(),
5853
+ aspect: deliveryAspectInput.optional().describe('Optional delivery aspect from slates_get_variant_grid; requires ad-variant-export. Omission keeps existing export behavior.'),
4949
5854
  })
4950
5855
  .refine((d) => !!d.projectId !== !!d.timelineId, {
4951
5856
  message: 'Pass exactly one of projectId or timelineId',
@@ -4953,11 +5858,14 @@ export const exportVideo = {
4953
5858
  async run(input, ctx) {
4954
5859
  const desktop = ctx.desktop();
4955
5860
  await desktop.requireCapability('export', 'video export');
5861
+ if (input.aspect !== undefined)
5862
+ await desktop.requireCapability('ad-variant-export', 'single video delivery export');
4956
5863
  const r = await desktop.post('/agent/timeline/export-video', {
4957
5864
  projectId: input.projectId,
4958
5865
  timelineId: input.timelineId,
4959
5866
  outputPath: input.outputPath,
4960
5867
  overwrite: input.overwrite,
5868
+ aspect: input.aspect,
4961
5869
  });
4962
5870
  const mb = r.fileSizeBytes != null ? (r.fileSizeBytes / (1024 * 1024)).toFixed(1) : '?';
4963
5871
  return ok(r, `Exported ${r.durationSec ?? '?'}s MP4 (${mb} MB) to ${r.outputPath ?? input.outputPath}.`);
@@ -4965,7 +5873,7 @@ export const exportVideo = {
4965
5873
  };
4966
5874
  export const exportTimelineXml = {
4967
5875
  id: 'slates_export_timeline_xml',
4968
- description: "Export the project's timeline as FCP7/XMEML XML — the file DaVinci Resolve imports directly (File → Import → Timeline) to recreate the edit with references to the original clip media on disk. Use this for DaVinci Resolve or Premiere; current Final Cut Pro requires FCPXML, which this tool does not export. Pass an absolute outputPath ending in .xml; fails if the file exists unless overwrite=true.",
5876
+ description: "Export the project's timeline as FCP7/XMEML XML — the file DaVinci Resolve imports directly (File → Import → Timeline) to recreate the edit with references to the original clip media on disk. Use this for DaVinci Resolve or Premiere; current Final Cut Pro requires FCPXML, which this tool does not export. Pass an absolute outputPath ending in .xml; fails if the file exists unless overwrite=true. Pass exactly one of projectId (the project's default timeline) or timelineId (a named cut).",
4969
5877
  input: z
4970
5878
  .object({
4971
5879
  projectId: z.string().uuid().optional(),
@@ -5075,8 +5983,8 @@ export const undoRelocateProject = {
5075
5983
  };
5076
5984
  export const deleteAsset = {
5077
5985
  id: 'slates_delete_asset',
5078
- description: 'Delete an asset from its project. Permanent — also deletes the media file from disk.',
5079
- input: z.object({ id: z.string().uuid() }),
5986
+ description: 'Delete an asset from its project. Permanent: also deletes the media file from disk, so ask the user first.',
5987
+ input: z.object({ id: z.string().uuid().describe(ASSET_UUID_ONLY) }),
5080
5988
  async run(input, ctx) {
5081
5989
  return ok(await ctx.desktop().post('/agent/assets/delete', { id: input.id }));
5082
5990
  },
@@ -5094,7 +6002,7 @@ export const renameFolder = {
5094
6002
  };
5095
6003
  export const deleteFolder = {
5096
6004
  id: 'slates_delete_folder',
5097
- description: 'Delete an asset folder.',
6005
+ description: 'Delete an asset folder only; its files return to No folder. To delete the files too, call slates_delete_asset on them first.',
5098
6006
  input: z.object({ folderId: z.string().uuid() }),
5099
6007
  async run(input, ctx) {
5100
6008
  return ok(await ctx.desktop().post('/agent/folders/delete', { id: input.folderId }));
@@ -5105,7 +6013,7 @@ export const setFolderCover = {
5105
6013
  description: 'Set the cover image of an asset folder (or clear it with assetId=null).',
5106
6014
  input: z.object({
5107
6015
  folderId: z.string().uuid(),
5108
- assetId: z.string().uuid().nullable(),
6016
+ assetId: z.string().uuid().nullable().describe(ASSET_UUID_ONLY),
5109
6017
  }),
5110
6018
  async run(input, ctx) {
5111
6019
  return ok(await ctx.desktop().post('/agent/folders/set-cover', input));
@@ -5113,12 +6021,12 @@ export const setFolderCover = {
5113
6021
  };
5114
6022
  export const updateCharacter = {
5115
6023
  id: 'slates_update_character',
5116
- description: 'Update a character\'s name, description, style, or voice. Use slates_set_character_identity_asset for its canonical image.',
6024
+ description: 'Update a character\'s name, description, style, or voice. Use slates_set_character_identity_asset for its canonical image.' + LIBRARY_TWIN('slates_update_library_item', 'edits the same row'),
5117
6025
  input: z.object({
5118
6026
  characterId: z.string().uuid(),
5119
6027
  name: z.string().min(1).max(120).optional(),
5120
6028
  description: z.string().optional(),
5121
- style: z.string().max(200).optional().describe("Art style. Omit to inherit the reference's style (the default). Canonical styles: photoreal, anime, painterly, 3d-render, comic. Or pass any free-text instruction, e.g. 'turn this into a real person'."),
6029
+ style: z.string().max(200).optional().describe(STYLE_DESCRIBE('Omit to keep the stored style.')),
5122
6030
  // Agent parity for the character card's voice slot: the desktop route has
5123
6031
  // taken this since 2026-08-28; the op never exposed it, so an agent could
5124
6032
  // render a voice and had no way to keep it on the character.
@@ -5145,7 +6053,7 @@ export const updateCharacter = {
5145
6053
  };
5146
6054
  export const deleteCharacter = {
5147
6055
  id: 'slates_delete_character',
5148
- description: 'Delete a character from its project.',
6056
+ description: 'Delete a character from its project.' + LIBRARY_TWIN('slates_delete_library_item', 'deletes the same row'),
5149
6057
  input: z.object({ characterId: z.string().uuid() }),
5150
6058
  async run(input, ctx) {
5151
6059
  return ok(await ctx.desktop().post('/agent/characters/delete', { id: input.characterId }));
@@ -5153,12 +6061,12 @@ export const deleteCharacter = {
5153
6061
  };
5154
6062
  export const updateEnvironment = {
5155
6063
  id: 'slates_update_environment',
5156
- description: 'Update a location\'s name, description, style, or bound reference image (referenceAssetId=null clears it).',
6064
+ description: 'Update a location\'s name, description, style, or bound reference image (referenceAssetId=null clears it).' + LIBRARY_TWIN('slates_update_library_item', 'edits the same row'),
5157
6065
  input: z.object({
5158
6066
  environmentId: z.string().uuid(),
5159
6067
  name: z.string().min(1).max(120).optional(),
5160
6068
  description: z.string().optional(),
5161
- style: z.string().max(200).optional().describe("Art style. Omit to inherit the reference's style (the default). Canonical styles: photoreal, anime, painterly, 3d-render, comic. Or pass any free-text instruction, e.g. 'turn this into a real person'."),
6069
+ style: z.string().max(200).optional().describe(STYLE_DESCRIBE('Omit to keep the stored style.')),
5162
6070
  referenceAssetId: z.string().uuid().nullable().optional(),
5163
6071
  }),
5164
6072
  async run(input, ctx) {
@@ -5175,7 +6083,7 @@ export const updateEnvironment = {
5175
6083
  };
5176
6084
  export const deleteEnvironment = {
5177
6085
  id: 'slates_delete_environment',
5178
- description: 'Delete a location from its project.',
6086
+ description: 'Delete a location from its project.' + LIBRARY_TWIN('slates_delete_library_item', 'deletes the same row'),
5179
6087
  input: z.object({ environmentId: z.string().uuid() }),
5180
6088
  async run(input, ctx) {
5181
6089
  return ok(await ctx.desktop().post('/agent/environments/delete', { id: input.environmentId }));
@@ -5183,7 +6091,7 @@ export const deleteEnvironment = {
5183
6091
  };
5184
6092
  export const listStyles = {
5185
6093
  id: 'slates_list_styles',
5186
- description: 'List the looks (styles) in a Slates project.',
6094
+ description: 'List the looks (styles) in a Slates project.' + LIBRARY_TWIN('slates_list_library', 'lists them with every other Library item, each with its category and mention (#name for a look)'),
5187
6095
  input: z.object({ projectId: z.string().uuid() }),
5188
6096
  async run(input, ctx) {
5189
6097
  return ok(await ctx.desktop().get('/agent/styles', { projectId: input.projectId }));
@@ -5191,7 +6099,7 @@ export const listStyles = {
5191
6099
  };
5192
6100
  export const createStyle = {
5193
6101
  id: 'slates_create_style',
5194
- description: 'Create a new look (style) in a Slates project.',
6102
+ description: 'Create a new look (style) in a Slates project.' + LIBRARY_TWIN('slates_create_library_item', 'creates one in a category you choose and returns its #mention'),
5195
6103
  input: z.object({
5196
6104
  projectId: z.string().uuid(),
5197
6105
  name: z.string().min(1).max(120),
@@ -5203,7 +6111,7 @@ export const createStyle = {
5203
6111
  };
5204
6112
  export const updateStyle = {
5205
6113
  id: 'slates_update_style',
5206
- description: 'Update a look\'s name, description, or bound reference image (imageAssetId=null clears it).',
6114
+ description: 'Update a look\'s name, description, or bound reference image (imageAssetId=null clears it).' + LIBRARY_TWIN('slates_update_library_item', 'edits the same row'),
5207
6115
  input: z.object({
5208
6116
  styleId: z.string().uuid(),
5209
6117
  name: z.string().min(1).max(120).optional(),
@@ -5219,7 +6127,7 @@ export const updateStyle = {
5219
6127
  };
5220
6128
  export const deleteStyle = {
5221
6129
  id: 'slates_delete_style',
5222
- description: 'Delete a look from its project.',
6130
+ description: 'Delete a look from its project.' + LIBRARY_TWIN('slates_delete_library_item', 'deletes the same row'),
5223
6131
  input: z.object({ styleId: z.string().uuid() }),
5224
6132
  async run(input, ctx) {
5225
6133
  return ok(await ctx.desktop().post('/agent/styles/delete', { id: input.styleId }));
@@ -5301,7 +6209,7 @@ export const updateLibraryItem = {
5301
6209
  };
5302
6210
  export const deleteLibraryItem = {
5303
6211
  id: 'slates_delete_library_item',
5304
- description: 'Delete a Library item. Its images and voice clip stay in the project as ordinary assets.',
6212
+ description: 'Delete a Library item. Saved Shots that mention it stop attaching it, so tell the user how many. Its images and voice clip stay in the project as ordinary assets.',
5305
6213
  input: z.object({ itemId: z.string().uuid() }),
5306
6214
  async run(input, ctx) {
5307
6215
  await ctx.desktop().requireCapability('library', 'the Library');
@@ -5315,7 +6223,7 @@ export const manageLibraryCategory = {
5315
6223
  action: z.enum(['create', 'rename', 'set-behaviour', 'reorder', 'delete']),
5316
6224
  projectId: z.string().uuid().optional(),
5317
6225
  categoryId: z.string().uuid().optional(),
5318
- name: z.string().min(1).max(80).optional(),
6226
+ name: z.string().min(1).max(40).optional().describe("Up to 40 characters, as the app's name field."),
5319
6227
  kind: z.enum(['thing', 'look']).optional(),
5320
6228
  template: z.enum(['person', 'location']).nullable().optional(),
5321
6229
  retagShots: z.boolean().optional(),
@@ -5354,7 +6262,7 @@ export const copyLibraryItemToProject = {
5354
6262
  // mention. It holds no takes, and importing one generates and spends nothing.
5355
6263
  export const getTemplate = {
5356
6264
  id: 'slates_get_template',
5357
- description: "Read a Slates template file without changing anything. With `path`: what it holds (scenes, shots, library items, the models its shots are set to) and its SWAP SLOTS — every Library item (`item:i1`, labelled with its mention, e.g. @candle) and every directly attached reference (`asset:a3`, with its roles) that slates_import_template can point at one of the project's own assets instead. Without `path`: the saved templates on this machine (the app's starter set and the user's own folder).",
6265
+ description: "Read a Slates template file without changing anything. With `path`: what it holds (scenes, shots, library items, the models its shots are set to) and its SWAP SLOTS — every Library item (`item:i1`, labelled with its mention, e.g. @candle) and every directly attached reference (`asset:a3`, with its roles) that slates_import_template can point at one of the project's own assets instead. Without `path`: the templates in the user's templates folder, plus any starter templates the app ships.",
5358
6266
  input: z.object({ path: z.string().min(1).optional().describe('Absolute path of a .slatestemplate file. Omit to list saved templates.') }),
5359
6267
  async run(input, ctx) {
5360
6268
  await ctx.desktop().requireCapability('templates', 'templates');
@@ -5365,7 +6273,7 @@ export const getTemplate = {
5365
6273
  };
5366
6274
  export const exportTemplate = {
5367
6275
  id: 'slates_export_template',
5368
- description: "Save a board, a scene or one Shot as a template file someone else can start from. Give exactly one of storyboardId, sceneId or shotId. The file carries each Shot's full recipe (prompt, model, settings, reference roles, script words) plus the reference files and the Library items the Shots mention; it carries no takes. The project is untouched. Returns the path, the counts, and a warning for any reference whose file is missing.",
6276
+ description: "Save a board, a scene or one Shot as a template file someone else can start from. Give exactly one of storyboardId, sceneId or shotId. The file carries each Shot's full recipe (prompt, model, settings, reference roles, script words) plus the reference files and the Library items the Shots mention; it carries no takes. The project is untouched. A file saved outside the user's templates folder is not in the template list (slates_get_template without path); the user opens it with Open a file. Returns the path, the counts and a warning for any reference whose file is missing.",
5369
6277
  input: z.object({
5370
6278
  projectId: z.string().uuid(),
5371
6279
  path: z.string().min(1).describe('Absolute path to write, ending in .slatestemplate. Its folder is created if needed.'),
@@ -5385,7 +6293,7 @@ export const exportTemplate = {
5385
6293
  };
5386
6294
  export const importTemplate = {
5387
6295
  id: 'slates_import_template',
5388
- description: "Add a template to a project. A board template becomes a new board; a scene template becomes a new scene of `storyboardId` (default: the most recently edited board); a single-Shot template is filed like any new Shot (into `sceneId` when given). Its reference files become new assets of this project and its Library items are created here (a taken name is suffixed and the imported prompts are rewritten to match; see `renamed`). `swaps` maps a slot key from slates_get_template to an asset of THIS project (id or code) of the slot's type: the item takes that picture, or every Shot that attached the template's reference attaches it instead, and the template's own file for that slot is not imported. Generates nothing and spends nothing: price and fire the returned shotIds with slates_generate_from_shots, after the user approves the prices.",
6296
+ description: "Add a template to a project. A board template becomes a new board; a scene template becomes a new scene of `storyboardId` (default: the most recently edited board); a single-Shot template is filed like any new Shot (into `sceneId` when given, else the last scene of `storyboardId` or of the most recently edited board). Its reference files become new assets of this project and its Library items are created here (a taken name is suffixed and the imported prompts are rewritten to match; see `renamed`). `swaps` maps a slot key from slates_get_template to an asset of THIS project (id or code) of the slot's type: the item takes that picture, or every Shot that attached the template's reference attaches it instead, and the template's own file for that slot is not imported. Generates nothing and spends nothing: price and fire the returned shotIds with slates_generate_from_shots, after the user approves the prices.",
5389
6297
  input: z.object({
5390
6298
  projectId: z.string().uuid(),
5391
6299
  path: z.string().min(1).describe('Absolute path of the .slatestemplate file.'),
@@ -5414,7 +6322,7 @@ export const updateStoryboard = {
5414
6322
  description: 'Update a board\'s name and/or description.',
5415
6323
  input: z.object({
5416
6324
  storyboardId: z.string().uuid(),
5417
- name: z.string().min(1).max(120).optional(),
6325
+ name: z.string().min(1).max(80).optional(),
5418
6326
  description: z.string().optional(),
5419
6327
  }),
5420
6328
  async run(input, ctx) {
@@ -5426,7 +6334,7 @@ export const updateStoryboard = {
5426
6334
  };
5427
6335
  export const deleteStoryboard = {
5428
6336
  id: 'slates_delete_storyboard',
5429
- description: 'Delete a board with all its scenes and frames (the referenced assets are untouched).',
6337
+ description: 'Delete a board with all its scenes and Shots; the media they made stays, and a Shot that also sits on another board survives. The app cannot undo this, so confirm with the user first.',
5430
6338
  input: z.object({ storyboardId: z.string().uuid() }),
5431
6339
  async run(input, ctx) {
5432
6340
  return ok(await ctx.desktop().post('/agent/storyboards/delete', { id: input.storyboardId }));
@@ -5449,7 +6357,7 @@ export const updateScene = {
5449
6357
  };
5450
6358
  export const deleteScene = {
5451
6359
  id: 'slates_delete_scene',
5452
- description: 'Delete a scene (and its frames) from a board.',
6360
+ description: 'Delete a scene and every Shot in it; the pictures and clips they made stay in Media. The app cannot undo this, so confirm with the user first. To drop only the scene break and keep its Shots, use slates_merge_scene.',
5453
6361
  input: z.object({ sceneId: z.string().uuid() }),
5454
6362
  async run(input, ctx) {
5455
6363
  return ok(await ctx.desktop().post('/agent/scenes/delete', { id: input.sceneId }));
@@ -5473,12 +6381,12 @@ export const updateFrame = {
5473
6381
  // of what the Shot in this slot already encodes — the image's role and the
5474
6382
  // beat's words — and they were backfilled into Shots on 2026-08-31. Use
5475
6383
  // slates_update_shot for either.
5476
- 'Update a slot: its shot label, notes, bound asset (assetId=null unbinds), scene or position. A scene or position change carries the words in this slot with it on the Script page. preferredClipId picks the clip the timeline takes for this slot (a video asset id or VID code; null goes back to the slot\'s most recent linked clip), as the take menu\'s "Use in the timeline" does. The BEAT — its line, references, model, prompt and framing — lives on the Shot in this slot; use slates_update_shot for that.',
6384
+ 'Update a slot: its shot label, notes, bound asset (assetId=null unbinds), scene or position. A scene or position change carries the words in this slot with it on the Script page. preferredClipId picks the clip the timeline takes for this slot (a video asset id or VID code; null goes back to the newest linked video), as the take menu\'s "Use in the timeline" does. The BEAT — its line, references, model, prompt and framing — lives on the Shot in this slot; use slates_update_shot for that.',
5477
6385
  input: z.object({
5478
6386
  frameId: z.string().uuid(),
5479
6387
  shotLabel: z.string().optional(),
5480
6388
  notes: z.string().optional(),
5481
- assetId: z.string().uuid().nullable().optional(),
6389
+ assetId: z.string().uuid().nullable().optional().describe(ASSET_UUID_ONLY),
5482
6390
  sceneId: z.string().uuid().optional(),
5483
6391
  position: z.number().int().min(0).optional(),
5484
6392
  preferredClipId: z.string().min(1).nullable().optional().describe('The clip the timeline takes for this slot: a video asset id or badge code in the project; null clears it.'),
@@ -5522,7 +6430,7 @@ export const batchUpdateFrames = {
5522
6430
  frameId: z.string().uuid(),
5523
6431
  shotLabel: z.string().optional(),
5524
6432
  notes: z.string().optional(),
5525
- assetId: z.string().uuid().nullable().optional(),
6433
+ assetId: z.string().uuid().nullable().optional().describe(ASSET_UUID_ONLY),
5526
6434
  sceneId: z.string().uuid().optional(),
5527
6435
  position: z.number().int().min(0).optional(),
5528
6436
  preferredClipId: z.string().min(1).nullable().optional().describe('A video asset id or badge code in the project; null clears it.'),
@@ -5550,7 +6458,7 @@ export const batchUpdateFrames = {
5550
6458
  };
5551
6459
  export const deleteFrame = {
5552
6460
  id: 'slates_delete_frame',
5553
- description: 'Delete a frame from its scene (the referenced asset is untouched).',
6461
+ description: 'Delete a Shot by deleting its slot (frame): this is the delete-Shot tool, and it also removes an exploration slot. The takes stay in Media. The user can press Ctrl+Z in the app to bring a deleted Shot back.',
5554
6462
  input: z.object({ frameId: z.string().uuid() }),
5555
6463
  async run(input, ctx) {
5556
6464
  return ok(await ctx.desktop().post('/agent/frames/delete', { id: input.frameId }));
@@ -5627,13 +6535,13 @@ function shotParamsShape(described) {
5627
6535
  duration: d(z.number().int().min(1).max(360).optional(), 'Seconds for video or duration-based audio; TTS uses text length.'),
5628
6536
  videoResolution: d(zEnum(VIDEO_RESOLUTIONS).optional(), 'Validated against the model when the Shot is saved.'),
5629
6537
  imageResolution: d(z.enum(['1k', '2k', '3k', '4k']).optional(), 'Image models only.'),
5630
- gptQuality: d(z.enum(GPT_QUALITY_TIERS).optional(), 'GPT Image 2.5 only.'),
6538
+ gptQuality: d(z.enum(GPT_QUALITY_TIERS).optional(), `${IMAGE_MODELS.filter(isGptImageModel).join(', ')} only.`),
5631
6539
  gptBackground: d(z.enum(GPT_BACKGROUNDS).optional(), 'GPT Image only.'),
5632
6540
  detachedVoiceCharacterIds: z.array(z.string()).optional().describe('Character voices removed from this recipe.'),
5633
6541
  imageQuantity: d(z.number().int().min(1).max(10).optional(), 'Image models only.'),
5634
6542
  negativePrompt: z.string().optional(),
5635
6543
  sound: d(z.boolean().optional(), 'Video models that co-generate audio.'),
5636
- seedanceFace: d(z.boolean().optional(), "Seedance only — a reference shows an AI character's FACE; without it faces are blocked, and it costs ~45% more."),
6544
+ seedanceFace: d(z.boolean().optional(), "Seedance only — a reference shows an AI character's face; without it faces are blocked. The estimate prices it."),
5637
6545
  audioDurationSeconds: d(z.number().int().min(1).max(120).optional(), 'Audio lane. On seed-audio the requested duration IS the bill.'),
5638
6546
  // The TTS voice — the same three fields slates_generate_audio takes, so a
5639
6547
  // Shot is the audio call, serialized. Exactly one of them, enforced at fire.
@@ -5919,7 +6827,7 @@ async function loadDynamicPrice(ctx, byKey, key) {
5919
6827
  }
5920
6828
  export const createShot = {
5921
6829
  id: 'slates_create_shot',
5922
- description: 'Write one beat of the piece — a Shot: its script line, its references with their roles, its model and params, and the prompt that fires. It needs NO image to exist, so a whole film can be written, arranged and priced before anything is generated. It lands in the board automatically (the open scene, else the most recent board) — never unfiled. ' +
6830
+ description: 'Write one beat of the piece — a Shot: its script line, its references with their roles, its model and params, and the prompt that fires. It needs NO image to exist, so a whole film can be written, arranged and priced before anything is generated. It lands in the board automatically (the open scene, else the most recent board) — never unfiled. Saves only: it generates and spends nothing; price with slates_get_board_quote and fire with slates_generate_from_shots after the user approves. ' +
5923
6831
  FRAMING_NOTE,
5924
6832
  input: z.object({
5925
6833
  projectId: z.string().uuid(),
@@ -6024,7 +6932,7 @@ async function boardSoFar(desktop, where) {
6024
6932
  }
6025
6933
  export const updateShot = {
6026
6934
  id: 'slates_update_shot',
6027
- description: 'Change part of a Shot, or attach/detach it from a board frame — anything you omit is left exactly as it was. ' +
6935
+ description: 'Change part of a Shot, or attach/detach it from a board frame — anything you omit is left exactly as it was. Saves only: it generates and spends nothing. ' +
6028
6936
  FRAMING_NOTE,
6029
6937
  input: z.object({
6030
6938
  shotId: z.string().describe('The Shot id, or its SHOT-A code as shown on the row.'),
@@ -6165,7 +7073,7 @@ function describeVarietyReport(v) {
6165
7073
  }
6166
7074
  export const listShots = {
6167
7075
  id: 'slates_list_shots',
6168
- description: "Read the shot list — every Shot as a compact row IN BOARD ORDER (scene, then position), with its place on the board (2C: scene number and slot letter, as the window shows it and the user says it), the piece's cut count, runtime, saved-recipe price and its variety distribution. Read this before firing a set: if one shot size is the plurality or three cuts in a row share a camera move, the batch is wrong before a credit is spent.",
7076
+ description: "Read the shot list — every Shot as a compact row in board order (scene, then position), with its place on the board (2C: scene number and slot letter, as the window shows it and the user says it), the piece's cut count, runtime, saved-recipe price and its variety distribution. Read this before firing a set: if one shot size is the plurality or three cuts in a row share a camera move, the batch is wrong before a credit is spent.",
6169
7077
  input: z.object({
6170
7078
  projectId: z.string().uuid(),
6171
7079
  storyboardId: z.string().uuid().optional().describe('Only Shots attached to a frame in this board.'),
@@ -6345,7 +7253,7 @@ export const splitShot = {
6345
7253
  };
6346
7254
  export const splitTake = {
6347
7255
  id: 'slates_split_take',
6348
- description: "A take founds its own Shot. The result (a take under `shotId`) moves to a NEW Shot whose recipe is the take's RECORDED one — the prompt, model, params and references it was actually made from, which may differ from what the source Shot says now. The new Shot lands directly after the source by default; the source keeps its other takes and its recipe untouched, and is never deleted when emptied. Script fields (line, speaker) start empty on the new row.",
7256
+ description: "Move a take to a NEW Shot made from its recorded recipe (to move it to an existing Shot, use slates_refile_take). The result (a take under `shotId`) moves to a new Shot whose recipe is the take's RECORDED one — the prompt, model, params and references it was actually made from, which may differ from what the source Shot says now. The new Shot lands directly after the source by default; the source keeps its other takes and its recipe untouched, and is never deleted when emptied. Script fields (line, speaker) start empty on the new row.",
6349
7257
  input: z.object({
6350
7258
  shotId: z.string().describe('The source Shot id, or its SHOT-A code.'),
6351
7259
  assetId: z.string().describe('The take to move — an asset id or its IMG-A / VID-A code. Must be a take of `shotId`.'),
@@ -6365,7 +7273,7 @@ export const splitTake = {
6365
7273
  };
6366
7274
  export const refileTake = {
6367
7275
  id: 'slates_refile_take',
6368
- description: 'Move a take (a result) from one Shot to another in the same project. Only the attribution moves: neither Shot\'s recipe changes, the asset stays where it is in Media, and a clip that a frame prefers keeps that role. `fromShotId` is a guard — the take moves only if it still hangs under that Shot (omit it to claim an unattributed result). An emptied Shot is kept, never deleted.',
7276
+ description: 'Move a take (a result) from one Shot to another in the same project. Only the attribution moves: neither Shot\'s recipe changes, the asset stays where it is in Media, and a clip that a frame prefers keeps that role. `fromShotId` is a guard — the take moves only if it still hangs under that Shot (omit it to claim an unattributed result). An emptied Shot is kept, never deleted. To start a new Shot from the take, use slates_split_take.',
6369
7277
  input: z.object({
6370
7278
  assetId: z.string().describe('The take — an asset id or its IMG-A / VID-A code.'),
6371
7279
  fromShotId: z.string().nullable().optional().describe('The Shot it hangs under now (id or SHOT-A code). Omitted or null = an unattributed result.'),
@@ -6382,7 +7290,7 @@ export const refileTake = {
6382
7290
  };
6383
7291
  export const mergeShots = {
6384
7292
  id: 'slates_merge_shots',
6385
- description: "Merge two adjacent Shots into one. Texts join, references union, the FIRST Shot's model and params win, and the durations SUM — which may exceed the model's window, in which case it is shown and never blocked. Lossy in one direction: the second Shot's model and params are discarded, and there is no undo (the takes are the history).",
7293
+ description: "Merge two adjacent Shots into one. Texts join, references union, the FIRST Shot's model and params win, and the durations SUM — which may exceed the model's window, in which case it is shown and never blocked. Lossy in one direction: the second Shot's model and params are discarded. There is no undo op; the user can press Ctrl+Z in the app straight after, and the takes stay as the history.",
6386
7294
  input: z.object({
6387
7295
  firstId: z.string().describe('The Shot that survives — its model and params win. Id or SHOT-A code.'),
6388
7296
  secondId: z.string().describe('The Shot folded into it. Id or SHOT-A code.'),
@@ -6406,7 +7314,7 @@ export const mergeShots = {
6406
7314
  // it; read before you write, because every edit moves what follows it.
6407
7315
  export const getScript = {
6408
7316
  id: 'slates_get_script',
6409
- description: "A scene's script — the ONE text its Shots' lines are ranges of — with every ranged Shot's [start, end) offsets and code. Read this before slates_edit_script or slates_make_shot_from_script: offsets are character positions into exactly this text. Text no Shot holds is unshot; a Shot listed by slates_list_shots but absent here has no words on the page yet. `rev` names this exact text and `revision` the whole script document: pass either to slates_edit_script so an edit measured on it is refused, not misplaced, if the words changed in between (1.6.0 desktops; older ones return neither).",
7317
+ description: "A scene's script, the one text its Shots' lines are ranges of, with every ranged Shot's [start, end) offsets and code. For the whole board's document (headings, formatting, every scene) use slates_get_script_document. Read this before slates_edit_script or slates_make_shot_from_script: offsets are character positions into exactly this text. Text no Shot holds is unshot; a Shot listed by slates_list_shots but absent here has no words on the page yet. `rev` names this exact text and `revision` the whole script document: pass either to slates_edit_script so an edit measured on it is refused, not misplaced, if the words changed in between.",
6410
7318
  input: z.object({
6411
7319
  sceneId: z.string().uuid().describe('The scene (slates_get_storyboard_with_frames lists them, each with its script).'),
6412
7320
  }),
@@ -6418,12 +7326,16 @@ export const getScript = {
6418
7326
  },
6419
7327
  };
6420
7328
  const variationSchema = z.object({
6421
- storyboardId: z.string().uuid(), expectedRevision: z.number().int().nonnegative(), name: z.string().min(1),
6422
- choices: z.array(z.object({ sectionId: z.string().uuid(), alternativeId: z.string().uuid() })),
7329
+ storyboardId: z.string().uuid(),
7330
+ expectedRevision: z.number().int().nonnegative().describe('The revision from slates_get_script_document; a stale one is refused.'),
7331
+ name: z.string().min(1),
7332
+ choices: z.array(z.object({ sectionId: z.string().uuid(), alternativeId: z.string().uuid() })).describe('One saved version per section, ids from slates_get_script_sections.'),
6423
7333
  arrangement: z.array(z.object({ sectionId: z.string().uuid(), alternativeId: z.string().uuid() })).optional(),
6424
- itemOverrides: z.array(z.object({ from: z.string().uuid(), to: z.string().uuid(), voice: z.enum(['keep', 'replace']) })).optional(),
6425
- assetOverrides: z.array(z.object({ from: z.string().min(1), to: z.string().min(1) })).optional(),
6426
- idempotencyKey: z.string().min(1).optional(),
7334
+ itemOverrides: z.array(z.object({ from: z.string().uuid(), to: z.string().uuid(), voice: z.enum(['keep', 'replace']) })).optional()
7335
+ .describe("Swap one Library item for another of the same kind and role, a person for a person, a location for a location (item ids). voice keep: the replaced item's voice stays on the Shots it speaks in; replace: it does not carry over."),
7336
+ assetOverrides: z.array(z.object({ from: z.string().min(1), to: z.string().min(1) })).optional()
7337
+ .describe('Swap one asset for another of the same type (ids or badge codes).'),
7338
+ idempotencyKey: z.string().min(1).optional().describe('Required to create: a retry with the same key and choices returns the same Board.'),
6427
7339
  });
6428
7340
  export const previewScriptVariation = {
6429
7341
  id: 'slates_preview_script_variation', description: 'Preview explicit version choices (one saved version per section) and independent ID-based reference replacements without writes or generation. An optional ordered arrangement supports repetition and omission. Returns composed requests, custom-prompt/reference warnings, a quote, and a plan marking each shot reuse (a finished take with matching inputs exists) or new. Inspect only the combinations you need.',
@@ -6434,7 +7346,7 @@ export const previewScriptVariation = {
6434
7346
  },
6435
7347
  };
6436
7348
  export const createScriptVariation = {
6437
- id: 'slates_create_script_variation', description: 'Materialize one reviewed variation as an independent Board with local shot IDs and lineage. Requires idempotencyKey; retry returns the same Board. Returns a quote through the normal request service. No media generation or implicit take reuse.',
7349
+ id: 'slates_create_script_variation', description: 'Materialize one reviewed variation as an independent Board with local shot IDs and lineage. Pass idempotencyKey: a retry with the same key returns the same Board. Returns a quote through the normal request service. No media generation or implicit take reuse.',
6438
7350
  input: variationSchema,
6439
7351
  async run(input, ctx) {
6440
7352
  await ctx.desktop().requireCapability('script-documents', 'script documents and variations');
@@ -6450,7 +7362,7 @@ async function resolveVariationRefs(input, ctx) {
6450
7362
  }
6451
7363
  export const getScriptUses = {
6452
7364
  id: 'slates_get_script_uses',
6453
- description: 'Review each reused passage before updating it: current and proposed words, destination revision, and local-edit conflicts. Pass only explicitly selected non-conflicting uses to slates_update_script_section.',
7365
+ description: 'Review each reused passage before updating it: current and proposed words, destination revision, and local-edit conflicts. Pass only explicitly selected non-conflicting uses to slates_update_script_section (updateUses). sectionId comes from slates_get_script_sections.',
6454
7366
  input: z.object({ sectionId: z.string().uuid() }),
6455
7367
  async run(input, ctx) {
6456
7368
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6459,7 +7371,7 @@ export const getScriptUses = {
6459
7371
  };
6460
7372
  export const getShotInputs = {
6461
7373
  id: 'slates_get_shot_inputs',
6462
- description: 'Read take input history and compatible reusable media. Earlier and unknown inputs remain playable; they are never treated as a fresh match. No generation.',
7374
+ description: 'Read this Shot\'s take input history and the finished takes elsewhere in the project made from its exact inputs; add one free with slates_reuse_shot_take. Earlier and unknown inputs remain playable but never count as a match. No generation.',
6463
7375
  input: z.object({ projectId: z.string().uuid(), shotId: z.string() }),
6464
7376
  async run(input, ctx) {
6465
7377
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6468,7 +7380,7 @@ export const getShotInputs = {
6468
7380
  };
6469
7381
  export const reuseShotTake = {
6470
7382
  id: 'slates_reuse_shot_take',
6471
- description: 'Explicitly link a take with matching saved request and recipe inputs to this shot. Keeps the original generation and independent shot recipe. Input changes are rechecked before reuse; costs no credits.',
7383
+ description: 'Explicitly link a take with matching saved request and recipe inputs to this shot. Keeps the original generation and independent shot recipe. Input changes are rechecked before reuse; costs no credits. Find candidates with slates_get_shot_inputs; slates_refile_take moves a take instead.',
6472
7384
  input: z.object({ projectId: z.string().uuid(), shotId: z.string(), assetId: z.string().describe('Asset UUID or badge code from compatibleTakes.') }),
6473
7385
  async run(input, ctx) {
6474
7386
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6486,15 +7398,23 @@ export const getScriptSections = {
6486
7398
  },
6487
7399
  };
6488
7400
  const sectionInput = z.object({
6489
- storyboardId: z.string().uuid(), expectedRevision: z.number().int().min(0), action: z.enum(['create', 'alternative', 'choose', 'save', 'reuse', 'updateUses', 'rename', 'archive', 'tags']),
6490
- sectionId: z.string().uuid().optional(), alternativeId: z.string().uuid().optional(), parentId: z.string().uuid().optional(), label: z.string().optional(),
7401
+ storyboardId: z.string().uuid(),
7402
+ expectedRevision: z.number().int().min(0).describe('The revision from slates_get_script_document; a stale one is refused.'),
7403
+ action: z.enum(['create', 'alternative', 'choose', 'save', 'reuse', 'updateUses', 'rename', 'archive', 'tags']),
7404
+ sectionId: z.string().uuid().optional().describe('Every action except create.'),
7405
+ alternativeId: z.string().uuid().optional(),
7406
+ parentId: z.string().uuid().optional().describe('create: a section that contains this passage.'),
7407
+ label: z.string().optional().describe('The name: required for create and alternative, and for rename.'),
6491
7408
  tags: z.array(z.string()).max(20).optional().describe('Free tags for action tags; replaces the list.'),
6492
- target: z.object({ sceneId: z.string().uuid(), at: z.number().int().min(0), expectedRevision: z.number().int().min(0) }).optional(),
6493
- uses: z.array(z.object({ sectionId: z.string().uuid(), expectedRevision: z.number().int().min(0) })).optional(),
6494
- fragments: z.array(z.object({ sceneId: z.string().uuid(), start: z.number().int().min(0), end: z.number().int().min(0) })).optional(),
7409
+ target: z.object({ sceneId: z.string().uuid(), at: z.number().int().min(0), expectedRevision: z.number().int().min(0) }).optional()
7410
+ .describe("reuse: the scene the copy goes into, the place in its text, and that board's document revision."),
7411
+ uses: z.array(z.object({ sectionId: z.string().uuid(), expectedRevision: z.number().int().min(0) })).optional()
7412
+ .describe('updateUses: the copies to update, with the revisions slates_get_script_uses returns.'),
7413
+ fragments: z.array(z.object({ sceneId: z.string().uuid(), start: z.number().int().min(0), end: z.number().int().min(0) })).optional()
7414
+ .describe('create: the passage, as ranges of scene text.'),
6495
7415
  });
6496
7416
  export const changeScriptSection = {
6497
- id: 'slates_update_script_section', description: 'Create a free-named section from a selected passage, save the words now on the page as a new version (action alternative), save changes to the shown version (save) or choose another (choose), insert an editable copy (reuse), update unedited copies (updateUses), rename or archive a section or one version (alternativeId), or set its free tags. Choosing, archiving a section, reuse and updateUses first save the page\'s words and shot bindings into the version that was showing (the page is never unsaved; save remains for an explicit save), and only alternative starts a new version; archiving a section keeps its words, shots and media on the page. Uses the current document revision and never generates media. Partial crossing sections are refused.',
7417
+ id: 'slates_update_script_section', description: 'Create a free-named section from a selected passage, save the words now on the page as a new version (action alternative), save changes to the shown version (save) or choose another (choose), insert an editable copy (reuse), update unedited copies (updateUses), rename or archive a section or one version (alternativeId), or set its free tags (action tags). Choosing, archiving a section, reuse and updateUses first save the page\'s words and shot bindings into the version that was showing (the page is never unsaved; save remains for an explicit save), and only alternative starts a new version; archiving a section keeps its words, shots and media on the page. Uses the current document revision and never generates media. Partial crossing sections are refused.',
6498
7418
  input: sectionInput,
6499
7419
  async run(input, ctx) {
6500
7420
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6531,7 +7451,7 @@ const documentBlocks = z.array(z.object({
6531
7451
  }));
6532
7452
  export const getScriptDocument = {
6533
7453
  id: 'slates_get_script_document',
6534
- description: 'Read the whole script document: scene strings, UTF-16 block/shot anchors, non-spoken headings/directions and a revision for safe writes. Formatting metadata contains no second copy of paragraph text.',
7454
+ description: 'Read the whole script document: scene strings, UTF-16 block/shot anchors, non-spoken headings/directions and a revision for safe writes. Formatting metadata contains no second copy of paragraph text. slates_get_script reads one scene\'s text with its Shot offsets.',
6535
7455
  input: z.object({ storyboardId: z.string().uuid() }),
6536
7456
  async run(input, ctx) {
6537
7457
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6550,7 +7470,7 @@ const writeScriptDocumentInput = z.object({
6550
7470
  });
6551
7471
  export const writeScriptDocument = {
6552
7472
  id: 'slates_update_script_document',
6553
- description: 'Apply ordered script edits and optional formatting in one revision-checked transaction. Read the document first. Stale writes are refused without replacing either author’s work. A move carries contained shot anchors; restoreRevision restores an existing text/structure revision. No generation side effect. ensureScene creates an empty scene only if needed.',
7473
+ description: 'Several script changes in one revision-checked write: ordered text edits across scenes, formatting, moving a block, making Shots from ranges (makeShots), splitting or merging scenes (sceneAction). For one text replacement in one scene use slates_edit_script. Read the document first. Stale writes are refused without replacing either author’s work. A move carries contained shot anchors; restoreRevision restores an existing text/structure revision. No generation side effect. ensureScene creates an empty scene only if needed.',
6554
7474
  input: writeScriptDocumentInput,
6555
7475
  async run(input, ctx) {
6556
7476
  await ctx.desktop().requireCapability('script-documents', 'script documents');
@@ -6560,7 +7480,7 @@ export const writeScriptDocument = {
6560
7480
  };
6561
7481
  export const editScript = {
6562
7482
  id: 'slates_edit_script',
6563
- description: "Edit a scene's script: ONE contiguous replacement — `removed` characters at `at` become `text` (insert: removed 0; delete: text ''). Every Shot's range follows the way comment anchors follow a document: text before a Shot moves it, text after leaves it, an edit inside grows or shrinks it, typing at its end extends it unless the text starts a new line, and deleting all of a Shot's words leaves it with no words and no place on the page. Every affected Shot's `line` changes at once — this IS editing the Shots. Read slates_get_script first; offsets are into that text. Pass its `rev` (or the document `revision` as `expectedRevision`): when the Script page or anything else changed the words since, the edit is refused ('the script changed since you read it', or SCRIPT_CONFLICT for a stale revision), and you re-read and measure again. The result carries the new `rev` and `revision` for a following edit.",
7483
+ description: "One text replacement in one scene (for several edits, formatting or scene changes in one write, use slates_update_script_document): one contiguous replacement — `removed` characters at `at` become `text` (insert: removed 0; delete: text ''). Every Shot's range follows the way comment anchors follow a document: text before a Shot moves it, text after leaves it, an edit inside grows or shrinks it, typing at its end extends it unless the text starts a new line, and deleting all of a Shot's words leaves it with no words and no place on the page. Every affected Shot's `line` changes at once: this is editing the Shots. Read slates_get_script first; offsets are into that text. Pass its `rev` (or the document `revision` as `expectedRevision`): when the Script page or anything else changed the words since, the edit is refused ('the script changed since you read it', or SCRIPT_CONFLICT for a stale revision), and you re-read and measure again. The result carries the new `rev` and `revision` for a following edit.",
6564
7484
  input: z.object({
6565
7485
  sceneId: z.string().uuid(),
6566
7486
  expectedRevision: z.number().int().nonnegative().optional().describe('The document `revision` slates_get_script or slates_get_script_document returned. The edit is refused if the document changed since.'),
@@ -6578,7 +7498,7 @@ export const editScript = {
6578
7498
  };
6579
7499
  export const makeShotFromScript = {
6580
7500
  id: 'slates_make_shot_from_script',
6581
- description: "Do the ONE thing a selection of the script can mean, exactly as the Script page's popover does: Make shot when the selection touches no Shot; Split when it lies inside one Shot (the Shot keeps its first piece and its takes, every other piece becomes a new Shot after it); Extend when it crosses one Shot's edge; Merge when it spans several (the first takes the span — unshot text between them included, nothing deleted — the others give up their words: one holding a take (finished or generating), a prompt, a reference or a picture stays and waits for text; only a completely blank one is removed). Pass `waitingShotId` to give a Shot that has no words yet (made on the Board, split off a take) the selected text instead. `perParagraph: true` over several unshot paragraphs makes one Shot per paragraph. A new Shot is filed after every ranged Shot whose words start before it.",
7501
+ description: "Turn a selected passage of a scene's script into Shots, as the Script page's popover does; start and end are offsets into slates_get_script's text. The action follows what the selection touches: Make shot when the selection touches no Shot; Split when it lies inside one Shot (the Shot keeps its first piece and its takes, every other piece becomes a new Shot after it); Extend when it crosses one Shot's edge; Merge when it spans several (the first takes the span — unshot text between them included, nothing deleted — the others give up their words: one holding a take (finished or generating), a prompt, a reference or a picture stays and waits for text; only a completely blank one is removed). Pass `waitingShotId` to give a Shot that has no words yet (made on the Board, split off a take) the selected text instead. `perParagraph: true` over several unshot paragraphs makes one Shot per paragraph. A new Shot is filed after every ranged Shot whose words start before it.",
6582
7502
  input: z.object({
6583
7503
  sceneId: z.string().uuid(),
6584
7504
  start: z.number().int().min(0),
@@ -6612,7 +7532,7 @@ export const breakScriptIntoShots = {
6612
7532
  };
6613
7533
  export const splitScene = {
6614
7534
  id: 'slates_split_scene',
6615
- description: "Open a scene at a heading line, the Notion way: the text from `lineEnd` on moves into a NEW scene directly after this one, with its Shots and their slots; the heading line [lineStart, lineEnd) itself is consumed and `name` becomes the new scene's name. Use slates_paste_script to do this for every SCENE / INT. / EXT. / # line of a pasted script at once.",
7535
+ description: "Open a scene at a heading line: the text from `lineEnd` on moves into a NEW scene directly after this one, with its Shots and their slots; the heading line [lineStart, lineEnd) itself is consumed and `name` becomes the new scene's name. Use slates_paste_script to do this for every SCENE / INT. / EXT. / # line of a pasted script at once.",
6616
7536
  input: z.object({
6617
7537
  sceneId: z.string().uuid(),
6618
7538
  lineStart: z.number().int().min(0).describe('Offset where the heading line starts.'),
@@ -6660,10 +7580,10 @@ const DRAFT_INPUT = z
6660
7580
  export const generateFromShots = {
6661
7581
  id: 'slates_generate_from_shots',
6662
7582
  billable: true,
6663
- description: 'Preview the itemized prices the Generate panel shows for saved Shots. After explicit approval, pass confirm and the returned fingerprint. Changed recipes require a fresh price. Runs sequentially; after a timeout inspect generations instead of re-firing. Pass draft to generate previews instead: one picture for each Shot that has none, never saved to the Shot.',
7583
+ description: 'Generate results for saved Shots, spending credits. Call without confirm for the itemized prices the Generate panel shows and a fingerprint; show the user the total and wait for their OK, then pass confirm with that fingerprint. Changed recipes require a fresh price. Runs sequentially; after a timeout inspect generations (slates_list_generations, status processing) instead of re-firing. Pass draft to generate previews instead: one picture for each Shot that has none, kept as a take of that Shot; the Shot\'s recipe does not change.',
6664
7584
  input: z.object({
6665
7585
  shotIds: z.array(z.string()).min(1).max(20),
6666
- confirm: z.boolean().optional(),
7586
+ confirm: z.boolean().optional().describe(CONFIRM_PARAM + " Pass it with the quote's fingerprint."),
6667
7587
  fingerprint: z.string().optional(),
6668
7588
  draft: DRAFT_INPUT.describe('Generate previews: pass {} to price ONE picture for each Shot in scope that has no picture, instead of each Shot recipe, at the chosen image model’s default settings. Works on a Shot with no model. No Shot row changes; the picture becomes a take of that Shot. Pass the same value when confirming.'),
6669
7589
  }),
@@ -6677,6 +7597,8 @@ export const generateFromShots = {
6677
7597
  const quote = await desktop.get('/agent/shots/quote', {
6678
7598
  input: JSON.stringify({ projectId: details[0].shot.projectId, shotIds: details.map((d) => d.shot.id), draft: input.draft }),
6679
7599
  });
7600
+ for (const model of new Set(quote.items.map((i) => i.model)))
7601
+ requireGuideRead(ctx, model);
6680
7602
  const total = quote.items.reduce((n, i) => n + (i.credits ?? 0), 0);
6681
7603
  const largest = Math.max(0, ...quote.items.map((i) => i.credits ?? 0));
6682
7604
  // ONE approval for the set, on the STATED total; a stale fingerprint is a
@@ -6725,7 +7647,7 @@ export const getBoardProgress = {
6725
7647
  };
6726
7648
  export const editCut = {
6727
7649
  id: 'slates_edit_cut',
6728
- description: 'Read pending preferred-take changes, explicitly replace one clip, sync a board’s preferred clips, or build a cut in board order. Read changes first for the count. Swaps keep timeline starts and source timing when possible; shorter takes are visibly marked. Never changes a shot recipe or poster. Undo swaps with restore and the returned before snapshots; undo a build with undo-build and its clipIds/markerIds.',
7650
+ description: 'Build the timeline from the board\'s chosen clips (a marker per scene), or keep it in step with the board\'s favourite takes: read pending preferred-take changes, explicitly replace one clip, sync a board’s preferred clips, or build a cut in board order. Read changes first for the count. Swaps keep timeline starts and source timing when possible; shorter takes are visibly marked. Never changes a shot recipe or poster. Undo swaps with restore and the returned before snapshots; undo a build with undo-build and its clipIds/markerIds.',
6729
7651
  input: z.object({
6730
7652
  projectId: z.string().uuid(), timelineId: z.string().uuid().optional(),
6731
7653
  action: z.enum(['changes', 'replace', 'sync', 'build', 'restore', 'undo-build']),
@@ -6782,6 +7704,16 @@ export function resolveGuideTopic(topic) {
6782
7704
  t === 'blender') {
6783
7705
  return 'slates-previs-blocking';
6784
7706
  }
7707
+ // Timeline craft: placing transitions, and the cutting pass (trim, roll, slip, J- and L-cuts).
7708
+ if (t === 'transition' || t === 'transitions' || t === 'dissolve' || t === 'crossfade' || t === 'wipe')
7709
+ return 'slates-transitions';
7710
+ if (t === 'cut' || t === 'cuts' || t === 'cutting' || t === 'editing' || t === 'pacing' || t === 'trim' || t === 'j-cut' || t === 'l-cut' || t === 'split-edit' || t === 'split edit')
7711
+ return 'slates-cuts';
7712
+ if (['captions', 'caption', 'subtitles', 'subtitle', 'transcribe', 'transcript', 'transcription'].includes(t))
7713
+ return 'slates-captions';
7714
+ // `motion-graphics` is HyperFrames' own guide, matched by name before these aliases.
7715
+ if (['motion', 'motion-layers', 'motion layers', 'layers', 'html-clip', 'html clip', 'lower-third', 'lower third', 'end-card', 'end card'].includes(t))
7716
+ return 'slates-motion';
6785
7717
  if (t === 'camera' || t === 'camera-moves' || t === 'camera moves' || t === 'shot-list' || t === 'shot list') {
6786
7718
  return 'slates-camera-language';
6787
7719
  }
@@ -6829,15 +7761,17 @@ export function resolveGuideTopic(topic) {
6829
7761
  return 'slates-model-selection';
6830
7762
  }
6831
7763
  if (t.startsWith('nano-banana'))
6832
- return 'slates-prompting-nano-banana-2';
7764
+ return 'slates-prompting-nano-banana-2-1';
6833
7765
  if (t === 'sunburst' || t === 'flare' || t.startsWith('gpt-image') || t.startsWith('gpt image'))
6834
7766
  return 'slates-prompting-gpt-image-2-5';
6835
7767
  if (t.startsWith('flux'))
6836
- return 'slates-prompting-flux-2-max';
7768
+ return 'slates-prompting-flux-3';
6837
7769
  if (t.startsWith('seedream'))
6838
7770
  return 'slates-prompting-seedream-5-lite';
6839
7771
  if (t.startsWith('omni-flash') || t.startsWith('gemini-omni') || t === 'omni flash')
6840
7772
  return 'slates-prompting-omni-flash';
7773
+ if (t.startsWith('wan') || t === 'alibaba-wan-3.0')
7774
+ return 'slates-prompting-wan-3';
6841
7775
  // MiniMax H3 — both seats share one skill. Placed BEFORE the seed/seedance
6842
7776
  // block for the same reason seed-audio is: no prefix collision exists today,
6843
7777
  // but a `minimax-*` id must never fall through to a Seedance guide.
@@ -6857,7 +7791,9 @@ export function resolveGuideTopic(topic) {
6857
7791
  return 'slates-prompting-motion-transfer';
6858
7792
  if (t === 'edit-video' || t === 'video-edit' || t === 'edit video' || t === 'video edit')
6859
7793
  return resolveGuideTopic(defaultModelFor('video', 'edit'));
6860
- if (t.startsWith('kling-v3'))
7794
+ // Kling 4.0 shares the Kling guide, which carries its own short 4.0 section:
7795
+ // no Kling 4.0 prompting guide has been published (checked 2026-10-23).
7796
+ if (t.startsWith('kling-v3') || t.startsWith('kling-v4'))
6861
7797
  return 'slates-prompting-kling-v3';
6862
7798
  // Audio — the TTS seat FIRST, then seed-audio, then eleven-sfx.
6863
7799
  //
@@ -6903,7 +7839,7 @@ export function resolveGuideTopic(topic) {
6903
7839
  if (t.startsWith('avatar-') || t.includes('lip-sync'))
6904
7840
  return 'slates-prompting-lip-sync';
6905
7841
  // Style names → the per-style prompting guide (photoreal/anime/painterly/
6906
- // 3d-render across Seedance/Kling/NB2). Matches the style-library ids plus
7842
+ // 3d-render across Seedance/Kling/Nano Banana). Matches the style-library ids plus
6907
7843
  // the obvious spellings users type.
6908
7844
  if (t === 'style' ||
6909
7845
  t === 'styles' ||
@@ -6957,26 +7893,45 @@ async function fetchMemberGuideCatalog(ctx) {
6957
7893
  return { entries: [], access: error instanceof SlatesCloudHttpError && error.status === 401 ? 'reconnect Slates to access member guides; bundled guides available' : 'member access check failed; retry for private guides; bundled guides available' };
6958
7894
  }
6959
7895
  }
7896
+ /** The guide topic that serves the full MCP working method (agent-doctrine.ts, buildMcpInstructions). */
7897
+ export const WORKING_METHOD_TOPIC = 'working-method';
6960
7898
  export const getPromptingGuide = {
6961
7899
  id: 'slates_get_prompting_guide',
6962
- description: 'Find production craft from the user vision: pass query alone with the brief (for example "two friends talking in a rainy diner") for keyword-ranked guides with matching sections, followed by every other guide\'s description so you choose by judgment. Omit topic and query, or use topic "catalog", for the whole catalog. Then request a guide name, model id or style name with card/index/section/full depth. Cards are short; query with a topic selects one section or cinematic technique; full returns worked examples, failure modes and sources. Reuse current guidance already in context. Entitled member playbooks are fetched privately through the connected Slates account. For exact buttons and UI paths use topic "app-manual" with relevant question keywords; no query returns its surface map. Users supply the vision; you find the guides.',
7900
+ description: 'Find production craft from the user vision: pass query alone with the brief (for example "two friends talking in a rainy diner") for keyword-ranked guides with matching sections, followed by every other guide\'s description so you choose by judgment. Omit topic and query, or use topic "catalog", for the whole catalog. Then request a guide name, model id or style name with card/index/section/full depth. Cards are short; query with a topic selects one section or cinematic technique; full returns worked examples, failure modes and sources. Reuse current guidance already in context. Entitled member playbooks are fetched privately through the connected Slates account. The motion engine\'s own skills (motion-*) are in the catalog too, for HTML motion layers and editing craft; a topic can name one of their files by path. For exact buttons and UI paths use topic "app-manual" with relevant question keywords; no query returns its surface map. Users supply the vision; you find the guides.',
6963
7901
  input: z.object({
6964
7902
  query: z.string().min(1).max(1000).optional().describe('Without topic: creative brief or craft need to discover guides. With topic: section keywords, heading or technique ID.'),
6965
- topic: z.string().min(1).optional().describe('Optional guide name, model id, style name, catalog, or app-manual. Omit to search by intent or browse.'),
7903
+ topic: z.string().min(1).optional().describe(`Optional guide name, model id, style name, catalog, app-manual, or ${WORKING_METHOD_TOPIC} (the full working method and hard rules for an MCP client; the app's Slates Director has its own). Omit to search by intent or browse.`),
6966
7904
  depth: z.enum(['card', 'index', 'section', 'full']).optional().describe('Default card is a short overview; index lists sections; query selects a section; full returns the complete guide.'),
6967
- limit: z.number().int().min(1).max(20).optional().describe('Page size: a search returns 8 ranked matches by default, browsing the whole catalog. Does not change guide bodies.'),
7905
+ limit: z.number().int().min(1).max(20).optional().describe('Page size for a search (default 8) or a catalog listing (default: the whole catalog); continue with offset from nextOffset. Does not change guide bodies.'),
6968
7906
  offset: z.number().int().min(0).optional().describe('Catalog/search offset from nextOffset in the preceding result.'),
6969
7907
  }),
6970
7908
  async run(input, ctx) {
6971
7909
  const topic = input.topic?.trim().toLowerCase();
7910
+ if (topic === WORKING_METHOD_TOPIC) {
7911
+ // Imported here: agent-doctrine imports this module at load.
7912
+ const { buildAgentDoctrine } = await import('../prompts/agent-doctrine.js');
7913
+ const content = buildAgentDoctrine({ surface: 'mcp' });
7914
+ return { text: content, data: { topic: WORKING_METHOD_TOPIC, bytes: Buffer.byteLength(content, 'utf8'), guide: content } };
7915
+ }
6972
7916
  if (topic === 'app-manual') {
6973
7917
  const content = input.query || input.depth === 'full' ? appManualSections(input.query) : appManualIndex();
6974
7918
  return { text: content, data: { topic: 'app-manual', bytes: Buffer.byteLength(content, 'utf8'), guide: content } };
6975
7919
  }
7920
+ const hyperframes = await loadHyperframes();
7921
+ // A motion skill or file by its exact name wins over an alias (`motion-audio` is not `audio`).
7922
+ const hf = topic && !Object.hasOwn(SKILLS, topic) ? findHyperframesGuide(hyperframes, topic) : null;
7923
+ if (hf) {
7924
+ const depth = input.depth ?? 'card';
7925
+ const body = depth === 'card' && !input.query?.trim() ? hyperframesCard(hf.content) : retrieveGuide(hf.key, hf.content, depth, input.query);
7926
+ const others = (depth === 'card' || depth === 'index') && !input.query ? hyperframesFilesOf(hyperframes, hf.key) : [];
7927
+ const guide = `${hyperframesGuideHeader(hf.key)}${body}${others.length ? `\n\nIts other files (request each as a topic): ${others.join(', ')}` : ''}`;
7928
+ return { text: guide, data: { topic: hf.key, tier: 'free', source: 'motion', depth, bytes: Buffer.byteLength(guide, 'utf8'), guide } };
7929
+ }
6976
7930
  const resolved = topic ? resolveGuideTopic(topic) : null;
6977
7931
  if (resolved) {
6978
7932
  const depth = input.depth ?? 'card';
6979
7933
  const guide = retrieveGuide(resolved, SKILLS[resolved], depth, input.query);
7934
+ ctx?.guidesRead?.add(resolved);
6980
7935
  return { text: guide, data: { topic: resolved, tier: 'free', depth, bytes: Buffer.byteLength(guide, 'utf8'), guide } };
6981
7936
  }
6982
7937
  const member = await memberGuideCatalog(ctx);
@@ -6994,13 +7949,16 @@ export const getPromptingGuide = {
6994
7949
  throw new Error('Invalid member guide body');
6995
7950
  const depth = input.depth ?? 'card';
6996
7951
  const guide = retrieveGuide(privateEntry.name, result.markdown, depth, input.query);
7952
+ ctx?.guidesRead?.add(privateEntry.name);
6997
7953
  return { text: guide, data: { topic: privateEntry.name, tier: 'paid', depth, bytes: Buffer.byteLength(guide, 'utf8'), guide } };
6998
7954
  }
6999
- const catalog = [...guideCatalog(SKILLS), ...member.entries].sort((a, b) => a.name.localeCompare(b.name));
7000
- const result = discoverGuides(catalog, SKILLS, input.query ?? (topic && topic !== 'catalog' && topic !== 'index' ? input.topic : undefined), input.limit, input.offset);
7001
- const guide = result.guides.map(entry => `${entry.name} (${entry.tier}): ${entry.description}${entry.sections.length ? `\n Matching sections: ${entry.sections.join('; ')}` : ''}`).join('\n\n');
7002
- const rest = result.rest.length ? `\n\nEvery other guide (keyword hints above only see shared words; choose by the brief):\n${result.rest.map(entry => `- ${entry.name} (${entry.tier}): ${entry.description}`).join('\n')}` : '';
7003
- const text = `${result.fallback ? 'No keyword match; choose relevant craft from the catalog.\n\n' : ''}${guide}${rest}\n\n${result.total} ${result.query && !result.fallback ? 'keyword matches' : 'guides'}; nextOffset: ${result.nextOffset ?? 'none'}. Member guides: ${member.access}. Retrieve a name with depth card/index or query for a section. The user does not need to choose guides.`;
7955
+ // Slates' guides first, then HyperFrames' (they carry the craft for HTML layers and editing).
7956
+ const catalog = [...[...guideCatalog(SKILLS), ...member.entries].sort((a, b) => a.name.localeCompare(b.name)), ...hyperframesCatalog(hyperframes)];
7957
+ const result = discoverGuides(catalog, { ...SKILLS, ...hyperframesSkillBodies(hyperframes) }, input.query ?? (topic && topic !== 'catalog' && topic !== 'index' ? input.topic : undefined), input.limit, input.offset);
7958
+ const label = (entry) => (entry.source === 'motion' ? 'motion' : entry.tier);
7959
+ const guide = result.guides.map(entry => `${entry.name} (${label(entry)}): ${entry.description}${entry.sections.length ? `\n Matching sections: ${entry.sections.join('; ')}` : ''}`).join('\n\n');
7960
+ const rest = result.rest.length ? `\n\nEvery other guide (keyword hints above only see shared words; choose by the brief):\n${result.rest.map(entry => `- ${entry.name} (${label(entry)}): ${entry.description}`).join('\n')}` : '';
7961
+ const text = `${result.fallback ? 'No keyword match; choose relevant craft from the catalog.\n\n' : ''}${guide}${rest}\n\n${result.total} ${result.query && !result.fallback ? 'keyword matches' : 'guides'}; nextOffset: ${result.nextOffset ?? 'none'}. Member guides: ${member.access}. Retrieve a name with depth card/index or query for a section. Motion guides are the motion engine's own; topic motion/${HYPERFRAMES_MAPPING} maps their CLI and Studio onto Slates. The user does not need to choose guides.`;
7004
7962
  return { text, data: { ...result, memberAccess: member.access, bytes: Buffer.byteLength(text, 'utf8') } };
7005
7963
  },
7006
7964
  };
@@ -7067,7 +8025,7 @@ export const blenderStatus = {
7067
8025
  };
7068
8026
  export const blenderExecute = {
7069
8027
  id: 'slates_blender_execute',
7070
- description: 'Run Python (`bpy`) inside the connected Blender and return whatever the code assigns to a dict named `result`. This is how blocking gets built: primitives, empties, constraints, camera rigs, keyframes, markers. Anything Blender can do, this can do. Assign a dict to `result` to get data back (e.g. `result = {"camera": cam.name}`); print() output comes back separately as stdout. On an exception you get the full traceback — read it, fix the code, retry. Before writing an unfamiliar call, look up its real signature with slates_blender_docs rather than guessing: the add-on ships the Blender 5.1 API reference precisely so you do not have to recall it.',
8028
+ description: 'Run Python (`bpy`) inside the connected Blender and return whatever the code assigns to a dict named `result`. This is how blocking gets built: primitives, empties, constraints, camera rigs, keyframes, markers. Anything Blender can do, this can do. Assign a dict to `result` to get data back (e.g. `result = {"camera": cam.name}`); print() output comes back separately as stdout. On an exception you get the full traceback — read it, fix the code, retry. Before writing an unfamiliar call, look up its real signature with slates_blender_docs rather than guessing: the add-on ships the Blender API reference precisely so you do not have to recall it.',
7071
8029
  input: z.object({
7072
8030
  code: z
7073
8031
  .string()
@@ -7091,7 +8049,7 @@ export const blenderExecute = {
7091
8049
  };
7092
8050
  export const blenderScene = {
7093
8051
  id: 'slates_blender_scene',
7094
- description: 'Scene summary from the connected Blender: frame range, fps, duration, render resolution, the active camera with its keyframe times in both frames and seconds, and the full collection/object tree with transforms and constraints. Cheap — call it freely between edits. The camera keyframe times ARE the cut structure, so read them before writing any shot-by-shot prompt.',
8052
+ description: 'Scene summary from the connected Blender: frame range, fps, duration, render resolution, the active camera with its keyframe times in both frames and seconds, and the full collection/object tree with transforms and constraints. Cheap — call it freely between edits. It errors when the bridge is down; slates_blender_status checks without failing. The camera keyframe times ARE the cut structure, so read them before writing any shot-by-shot prompt.',
7095
8053
  input: z.object({}),
7096
8054
  async run() {
7097
8055
  return ok(await new BlenderBridgeClient().call('result = _mod("scene").summary()'));
@@ -7099,7 +8057,7 @@ export const blenderScene = {
7099
8057
  };
7100
8058
  export const blenderDocs = {
7101
8059
  id: 'slates_blender_docs',
7102
- description: 'Look up a dotted Blender Python API identifier in the bundled 5.1 reference — e.g. "bpy.ops.object", "bpy.types.Camera", "bpy.types.FollowPathConstraint". Pass "*" for top-level modules or "bpy.ops.*" to list a namespace. Use this instead of recalling a signature from memory: invented operator names and wrong enum values are the most common way previs code fails, and they fail silently often enough to be worth the lookup.',
8060
+ description: 'Look up a dotted Blender Python API identifier in the bundled Blender API reference — e.g. "bpy.ops.object", "bpy.types.Camera", "bpy.types.FollowPathConstraint". Pass "*" for top-level modules or "bpy.ops.*" to list a namespace. Use this instead of recalling a signature from memory: invented operator names and wrong enum values are the most common way previs code fails, and they fail silently often enough to be worth the lookup.',
7103
8061
  input: z.object({
7104
8062
  identifier: z.string().min(1).describe('Dotted identifier, or a namespace wildcard like "bpy.ops.*".'),
7105
8063
  }),
@@ -7127,7 +8085,7 @@ export const blenderSearchDocs = {
7127
8085
  };
7128
8086
  export const blenderRenderBlocking = {
7129
8087
  id: 'slates_blender_render_blocking',
7130
- description: "Render the connected Blender scene camera to a grey-box mp4 — the blocking clip that locks camera motion for generation — and, when projectId is given, import it into that Slates project as a video asset in the same call. The returned asset id goes into slates_generate_video's videoReferenceAssetIds and the returned durationSeconds into videoReferenceSecondsEach. Renders through the SCENE camera using scene render settings, never the user's viewport, so output does not depend on where they left their mouse. Untextured is correct: the clip supplies camera path and timing, the references supply the look. Colour in the blocking is NOTATION, not look — a distinct viewport colour per character is what binds a proxy to its reference image across cuts, and a marked face encodes which way a featureless proxy is facing. State every such mapping in the generation prompt AND state that the colours themselves are not inherited, or the model renders a literally red person. See the slates-previs-blocking and slates-blocking-to-prompt skills. Keep it at or under 30s — seedance-2.5 accepts reference videos up to 30s, the other reference-video models up to 15s.",
8088
+ description: "Render the connected Blender scene camera to a grey-box mp4 — the blocking clip that locks camera motion for generation — and, when projectId is given, import it into that Slates project as a video asset in the same call. The returned asset id goes into slates_generate_video's videoReferenceAssetIds and the returned durationSeconds into videoReferenceSecondsEach. Renders through the SCENE camera using scene render settings, never the user's viewport, so output does not depend on where they left their mouse. Untextured is correct: the clip supplies camera path and timing, the references supply the look. Any colour or marking in the blocking is notation; slates-blocking-to-prompt says how to state it in the generation prompt, and slates-previs-blocking how to build the blocking. Keep the clip within the reference-video length the chosen video model accepts (slates_generate_video's reference params and the estimate state it).",
7131
8089
  input: z.object({
7132
8090
  projectId: z
7133
8091
  .string()
@@ -7209,6 +8167,9 @@ export const ALL_OPERATIONS = [
7209
8167
  setAppSettings,
7210
8168
  getAsset,
7211
8169
  linkAssetSource,
8170
+ transcribeAsset,
8171
+ getAssetTranscript,
8172
+ editAssetTranscript,
7212
8173
  extractVideoFrame,
7213
8174
  getMe,
7214
8175
  getCreditBalance,
@@ -7265,12 +8226,31 @@ export const ALL_OPERATIONS = [
7265
8226
  listTimelines,
7266
8227
  saveTimeline,
7267
8228
  exportCuts,
8229
+ getExportBatch,
8230
+ cancelExportBatch,
8231
+ getVariantGrid,
8232
+ reframeClip,
8233
+ getReframeReport,
7268
8234
  getTimeline,
7269
8235
  addClipToTimeline,
7270
8236
  reorderClips,
7271
8237
  removeClip,
8238
+ editTimelineClips,
8239
+ updateClip,
8240
+ addTransition,
8241
+ updateTransition,
8242
+ removeTransition,
7272
8243
  manageTimelineMarker,
7273
8244
  addTimelineTrack,
8245
+ addTextClip,
8246
+ addImageOverlay,
8247
+ updateOverlayClip,
8248
+ setClipKeyframes,
8249
+ addCaptions,
8250
+ addHtmlClip,
8251
+ updateHtmlClip,
8252
+ checkComposition,
8253
+ listMotionBlocks,
7274
8254
  updateTimelineTrack,
7275
8255
  removeTimelineTrack,
7276
8256
  updateTimelineSettings,