akari-video 0.1.0

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 (492) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -0
  3. package/bin/akari.mjs +14 -0
  4. package/package.json +42 -0
  5. package/src/cli.mjs +140 -0
  6. package/src/messages.mjs +100 -0
  7. package/src/path-lookup.mjs +47 -0
  8. package/src/project-state.mjs +25 -0
  9. package/src/repo-assets.mjs +59 -0
  10. package/src/task-labels.mjs +30 -0
  11. package/src/update-check.mjs +189 -0
  12. package/vendor/packages/project-scaffold/package.json +11 -0
  13. package/vendor/packages/project-scaffold/src/index.mjs +523 -0
  14. package/vendor/packages/project-scaffold/test/create-project.test.mjs +81 -0
  15. package/vendor/packages/project-scaffold/test/skill-adapter-link.test.mjs +204 -0
  16. package/vendor/packages/schemas/analysis.schema.json +475 -0
  17. package/vendor/packages/schemas/asset-meta.schema.json +225 -0
  18. package/vendor/packages/schemas/avatar-rendition.schema.json +65 -0
  19. package/vendor/packages/schemas/avatar.schema.json +178 -0
  20. package/vendor/packages/schemas/bin/validate-asset.mjs +597 -0
  21. package/vendor/packages/schemas/bin/validate-avatar.mjs +486 -0
  22. package/vendor/packages/schemas/bin/validate-captions.mjs +316 -0
  23. package/vendor/packages/schemas/bin/validate-connections.mjs +295 -0
  24. package/vendor/packages/schemas/bin/validate-edit.mjs +766 -0
  25. package/vendor/packages/schemas/bin/validate-intake.mjs +185 -0
  26. package/vendor/packages/schemas/bin/validate-interpretation.mjs +515 -0
  27. package/vendor/packages/schemas/bin/validate-plan-comments.mjs +170 -0
  28. package/vendor/packages/schemas/bin/validate-plan.mjs +365 -0
  29. package/vendor/packages/schemas/bin/validate-recipe.mjs +267 -0
  30. package/vendor/packages/schemas/bin/validate-research-plan.mjs +510 -0
  31. package/vendor/packages/schemas/bin/validate-review.mjs +427 -0
  32. package/vendor/packages/schemas/captions.schema.json +141 -0
  33. package/vendor/packages/schemas/connections.schema.json +153 -0
  34. package/vendor/packages/schemas/edit.schema.json +437 -0
  35. package/vendor/packages/schemas/examples/analysis-person-matte-valid/analysis.json +18 -0
  36. package/vendor/packages/schemas/examples/captions-text-style-background-mode-invalid/captions.json +18 -0
  37. package/vendor/packages/schemas/examples/captions-text-style-color-non-hex-invalid/captions.json +14 -0
  38. package/vendor/packages/schemas/examples/captions-text-style-default-only-valid/captions.json +27 -0
  39. package/vendor/packages/schemas/examples/captions-text-style-omitted-valid/captions.json +11 -0
  40. package/vendor/packages/schemas/examples/captions-text-style-opacity-out-of-range-invalid/captions.json +8 -0
  41. package/vendor/packages/schemas/examples/captions-text-style-record-override-valid/captions.json +27 -0
  42. package/vendor/packages/schemas/examples/captions-text-style-size-non-positive-invalid/captions.json +14 -0
  43. package/vendor/packages/schemas/examples/captions-text-style-zone-invalid/captions.json +16 -0
  44. package/vendor/packages/schemas/examples/connections-v0-invalid-auth/connections.json +32 -0
  45. package/vendor/packages/schemas/examples/connections-v0-memory-valid/connections.json +42 -0
  46. package/vendor/packages/schemas/examples/edit-beats-duplicate-id/edit.json +11 -0
  47. package/vendor/packages/schemas/examples/edit-beats-invalid-id/edit.json +10 -0
  48. package/vendor/packages/schemas/examples/edit-beats-missing-kind/edit.json +10 -0
  49. package/vendor/packages/schemas/examples/edit-beats-strength-out-of-range/edit.json +11 -0
  50. package/vendor/packages/schemas/examples/edit-beats-v0-src-present/edit.json +10 -0
  51. package/vendor/packages/schemas/examples/edit-beats-v0-valid/edit.json +29 -0
  52. package/vendor/packages/schemas/examples/edit-beats-v1-src-missing-reference/edit.json +14 -0
  53. package/vendor/packages/schemas/examples/edit-beats-v1-valid/edit.json +37 -0
  54. package/vendor/packages/schemas/examples/edit-bgm-ducking-invalid/edit.json +10 -0
  55. package/vendor/packages/schemas/examples/edit-bgm-fade-invalid/edit.json +10 -0
  56. package/vendor/packages/schemas/examples/edit-bgm-fade-valid/edit.json +10 -0
  57. package/vendor/packages/schemas/examples/edit-bgm-in-invalid/edit.json +10 -0
  58. package/vendor/packages/schemas/examples/edit-bgm-in-valid/edit.json +10 -0
  59. package/vendor/packages/schemas/examples/edit-bgm-missing-path/edit.json +10 -0
  60. package/vendor/packages/schemas/examples/edit-bgm-null-valid/edit.json +11 -0
  61. package/vendor/packages/schemas/examples/edit-bgm-sfx-gain-out-of-range/edit.json +11 -0
  62. package/vendor/packages/schemas/examples/edit-bgm-sfx-valid/edit.json +23 -0
  63. package/vendor/packages/schemas/examples/edit-chroma-key-invalid/edit.json +7 -0
  64. package/vendor/packages/schemas/examples/edit-cuts-at-negative-invalid/edit.json +7 -0
  65. package/vendor/packages/schemas/examples/edit-cuts-at-track-valid/edit.json +20 -0
  66. package/vendor/packages/schemas/examples/edit-cuts-opacity-out-of-range-invalid/edit.json +16 -0
  67. package/vendor/packages/schemas/examples/edit-cuts-track-invalid/edit.json +7 -0
  68. package/vendor/packages/schemas/examples/edit-cuts-transform-full-valid/edit.json +17 -0
  69. package/vendor/packages/schemas/examples/edit-cuts-transform-omitted-valid/edit.json +9 -0
  70. package/vendor/packages/schemas/examples/edit-cuts-transform-partial-valid/edit.json +16 -0
  71. package/vendor/packages/schemas/examples/edit-cuts-transform-rotate-invalid/edit.json +16 -0
  72. package/vendor/packages/schemas/examples/edit-cuts-transform-scale-invalid/edit.json +16 -0
  73. package/vendor/packages/schemas/examples/edit-cuts-transform-unknown-key-invalid/edit.json +16 -0
  74. package/vendor/packages/schemas/examples/edit-direction-intensity-negative/edit.json +8 -0
  75. package/vendor/packages/schemas/examples/edit-direction-intensity-not-integer/edit.json +8 -0
  76. package/vendor/packages/schemas/examples/edit-direction-intensity-out-of-range/edit.json +8 -0
  77. package/vendor/packages/schemas/examples/edit-direction-missing-preset/edit.json +8 -0
  78. package/vendor/packages/schemas/examples/edit-direction-overrides-array/edit.json +8 -0
  79. package/vendor/packages/schemas/examples/edit-direction-preset-only/edit.json +8 -0
  80. package/vendor/packages/schemas/examples/edit-direction-valid/edit.json +8 -0
  81. package/vendor/packages/schemas/examples/edit-emphasis-words-empty-word/edit.json +10 -0
  82. package/vendor/packages/schemas/examples/edit-emphasis-words-invalid-id/edit.json +10 -0
  83. package/vendor/packages/schemas/examples/edit-emphasis-words-missing-emotion/edit.json +10 -0
  84. package/vendor/packages/schemas/examples/edit-emphasis-words-range-invalid/edit.json +11 -0
  85. package/vendor/packages/schemas/examples/edit-emphasis-words-v0-src-present/edit.json +10 -0
  86. package/vendor/packages/schemas/examples/edit-emphasis-words-v0-valid/edit.json +32 -0
  87. package/vendor/packages/schemas/examples/edit-emphasis-words-v1-valid/edit.json +39 -0
  88. package/vendor/packages/schemas/examples/edit-layers-invalid-bad-blend/edit.json +17 -0
  89. package/vendor/packages/schemas/examples/edit-layers-invalid-chroma-key-on-baked/edit.json +17 -0
  90. package/vendor/packages/schemas/examples/edit-layers-invalid-duplicate-id/edit.json +11 -0
  91. package/vendor/packages/schemas/examples/edit-layers-track-invalid/edit.json +8 -0
  92. package/vendor/packages/schemas/examples/edit-layers-valid/edit.json +31 -0
  93. package/vendor/packages/schemas/examples/edit-look-invalid/edit.json +7 -0
  94. package/vendor/packages/schemas/examples/edit-master-invalid/edit.json +8 -0
  95. package/vendor/packages/schemas/examples/edit-narration-gain-out-of-range/edit.json +18 -0
  96. package/vendor/packages/schemas/examples/edit-narration-invalid-id/edit.json +17 -0
  97. package/vendor/packages/schemas/examples/edit-narration-missing-provenance/edit.json +16 -0
  98. package/vendor/packages/schemas/examples/edit-narration-valid/edit.json +36 -0
  99. package/vendor/packages/schemas/examples/edit-narration-voicevox-missing-credit/edit.json +20 -0
  100. package/vendor/packages/schemas/examples/edit-render-basics-valid/edit.json +22 -0
  101. package/vendor/packages/schemas/examples/edit-sfx-in-invalid/edit.json +10 -0
  102. package/vendor/packages/schemas/examples/edit-sfx-in-out-valid/edit.json +10 -0
  103. package/vendor/packages/schemas/examples/edit-sfx-out-invalid/edit.json +10 -0
  104. package/vendor/packages/schemas/examples/edit-sfx-out-type-invalid/edit.json +10 -0
  105. package/vendor/packages/schemas/examples/edit-sfx-t-invalid/edit.json +10 -0
  106. package/vendor/packages/schemas/examples/edit-sfx-track-invalid/edit.json +8 -0
  107. package/vendor/packages/schemas/examples/edit-speed-invalid/edit.json +7 -0
  108. package/vendor/packages/schemas/examples/edit-timeline-declared-valid/edit.json +14 -0
  109. package/vendor/packages/schemas/examples/edit-timeline-duplicate-id-invalid/edit.json +13 -0
  110. package/vendor/packages/schemas/examples/edit-timeline-interleaved-valid/edit.json +22 -0
  111. package/vendor/packages/schemas/examples/edit-timeline-omitted-valid/edit.json +7 -0
  112. package/vendor/packages/schemas/examples/edit-timeline-ref-invalid/edit.json +13 -0
  113. package/vendor/packages/schemas/examples/edit-tracks-section-invalid/edit.json +8 -0
  114. package/vendor/packages/schemas/examples/edit-tracks-section-valid/edit.json +13 -0
  115. package/vendor/packages/schemas/examples/edit-transition-invalid/edit.json +10 -0
  116. package/vendor/packages/schemas/examples/edit-v0-sample/edit.json +27 -0
  117. package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-a.html +17 -0
  118. package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-b.html +17 -0
  119. package/vendor/packages/schemas/examples/edit-v1-bgm-sfx-valid/edit.json +13 -0
  120. package/vendor/packages/schemas/examples/edit-v1-sample/edit.json +14 -0
  121. package/vendor/packages/schemas/examples/plan-comments-v0-sample/plan-comments.json +19 -0
  122. package/vendor/packages/schemas/examples/plan-v0-sample/plan.json +39 -0
  123. package/vendor/packages/schemas/examples/recipe-v0-sample/product-demo-quick-cuts.json +23 -0
  124. package/vendor/packages/schemas/examples/review-v1-sample/review.json +11 -0
  125. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/AVATAR.md +159 -0
  126. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/avatar.json +22 -0
  127. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/happy.png +0 -0
  128. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-half.png +0 -0
  129. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-open.png +0 -0
  130. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral.png +0 -0
  131. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/rendition.json +18 -0
  132. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/happy.png +0 -0
  133. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-half.png +0 -0
  134. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-open.png +0 -0
  135. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral.png +0 -0
  136. package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/rendition.json +18 -0
  137. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/AVATAR.md +30 -0
  138. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/avatar.json +22 -0
  139. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/happy.png +0 -0
  140. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-half.png +0 -0
  141. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-open.png +0 -0
  142. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral.png +0 -0
  143. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/rendition.json +18 -0
  144. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/happy.png +0 -0
  145. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-half.png +0 -0
  146. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-open.png +0 -0
  147. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral.png +0 -0
  148. package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/rendition.json +18 -0
  149. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/AVATAR.md +30 -0
  150. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/avatar.json +22 -0
  151. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/happy.png +0 -0
  152. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-half.png +0 -0
  153. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-open.png +0 -0
  154. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral.png +0 -0
  155. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/rendition.json +18 -0
  156. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/happy.png +0 -0
  157. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-half.png +0 -0
  158. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-open.png +0 -0
  159. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral.png +0 -0
  160. package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/rendition.json +18 -0
  161. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/AVATAR.md +30 -0
  162. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/avatar.json +22 -0
  163. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-half.png +0 -0
  164. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-open.png +0 -0
  165. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral.png +0 -0
  166. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/rendition.json +18 -0
  167. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/happy.png +0 -0
  168. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-half.png +0 -0
  169. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-open.png +0 -0
  170. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral.png +0 -0
  171. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/rendition.json +18 -0
  172. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/AVATAR.md +30 -0
  173. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/avatar.json +21 -0
  174. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/happy.png +0 -0
  175. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-half.png +0 -0
  176. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-open.png +0 -0
  177. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral.png +0 -0
  178. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/rendition.json +18 -0
  179. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/happy.png +0 -0
  180. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-half.png +0 -0
  181. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-open.png +0 -0
  182. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral.png +0 -0
  183. package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/rendition.json +18 -0
  184. package/vendor/packages/schemas/fixtures/avatar/invalid-no-avatar-json/AVATAR.md +30 -0
  185. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/AVATAR.md +30 -0
  186. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/avatar.json +22 -0
  187. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/happy.png +0 -0
  188. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-half.png +0 -0
  189. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-open.png +0 -0
  190. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral.png +0 -0
  191. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/rendition.json +18 -0
  192. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/happy.png +0 -0
  193. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-half.png +0 -0
  194. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-open.png +0 -0
  195. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral.png +0 -0
  196. package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/rendition.json +18 -0
  197. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/AVATAR.md +30 -0
  198. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/avatar.json +22 -0
  199. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/happy.png +0 -0
  200. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-half.png +0 -0
  201. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-open.png +0 -0
  202. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral.png +0 -0
  203. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/rendition.json +18 -0
  204. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/happy.png +0 -0
  205. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-half.png +0 -0
  206. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-open.png +0 -0
  207. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral.png +0 -0
  208. package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/rendition.json +18 -0
  209. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/AVATAR.md +30 -0
  210. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/avatar.json +22 -0
  211. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/happy.png +0 -0
  212. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-half.png +0 -0
  213. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-open.png +0 -0
  214. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral.png +0 -0
  215. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/rendition.json +18 -0
  216. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/happy.png +0 -0
  217. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-half.png +0 -0
  218. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-open.png +0 -0
  219. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral.png +0 -0
  220. package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/rendition.json +18 -0
  221. package/vendor/packages/schemas/fixtures/avatar/valid/AVATAR.md +30 -0
  222. package/vendor/packages/schemas/fixtures/avatar/valid/avatar.json +22 -0
  223. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/happy.png +0 -0
  224. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-half.png +0 -0
  225. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-open.png +0 -0
  226. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral.png +0 -0
  227. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/rendition.json +18 -0
  228. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/happy.png +0 -0
  229. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-half.png +0 -0
  230. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-open.png +0 -0
  231. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral.png +0 -0
  232. package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/rendition.json +18 -0
  233. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/AVATAR.md +30 -0
  234. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/avatar.json +23 -0
  235. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/happy.png +0 -0
  236. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-half.png +0 -0
  237. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-open.png +0 -0
  238. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral.png +0 -0
  239. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/rendition.json +18 -0
  240. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/happy.png +0 -0
  241. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-half.png +0 -0
  242. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-open.png +0 -0
  243. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral.png +0 -0
  244. package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/rendition.json +18 -0
  245. package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/AVATAR.md +28 -0
  246. package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/avatar.json +19 -0
  247. package/vendor/packages/schemas/fixtures/intake/invalid-duplicate-task/intake.json +8 -0
  248. package/vendor/packages/schemas/fixtures/intake/invalid-missing-submitted-at/intake.json +8 -0
  249. package/vendor/packages/schemas/fixtures/intake/invalid-target-exclusive/intake.json +8 -0
  250. package/vendor/packages/schemas/fixtures/intake/invalid-unknown-task/intake.json +8 -0
  251. package/vendor/packages/schemas/fixtures/intake/valid-draft/intake.json +8 -0
  252. package/vendor/packages/schemas/fixtures/intake/valid-submitted/intake.json +8 -0
  253. package/vendor/packages/schemas/fixtures/plan/invalid-bad-confidence-enum/plan.json +15 -0
  254. package/vendor/packages/schemas/fixtures/plan/invalid-constraint-bad-applies-to/plan.json +18 -0
  255. package/vendor/packages/schemas/fixtures/plan/invalid-dangling-media-path/plan.json +15 -0
  256. package/vendor/packages/schemas/fixtures/plan/invalid-duplicate-slot-id/plan.json +25 -0
  257. package/vendor/packages/schemas/fixtures/plan/invalid-missing-required-field/plan.json +14 -0
  258. package/vendor/packages/schemas/fixtures/plan/unsupported-version/plan.json +4 -0
  259. package/vendor/packages/schemas/fixtures/plan/valid/plan.json +40 -0
  260. package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.png +1 -0
  261. package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.wav +1 -0
  262. package/vendor/packages/schemas/fixtures/plan/valid/scaffold/broll.mp4 +1 -0
  263. package/vendor/packages/schemas/fixtures/plan/warns-confidence-gap/plan.json +28 -0
  264. package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-pass/plan-comments.json +6 -0
  265. package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-id-for-index-kind/plan-comments.json +13 -0
  266. package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-kind/plan-comments.json +13 -0
  267. package/vendor/packages/schemas/fixtures/plan-comments/invalid-comments-not-array/plan-comments.json +6 -0
  268. package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-comment-field/plan-comments.json +12 -0
  269. package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-version/plan-comments.json +5 -0
  270. package/vendor/packages/schemas/fixtures/plan-comments/unsupported-version/plan-comments.json +6 -0
  271. package/vendor/packages/schemas/fixtures/plan-comments/valid/plan-comments.json +19 -0
  272. package/vendor/packages/schemas/fixtures/plan-comments/valid-unknown-fields/plan-comments.json +15 -0
  273. package/vendor/packages/schemas/fixtures/recipe/invalid-bad-aspect/recipe.json +13 -0
  274. package/vendor/packages/schemas/fixtures/recipe/invalid-bad-confirmed-by/recipe.json +13 -0
  275. package/vendor/packages/schemas/fixtures/recipe/invalid-bad-name-casing/recipe.json +13 -0
  276. package/vendor/packages/schemas/fixtures/recipe/invalid-bad-workflow/recipe.json +13 -0
  277. package/vendor/packages/schemas/fixtures/recipe/invalid-duplicate-overlay-kind/recipe.json +13 -0
  278. package/vendor/packages/schemas/fixtures/recipe/invalid-empty-confirmed/recipe.json +9 -0
  279. package/vendor/packages/schemas/fixtures/recipe/invalid-empty-narration/recipe.json +13 -0
  280. package/vendor/packages/schemas/fixtures/recipe/invalid-missing-version/recipe.json +12 -0
  281. package/vendor/packages/schemas/fixtures/recipe/invalid-provenance-mismatch/recipe.json +15 -0
  282. package/vendor/packages/schemas/fixtures/recipe/invalid-source-project-path/recipe.json +13 -0
  283. package/vendor/packages/schemas/fixtures/recipe/unsupported-version/recipe.json +13 -0
  284. package/vendor/packages/schemas/fixtures/recipe/valid/recipe.json +15 -0
  285. package/vendor/packages/schemas/fixtures/recipe/valid-unknown-fields/recipe.json +16 -0
  286. package/vendor/packages/schemas/fixtures/review/invalid-malformed-canvas-target/review.json +6 -0
  287. package/vendor/packages/schemas/fixtures/review/invalid-malformed-doc-target/review.json +6 -0
  288. package/vendor/packages/schemas/fixtures/review/invalid-malformed-image-target/review.json +6 -0
  289. package/vendor/packages/schemas/fixtures/review/invalid-strokes-bad-space/review.json +6 -0
  290. package/vendor/packages/schemas/fixtures/review/invalid-strokes-canvas-rect-with-frame/review.json +6 -0
  291. package/vendor/packages/schemas/fixtures/review/invalid-strokes-image-rect-with-frame/review.json +6 -0
  292. package/vendor/packages/schemas/fixtures/review/invalid-video-null-sourcet/review.json +6 -0
  293. package/vendor/packages/schemas/fixtures/review/valid/review.json +8 -0
  294. package/vendor/packages/schemas/fixtures/review/valid-canvas-target/review.json +7 -0
  295. package/vendor/packages/schemas/fixtures/review/valid-input-session/review.json +6 -0
  296. package/vendor/packages/schemas/fixtures/review/valid-strokes/review.json +8 -0
  297. package/vendor/packages/schemas/intake.schema.json +117 -0
  298. package/vendor/packages/schemas/interpretation.schema.json +419 -0
  299. package/vendor/packages/schemas/package.json +18 -0
  300. package/vendor/packages/schemas/plan-comments.schema.json +52 -0
  301. package/vendor/packages/schemas/plan.schema.json +129 -0
  302. package/vendor/packages/schemas/recipe.schema.json +106 -0
  303. package/vendor/packages/schemas/research-plan.schema.json +230 -0
  304. package/vendor/packages/schemas/review.schema.json +227 -0
  305. package/vendor/packages/schemas/test/fixtures/asset/invalid-matched-by/audio/whoosh-transition/meta.json +31 -0
  306. package/vendor/packages/schemas/test/fixtures/asset/valid-catalog/audio/whoosh-transition/meta.json +31 -0
  307. package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/fragment.html +139 -0
  308. package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/meta.json +32 -0
  309. package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/preview.png +0 -0
  310. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-missing-ref/interpretation.json +131 -0
  311. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-ref-mismatch/interpretation.json +132 -0
  312. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-arc-empty-refs/interpretation.json +126 -0
  313. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-missing-interview/interpretation.json +126 -0
  314. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-null-intake/interpretation.json +133 -0
  315. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-dangling-arc-ref/interpretation.json +132 -0
  316. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-duplicate-asset-ref/interpretation.json +132 -0
  317. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-bad-type/interpretation.json +132 -0
  318. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-missing-evidence/interpretation.json +131 -0
  319. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-missing-required-field/interpretation.json +131 -0
  320. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answer-present-when-open/interpretation.json +133 -0
  321. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answered-without-answer/interpretation.json +131 -0
  322. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-dangling-target/interpretation.json +132 -0
  323. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-self-reference/interpretation.json +132 -0
  324. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-end-before-start/interpretation.json +132 -0
  325. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-mismatched-start-end/interpretation.json +131 -0
  326. package/vendor/packages/schemas/test/fixtures/interpretation/invalid-unknown-root-field/interpretation.json +133 -0
  327. package/vendor/packages/schemas/test/fixtures/interpretation/unsupported-version/interpretation.json +132 -0
  328. package/vendor/packages/schemas/test/fixtures/interpretation/valid/interpretation.json +132 -0
  329. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-bad-category-enum/research-plan.json +128 -0
  330. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-chapter-ref/research-plan.json +128 -0
  331. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-shot-list-ref/research-plan.json +128 -0
  332. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-decided-at-mismatch/research-plan.json +128 -0
  333. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-duplicate-candidate-id/research-plan.json +128 -0
  334. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-japan-sns-notes-empty/research-plan.json +128 -0
  335. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-missing-required-field/research-plan.json +127 -0
  336. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-selected-missing-candidate/research-plan.json +128 -0
  337. package/vendor/packages/schemas/test/fixtures/research-plan/invalid-structure-confirmed-mismatch/research-plan.json +128 -0
  338. package/vendor/packages/schemas/test/fixtures/research-plan/unsupported-version/research-plan.json +128 -0
  339. package/vendor/packages/schemas/test/fixtures/research-plan/valid/research-plan.json +79 -0
  340. package/vendor/packages/schemas/test/fixtures/research-plan/warns-empty-sources/research-plan.json +120 -0
  341. package/vendor/packages/schemas/test/validate-asset.test.mjs +38 -0
  342. package/vendor/packages/schemas/test/validate-avatar.test.mjs +109 -0
  343. package/vendor/packages/schemas/test/validate-captions.test.mjs +59 -0
  344. package/vendor/packages/schemas/test/validate-connections.test.mjs +31 -0
  345. package/vendor/packages/schemas/test/validate-edit.test.mjs +490 -0
  346. package/vendor/packages/schemas/test/validate-intake.test.mjs +66 -0
  347. package/vendor/packages/schemas/test/validate-interpretation.test.mjs +167 -0
  348. package/vendor/packages/schemas/test/validate-plan-comments.test.mjs +70 -0
  349. package/vendor/packages/schemas/test/validate-plan.test.mjs +67 -0
  350. package/vendor/packages/schemas/test/validate-recipe.test.mjs +107 -0
  351. package/vendor/packages/schemas/test/validate-research-plan.test.mjs +98 -0
  352. package/vendor/packages/schemas/test/validate-review.test.mjs +102 -0
  353. package/vendor/skills/.gitkeep +0 -0
  354. package/vendor/skills/address-review/SKILL.md +84 -0
  355. package/vendor/skills/address-review/bin/core/review-store.mjs +210 -0
  356. package/vendor/skills/address-review/bin/list.mjs +198 -0
  357. package/vendor/skills/address-review/bin/respond.mjs +89 -0
  358. package/vendor/skills/address-review/dev-fixtures/fixture-project/captions.json +22 -0
  359. package/vendor/skills/address-review/dev-fixtures/fixture-project/edit.json +12 -0
  360. package/vendor/skills/address-review/dev-fixtures/fixture-project/review.json +100 -0
  361. package/vendor/skills/address-review/test/review-store.test.mjs +201 -0
  362. package/vendor/skills/analyze-footage/SKILL.md +35 -0
  363. package/vendor/skills/analyze-footage/analysis-json.md +185 -0
  364. package/vendor/skills/analyze-footage/bin/person-matte/person-matte-helper.swift +343 -0
  365. package/vendor/skills/analyze-footage/bin/person-matte/person-matte.mjs +415 -0
  366. package/vendor/skills/analyze-footage/bin/speechanalyzer-helper.swift +138 -0
  367. package/vendor/skills/analyze-footage/bin/transcribe-cloud.mjs +486 -0
  368. package/vendor/skills/analyze-footage/bin/transcribe-sa.mjs +189 -0
  369. package/vendor/skills/analyze-footage/events-and-hooks.md +93 -0
  370. package/vendor/skills/analyze-footage/keyframes-and-review.md +130 -0
  371. package/vendor/skills/analyze-footage/media-and-transcript.md +219 -0
  372. package/vendor/skills/analyze-footage/person-matte.md +121 -0
  373. package/vendor/skills/analyze-footage/references/akari-data-contract.md +18 -0
  374. package/vendor/skills/analyze-footage/references/asset.meta.example.json +23 -0
  375. package/vendor/skills/analyze-footage/test/fixtures/scribe-punctuation-inflation.json +17 -0
  376. package/vendor/skills/analyze-footage/test/normalize-scribe.test.mjs +76 -0
  377. package/vendor/skills/analyze-footage/workflow.md +95 -0
  378. package/vendor/skills/analyze-project/SKILL.md +58 -0
  379. package/vendor/skills/analyze-project/collect.md +51 -0
  380. package/vendor/skills/analyze-project/decision-record.md +55 -0
  381. package/vendor/skills/analyze-project/interpretation.md +128 -0
  382. package/vendor/skills/analyze-project/interview.md +66 -0
  383. package/vendor/skills/analyze-project/references/interpretation-shape.md +42 -0
  384. package/vendor/skills/analyze-project/references/open-questions-examples.md +35 -0
  385. package/vendor/skills/analyze-project/validate-and-render.md +66 -0
  386. package/vendor/skills/bake-3d/SKILL.md +78 -0
  387. package/vendor/skills/compile-review-session/SKILL.md +78 -0
  388. package/vendor/skills/compile-review-session/bin/compile-review-session.mjs +799 -0
  389. package/vendor/skills/compile-review-session/bin/core/canvas-compiler.mjs +105 -0
  390. package/vendor/skills/compile-review-session/bin/core/compiler.mjs +221 -0
  391. package/vendor/skills/compile-review-session/bin/core/review-store.mjs +74 -0
  392. package/vendor/skills/compile-review-session/bin/core/time-mapping.mjs +370 -0
  393. package/vendor/skills/compile-review-session/bin/core/transcription.mjs +721 -0
  394. package/vendor/skills/compile-review-session/compilation-rules.md +98 -0
  395. package/vendor/skills/compile-review-session/dev-fixtures/README.md +24 -0
  396. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/audio.wav +0 -0
  397. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/edit.snapshot.json +12 -0
  398. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/events.jsonl +2 -0
  399. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/session.json +11 -0
  400. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/audio.wav +0 -0
  401. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/edit.snapshot.json +12 -0
  402. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/events.jsonl +5 -0
  403. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/session.json +11 -0
  404. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/audio.wav +0 -0
  405. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/edit.snapshot.json +12 -0
  406. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/events.jsonl +19 -0
  407. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/session.json +11 -0
  408. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/audio.wav +0 -0
  409. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/edit.snapshot.json +12 -0
  410. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/events.jsonl +2 -0
  411. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/session.json +11 -0
  412. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0005/session.json +1 -0
  413. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/audio.wav +0 -0
  414. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/events.jsonl +2 -0
  415. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/session.json +11 -0
  416. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/audio.wav +0 -0
  417. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/edit.snapshot.json +13 -0
  418. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/events.jsonl +9 -0
  419. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/session.json +11 -0
  420. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/audio.wav +0 -0
  421. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/edit.snapshot.json +12 -0
  422. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/events.jsonl +2 -0
  423. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/session.json +11 -0
  424. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/transcript.json +9 -0
  425. package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review.json +7 -0
  426. package/vendor/skills/compile-review-session/test/canvas-compiler.test.mjs +283 -0
  427. package/vendor/skills/compile-review-session/test/compiler.test.mjs +458 -0
  428. package/vendor/skills/create-project/SKILL.md +46 -0
  429. package/vendor/skills/create-project/bin/create-project.mjs +88 -0
  430. package/vendor/skills/edit-lint/SKILL.md +73 -0
  431. package/vendor/skills/edit-plan/SKILL.md +64 -0
  432. package/vendor/skills/edit-plan/approvals-and-generation.md +106 -0
  433. package/vendor/skills/edit-plan/avatar-resolution.md +241 -0
  434. package/vendor/skills/edit-plan/beat-sync.md +545 -0
  435. package/vendor/skills/edit-plan/beats.md +197 -0
  436. package/vendor/skills/edit-plan/emphasis-detection.md +366 -0
  437. package/vendor/skills/edit-plan/execution.md +157 -0
  438. package/vendor/skills/edit-plan/expression-selection.md +290 -0
  439. package/vendor/skills/edit-plan/plan-json.md +52 -0
  440. package/vendor/skills/edit-plan/recipe.md +74 -0
  441. package/vendor/skills/edit-plan/references/asset.decisions.example.json +12 -0
  442. package/vendor/skills/edit-plan/references/event.example.json +7 -0
  443. package/vendor/skills/edit-plan/report-guide.md +192 -0
  444. package/vendor/skills/edit-plan/workflow.md +108 -0
  445. package/vendor/skills/generate-narration/SKILL.md +40 -0
  446. package/vendor/skills/generate-narration/assets/reading-script-v1.md +18 -0
  447. package/vendor/skills/generate-narration/avatar-voice.md +54 -0
  448. package/vendor/skills/generate-narration/bin/generate-narration.mjs +572 -0
  449. package/vendor/skills/generate-narration/engines.md +78 -0
  450. package/vendor/skills/generate-narration/reading-text.md +36 -0
  451. package/vendor/skills/generate-narration/voice-profile-setup.md +77 -0
  452. package/vendor/skills/harvest-asset/SKILL.md +132 -0
  453. package/vendor/skills/manage-connections/SKILL.md +75 -0
  454. package/vendor/skills/manage-connections/bin/doctor.mjs +341 -0
  455. package/vendor/skills/overlay-authoring/3d.md +143 -0
  456. package/vendor/skills/overlay-authoring/SKILL.md +30 -0
  457. package/vendor/skills/overlay-authoring/motion.md +58 -0
  458. package/vendor/skills/overlay-authoring/table.md +41 -0
  459. package/vendor/skills/overlay-authoring/telop.md +69 -0
  460. package/vendor/skills/overlay-authoring/text-behind-person.md +224 -0
  461. package/vendor/skills/overlay-authoring/thumbnail.md +126 -0
  462. package/vendor/skills/render-cut/SKILL.md +66 -0
  463. package/vendor/skills/research-plan/SKILL.md +75 -0
  464. package/vendor/skills/research-plan/competitor.md +50 -0
  465. package/vendor/skills/research-plan/ideate.md +56 -0
  466. package/vendor/skills/research-plan/shotlist.md +46 -0
  467. package/vendor/skills/research-plan/storyboard.md +48 -0
  468. package/vendor/skills/research-plan/trends.md +33 -0
  469. package/vendor/skills/setup-audio-library/SKILL.md +93 -0
  470. package/vendor/skills/setup-audio-library/candidate-list.md +72 -0
  471. package/vendor/skills/setup-audio-library/drop-folder.md +72 -0
  472. package/vendor/skills/setup-audio-library/gallery.md +43 -0
  473. package/vendor/skills/setup-library/SKILL.md +33 -0
  474. package/vendor/skills/setup-library/fetch-and-validate.md +102 -0
  475. package/vendor/skills/setup-library/starter-pack.md +55 -0
  476. package/vendor/skills/setup-library/tools-check.md +83 -0
  477. package/vendor/skills/verify/SKILL.md +137 -0
  478. package/vendor/templates/project-default/.akari/cache/.gitkeep +0 -0
  479. package/vendor/templates/project-default/.akari/connections.json +233 -0
  480. package/vendor/templates/project-default/.akari/diffs/.gitkeep +1 -0
  481. package/vendor/templates/project-default/.akari/events/.gitkeep +1 -0
  482. package/vendor/templates/project-default/.akari/reports/.gitkeep +0 -0
  483. package/vendor/templates/project-default/.akari/sidecars/.gitkeep +1 -0
  484. package/vendor/templates/project-default/.akari/work/.gitkeep +0 -0
  485. package/vendor/templates/project-default/.akari/workflow.json +48 -0
  486. package/vendor/templates/project-default/.claude/settings.json +15 -0
  487. package/vendor/templates/project-default/.claude/skills/README.md +26 -0
  488. package/vendor/templates/project-default/AGENTS.md +49 -0
  489. package/vendor/templates/project-default/CLAUDE.md +35 -0
  490. package/vendor/templates/project-default/assets/.gitkeep +1 -0
  491. package/vendor/templates/project-default/exports/.gitkeep +1 -0
  492. package/vendor/templates/project-default/planning/.gitkeep +1 -0
@@ -0,0 +1,766 @@
1
+ #!/usr/bin/env node
2
+
3
+ // edit.json v0/v1 の構造と、JSON Schema 単体では表せない参照・範囲制約を検証する。
4
+
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const LAYER_KINDS = new Set(["baked", "video"]);
10
+ const LAYER_BLEND_MODES = new Set([
11
+ "normal",
12
+ "screen",
13
+ "multiply",
14
+ "add",
15
+ "difference",
16
+ "darken",
17
+ "lighten",
18
+ "overlay",
19
+ "hardlight",
20
+ "softlight",
21
+ ]);
22
+
23
+ const usage = "使い方: node packages/schemas/bin/validate-edit.mjs <edit.json>";
24
+ const editArgument = process.argv[2];
25
+
26
+ if (!editArgument || process.argv.length !== 3) {
27
+ console.error(usage);
28
+ process.exit(2);
29
+ }
30
+
31
+ if (editArgument === "--help" || editArgument === "-h") {
32
+ console.log(usage);
33
+ process.exit(0);
34
+ }
35
+
36
+ const editPath = path.resolve(editArgument);
37
+ const schemaPath = fileURLToPath(new URL("../edit.schema.json", import.meta.url));
38
+ const errors = [];
39
+
40
+ if (!isRegularFile(editPath)) {
41
+ fail(`edit.json が見つかりません: ${editPath}`);
42
+ finish();
43
+ }
44
+
45
+ let schema;
46
+ try {
47
+ schema = JSON.parse(fs.readFileSync(schemaPath, "utf8"));
48
+ } catch (error) {
49
+ fail(`edit.schema.json を JSON として読めません: ${messageOf(error)}`);
50
+ finish();
51
+ }
52
+ if (schema.$id !== "urn:akari-video:schema:edit:v1") {
53
+ fail("edit.schema.json の $id が v1 契約と一致しません");
54
+ finish();
55
+ }
56
+
57
+ let edit;
58
+ try {
59
+ edit = JSON.parse(fs.readFileSync(editPath, "utf8"));
60
+ } catch (error) {
61
+ fail(`edit.json を JSON として読めません: ${messageOf(error)}`);
62
+ finish();
63
+ }
64
+
65
+ validateEdit(edit);
66
+ finish();
67
+
68
+ function validateEdit(value) {
69
+ if (!isPlainObject(value)) {
70
+ fail("edit.json のルートは object である必要があります");
71
+ return;
72
+ }
73
+ if (value.version !== 0 && value.version !== 1) {
74
+ fail("version は 0 または 1 である必要があります");
75
+ return;
76
+ }
77
+ validateOutput(value.output);
78
+
79
+ const hasSource = hasOwn(value, "source");
80
+ const hasSources = hasOwn(value, "sources");
81
+ if (hasSource && hasSources) fail("source と sources は排他です");
82
+
83
+ if (value.version === 0) {
84
+ if (!hasSource) fail("version 0 では source が必須です");
85
+ if (hasSources) fail("version 0 では sources を使用できません");
86
+ validateSourceV0(value.source);
87
+ } else {
88
+ if (!hasSources) fail("version 1 では sources が必須です");
89
+ if (hasSource) fail("version 1 では source を使用できません");
90
+ validateSourcesV1(value.sources);
91
+ }
92
+ validateCuts(value.cuts, value.version, value.sources);
93
+ validateAudio(value.audio);
94
+ validateLayers(value.layers);
95
+ validateBeats(value.beats, value.version, value.sources);
96
+ validateEmphasisWords(value.emphasis_words, value.version, value.sources);
97
+ validateDirection(value.direction);
98
+ validateTracks(value.tracks);
99
+ validateTimeline(value.timeline);
100
+ }
101
+
102
+ function validateTracks(value) {
103
+ if (value === undefined || value === null) return;
104
+ if (!isPlainObject(value)) {
105
+ fail("tracks は object である必要があります");
106
+ return;
107
+ }
108
+ for (const key of ["cuts", "overlays", "layers", "audio"]) {
109
+ if (!hasOwn(value, key)) continue;
110
+ validateTrackStateList(value[key], `tracks.${key}`);
111
+ }
112
+ }
113
+
114
+ function validateTimeline(value) {
115
+ if (value === undefined || value === null) return;
116
+ if (!isPlainObject(value)) {
117
+ fail("timeline は object である必要があります");
118
+ return;
119
+ }
120
+ if (!Array.isArray(value.tracks)) {
121
+ fail("timeline.tracks は配列である必要があります");
122
+ return;
123
+ }
124
+ const ids = new Set();
125
+ const kinds = new Set(["cuts", "layers", "overlays", "captions", "audio"]);
126
+ value.tracks.forEach((item, index) => {
127
+ const label = `timeline.tracks[${index}]`;
128
+ if (!isPlainObject(item)) {
129
+ fail(`${label} は object である必要があります`);
130
+ return;
131
+ }
132
+ if (!isNonEmptyString(item.id)) {
133
+ fail(`${label}.id は空でない文字列である必要があります`);
134
+ } else if (ids.has(item.id)) {
135
+ fail(`timeline.tracks[].id が重複しています: ${item.id}`);
136
+ } else {
137
+ ids.add(item.id);
138
+ }
139
+ if (!kinds.has(item.kind)) {
140
+ fail(`${label}.kind は cuts/layers/overlays/captions/audio のいずれかである必要があります`);
141
+ }
142
+ if (hasOwn(item, "ref") && (!Number.isInteger(item.ref) || item.ref < 0)) {
143
+ fail(`${label}.ref は 0 以上の整数である必要があります`);
144
+ }
145
+ if (hasOwn(item, "label") && typeof item.label !== "string") {
146
+ fail(`${label}.label は文字列である必要があります`);
147
+ }
148
+ for (const field of ["muted", "hidden", "locked"]) {
149
+ if (hasOwn(item, field) && typeof item[field] !== "boolean") {
150
+ fail(`${label}.${field} は boolean である必要があります`);
151
+ }
152
+ }
153
+ });
154
+ }
155
+
156
+ function validateTrackStateList(value, label) {
157
+ if (!Array.isArray(value)) {
158
+ fail(`${label} は配列である必要があります`);
159
+ return;
160
+ }
161
+ value.forEach((item, index) => {
162
+ const itemLabel = `${label}[${index}]`;
163
+ if (!isPlainObject(item)) {
164
+ fail(`${itemLabel} は object である必要があります`);
165
+ return;
166
+ }
167
+ if (hasOwn(item, "muted") && typeof item.muted !== "boolean") {
168
+ fail(`${itemLabel}.muted は boolean である必要があります`);
169
+ }
170
+ if (hasOwn(item, "hidden") && typeof item.hidden !== "boolean") {
171
+ fail(`${itemLabel}.hidden は boolean である必要があります`);
172
+ }
173
+ });
174
+ }
175
+
176
+ // docs/contract-2026-07-23-edit-json-v1-direction.md §6。direction は演出宣言の器であり
177
+ // 素材参照を持たないため、ファイルシステムも sources[] も見ない(preset は識別子でありパスではない)。
178
+ // overrides は語彙が本契約で未定義のため object であることだけを検証する(同 §6)。
179
+ function validateDirection(value) {
180
+ if (value === undefined) return;
181
+ if (!isPlainObject(value)) {
182
+ fail("direction は object である必要があります");
183
+ return;
184
+ }
185
+ if (!isNonEmptyString(value.preset)) {
186
+ fail("direction.preset は空でない文字列である必要があります");
187
+ }
188
+ if (hasOwn(value, "intensity")) {
189
+ if (!Number.isInteger(value.intensity) || value.intensity < 0 || value.intensity > 100) {
190
+ fail("direction.intensity は 0 から 100 の範囲の整数である必要があります");
191
+ }
192
+ }
193
+ if (hasOwn(value, "overrides") && !isPlainObject(value.overrides)) {
194
+ fail("direction.overrides は object である必要があります");
195
+ }
196
+ }
197
+
198
+ // docs/contract-2026-07-22-edit-json-v1-beats.md §7。id の一意性と src の参照整合は
199
+ // 兄弟値の突き合わせが要るため JSON Schema では表現できず、ここで検証する(cuts[].src と同じ分担)。
200
+ // beats[].t は source 秒アンカー(同 §3)であり、timeline 尺との突き合わせは行わない。
201
+ function validateBeats(value, version, sources) {
202
+ if (value === undefined) return;
203
+ if (!Array.isArray(value)) {
204
+ fail("beats は配列である必要があります");
205
+ return;
206
+ }
207
+ const sourceIds = new Set(
208
+ Array.isArray(sources)
209
+ ? sources.filter(isPlainObject).map((source) => source.id).filter(isNonEmptyString)
210
+ : [],
211
+ );
212
+ const ids = new Set();
213
+ for (const [index, item] of value.entries()) {
214
+ const label = `beats[${index}]`;
215
+ if (!isPlainObject(item)) {
216
+ fail(`${label} は object である必要があります`);
217
+ continue;
218
+ }
219
+ if (typeof item.id !== "string" || !/^b-\d{4}$/.test(item.id)) {
220
+ fail(`${label}.id は b- に続く 4 桁の数字である必要があります`);
221
+ } else if (ids.has(item.id)) {
222
+ fail(`beats[].id が重複しています: ${item.id}`);
223
+ } else {
224
+ ids.add(item.id);
225
+ }
226
+ if (!isFiniteNumber(item.t) || item.t < 0) {
227
+ fail(`${label}.t は 0 以上の有限数である必要があります`);
228
+ }
229
+ if (!isNonEmptyString(item.kind)) {
230
+ fail(`${label}.kind は空でない文字列である必要があります`);
231
+ }
232
+ if (!isFiniteNumber(item.strength) || item.strength < 0 || item.strength > 1) {
233
+ fail(`${label}.strength は 0 から 1 の範囲の有限数である必要があります`);
234
+ }
235
+ if (hasOwn(item, "basis") && typeof item.basis !== "string") {
236
+ fail(`${label}.basis は文字列である必要があります`);
237
+ }
238
+ if (hasOwn(item, "src")) {
239
+ if (version === 0) {
240
+ fail(`${label}.src は version 0 では使用できません`);
241
+ } else {
242
+ validateNonEmptyString(item.src, `${label}.src`);
243
+ if (isNonEmptyString(item.src) && !sourceIds.has(item.src)) {
244
+ fail(`${label}.src が sources[].id を参照していません: ${item.src}`);
245
+ }
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ // docs/contract-2026-07-23-edit-json-v1-emphasis-words.md §7。t_end > t_start・id の一意性・
252
+ // src の参照整合は兄弟値の突き合わせが要るため JSON Schema では表現できず、ここで検証する
253
+ // (cuts[].out > in / cuts[].src と同じ分担)。t_start/t_end は source 秒アンカー(同 §3)であり、
254
+ // timeline 尺との突き合わせは行わない。要素は素材ファイルを参照しないため実在チェックもしない。
255
+ function validateEmphasisWords(value, version, sources) {
256
+ if (value === undefined) return;
257
+ if (!Array.isArray(value)) {
258
+ fail("emphasis_words は配列である必要があります");
259
+ return;
260
+ }
261
+ const sourceIds = new Set(
262
+ Array.isArray(sources)
263
+ ? sources.filter(isPlainObject).map((source) => source.id).filter(isNonEmptyString)
264
+ : [],
265
+ );
266
+ const ids = new Set();
267
+ for (const [index, item] of value.entries()) {
268
+ const label = `emphasis_words[${index}]`;
269
+ if (!isPlainObject(item)) {
270
+ fail(`${label} は object である必要があります`);
271
+ continue;
272
+ }
273
+ if (typeof item.id !== "string" || !/^e-\d{4}$/.test(item.id)) {
274
+ fail(`${label}.id は e- に続く 4 桁の数字である必要があります`);
275
+ } else if (ids.has(item.id)) {
276
+ fail(`emphasis_words[].id が重複しています: ${item.id}`);
277
+ } else {
278
+ ids.add(item.id);
279
+ }
280
+ const hasStart = isFiniteNumber(item.t_start) && item.t_start >= 0;
281
+ const hasEnd = isFiniteNumber(item.t_end) && item.t_end >= 0;
282
+ if (!hasStart) {
283
+ fail(`${label}.t_start は 0 以上の有限数である必要があります`);
284
+ }
285
+ if (!hasEnd) {
286
+ fail(`${label}.t_end は 0 以上の有限数である必要があります`);
287
+ }
288
+ if (hasStart && hasEnd && item.t_end <= item.t_start) {
289
+ fail(`${label}.t_end は t_start より大きい必要があります`);
290
+ }
291
+ if (!isNonEmptyString(item.word)) {
292
+ fail(`${label}.word は空でない文字列である必要があります`);
293
+ }
294
+ if (!isNonEmptyString(item.emotion)) {
295
+ fail(`${label}.emotion は空でない文字列である必要があります`);
296
+ }
297
+ if (hasOwn(item, "style_hint") && typeof item.style_hint !== "string") {
298
+ fail(`${label}.style_hint は文字列である必要があります`);
299
+ }
300
+ if (hasOwn(item, "src")) {
301
+ if (version === 0) {
302
+ fail(`${label}.src は version 0 では使用できません`);
303
+ } else {
304
+ validateNonEmptyString(item.src, `${label}.src`);
305
+ if (isNonEmptyString(item.src) && !sourceIds.has(item.src)) {
306
+ fail(`${label}.src が sources[].id を参照していません: ${item.src}`);
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+
313
+ function validateLayers(value) {
314
+ if (value === undefined) return;
315
+ if (!Array.isArray(value)) {
316
+ fail("layers は配列である必要があります");
317
+ return;
318
+ }
319
+ const ids = new Set();
320
+ for (const [index, layer] of value.entries()) {
321
+ const label = `layers[${index}]`;
322
+ if (!isPlainObject(layer)) {
323
+ fail(`${label} は object である必要があります`);
324
+ continue;
325
+ }
326
+ if (!isNonEmptyString(layer.id)) {
327
+ fail(`${label}.id は空でない文字列である必要があります`);
328
+ } else if (ids.has(layer.id)) {
329
+ fail(`layers[].id が重複しています: ${layer.id}`);
330
+ } else {
331
+ ids.add(layer.id);
332
+ }
333
+ if (!isFiniteNumber(layer.t) || layer.t < 0) {
334
+ fail(`${label}.t は 0 以上の有限数である必要があります`);
335
+ }
336
+ if (!isFiniteNumber(layer.duration) || layer.duration <= 0) {
337
+ fail(`${label}.duration は 0 より大きい有限数である必要があります`);
338
+ }
339
+ if (!LAYER_KINDS.has(layer.kind)) {
340
+ fail(`${label}.kind は baked または video である必要があります`);
341
+ }
342
+ validateNonEmptyString(layer.src, `${label}.src`);
343
+ if (hasOwn(layer, "opacity")) {
344
+ if (!isFiniteNumber(layer.opacity) || layer.opacity < 0 || layer.opacity > 1) {
345
+ fail(`${label}.opacity は 0 から 1 の範囲の有限数である必要があります`);
346
+ }
347
+ }
348
+ if (hasOwn(layer, "blend") && !LAYER_BLEND_MODES.has(layer.blend)) {
349
+ fail(`${label}.blend は ${[...LAYER_BLEND_MODES].join("/")} のいずれかである必要があります`);
350
+ }
351
+ if (hasOwn(layer, "transform")) {
352
+ validateLayerTransform(layer.transform, `${label}.transform`);
353
+ }
354
+ if (hasOwn(layer, "chroma_key")) {
355
+ if (layer.kind !== "video") {
356
+ fail(`${label}.chroma_key は kind が video のときのみ使用できます`);
357
+ }
358
+ validateLayerChromaKey(layer.chroma_key, `${label}.chroma_key`);
359
+ }
360
+ if (hasOwn(layer, "track")) {
361
+ if (!Number.isInteger(layer.track) || layer.track < 0) {
362
+ fail(`${label}.track は 0 以上の整数である必要があります`);
363
+ }
364
+ }
365
+ }
366
+ }
367
+
368
+ function validateLayerTransform(value, label) {
369
+ if (!isPlainObject(value)) {
370
+ fail(`${label} は object である必要があります`);
371
+ return;
372
+ }
373
+ for (const field of ["x", "y", "rotate"]) {
374
+ if (hasOwn(value, field) && !isFiniteNumber(value[field])) {
375
+ fail(`${label}.${field} は有限数である必要があります`);
376
+ }
377
+ }
378
+ if (hasOwn(value, "scale") && (!isFiniteNumber(value.scale) || value.scale <= 0)) {
379
+ fail(`${label}.scale は 0 より大きい有限数である必要があります`);
380
+ }
381
+ }
382
+
383
+ function validateLayerChromaKey(value, label) {
384
+ if (!isPlainObject(value)) {
385
+ fail(`${label} は object である必要があります`);
386
+ return;
387
+ }
388
+ validateNonEmptyString(value.color, `${label}.color`);
389
+ if (hasOwn(value, "similarity")) {
390
+ if (!isFiniteNumber(value.similarity) || value.similarity < 0 || value.similarity > 1) {
391
+ fail(`${label}.similarity は 0 から 1 の範囲の有限数である必要があります`);
392
+ }
393
+ }
394
+ if (hasOwn(value, "blend")) {
395
+ if (!isFiniteNumber(value.blend) || value.blend < 0 || value.blend > 1) {
396
+ fail(`${label}.blend は 0 から 1 の範囲の有限数である必要があります`);
397
+ }
398
+ }
399
+ }
400
+
401
+ function validateAudio(value) {
402
+ if (value === undefined) return;
403
+ if (!isPlainObject(value)) {
404
+ fail("audio は object である必要があります");
405
+ return;
406
+ }
407
+ validateNarration(value.narration);
408
+ validateBgm(value.bgm);
409
+ validateSfx(value.sfx);
410
+ validateMaster(value.master);
411
+ }
412
+
413
+ function validateMaster(value) {
414
+ if (value === undefined || value === null) return;
415
+ if (!isPlainObject(value)) {
416
+ fail("audio.master は object である必要があります");
417
+ return;
418
+ }
419
+ if (hasOwn(value, "denoise") && !["off", "std", "strong"].includes(value.denoise)) {
420
+ fail("audio.master.denoise は off/std/strong のいずれかである必要があります");
421
+ }
422
+ if (hasOwn(value, "loudnorm")) {
423
+ if (!isFiniteNumber(value.loudnorm) || value.loudnorm < -70 || value.loudnorm > 0) {
424
+ fail("audio.master.loudnorm は -70 から 0 の範囲の有限数である必要があります");
425
+ }
426
+ }
427
+ }
428
+
429
+ function validateBgm(value) {
430
+ // docs/contract-2026-07-14-edit-json-v1-audio.md §1 says omission means "no BGM"; real edit.json
431
+ // data (fieldtest/2026-07-14) spells that as an explicit `"bgm": null` instead of omitting the
432
+ // key, the same tolerant-reader convention this schema already uses for source.proxy. Treat
433
+ // both spellings identically.
434
+ if (value === undefined || value === null) return;
435
+ if (!isPlainObject(value)) {
436
+ fail("audio.bgm は object である必要があります");
437
+ return;
438
+ }
439
+ validateNonEmptyString(value.path, "audio.bgm.path");
440
+ if (hasOwn(value, "gain_db")) {
441
+ if (!isFiniteNumber(value.gain_db) || value.gain_db < -60 || value.gain_db > 12) {
442
+ fail("audio.bgm.gain_db は -60 から 12 の範囲の有限数である必要があります");
443
+ }
444
+ }
445
+ if (hasOwn(value, "ducking") && typeof value.ducking !== "boolean") {
446
+ fail("audio.bgm.ducking は boolean である必要があります");
447
+ }
448
+ for (const field of ["in", "fadeIn", "fadeOut"]) {
449
+ if (hasOwn(value, field)) {
450
+ if (!isFiniteNumber(value[field]) || value[field] < 0) {
451
+ fail(`audio.bgm.${field} は 0 以上の有限数である必要があります`);
452
+ }
453
+ }
454
+ }
455
+ }
456
+
457
+ function validateSfx(value) {
458
+ if (value === undefined || value === null) return;
459
+ if (!Array.isArray(value)) {
460
+ fail("audio.sfx は配列である必要があります");
461
+ return;
462
+ }
463
+ for (const [index, item] of value.entries()) {
464
+ const label = `audio.sfx[${index}]`;
465
+ if (!isPlainObject(item)) {
466
+ fail(`${label} は object である必要があります`);
467
+ continue;
468
+ }
469
+ validateNonEmptyString(item.path, `${label}.path`);
470
+ if (!isFiniteNumber(item.t) || item.t < 0) {
471
+ fail(`${label}.t は 0 以上の有限数である必要があります`);
472
+ }
473
+ if (hasOwn(item, "in")) {
474
+ if (!isFiniteNumber(item.in) || item.in < 0) {
475
+ fail(`${label}.in は 0 以上の有限数である必要があります`);
476
+ }
477
+ }
478
+ if (hasOwn(item, "out")) {
479
+ if (!isFiniteNumber(item.out) || item.out <= 0) {
480
+ fail(`${label}.out は 0 より大きい有限数である必要があります`);
481
+ }
482
+ }
483
+ if (hasOwn(item, "gain_db")) {
484
+ if (!isFiniteNumber(item.gain_db) || item.gain_db < -60 || item.gain_db > 12) {
485
+ fail(`${label}.gain_db は -60 から 12 の範囲の有限数である必要があります`);
486
+ }
487
+ }
488
+ if (hasOwn(item, "track")) {
489
+ if (!Number.isInteger(item.track) || item.track < 0) {
490
+ fail(`${label}.track は 0 以上の整数である必要があります`);
491
+ }
492
+ }
493
+ }
494
+ }
495
+
496
+ function validateNarration(value) {
497
+ if (value === undefined) return;
498
+ if (!Array.isArray(value)) {
499
+ fail("audio.narration は配列である必要があります");
500
+ return;
501
+ }
502
+ const ids = new Set();
503
+ for (const [index, item] of value.entries()) {
504
+ const label = `audio.narration[${index}]`;
505
+ if (!isPlainObject(item)) {
506
+ fail(`${label} は object である必要があります`);
507
+ continue;
508
+ }
509
+ if (typeof item.id !== "string" || !/^n-\d{4}$/.test(item.id)) {
510
+ fail(`${label}.id は n- に続く 4 桁の数字である必要があります`);
511
+ } else if (ids.has(item.id)) {
512
+ fail(`audio.narration[].id が重複しています: ${item.id}`);
513
+ } else {
514
+ ids.add(item.id);
515
+ }
516
+ validateNonEmptyString(item.path, `${label}.path`);
517
+ if (!isFiniteNumber(item.t) || item.t < 0) {
518
+ fail(`${label}.t は 0 以上の有限数である必要があります`);
519
+ }
520
+ if (hasOwn(item, "gain_db")) {
521
+ if (!isFiniteNumber(item.gain_db) || item.gain_db < -60 || item.gain_db > 12) {
522
+ fail(`${label}.gain_db は -60 から 12 の範囲の有限数である必要があります`);
523
+ }
524
+ }
525
+ validateNarrationProvenance(item.provenance, `${label}.provenance`);
526
+ }
527
+ }
528
+
529
+ function validateNarrationProvenance(value, label) {
530
+ if (!isPlainObject(value)) {
531
+ fail(`${label} は object である必要があります`);
532
+ return;
533
+ }
534
+ if (!isNonEmptyString(value.provider)) {
535
+ fail(`${label}.provider は空でない文字列である必要があります`);
536
+ return;
537
+ }
538
+ if (value.provider === "voicevox" && !isNonEmptyString(value.credit)) {
539
+ fail(`${label}.credit は provider が voicevox のとき必須です`);
540
+ }
541
+ }
542
+
543
+ function validateOutput(value) {
544
+ if (!isPlainObject(value)) {
545
+ fail("output は object である必要があります");
546
+ return;
547
+ }
548
+ for (const field of ["width", "height", "fps"]) {
549
+ if (!isFiniteNumber(value[field]) || value[field] <= 0) {
550
+ fail(`output.${field} は 0 より大きい有限数である必要があります`);
551
+ }
552
+ }
553
+ validateLook(value.look);
554
+ }
555
+
556
+ function validateLook(value) {
557
+ if (value === undefined || value === null) return;
558
+ if (!isPlainObject(value)) {
559
+ fail("output.look は object である必要があります");
560
+ return;
561
+ }
562
+ validateNonEmptyString(value.lut, "output.look.lut");
563
+ if (hasOwn(value, "intensity")) {
564
+ if (!isFiniteNumber(value.intensity) || value.intensity < 0 || value.intensity > 1) {
565
+ fail("output.look.intensity は 0 から 1 の範囲の有限数である必要があります");
566
+ }
567
+ }
568
+ }
569
+
570
+ function validateSourceV0(value) {
571
+ if (!isPlainObject(value)) {
572
+ fail("source は object である必要があります");
573
+ return;
574
+ }
575
+ validateNonEmptyString(value.path, "source.path");
576
+ validateProxy(value.proxy, "source.proxy", false);
577
+ validateChromaKey(value.chroma_key, "source.chroma_key");
578
+ }
579
+
580
+ function validateChromaKey(value, label) {
581
+ if (value === undefined || value === null) return;
582
+ if (!isPlainObject(value)) {
583
+ fail(`${label} は object である必要があります`);
584
+ return;
585
+ }
586
+ validateNonEmptyString(value.color, `${label}.color`);
587
+ for (const field of ["similarity", "blend"]) {
588
+ if (hasOwn(value, field)) {
589
+ if (!isFiniteNumber(value[field]) || value[field] < 0 || value[field] > 1) {
590
+ fail(`${label}.${field} は 0 から 1 の範囲の有限数である必要があります`);
591
+ }
592
+ }
593
+ }
594
+ if (hasOwn(value, "background")) {
595
+ validateNonEmptyString(value.background, `${label}.background`);
596
+ }
597
+ }
598
+
599
+ function validateSourcesV1(value) {
600
+ if (!Array.isArray(value) || value.length === 0) {
601
+ fail("sources は 1 件以上の配列である必要があります");
602
+ return;
603
+ }
604
+ const ids = new Set();
605
+ for (const [index, source] of value.entries()) {
606
+ const label = `sources[${index}]`;
607
+ if (!isPlainObject(source)) {
608
+ fail(`${label} は object である必要があります`);
609
+ continue;
610
+ }
611
+ validateNonEmptyString(source.id, `${label}.id`);
612
+ if (typeof source.id === "string") {
613
+ if (ids.has(source.id)) fail(`sources[].id が重複しています: ${source.id}`);
614
+ ids.add(source.id);
615
+ }
616
+ validateNonEmptyString(source.path, `${label}.path`);
617
+ validateProxy(source.proxy, `${label}.proxy`, true);
618
+ validateChromaKey(source.chroma_key, `${label}.chroma_key`);
619
+ }
620
+ }
621
+
622
+ function validateCuts(value, version, sources) {
623
+ if (value === undefined) return;
624
+ if (!Array.isArray(value)) {
625
+ fail("cuts は配列である必要があります");
626
+ return;
627
+ }
628
+ const sourceIds = new Set(
629
+ Array.isArray(sources)
630
+ ? sources.filter(isPlainObject).map((source) => source.id).filter(isNonEmptyString)
631
+ : [],
632
+ );
633
+ for (const [index, cut] of value.entries()) {
634
+ const label = `cuts[${index}]`;
635
+ if (!isPlainObject(cut)) {
636
+ fail(`${label} は object である必要があります`);
637
+ continue;
638
+ }
639
+ if (!isFiniteNumber(cut.in) || !isFiniteNumber(cut.out)) {
640
+ fail(`${label}.in/out は有限数である必要があります`);
641
+ } else if (cut.in < 0 || cut.out <= cut.in) {
642
+ fail(`${label} は 0 <= in < out を満たす必要があります`);
643
+ }
644
+ if (version === 0 && hasOwn(cut, "src")) {
645
+ fail(`${label}.src は version 0 では使用できません`);
646
+ }
647
+ if (version === 1) {
648
+ validateNonEmptyString(cut.src, `${label}.src`);
649
+ if (isNonEmptyString(cut.src) && !sourceIds.has(cut.src)) {
650
+ fail(`${label}.src が sources[].id を参照していません: ${cut.src}`);
651
+ }
652
+ }
653
+ if (hasOwn(cut, "speed")) {
654
+ if (!isFiniteNumber(cut.speed) || cut.speed <= 0) {
655
+ fail(`${label}.speed は 0 より大きい有限数である必要があります`);
656
+ }
657
+ }
658
+ if (hasOwn(cut, "at")) {
659
+ if (!isFiniteNumber(cut.at) || cut.at < 0) {
660
+ fail(`${label}.at は 0 以上の有限数である必要があります`);
661
+ }
662
+ }
663
+ if (hasOwn(cut, "track")) {
664
+ if (!Number.isInteger(cut.track) || cut.track < 0) {
665
+ fail(`${label}.track は 0 以上の整数である必要があります`);
666
+ }
667
+ }
668
+ if (hasOwn(cut, "opacity")) {
669
+ if (!isFiniteNumber(cut.opacity) || cut.opacity < 0 || cut.opacity > 1) {
670
+ fail(`${label}.opacity は 0 から 1 の範囲の有限数である必要があります`);
671
+ }
672
+ }
673
+ if (hasOwn(cut, "transform")) {
674
+ validateCutTransform(cut.transform, `${label}.transform`);
675
+ }
676
+ validateTransitionOut(cut.transition_out, `${label}.transition_out`);
677
+ }
678
+ }
679
+
680
+ function validateCutTransform(value, label) {
681
+ if (!isPlainObject(value)) {
682
+ fail(`${label} は object である必要があります`);
683
+ return;
684
+ }
685
+ const allowedKeys = new Set(["x", "y", "scale", "rotate"]);
686
+ for (const key of Object.keys(value)) {
687
+ if (!allowedKeys.has(key)) {
688
+ fail(`${label} に未知のキーがあります: ${key}`);
689
+ }
690
+ }
691
+ for (const field of ["x", "y", "rotate"]) {
692
+ if (hasOwn(value, field) && !isFiniteNumber(value[field])) {
693
+ fail(`${label}.${field} は有限数である必要があります`);
694
+ }
695
+ }
696
+ if (hasOwn(value, "scale") && (!isFiniteNumber(value.scale) || value.scale <= 0)) {
697
+ fail(`${label}.scale は 0 より大きい有限数である必要があります`);
698
+ }
699
+ }
700
+
701
+ function validateTransitionOut(value, label) {
702
+ if (value === undefined || value === null) return;
703
+ if (!isPlainObject(value)) {
704
+ fail(`${label} は object である必要があります`);
705
+ return;
706
+ }
707
+ if (!["dissolve", "fade-black", "fade-white"].includes(value.type)) {
708
+ fail(`${label}.type は dissolve/fade-black/fade-white のいずれかである必要があります`);
709
+ }
710
+ if (!isFiniteNumber(value.duration) || value.duration <= 0) {
711
+ fail(`${label}.duration は 0 より大きい有限数である必要があります`);
712
+ }
713
+ }
714
+
715
+ function validateProxy(value, label, required) {
716
+ if (value === undefined && !required) return;
717
+ if (value !== null && !isNonEmptyString(value)) {
718
+ fail(`${label} は null または空でない文字列である必要があります`);
719
+ }
720
+ }
721
+
722
+ function validateNonEmptyString(value, label) {
723
+ if (!isNonEmptyString(value)) fail(`${label} は空でない文字列である必要があります`);
724
+ }
725
+
726
+ function isRegularFile(filePath) {
727
+ try {
728
+ return fs.statSync(filePath).isFile();
729
+ } catch {
730
+ return false;
731
+ }
732
+ }
733
+
734
+ function isPlainObject(value) {
735
+ return value !== null && typeof value === "object" && !Array.isArray(value);
736
+ }
737
+
738
+ function isFiniteNumber(value) {
739
+ return typeof value === "number" && Number.isFinite(value);
740
+ }
741
+
742
+ function isNonEmptyString(value) {
743
+ return typeof value === "string" && value.trim().length > 0;
744
+ }
745
+
746
+ function hasOwn(value, key) {
747
+ return Object.prototype.hasOwnProperty.call(value, key);
748
+ }
749
+
750
+ function messageOf(error) {
751
+ return error instanceof Error ? error.message : String(error);
752
+ }
753
+
754
+ function fail(message) {
755
+ errors.push(message);
756
+ }
757
+
758
+ function finish() {
759
+ if (errors.length > 0) {
760
+ console.error(`NG: ${editPath}`);
761
+ for (const error of errors) console.error(`- ${error}`);
762
+ process.exit(1);
763
+ }
764
+ console.log(`OK: ${editPath}`);
765
+ process.exit(0);
766
+ }