zilmate 1.9.3 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/.agents/skills/ad-creative/SKILL.md +362 -0
  2. package/.agents/skills/ad-creative/evals/evals.json +90 -0
  3. package/.agents/skills/ad-creative/references/generative-tools.md +637 -0
  4. package/.agents/skills/ad-creative/references/platform-specs.md +213 -0
  5. package/.agents/skills/ai-seo/SKILL.md +489 -0
  6. package/.agents/skills/ai-seo/evals/evals.json +90 -0
  7. package/.agents/skills/ai-seo/references/content-patterns.md +285 -0
  8. package/.agents/skills/ai-seo/references/content-types.md +71 -0
  9. package/.agents/skills/ai-seo/references/okf.md +104 -0
  10. package/.agents/skills/ai-seo/references/platform-ranking-factors.md +154 -0
  11. package/.agents/skills/clerk-backend-api/SKILL.md +426 -0
  12. package/.agents/skills/clerk-backend-api/evals/evals.json +87 -0
  13. package/.agents/skills/clerk-backend-api/scripts/api-specs-context.sh +30 -0
  14. package/.agents/skills/clerk-backend-api/scripts/execute-request.sh +88 -0
  15. package/.agents/skills/clerk-backend-api/scripts/extract-endpoint-detail.sh +165 -0
  16. package/.agents/skills/clerk-backend-api/scripts/extract-tag-endpoints.sh +208 -0
  17. package/.agents/skills/clerk-backend-api/scripts/extract-tags.js +14 -0
  18. package/.agents/skills/copy-editing/SKILL.md +457 -0
  19. package/.agents/skills/copy-editing/evals/evals.json +89 -0
  20. package/.agents/skills/copy-editing/references/checklist.md +66 -0
  21. package/.agents/skills/copy-editing/references/content-refresh.md +38 -0
  22. package/.agents/skills/copy-editing/references/plain-english-alternatives.md +394 -0
  23. package/.agents/skills/hyperframes/SKILL.md +163 -0
  24. package/.agents/skills/hyperframes-cli/SKILL.md +109 -0
  25. package/.agents/skills/hyperframes-cli/references/doctor-browser.md +45 -0
  26. package/.agents/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
  27. package/.agents/skills/hyperframes-cli/references/lambda.md +132 -0
  28. package/.agents/skills/hyperframes-cli/references/lint-validate-inspect.md +121 -0
  29. package/.agents/skills/hyperframes-cli/references/preview-render.md +109 -0
  30. package/.agents/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
  31. package/.agents/skills/hyperframes-media/SKILL.md +97 -0
  32. package/.agents/skills/hyperframes-media/assets/sfx/CREDITS.md +35 -0
  33. package/.agents/skills/hyperframes-media/assets/sfx/manifest.json +97 -0
  34. package/.agents/skills/hyperframes-media/references/bgm.md +72 -0
  35. package/.agents/skills/hyperframes-media/references/captions/authoring.md +159 -0
  36. package/.agents/skills/hyperframes-media/references/captions/motion.md +87 -0
  37. package/.agents/skills/hyperframes-media/references/captions/transcript-handling.md +97 -0
  38. package/.agents/skills/hyperframes-media/references/remove-background.md +143 -0
  39. package/.agents/skills/hyperframes-media/references/requirements.md +29 -0
  40. package/.agents/skills/hyperframes-media/references/sfx.md +42 -0
  41. package/.agents/skills/hyperframes-media/references/transcribe.md +52 -0
  42. package/.agents/skills/hyperframes-media/references/tts-to-captions.md +24 -0
  43. package/.agents/skills/hyperframes-media/references/tts.md +135 -0
  44. package/.agents/skills/hyperframes-media/scripts/audio.mjs +282 -0
  45. package/.agents/skills/hyperframes-media/scripts/heygen-tts.mjs +121 -0
  46. package/.agents/skills/hyperframes-media/scripts/lib/bgm.mjs +235 -0
  47. package/.agents/skills/hyperframes-media/scripts/lib/heygen.mjs +131 -0
  48. package/.agents/skills/hyperframes-media/scripts/lib/sfx.mjs +128 -0
  49. package/.agents/skills/hyperframes-media/scripts/lib/tts.mjs +220 -0
  50. package/.agents/skills/hyperframes-media/scripts/lyria-recipe.py +128 -0
  51. package/.agents/skills/hyperframes-media/scripts/wait-bgm.mjs +167 -0
  52. package/.agents/skills/hyperframes-registry/SKILL.md +101 -0
  53. package/.agents/skills/hyperframes-registry/examples/add-block.md +51 -0
  54. package/.agents/skills/hyperframes-registry/examples/add-component.md +73 -0
  55. package/.agents/skills/hyperframes-registry/references/contributing.md +166 -0
  56. package/.agents/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
  57. package/.agents/skills/hyperframes-registry/references/discovery.md +215 -0
  58. package/.agents/skills/hyperframes-registry/references/install-locations.md +45 -0
  59. package/.agents/skills/hyperframes-registry/references/templates.md +417 -0
  60. package/.agents/skills/hyperframes-registry/references/wiring-blocks.md +61 -0
  61. package/.agents/skills/hyperframes-registry/references/wiring-components.md +39 -0
  62. package/.agents/skills/marketing-psychology/SKILL.md +455 -0
  63. package/.agents/skills/marketing-psychology/evals/evals.json +88 -0
  64. package/.agents/skills/mintlify/SKILL.md +328 -0
  65. package/.agents/skills/product-launch-video/SKILL.md +206 -0
  66. package/.agents/skills/product-launch-video/references/cut-catalog.md +220 -0
  67. package/.agents/skills/product-launch-video/references/motion-language.md +156 -0
  68. package/.agents/skills/product-launch-video/references/story-design.md +373 -0
  69. package/.agents/skills/product-launch-video/references/visual-design.md +126 -0
  70. package/.agents/skills/product-launch-video/scripts/assemble-index.mjs +570 -0
  71. package/.agents/skills/product-launch-video/scripts/audio.mjs +253 -0
  72. package/.agents/skills/product-launch-video/scripts/build-frame.mjs +536 -0
  73. package/.agents/skills/product-launch-video/scripts/captions.mjs +508 -0
  74. package/.agents/skills/product-launch-video/scripts/lib/assets.mjs +55 -0
  75. package/.agents/skills/product-launch-video/scripts/lib/dimensions.mjs +45 -0
  76. package/.agents/skills/product-launch-video/scripts/lib/storyboard.mjs +249 -0
  77. package/.agents/skills/product-launch-video/scripts/lib/tokens.mjs +204 -0
  78. package/.agents/skills/product-launch-video/scripts/lib/transition-registry.mjs +38 -0
  79. package/.agents/skills/product-launch-video/scripts/lib/transitions.json +71 -0
  80. package/.agents/skills/product-launch-video/scripts/stage-assets.mjs +39 -0
  81. package/.agents/skills/product-launch-video/scripts/transitions.mjs +320 -0
  82. package/.agents/skills/product-launch-video/sub-agents/frame-worker.md +74 -0
  83. package/.agents/skills/prompt-engineering-patterns/SKILL.md +144 -0
  84. package/.agents/skills/prompt-engineering-patterns/assets/few-shot-examples.json +106 -0
  85. package/.agents/skills/prompt-engineering-patterns/assets/prompt-template-library.md +264 -0
  86. package/.agents/skills/prompt-engineering-patterns/references/chain-of-thought.md +412 -0
  87. package/.agents/skills/prompt-engineering-patterns/references/details.md +338 -0
  88. package/.agents/skills/prompt-engineering-patterns/references/few-shot-learning.md +386 -0
  89. package/.agents/skills/prompt-engineering-patterns/references/prompt-optimization.md +428 -0
  90. package/.agents/skills/prompt-engineering-patterns/references/prompt-templates.md +484 -0
  91. package/.agents/skills/prompt-engineering-patterns/references/system-prompts.md +195 -0
  92. package/.agents/skills/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
  93. package/.agents/skills/remotion-to-hyperframes/SKILL.md +127 -0
  94. package/.agents/skills/remotion-to-hyperframes/assets/.gitkeep +0 -0
  95. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/run.sh +249 -0
  96. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/README.md +41 -0
  97. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/expected.json +26 -0
  98. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/hf-src/index.html +61 -0
  99. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/package.json +14 -0
  100. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/remotion.config.ts +13 -0
  101. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/Root.tsx +13 -0
  102. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/TitleCard.tsx +34 -0
  103. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/src/index.ts +4 -0
  104. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-1-title-card/remotion-src/tsconfig.json +15 -0
  105. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/README.md +54 -0
  106. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/expected.json +29 -0
  107. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/hf-src/index.html +118 -0
  108. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/package.json +14 -0
  109. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/remotion.config.ts +13 -0
  110. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/MultiScene.tsx +105 -0
  111. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/Root.tsx +13 -0
  112. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/src/index.ts +4 -0
  113. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/remotion-src/tsconfig.json +15 -0
  114. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-2-multi-scene/setup.sh +34 -0
  115. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/README.md +85 -0
  116. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/expected.json +41 -0
  117. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/hf-src/index.html +269 -0
  118. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/package.json +15 -0
  119. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/remotion.config.ts +13 -0
  120. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Root.tsx +27 -0
  121. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/Stargazed.tsx +37 -0
  122. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/AnimatedNumber.tsx +23 -0
  123. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/StatCard.tsx +59 -0
  124. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/components/UnderlinedText.tsx +47 -0
  125. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/index.ts +4 -0
  126. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/OutroScene.tsx +18 -0
  127. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/StatsScene.tsx +34 -0
  128. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/src/scenes/TitleScene.tsx +55 -0
  129. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-3-data-driven/remotion-src/tsconfig.json +15 -0
  130. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/README.md +51 -0
  131. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/01-use-state.tsx +29 -0
  132. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/02-use-effect-deps.tsx +29 -0
  133. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/03-async-metadata.tsx +39 -0
  134. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/04-third-party-react.tsx +30 -0
  135. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/05-lambda-config.tsx +38 -0
  136. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/06-warnings-only.tsx +36 -0
  137. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/07-custom-hook.tsx +28 -0
  138. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/cases/08-mixed.tsx +41 -0
  139. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/expected.json +85 -0
  140. package/.agents/skills/remotion-to-hyperframes/assets/test-corpus/tier-4-escape-hatch/validate.sh +110 -0
  141. package/.agents/skills/remotion-to-hyperframes/references/api-map.md +142 -0
  142. package/.agents/skills/remotion-to-hyperframes/references/escape-hatch.md +115 -0
  143. package/.agents/skills/remotion-to-hyperframes/references/eval.md +140 -0
  144. package/.agents/skills/remotion-to-hyperframes/references/fonts.md +112 -0
  145. package/.agents/skills/remotion-to-hyperframes/references/limitations.md +136 -0
  146. package/.agents/skills/remotion-to-hyperframes/references/lottie.md +121 -0
  147. package/.agents/skills/remotion-to-hyperframes/references/media.md +149 -0
  148. package/.agents/skills/remotion-to-hyperframes/references/parameters.md +167 -0
  149. package/.agents/skills/remotion-to-hyperframes/references/sequencing.md +195 -0
  150. package/.agents/skills/remotion-to-hyperframes/references/timing.md +165 -0
  151. package/.agents/skills/remotion-to-hyperframes/references/transitions.md +114 -0
  152. package/.agents/skills/remotion-to-hyperframes/scripts/.gitkeep +0 -0
  153. package/.agents/skills/remotion-to-hyperframes/scripts/frame_strip.sh +107 -0
  154. package/.agents/skills/remotion-to-hyperframes/scripts/lint_source.py +358 -0
  155. package/.agents/skills/remotion-to-hyperframes/scripts/render_diff.sh +103 -0
  156. package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/blocker.tsx +50 -0
  157. package/.agents/skills/remotion-to-hyperframes/scripts/tests/fixtures/clean.tsx +46 -0
  158. package/.agents/skills/remotion-to-hyperframes/scripts/tests/smoke.sh +90 -0
  159. package/.agents/skills/seo-audit/SKILL.md +497 -0
  160. package/.agents/skills/seo-audit/evals/evals.json +136 -0
  161. package/.agents/skills/seo-audit/references/ai-writing-detection.md +200 -0
  162. package/.agents/skills/seo-audit/references/international-seo.md +230 -0
  163. package/README.md +4 -2
  164. package/SDK.md +64 -1
  165. package/dist/agents/coding.agent.d.ts +632 -0
  166. package/dist/agents/coding.agent.d.ts.map +1 -1
  167. package/dist/agents/coding.agent.js +11 -3
  168. package/dist/agents/coding.agent.js.map +1 -1
  169. package/dist/agents/developer-helper.agent.d.ts +704 -0
  170. package/dist/agents/developer-helper.agent.d.ts.map +1 -1
  171. package/dist/agents/developer-helper.agent.js +6 -0
  172. package/dist/agents/developer-helper.agent.js.map +1 -1
  173. package/dist/agents/manager.d.ts +1009 -4
  174. package/dist/agents/manager.d.ts.map +1 -1
  175. package/dist/agents/manager.js +16 -5
  176. package/dist/agents/manager.js.map +1 -1
  177. package/dist/agents/security.agent.d.ts +157 -3
  178. package/dist/agents/security.agent.d.ts.map +1 -1
  179. package/dist/agents/security.agent.js +3 -0
  180. package/dist/agents/security.agent.js.map +1 -1
  181. package/dist/agents/swarm/main.js +1 -1
  182. package/dist/agents/swarm/main.js.map +1 -1
  183. package/dist/agents/swarm/registry.d.ts.map +1 -1
  184. package/dist/agents/swarm/registry.js +232 -26
  185. package/dist/agents/swarm/registry.js.map +1 -1
  186. package/dist/cli/chat.d.ts +1 -1
  187. package/dist/cli/chat.d.ts.map +1 -1
  188. package/dist/cli/chat.js +32 -10
  189. package/dist/cli/chat.js.map +1 -1
  190. package/dist/cli/doctor.d.ts +14 -0
  191. package/dist/cli/doctor.d.ts.map +1 -1
  192. package/dist/cli/doctor.js +91 -0
  193. package/dist/cli/doctor.js.map +1 -1
  194. package/dist/cli/format.d.ts +1 -0
  195. package/dist/cli/format.d.ts.map +1 -1
  196. package/dist/cli/format.js +68 -14
  197. package/dist/cli/format.js.map +1 -1
  198. package/dist/cli/menu.d.ts.map +1 -1
  199. package/dist/cli/menu.js +102 -0
  200. package/dist/cli/menu.js.map +1 -1
  201. package/dist/cli/setup.d.ts +10 -0
  202. package/dist/cli/setup.d.ts.map +1 -1
  203. package/dist/cli/setup.js +187 -3
  204. package/dist/cli/setup.js.map +1 -1
  205. package/dist/cli/update.d.ts +2 -0
  206. package/dist/cli/update.d.ts.map +1 -1
  207. package/dist/cli/update.js +89 -1
  208. package/dist/cli/update.js.map +1 -1
  209. package/dist/config/env.d.ts +12 -0
  210. package/dist/config/env.d.ts.map +1 -1
  211. package/dist/config/env.js +19 -5
  212. package/dist/config/env.js.map +1 -1
  213. package/dist/index.d.ts +1 -1
  214. package/dist/index.d.ts.map +1 -1
  215. package/dist/index.js +61 -5
  216. package/dist/index.js.map +1 -1
  217. package/dist/jobs/trigger-orchestrator.d.ts +5 -1
  218. package/dist/jobs/trigger-orchestrator.d.ts.map +1 -1
  219. package/dist/jobs/trigger-orchestrator.js +29 -9
  220. package/dist/jobs/trigger-orchestrator.js.map +1 -1
  221. package/dist/jobs/trigger-router.d.ts.map +1 -1
  222. package/dist/jobs/trigger-router.js +3 -2
  223. package/dist/jobs/trigger-router.js.map +1 -1
  224. package/dist/memory/corporate-wiki.d.ts +15 -0
  225. package/dist/memory/corporate-wiki.d.ts.map +1 -0
  226. package/dist/memory/corporate-wiki.js +152 -0
  227. package/dist/memory/corporate-wiki.js.map +1 -0
  228. package/dist/observability/doctor.d.ts.map +1 -1
  229. package/dist/observability/doctor.js +12 -4
  230. package/dist/observability/doctor.js.map +1 -1
  231. package/dist/pre-init.d.ts +2 -0
  232. package/dist/pre-init.d.ts.map +1 -0
  233. package/dist/pre-init.js +3 -0
  234. package/dist/pre-init.js.map +1 -0
  235. package/dist/runtime/chat-bridge.d.ts.map +1 -1
  236. package/dist/runtime/chat-bridge.js +33 -2
  237. package/dist/runtime/chat-bridge.js.map +1 -1
  238. package/dist/runtime/swarm.d.ts +0 -1
  239. package/dist/runtime/swarm.d.ts.map +1 -1
  240. package/dist/runtime/swarm.js +26 -15
  241. package/dist/runtime/swarm.js.map +1 -1
  242. package/dist/safety/approvals.d.ts +2 -2
  243. package/dist/safety/approvals.d.ts.map +1 -1
  244. package/dist/safety/approvals.js +47 -1
  245. package/dist/safety/approvals.js.map +1 -1
  246. package/dist/safety/redaction.d.ts.map +1 -1
  247. package/dist/safety/redaction.js +10 -0
  248. package/dist/safety/redaction.js.map +1 -1
  249. package/dist/server.d.ts +1 -0
  250. package/dist/server.d.ts.map +1 -1
  251. package/dist/server.js +1 -0
  252. package/dist/server.js.map +1 -1
  253. package/dist/tools/cloud.tool.d.ts +394 -0
  254. package/dist/tools/cloud.tool.d.ts.map +1 -0
  255. package/dist/tools/cloud.tool.js +784 -0
  256. package/dist/tools/cloud.tool.js.map +1 -0
  257. package/dist/tools/computer-use.tool.d.ts +6 -6
  258. package/dist/tools/corporate-wiki.tool.d.ts +22 -0
  259. package/dist/tools/corporate-wiki.tool.d.ts.map +1 -0
  260. package/dist/tools/corporate-wiki.tool.js +39 -0
  261. package/dist/tools/corporate-wiki.tool.js.map +1 -0
  262. package/dist/tools/desktop.tool.d.ts +96 -0
  263. package/dist/tools/desktop.tool.d.ts.map +1 -1
  264. package/dist/tools/desktop.tool.js +439 -0
  265. package/dist/tools/desktop.tool.js.map +1 -1
  266. package/dist/tools/devops.tool.d.ts +162 -0
  267. package/dist/tools/devops.tool.d.ts.map +1 -0
  268. package/dist/tools/devops.tool.js +377 -0
  269. package/dist/tools/devops.tool.js.map +1 -0
  270. package/dist/tools/multimedia.tool.d.ts +126 -0
  271. package/dist/tools/multimedia.tool.d.ts.map +1 -0
  272. package/dist/tools/multimedia.tool.js +533 -0
  273. package/dist/tools/multimedia.tool.js.map +1 -0
  274. package/dist/tools/osint.tool.d.ts +6 -6
  275. package/dist/tools/sandbox-dev.tool.d.ts +15 -0
  276. package/dist/tools/sandbox-dev.tool.d.ts.map +1 -0
  277. package/dist/tools/sandbox-dev.tool.js +139 -0
  278. package/dist/tools/sandbox-dev.tool.js.map +1 -0
  279. package/dist/tools/setup-assistant.tool.d.ts +1 -1
  280. package/dist/tools/shell.tool.d.ts +82 -0
  281. package/dist/tools/shell.tool.d.ts.map +1 -1
  282. package/dist/tools/shell.tool.js +192 -1
  283. package/dist/tools/shell.tool.js.map +1 -1
  284. package/dist/tools/swarm-ops.tool.d.ts +14 -0
  285. package/dist/tools/swarm-ops.tool.d.ts.map +1 -1
  286. package/dist/tools/swarm-ops.tool.js +44 -0
  287. package/dist/tools/swarm-ops.tool.js.map +1 -1
  288. package/dist/tools/sysops.tool.d.ts +157 -0
  289. package/dist/tools/sysops.tool.d.ts.map +1 -0
  290. package/dist/tools/sysops.tool.js +643 -0
  291. package/dist/tools/sysops.tool.js.map +1 -0
  292. package/dist/voice/cascade.d.ts +1 -0
  293. package/dist/voice/cascade.d.ts.map +1 -1
  294. package/dist/voice/cascade.js +16 -1
  295. package/dist/voice/cascade.js.map +1 -1
  296. package/dist/voice/deepgram.d.ts.map +1 -1
  297. package/dist/voice/deepgram.js +34 -2
  298. package/dist/voice/deepgram.js.map +1 -1
  299. package/dist/voice/terminal.d.ts +1 -0
  300. package/dist/voice/terminal.d.ts.map +1 -1
  301. package/dist/voice/terminal.js +28 -0
  302. package/dist/voice/terminal.js.map +1 -1
  303. package/dist/voice/types.d.ts +2 -0
  304. package/dist/voice/types.d.ts.map +1 -1
  305. package/package.json +9 -1
  306. package/scripts/release-github.mjs +23 -18
@@ -0,0 +1,253 @@
1
+ #!/usr/bin/env node
2
+ // audio.mjs — product-launch audio ADAPTER. The TTS / BGM / SFX implementation
3
+ // no longer lives here: it is the shared engine at
4
+ // ../../hyperframes-media/scripts/audio.mjs. This file only (a) maps the
5
+ // product-launch model (SCRIPT.md frames + STORYBOARD.md music/sfx) into the
6
+ // engine's neutral audio_request.json, (b) converts the engine's id-keyed
7
+ // audio_meta back into the frame-keyed shape captions.mjs / assemble-index.mjs
8
+ // already consume, and (c) keeps the local `sync-durations` pass (it rewrites
9
+ // STORYBOARD.md, which is product-launch-specific).
10
+ //
11
+ // Three modes (unchanged CLI surface):
12
+ // (default) generate — engine --only tts,bgm. BGM mode is "retrieve" (strict:
13
+ // no HeyGen credential ⇒ skip, never a detached generate, since this
14
+ // workflow has no wait-bgm step). Runs in the background during Step 4.
15
+ // sync-durations — write real voice durations into STORYBOARD.md (local).
16
+ // fetch-sfx — engine --only sfx, merged into the existing meta (Step 5,
17
+ // after the frames' `sfx:` cues exist).
18
+ //
19
+ // node audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json
20
+ // node audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md
21
+ // node audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .
22
+
23
+ import { spawnSync } from "node:child_process";
24
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
25
+ import { dirname, join, resolve } from "node:path";
26
+ import { fileURLToPath } from "node:url";
27
+ import { parseStoryboard } from "./lib/storyboard.mjs";
28
+
29
+ const HERE = dirname(fileURLToPath(import.meta.url));
30
+ const DEFAULT_ENGINE = join(HERE, "..", "..", "hyperframes-media", "scripts", "audio.mjs");
31
+
32
+ const flag = (argv, name, def) => {
33
+ const i = argv.indexOf(`--${name}`);
34
+ return i >= 0 && i + 1 < argv.length ? argv[i + 1] : def;
35
+ };
36
+ const pad2 = (n) => String(n).padStart(2, "0");
37
+
38
+ // SCRIPT.md → [{ frame, text }]. `## … (Frame N)` opens a line; `**key:**` rows
39
+ // are metadata; the indented block is the spoken text (the only TTS input).
40
+ function parseScript(md) {
41
+ const out = [];
42
+ let cur = null;
43
+ const flush = () => {
44
+ if (cur && cur.text.trim()) out.push({ frame: cur.frame, text: cur.text.trim() });
45
+ cur = null;
46
+ };
47
+ for (const line of md.split(/\r?\n/)) {
48
+ const h = line.match(/^#{2,3}\s+.*?\(frame\s+(\d+)\)/i);
49
+ if (h) {
50
+ flush();
51
+ cur = { frame: Number(h[1]), text: "" };
52
+ continue;
53
+ }
54
+ if (!cur) continue;
55
+ if (/^\s*\*\*/.test(line)) continue;
56
+ const m = line.match(/^(?: {4,}|\t)(.+)$/);
57
+ if (m) cur.text += (cur.text ? " " : "") + m[1].trim();
58
+ }
59
+ flush();
60
+ return out;
61
+ }
62
+
63
+ // Path of the engine's neutral meta — a stable sidecar so `--only` merges
64
+ // (generate then fetch-sfx) accumulate, while audio_meta.json holds the PL shape.
65
+ const neutralPath = (plOutPath) => join(dirname(plOutPath), "audio_engine_meta.json");
66
+
67
+ // Run the shared engine. Returns nothing; dies on a non-zero exit.
68
+ function runEngine({ request, hyperframesDir, neutral, only, extra = [] }, die) {
69
+ const reqPath = join(hyperframesDir, "audio_request.json");
70
+ writeFileSync(reqPath, JSON.stringify(request, null, 2));
71
+ const engine = process.env.HF_MEDIA_ENGINE || DEFAULT_ENGINE;
72
+ if (!existsSync(engine)) die(`media audio engine not found at ${engine} (set $HF_MEDIA_ENGINE)`);
73
+ const args = [
74
+ engine,
75
+ "--request",
76
+ reqPath,
77
+ "--hyperframes",
78
+ hyperframesDir,
79
+ "--out",
80
+ neutral,
81
+ "--only",
82
+ only,
83
+ ...extra,
84
+ ];
85
+ const r = spawnSync("node", args, { stdio: "inherit" });
86
+ if (r.status !== 0) die(`media audio engine exited ${r.status}`);
87
+ }
88
+
89
+ // Engine neutral meta (id-keyed) → product-launch meta (frame-keyed) consumed by
90
+ // captions.mjs / assemble-index.mjs. id is the zero-padded frame number.
91
+ function toProductLaunchMeta(neutral) {
92
+ const voices = (neutral.voices ?? []).map((v) => ({
93
+ frame: Number(v.id),
94
+ path: v.path,
95
+ duration_s: v.duration_s,
96
+ words: (v.words ?? []).map((w) => ({ id: w.id, text: w.text, start: w.start, end: w.end })),
97
+ }));
98
+ const bgm = neutral.bgm
99
+ ? {
100
+ path: neutral.bgm.path,
101
+ volume: neutral.bgm.volume,
102
+ query: neutral.bgm.query ?? null,
103
+ duration_s: neutral.bgm.duration_s ?? null,
104
+ }
105
+ : null;
106
+ const sfx = (neutral.sfx ?? []).map((s) => ({
107
+ frame: Number(s.id),
108
+ file: s.file,
109
+ offset_s: s.offset_s ?? 0,
110
+ duration_s: s.duration_s ?? 1,
111
+ volume: s.volume ?? 0.35,
112
+ }));
113
+ return { bgm, voices, sfx };
114
+ }
115
+
116
+ // ── generate (TTS + BGM) ────────────────────────────────────────────────────
117
+ function runGenerate(argv) {
118
+ const die = (m) => {
119
+ console.error(`✗ audio generate: ${m}`);
120
+ process.exit(1);
121
+ };
122
+ const hyperframesDir = resolve(flag(argv, "hyperframes", "."));
123
+ const storyboardPath = resolve(flag(argv, "storyboard", join(hyperframesDir, "STORYBOARD.md")));
124
+ const scriptPath = resolve(flag(argv, "script", join(hyperframesDir, "SCRIPT.md")));
125
+ const outPath = resolve(flag(argv, "out", join(hyperframesDir, "audio_meta.json")));
126
+ const userVoice = flag(argv, "voice", null);
127
+ const speed = Number(flag(argv, "speed", "1.0")) || 1.0;
128
+
129
+ if (!existsSync(storyboardPath)) die(`STORYBOARD.md not found at ${storyboardPath}`);
130
+ const manifest = parseStoryboard(readFileSync(storyboardPath, "utf8"));
131
+ const g = manifest.globals;
132
+
133
+ const lines = existsSync(scriptPath)
134
+ ? parseScript(readFileSync(scriptPath, "utf8")).map((l) => ({
135
+ id: pad2(l.frame),
136
+ text: l.text,
137
+ }))
138
+ : [];
139
+ if (!lines.length) console.error("· no SCRIPT.md — silent film (BGM only)");
140
+
141
+ // BGM mood: storyboard `music:` → message → arc → default. `mode: retrieve` is
142
+ // strict here (no wait-bgm step downstream).
143
+ const query = (g.extra && g.extra.music) || g.message || g.arc || "calm cinematic underscore";
144
+ const request = {
145
+ provider: "auto",
146
+ speed,
147
+ lines,
148
+ bgm: { mode: "retrieve", query, blob: g.message || "", arc: g.arc || "" },
149
+ };
150
+ if (userVoice) request.voice = userVoice;
151
+
152
+ const neutral = neutralPath(outPath);
153
+ runEngine({ request, hyperframesDir, neutral, only: "tts,bgm" }, die);
154
+
155
+ const meta = toProductLaunchMeta(JSON.parse(readFileSync(neutral, "utf8")));
156
+ writeFileSync(outPath, JSON.stringify(meta, null, 2));
157
+ console.log(
158
+ `✓ audio generate: ${meta.voices.length} voice + ${meta.bgm ? "1 bgm" : "no bgm"} → ${outPath}`,
159
+ );
160
+ }
161
+
162
+ // ── fetch-sfx ────────────────────────────────────────────────────────────────
163
+ function runFetchSfx(argv) {
164
+ const die = (m) => {
165
+ console.error(`✗ audio fetch-sfx: ${m}`);
166
+ process.exit(1);
167
+ };
168
+ const hyperframesDir = resolve(flag(argv, "hyperframes", "."));
169
+ const storyboardPath = resolve(flag(argv, "storyboard", join(hyperframesDir, "STORYBOARD.md")));
170
+ const outPath = resolve(flag(argv, "audio-meta", join(hyperframesDir, "audio_meta.json")));
171
+
172
+ if (!existsSync(storyboardPath)) die(`STORYBOARD.md not found at ${storyboardPath}`);
173
+ const manifest = parseStoryboard(readFileSync(storyboardPath, "utf8"));
174
+
175
+ // Per-frame `sfx:` cues (comma-separated) → engine lines carrying only sfx.
176
+ const lines = [];
177
+ for (const f of manifest.frames) {
178
+ const names = (f.extra?.sfx ?? "")
179
+ .split(",")
180
+ .map((s) => s.trim())
181
+ .filter(Boolean);
182
+ if (names.length && f.number != null) lines.push({ id: pad2(f.number), sfx: names });
183
+ }
184
+
185
+ const neutral = neutralPath(outPath);
186
+ const request = { lines, bgm: { mode: "none" } };
187
+ // --only sfx is a MERGE, not an overwrite: the engine reads the existing neutral
188
+ // sidecar (audio_engine_meta.json) and recomputes only the sfx section, so the
189
+ // voices/bgm written by the earlier generate (--only tts,bgm) pass are preserved.
190
+ runEngine({ request, hyperframesDir, neutral, only: "sfx" }, die);
191
+
192
+ const meta = toProductLaunchMeta(JSON.parse(readFileSync(neutral, "utf8")));
193
+ writeFileSync(outPath, JSON.stringify(meta, null, 2));
194
+ console.log(`✓ audio fetch-sfx: ${meta.sfx.length} SFX cue(s) → ${outPath}`);
195
+ }
196
+
197
+ // ── sync-durations (local; rewrites STORYBOARD.md) ────────────────────────────
198
+ function runSyncDurations(argv) {
199
+ const die = (m) => {
200
+ console.error(`✗ audio sync-durations: ${m}`);
201
+ process.exit(1);
202
+ };
203
+ const hyperframesDir = resolve(flag(argv, "hyperframes", "."));
204
+ const audioMetaPath = resolve(flag(argv, "audio-meta", join(hyperframesDir, "audio_meta.json")));
205
+ const storyboardPath = resolve(flag(argv, "storyboard", join(hyperframesDir, "STORYBOARD.md")));
206
+ if (!existsSync(audioMetaPath)) die(`audio_meta.json not found at ${audioMetaPath}`);
207
+
208
+ const meta = JSON.parse(readFileSync(audioMetaPath, "utf8"));
209
+ const durByFrame = new Map();
210
+ for (const v of meta.voices ?? []) {
211
+ if (v.frame != null && v.duration_s) durByFrame.set(v.frame, v.duration_s);
212
+ }
213
+
214
+ // Read directly and handle ENOENT here, rather than an existsSync precheck —
215
+ // the check→write pair (write-back below) is a TOCTOU race CodeQL flags.
216
+ let storyboardRaw = "";
217
+ try {
218
+ storyboardRaw = readFileSync(storyboardPath, "utf8");
219
+ } catch {
220
+ die(`STORYBOARD.md not found at ${storyboardPath}`);
221
+ }
222
+ const lines = storyboardRaw.split(/\r?\n/);
223
+ const FRAME_RE = /^#{2,3}\s+(?:frame|beat|scene)\b.*?(\d+)/i;
224
+ let curFrame = null;
225
+ let updated = 0;
226
+ for (let i = 0; i < lines.length; i++) {
227
+ const h = lines[i].match(FRAME_RE);
228
+ if (h) {
229
+ curFrame = Number(h[1]);
230
+ continue;
231
+ }
232
+ if (curFrame != null && durByFrame.has(curFrame)) {
233
+ const m = lines[i].match(/^(\s*[-*]\s+duration\s*:\s*).*/i);
234
+ if (m) {
235
+ lines[i] = `${m[1]}${durByFrame.get(curFrame)}s`;
236
+ durByFrame.delete(curFrame);
237
+ updated++;
238
+ }
239
+ }
240
+ }
241
+ writeFileSync(storyboardPath, lines.join("\n"));
242
+ const missing = [...durByFrame.keys()];
243
+ console.log(
244
+ `✓ audio sync-durations: ${updated} frame duration(s) updated` +
245
+ (missing.length ? ` · no \`- duration:\` line for frame(s) ${missing.join(", ")}` : ""),
246
+ );
247
+ }
248
+
249
+ // ── dispatch ──────────────────────────────────────────────────────────────────
250
+ const sub = process.argv[2];
251
+ if (sub === "sync-durations") runSyncDurations(process.argv.slice(3));
252
+ else if (sub === "fetch-sfx") runFetchSfx(process.argv.slice(3));
253
+ else runGenerate(process.argv.slice(2)); // default: generate