@amg555/frameforge-mcp 2.7.6 → 2.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 (1129) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +8 -0
  3. package/package.json +1 -1
  4. package/plugins/video-pipeline/.claude-plugin/plugin.json +1 -1
  5. package/plugins/video-pipeline/skills/.upstream-skills.json +1 -1
  6. package/plugins/video-pipeline/skills/video-pipeline/references/mcp-tools.md +1 -1
  7. package/scripts/deep-validate.js +2 -2
  8. package/src/mcp-server/server.js +5 -5
  9. package/src/skills/sync-upstream.js +3 -3
  10. package/.agent/skills/ai-video-editor/README.md +0 -32
  11. package/.agent/skills/ai-video-editor/SKILL.md +0 -152
  12. package/.agent/skills/ai-video-editor/assets/fonts/fonts.css +0 -2409
  13. package/.agent/skills/ai-video-editor/assets/fonts/ttf/anton-400.ttf +0 -0
  14. package/.agent/skills/ai-video-editor/assets/fonts/ttf/archivo-800.ttf +0 -0
  15. package/.agent/skills/ai-video-editor/assets/fonts/ttf/cabin-sketch-700.ttf +0 -0
  16. package/.agent/skills/ai-video-editor/assets/fonts/ttf/dm-sans-700.ttf +0 -0
  17. package/.agent/skills/ai-video-editor/assets/fonts/ttf/fraunces-600.ttf +0 -0
  18. package/.agent/skills/ai-video-editor/assets/fonts/ttf/fraunces-700.ttf +0 -0
  19. package/.agent/skills/ai-video-editor/assets/fonts/ttf/fredoka-700.ttf +0 -0
  20. package/.agent/skills/ai-video-editor/assets/fonts/ttf/inter-700.ttf +0 -0
  21. package/.agent/skills/ai-video-editor/assets/fonts/ttf/inter-800.ttf +0 -0
  22. package/.agent/skills/ai-video-editor/assets/fonts/ttf/inter-tight-800.ttf +0 -0
  23. package/.agent/skills/ai-video-editor/assets/fonts/ttf/kalam-700.ttf +0 -0
  24. package/.agent/skills/ai-video-editor/assets/fonts/ttf/noto-sans-devanagari-700.ttf +0 -0
  25. package/.agent/skills/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-400-normal.woff2 +0 -0
  26. package/.agent/skills/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-500-normal.woff2 +0 -0
  27. package/.agent/skills/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-600-normal.woff2 +0 -0
  28. package/.agent/skills/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-700-normal.woff2 +0 -0
  29. package/.agent/skills/ai-video-editor/assets/fonts/web/noto-sans-devanagari-devanagari-800-normal.woff2 +0 -0
  30. package/.agent/skills/ai-video-editor/engine/hidpi.js +0 -117
  31. package/.agent/skills/ai-video-editor/engine/page.html +0 -43
  32. package/.agent/skills/ai-video-editor/engine/player.js +0 -145
  33. package/.agent/skills/ai-video-editor/references/example-story-warm-canvas.js +0 -95
  34. package/.agent/skills/ai-video-editor/references/story-guide.md +0 -112
  35. package/.agent/skills/ai-video-editor/requirements.txt +0 -4
  36. package/.agent/skills/ai-video-editor/styles/chalk-talk/base.js +0 -490
  37. package/.agent/skills/ai-video-editor/styles/chalk-talk/style.json +0 -14
  38. package/.agent/skills/ai-video-editor/styles/chalk-talk/style.md +0 -41
  39. package/.agent/skills/ai-video-editor/styles/clean-tech/base.js +0 -447
  40. package/.agent/skills/ai-video-editor/styles/clean-tech/style.json +0 -15
  41. package/.agent/skills/ai-video-editor/styles/clean-tech/style.md +0 -38
  42. package/.agent/skills/ai-video-editor/styles/creator-motion-graphics/base.js +0 -698
  43. package/.agent/skills/ai-video-editor/styles/creator-motion-graphics/style.json +0 -16
  44. package/.agent/skills/ai-video-editor/styles/creator-motion-graphics/style.md +0 -39
  45. package/.agent/skills/ai-video-editor/styles/data-story/base.js +0 -432
  46. package/.agent/skills/ai-video-editor/styles/data-story/style.json +0 -14
  47. package/.agent/skills/ai-video-editor/styles/data-story/style.md +0 -38
  48. package/.agent/skills/ai-video-editor/styles/index.json +0 -103
  49. package/.agent/skills/ai-video-editor/styles/pop-info/base.js +0 -570
  50. package/.agent/skills/ai-video-editor/styles/pop-info/style.json +0 -13
  51. package/.agent/skills/ai-video-editor/styles/pop-info/style.md +0 -37
  52. package/.agent/skills/ai-video-editor/styles/software-walkthrough/base.js +0 -544
  53. package/.agent/skills/ai-video-editor/styles/software-walkthrough/style.json +0 -15
  54. package/.agent/skills/ai-video-editor/styles/software-walkthrough/style.md +0 -38
  55. package/.agent/skills/ai-video-editor/styles/warm-canvas/base.js +0 -610
  56. package/.agent/skills/ai-video-editor/styles/warm-canvas/style.json +0 -14
  57. package/.agent/skills/ai-video-editor/styles/warm-canvas/style.md +0 -37
  58. package/.agent/skills/faceless-shorts/README.md +0 -34
  59. package/.agent/skills/faceless-shorts/SKILL.md +0 -124
  60. package/.agent/skills/faceless-shorts/styles/deep-dive/STYLE.md +0 -58
  61. package/.agent/skills/faceless-shorts/styles/deep-dive/example/data/cues.json +0 -140
  62. package/.agent/skills/faceless-shorts/styles/deep-dive/example/data/lines.json +0 -67
  63. package/.agent/skills/faceless-shorts/styles/deep-dive/example/data/words.json +0 -614
  64. package/.agent/skills/faceless-shorts/styles/deep-dive/example/data/words.txt +0 -102
  65. package/.agent/skills/faceless-shorts/styles/deep-dive/example/fonts/Inter-Black.otf +0 -0
  66. package/.agent/skills/faceless-shorts/styles/deep-dive/example/fonts/Inter-ExtraBold.otf +0 -0
  67. package/.agent/skills/faceless-shorts/styles/deep-dive/example/index.html +0 -16
  68. package/.agent/skills/faceless-shorts/styles/deep-dive/example/script.json +0 -27
  69. package/.agent/skills/faceless-shorts/styles/deep-dive/example/sheet.html +0 -10
  70. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/board.js +0 -62
  71. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/captions.js +0 -68
  72. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/engine.js +0 -65
  73. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/human.js +0 -128
  74. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/lib.js +0 -44
  75. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/look2d.js +0 -33
  76. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/sdf.js +0 -79
  77. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/sets.js +0 -107
  78. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/core/timing.js +0 -23
  79. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/main.js +0 -56
  80. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/sheet.js +0 -79
  81. package/.agent/skills/faceless-shorts/styles/deep-dive/example/src/shots.js +0 -136
  82. package/.agent/skills/faceless-shorts/styles/deep-dive/example/tools/capture.mjs +0 -122
  83. package/.agent/skills/faceless-shorts/styles/deep-dive/example/tools/mix.py +0 -172
  84. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/LICENSE-three.txt +0 -21
  85. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/environments/RoomEnvironment.js +0 -144
  86. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/BokehPass.js +0 -141
  87. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/EffectComposer.js +0 -231
  88. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/MaskPass.js +0 -104
  89. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/OutputPass.js +0 -97
  90. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/Pass.js +0 -95
  91. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/RenderPass.js +0 -99
  92. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/ShaderPass.js +0 -77
  93. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/postprocessing/UnrealBloomPass.js +0 -415
  94. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/BokehShader.js +0 -145
  95. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/CopyShader.js +0 -45
  96. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/LuminosityHighPassShader.js +0 -64
  97. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/addons/shaders/OutputShader.js +0 -85
  98. package/.agent/skills/faceless-shorts/styles/deep-dive/example/vendor/three.module.js +0 -6
  99. package/.agent/skills/faceless-shorts/styles/deep-dive/style-sheet.png +0 -0
  100. package/.agent/skills/faceless-shorts/styles/inside-out/STYLE.md +0 -97
  101. package/.agent/skills/faceless-shorts/styles/inside-out/example/data/cues.json +0 -178
  102. package/.agent/skills/faceless-shorts/styles/inside-out/example/data/lines.json +0 -73
  103. package/.agent/skills/faceless-shorts/styles/inside-out/example/data/words.json +0 -662
  104. package/.agent/skills/faceless-shorts/styles/inside-out/example/fonts/Inter-Black.otf +0 -0
  105. package/.agent/skills/faceless-shorts/styles/inside-out/example/index.html +0 -16
  106. package/.agent/skills/faceless-shorts/styles/inside-out/example/script.json +0 -26
  107. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/core/captions.js +0 -68
  108. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/core/kit.js +0 -345
  109. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/core/lib.js +0 -44
  110. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/core/timing.js +0 -23
  111. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/main.js +0 -62
  112. package/.agent/skills/faceless-shorts/styles/inside-out/example/src/shots.js +0 -195
  113. package/.agent/skills/faceless-shorts/styles/inside-out/example/tools/capture.mjs +0 -122
  114. package/.agent/skills/faceless-shorts/styles/inside-out/example/tools/mix.py +0 -172
  115. package/.agent/skills/faceless-shorts/styles/inside-out/style-sheet.png +0 -0
  116. package/.agent/skills/faceless-shorts/styles/night-file/STYLE.md +0 -36
  117. package/.agent/skills/faceless-shorts/styles/night-file/example/data/cues.json +0 -146
  118. package/.agent/skills/faceless-shorts/styles/night-file/example/data/lines.json +0 -73
  119. package/.agent/skills/faceless-shorts/styles/night-file/example/data/words.json +0 -572
  120. package/.agent/skills/faceless-shorts/styles/night-file/example/data/words.txt +0 -95
  121. package/.agent/skills/faceless-shorts/styles/night-file/example/fonts/FreeMonoBold.ttf +0 -0
  122. package/.agent/skills/faceless-shorts/styles/night-file/example/fonts/Inter-Black.otf +0 -0
  123. package/.agent/skills/faceless-shorts/styles/night-file/example/index.html +0 -16
  124. package/.agent/skills/faceless-shorts/styles/night-file/example/script.json +0 -26
  125. package/.agent/skills/faceless-shorts/styles/night-file/example/sheet.html +0 -11
  126. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/board.js +0 -62
  127. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/captions.js +0 -49
  128. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/engine.js +0 -65
  129. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/human.js +0 -128
  130. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/kit.js +0 -151
  131. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/lib.js +0 -44
  132. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/sdf.js +0 -79
  133. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/sets3d.js +0 -106
  134. package/.agent/skills/faceless-shorts/styles/night-file/example/src/core/timing.js +0 -23
  135. package/.agent/skills/faceless-shorts/styles/night-file/example/src/main.js +0 -56
  136. package/.agent/skills/faceless-shorts/styles/night-file/example/src/sheet.js +0 -86
  137. package/.agent/skills/faceless-shorts/styles/night-file/example/src/shots.js +0 -130
  138. package/.agent/skills/faceless-shorts/styles/night-file/example/tools/capture.mjs +0 -122
  139. package/.agent/skills/faceless-shorts/styles/night-file/example/tools/mix.py +0 -172
  140. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/LICENSE-three.txt +0 -21
  141. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/environments/RoomEnvironment.js +0 -144
  142. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/BokehPass.js +0 -141
  143. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/EffectComposer.js +0 -231
  144. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/MaskPass.js +0 -104
  145. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/OutputPass.js +0 -97
  146. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/Pass.js +0 -95
  147. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/RenderPass.js +0 -99
  148. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/ShaderPass.js +0 -77
  149. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/postprocessing/UnrealBloomPass.js +0 -415
  150. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/shaders/BokehShader.js +0 -145
  151. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/shaders/CopyShader.js +0 -45
  152. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/shaders/LuminosityHighPassShader.js +0 -64
  153. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/addons/shaders/OutputShader.js +0 -85
  154. package/.agent/skills/faceless-shorts/styles/night-file/example/vendor/three.module.js +0 -6
  155. package/.agent/skills/faceless-shorts/styles/night-file/style-sheet.png +0 -0
  156. package/.agent/skills/faceless-shorts/styles/paper-atlas/STYLE.md +0 -30
  157. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/data/cues.json +0 -167
  158. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/data/lines.json +0 -67
  159. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/data/words.json +0 -614
  160. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/data/words.txt +0 -102
  161. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/fonts/Caladea-Bold.ttf +0 -0
  162. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/fonts/Inter-Black.otf +0 -0
  163. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/index.html +0 -13
  164. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/script.json +0 -26
  165. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/sheet.html +0 -10
  166. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/core/board.js +0 -62
  167. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/core/captions.js +0 -47
  168. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/core/kit.js +0 -152
  169. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/core/lib.js +0 -44
  170. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/core/timing.js +0 -23
  171. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/main.js +0 -62
  172. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/sheet.js +0 -61
  173. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/src/shots.js +0 -139
  174. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/tools/capture.mjs +0 -122
  175. package/.agent/skills/faceless-shorts/styles/paper-atlas/example/tools/mix.py +0 -172
  176. package/.agent/skills/faceless-shorts/styles/paper-atlas/style-sheet.png +0 -0
  177. package/.agent/skills/faceless-shorts/styles/stick-story/STYLE.md +0 -32
  178. package/.agent/skills/faceless-shorts/styles/stick-story/example/data/cues.json +0 -182
  179. package/.agent/skills/faceless-shorts/styles/stick-story/example/data/lines.json +0 -79
  180. package/.agent/skills/faceless-shorts/styles/stick-story/example/data/words.json +0 -662
  181. package/.agent/skills/faceless-shorts/styles/stick-story/example/data/words.txt +0 -110
  182. package/.agent/skills/faceless-shorts/styles/stick-story/example/fonts/Inter-Black.otf +0 -0
  183. package/.agent/skills/faceless-shorts/styles/stick-story/example/fonts/Inter-ExtraBold.otf +0 -0
  184. package/.agent/skills/faceless-shorts/styles/stick-story/example/index.html +0 -12
  185. package/.agent/skills/faceless-shorts/styles/stick-story/example/script.json +0 -27
  186. package/.agent/skills/faceless-shorts/styles/stick-story/example/sheet.html +0 -9
  187. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/core/board.js +0 -62
  188. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/core/captions.js +0 -47
  189. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/core/kit.js +0 -166
  190. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/core/lib.js +0 -44
  191. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/core/timing.js +0 -23
  192. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/main.js +0 -62
  193. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/sheet.js +0 -64
  194. package/.agent/skills/faceless-shorts/styles/stick-story/example/src/shots.js +0 -148
  195. package/.agent/skills/faceless-shorts/styles/stick-story/example/tools/capture.mjs +0 -122
  196. package/.agent/skills/faceless-shorts/styles/stick-story/example/tools/mix.py +0 -172
  197. package/.agent/skills/faceless-shorts/styles/stick-story/style-sheet.png +0 -0
  198. package/.agent/skills/faceless-shorts/styles/tall-tale/STYLE.md +0 -51
  199. package/.agent/skills/faceless-shorts/styles/tall-tale/example/data/cues.json +0 -271
  200. package/.agent/skills/faceless-shorts/styles/tall-tale/example/data/lines.json +0 -127
  201. package/.agent/skills/faceless-shorts/styles/tall-tale/example/data/words.json +0 -908
  202. package/.agent/skills/faceless-shorts/styles/tall-tale/example/data/words.txt +0 -151
  203. package/.agent/skills/faceless-shorts/styles/tall-tale/example/fonts/Caladea-Bold.ttf +0 -0
  204. package/.agent/skills/faceless-shorts/styles/tall-tale/example/fonts/Inter-Black.otf +0 -0
  205. package/.agent/skills/faceless-shorts/styles/tall-tale/example/fonts/Inter-ExtraBold.otf +0 -0
  206. package/.agent/skills/faceless-shorts/styles/tall-tale/example/index.html +0 -17
  207. package/.agent/skills/faceless-shorts/styles/tall-tale/example/script.json +0 -37
  208. package/.agent/skills/faceless-shorts/styles/tall-tale/example/sheet.html +0 -11
  209. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/board.js +0 -62
  210. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/captions.js +0 -56
  211. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/engine.js +0 -65
  212. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/lib.js +0 -44
  213. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/props.js +0 -166
  214. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/timing.js +0 -23
  215. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/toon.js +0 -352
  216. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/core/world.js +0 -340
  217. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/main.js +0 -56
  218. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/sheet.js +0 -99
  219. package/.agent/skills/faceless-shorts/styles/tall-tale/example/src/shots.js +0 -377
  220. package/.agent/skills/faceless-shorts/styles/tall-tale/example/tools/capture.mjs +0 -122
  221. package/.agent/skills/faceless-shorts/styles/tall-tale/example/tools/mix.py +0 -204
  222. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/LICENSE-three.txt +0 -21
  223. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/environments/RoomEnvironment.js +0 -144
  224. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/BokehPass.js +0 -141
  225. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/EffectComposer.js +0 -231
  226. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/MaskPass.js +0 -104
  227. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/OutputPass.js +0 -97
  228. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/Pass.js +0 -95
  229. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/RenderPass.js +0 -99
  230. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/ShaderPass.js +0 -77
  231. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/postprocessing/UnrealBloomPass.js +0 -415
  232. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/BokehShader.js +0 -145
  233. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/CopyShader.js +0 -45
  234. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/LuminosityHighPassShader.js +0 -64
  235. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/addons/shaders/OutputShader.js +0 -85
  236. package/.agent/skills/faceless-shorts/styles/tall-tale/example/vendor/three.module.js +0 -6
  237. package/.agent/skills/faceless-shorts/styles/tall-tale/style-sheet.png +0 -0
  238. package/.agent/skills/gstack-autoplan/SKILL.md +0 -972
  239. package/.agent/skills/gstack-autoplan/SKILL.md.tmpl +0 -468
  240. package/.agent/skills/gstack-autoplan/bin/guard-journal.ts +0 -115
  241. package/.agent/skills/gstack-autoplan/bin/guard-log.ts +0 -40
  242. package/.agent/skills/gstack-autoplan/bin/guard-reasons.ts +0 -92
  243. package/.agent/skills/gstack-autoplan/bin/owned-read.ts +0 -72
  244. package/.agent/skills/gstack-autoplan/bin/phase-publication-hook +0 -15
  245. package/.agent/skills/gstack-autoplan/bin/phase-publication-hook.ts +0 -769
  246. package/.agent/skills/gstack-autoplan/sections/ceo-phase.md +0 -195
  247. package/.agent/skills/gstack-autoplan/sections/ceo-phase.md.tmpl +0 -147
  248. package/.agent/skills/gstack-autoplan/sections/design-phase.md +0 -128
  249. package/.agent/skills/gstack-autoplan/sections/design-phase.md.tmpl +0 -82
  250. package/.agent/skills/gstack-autoplan/sections/dx-phase.md +0 -155
  251. package/.agent/skills/gstack-autoplan/sections/dx-phase.md.tmpl +0 -109
  252. package/.agent/skills/gstack-autoplan/sections/eng-phase.md +0 -164
  253. package/.agent/skills/gstack-autoplan/sections/eng-phase.md.tmpl +0 -116
  254. package/.agent/skills/gstack-autoplan/sections/manifest.json +0 -50
  255. package/.agent/skills/gstack-autoplan/sections/phase-close.md +0 -70
  256. package/.agent/skills/gstack-autoplan/sections/phase-close.md.tmpl +0 -68
  257. package/.agent/skills/gstack-autoplan/sections/tasks-aggregator.md +0 -71
  258. package/.agent/skills/gstack-autoplan/sections/tasks-aggregator.md.tmpl +0 -1
  259. package/.agent/skills/gstack-autoplan/sections/unattended.md +0 -11
  260. package/.agent/skills/gstack-autoplan/sections/unattended.md.tmpl +0 -9
  261. package/.agent/skills/gstack-benchmark/SKILL.md +0 -456
  262. package/.agent/skills/gstack-benchmark/SKILL.md.tmpl +0 -249
  263. package/.agent/skills/gstack-benchmark-models/SKILL.md +0 -285
  264. package/.agent/skills/gstack-benchmark-models/SKILL.md.tmpl +0 -155
  265. package/.agent/skills/gstack-browse/PLAN-snapshot-dropdown-interactive.md +0 -102
  266. package/.agent/skills/gstack-browse/SKILL.md +0 -470
  267. package/.agent/skills/gstack-browse/SKILL.md.tmpl +0 -129
  268. package/.agent/skills/gstack-browse/bin/find-browse +0 -21
  269. package/.agent/skills/gstack-browse/bin/remote-slug +0 -18
  270. package/.agent/skills/gstack-browse/sections/command-list.md +0 -176
  271. package/.agent/skills/gstack-browse/sections/command-list.md.tmpl +0 -7
  272. package/.agent/skills/gstack-browse/sections/manifest.json +0 -14
  273. package/.agent/skills/gstack-browse/src/activity.ts +0 -209
  274. package/.agent/skills/gstack-browse/src/audit.ts +0 -69
  275. package/.agent/skills/gstack-browse/src/browse-client.ts +0 -264
  276. package/.agent/skills/gstack-browse/src/browser-manager.ts +0 -2334
  277. package/.agent/skills/gstack-browse/src/browser-skill-commands.ts +0 -466
  278. package/.agent/skills/gstack-browse/src/browser-skill-write.ts +0 -216
  279. package/.agent/skills/gstack-browse/src/browser-skills.ts +0 -420
  280. package/.agent/skills/gstack-browse/src/buffers.ts +0 -137
  281. package/.agent/skills/gstack-browse/src/bun-child-config.ts +0 -35
  282. package/.agent/skills/gstack-browse/src/bun-polyfill.cjs +0 -276
  283. package/.agent/skills/gstack-browse/src/cdp-allowlist.ts +0 -235
  284. package/.agent/skills/gstack-browse/src/cdp-bridge.ts +0 -180
  285. package/.agent/skills/gstack-browse/src/cdp-commands.ts +0 -64
  286. package/.agent/skills/gstack-browse/src/cdp-inspector.ts +0 -824
  287. package/.agent/skills/gstack-browse/src/chromium-profiles.ts +0 -212
  288. package/.agent/skills/gstack-browse/src/claude-bin.ts +0 -2
  289. package/.agent/skills/gstack-browse/src/cli.ts +0 -2254
  290. package/.agent/skills/gstack-browse/src/commands.ts +0 -296
  291. package/.agent/skills/gstack-browse/src/config.ts +0 -307
  292. package/.agent/skills/gstack-browse/src/content-security.ts +0 -373
  293. package/.agent/skills/gstack-browse/src/cookie-auth-verification.ts +0 -225
  294. package/.agent/skills/gstack-browse/src/cookie-database.ts +0 -73
  295. package/.agent/skills/gstack-browse/src/cookie-import-browser.ts +0 -929
  296. package/.agent/skills/gstack-browse/src/cookie-import-native-integrity.ts +0 -95
  297. package/.agent/skills/gstack-browse/src/cookie-import-native-job.ts +0 -161
  298. package/.agent/skills/gstack-browse/src/cookie-import-native-qualification.json +0 -1
  299. package/.agent/skills/gstack-browse/src/cookie-import-native-worker.ts +0 -268
  300. package/.agent/skills/gstack-browse/src/cookie-import-native.ts +0 -166
  301. package/.agent/skills/gstack-browse/src/cookie-import-operation.ts +0 -232
  302. package/.agent/skills/gstack-browse/src/cookie-picker-routes.ts +0 -343
  303. package/.agent/skills/gstack-browse/src/cookie-picker-ui.ts +0 -717
  304. package/.agent/skills/gstack-browse/src/domain-skill-commands.ts +0 -301
  305. package/.agent/skills/gstack-browse/src/domain-skills.ts +0 -438
  306. package/.agent/skills/gstack-browse/src/error-handling.ts +0 -2
  307. package/.agent/skills/gstack-browse/src/extension-id.ts +0 -25
  308. package/.agent/skills/gstack-browse/src/file-permissions.ts +0 -370
  309. package/.agent/skills/gstack-browse/src/find-browse.ts +0 -118
  310. package/.agent/skills/gstack-browse/src/find-security-sidecar.ts +0 -78
  311. package/.agent/skills/gstack-browse/src/media-extract.ts +0 -177
  312. package/.agent/skills/gstack-browse/src/memory-command.ts +0 -115
  313. package/.agent/skills/gstack-browse/src/memory-snapshot.ts +0 -73
  314. package/.agent/skills/gstack-browse/src/meta-commands.ts +0 -1150
  315. package/.agent/skills/gstack-browse/src/network-capture.ts +0 -179
  316. package/.agent/skills/gstack-browse/src/path-security.ts +0 -132
  317. package/.agent/skills/gstack-browse/src/platform.ts +0 -38
  318. package/.agent/skills/gstack-browse/src/port-allocator.ts +0 -140
  319. package/.agent/skills/gstack-browse/src/project-slug.ts +0 -36
  320. package/.agent/skills/gstack-browse/src/proxy-config.ts +0 -283
  321. package/.agent/skills/gstack-browse/src/proxy-redact.ts +0 -46
  322. package/.agent/skills/gstack-browse/src/pty-session-cookie.ts +0 -64
  323. package/.agent/skills/gstack-browse/src/pty-session-lease.ts +0 -137
  324. package/.agent/skills/gstack-browse/src/read-commands.ts +0 -756
  325. package/.agent/skills/gstack-browse/src/routes/activity.ts +0 -63
  326. package/.agent/skills/gstack-browse/src/routes/commands.ts +0 -154
  327. package/.agent/skills/gstack-browse/src/routes/core.ts +0 -123
  328. package/.agent/skills/gstack-browse/src/routes/files.ts +0 -47
  329. package/.agent/skills/gstack-browse/src/routes/index.ts +0 -27
  330. package/.agent/skills/gstack-browse/src/routes/inspector.ts +0 -132
  331. package/.agent/skills/gstack-browse/src/routes/pairing.ts +0 -158
  332. package/.agent/skills/gstack-browse/src/routes/pty.ts +0 -254
  333. package/.agent/skills/gstack-browse/src/routes/table.ts +0 -182
  334. package/.agent/skills/gstack-browse/src/routes/tokens.ts +0 -86
  335. package/.agent/skills/gstack-browse/src/routes/tunnel.ts +0 -62
  336. package/.agent/skills/gstack-browse/src/sanitize.ts +0 -49
  337. package/.agent/skills/gstack-browse/src/screenshot-size-guard.ts +0 -106
  338. package/.agent/skills/gstack-browse/src/security-classifier.ts +0 -258
  339. package/.agent/skills/gstack-browse/src/security-sidecar-client.ts +0 -234
  340. package/.agent/skills/gstack-browse/src/security-sidecar-entry.ts +0 -120
  341. package/.agent/skills/gstack-browse/src/security.ts +0 -328
  342. package/.agent/skills/gstack-browse/src/server.ts +0 -2220
  343. package/.agent/skills/gstack-browse/src/session-cookie-store.ts +0 -124
  344. package/.agent/skills/gstack-browse/src/session-persist.ts +0 -178
  345. package/.agent/skills/gstack-browse/src/skill-token.ts +0 -91
  346. package/.agent/skills/gstack-browse/src/snapshot-flags.ts +0 -30
  347. package/.agent/skills/gstack-browse/src/snapshot.ts +0 -656
  348. package/.agent/skills/gstack-browse/src/socks-bridge.ts +0 -314
  349. package/.agent/skills/gstack-browse/src/sse-helpers.ts +0 -147
  350. package/.agent/skills/gstack-browse/src/sse-session-cookie.ts +0 -65
  351. package/.agent/skills/gstack-browse/src/stealth.ts +0 -574
  352. package/.agent/skills/gstack-browse/src/tab-session.ts +0 -210
  353. package/.agent/skills/gstack-browse/src/telemetry.ts +0 -115
  354. package/.agent/skills/gstack-browse/src/terminal-agent-control.ts +0 -379
  355. package/.agent/skills/gstack-browse/src/terminal-agent.ts +0 -1124
  356. package/.agent/skills/gstack-browse/src/terminal-pty-lifecycle.ts +0 -144
  357. package/.agent/skills/gstack-browse/src/token-registry.ts +0 -721
  358. package/.agent/skills/gstack-browse/src/tunnel-denial-log.ts +0 -97
  359. package/.agent/skills/gstack-browse/src/url-validation.ts +0 -299
  360. package/.agent/skills/gstack-browse/src/welcome.html +0 -237
  361. package/.agent/skills/gstack-browse/src/write-commands.ts +0 -1438
  362. package/.agent/skills/gstack-browse/src/xprotect-heal.ts +0 -439
  363. package/.agent/skills/gstack-browse/src/xvfb.ts +0 -313
  364. package/.agent/skills/gstack-browse/test/activity.test.ts +0 -120
  365. package/.agent/skills/gstack-browse/test/adversarial-security.test.ts +0 -32
  366. package/.agent/skills/gstack-browse/test/batch.test.ts +0 -267
  367. package/.agent/skills/gstack-browse/test/bridge-chromium-e2e.test.ts +0 -205
  368. package/.agent/skills/gstack-browse/test/browse-client.test.ts +0 -300
  369. package/.agent/skills/gstack-browse/test/browse-eval-wrapping.test.ts +0 -86
  370. package/.agent/skills/gstack-browse/test/browser-manager-custom-chromium.test.ts +0 -67
  371. package/.agent/skills/gstack-browse/test/browser-manager-unit.test.ts +0 -335
  372. package/.agent/skills/gstack-browse/test/browser-skill-commands.test.ts +0 -433
  373. package/.agent/skills/gstack-browse/test/browser-skill-write.test.ts +0 -350
  374. package/.agent/skills/gstack-browse/test/browser-skills-e2e.test.ts +0 -101
  375. package/.agent/skills/gstack-browse/test/browser-skills-storage.test.ts +0 -283
  376. package/.agent/skills/gstack-browse/test/build-command-response.test.ts +0 -68
  377. package/.agent/skills/gstack-browse/test/build.test.ts +0 -52
  378. package/.agent/skills/gstack-browse/test/bun-child-config.test.ts +0 -83
  379. package/.agent/skills/gstack-browse/test/bun-polyfill.test.ts +0 -402
  380. package/.agent/skills/gstack-browse/test/busy-daemon-iron-rule.test.ts +0 -270
  381. package/.agent/skills/gstack-browse/test/busy-daemon-recovery.test.ts +0 -134
  382. package/.agent/skills/gstack-browse/test/cdp-allowlist.test.ts +0 -109
  383. package/.agent/skills/gstack-browse/test/cdp-e2e.test.ts +0 -117
  384. package/.agent/skills/gstack-browse/test/cdp-inspector-history-cap.test.ts +0 -95
  385. package/.agent/skills/gstack-browse/test/cdp-mutex.test.ts +0 -113
  386. package/.agent/skills/gstack-browse/test/cdp-session-cleanup.test.ts +0 -171
  387. package/.agent/skills/gstack-browse/test/chromium-profile-isolation.test.ts +0 -418
  388. package/.agent/skills/gstack-browse/test/claude-bin.test.ts +0 -95
  389. package/.agent/skills/gstack-browse/test/cli-chain-stdin.test.ts +0 -122
  390. package/.agent/skills/gstack-browse/test/cli-config-mismatch-message.test.ts +0 -72
  391. package/.agent/skills/gstack-browse/test/cli-lock.test.ts +0 -120
  392. package/.agent/skills/gstack-browse/test/cli-loopback-no-proxy.test.ts +0 -77
  393. package/.agent/skills/gstack-browse/test/cli-setsid-daemonize.test.ts +0 -75
  394. package/.agent/skills/gstack-browse/test/cli-start-final-healthcheck.test.ts +0 -77
  395. package/.agent/skills/gstack-browse/test/cli-supervisor.test.ts +0 -194
  396. package/.agent/skills/gstack-browse/test/commands.test.ts +0 -2779
  397. package/.agent/skills/gstack-browse/test/compare-board.test.ts +0 -382
  398. package/.agent/skills/gstack-browse/test/config.test.ts +0 -519
  399. package/.agent/skills/gstack-browse/test/content-security.test.ts +0 -681
  400. package/.agent/skills/gstack-browse/test/cookie-auth-verification.test.ts +0 -760
  401. package/.agent/skills/gstack-browse/test/cookie-credential-deadline.test.ts +0 -225
  402. package/.agent/skills/gstack-browse/test/cookie-database.test.ts +0 -277
  403. package/.agent/skills/gstack-browse/test/cookie-fixture-delete-lease.test.ts +0 -256
  404. package/.agent/skills/gstack-browse/test/cookie-import-browser.test.ts +0 -523
  405. package/.agent/skills/gstack-browse/test/cookie-import-native-job.test.ts +0 -1645
  406. package/.agent/skills/gstack-browse/test/cookie-import-native-qualification.ts +0 -128
  407. package/.agent/skills/gstack-browse/test/cookie-import-native.test.ts +0 -436
  408. package/.agent/skills/gstack-browse/test/cookie-import-node.test.ts +0 -166
  409. package/.agent/skills/gstack-browse/test/cookie-import-operation.test.ts +0 -452
  410. package/.agent/skills/gstack-browse/test/cookie-import-reliability.test.ts +0 -659
  411. package/.agent/skills/gstack-browse/test/cookie-import-transport.test.ts +0 -38
  412. package/.agent/skills/gstack-browse/test/cookie-picker-binding-browser.test.ts +0 -96
  413. package/.agent/skills/gstack-browse/test/cookie-picker-binding.test.ts +0 -155
  414. package/.agent/skills/gstack-browse/test/cookie-picker-csrf-browser.test.ts +0 -50
  415. package/.agent/skills/gstack-browse/test/cookie-picker-routes.test.ts +0 -460
  416. package/.agent/skills/gstack-browse/test/cookie-picker-ui.test.ts +0 -535
  417. package/.agent/skills/gstack-browse/test/daemon-log-hygiene.test.ts +0 -135
  418. package/.agent/skills/gstack-browse/test/daemon-mismatch-refuse.test.ts +0 -178
  419. package/.agent/skills/gstack-browse/test/data-platform.test.ts +0 -176
  420. package/.agent/skills/gstack-browse/test/dia-gui-readiness.test.ts +0 -174
  421. package/.agent/skills/gstack-browse/test/dia-launch-comparison.test.ts +0 -180
  422. package/.agent/skills/gstack-browse/test/dia-macos-qualification.test.ts +0 -1695
  423. package/.agent/skills/gstack-browse/test/domain-skills-e2e.test.ts +0 -142
  424. package/.agent/skills/gstack-browse/test/domain-skills-storage.test.ts +0 -263
  425. package/.agent/skills/gstack-browse/test/dotenv-isolation.test.ts +0 -121
  426. package/.agent/skills/gstack-browse/test/dual-listener.test.ts +0 -411
  427. package/.agent/skills/gstack-browse/test/dx-polish.test.ts +0 -101
  428. package/.agent/skills/gstack-browse/test/error-handling.test.ts +0 -47
  429. package/.agent/skills/gstack-browse/test/extension-sender-auth.test.ts +0 -285
  430. package/.agent/skills/gstack-browse/test/extension-token.test.ts +0 -232
  431. package/.agent/skills/gstack-browse/test/file-drop.test.ts +0 -271
  432. package/.agent/skills/gstack-browse/test/file-permissions.test.ts +0 -346
  433. package/.agent/skills/gstack-browse/test/fill-change-event.test.ts +0 -78
  434. package/.agent/skills/gstack-browse/test/find-browse.test.ts +0 -61
  435. package/.agent/skills/gstack-browse/test/findport.test.ts +0 -232
  436. package/.agent/skills/gstack-browse/test/fixtures/basic.html +0 -33
  437. package/.agent/skills/gstack-browse/test/fixtures/change-only-validator.html +0 -31
  438. package/.agent/skills/gstack-browse/test/fixtures/cursor-interactive.html +0 -22
  439. package/.agent/skills/gstack-browse/test/fixtures/dialog.html +0 -15
  440. package/.agent/skills/gstack-browse/test/fixtures/dropdown.html +0 -61
  441. package/.agent/skills/gstack-browse/test/fixtures/empty.html +0 -2
  442. package/.agent/skills/gstack-browse/test/fixtures/forms.html +0 -55
  443. package/.agent/skills/gstack-browse/test/fixtures/iframe.html +0 -30
  444. package/.agent/skills/gstack-browse/test/fixtures/injection-combined.html +0 -58
  445. package/.agent/skills/gstack-browse/test/fixtures/injection-hidden.html +0 -62
  446. package/.agent/skills/gstack-browse/test/fixtures/injection-social.html +0 -25
  447. package/.agent/skills/gstack-browse/test/fixtures/injection-visible.html +0 -26
  448. package/.agent/skills/gstack-browse/test/fixtures/media-page.html +0 -67
  449. package/.agent/skills/gstack-browse/test/fixtures/mock-claude/claude +0 -185
  450. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-delete-lease.ts +0 -125
  451. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-file-owners.ts +0 -132
  452. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-launch.cjs +0 -139
  453. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-process-observer.ts +0 -150
  454. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-process.cjs +0 -13
  455. package/.agent/skills/gstack-browse/test/fixtures/native-cookie-remove-fixture.cjs +0 -42
  456. package/.agent/skills/gstack-browse/test/fixtures/network-idle.html +0 -30
  457. package/.agent/skills/gstack-browse/test/fixtures/qa-eval-checkout.html +0 -108
  458. package/.agent/skills/gstack-browse/test/fixtures/qa-eval-spa.html +0 -98
  459. package/.agent/skills/gstack-browse/test/fixtures/qa-eval.html +0 -51
  460. package/.agent/skills/gstack-browse/test/fixtures/qa-only.html +0 -13
  461. package/.agent/skills/gstack-browse/test/fixtures/responsive.html +0 -49
  462. package/.agent/skills/gstack-browse/test/fixtures/route-dispatch-allowlist.json +0 -22
  463. package/.agent/skills/gstack-browse/test/fixtures/snapshot-ambiguous.html +0 -24
  464. package/.agent/skills/gstack-browse/test/fixtures/snapshot.html +0 -55
  465. package/.agent/skills/gstack-browse/test/fixtures/spa.html +0 -24
  466. package/.agent/skills/gstack-browse/test/fixtures/states.html +0 -17
  467. package/.agent/skills/gstack-browse/test/fixtures/upload-path-validation.ts +0 -91
  468. package/.agent/skills/gstack-browse/test/fixtures/upload.html +0 -25
  469. package/.agent/skills/gstack-browse/test/from-file-path-validation.test.ts +0 -68
  470. package/.agent/skills/gstack-browse/test/gstack-config.test.ts +0 -252
  471. package/.agent/skills/gstack-browse/test/gstack-update-check.test.ts +0 -614
  472. package/.agent/skills/gstack-browse/test/handoff.test.ts +0 -508
  473. package/.agent/skills/gstack-browse/test/headless-gpu-and-reap.test.ts +0 -286
  474. package/.agent/skills/gstack-browse/test/headless-launch-options.test.ts +0 -93
  475. package/.agent/skills/gstack-browse/test/launch-signal-flags.test.ts +0 -75
  476. package/.agent/skills/gstack-browse/test/learnings-injection.test.ts +0 -33
  477. package/.agent/skills/gstack-browse/test/media-extract-unit.test.ts +0 -294
  478. package/.agent/skills/gstack-browse/test/memory-command.test.ts +0 -219
  479. package/.agent/skills/gstack-browse/test/memory-leak-reproducer.test.ts +0 -133
  480. package/.agent/skills/gstack-browse/test/navigation-guard.test.ts +0 -106
  481. package/.agent/skills/gstack-browse/test/output-path-symlinks.test.ts +0 -76
  482. package/.agent/skills/gstack-browse/test/pair-agent-e2e.test.ts +0 -793
  483. package/.agent/skills/gstack-browse/test/pair-agent-optin-gate.test.ts +0 -171
  484. package/.agent/skills/gstack-browse/test/pair-agent-tunnel-eval.test.ts +0 -501
  485. package/.agent/skills/gstack-browse/test/path-security-realpath.test.ts +0 -89
  486. package/.agent/skills/gstack-browse/test/path-validation.test.ts +0 -268
  487. package/.agent/skills/gstack-browse/test/pdf-flags.test.ts +0 -86
  488. package/.agent/skills/gstack-browse/test/platform.test.ts +0 -37
  489. package/.agent/skills/gstack-browse/test/playwright-core-patch.test.ts +0 -62
  490. package/.agent/skills/gstack-browse/test/poisoned-bundle-probe.test.ts +0 -148
  491. package/.agent/skills/gstack-browse/test/process-liveness-windows.test.ts +0 -176
  492. package/.agent/skills/gstack-browse/test/proxy-config.test.ts +0 -189
  493. package/.agent/skills/gstack-browse/test/proxy-env-daemon.test.ts +0 -137
  494. package/.agent/skills/gstack-browse/test/proxy-env.test.ts +0 -189
  495. package/.agent/skills/gstack-browse/test/proxy-redact.test.ts +0 -64
  496. package/.agent/skills/gstack-browse/test/pty-inject-scan.test.ts +0 -153
  497. package/.agent/skills/gstack-browse/test/pty-session-lease.test.ts +0 -98
  498. package/.agent/skills/gstack-browse/test/rebrand-signed-bundle.test.ts +0 -53
  499. package/.agent/skills/gstack-browse/test/regression-pr1169-pdf-from-file-invalid-json.test.ts +0 -84
  500. package/.agent/skills/gstack-browse/test/restart-env.test.ts +0 -39
  501. package/.agent/skills/gstack-browse/test/route-test-harness.ts +0 -121
  502. package/.agent/skills/gstack-browse/test/runtime-root-server-bundle.test.ts +0 -100
  503. package/.agent/skills/gstack-browse/test/sanitize.test.ts +0 -112
  504. package/.agent/skills/gstack-browse/test/screenshot-size-guard.test.ts +0 -118
  505. package/.agent/skills/gstack-browse/test/security-adversarial-fixes.test.ts +0 -101
  506. package/.agent/skills/gstack-browse/test/security-adversarial.test.ts +0 -342
  507. package/.agent/skills/gstack-browse/test/security-audit-r2.test.ts +0 -432
  508. package/.agent/skills/gstack-browse/test/security-bench.test.ts +0 -159
  509. package/.agent/skills/gstack-browse/test/security-classifier-download-cleanup.test.ts +0 -138
  510. package/.agent/skills/gstack-browse/test/security-classifier.test.ts +0 -29
  511. package/.agent/skills/gstack-browse/test/security-integration.test.ts +0 -184
  512. package/.agent/skills/gstack-browse/test/security-live-playwright.test.ts +0 -195
  513. package/.agent/skills/gstack-browse/test/security-sidecar-client.test.ts +0 -66
  514. package/.agent/skills/gstack-browse/test/security.test.ts +0 -268
  515. package/.agent/skills/gstack-browse/test/server-auth.test.ts +0 -600
  516. package/.agent/skills/gstack-browse/test/server-embedder-terminal-port.test.ts +0 -301
  517. package/.agent/skills/gstack-browse/test/server-factory.test.ts +0 -640
  518. package/.agent/skills/gstack-browse/test/server-flush-trackers.test.ts +0 -73
  519. package/.agent/skills/gstack-browse/test/server-launch-resolution.test.ts +0 -49
  520. package/.agent/skills/gstack-browse/test/server-lock-errors.test.ts +0 -124
  521. package/.agent/skills/gstack-browse/test/server-no-import-side-effects.test.ts +0 -110
  522. package/.agent/skills/gstack-browse/test/server-proxy-fail-fast.test.ts +0 -98
  523. package/.agent/skills/gstack-browse/test/server-pty-lease-routes.test.ts +0 -156
  524. package/.agent/skills/gstack-browse/test/server-route-auth-blackbox.test.ts +0 -270
  525. package/.agent/skills/gstack-browse/test/server-route-dispatch-ratchet.test.ts +0 -129
  526. package/.agent/skills/gstack-browse/test/server-route-table.test.ts +0 -238
  527. package/.agent/skills/gstack-browse/test/server-sanitize-surrogates.test.ts +0 -182
  528. package/.agent/skills/gstack-browse/test/server-tmp-state-path.test.ts +0 -110
  529. package/.agent/skills/gstack-browse/test/session-cookie-store.test.ts +0 -159
  530. package/.agent/skills/gstack-browse/test/session-persist.test.ts +0 -287
  531. package/.agent/skills/gstack-browse/test/sidebar-tabs.test.ts +0 -268
  532. package/.agent/skills/gstack-browse/test/sidebar-ux.test.ts +0 -1006
  533. package/.agent/skills/gstack-browse/test/sidepanel-font-size.test.ts +0 -147
  534. package/.agent/skills/gstack-browse/test/sidepanel-patient-autoconnect.test.ts +0 -70
  535. package/.agent/skills/gstack-browse/test/sidepanel-reattach.test.ts +0 -93
  536. package/.agent/skills/gstack-browse/test/sidepanel-restart-dispose.test.ts +0 -106
  537. package/.agent/skills/gstack-browse/test/skill-token.test.ts +0 -167
  538. package/.agent/skills/gstack-browse/test/snapshot.test.ts +0 -593
  539. package/.agent/skills/gstack-browse/test/socks-bridge.test.ts +0 -461
  540. package/.agent/skills/gstack-browse/test/sse-helpers.test.ts +0 -194
  541. package/.agent/skills/gstack-browse/test/sse-session-cookie.test.ts +0 -155
  542. package/.agent/skills/gstack-browse/test/state-ttl.test.ts +0 -35
  543. package/.agent/skills/gstack-browse/test/stealth-extended.test.ts +0 -127
  544. package/.agent/skills/gstack-browse/test/stealth-layer-c.test.ts +0 -284
  545. package/.agent/skills/gstack-browse/test/stealth-webdriver.test.ts +0 -394
  546. package/.agent/skills/gstack-browse/test/stop-ack-before-shutdown.test.ts +0 -23
  547. package/.agent/skills/gstack-browse/test/stop-dead-daemon.test.ts +0 -153
  548. package/.agent/skills/gstack-browse/test/tab-each.test.ts +0 -196
  549. package/.agent/skills/gstack-browse/test/tab-guardrail.test.ts +0 -118
  550. package/.agent/skills/gstack-browse/test/tab-isolation.test.ts +0 -309
  551. package/.agent/skills/gstack-browse/test/tab-session-frame-detach.test.ts +0 -154
  552. package/.agent/skills/gstack-browse/test/telemetry-optout.test.ts +0 -171
  553. package/.agent/skills/gstack-browse/test/telemetry.test.ts +0 -77
  554. package/.agent/skills/gstack-browse/test/temp-dirs.test.ts +0 -129
  555. package/.agent/skills/gstack-browse/test/terminal-agent-detach-reattach.test.ts +0 -84
  556. package/.agent/skills/gstack-browse/test/terminal-agent-import.test.ts +0 -42
  557. package/.agent/skills/gstack-browse/test/terminal-agent-integration.test.ts +0 -565
  558. package/.agent/skills/gstack-browse/test/terminal-agent-keepalive.test.ts +0 -88
  559. package/.agent/skills/gstack-browse/test/terminal-agent-lifecycle.test.ts +0 -371
  560. package/.agent/skills/gstack-browse/test/terminal-agent-native-observation.test.ts +0 -66
  561. package/.agent/skills/gstack-browse/test/terminal-agent-owner-watchdog.test.ts +0 -81
  562. package/.agent/skills/gstack-browse/test/terminal-agent-pid-identity.test.ts +0 -161
  563. package/.agent/skills/gstack-browse/test/terminal-agent-port-range.test.ts +0 -80
  564. package/.agent/skills/gstack-browse/test/terminal-agent-publication-lock.test.ts +0 -289
  565. package/.agent/skills/gstack-browse/test/terminal-agent-ring-buffer-runtime.test.ts +0 -157
  566. package/.agent/skills/gstack-browse/test/terminal-agent-session-routing.test.ts +0 -96
  567. package/.agent/skills/gstack-browse/test/terminal-agent-watchdog.test.ts +0 -101
  568. package/.agent/skills/gstack-browse/test/terminal-agent.test.ts +0 -259
  569. package/.agent/skills/gstack-browse/test/terminal-pty-lifecycle.test.ts +0 -212
  570. package/.agent/skills/gstack-browse/test/test-server.ts +0 -57
  571. package/.agent/skills/gstack-browse/test/token-registry.test.ts +0 -615
  572. package/.agent/skills/gstack-browse/test/tunnel-gate-unit.test.ts +0 -129
  573. package/.agent/skills/gstack-browse/test/tunnel-revoke-cli.test.ts +0 -455
  574. package/.agent/skills/gstack-browse/test/url-validation.test.ts +0 -384
  575. package/.agent/skills/gstack-browse/test/watch.test.ts +0 -129
  576. package/.agent/skills/gstack-browse/test/watchdog.test.ts +0 -352
  577. package/.agent/skills/gstack-browse/test/welcome-page.test.ts +0 -143
  578. package/.agent/skills/gstack-browse/test/windows-spawn-hide.test.ts +0 -167
  579. package/.agent/skills/gstack-browse/test/xprotect-heal.test.ts +0 -457
  580. package/.agent/skills/gstack-browse/test/xvfb.test.ts +0 -603
  581. package/.agent/skills/gstack-canary/SKILL.md +0 -699
  582. package/.agent/skills/gstack-canary/SKILL.md.tmpl +0 -254
  583. package/.agent/skills/gstack-careful/SKILL.md +0 -96
  584. package/.agent/skills/gstack-careful/SKILL.md.tmpl +0 -107
  585. package/.agent/skills/gstack-careful/bin/check-careful.sh +0 -407
  586. package/.agent/skills/gstack-careful/bin/hook-extract.sh +0 -198
  587. package/.agent/skills/gstack-codex/SKILL.md +0 -889
  588. package/.agent/skills/gstack-codex/SKILL.md.tmpl +0 -358
  589. package/.agent/skills/gstack-codex/sections/challenge-mode.md +0 -150
  590. package/.agent/skills/gstack-codex/sections/challenge-mode.md.tmpl +0 -136
  591. package/.agent/skills/gstack-codex/sections/consult-mode.md +0 -221
  592. package/.agent/skills/gstack-codex/sections/consult-mode.md.tmpl +0 -207
  593. package/.agent/skills/gstack-codex/sections/manifest.json +0 -26
  594. package/.agent/skills/gstack-codex/sections/review-mode.md +0 -265
  595. package/.agent/skills/gstack-codex/sections/review-mode.md.tmpl +0 -246
  596. package/.agent/skills/gstack-context-restore/SKILL.md +0 -612
  597. package/.agent/skills/gstack-context-restore/SKILL.md.tmpl +0 -289
  598. package/.agent/skills/gstack-context-save/SKILL.md +0 -631
  599. package/.agent/skills/gstack-context-save/SKILL.md.tmpl +0 -307
  600. package/.agent/skills/gstack-cso/ACKNOWLEDGEMENTS.md +0 -17
  601. package/.agent/skills/gstack-cso/SKILL.md +0 -166
  602. package/.agent/skills/gstack-cso/SKILL.md.tmpl +0 -162
  603. package/.agent/skills/gstack-cso/sections/audit-phases.md +0 -116
  604. package/.agent/skills/gstack-cso/sections/audit-phases.md.tmpl +0 -114
  605. package/.agent/skills/gstack-cso/sections/manifest.json +0 -14
  606. package/.agent/skills/gstack-design-consultation/SKILL.md +0 -795
  607. package/.agent/skills/gstack-design-consultation/SKILL.md.tmpl +0 -234
  608. package/.agent/skills/gstack-design-consultation/sections/manifest.json +0 -14
  609. package/.agent/skills/gstack-design-consultation/sections/proposal-and-preview.md +0 -595
  610. package/.agent/skills/gstack-design-consultation/sections/proposal-and-preview.md.tmpl +0 -350
  611. package/.agent/skills/gstack-design-html/SKILL.md +0 -866
  612. package/.agent/skills/gstack-design-html/SKILL.md.tmpl +0 -476
  613. package/.agent/skills/gstack-design-html/sections/detector-install-offer.md +0 -40
  614. package/.agent/skills/gstack-design-html/sections/detector-install-offer.md.tmpl +0 -6
  615. package/.agent/skills/gstack-design-html/sections/doctrine.md +0 -86
  616. package/.agent/skills/gstack-design-html/sections/doctrine.md.tmpl +0 -1
  617. package/.agent/skills/gstack-design-html/sections/manifest.json +0 -26
  618. package/.agent/skills/gstack-design-html/sections/pretext-patterns.md +0 -145
  619. package/.agent/skills/gstack-design-html/sections/pretext-patterns.md.tmpl +0 -143
  620. package/.agent/skills/gstack-design-html/vendor/pretext.js +0 -5
  621. package/.agent/skills/gstack-design-review/SKILL.md +0 -1957
  622. package/.agent/skills/gstack-design-review/SKILL.md.tmpl +0 -344
  623. package/.agent/skills/gstack-design-shotgun/SKILL.md +0 -885
  624. package/.agent/skills/gstack-design-shotgun/SKILL.md.tmpl +0 -310
  625. package/.agent/skills/gstack-design-shotgun/sections/doctrine.md +0 -86
  626. package/.agent/skills/gstack-design-shotgun/sections/doctrine.md.tmpl +0 -1
  627. package/.agent/skills/gstack-design-shotgun/sections/manifest.json +0 -14
  628. package/.agent/skills/gstack-deslop-shared-libs/SKILL.md +0 -209
  629. package/.agent/skills/gstack-deslop-shared-libs/SKILL.md.tmpl +0 -181
  630. package/.agent/skills/gstack-devex-review/SKILL.md +0 -1107
  631. package/.agent/skills/gstack-devex-review/SKILL.md.tmpl +0 -241
  632. package/.agent/skills/gstack-diagram/SKILL.md +0 -295
  633. package/.agent/skills/gstack-diagram/SKILL.md.tmpl +0 -175
  634. package/.agent/skills/gstack-document-generate/SKILL.md +0 -814
  635. package/.agent/skills/gstack-document-generate/SKILL.md.tmpl +0 -460
  636. package/.agent/skills/gstack-document-release/SKILL.md +0 -557
  637. package/.agent/skills/gstack-document-release/SKILL.md.tmpl +0 -188
  638. package/.agent/skills/gstack-document-release/sections/audit-scope.md +0 -51
  639. package/.agent/skills/gstack-document-release/sections/audit-scope.md.tmpl +0 -49
  640. package/.agent/skills/gstack-document-release/sections/manifest.json +0 -20
  641. package/.agent/skills/gstack-document-release/sections/release-body.md +0 -640
  642. package/.agent/skills/gstack-document-release/sections/release-body.md.tmpl +0 -428
  643. package/.agent/skills/gstack-eval-plan/SKILL.md +0 -472
  644. package/.agent/skills/gstack-eval-plan/SKILL.md.tmpl +0 -157
  645. package/.agent/skills/gstack-freeze/SKILL.md +0 -79
  646. package/.agent/skills/gstack-freeze/SKILL.md.tmpl +0 -96
  647. package/.agent/skills/gstack-freeze/bin/check-freeze.sh +0 -210
  648. package/.agent/skills/gstack-freeze/bin/freeze-state.sh +0 -68
  649. package/.agent/skills/gstack-gstack-upgrade/SKILL.md +0 -410
  650. package/.agent/skills/gstack-gstack-upgrade/SKILL.md.tmpl +0 -413
  651. package/.agent/skills/gstack-gstack-upgrade/migrations/v0.15.2.0.sh +0 -20
  652. package/.agent/skills/gstack-gstack-upgrade/migrations/v0.16.2.0.sh +0 -56
  653. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.0.0.0.sh +0 -40
  654. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.1.3.0.sh +0 -137
  655. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.17.0.0.sh +0 -59
  656. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.27.0.0.sh +0 -432
  657. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.37.0.0.sh +0 -104
  658. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.38.1.0.sh +0 -104
  659. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.40.0.0.sh +0 -144
  660. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.58.0.0.sh +0 -65
  661. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.65.0.0.sh +0 -152
  662. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.67.0.0.sh +0 -73
  663. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.78.0.0.sh +0 -30
  664. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.86.0.0.sh +0 -12
  665. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.91.19.0.sh +0 -53
  666. package/.agent/skills/gstack-gstack-upgrade/migrations/v1.91.65.0.sh +0 -31
  667. package/.agent/skills/gstack-guard/SKILL.md +0 -60
  668. package/.agent/skills/gstack-guard/SKILL.md.tmpl +0 -88
  669. package/.agent/skills/gstack-health/SKILL.md +0 -710
  670. package/.agent/skills/gstack-health/SKILL.md.tmpl +0 -386
  671. package/.agent/skills/gstack-investigate/SKILL.md +0 -706
  672. package/.agent/skills/gstack-investigate/SKILL.md.tmpl +0 -305
  673. package/.agent/skills/gstack-investigate/sections/backlog.md +0 -31
  674. package/.agent/skills/gstack-investigate/sections/backlog.md.tmpl +0 -29
  675. package/.agent/skills/gstack-investigate/sections/eval-bisect.md +0 -25
  676. package/.agent/skills/gstack-investigate/sections/eval-bisect.md.tmpl +0 -23
  677. package/.agent/skills/gstack-investigate/sections/flake.md +0 -50
  678. package/.agent/skills/gstack-investigate/sections/flake.md.tmpl +0 -43
  679. package/.agent/skills/gstack-investigate/sections/manifest.json +0 -38
  680. package/.agent/skills/gstack-investigate/sections/polluter.md +0 -33
  681. package/.agent/skills/gstack-investigate/sections/polluter.md.tmpl +0 -31
  682. package/.agent/skills/gstack-investigate/sections/race.md +0 -27
  683. package/.agent/skills/gstack-investigate/sections/race.md.tmpl +0 -25
  684. package/.agent/skills/gstack-ios-clean/SKILL.md +0 -427
  685. package/.agent/skills/gstack-ios-clean/SKILL.md.tmpl +0 -107
  686. package/.agent/skills/gstack-ios-design-review/SKILL.md +0 -434
  687. package/.agent/skills/gstack-ios-design-review/SKILL.md.tmpl +0 -111
  688. package/.agent/skills/gstack-ios-fix/SKILL.md +0 -423
  689. package/.agent/skills/gstack-ios-fix/SKILL.md.tmpl +0 -103
  690. package/.agent/skills/gstack-ios-qa/SKILL.md +0 -643
  691. package/.agent/skills/gstack-ios-qa/SKILL.md.tmpl +0 -297
  692. package/.agent/skills/gstack-ios-qa/daemon/src/allowlist.ts +0 -114
  693. package/.agent/skills/gstack-ios-qa/daemon/src/audit.ts +0 -97
  694. package/.agent/skills/gstack-ios-qa/daemon/src/auth-mint.ts +0 -89
  695. package/.agent/skills/gstack-ios-qa/daemon/src/cli-mint.ts +0 -149
  696. package/.agent/skills/gstack-ios-qa/daemon/src/devicectl.ts +0 -335
  697. package/.agent/skills/gstack-ios-qa/daemon/src/index.ts +0 -697
  698. package/.agent/skills/gstack-ios-qa/daemon/src/proxy.ts +0 -160
  699. package/.agent/skills/gstack-ios-qa/daemon/src/session-tokens.ts +0 -126
  700. package/.agent/skills/gstack-ios-qa/daemon/src/single-instance.ts +0 -171
  701. package/.agent/skills/gstack-ios-qa/daemon/src/tailscale-localapi.ts +0 -120
  702. package/.agent/skills/gstack-ios-qa/daemon/src/tunnel-bootstrap.ts +0 -459
  703. package/.agent/skills/gstack-ios-qa/daemon/src/types.ts +0 -91
  704. package/.agent/skills/gstack-ios-qa/daemon/test/allowlist.test.ts +0 -146
  705. package/.agent/skills/gstack-ios-qa/daemon/test/audit.test.ts +0 -111
  706. package/.agent/skills/gstack-ios-qa/daemon/test/auth-mint.test.ts +0 -106
  707. package/.agent/skills/gstack-ios-qa/daemon/test/cli-mint.test.ts +0 -120
  708. package/.agent/skills/gstack-ios-qa/daemon/test/daemon-integration.test.ts +0 -855
  709. package/.agent/skills/gstack-ios-qa/daemon/test/fake-device.ts +0 -238
  710. package/.agent/skills/gstack-ios-qa/daemon/test/proxy-classify.test.ts +0 -47
  711. package/.agent/skills/gstack-ios-qa/daemon/test/proxy-transport.test.ts +0 -499
  712. package/.agent/skills/gstack-ios-qa/daemon/test/session-tokens.test.ts +0 -156
  713. package/.agent/skills/gstack-ios-qa/daemon/test/single-instance.test.ts +0 -96
  714. package/.agent/skills/gstack-ios-qa/daemon/test/tailscale-localapi.test.ts +0 -55
  715. package/.agent/skills/gstack-ios-qa/daemon/test/tunnel-bootstrap.test.ts +0 -1030
  716. package/.agent/skills/gstack-ios-qa/templates/Bridges.swift.template +0 -474
  717. package/.agent/skills/gstack-ios-qa/templates/DebugBridgeManager.swift.template +0 -38
  718. package/.agent/skills/gstack-ios-qa/templates/DebugBridgeTouch.h.template +0 -38
  719. package/.agent/skills/gstack-ios-qa/templates/DebugBridgeTouch.m.template +0 -365
  720. package/.agent/skills/gstack-ios-qa/templates/DebugBridgeWiring.swift.template +0 -59
  721. package/.agent/skills/gstack-ios-qa/templates/DebugOverlay.swift.template +0 -137
  722. package/.agent/skills/gstack-ios-qa/templates/Package.swift.template +0 -82
  723. package/.agent/skills/gstack-ios-qa/templates/StateAccessor.swift.template +0 -41
  724. package/.agent/skills/gstack-ios-qa/templates/StateServer.swift.template +0 -625
  725. package/.agent/skills/gstack-ios-sync/SKILL.md +0 -418
  726. package/.agent/skills/gstack-ios-sync/SKILL.md.tmpl +0 -99
  727. package/.agent/skills/gstack-land-and-deploy/SKILL.md +0 -1028
  728. package/.agent/skills/gstack-land-and-deploy/SKILL.md.tmpl +0 -509
  729. package/.agent/skills/gstack-land-and-deploy/sections/first-run-validation.md +0 -188
  730. package/.agent/skills/gstack-land-and-deploy/sections/first-run-validation.md.tmpl +0 -150
  731. package/.agent/skills/gstack-land-and-deploy/sections/manifest.json +0 -26
  732. package/.agent/skills/gstack-land-and-deploy/sections/merge-and-deploy.md +0 -250
  733. package/.agent/skills/gstack-land-and-deploy/sections/merge-and-deploy.md.tmpl +0 -248
  734. package/.agent/skills/gstack-land-and-deploy/sections/readiness-gate.md +0 -308
  735. package/.agent/skills/gstack-land-and-deploy/sections/readiness-gate.md.tmpl +0 -306
  736. package/.agent/skills/gstack-landing-report/SKILL.md +0 -488
  737. package/.agent/skills/gstack-landing-report/SKILL.md.tmpl +0 -164
  738. package/.agent/skills/gstack-learn/SKILL.md +0 -519
  739. package/.agent/skills/gstack-learn/SKILL.md.tmpl +0 -197
  740. package/.agent/skills/gstack-make-pdf/SKILL.md +0 -409
  741. package/.agent/skills/gstack-make-pdf/SKILL.md.tmpl +0 -253
  742. package/.agent/skills/gstack-make-pdf/src/asideClient.ts +0 -114
  743. package/.agent/skills/gstack-make-pdf/src/cli.ts +0 -294
  744. package/.agent/skills/gstack-make-pdf/src/commands.ts +0 -62
  745. package/.agent/skills/gstack-make-pdf/src/diagram-prepass.ts +0 -834
  746. package/.agent/skills/gstack-make-pdf/src/html-to-docx.d.ts +0 -7
  747. package/.agent/skills/gstack-make-pdf/src/image-policy.ts +0 -236
  748. package/.agent/skills/gstack-make-pdf/src/image-size.ts +0 -117
  749. package/.agent/skills/gstack-make-pdf/src/orchestrator.ts +0 -339
  750. package/.agent/skills/gstack-make-pdf/src/pdftotext.ts +0 -318
  751. package/.agent/skills/gstack-make-pdf/src/print-css.ts +0 -452
  752. package/.agent/skills/gstack-make-pdf/src/render.ts +0 -636
  753. package/.agent/skills/gstack-make-pdf/src/setup.ts +0 -113
  754. package/.agent/skills/gstack-make-pdf/src/smartypants.ts +0 -105
  755. package/.agent/skills/gstack-make-pdf/src/toc-pages.ts +0 -197
  756. package/.agent/skills/gstack-make-pdf/src/types.ts +0 -109
  757. package/.agent/skills/gstack-make-pdf/test/asideClient.test.ts +0 -153
  758. package/.agent/skills/gstack-make-pdf/test/cli-args.test.ts +0 -94
  759. package/.agent/skills/gstack-make-pdf/test/cli-exit-codes.test.ts +0 -329
  760. package/.agent/skills/gstack-make-pdf/test/diagram-prepass.test.ts +0 -743
  761. package/.agent/skills/gstack-make-pdf/test/e2e/ci-prereqs.test.ts +0 -48
  762. package/.agent/skills/gstack-make-pdf/test/e2e/combined-gate.test.ts +0 -74
  763. package/.agent/skills/gstack-make-pdf/test/e2e/diagram-gate.test.ts +0 -173
  764. package/.agent/skills/gstack-make-pdf/test/e2e/emoji-gate.test.ts +0 -191
  765. package/.agent/skills/gstack-make-pdf/test/e2e/format-gate.test.ts +0 -130
  766. package/.agent/skills/gstack-make-pdf/test/e2e/landscape-gate.test.ts +0 -150
  767. package/.agent/skills/gstack-make-pdf/test/e2e/toc-gate.test.ts +0 -143
  768. package/.agent/skills/gstack-make-pdf/test/fixtures/combined-gate.expected.txt +0 -20
  769. package/.agent/skills/gstack-make-pdf/test/fixtures/combined-gate.md +0 -30
  770. package/.agent/skills/gstack-make-pdf/test/fixtures/diagram-assets/huge-noise.png +0 -0
  771. package/.agent/skills/gstack-make-pdf/test/fixtures/diagram-assets/red-box.png +0 -0
  772. package/.agent/skills/gstack-make-pdf/test/fixtures/diagram-assets/wide-arch.png +0 -0
  773. package/.agent/skills/gstack-make-pdf/test/fixtures/diagram-assets/wide-screenshot.png +0 -0
  774. package/.agent/skills/gstack-make-pdf/test/fixtures/diagram-gate.md +0 -48
  775. package/.agent/skills/gstack-make-pdf/test/fixtures/emoji-gate.md +0 -12
  776. package/.agent/skills/gstack-make-pdf/test/fixtures/landscape-gate.md +0 -52
  777. package/.agent/skills/gstack-make-pdf/test/image-policy.test.ts +0 -215
  778. package/.agent/skills/gstack-make-pdf/test/pdftotext.test.ts +0 -327
  779. package/.agent/skills/gstack-make-pdf/test/render-offline-sanitize.test.ts +0 -268
  780. package/.agent/skills/gstack-make-pdf/test/render.test.ts +0 -603
  781. package/.agent/skills/gstack-make-pdf/test/setup-smoke.test.ts +0 -259
  782. package/.agent/skills/gstack-make-pdf/test/toc-anchors.test.ts +0 -95
  783. package/.agent/skills/gstack-make-pdf/test/toc-pages.test.ts +0 -148
  784. package/.agent/skills/gstack-office-hours/SKILL.md +0 -1324
  785. package/.agent/skills/gstack-office-hours/SKILL.md.tmpl +0 -372
  786. package/.agent/skills/gstack-office-hours/sections/design-and-handoff.md +0 -706
  787. package/.agent/skills/gstack-office-hours/sections/design-and-handoff.md.tmpl +0 -547
  788. package/.agent/skills/gstack-office-hours/sections/manifest.json +0 -26
  789. package/.agent/skills/gstack-office-hours/sections/phase-2a-startup-diagnostic.md +0 -163
  790. package/.agent/skills/gstack-office-hours/sections/phase-2a-startup-diagnostic.md.tmpl +0 -161
  791. package/.agent/skills/gstack-office-hours/sections/phase-2b-builder-brainstorm.md +0 -43
  792. package/.agent/skills/gstack-office-hours/sections/phase-2b-builder-brainstorm.md.tmpl +0 -41
  793. package/.agent/skills/gstack-open-gstack-browser/SKILL.md +0 -414
  794. package/.agent/skills/gstack-open-gstack-browser/SKILL.md.tmpl +0 -248
  795. package/.agent/skills/gstack-pair-agent/SKILL.md +0 -730
  796. package/.agent/skills/gstack-pair-agent/SKILL.md.tmpl +0 -366
  797. package/.agent/skills/gstack-plan-ceo-review/SKILL.md +0 -1245
  798. package/.agent/skills/gstack-plan-ceo-review/SKILL.md.tmpl +0 -596
  799. package/.agent/skills/gstack-plan-ceo-review/bin/mode-handoff-hook +0 -5
  800. package/.agent/skills/gstack-plan-ceo-review/bin/mode-handoff-hook.ts +0 -34
  801. package/.agent/skills/gstack-plan-ceo-review/sections/checklist.md +0 -37
  802. package/.agent/skills/gstack-plan-ceo-review/sections/checklist.md.tmpl +0 -35
  803. package/.agent/skills/gstack-plan-ceo-review/sections/manifest.json +0 -23
  804. package/.agent/skills/gstack-plan-ceo-review/sections/review-sections.md +0 -1207
  805. package/.agent/skills/gstack-plan-ceo-review/sections/review-sections.md.tmpl +0 -605
  806. package/.agent/skills/gstack-plan-design-review/SKILL.md +0 -1230
  807. package/.agent/skills/gstack-plan-design-review/SKILL.md.tmpl +0 -344
  808. package/.agent/skills/gstack-plan-design-review/sections/checklist.md +0 -27
  809. package/.agent/skills/gstack-plan-design-review/sections/checklist.md.tmpl +0 -25
  810. package/.agent/skills/gstack-plan-design-review/sections/manifest.json +0 -23
  811. package/.agent/skills/gstack-plan-design-review/sections/review-sections.md +0 -727
  812. package/.agent/skills/gstack-plan-design-review/sections/review-sections.md.tmpl +0 -281
  813. package/.agent/skills/gstack-plan-devex-review/SKILL.md +0 -1072
  814. package/.agent/skills/gstack-plan-devex-review/SKILL.md.tmpl +0 -459
  815. package/.agent/skills/gstack-plan-devex-review/dx-hall-of-fame.md +0 -127
  816. package/.agent/skills/gstack-plan-devex-review/sections/checklist.md +0 -33
  817. package/.agent/skills/gstack-plan-devex-review/sections/checklist.md.tmpl +0 -31
  818. package/.agent/skills/gstack-plan-devex-review/sections/manifest.json +0 -23
  819. package/.agent/skills/gstack-plan-devex-review/sections/review-sections.md +0 -1037
  820. package/.agent/skills/gstack-plan-devex-review/sections/review-sections.md.tmpl +0 -446
  821. package/.agent/skills/gstack-plan-eng-review/SKILL.md +0 -702
  822. package/.agent/skills/gstack-plan-eng-review/SKILL.md.tmpl +0 -191
  823. package/.agent/skills/gstack-plan-eng-review/sections/checklist.md +0 -34
  824. package/.agent/skills/gstack-plan-eng-review/sections/checklist.md.tmpl +0 -32
  825. package/.agent/skills/gstack-plan-eng-review/sections/manifest.json +0 -23
  826. package/.agent/skills/gstack-plan-eng-review/sections/review-sections.md +0 -1545
  827. package/.agent/skills/gstack-plan-eng-review/sections/review-sections.md.tmpl +0 -614
  828. package/.agent/skills/gstack-plan-tune/SKILL.md +0 -986
  829. package/.agent/skills/gstack-plan-tune/SKILL.md.tmpl +0 -669
  830. package/.agent/skills/gstack-qa/SKILL.md +0 -781
  831. package/.agent/skills/gstack-qa/SKILL.md.tmpl +0 -305
  832. package/.agent/skills/gstack-qa/references/issue-taxonomy.md +0 -85
  833. package/.agent/skills/gstack-qa/sections/browser-setup.md +0 -114
  834. package/.agent/skills/gstack-qa/sections/browser-setup.md.tmpl +0 -28
  835. package/.agent/skills/gstack-qa/sections/browser-verify.md +0 -19
  836. package/.agent/skills/gstack-qa/sections/browser-verify.md.tmpl +0 -17
  837. package/.agent/skills/gstack-qa/sections/exploratory.md +0 -92
  838. package/.agent/skills/gstack-qa/sections/exploratory.md.tmpl +0 -1
  839. package/.agent/skills/gstack-qa/sections/manifest.json +0 -50
  840. package/.agent/skills/gstack-qa/sections/qa-patterns.md +0 -226
  841. package/.agent/skills/gstack-qa/sections/qa-patterns.md.tmpl +0 -1
  842. package/.agent/skills/gstack-qa/sections/scope.md +0 -23
  843. package/.agent/skills/gstack-qa/sections/scope.md.tmpl +0 -1
  844. package/.agent/skills/gstack-qa/sections/system-functional.md +0 -61
  845. package/.agent/skills/gstack-qa/sections/system-functional.md.tmpl +0 -1
  846. package/.agent/skills/gstack-qa/sections/test-bootstrap.md +0 -86
  847. package/.agent/skills/gstack-qa/sections/test-bootstrap.md.tmpl +0 -74
  848. package/.agent/skills/gstack-qa/templates/functional-report-template.md +0 -55
  849. package/.agent/skills/gstack-qa/templates/qa-report-template.md +0 -124
  850. package/.agent/skills/gstack-qa-only/SKILL.md +0 -595
  851. package/.agent/skills/gstack-qa-only/SKILL.md.tmpl +0 -214
  852. package/.agent/skills/gstack-qa-only/sections/exploratory.md +0 -107
  853. package/.agent/skills/gstack-qa-only/sections/exploratory.md.tmpl +0 -1
  854. package/.agent/skills/gstack-qa-only/sections/manifest.json +0 -19
  855. package/.agent/skills/gstack-qa-only/sections/reporting.md +0 -78
  856. package/.agent/skills/gstack-qa-only/sections/reporting.md.tmpl +0 -76
  857. package/.agent/skills/gstack-retro/SKILL.md +0 -1178
  858. package/.agent/skills/gstack-retro/SKILL.md.tmpl +0 -769
  859. package/.agent/skills/gstack-retro/sections/manifest.json +0 -14
  860. package/.agent/skills/gstack-retro/sections/report-format.md +0 -127
  861. package/.agent/skills/gstack-retro/sections/report-format.md.tmpl +0 -125
  862. package/.agent/skills/gstack-review/SKILL.md +0 -1199
  863. package/.agent/skills/gstack-review/SKILL.md.tmpl +0 -482
  864. package/.agent/skills/gstack-review/TODOS-format.md +0 -61
  865. package/.agent/skills/gstack-review/checklist.md +0 -222
  866. package/.agent/skills/gstack-review/design-checklist.md +0 -193
  867. package/.agent/skills/gstack-review/gate-integrity.md +0 -171
  868. package/.agent/skills/gstack-review/greptile-triage.md +0 -261
  869. package/.agent/skills/gstack-review/sections/adversarial.md +0 -296
  870. package/.agent/skills/gstack-review/sections/adversarial.md.tmpl +0 -1
  871. package/.agent/skills/gstack-review/sections/manifest.json +0 -32
  872. package/.agent/skills/gstack-review/sections/plan-completion.md +0 -232
  873. package/.agent/skills/gstack-review/sections/plan-completion.md.tmpl +0 -3
  874. package/.agent/skills/gstack-review/sections/review-army.md +0 -263
  875. package/.agent/skills/gstack-review/sections/review-army.md.tmpl +0 -1
  876. package/.agent/skills/gstack-review/sections/shared-code-reuse.md +0 -34
  877. package/.agent/skills/gstack-review/sections/shared-code-reuse.md.tmpl +0 -1
  878. package/.agent/skills/gstack-review/specialists/api-contract.md +0 -49
  879. package/.agent/skills/gstack-review/specialists/data-migration.md +0 -48
  880. package/.agent/skills/gstack-review/specialists/maintainability.md +0 -46
  881. package/.agent/skills/gstack-review/specialists/performance.md +0 -52
  882. package/.agent/skills/gstack-review/specialists/red-team.md +0 -45
  883. package/.agent/skills/gstack-review/specialists/security.md +0 -65
  884. package/.agent/skills/gstack-review/specialists/simplification.md +0 -49
  885. package/.agent/skills/gstack-review/specialists/testing.md +0 -160
  886. package/.agent/skills/gstack-scrape/SKILL.md +0 -431
  887. package/.agent/skills/gstack-scrape/SKILL.md.tmpl +0 -187
  888. package/.agent/skills/gstack-setup-browser-cookies/SKILL.md +0 -231
  889. package/.agent/skills/gstack-setup-browser-cookies/SKILL.md.tmpl +0 -64
  890. package/.agent/skills/gstack-setup-deploy/SKILL.md +0 -605
  891. package/.agent/skills/gstack-setup-deploy/SKILL.md.tmpl +0 -250
  892. package/.agent/skills/gstack-setup-gbrain/SKILL.md +0 -1074
  893. package/.agent/skills/gstack-setup-gbrain/SKILL.md.tmpl +0 -742
  894. package/.agent/skills/gstack-setup-gbrain/memory.md +0 -426
  895. package/.agent/skills/gstack-setup-gbrain/sections/brain-init.md +0 -269
  896. package/.agent/skills/gstack-setup-gbrain/sections/brain-init.md.tmpl +0 -267
  897. package/.agent/skills/gstack-setup-gbrain/sections/claude-md-persist.md +0 -40
  898. package/.agent/skills/gstack-setup-gbrain/sections/claude-md-persist.md.tmpl +0 -38
  899. package/.agent/skills/gstack-setup-gbrain/sections/engine-remediation.md +0 -71
  900. package/.agent/skills/gstack-setup-gbrain/sections/engine-remediation.md.tmpl +0 -69
  901. package/.agent/skills/gstack-setup-gbrain/sections/manifest.json +0 -32
  902. package/.agent/skills/gstack-setup-gbrain/sections/transcript-gate.md +0 -105
  903. package/.agent/skills/gstack-setup-gbrain/sections/transcript-gate.md.tmpl +0 -103
  904. package/.agent/skills/gstack-ship/SKILL.md +0 -1220
  905. package/.agent/skills/gstack-ship/SKILL.md.tmpl +0 -694
  906. package/.agent/skills/gstack-ship/sections/adversarial.md +0 -362
  907. package/.agent/skills/gstack-ship/sections/adversarial.md.tmpl +0 -22
  908. package/.agent/skills/gstack-ship/sections/apple-release.md +0 -98
  909. package/.agent/skills/gstack-ship/sections/apple-release.md.tmpl +0 -96
  910. package/.agent/skills/gstack-ship/sections/changelog.md +0 -47
  911. package/.agent/skills/gstack-ship/sections/changelog.md.tmpl +0 -5
  912. package/.agent/skills/gstack-ship/sections/documentation.md +0 -118
  913. package/.agent/skills/gstack-ship/sections/documentation.md.tmpl +0 -116
  914. package/.agent/skills/gstack-ship/sections/greptile-early.md +0 -57
  915. package/.agent/skills/gstack-ship/sections/greptile-early.md.tmpl +0 -48
  916. package/.agent/skills/gstack-ship/sections/greptile.md +0 -95
  917. package/.agent/skills/gstack-ship/sections/greptile.md.tmpl +0 -93
  918. package/.agent/skills/gstack-ship/sections/handoff.md +0 -22
  919. package/.agent/skills/gstack-ship/sections/handoff.md.tmpl +0 -20
  920. package/.agent/skills/gstack-ship/sections/manifest.json +0 -92
  921. package/.agent/skills/gstack-ship/sections/measure.md +0 -66
  922. package/.agent/skills/gstack-ship/sections/measure.md.tmpl +0 -64
  923. package/.agent/skills/gstack-ship/sections/plan-completion.md +0 -387
  924. package/.agent/skills/gstack-ship/sections/plan-completion.md.tmpl +0 -67
  925. package/.agent/skills/gstack-ship/sections/pr-body.md +0 -258
  926. package/.agent/skills/gstack-ship/sections/pr-body.md.tmpl +0 -241
  927. package/.agent/skills/gstack-ship/sections/review-army.md +0 -728
  928. package/.agent/skills/gstack-ship/sections/review-army.md.tmpl +0 -171
  929. package/.agent/skills/gstack-ship/sections/shared-code-reuse.md +0 -34
  930. package/.agent/skills/gstack-ship/sections/shared-code-reuse.md.tmpl +0 -1
  931. package/.agent/skills/gstack-ship/sections/test-coverage.md +0 -478
  932. package/.agent/skills/gstack-ship/sections/test-coverage.md.tmpl +0 -118
  933. package/.agent/skills/gstack-ship/sections/tests.md +0 -453
  934. package/.agent/skills/gstack-ship/sections/tests.md.tmpl +0 -144
  935. package/.agent/skills/gstack-skillify/SKILL.md +0 -790
  936. package/.agent/skills/gstack-skillify/SKILL.md.tmpl +0 -437
  937. package/.agent/skills/gstack-spec/SKILL.md +0 -893
  938. package/.agent/skills/gstack-spec/SKILL.md.tmpl +0 -498
  939. package/.agent/skills/gstack-spec/sections/gate-and-file.md +0 -470
  940. package/.agent/skills/gstack-spec/sections/gate-and-file.md.tmpl +0 -319
  941. package/.agent/skills/gstack-spec/sections/manifest.json +0 -14
  942. package/.agent/skills/gstack-sync-gbrain/SKILL.md +0 -935
  943. package/.agent/skills/gstack-sync-gbrain/SKILL.md.tmpl +0 -615
  944. package/.agent/skills/gstack-test-audit/SKILL.md +0 -500
  945. package/.agent/skills/gstack-test-audit/SKILL.md.tmpl +0 -149
  946. package/.agent/skills/gstack-unfreeze/SKILL.md +0 -39
  947. package/.agent/skills/gstack-unfreeze/SKILL.md.tmpl +0 -39
  948. package/.agent/skills/gstack-upgrade/SKILL.md +0 -410
  949. package/.agent/skills/gstack-upgrade/SKILL.md.tmpl +0 -413
  950. package/.agent/skills/gstack-upgrade/migrations/v0.15.2.0.sh +0 -20
  951. package/.agent/skills/gstack-upgrade/migrations/v0.16.2.0.sh +0 -56
  952. package/.agent/skills/gstack-upgrade/migrations/v1.0.0.0.sh +0 -40
  953. package/.agent/skills/gstack-upgrade/migrations/v1.1.3.0.sh +0 -137
  954. package/.agent/skills/gstack-upgrade/migrations/v1.17.0.0.sh +0 -59
  955. package/.agent/skills/gstack-upgrade/migrations/v1.27.0.0.sh +0 -432
  956. package/.agent/skills/gstack-upgrade/migrations/v1.37.0.0.sh +0 -104
  957. package/.agent/skills/gstack-upgrade/migrations/v1.38.1.0.sh +0 -104
  958. package/.agent/skills/gstack-upgrade/migrations/v1.40.0.0.sh +0 -144
  959. package/.agent/skills/gstack-upgrade/migrations/v1.58.0.0.sh +0 -65
  960. package/.agent/skills/gstack-upgrade/migrations/v1.65.0.0.sh +0 -152
  961. package/.agent/skills/gstack-upgrade/migrations/v1.67.0.0.sh +0 -73
  962. package/.agent/skills/gstack-upgrade/migrations/v1.78.0.0.sh +0 -30
  963. package/.agent/skills/gstack-upgrade/migrations/v1.86.0.0.sh +0 -12
  964. package/.agent/skills/gstack-upgrade/migrations/v1.91.19.0.sh +0 -53
  965. package/.agent/skills/gstack-upgrade/migrations/v1.91.65.0.sh +0 -31
  966. package/.agent/skills/html-renderer/SKILL.md +0 -336
  967. package/.agent/skills/html-renderer/references/animation-patterns.md +0 -609
  968. package/.agent/skills/html-renderer/references/character-animation.md +0 -388
  969. package/.agent/skills/html-renderer/references/collage-broll.md +0 -41
  970. package/.agent/skills/html-renderer/references/design.md +0 -217
  971. package/.agent/skills/html-renderer/references/directing.md +0 -165
  972. package/.agent/skills/html-renderer/references/earshot-audio.md +0 -201
  973. package/.agent/skills/html-renderer/references/engine-api.md +0 -480
  974. package/.agent/skills/html-renderer/references/film-styles.md +0 -95
  975. package/.agent/skills/html-renderer/references/hyperframes-motion.md +0 -208
  976. package/.agent/skills/html-renderer/references/motion-craft.md +0 -92
  977. package/.agent/skills/html-renderer/references/onetake-camera.md +0 -59
  978. package/.agent/skills/html-renderer/references/procedural-sfx.md +0 -147
  979. package/.agent/skills/html-renderer/references/remotion-patterns.md +0 -159
  980. package/.agent/skills/html-renderer/references/render-contract.md +0 -66
  981. package/.agent/skills/motion-styles/LIBRARY.md +0 -896
  982. package/.agent/skills/motion-styles/README.md +0 -29
  983. package/.agent/skills/motion-styles/SKILL.md +0 -70
  984. package/.agent/skills/motion-styles/catalog.json +0 -2253
  985. package/.agent/skills/motion-styles/prompts/bio-glow.md +0 -149
  986. package/.agent/skills/motion-styles/prompts/blueprint.md +0 -145
  987. package/.agent/skills/motion-styles/prompts/breaking-desk.md +0 -147
  988. package/.agent/skills/motion-styles/prompts/callout-kit.md +0 -147
  989. package/.agent/skills/motion-styles/prompts/chalk-talk.md +0 -153
  990. package/.agent/skills/motion-styles/prompts/chat-story.md +0 -143
  991. package/.agent/skills/motion-styles/prompts/clay-diorama.md +0 -149
  992. package/.agent/skills/motion-styles/prompts/clean-tech.md +0 -147
  993. package/.agent/skills/motion-styles/prompts/comic-panels.md +0 -145
  994. package/.agent/skills/motion-styles/prompts/cosmic-scale.md +0 -147
  995. package/.agent/skills/motion-styles/prompts/creator-motion.md +0 -149
  996. package/.agent/skills/motion-styles/prompts/data-city.md +0 -149
  997. package/.agent/skills/motion-styles/prompts/data-story.md +0 -147
  998. package/.agent/skills/motion-styles/prompts/deep-layers.md +0 -147
  999. package/.agent/skills/motion-styles/prompts/doc-cinema.md +0 -145
  1000. package/.agent/skills/motion-styles/prompts/evidence-board.md +0 -145
  1001. package/.agent/skills/motion-styles/prompts/exploded-view.md +0 -149
  1002. package/.agent/skills/motion-styles/prompts/glass-icons.md +0 -147
  1003. package/.agent/skills/motion-styles/prompts/glitch-pack.md +0 -145
  1004. package/.agent/skills/motion-styles/prompts/globe-arcs.md +0 -147
  1005. package/.agent/skills/motion-styles/prompts/headline-backdrop.md +0 -145
  1006. package/.agent/skills/motion-styles/prompts/iso-cutaway.md +0 -147
  1007. package/.agent/skills/motion-styles/prompts/isotype.md +0 -145
  1008. package/.agent/skills/motion-styles/prompts/karaoke-subs.md +0 -145
  1009. package/.agent/skills/motion-styles/prompts/low-poly-atlas.md +0 -149
  1010. package/.agent/skills/motion-styles/prompts/lower-thirds.md +0 -147
  1011. package/.agent/skills/motion-styles/prompts/marker-board.md +0 -145
  1012. package/.agent/skills/motion-styles/prompts/market-tape.md +0 -145
  1013. package/.agent/skills/motion-styles/prompts/math-canvas.md +0 -145
  1014. package/.agent/skills/motion-styles/prompts/myth-or-fact.md +0 -145
  1015. package/.agent/skills/motion-styles/prompts/neon-line.md +0 -145
  1016. package/.agent/skills/motion-styles/prompts/paper-craft.md +0 -145
  1017. package/.agent/skills/motion-styles/prompts/parchment-map.md +0 -147
  1018. package/.agent/skills/motion-styles/prompts/physics-toybox.md +0 -147
  1019. package/.agent/skills/motion-styles/prompts/pixel-quest.md +0 -145
  1020. package/.agent/skills/motion-styles/prompts/podcast-clip.md +0 -147
  1021. package/.agent/skills/motion-styles/prompts/pop-info.md +0 -145
  1022. package/.agent/skills/motion-styles/prompts/product-turntable.md +0 -149
  1023. package/.agent/skills/motion-styles/prompts/punch-captions.md +0 -145
  1024. package/.agent/skills/motion-styles/prompts/quiz-countdown.md +0 -145
  1025. package/.agent/skills/motion-styles/prompts/quote-cinema.md +0 -145
  1026. package/.agent/skills/motion-styles/prompts/recipe-steps.md +0 -145
  1027. package/.agent/skills/motion-styles/prompts/rubber-hose-reel.md +0 -145
  1028. package/.agent/skills/motion-styles/prompts/shadow-puppets.md +0 -145
  1029. package/.agent/skills/motion-styles/prompts/size-lineup.md +0 -149
  1030. package/.agent/skills/motion-styles/prompts/software-walkthrough.md +0 -147
  1031. package/.agent/skills/motion-styles/prompts/stack-split.md +0 -145
  1032. package/.agent/skills/motion-styles/prompts/sticker-pop.md +0 -145
  1033. package/.agent/skills/motion-styles/prompts/storybook.md +0 -145
  1034. package/.agent/skills/motion-styles/prompts/swiss-grid.md +0 -145
  1035. package/.agent/skills/motion-styles/prompts/synth-grid.md +0 -147
  1036. package/.agent/skills/motion-styles/prompts/tactics-board.md +0 -145
  1037. package/.agent/skills/motion-styles/prompts/terminal.md +0 -145
  1038. package/.agent/skills/motion-styles/prompts/tier-list.md +0 -143
  1039. package/.agent/skills/motion-styles/prompts/timeline-rail.md +0 -145
  1040. package/.agent/skills/motion-styles/prompts/top-5-countdown.md +0 -145
  1041. package/.agent/skills/motion-styles/prompts/versus-split.md +0 -145
  1042. package/.agent/skills/motion-styles/prompts/vhs-camcorder.md +0 -145
  1043. package/.agent/skills/motion-styles/prompts/visual-novel.md +0 -145
  1044. package/.agent/skills/motion-styles/prompts/warm-canvas.md +0 -145
  1045. package/.agent/skills/motion-styles/prompts/woodcut-tale.md +0 -145
  1046. package/.agent/skills/motion-styles/prompts/zine-collage.md +0 -145
  1047. package/.agent/skills/motion-styles/sources/bio-glow.html +0 -639
  1048. package/.agent/skills/motion-styles/sources/blueprint.html +0 -617
  1049. package/.agent/skills/motion-styles/sources/breaking-desk.html +0 -585
  1050. package/.agent/skills/motion-styles/sources/callout-kit.html +0 -586
  1051. package/.agent/skills/motion-styles/sources/chalk-talk.html +0 -597
  1052. package/.agent/skills/motion-styles/sources/chat-story.html +0 -597
  1053. package/.agent/skills/motion-styles/sources/clay-diorama.html +0 -681
  1054. package/.agent/skills/motion-styles/sources/clean-tech.html +0 -554
  1055. package/.agent/skills/motion-styles/sources/comic-panels.html +0 -608
  1056. package/.agent/skills/motion-styles/sources/cosmic-scale.html +0 -628
  1057. package/.agent/skills/motion-styles/sources/creator-motion.html +0 -805
  1058. package/.agent/skills/motion-styles/sources/data-city.html +0 -613
  1059. package/.agent/skills/motion-styles/sources/data-story.html +0 -539
  1060. package/.agent/skills/motion-styles/sources/deep-layers.html +0 -624
  1061. package/.agent/skills/motion-styles/sources/doc-cinema.html +0 -590
  1062. package/.agent/skills/motion-styles/sources/evidence-board.html +0 -610
  1063. package/.agent/skills/motion-styles/sources/exploded-view.html +0 -618
  1064. package/.agent/skills/motion-styles/sources/glass-icons.html +0 -612
  1065. package/.agent/skills/motion-styles/sources/glitch-pack.html +0 -583
  1066. package/.agent/skills/motion-styles/sources/globe-arcs.html +0 -621
  1067. package/.agent/skills/motion-styles/sources/headline-backdrop.html +0 -584
  1068. package/.agent/skills/motion-styles/sources/iso-cutaway.html +0 -621
  1069. package/.agent/skills/motion-styles/sources/isotype.html +0 -588
  1070. package/.agent/skills/motion-styles/sources/karaoke-subs.html +0 -577
  1071. package/.agent/skills/motion-styles/sources/low-poly-atlas.html +0 -621
  1072. package/.agent/skills/motion-styles/sources/lower-thirds.html +0 -582
  1073. package/.agent/skills/motion-styles/sources/marker-board.html +0 -598
  1074. package/.agent/skills/motion-styles/sources/market-tape.html +0 -598
  1075. package/.agent/skills/motion-styles/sources/math-canvas.html +0 -592
  1076. package/.agent/skills/motion-styles/sources/myth-or-fact.html +0 -587
  1077. package/.agent/skills/motion-styles/sources/neon-line.html +0 -597
  1078. package/.agent/skills/motion-styles/sources/paper-craft.html +0 -612
  1079. package/.agent/skills/motion-styles/sources/parchment-map.html +0 -624
  1080. package/.agent/skills/motion-styles/sources/physics-toybox.html +0 -617
  1081. package/.agent/skills/motion-styles/sources/pixel-quest.html +0 -609
  1082. package/.agent/skills/motion-styles/sources/podcast-clip.html +0 -585
  1083. package/.agent/skills/motion-styles/sources/pop-info.html +0 -677
  1084. package/.agent/skills/motion-styles/sources/product-turntable.html +0 -611
  1085. package/.agent/skills/motion-styles/sources/punch-captions.html +0 -583
  1086. package/.agent/skills/motion-styles/sources/quiz-countdown.html +0 -593
  1087. package/.agent/skills/motion-styles/sources/quote-cinema.html +0 -581
  1088. package/.agent/skills/motion-styles/sources/recipe-steps.html +0 -599
  1089. package/.agent/skills/motion-styles/sources/rubber-hose-reel.html +0 -627
  1090. package/.agent/skills/motion-styles/sources/shadow-puppets.html +0 -609
  1091. package/.agent/skills/motion-styles/sources/size-lineup.html +0 -620
  1092. package/.agent/skills/motion-styles/sources/software-walkthrough.html +0 -651
  1093. package/.agent/skills/motion-styles/sources/stack-split.html +0 -588
  1094. package/.agent/skills/motion-styles/sources/sticker-pop.html +0 -587
  1095. package/.agent/skills/motion-styles/sources/storybook.html +0 -600
  1096. package/.agent/skills/motion-styles/sources/swiss-grid.html +0 -590
  1097. package/.agent/skills/motion-styles/sources/synth-grid.html +0 -614
  1098. package/.agent/skills/motion-styles/sources/tactics-board.html +0 -608
  1099. package/.agent/skills/motion-styles/sources/terminal.html +0 -593
  1100. package/.agent/skills/motion-styles/sources/tier-list.html +0 -600
  1101. package/.agent/skills/motion-styles/sources/timeline-rail.html +0 -598
  1102. package/.agent/skills/motion-styles/sources/top-5-countdown.html +0 -589
  1103. package/.agent/skills/motion-styles/sources/versus-split.html +0 -592
  1104. package/.agent/skills/motion-styles/sources/vhs-camcorder.html +0 -587
  1105. package/.agent/skills/motion-styles/sources/visual-novel.html +0 -623
  1106. package/.agent/skills/motion-styles/sources/warm-canvas.html +0 -742
  1107. package/.agent/skills/motion-styles/sources/woodcut-tale.html +0 -598
  1108. package/.agent/skills/motion-styles/sources/zine-collage.html +0 -594
  1109. package/.agent/skills/reverse-engineer-anything/SKILL.md +0 -356
  1110. package/.agent/skills/reverse-engineer-anything/references/android-applications.md +0 -36
  1111. package/.agent/skills/reverse-engineer-anything/references/connection-and-recovery.md +0 -127
  1112. package/.agent/skills/reverse-engineer-anything/references/evidence-workflows.md +0 -71
  1113. package/.agent/skills/reverse-engineer-anything/references/javascript-applications.md +0 -218
  1114. package/.agent/skills/reverse-engineer-anything/references/native-and-artifacts.md +0 -297
  1115. package/.agent/skills/reverse-engineer-anything/references/runtime-observation.md +0 -78
  1116. package/.agent/skills/video-pipeline/SKILL.md +0 -384
  1117. package/.agent/skills/video-pipeline/assets/project/ANIMATION_GUIDE.md +0 -258
  1118. package/.agent/skills/video-pipeline/assets/project/STORYBOARD.md +0 -77
  1119. package/.agent/skills/video-pipeline/assets/project/index.html +0 -80
  1120. package/.agent/skills/video-pipeline/assets/project/pipeline/briefings/diagram-author.md +0 -43
  1121. package/.agent/skills/video-pipeline/assets/project/pipeline/briefings/orchestrator.md +0 -75
  1122. package/.agent/skills/video-pipeline/assets/project/pipeline/briefings/scene-author.md +0 -63
  1123. package/.agent/skills/video-pipeline/assets/project/reel/engine.css +0 -140
  1124. package/.agent/skills/video-pipeline/assets/project/reel/engine.js +0 -2143
  1125. package/.agent/skills/video-pipeline/assets/project/reel/virtual-clock.js +0 -168
  1126. package/.agent/skills/video-pipeline/references/mcp-tools.md +0 -441
  1127. package/.agent/skills/video-pipeline/references/motion-craft.md +0 -91
  1128. package/.agent/skills/video-pipeline/references/providers.md +0 -174
  1129. package/.agent/skills/video-pipeline/references/render-contract.md +0 -65
@@ -1,2143 +0,0 @@
1
- /**
2
- * engine.js — FrameForge HTML Compositor Runtime
3
- *
4
- * Every visual style is a pure function of t (seconds).
5
- * No CSS transitions, no setTimeout, no mutable frame state.
6
- *
7
- * IRON RULE — the determinism contract:
8
- * ✅ Use hash(i) for anything that must be reproducible across frames.
9
- * ✅ Read time from t / lt / dur — never from performance.now() or Date.now().
10
- * ❌ NEVER call Math.random() — breaks parallel frame workers.
11
- * ❌ NEVER use setTimeout / setInterval — Playwright virtualises the clock.
12
- * ❌ NEVER integrate physics per-tick — precompute or use closed-form math.
13
- * ❌ NEVER store frame state in module-level mutable counters inside a layer fn.
14
- *
15
- * Usage in edit.js:
16
- * import { reel, layer, text, wallCard, at, stagger, captions, faceAt, hash } from './reel/engine.js';
17
- * reel({ width: 1920, height: 1080, fps: 30, duration: 65 });
18
- * // fn(t, lt, dur): t = video time, lt = time inside this shot, dur = shot length
19
- * layer('title', { start: 0, end: 5 }).on((t, lt, dur) => ({
20
- * opacity: lt < 0.4 ? lt / 0.4 : lt > dur - 0.4 ? (dur - lt) / 0.4 : 1,
21
- * }));
22
- */
23
-
24
- // ── Global reel state ─────────────────────────────────────────────────────────
25
-
26
- export const REEL = {
27
- width: 1920,
28
- height: 1080,
29
- fps: 30,
30
- duration: 60,
31
- title: '',
32
- captionY: null, // override caption baseline (px from top)
33
- };
34
-
35
- /** Configure the compositor. Call once at the top of edit.js. */
36
- export function reel({ width = 1920, height = 1080, fps = 30, duration = 60, title = '' } = {}) {
37
- REEL.width = width;
38
- REEL.height = height;
39
- REEL.fps = fps;
40
- REEL.duration = duration;
41
- REEL.title = title;
42
- // Expose for render.mjs virtual-clock handshake
43
- window.DURATION = duration;
44
- window.FPS = fps;
45
- }
46
-
47
- // ── Layer registry ────────────────────────────────────────────────────────────
48
-
49
- const _layers = []; // { name, el, compute }
50
- const _atElements = []; // { t, el, duration }
51
- const _captionPath = null; // set by captions()
52
- let _captionData = null; // loaded JSON
53
-
54
- class Layer {
55
- /**
56
- * @param {string} name
57
- * @param {{ start?: number, end?: number }} opts
58
- * start time (s) when this shot begins (default 0 = whole film)
59
- * end time (s) when this shot ends (default REEL.duration)
60
- */
61
- constructor(name, opts = {}) {
62
- this.name = name;
63
- this.start = opts.start ?? 0;
64
- this.end = opts.end ?? null; // null = REEL.duration (resolved at tick time)
65
- this.el = document.createElement('div');
66
- this.el.dataset.layer = name;
67
- document.getElementById('stage').appendChild(this.el);
68
- _layers.push(this);
69
- }
70
-
71
- /**
72
- * Register per-frame compute function.
73
- * fn(t, lt, dur) → style object
74
- * t = absolute video time (seconds)
75
- * lt = local time inside this shot (t - start)
76
- * dur = shot duration (end - start)
77
- */
78
- on(fn) {
79
- this._compute = fn;
80
- return this;
81
- }
82
-
83
- _tick(t) {
84
- if (!this._compute) return;
85
- const end = this.end ?? REEL.duration;
86
- const dur = end - this.start;
87
- const lt = t - this.start;
88
- const styles = this._compute(t, lt, dur);
89
- if (!styles) return;
90
- Object.assign(this.el.style, _stylesToCSS(styles));
91
- }
92
- }
93
-
94
- /**
95
- * Declare a named layer.
96
- * @param {string} name
97
- * @param {{ start?: number, end?: number }} opts Shot window (optional)
98
- * @returns {Layer}
99
- */
100
- export function layer(name, opts = {}) {
101
- const existing = _layers.find(l => l.name === name);
102
- if (existing) return existing;
103
- return new Layer(name, opts);
104
- }
105
-
106
- // ── at() / stagger() — timed element placement ───────────────────────────────
107
-
108
- /**
109
- * Place an element at time t. The element is removed after `duration` seconds.
110
- * @param {number} t Start time in seconds
111
- * @param {HTMLElement} el Element to mount
112
- */
113
- export function at(t, el) {
114
- if (!el || !(el instanceof HTMLElement)) return;
115
- document.getElementById('stage').appendChild(el);
116
- el.style.display = 'none';
117
- _atElements.push({ t, el, duration: el._duration ?? Infinity });
118
- }
119
-
120
- /**
121
- * Place elements with a stagger offset.
122
- * @param {number} t Start time for first element
123
- * @param {number} dt Delay between each element (seconds)
124
- * @param {HTMLElement[]} els Elements to mount
125
- * @returns {{ t: number, element: HTMLElement }[]} timing entries (useful in tests)
126
- */
127
- export function stagger(t, dt, els) {
128
- const result = [];
129
- els.forEach((el, i) => {
130
- const ti = t + i * dt;
131
- result.push({ t: ti, element: el });
132
- if (el instanceof HTMLElement) at(ti, el);
133
- });
134
- return result;
135
- }
136
-
137
- // ── Camera choreography (feitangyuan/onetake) ────────────────────────────────
138
-
139
- let _cameraWaypoints = [];
140
- let _cameraTarget = '#stage';
141
- let _cameraOpts = {};
142
-
143
- /**
144
- * cameraPath() — Choreograph continuous single-shot camera motion across waypoints.
145
- * Compatible with feitangyuan/onetake.
146
- *
147
- * @param {Array<[number, { x?: number, y?: number, zoom?: number, rotate?: number }]>} waypoints
148
- * @param {object} [opts]
149
- * @param {HTMLElement|string} [opts.target='#stage'] Stage element to transform
150
- * @param {function} [opts.easing]
151
- */
152
- export function cameraPath(waypoints = [], opts = {}) {
153
- _cameraWaypoints = [...waypoints].sort((a, b) => a[0] - b[0]);
154
- _cameraTarget = opts.target || '#stage';
155
- _cameraOpts = opts;
156
- }
157
-
158
- function _tickCamera(t) {
159
- if (_cameraWaypoints.length === 0) return;
160
- const stage = typeof _cameraTarget === 'string'
161
- ? (typeof document !== 'undefined' ? document.querySelector(_cameraTarget) : null)
162
- : _cameraTarget;
163
- if (!stage) return;
164
-
165
- const wp = _cameraWaypoints;
166
- let cam = { x: 0, y: 0, zoom: 1.0, rotate: 0 };
167
-
168
- if (t <= wp[0][0]) {
169
- cam = { ...cam, ...wp[0][1] };
170
- } else if (t >= wp[wp.length - 1][0]) {
171
- cam = { ...cam, ...wp[wp.length - 1][1] };
172
- } else {
173
- for (let i = 1; i < wp.length; i++) {
174
- if (t <= wp[i][0]) {
175
- const [t0, c0] = wp[i - 1];
176
- const [t1, c1] = wp[i];
177
- const p = Math.max(0, Math.min(1, (t - t0) / (t1 - t0)));
178
- const ease = _cameraOpts.easing || easeInOut;
179
- const ep = ease(p);
180
-
181
- const x0 = c0.x ?? 0, x1 = c1.x ?? 0;
182
- const y0 = c0.y ?? 0, y1 = c1.y ?? 0;
183
- const z0 = c0.zoom ?? 1, z1 = c1.zoom ?? 1;
184
- const r0 = c0.rotate ?? 0, r1 = c1.rotate ?? 0;
185
-
186
- cam.x = x0 + (x1 - x0) * ep;
187
- cam.y = y0 + (y1 - y0) * ep;
188
- cam.zoom = z0 + (z1 - z0) * ep;
189
- cam.rotate = r0 + (r1 - r0) * ep;
190
- break;
191
- }
192
- }
193
- }
194
-
195
- stage.style.transform = `translate(${-cam.x}px, ${-cam.y}px) scale(${cam.zoom}) rotate(${cam.rotate}deg)`;
196
- stage.style.transformOrigin = 'center center';
197
- }
198
-
199
- /**
200
- * cameraShake() — Organic continuous handheld camera noise offset.
201
- *
202
- * @param {number} t Time in seconds
203
- * @param {{ intensity?: number, speed?: number, seed?: string }} [opts]
204
- * @returns {{ x: number, y: number, rotate: number }}
205
- */
206
- export function cameraShake(t, { intensity = 6, speed = 2.5, seed = 'cam-shake' } = {}) {
207
- const x = noise2D(seed + '_x', t * speed, 0) * intensity;
208
- const y = noise2D(seed + '_y', 0, t * speed) * (intensity * 0.75);
209
- const rotate = noise2D(seed + '_r', t * (speed * 0.6), 10) * (intensity * 0.08);
210
- return { x, y, rotate };
211
- }
212
-
213
- // ── seek(t) — the clock interface ─────────────────────────────────────────────
214
-
215
- /**
216
- * Advance the compositor to time t (seconds).
217
- * Called by render.mjs for every frame.
218
- */
219
- export function seek(t) {
220
- // 1. Tick all procedural layers
221
- for (const l of _layers) l._tick(t);
222
-
223
- // 2. Show/hide timed elements
224
- for (const entry of _atElements) {
225
- const visible = t >= entry.t && t < entry.t + entry.duration;
226
- entry.el.style.display = visible ? '' : 'none';
227
- if (visible && entry.el._seekFn) entry.el._seekFn(t - entry.t);
228
- }
229
-
230
- // 3. Declarative HyperFrames-style clips (<div class="clip" data-start="1.5" data-duration="3.0">)
231
- if (typeof document !== 'undefined') {
232
- const clips = document.querySelectorAll('.clip[data-start]');
233
- for (let i = 0; i < clips.length; i++) {
234
- const el = clips[i];
235
- const start = parseFloat(el.getAttribute('data-start') || '0');
236
- const dur = parseFloat(el.getAttribute('data-duration') || 'Infinity');
237
- const visible = t >= start && t < start + dur;
238
- el.style.display = visible ? '' : 'none';
239
- if (visible) {
240
- const lt = t - start;
241
- const progress = dur > 0 && isFinite(dur) ? Math.max(0, Math.min(1, lt / dur)) : 0;
242
- el.style.setProperty('--lt', `${lt.toFixed(3)}s`);
243
- el.style.setProperty('--progress', progress.toFixed(4));
244
- el.setAttribute('data-lt', lt.toFixed(3));
245
- el.setAttribute('data-progress', progress.toFixed(4));
246
- }
247
- }
248
- }
249
-
250
- // 4. OneTake Continuous Camera Path
251
- if (_cameraWaypoints.length > 0) {
252
- _tickCamera(t);
253
- }
254
-
255
- // 5. Live captions
256
- if (_captionData) _tickCaptions(t);
257
- }
258
-
259
- // Expose globally for the virtual-clock renderer.
260
- // Also set window.__seek and window.renderFrame so that the virtual-clock
261
- // shim (injected as an initScript before the module loads) delegates to the
262
- // engine's seek() regardless of which alias the render script calls.
263
- window.seek = seek;
264
- window.__seek = (t) => seek(t); // render.mjs calls __seek(t)
265
- window.renderFrame = (t) => seek(t); // virtual-clock.js's seek() calls renderFrame
266
-
267
- // ── Math utilities ────────────────────────────────────────────────────────────
268
-
269
- /**
270
- * hash(i) — Deterministic pseudo-random number in [0, 1) for index i.
271
- *
272
- * Use this INSTEAD OF Math.random() for anything that must stay reproducible
273
- * across parallel frame workers (star positions, brush seeds, particle jitter).
274
- *
275
- * For "boil" wobble (hand-drawn animation feel), reseed 12 times per second:
276
- * const wobble = hash(i + Math.floor(t * 12));
277
- *
278
- * Determinism law: seed all stochastic operations.
279
- *
280
- * @param {number} i Integer seed (particle index, frame seed, etc.)
281
- * @returns {number} Deterministic float in [0, 1)
282
- */
283
- export function hash(i) {
284
- let x = Math.sin(i + 1) * 43758.5453123;
285
- return x - Math.floor(x);
286
- }
287
-
288
- /**
289
- * hash2(i, j) — Two-dimensional hash for (col, row) grid seeds, etc.
290
- * @returns {number} Deterministic float in [0, 1)
291
- */
292
- export function hash2(i, j) {
293
- return hash(i * 1000 + j);
294
- }
295
-
296
- /** Linear interpolation from a to b over [t0, t1], clamped at boundaries. */
297
- export function lerp(t, a, b, t0 = 0, t1 = 1) {
298
- if (t <= t0) return a;
299
- if (t >= t1) return b;
300
- const p = (t - t0) / (t1 - t0);
301
- return a + (b - a) * p;
302
- }
303
-
304
- /** Ease-in (quadratic). Input 0–1, output 0–1. */
305
- export function easeIn(t) {
306
- const p = Math.max(0, Math.min(1, t));
307
- return p * p;
308
- }
309
-
310
- /** Ease-out (quadratic). Input 0–1, output 0–1. */
311
- export function easeOut(t) {
312
- const p = Math.max(0, Math.min(1, t));
313
- return 1 - (1 - p) * (1 - p);
314
- }
315
-
316
- /** Ease-in-out (quadratic). Input 0–1, output 0–1. */
317
- export function easeInOut(t) {
318
- const p = Math.max(0, Math.min(1, t));
319
- return p < 0.5 ? 2 * p * p : 1 - Math.pow(-2 * p + 2, 2) / 2;
320
- }
321
-
322
- /**
323
- * Spring physics. Returns value 0→1 (may briefly exceed 1 when underdamped).
324
- * @param {number} t Current time in seconds
325
- * @param {{ tension, friction, delay }} opts
326
- */
327
- export function spring(t, { tension = 200, friction = 22, delay = 0 } = {}) {
328
- const dt = t - delay;
329
- if (dt <= 0) return 0;
330
- const omega = Math.sqrt(tension);
331
- const zeta = friction / (2 * omega);
332
-
333
- if (zeta >= 1) {
334
- // Overdamped or critically damped — no overshoot
335
- const r1 = -omega * (zeta - Math.sqrt(zeta * zeta - 1));
336
- const r2 = -omega * (zeta + Math.sqrt(zeta * zeta - 1));
337
- const c2 = r1 / (r1 - r2);
338
- const c1 = 1 - c2;
339
- return 1 - c1 * Math.exp(r1 * dt) - c2 * Math.exp(r2 * dt);
340
- }
341
-
342
- // Underdamped — oscillates toward 1
343
- const omegaD = omega * Math.sqrt(1 - zeta * zeta);
344
- return 1 - Math.exp(-zeta * omega * dt) * (
345
- Math.cos(omegaD * dt) + (zeta / Math.sqrt(1 - zeta * zeta)) * Math.sin(omegaD * dt)
346
- );
347
- }
348
-
349
- /**
350
- * measureSpring() — Calculates analytical settling time for a spring configuration.
351
- * Derived from Remotion's measureSpring.
352
- *
353
- * @param {{ tension?: number, friction?: number, threshold?: number }} [opts]
354
- * @returns {number} Settling duration in seconds
355
- */
356
- export function measureSpring({ tension = 200, friction = 22, threshold = 0.001 } = {}) {
357
- const omega = Math.sqrt(tension);
358
- const zeta = friction / (2 * omega);
359
- if (zeta < 1) {
360
- return -Math.log(threshold) / (zeta * omega);
361
- } else {
362
- const r1 = -omega * (zeta - Math.sqrt(zeta * zeta - 1));
363
- return -Math.log(threshold) / Math.abs(r1);
364
- }
365
- }
366
-
367
- /**
368
- * interpolate() — Multi-range value mapping with clamp and easing options.
369
- * Drop-in Remotion-compatible interpolation interface.
370
- *
371
- * @param {number} val
372
- * @param {number[]} inputRange
373
- * @param {number[]} outputRange
374
- * @param {object} [opts]
375
- * @param {'clamp'|'identity'|'extend'} [opts.extrapolateLeft='clamp']
376
- * @param {'clamp'|'identity'|'extend'} [opts.extrapolateRight='clamp']
377
- * @param {function} [opts.easing]
378
- * @returns {number}
379
- */
380
- export function interpolate(val, inputRange, outputRange, opts = {}) {
381
- const {
382
- extrapolateLeft = 'clamp',
383
- extrapolateRight = 'clamp',
384
- easing = (x) => x,
385
- } = opts;
386
-
387
- if (!inputRange || !outputRange || inputRange.length < 2 || inputRange.length !== outputRange.length) {
388
- throw new Error('interpolate: inputRange and outputRange must have the same length >= 2');
389
- }
390
-
391
- if (val <= inputRange[0]) {
392
- if (extrapolateLeft === 'clamp') return outputRange[0];
393
- if (extrapolateLeft === 'identity') return val;
394
- }
395
-
396
- if (val >= inputRange[inputRange.length - 1]) {
397
- if (extrapolateRight === 'clamp') return outputRange[outputRange.length - 1];
398
- if (extrapolateRight === 'identity') return val;
399
- }
400
-
401
- for (let i = 1; i < inputRange.length; i++) {
402
- if (val <= inputRange[i]) {
403
- const t0 = inputRange[i - 1];
404
- const t1 = inputRange[i];
405
- const v0 = outputRange[i - 1];
406
- const v1 = outputRange[i];
407
- const p = (val - t0) / (t1 - t0);
408
- return v0 + (v1 - v0) * easing(p);
409
- }
410
- }
411
-
412
- return outputRange[outputRange.length - 1];
413
- }
414
-
415
- /**
416
- * sequence() — Temporal windowing wrapper for isolated layer computations.
417
- * Maps local relative time `tRel = t - from` to children styles.
418
- *
419
- * @param {number} from - Start time in seconds
420
- * @param {number} duration - Window duration in seconds
421
- * @param {function} fn - (relTime, duration, absTime) => styleObject
422
- */
423
- export function sequence(from, duration, fn) {
424
- return (t) => {
425
- if (t < from || t >= from + duration) return null;
426
- return fn(t - from, duration, t);
427
- };
428
- }
429
-
430
- /**
431
- * Easing dictionary matching standard Remotion & CSS curves.
432
- */
433
- export const Easing = {
434
- linear: (t) => t,
435
- in: easeIn,
436
- out: easeOut,
437
- inOut: easeInOut,
438
- quad: (t) => t * t,
439
- cubic: (t) => t * t * t,
440
- bezier: (mX1, mY1, mX2, mY2) => {
441
- return (t) => {
442
- const u = 1 - t;
443
- return 3 * u * u * t * mY1 + 3 * u * t * t * mY2 + t * t * t;
444
- };
445
- },
446
- };
447
-
448
- // ── Remotion-compatible Color Interpolation ───────────────────────────────────
449
-
450
- function _parseColor(str) {
451
- if (typeof str !== 'string') return { r: 0, g: 0, b: 0, a: 1 };
452
- str = str.trim().toLowerCase();
453
- if (str.startsWith('#')) {
454
- const hex = str.slice(1);
455
- if (hex.length === 3 || hex.length === 4) {
456
- const r = parseInt(hex[0] + hex[0], 16);
457
- const g = parseInt(hex[1] + hex[1], 16);
458
- const b = parseInt(hex[2] + hex[2], 16);
459
- const a = hex.length === 4 ? parseInt(hex[3] + hex[3], 16) / 255 : 1;
460
- return { r, g, b, a };
461
- }
462
- if (hex.length === 6 || hex.length === 8) {
463
- const r = parseInt(hex.slice(0, 2), 16);
464
- const g = parseInt(hex.slice(2, 4), 16);
465
- const b = parseInt(hex.slice(4, 6), 16);
466
- const a = hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1;
467
- return { r, g, b, a };
468
- }
469
- }
470
- const rgbMatch = str.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)/);
471
- if (rgbMatch) {
472
- return {
473
- r: parseInt(rgbMatch[1], 10),
474
- g: parseInt(rgbMatch[2], 10),
475
- b: parseInt(rgbMatch[3], 10),
476
- a: rgbMatch[4] !== undefined ? parseFloat(rgbMatch[4]) : 1
477
- };
478
- }
479
- return { r: 0, g: 0, b: 0, a: 1 };
480
- }
481
-
482
- /**
483
- * interpolateColors() — Perceptually uniform gamma-corrected color interpolation.
484
- * Drop-in Remotion-compatible interpolateColors.
485
- *
486
- * @param {number} val
487
- * @param {number[]} inputRange
488
- * @param {string[]} outputColors
489
- * @param {object} [opts]
490
- * @param {'clamp'|'identity'} [opts.extrapolateLeft='clamp']
491
- * @param {'clamp'|'identity'} [opts.extrapolateRight='clamp']
492
- * @param {function} [opts.easing]
493
- * @param {number} [opts.gamma=2.2]
494
- * @returns {string} Hex color (#rrggbb) or rgba(...)
495
- */
496
- export function interpolateColors(val, inputRange, outputColors, opts = {}) {
497
- const { extrapolateLeft = 'clamp', extrapolateRight = 'clamp', easing = (x) => x, gamma = 2.2 } = opts;
498
- if (!inputRange || !outputColors || inputRange.length < 2 || inputRange.length !== outputColors.length) {
499
- throw new Error('interpolateColors: inputRange and outputColors must have same length >= 2');
500
- }
501
-
502
- const parsed = outputColors.map(_parseColor);
503
-
504
- let p = 0;
505
- let c0 = parsed[0];
506
- let c1 = parsed[1];
507
-
508
- if (val <= inputRange[0]) {
509
- if (extrapolateLeft === 'clamp') return outputColors[0];
510
- p = 0;
511
- c0 = parsed[0];
512
- c1 = parsed[1];
513
- } else if (val >= inputRange[inputRange.length - 1]) {
514
- if (extrapolateRight === 'clamp') return outputColors[outputColors.length - 1];
515
- p = 1;
516
- c0 = parsed[parsed.length - 2];
517
- c1 = parsed[parsed.length - 1];
518
- } else {
519
- for (let i = 1; i < inputRange.length; i++) {
520
- if (val <= inputRange[i]) {
521
- const t0 = inputRange[i - 1];
522
- const t1 = inputRange[i];
523
- c0 = parsed[i - 1];
524
- c1 = parsed[i];
525
- p = (val - t0) / (t1 - t0);
526
- break;
527
- }
528
- }
529
- }
530
-
531
- const ep = Math.max(0, Math.min(1, easing(p)));
532
- const r0 = Math.pow(c0.r / 255, gamma);
533
- const g0 = Math.pow(c0.g / 255, gamma);
534
- const b0 = Math.pow(c0.b / 255, gamma);
535
- const r1 = Math.pow(c1.r / 255, gamma);
536
- const g1 = Math.pow(c1.g / 255, gamma);
537
- const b1 = Math.pow(c1.b / 255, gamma);
538
-
539
- const r = Math.round(Math.pow(r0 + (r1 - r0) * ep, 1 / gamma) * 255);
540
- const g = Math.round(Math.pow(g0 + (g1 - g0) * ep, 1 / gamma) * 255);
541
- const b = Math.round(Math.pow(b0 + (b1 - b0) * ep, 1 / gamma) * 255);
542
- const a = Math.round((c0.a + (c1.a - c0.a) * ep) * 1000) / 1000;
543
-
544
- if (a >= 0.999) {
545
- const toHex = (n) => n.toString(16).padStart(2, '0');
546
- return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
547
- }
548
- return `rgba(${r}, ${g}, ${b}, ${a})`;
549
- }
550
-
551
- // ── Remotion-compatible Deterministic Noise (@remotion/noise) ───────────────────
552
-
553
- function _createNoisePrng(seed) {
554
- let s = 0;
555
- if (typeof seed === 'string') {
556
- for (let i = 0; i < seed.length; i++) {
557
- s = (s * 31 + seed.charCodeAt(i)) | 0;
558
- }
559
- } else {
560
- s = (seed || 0) | 0;
561
- }
562
- return () => {
563
- s = (s + 0x6D2B79F5) | 0;
564
- let t = Math.imul(s ^ (s >>> 15), 1 | s);
565
- t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
566
- return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
567
- };
568
- }
569
-
570
- const _noisePermCache = new Map();
571
- function _getPermutationTable(seed) {
572
- const seedKey = String(seed);
573
- if (_noisePermCache.has(seedKey)) return _noisePermCache.get(seedKey);
574
- const prng = _createNoisePrng(seed);
575
- const p = new Uint8Array(256);
576
- for (let i = 0; i < 256; i++) p[i] = i;
577
- for (let i = 255; i > 0; i--) {
578
- const j = Math.floor(prng() * (i + 1));
579
- const tmp = p[i];
580
- p[i] = p[j];
581
- p[j] = tmp;
582
- }
583
- const perm = new Uint8Array(512);
584
- for (let i = 0; i < 512; i++) perm[i] = p[i & 255];
585
- _noisePermCache.set(seedKey, perm);
586
- return perm;
587
- }
588
-
589
- const _F2 = 0.5 * (Math.sqrt(3.0) - 1.0);
590
- const _G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
591
-
592
- /**
593
- * noise2D() — Deterministic 2D Simplex noise in range [-1, 1].
594
- * Compatible with @remotion/noise.
595
- *
596
- * @param {string|number} seed
597
- * @param {number} x
598
- * @param {number} y
599
- * @returns {number} Float in range [-1, 1]
600
- */
601
- export function noise2D(seed, x, y) {
602
- const perm = _getPermutationTable(seed);
603
- let n0, n1, n2;
604
- const s = (x + y) * _F2;
605
- const i = Math.floor(x + s);
606
- const j = Math.floor(y + s);
607
- const t = (i + j) * _G2;
608
- const X0 = i - t;
609
- const Y0 = j - t;
610
- const x0 = x - X0;
611
- const y0 = y - Y0;
612
-
613
- let i1, j1;
614
- if (x0 > y0) { i1 = 1; j1 = 0; }
615
- else { i1 = 0; j1 = 1; }
616
-
617
- const x1 = x0 - i1 + _G2;
618
- const y1 = y0 - j1 + _G2;
619
- const x2 = x0 - 1.0 + 2.0 * _G2;
620
- const y2 = y0 - 1.0 + 2.0 * _G2;
621
-
622
- const ii = i & 255;
623
- const jj = j & 255;
624
-
625
- const grad = (hash, gx, gy) => {
626
- const h = hash & 7;
627
- const u = h < 4 ? gx : gy;
628
- const v = h < 4 ? gy : gx;
629
- return ((h & 1) ? -u : u) + ((h & 2) ? -2.0 * v : 2.0 * v);
630
- };
631
-
632
- let t0 = 0.5 - x0 * x0 - y0 * y0;
633
- if (t0 < 0) n0 = 0.0;
634
- else {
635
- t0 *= t0;
636
- n0 = t0 * t0 * grad(perm[ii + perm[jj]], x0, y0);
637
- }
638
-
639
- let t1 = 0.5 - x1 * x1 - y1 * y1;
640
- if (t1 < 0) n1 = 0.0;
641
- else {
642
- t1 *= t1;
643
- n1 = t1 * t1 * grad(perm[ii + i1 + perm[jj + j1]], x1, y1);
644
- }
645
-
646
- let t2 = 0.5 - x2 * x2 - y2 * y2;
647
- if (t2 < 0) n2 = 0.0;
648
- else {
649
- t2 *= t2;
650
- n2 = t2 * t2 * grad(perm[ii + 1 + perm[jj + 1]], x2, y2);
651
- }
652
-
653
- return 70.0 * (n0 + n1 + n2);
654
- }
655
-
656
- function _fade(t) { return t * t * t * (t * (t * 6 - 15) + 10); }
657
- function _grad3(hash, x, y, z) {
658
- const h = hash & 15;
659
- const u = h < 8 ? x : y;
660
- const v = h < 4 ? y : (h === 12 || h === 14 ? x : z);
661
- return ((h & 1) ? -u : u) + ((h & 2) ? -v : v);
662
- }
663
-
664
- /**
665
- * noise3D() — Deterministic 3D Perlin noise in range [-1, 1].
666
- * Compatible with @remotion/noise.
667
- *
668
- * @param {string|number} seed
669
- * @param {number} x
670
- * @param {number} y
671
- * @param {number} z
672
- * @returns {number} Float in range [-1, 1]
673
- */
674
- export function noise3D(seed, x, y, z) {
675
- const perm = _getPermutationTable(seed);
676
- const X = Math.floor(x) & 255;
677
- const Y = Math.floor(y) & 255;
678
- const Z = Math.floor(z) & 255;
679
-
680
- x -= Math.floor(x);
681
- y -= Math.floor(y);
682
- z -= Math.floor(z);
683
-
684
- const u = _fade(x);
685
- const v = _fade(y);
686
- const w = _fade(z);
687
-
688
- const A = perm[X] + Y;
689
- const AA = perm[A] + Z;
690
- const AB = perm[A + 1] + Z;
691
- const B = perm[X + 1] + Y;
692
- const BA = perm[B] + Z;
693
- const BB = perm[B + 1] + Z;
694
-
695
- const lerp = (t, a, b) => a + t * (b - a);
696
-
697
- return lerp(w,
698
- lerp(v,
699
- lerp(u, _grad3(perm[AA], x, y, z), _grad3(perm[BA], x - 1, y, z)),
700
- lerp(u, _grad3(perm[AB], x, y - 1, z), _grad3(perm[BB], x - 1, y - 1, z))
701
- ),
702
- lerp(v,
703
- lerp(u, _grad3(perm[AA + 1], x, y, z - 1), _grad3(perm[BA + 1], x - 1, y, z - 1)),
704
- lerp(u, _grad3(perm[AB + 1], x, y - 1, z - 1), _grad3(perm[BB + 1], x - 1, y - 1, z - 1))
705
- )
706
- );
707
- }
708
-
709
- // ── Remotion-compatible SVG Path Animation (@remotion/paths) ───────────────────
710
-
711
- /**
712
- * evolvePath() — Generates SVG stroke-dasharray and stroke-dashoffset for path reveal.
713
- * Compatible with @remotion/paths evolvePath.
714
- *
715
- * @param {number} progress Float 0..1
716
- * @param {number} pathLength Total length of SVG path
717
- * @returns {{ strokeDasharray: string, strokeDashoffset: string }}
718
- */
719
- export function evolvePath(progress, pathLength) {
720
- const p = Math.max(0, Math.min(1, progress));
721
- const len = Math.max(0, pathLength);
722
- return {
723
- strokeDasharray: `${len} ${len}`,
724
- strokeDashoffset: `${(1 - p) * len}`,
725
- };
726
- }
727
-
728
- // ── HyperFrames Beat-Grid ──────────────────────────────────────────────────────
729
- // Ref: heygen-com/hyperframes motion.md — beat formula: fps * 60 / BPM
730
- // Beat frames are computed independently per index (not accumulated) to prevent
731
- // drift. Never compute: frameN = frameN-1 + beatFrames (accumulated rounding error).
732
-
733
- /**
734
- * beatAt(index, bpm, fps) — Returns the exact frame number for beat `index`.
735
- *
736
- * HyperFrames formula: each beat frame = round(index * fps * 60 / bpm)
737
- * Round each index independently — NEVER accumulate rounding.
738
- *
739
- * @param {number} index Beat index (0-based)
740
- * @param {number} bpm Tempo in beats per minute
741
- * @param {number} fps Frame rate (use REEL.fps)
742
- * @returns {number} Integer frame number
743
- */
744
- export function beatAt(index, bpm, fps) {
745
- if (bpm <= 0 || fps <= 0) return 0;
746
- return Math.round(index * fps * 60 / bpm);
747
- }
748
-
749
- /**
750
- * beatTime(index, bpm) — Returns the exact timestamp in seconds for beat `index`.
751
- * Equivalent to beatAt(index, bpm, fps) / fps but avoids the fps parameter.
752
- *
753
- * @param {number} index Beat index (0-based)
754
- * @param {number} bpm Tempo in beats per minute
755
- * @returns {number} Timestamp in seconds
756
- */
757
- export function beatTime(index, bpm) {
758
- if (bpm <= 0) return 0;
759
- return index * 60 / bpm;
760
- }
761
-
762
- /**
763
- * snapToBeat(t, bpm) — Snaps a timestamp to the nearest beat boundary.
764
- * Use for aligning cut points and SFX cues to music grid.
765
- *
766
- * @param {number} t Timestamp in seconds
767
- * @param {number} bpm Tempo in beats per minute
768
- * @returns {number} Nearest beat timestamp
769
- */
770
- export function snapToBeat(t, bpm) {
771
- if (bpm <= 0) return t;
772
- const beatDur = 60 / bpm;
773
- return Math.round(t / beatDur) * beatDur;
774
- }
775
-
776
- // ── OneTake OM Motion Library (39 moves) ──────────────────────────────────────
777
- // Ref: feitangyuan/onetake — full 39-move library from OneTake SKILL.md
778
- // Each move is a pure function: (t, opts) → CSS style object.
779
- // t is normalised 0→1 progress within the move (feed with seg()).
780
- //
781
- // Rhythm oracle: a move FAILS if carry_score < 0.5 (next shot can't inherit momentum).
782
- // Hard rules from OneTake (each traces to a rejected film):
783
- // 1. Never reverse direction in carry window (0.8–1.0)
784
- // 2. Peak velocity at 0.35–0.55 range only
785
- // 3. SFX must arrive before peak velocity (40ms lead)
786
- // 4. Exits faster than entrances: exit_dur < entrance_dur
787
- // 5. Never two consecutive identical moves
788
- // 6. Ground every move in a 5-material room SFX (air/wood/glass/sub/bubble)
789
-
790
- /**
791
- * OM — OneTake Motion primitives. Pure functions, (t, opts) → CSS style object.
792
- * t = normalised progress 0→1.
793
- *
794
- * Usage example:
795
- * layer('hero').on((t) => {
796
- * const p = seg(t, 0.5, 1.5); // 0→1 over 0.5–1.5s
797
- * Object.assign(el.style, OM.spring(p));
798
- * });
799
- */
800
- export const OM = {
801
-
802
- // ── Entrances ──────────────────────────────────────────────────────────────
803
-
804
- /** Spring reveal — expo overshoot arrival. Standard entrance. */
805
- spring: (t, { scale0 = 0.6, scale1 = 1.0, opacity0 = 0, opacity1 = 1 } = {}) => {
806
- const s = spring(t, { tension: 180, friction: 18 });
807
- const sc = scale0 + (scale1 - scale0) * s;
808
- const op = Math.max(0, Math.min(1, opacity0 + (opacity1 - opacity0) * easeOut(t)));
809
- return { transform: `scale(${sc})`, opacity: op };
810
- },
811
-
812
- /** Rise + fade — element translates up from below while fading in. */
813
- rise: (t, { dist = 60, opacity0 = 0 } = {}) => {
814
- const p = easeOut(Math.max(0, Math.min(1, t)));
815
- return {
816
- transform: `translateY(${(1 - p) * dist}px)`,
817
- opacity: opacity0 + (1 - opacity0) * p,
818
- };
819
- },
820
-
821
- /** Iris open — radial clip-path expand from centre. */
822
- iris: (t, { cx = '50%', cy = '50%' } = {}) => {
823
- const p = easeOut(Math.max(0, Math.min(1, t)));
824
- const r = p * 141; // 141% covers full diagonal at 100×100
825
- return { clipPath: `circle(${r}% at ${cx} ${cy})` };
826
- },
827
-
828
- /** Iris close — radial clip-path contract to centre. */
829
- irisClose: (t, { cx = '50%', cy = '50%' } = {}) => {
830
- const p = easeIn(Math.max(0, Math.min(1, t)));
831
- const r = (1 - p) * 141;
832
- return { clipPath: `circle(${r}% at ${cx} ${cy})` };
833
- },
834
-
835
- /** Zoom through — scale past 1 to create a portal / push-through. */
836
- zoomThrough: (t, { from = 0.8, through = 1.15, to = 1.0 } = {}) => {
837
- let sc;
838
- if (t < 0.5) {
839
- sc = from + (through - from) * easeIn(t * 2);
840
- } else {
841
- sc = through + (to - through) * easeOut((t - 0.5) * 2);
842
- }
843
- return { transform: `scale(${sc})` };
844
- },
845
-
846
- /** Morph rect — clip-path from a narrow rect to full frame. */
847
- morphRect: (t, { axis = 'y' } = {}) => {
848
- const p = easeInOut(Math.max(0, Math.min(1, t)));
849
- if (axis === 'x') {
850
- const w = p * 100;
851
- return { clipPath: `inset(0 ${(100 - w) / 2}% 0 ${(100 - w) / 2}%)` };
852
- }
853
- const h = p * 100;
854
- return { clipPath: `inset(${(100 - h) / 2}% 0 ${(100 - h) / 2}% 0)` };
855
- },
856
-
857
- /** Silk — wave-shaped clip-path entrance (curtain pull). */
858
- silk: (t, { direction = 'left' } = {}) => {
859
- const p = easeOut(Math.max(0, Math.min(1, t)));
860
- const inv = (1 - p) * 110;
861
- switch (direction) {
862
- case 'right': return { clipPath: `inset(0 0 0 ${inv}%)` };
863
- case 'top': return { clipPath: `inset(0 0 ${inv}% 0)` };
864
- case 'bottom': return { clipPath: `inset(${inv}% 0 0 0)` };
865
- case 'left':
866
- default: return { clipPath: `inset(0 ${inv}% 0 0)` };
867
- }
868
- },
869
-
870
- /** Belt — horizontal strip sequence reveal (ticker / film-strip). */
871
- belt: (t, { strips = 6, direction = 'left' } = {}) => {
872
- const p = Math.max(0, Math.min(1, t));
873
- const stripH = 100 / strips;
874
- const masks = Array.from({ length: strips }, (_, i) => {
875
- const delay = i / strips * 0.4;
876
- const sp = Math.max(0, Math.min(1, (p - delay) / (1 - delay)));
877
- const ep = easeOut(sp);
878
- const xOff = direction === 'right' ? (1 - ep) * 110 : -(1 - ep) * 110;
879
- return `translateX(${xOff}px)`;
880
- });
881
- // Return as CSS variable for JS-driven per-strip transforms
882
- return { '--belt-strips': strips, '--belt-p': p, transform: masks[0] };
883
- },
884
-
885
- /** Ripple — radial wave expand, used for touch/click feedback. */
886
- ripple: (t, { cx = '50%', cy = '50%', opacity0 = 0.6 } = {}) => {
887
- const p = easeOut(Math.max(0, Math.min(1, t)));
888
- const r = p * 160;
889
- const op = opacity0 * (1 - p);
890
- return { clipPath: `circle(${r}% at ${cx} ${cy})`, opacity: op };
891
- },
892
-
893
- // ── Odometer / Counter ─────────────────────────────────────────────────────
894
-
895
- /** Odometer digit roll — vertical translate for number columns. */
896
- odometer: (t, { from = 0, to = 9, height = 60 } = {}) => {
897
- const p = spring(t, { tension: 160, friction: 20 });
898
- const digitRange = to - from;
899
- const yOff = -p * digitRange * height;
900
- return { transform: `translateY(${yOff}px)` };
901
- },
902
-
903
- // ── Camera ─────────────────────────────────────────────────────────────────
904
-
905
- /** Camera drift — slow Ken Burns push with noise-based micro-shake. */
906
- camera: (t, {
907
- x0 = 0, y0 = 0, x1 = 20, y1 = -10,
908
- scale0 = 1.0, scale1 = 1.08,
909
- seed = 'cam',
910
- shakeAmp = 2,
911
- shakeFreq = 1.5,
912
- } = {}) => {
913
- const p = easeInOut(Math.max(0, Math.min(1, t)));
914
- const x = x0 + (x1 - x0) * p;
915
- const y = y0 + (y1 - y0) * p;
916
- const sc = scale0 + (scale1 - scale0) * p;
917
- // Micro-shake via noise (Perlin-like via hash)
918
- const nx = (hash(Math.floor(t * shakeFreq * 100) + seed.charCodeAt(0)) - 0.5) * 2 * shakeAmp;
919
- const ny = (hash(Math.floor(t * shakeFreq * 100) + seed.charCodeAt(0) + 1) - 0.5) * 2 * shakeAmp;
920
- return { transform: `translate(${x + nx}px, ${y + ny}px) scale(${sc})` };
921
- },
922
-
923
- /** Handheld — stronger camera shake for vérité/documentary feel. */
924
- handheld: (t, { amp = 6, freq = 8, seed = 'hh' } = {}) => {
925
- const nx = (hash(Math.floor(t * freq * 100) + seed.charCodeAt(0)) - 0.5) * 2 * amp;
926
- const ny = (hash(Math.floor(t * freq * 100) + seed.charCodeAt(0) + 17) - 0.5) * 2 * amp;
927
- const r = (hash(Math.floor(t * freq * 100) + seed.charCodeAt(0) + 31) - 0.5) * amp * 0.1;
928
- return { transform: `translate(${nx}px, ${ny}px) rotate(${r}deg)` };
929
- },
930
-
931
- // ── Exits ──────────────────────────────────────────────────────────────────
932
-
933
- /** Pop out — scale up and fade out. Faster than entrance. */
934
- popOut: (t, { scale1 = 1.0, scale2 = 1.4 } = {}) => {
935
- const p = easeIn(Math.max(0, Math.min(1, t)));
936
- return { transform: `scale(${scale1 + (scale2 - scale1) * p})`, opacity: 1 - p };
937
- },
938
-
939
- /** Drop — fall off screen with gravity ease-in. */
940
- drop: (t, { dist = 120 } = {}) => {
941
- const p = easeIn(Math.max(0, Math.min(1, t)));
942
- return { transform: `translateY(${p * dist}px)`, opacity: 1 - p * 0.7 };
943
- },
944
-
945
- /** Implode — invert of iris, collapse to point. */
946
- implode: (t, { cx = '50%', cy = '50%' } = {}) => {
947
- const p = easeIn(Math.max(0, Math.min(1, t)));
948
- const r = (1 - p) * 141;
949
- return { clipPath: `circle(${r}% at ${cx} ${cy})`, opacity: 1 - p * 0.5 };
950
- },
951
-
952
- /** Slide exit — translate off canvas. */
953
- slideExit: (t, { direction = 'left', dist = 110 } = {}) => {
954
- const p = easeIn(Math.max(0, Math.min(1, t)));
955
- switch (direction) {
956
- case 'right': return { transform: `translateX(${p * dist}%)` };
957
- case 'up': return { transform: `translateY(${-p * dist}%)` };
958
- case 'down': return { transform: `translateY(${p * dist}%)` };
959
- case 'left':
960
- default: return { transform: `translateX(${-p * dist}%)` };
961
- }
962
- },
963
-
964
- // ── Title Patterns (HyperFrames 5 canonical forms) ─────────────────────────
965
-
966
- /** Word by word: stagger letters/words into position with spring. */
967
- wordByWord: (t, { wordIndex = 0, totalWords = 1, delay = 0.08 } = {}) => {
968
- const start = wordIndex * delay;
969
- const p = spring(Math.max(0, t - start), { tension: 220, friction: 20 });
970
- return { transform: `translateY(${(1 - p) * 40}px)`, opacity: p };
971
- },
972
-
973
- /** Scale pop — title scales from oversized down to 1x with expo ease. */
974
- scalePop: (t) => {
975
- const p = easeOut(Math.max(0, Math.min(1, t)));
976
- const sc = 1.6 - 0.6 * p;
977
- return { transform: `scale(${sc})`, opacity: p };
978
- },
979
-
980
- /** Reveal wipe — horizontal clip-path wipe across title text. */
981
- revealWipe: (t, { direction = 'left' } = {}) => {
982
- const p = easeInOut(Math.max(0, Math.min(1, t)));
983
- return direction === 'right'
984
- ? { clipPath: `inset(0 0 0 ${(1 - p) * 100}%)` }
985
- : { clipPath: `inset(0 ${(1 - p) * 100}% 0 0)` };
986
- },
987
-
988
- /** Typewriter — character-by-character clip reveal. */
989
- typewriter: (t, { chars = 20 } = {}) => {
990
- const revealed = Math.floor(Math.max(0, Math.min(1, t)) * chars);
991
- return { '--tw-chars': revealed };
992
- },
993
-
994
- /** Counter flip — odometer-style numeric reveal. */
995
- counterFlip: (t, { from = 0, to = 100, height = 60 } = {}) => {
996
- return OM.odometer(t, { from, to, height });
997
- },
998
-
999
- // ── Ambient / Atmospheric ──────────────────────────────────────────────────
1000
-
1001
- /** Breathe — subtle scale oscillation for idle/ambient state. */
1002
- breathe: (t, { amp = 0.015, freq = 0.4 } = {}) => {
1003
- const sc = 1 + amp * Math.sin(t * freq * Math.PI * 2);
1004
- return { transform: `scale(${sc})` };
1005
- },
1006
-
1007
- /** Float — sinusoidal vertical drift for hovering elements. */
1008
- float: (t, { amp = 8, freq = 0.3 } = {}) => {
1009
- const y = amp * Math.sin(t * freq * Math.PI * 2);
1010
- return { transform: `translateY(${y}px)` };
1011
- },
1012
-
1013
- /** Pulse opacity — rhythmic opacity oscillation for emphasis. */
1014
- pulseOpacity: (t, { lo = 0.7, hi = 1.0, freq = 1.0 } = {}) => {
1015
- const op = lo + (hi - lo) * (0.5 + 0.5 * Math.sin(t * freq * Math.PI * 2));
1016
- return { opacity: op };
1017
- },
1018
-
1019
- // ── Carry (momentum handoff) ───────────────────────────────────────────────
1020
- // Use in carry window t = 0.8–1.0 to measure momentum for rhythm oracle.
1021
- // carry_score = velocity at exit / peak_velocity. Must be >= 0.5 to pass.
1022
-
1023
- /** carry_score(t, move) — Compute momentum at exit for rhythm oracle. */
1024
- carryScore: (t) => {
1025
- // Finite difference approximation of velocity at t = 1.0
1026
- const dt = 0.01;
1027
- const p1 = Math.max(0, Math.min(1, t));
1028
- const p0 = Math.max(0, Math.min(1, t - dt));
1029
- return (easeOut(p1) - easeOut(p0)) / dt;
1030
- },
1031
- };
1032
-
1033
- // ── OneTake 5-Material Room SFX palette ───────────────────────────────────────
1034
- // Ref: feitangyuan/onetake — 5 physical materials, each has a characteristic
1035
- // frequency spectrum and onset. Mix into every scene's sound bed.
1036
- // All at -8 dBFS in the SFX bus (handled by mix_audio_pro sfxVol parameter).
1037
- //
1038
- // Usage: cue('air_whoosh', tStart - 0.04); // 40ms perceptual lead
1039
-
1040
- /** Room SFX material palette (OneTake standard). Key = sfxName for cue(). */
1041
- export const ROOM_SFX = {
1042
- air: { desc: 'Air movement — camera translation, fast wipe', freq: 200, material: 'air', dbfs: -8 },
1043
- wood: { desc: 'Wooden impact — card thud, title punch, beat drop', freq: 80, material: 'wood', dbfs: -8 },
1044
- glass: { desc: 'Glass chime — badge reveal, icon appearance', freq: 1400, material: 'glass', dbfs: -8 },
1045
- sub: { desc: 'Sub rumble — cinematic reveal, depth cue', freq: 35, material: 'sub', dbfs: -8 },
1046
- bubble: { desc: 'Bubble pop — light UI touch, counter tick', freq: 800, material: 'bubble', dbfs: -8 },
1047
- };
1048
-
1049
- // ── window.__events() — Sound-from-Composition Contract ───────────────────────
1050
- // Ref: feitangyuan/onetake — agents read __events() to extract SFX timestamps
1051
- // and types from the animation itself (not hardcoded in edit.json).
1052
- // render.mjs reads window.__events() after page load to build the SFX track.
1053
-
1054
- /** Register a timed composition event (SFX, transition, beat). */
1055
- const _events = [];
1056
-
1057
- /**
1058
- * event(type, t, meta) — Declare a composition event for render.mjs to consume.
1059
- * render.mjs calls window.__events() after page load to extract all cues.
1060
- *
1061
- * @param {'sfx'|'transition'|'beat'|'camera'} type
1062
- * @param {number} t Timestamp in seconds
1063
- * @param {object} meta Additional data (sfxName, material, vol, label, etc.)
1064
- */
1065
- export function event(type, t, meta = {}) {
1066
- _events.push({ type, t, ...meta });
1067
- if (typeof window !== 'undefined') {
1068
- window.__events = () => _events;
1069
- }
1070
- }
1071
-
1072
- // Expose on window immediately so render.mjs can call window.__events() even
1073
- // if the composition hasn't declared any events yet.
1074
- if (typeof window !== 'undefined') {
1075
- window.__events = () => _events;
1076
- }
1077
-
1078
- // ── Remotion-compatible Transition Presets (@remotion/transitions) ─────────────
1079
-
1080
- /**
1081
- * transition — Pure functional CSS style generators for scene/shot transitions.
1082
- * Equivalent to @remotion/transitions presentations.
1083
- */
1084
- export const transition = {
1085
- fade: (p) => ({ opacity: Math.max(0, Math.min(1, p)) }),
1086
- slide: (p, { direction = 'from-left' } = {}) => {
1087
- const cp = Math.max(0, Math.min(1, p));
1088
- const inv = (1 - cp) * 100;
1089
- switch (direction) {
1090
- case 'from-right': return { transform: `translateX(${inv}%)` };
1091
- case 'from-top': return { transform: `translateY(${-inv}%)` };
1092
- case 'from-bottom': return { transform: `translateY(${inv}%)` };
1093
- case 'from-left':
1094
- default: return { transform: `translateX(${-inv}%)` };
1095
- }
1096
- },
1097
- wipe: (p, { direction = 'from-left' } = {}) => {
1098
- const cp = Math.max(0, Math.min(1, p));
1099
- const inv = (1 - cp) * 100;
1100
- switch (direction) {
1101
- case 'from-right': return { clipPath: `inset(0 0 0 ${inv}%)` };
1102
- case 'from-top': return { clipPath: `inset(0 0 ${inv}% 0)` };
1103
- case 'from-bottom': return { clipPath: `inset(${inv}% 0 0 0)` };
1104
- case 'from-left':
1105
- default: return { clipPath: `inset(0 ${inv}% 0 0)` };
1106
- }
1107
- },
1108
- flip: (p, { axis = 'y' } = {}) => {
1109
- const cp = Math.max(0, Math.min(1, p));
1110
- const deg = (1 - cp) * 90;
1111
- const t = axis === 'x' ? `perspective(1200px) rotateX(${deg}deg)` : `perspective(1200px) rotateY(${deg}deg)`;
1112
- return { transform: t, opacity: cp > 0.05 ? 1 : 0 };
1113
- },
1114
- zoom: (p, { from = 0.8, to = 1.0 } = {}) => {
1115
- const cp = Math.max(0, Math.min(1, p));
1116
- const s = from + (to - from) * cp;
1117
- return { transform: `scale(${s})`, opacity: cp };
1118
- }
1119
- };
1120
-
1121
- /**
1122
- * absoluteFill() — Layout helper matching Remotion's <AbsoluteFill>.
1123
- *
1124
- * @param {object} [extra] Additional CSS styles
1125
- * @returns {object} Style object for absolute full-screen canvas positioning
1126
- */
1127
- export function absoluteFill(extra = {}) {
1128
- return {
1129
- position: 'absolute',
1130
- top: '0px',
1131
- left: '0px',
1132
- width: '100%',
1133
- height: '100%',
1134
- display: 'flex',
1135
- flexDirection: 'column',
1136
- ...extra,
1137
- };
1138
- }
1139
-
1140
- /**
1141
- * loopTime() — Loops local time within [0, duration) for repeating motions.
1142
- * Equivalent to Remotion's <Loop>.
1143
- *
1144
- * @param {number} t
1145
- * @param {number} duration
1146
- * @returns {number} Local loop time
1147
- */
1148
- export function loopTime(t, duration) {
1149
- if (duration <= 0) return 0;
1150
- return ((t % duration) + duration) % duration;
1151
- }
1152
-
1153
- /**
1154
- * loadGoogleFont() — Deterministic Google Fonts loader using delayRender barrier.
1155
- * Equivalent to @remotion/google-fonts.
1156
- *
1157
- * @param {string} fontFamily
1158
- * @param {{ weights?: number[], display?: string }} [opts]
1159
- * @returns {Promise<void>}
1160
- */
1161
- export async function loadGoogleFont(fontFamily, { weights = [400, 700], display = 'swap' } = {}) {
1162
- if (typeof window === 'undefined' || typeof document === 'undefined') return;
1163
- const id = typeof window.delayRender === 'function' ? window.delayRender(`font-${fontFamily}`) : null;
1164
- try {
1165
- const formattedFamily = fontFamily.replace(/\s+/g, '+');
1166
- const weightsStr = weights.join(';');
1167
- const href = `https://fonts.googleapis.com/css2?family=${formattedFamily}:wght@${weightsStr}&display=${display}`;
1168
-
1169
- if (!document.querySelector(`link[href*="${formattedFamily}"]`)) {
1170
- const link = document.createElement('link');
1171
- link.rel = 'stylesheet';
1172
- link.href = href;
1173
- document.head.appendChild(link);
1174
- }
1175
-
1176
- if (document.fonts && typeof document.fonts.load === 'function') {
1177
- const promises = weights.map(w => document.fonts.load(`${w} 16px "${fontFamily}"`));
1178
- await Promise.all(promises);
1179
- await document.fonts.ready;
1180
- }
1181
- } catch (err) {
1182
- console.warn(`[loadGoogleFont] Failed loading font ${fontFamily}:`, err);
1183
- } finally {
1184
- if (id !== null && typeof window.continueRender === 'function') {
1185
- window.continueRender(id);
1186
- }
1187
- }
1188
- }
1189
-
1190
- let _BOILN = 0;
1191
-
1192
- /**
1193
- * boilSeed(key, [t]) — Deterministic pseudo-random seed generator for linework boil.
1194
- *
1195
- * Boil holds drawing for 2 frames (12 fps), but moving elements consume randomness,
1196
- * shifting random streams for later elements. boilSeed restarts stream from BOILN + key
1197
- * so still elements never jitter.
1198
- *
1199
- * @param {string} key Unique stable name of element (e.g. 'bg', 'character', 'prop')
1200
- * @param {number} [t] Current time (optional, updates internal BOILN = floor(t * 12))
1201
- * @returns {number} Deterministic float in [0, 1)
1202
- */
1203
- export function boilSeed(key = 'frame', t = null) {
1204
- if (t !== null && typeof t === 'number') {
1205
- _BOILN = Math.floor(t * 12);
1206
- }
1207
- let h = 2166136261;
1208
- const str = `${key}|${_BOILN}`;
1209
- for (let i = 0; i < str.length; i++) {
1210
- h = Math.imul(h ^ str.charCodeAt(i), 16777619);
1211
- }
1212
- return (h >>> 0) / 4294967296;
1213
- }
1214
-
1215
- /** Step time on twos (12 fps hold step) */
1216
- export function onTwos(t) {
1217
- return Math.floor(t * 12 + 1e-6) / 12;
1218
- }
1219
-
1220
- /** Segment normalization: clamps (t - a) / (b - a) in [0, 1] */
1221
- export function seg(t, a, b) {
1222
- if (b === a) return 0;
1223
- return Math.max(0, Math.min(1, (t - a) / (b - a)));
1224
- }
1225
-
1226
- /** Exponential beat pulse */
1227
- export function pulse(t, k = 6) {
1228
- const frac = t - Math.floor(t);
1229
- return Math.exp(-frac * k);
1230
- }
1231
-
1232
- /**
1233
- * Keyframes with closed-form interpolation (scalar numbers or arrays).
1234
- * @param {number} t
1235
- * @param {Array<[number, number|number[]]>} keys e.g. [[0, 0], [1, 100], [2, 50]]
1236
- * @param {function} [e=easeInOut] Easing function
1237
- */
1238
- export function kf(t, keys, e = easeInOut) {
1239
- if (!keys || keys.length === 0) return 0;
1240
- if (t <= keys[0][0]) return keys[0][1];
1241
- for (let i = 1; i < keys.length; i++) {
1242
- if (t < keys[i][0]) {
1243
- const [a, va] = keys[i - 1];
1244
- const [b, vb] = keys[i];
1245
- const prog = (t - a) / (b - a);
1246
- const k = e(Math.max(0, Math.min(1, prog)));
1247
- if (Array.isArray(va) && Array.isArray(vb)) {
1248
- return va.map((v, idx) => v + ((vb[idx] ?? v) - v) * k);
1249
- }
1250
- return va + (vb - va) * k;
1251
- }
1252
- }
1253
- return keys[keys.length - 1][1];
1254
- }
1255
-
1256
- /**
1257
- * Register sequential timeline shots: [[t0, fn0], [t1, fn1], ...]
1258
- * Each fn(t, lt, dur) paints the frame when t is in its window.
1259
- */
1260
- export function shots(shotList = []) {
1261
- for (let i = 0; i < shotList.length; i++) {
1262
- const [start, fn] = shotList[i];
1263
- const end = i + 1 < shotList.length ? shotList[i + 1][0] : REEL.duration;
1264
- layer(`shot_${i}`, { start, end }).on(fn);
1265
- }
1266
- }
1267
-
1268
- // ── Component builders ────────────────────────────────────────────────────────
1269
-
1270
- /**
1271
- * Plain animated text element.
1272
- * @param {string} str
1273
- * @param {{ font, color, x, y, size, weight, align, opacity, duration }} opts
1274
- */
1275
- export function text(str, {
1276
- font = '48px/1.3 "Nirmala UI", "Noto Sans Malayalam", "Malayalam Sangam MN", "Kartika", system-ui, sans-serif',
1277
- color = '#ffffff',
1278
- x = 'center',
1279
- y = 100,
1280
- size = null,
1281
- weight = null,
1282
- align = 'center',
1283
- opacity = 1,
1284
- duration = Infinity,
1285
- } = {}) {
1286
- const el = document.createElement('div');
1287
- el._duration = duration;
1288
- el.textContent = str;
1289
-
1290
- const fontSize = size ? `${size}px` : font.split('/')[0].trim();
1291
- const fontFam = font.includes(' ') ? font : `${fontSize} system-ui`;
1292
-
1293
- Object.assign(el.style, {
1294
- position: 'absolute',
1295
- font: fontFam,
1296
- fontSize: size ? `${size}px` : undefined,
1297
- fontWeight: weight ? String(weight) : undefined,
1298
- color,
1299
- textAlign: align,
1300
- opacity: String(opacity),
1301
- whiteSpace: 'pre-line',
1302
- maxWidth: '90%',
1303
- lineHeight: '1.3',
1304
- });
1305
-
1306
- _positionEl(el, x, y);
1307
- return el;
1308
- }
1309
-
1310
- /**
1311
- * Pill-shaped chip / label.
1312
- * @param {string} str
1313
- * @param {{ color, bg, x, y, size, duration }} opts
1314
- */
1315
- export function chip(str, {
1316
- color = '#ffffff',
1317
- bg = 'rgba(59,130,246,0.85)',
1318
- x = 'center',
1319
- y = 80,
1320
- size = 20,
1321
- duration = Infinity,
1322
- } = {}) {
1323
- const el = document.createElement('div');
1324
- el._duration = duration;
1325
- el.textContent = str;
1326
- Object.assign(el.style, {
1327
- position: 'absolute',
1328
- display: 'inline-block',
1329
- padding: '6px 18px',
1330
- borderRadius: '9999px',
1331
- background: bg,
1332
- color,
1333
- fontSize: `${size}px`,
1334
- fontWeight: '600',
1335
- letterSpacing: '0.04em',
1336
- textTransform: 'uppercase',
1337
- });
1338
- _positionEl(el, x, y);
1339
- return el;
1340
- }
1341
-
1342
- /**
1343
- * Frosted-glass card with stacked text lines.
1344
- * @param {{ text, size, weight, color }[]} lines
1345
- * @param {{ x, y, width, duration, bg, blur, radius, padding }} opts
1346
- */
1347
- export function wallCard(lines = [], {
1348
- x = 'center',
1349
- y = REEL.height * 0.72,
1350
- width = Math.round(REEL.width * 0.84),
1351
- duration = Infinity,
1352
- bg = 'rgba(0,0,0,0.62)',
1353
- blur = 12,
1354
- radius = 16,
1355
- padding = 28,
1356
- } = {}) {
1357
- const el = document.createElement('div');
1358
- el._duration = duration;
1359
- Object.assign(el.style, {
1360
- position: 'absolute',
1361
- width: `${width}px`,
1362
- backdropFilter: `blur(${blur}px)`,
1363
- background: bg,
1364
- borderRadius: `${radius}px`,
1365
- padding: `${padding}px ${padding + 8}px`,
1366
- boxSizing: 'border-box',
1367
- display: 'flex',
1368
- flexDirection: 'column',
1369
- gap: '8px',
1370
- });
1371
-
1372
- for (const line of lines) {
1373
- const p = document.createElement('p');
1374
- p.textContent = line.text || '';
1375
- Object.assign(p.style, {
1376
- margin: 0,
1377
- fontSize: `${line.size || 24}px`,
1378
- fontWeight: String(line.weight || 400),
1379
- color: line.color || '#ffffff',
1380
- lineHeight: '1.4',
1381
- });
1382
- el.appendChild(p);
1383
- }
1384
-
1385
- _positionEl(el, x, y);
1386
- return el;
1387
- }
1388
-
1389
- /**
1390
- * Image with optional caption overlay.
1391
- * @param {string} src URL or relative path
1392
- * @param {{ x, y, width, height, caption, radius, duration }} opts
1393
- */
1394
- export function imageCard(src, {
1395
- x = 'center',
1396
- y = 'center',
1397
- width = 640,
1398
- height = 360,
1399
- caption = '',
1400
- radius = 12,
1401
- duration = Infinity,
1402
- } = {}) {
1403
- const el = document.createElement('div');
1404
- el._duration = duration;
1405
- Object.assign(el.style, {
1406
- position: 'absolute',
1407
- width: `${width}px`,
1408
- height: `${height}px`,
1409
- borderRadius: `${radius}px`,
1410
- overflow: 'hidden',
1411
- display: 'flex',
1412
- flexDirection:'column',
1413
- });
1414
-
1415
- const img = document.createElement('img');
1416
- img.src = src;
1417
- Object.assign(img.style, { width: '100%', height: caption ? 'calc(100% - 40px)' : '100%', objectFit: 'cover', display: 'block' });
1418
- el.appendChild(img);
1419
-
1420
- if (caption) {
1421
- const cap = document.createElement('div');
1422
- cap.textContent = caption;
1423
- Object.assign(cap.style, {
1424
- background: 'rgba(0,0,0,0.7)', color: '#fff',
1425
- fontSize: '18px', padding: '8px 12px', textAlign: 'center',
1426
- });
1427
- el.appendChild(cap);
1428
- }
1429
-
1430
- _positionEl(el, x, y);
1431
- return el;
1432
- }
1433
-
1434
- /**
1435
- * Animated terminal block.
1436
- * @param {string[]} lines
1437
- * @param {{ x, y, width, duration, bg, color }} opts
1438
- */
1439
- export function terminal(lines = [], {
1440
- x = 100,
1441
- y = 'center',
1442
- width = 720,
1443
- duration = Infinity,
1444
- bg = 'rgba(0,0,0,0.88)',
1445
- color = '#22c55e',
1446
- } = {}) {
1447
- const el = document.createElement('div');
1448
- el._duration = duration;
1449
- Object.assign(el.style, {
1450
- position: 'absolute',
1451
- width: `${width}px`,
1452
- background: bg,
1453
- borderRadius: '10px',
1454
- padding: '20px 24px',
1455
- fontFamily: '"Fira Code", "Cascadia Code", monospace',
1456
- fontSize: '18px',
1457
- lineHeight: '1.7',
1458
- color,
1459
- boxSizing: 'border-box',
1460
- });
1461
-
1462
- // Bar
1463
- const bar = document.createElement('div');
1464
- Object.assign(bar.style, { display: 'flex', gap: '8px', marginBottom: '14px' });
1465
- for (const c of ['#ef4444', '#f59e0b', '#22c55e']) {
1466
- const dot = document.createElement('div');
1467
- Object.assign(dot.style, { width: '12px', height: '12px', borderRadius: '50%', background: c });
1468
- bar.appendChild(dot);
1469
- }
1470
- el.appendChild(bar);
1471
-
1472
- for (const ln of lines) {
1473
- const p = document.createElement('p');
1474
- p.textContent = ln;
1475
- Object.assign(p.style, { margin: '0', wordBreak: 'break-all' });
1476
- el.appendChild(p);
1477
- }
1478
-
1479
- _positionEl(el, x, y);
1480
- return el;
1481
- }
1482
-
1483
- /**
1484
- * Diagonal stamp (VERIFIED, SOURCE, DRAFT, etc.)
1485
- * @param {string} str
1486
- * @param {{ color, size, x, y, duration }} opts
1487
- */
1488
- export function stamp(str, {
1489
- color = 'rgba(220,38,38,0.8)',
1490
- size = 80,
1491
- x = 'center',
1492
- y = 'center',
1493
- duration = Infinity,
1494
- } = {}) {
1495
- const el = document.createElement('div');
1496
- el._duration = duration;
1497
- el.textContent = str.toUpperCase();
1498
- Object.assign(el.style, {
1499
- position: 'absolute',
1500
- fontSize: `${size}px`,
1501
- fontWeight: '900',
1502
- letterSpacing: '0.1em',
1503
- color,
1504
- border: `4px solid ${color}`,
1505
- padding: '6px 20px',
1506
- transform: 'rotate(-15deg)',
1507
- borderRadius: '4px',
1508
- textTransform: 'uppercase',
1509
- pointerEvents: 'none',
1510
- userSelect: 'none',
1511
- });
1512
- _positionEl(el, x, y);
1513
- return el;
1514
- }
1515
-
1516
- /**
1517
- * Syntax-highlighted code block.
1518
- * @param {string} code
1519
- * @param {string} lang (informational only — no runtime highlight library required)
1520
- * @param {{ x, y, width, fontSize, duration }} opts
1521
- */
1522
- export function codeCard(code, lang = 'js', {
1523
- x = 'center',
1524
- y = 'center',
1525
- width = 820,
1526
- fontSize = 20,
1527
- duration = Infinity,
1528
- } = {}) {
1529
- const el = document.createElement('div');
1530
- el._duration = duration;
1531
- Object.assign(el.style, {
1532
- position: 'absolute',
1533
- width: `${width}px`,
1534
- background: '#0d1117',
1535
- borderRadius: '12px',
1536
- overflow: 'hidden',
1537
- border: '1px solid rgba(255,255,255,0.1)',
1538
- });
1539
-
1540
- // Header bar
1541
- const bar = document.createElement('div');
1542
- bar.textContent = lang;
1543
- Object.assign(bar.style, {
1544
- background: '#161b22', color: '#8b949e', fontSize: '14px',
1545
- padding: '8px 16px', borderBottom: '1px solid rgba(255,255,255,0.08)',
1546
- fontFamily: 'monospace', textTransform: 'uppercase', letterSpacing: '0.06em',
1547
- });
1548
- el.appendChild(bar);
1549
-
1550
- const pre = document.createElement('pre');
1551
- Object.assign(pre.style, {
1552
- margin: 0, padding: '20px 22px', overflowX: 'auto',
1553
- fontFamily: '"Fira Code","Cascadia Code",monospace',
1554
- fontSize: `${fontSize}px`, lineHeight: '1.65',
1555
- color: '#e6edf3',
1556
- });
1557
- pre.textContent = code;
1558
- el.appendChild(pre);
1559
-
1560
- _positionEl(el, x, y);
1561
- return el;
1562
- }
1563
-
1564
- /**
1565
- * Browser screenshot card. Requires the URL to be a local data: URI or
1566
- * pre-captured image path (capture.mjs generates these).
1567
- */
1568
- export function browserCard(src, {
1569
- x = 'center',
1570
- y = 'center',
1571
- width = 860,
1572
- duration = Infinity,
1573
- } = {}) {
1574
- return imageCard(src, { x, y, width, height: Math.round(width * (600 / 1024)), duration });
1575
- }
1576
-
1577
- /**
1578
- * collageCard() — Editorial paper-collage card with halftone texture and washi tape.
1579
- * Derived from pyang5166/gbro-collage-broll.
1580
- *
1581
- * @param {string|HTMLElement} content
1582
- * @param {object} [opts]
1583
- * @param {number} [opts.width=720]
1584
- * @param {number} [opts.tiltX=2]
1585
- * @param {number} [opts.tiltY=-3]
1586
- * @param {string} [opts.bg='#fdfbf7']
1587
- * @param {string} [opts.tapeColor='rgba(254, 240, 138, 0.88)']
1588
- * @param {number|string} [opts.x='center']
1589
- * @param {number|string} [opts.y='center']
1590
- * @param {number} [opts.duration=Infinity]
1591
- * @returns {HTMLElement}
1592
- */
1593
- export function collageCard(content, {
1594
- width = 720,
1595
- tiltX = 2,
1596
- tiltY = -3,
1597
- bg = '#fdfbf7',
1598
- tapeColor = 'rgba(254, 240, 138, 0.88)',
1599
- x = 'center',
1600
- y = 'center',
1601
- duration = Infinity,
1602
- } = {}) {
1603
- const card = document.createElement('div');
1604
- card.className = 'collage-card';
1605
- card._duration = duration;
1606
- Object.assign(card.style, {
1607
- position: 'absolute',
1608
- width: `${width}px`,
1609
- background: `${bg}`,
1610
- backgroundImage: 'radial-gradient(rgba(0,0,0,0.12) 15%, transparent 16%)',
1611
- backgroundSize: '10px 10px',
1612
- color: '#18181b',
1613
- padding: '36px 32px 32px 32px',
1614
- borderRadius: '4px',
1615
- transform: `perspective(1000px) rotateX(${tiltX}deg) rotateY(${tiltY}deg)`,
1616
- boxShadow: '0 20px 40px rgba(0,0,0,0.28), 0 4px 10px rgba(0,0,0,0.14)',
1617
- border: '1px solid rgba(0,0,0,0.06)',
1618
- fontFamily: '"Space Grotesk", system-ui, sans-serif',
1619
- });
1620
-
1621
- // Washi tape accent strip
1622
- const tape = document.createElement('div');
1623
- tape.className = 'collage-tape';
1624
- Object.assign(tape.style, {
1625
- position: 'absolute',
1626
- top: '-14px',
1627
- left: '50%',
1628
- transform: 'translateX(-50%) rotate(-2deg)',
1629
- width: '140px',
1630
- height: '28px',
1631
- background: tapeColor,
1632
- boxShadow: '0 2px 6px rgba(0,0,0,0.15)',
1633
- backdropFilter: 'blur(2px)',
1634
- clipPath: 'polygon(0 0, 96% 2%, 100% 98%, 4% 96%)',
1635
- });
1636
- card.appendChild(tape);
1637
-
1638
- if (typeof content === 'string') {
1639
- const textEl = document.createElement('div');
1640
- textEl.innerHTML = content;
1641
- card.appendChild(textEl);
1642
- } else if (content instanceof HTMLElement) {
1643
- card.appendChild(content);
1644
- }
1645
-
1646
- _positionEl(card, x, y);
1647
- return card;
1648
- }
1649
-
1650
- /**
1651
- * mascot() — Procedural vector character with 12 expressive emotions and 12fps line boil.
1652
- * Derived from JohnHeibel/ClaudeAnimationBase.
1653
- *
1654
- * @param {'neutral'|'happy'|'excited'|'thinking'|'confused'|'skeptical'|'surprised'|'alarmed'|'celebrating'|'proud'|'curious'|'sad'} emotion
1655
- * @param {object} [opts]
1656
- * @param {number} [opts.size=320] Size in px
1657
- * @param {string} [opts.color='#f97316'] Primary body color
1658
- * @param {boolean} [opts.speaking=false] Mouth open/flutter state
1659
- * @param {number|string} [opts.x='center']
1660
- * @param {number|string} [opts.y='center']
1661
- * @param {number} [opts.duration=Infinity]
1662
- * @returns {HTMLElement & { setEmotion: (e: string) => void, setSpeaking: (s: boolean) => void }}
1663
- */
1664
- export function mascot(emotion = 'happy', {
1665
- size = 320,
1666
- color = '#f97316',
1667
- speaking = false,
1668
- x = 'center',
1669
- y = 'center',
1670
- duration = Infinity,
1671
- } = {}) {
1672
- const container = document.createElement('div');
1673
- container.className = 'mascot-container';
1674
- container._duration = duration;
1675
- container.style.width = `${size}px`;
1676
- container.style.height = `${size}px`;
1677
- container.style.position = 'absolute';
1678
- container.style.display = 'inline-block';
1679
-
1680
- let currentEmotion = emotion;
1681
- let isSpeaking = speaking;
1682
-
1683
- function renderSvg(t = 0) {
1684
- const boilX = (boilSeed('mascot_x', t) * 4) - 2;
1685
- const boilY = (boilSeed('mascot_y', t) * 4) - 2;
1686
-
1687
- // Automatic eye blink every ~3.5s
1688
- const blinkCycle = (t % 3.5);
1689
- const isBlinking = blinkCycle < 0.14;
1690
-
1691
- // Mouth geometry per emotion
1692
- let mouthD = 'M 75 145 Q 100 170 125 145'; // default smile
1693
- let leftEyeD = isBlinking ? 'M 65 95 L 85 95' : 'M 75 95 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0';
1694
- let rightEyeD = isBlinking ? 'M 115 95 L 135 95' : 'M 125 95 m -10,0 a 10,10 0 1,0 20,0 a 10,10 0 1,0 -20,0';
1695
- let leftBrowD = 'M 65 75 Q 75 70 85 75';
1696
- let rightBrowD = 'M 115 75 Q 125 70 135 75';
1697
-
1698
- switch (currentEmotion) {
1699
- case 'excited':
1700
- mouthD = 'M 70 140 Q 100 185 130 140 Z';
1701
- leftBrowD = 'M 65 65 Q 75 58 85 65';
1702
- rightBrowD = 'M 115 65 Q 125 58 135 65';
1703
- break;
1704
- case 'thinking':
1705
- mouthD = 'M 85 150 Q 100 148 115 145';
1706
- leftBrowD = 'M 65 75 Q 75 78 85 75';
1707
- rightBrowD = 'M 115 65 Q 125 58 135 65';
1708
- leftEyeD = 'M 78 90 m -8,0 a 8,8 0 1,0 16,0 a 8,8 0 1,0 -16,0';
1709
- rightEyeD = 'M 128 90 m -8,0 a 8,8 0 1,0 16,0 a 8,8 0 1,0 -16,0';
1710
- break;
1711
- case 'confused':
1712
- mouthD = 'M 75 152 Q 90 145 105 155 Q 120 145 125 150';
1713
- leftBrowD = 'M 65 68 Q 75 62 85 70';
1714
- rightBrowD = 'M 115 78 Q 125 84 135 80';
1715
- break;
1716
- case 'skeptical':
1717
- mouthD = 'M 80 152 L 120 152';
1718
- leftEyeD = 'M 68 95 L 82 95';
1719
- leftBrowD = 'M 65 72 L 85 75';
1720
- rightBrowD = 'M 115 65 Q 125 58 135 65';
1721
- break;
1722
- case 'surprised':
1723
- mouthD = 'M 100 140 m -12,0 a 12,16 0 1,0 24,0 a 12,16 0 1,0 -24,0';
1724
- leftBrowD = 'M 65 62 Q 75 52 85 62';
1725
- rightBrowD = 'M 115 62 Q 125 52 135 62';
1726
- break;
1727
- case 'alarmed':
1728
- mouthD = 'M 75 155 Q 100 135 125 155';
1729
- leftBrowD = 'M 65 80 Q 75 72 85 78';
1730
- rightBrowD = 'M 115 78 Q 125 72 135 80';
1731
- break;
1732
- case 'celebrating':
1733
- mouthD = 'M 70 140 Q 100 185 130 140 Z';
1734
- leftEyeD = 'M 65 98 Q 75 88 85 98';
1735
- rightEyeD = 'M 115 98 Q 125 88 135 98';
1736
- leftBrowD = 'M 65 65 Q 75 55 85 65';
1737
- rightBrowD = 'M 115 65 Q 125 55 135 65';
1738
- break;
1739
- case 'proud':
1740
- mouthD = 'M 80 150 Q 105 165 125 142';
1741
- leftEyeD = 'M 68 96 Q 76 90 84 96';
1742
- rightEyeD = 'M 116 96 Q 124 90 132 96';
1743
- break;
1744
- case 'sad':
1745
- mouthD = 'M 75 160 Q 100 140 125 160';
1746
- leftBrowD = 'M 65 70 Q 75 76 85 82';
1747
- rightBrowD = 'M 115 82 Q 125 76 135 70';
1748
- break;
1749
- case 'neutral':
1750
- mouthD = 'M 80 150 L 120 150';
1751
- leftBrowD = 'M 65 72 L 85 72';
1752
- rightBrowD = 'M 115 72 L 135 72';
1753
- break;
1754
- }
1755
-
1756
- if (isSpeaking) {
1757
- const flutter = Math.sin(t * 18);
1758
- if (flutter > 0.2) {
1759
- mouthD = 'M 80 142 Q 100 170 120 142 Z';
1760
- }
1761
- }
1762
-
1763
- container.innerHTML = `
1764
- <svg viewBox="0 0 200 200" width="100%" height="100%" style="transform: translate(${boilX}px, ${boilY}px)">
1765
- <path d="M 40 100 C 40 45, 160 45, 160 100 C 160 160, 40 160, 40 100 Z" fill="${color}" stroke="#1e293b" stroke-width="6" stroke-linejoin="round" />
1766
- <circle cx="58" cy="120" r="10" fill="#fca5a5" opacity="0.6" />
1767
- <circle cx="142" cy="120" r="10" fill="#fca5a5" opacity="0.6" />
1768
- <path d="${leftBrowD}" fill="none" stroke="#1e293b" stroke-width="4.5" stroke-linecap="round" />
1769
- <path d="${rightBrowD}" fill="none" stroke="#1e293b" stroke-width="4.5" stroke-linecap="round" />
1770
- <path d="${leftEyeD}" fill="#1e293b" stroke="#1e293b" stroke-width="${isBlinking ? 4.5 : 2}" stroke-linecap="round" />
1771
- <path d="${rightEyeD}" fill="#1e293b" stroke="#1e293b" stroke-width="${isBlinking ? 4.5 : 2}" stroke-linecap="round" />
1772
- <path d="${mouthD}" fill="${mouthD.endsWith('Z') ? '#7f1d1d' : 'none'}" stroke="#1e293b" stroke-width="4.5" stroke-linecap="round" stroke-linejoin="round" />
1773
- </svg>
1774
- `;
1775
- }
1776
-
1777
- renderSvg(0);
1778
-
1779
- container._seekFn = (relTime) => {
1780
- renderSvg(relTime);
1781
- };
1782
-
1783
- container.setEmotion = (e) => {
1784
- currentEmotion = e;
1785
- renderSvg(0);
1786
- };
1787
-
1788
- container.setSpeaking = (s) => {
1789
- isSpeaking = Boolean(s);
1790
- renderSvg(0);
1791
- };
1792
-
1793
- _positionEl(container, x, y);
1794
- return container;
1795
- }
1796
-
1797
- // ── faceAt — talking-head layout helper ──────────────────────────────────────
1798
-
1799
- /**
1800
- * Return CSS position styles for a talking-head layout.
1801
- * Pure function — no DOM side effects.
1802
- *
1803
- * @param {'FULL'|'SPLIT'|'PIP'} layout
1804
- * @param {{ width, height, side, pipPos, pipSize }} opts
1805
- */
1806
- export function faceAt(layout, {
1807
- width = REEL.width,
1808
- height = REEL.height,
1809
- side = 'right',
1810
- pipPos = 'br',
1811
- pipSize = 0.28,
1812
- } = {}) {
1813
- switch (layout.toUpperCase()) {
1814
- case 'FULL':
1815
- return { position: 'absolute', inset: 0, width: '100%', height: '100%' };
1816
- case 'SPLIT': {
1817
- const half = Math.round(width / 2);
1818
- const left = side === 'left' ? 0 : half;
1819
- return { position: 'absolute', top: 0, left, width: half, height };
1820
- }
1821
- case 'PIP': {
1822
- const pw = Math.round(width * pipSize);
1823
- const ph = Math.round(pw * (height / width));
1824
- const pad = 40;
1825
- const top = pipPos.startsWith('t') ? pad : height - ph - pad;
1826
- const left = pipPos.endsWith('l') ? pad : width - pw - pad;
1827
- return { position: 'absolute', top, left, width: pw, height: ph, borderRadius: 16 };
1828
- }
1829
- default:
1830
- return { position: 'absolute', inset: 0 };
1831
- }
1832
- }
1833
-
1834
- // ── captions — word-level caption sync ───────────────────────────────────────
1835
-
1836
- let _captionOpts = { style: 'viral', highlightColor: '#facc15' };
1837
-
1838
- /**
1839
- * Register a Whisper outline file for auto-synced captions with word-level highlighting.
1840
- * Format: one JSON object per line: { "start": 0.0, "end": 0.5, "text": "word" }
1841
- * or a single JSON array of the same objects.
1842
- *
1843
- * @param {string} outlinePath Path relative to project root
1844
- * @param {object} [opts]
1845
- * @param {'viral'|'cinematic'|'minimal'} [opts.style='viral'] Caption styling preset
1846
- * @param {string} [opts.highlightColor='#facc15'] Color for active spoken word
1847
- */
1848
- export function captions(outlinePath, opts = {}) {
1849
- _captionOpts = { ..._captionOpts, ...opts };
1850
- fetch(outlinePath)
1851
- .then(r => r.text())
1852
- .then(raw => {
1853
- try {
1854
- _captionData = JSON.parse(raw);
1855
- } catch {
1856
- // NDJSON — one segment per line
1857
- _captionData = raw.trim().split('\n')
1858
- .filter(Boolean)
1859
- .map(l => JSON.parse(l));
1860
- }
1861
- })
1862
- .catch(e => console.warn('[engine] captions(): could not load', outlinePath, e));
1863
- }
1864
-
1865
- let _captionEl = null;
1866
-
1867
- function _tickCaptions(t) {
1868
- if (!_captionEl) {
1869
- _captionEl = document.createElement('div');
1870
- _captionEl.className = 'reel-captions';
1871
- const isViral = _captionOpts.style === 'viral';
1872
- Object.assign(_captionEl.style, {
1873
- position: 'absolute',
1874
- bottom: isViral ? '120px' : '80px',
1875
- left: '50%',
1876
- transform: 'translateX(-50%)',
1877
- background: _captionOpts.style === 'minimal' ? 'transparent' : 'rgba(0,0,0,0.76)',
1878
- color: '#fff',
1879
- fontSize: isViral ? '36px' : '32px',
1880
- fontWeight: '800',
1881
- letterSpacing: isViral ? '0.04em' : 'normal',
1882
- padding: '12px 32px',
1883
- borderRadius: '12px',
1884
- maxWidth: '84%',
1885
- textAlign: 'center',
1886
- lineHeight: '1.4',
1887
- pointerEvents: 'none',
1888
- boxShadow: _captionOpts.style === 'minimal' ? 'none' : '0 10px 30px rgba(0,0,0,0.5)',
1889
- });
1890
- document.getElementById('stage').appendChild(_captionEl);
1891
- }
1892
-
1893
- // Find active segment
1894
- const activeSeg = _captionData.find(seg => seg.start <= t && t < seg.end + 0.08);
1895
-
1896
- if (!activeSeg) {
1897
- _captionEl.style.display = 'none';
1898
- return;
1899
- }
1900
-
1901
- _captionEl.style.display = '';
1902
-
1903
- // Tokenize into words
1904
- let words = activeSeg.words;
1905
- if (!words || !Array.isArray(words)) {
1906
- const rawWords = (activeSeg.text || '').trim().split(/\s+/).filter(Boolean);
1907
- const dur = Math.max(0.1, (activeSeg.end - activeSeg.start) || 1);
1908
- const wDur = dur / Math.max(1, rawWords.length);
1909
- words = rawWords.map((w, idx) => ({
1910
- word: w,
1911
- start: activeSeg.start + idx * wDur,
1912
- end: activeSeg.start + (idx + 1) * wDur,
1913
- }));
1914
- }
1915
-
1916
- // Render spans with active word styling
1917
- const activeColor = _captionOpts.highlightColor || '#facc15';
1918
- _captionEl.innerHTML = words.map(w => {
1919
- const isActive = t >= w.start && t < w.end;
1920
- const isPast = t >= w.end;
1921
- if (isActive) {
1922
- return `<span style="color:${activeColor};transform:scale(1.14);display:inline-block;margin:0 4px;font-weight:900;text-shadow:0 0 16px ${activeColor}88">${w.word}</span>`;
1923
- } else if (isPast) {
1924
- return `<span style="color:#ffffff;display:inline-block;margin:0 4px;opacity:0.95">${w.word}</span>`;
1925
- } else {
1926
- return `<span style="color:#d1d5db;display:inline-block;margin:0 4px;opacity:0.6">${w.word}</span>`;
1927
- }
1928
- }).join(' ');
1929
- }
1930
-
1931
- // ── Web Audio live procedural SFX synthesis (Leonxlnx/earshot) ───────────────────
1932
-
1933
- let _audioCtx = null;
1934
- function _playProceduralSFX(name, vol = 1.0) {
1935
- if (typeof window === 'undefined' || window.__playwright) return;
1936
- try {
1937
- const AudioCtx = window.AudioContext || window.webkitAudioContext;
1938
- if (!AudioCtx) return;
1939
- if (!_audioCtx) _audioCtx = new AudioCtx();
1940
- if (_audioCtx.state === 'suspended') _audioCtx.resume();
1941
-
1942
- const t = _audioCtx.currentTime;
1943
- const gain = _audioCtx.createGain();
1944
- gain.connect(_audioCtx.destination);
1945
- gain.gain.setValueAtTime(vol * 0.3, t);
1946
-
1947
- if (name === 'whoosh') {
1948
- const osc = _audioCtx.createOscillator();
1949
- osc.type = 'sine';
1950
- osc.frequency.setValueAtTime(400, t);
1951
- osc.frequency.exponentialRampToValueAtTime(80, t + 0.35);
1952
- gain.gain.exponentialRampToValueAtTime(0.001, t + 0.35);
1953
- osc.connect(gain);
1954
- osc.start(t);
1955
- osc.stop(t + 0.35);
1956
- } else if (name === 'impact') {
1957
- const osc = _audioCtx.createOscillator();
1958
- osc.type = 'triangle';
1959
- osc.frequency.setValueAtTime(120, t);
1960
- osc.frequency.exponentialRampToValueAtTime(40, t + 0.45);
1961
- gain.gain.exponentialRampToValueAtTime(0.001, t + 0.45);
1962
- osc.connect(gain);
1963
- osc.start(t);
1964
- osc.stop(t + 0.45);
1965
- } else if (name === 'pop') {
1966
- const osc = _audioCtx.createOscillator();
1967
- osc.type = 'sine';
1968
- osc.frequency.setValueAtTime(450, t);
1969
- osc.frequency.exponentialRampToValueAtTime(850, t + 0.1);
1970
- gain.gain.exponentialRampToValueAtTime(0.001, t + 0.1);
1971
- osc.connect(gain);
1972
- osc.start(t);
1973
- osc.stop(t + 0.1);
1974
- } else if (name === 'click') {
1975
- const osc = _audioCtx.createOscillator();
1976
- osc.type = 'square';
1977
- osc.frequency.setValueAtTime(2400, t);
1978
- gain.gain.exponentialRampToValueAtTime(0.001, t + 0.04);
1979
- osc.connect(gain);
1980
- osc.start(t);
1981
- osc.stop(t + 0.04);
1982
- } else if (name === 'riser') {
1983
- const osc = _audioCtx.createOscillator();
1984
- osc.type = 'sawtooth';
1985
- osc.frequency.setValueAtTime(100, t);
1986
- osc.frequency.exponentialRampToValueAtTime(1200, t + 1.8);
1987
- gain.gain.exponentialRampToValueAtTime(0.001, t + 1.8);
1988
- osc.connect(gain);
1989
- osc.start(t);
1990
- osc.stop(t + 1.8);
1991
- }
1992
- } catch (_) {}
1993
- }
1994
-
1995
- // ── cue — sound effect placement & caption synchronization ───────────────────────
1996
-
1997
- const _cues = [];
1998
-
1999
- /**
2000
- * Register a sound-effect cue. The audio is triggered by render.mjs when
2001
- * encoding audio tracks (not in headless Playwright frames).
2002
- *
2003
- * @param {string} sfxName Base name (no extension) inside assets/sfx/
2004
- * @param {number} t Time to trigger (seconds)
2005
- * @param {number} vol Volume 0–1 (default 1)
2006
- */
2007
- export function cue(sfxName, t, vol = 1) {
2008
- _cues.push({ sfxName, t, vol });
2009
- // Expose on window for render.mjs to read after page load
2010
- window.__cues = _cues;
2011
- }
2012
-
2013
- /**
2014
- * Match a target word or phrase in loaded captions, returning its start timestamp.
2015
- * Throws a fatal build error if the phrase cannot be found.
2016
- *
2017
- * @param {string} targetPhrase Exact word or sequence of words spoken in the voiceover
2018
- * @param {number} [offset=0] Offset in seconds to shift the trigger relative to the phrase start
2019
- * @returns {number} Timestamp in seconds
2020
- */
2021
- export function cuePhrase(targetPhrase, offset = 0) {
2022
- if (!_captionData || !Array.isArray(_captionData) || _captionData.length === 0) {
2023
- throw new Error(`FATAL SYNC ERROR: Cannot cue "${targetPhrase}" — no captions loaded yet! Call captions() first.`);
2024
- }
2025
-
2026
- const targetWords = targetPhrase.trim().toLowerCase().split(/\s+/).filter(Boolean);
2027
- if (targetWords.length === 0) return offset;
2028
-
2029
- // Flatten caption segments into word tokens
2030
- const tokens = [];
2031
- for (const seg of _captionData) {
2032
- if (Array.isArray(seg.words)) {
2033
- for (const w of seg.words) {
2034
- tokens.push({
2035
- word: (w.word || w.text || '').toLowerCase().replace(/[^a-z0-9]/g, ''),
2036
- start: w.start !== undefined ? w.start : seg.start,
2037
- end: w.end !== undefined ? w.end : seg.end
2038
- });
2039
- }
2040
- } else {
2041
- const segWords = (seg.text || '').trim().split(/\s+/).filter(Boolean);
2042
- const segDur = Math.max(0.1, (seg.end - seg.start) || 1);
2043
- const wordDur = segDur / Math.max(1, segWords.length);
2044
- for (let i = 0; i < segWords.length; i++) {
2045
- tokens.push({
2046
- word: segWords[i].toLowerCase().replace(/[^a-z0-9]/g, ''),
2047
- start: seg.start + i * wordDur,
2048
- end: seg.start + (i + 1) * wordDur
2049
- });
2050
- }
2051
- }
2052
- }
2053
-
2054
- for (let i = 0; i <= tokens.length - targetWords.length; i++) {
2055
- let match = true;
2056
- for (let j = 0; j < targetWords.length; j++) {
2057
- if (tokens[i + j].word !== targetWords[j]) {
2058
- match = false;
2059
- break;
2060
- }
2061
- }
2062
- if (match) {
2063
- return tokens[i].start + offset;
2064
- }
2065
- }
2066
-
2067
- throw new Error(`FATAL SYNC ERROR: Phrase "${targetPhrase}" not found in captions track!`);
2068
- }
2069
-
2070
- // ── on() — raw per-frame hook ─────────────────────────────────────────────────
2071
-
2072
- /**
2073
- * Register a raw per-frame callback (no associated DOM element).
2074
- * @param {(t: number) => void} fn
2075
- */
2076
- export function on(fn) {
2077
- _layers.push({ _tick: fn, name: '_raw_' + _layers.length });
2078
- }
2079
-
2080
- // ── Private helpers ───────────────────────────────────────────────────────────
2081
-
2082
- function _positionEl(el, x, y) {
2083
- if (x === 'center') {
2084
- el.style.left = '50%';
2085
- el.style.transform = (el.style.transform || '') + ' translateX(-50%)';
2086
- } else {
2087
- el.style.left = `${x}px`;
2088
- }
2089
- if (y === 'center') {
2090
- el.style.top = '50%';
2091
- el.style.transform = (el.style.transform || '') + ' translateY(-50%)';
2092
- } else {
2093
- el.style.top = `${y}px`;
2094
- }
2095
- }
2096
-
2097
- function _stylesToCSS(styles) {
2098
- const mapped = {};
2099
- for (const [k, v] of Object.entries(styles)) {
2100
- if (v === null || v === undefined) continue;
2101
- if (typeof v === 'number') {
2102
- // Numeric pixel values for known layout props
2103
- const pixelProps = new Set([
2104
- 'top','left','right','bottom','width','height',
2105
- 'marginTop','marginBottom','marginLeft','marginRight',
2106
- 'paddingTop','paddingBottom','paddingLeft','paddingRight',
2107
- 'borderRadius','fontSize','gap',
2108
- ]);
2109
- mapped[k] = pixelProps.has(k) ? `${v}px` : String(v);
2110
- } else {
2111
- mapped[k] = String(v);
2112
- }
2113
- }
2114
- return mapped;
2115
- }
2116
-
2117
- // ── Browser live-preview loop (development only) ──────────────────────────────
2118
- // When loaded in a normal browser (not Playwright headless), drive the
2119
- // compositor from requestAnimationFrame using the real clock.
2120
-
2121
- if (typeof window !== 'undefined' && !window.__playwright) {
2122
- let _startTime = null;
2123
- let _prevT = 0;
2124
- function _raf(ts) {
2125
- if (_startTime === null) _startTime = ts;
2126
- const t = Math.min((ts - _startTime) / 1000, REEL.duration);
2127
- seek(t);
2128
- // Live preview procedural audio playback
2129
- if (_cues.length > 0) {
2130
- for (const c of _cues) {
2131
- if (_prevT < c.t && t >= c.t) {
2132
- _playProceduralSFX(c.sfxName, c.vol);
2133
- }
2134
- }
2135
- }
2136
- _prevT = t;
2137
- if (t < REEL.duration) requestAnimationFrame(_raf);
2138
- }
2139
- window.addEventListener('load', () => {
2140
- if (!window.seek) window.seek = seek;
2141
- requestAnimationFrame(_raf);
2142
- });
2143
- }