@nodetool-ai/agents 0.7.0-rc.23 → 0.8.2

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 (1645) hide show
  1. package/README.md +35 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/analysis/audio-dsp.d.ts +224 -0
  4. package/dist/analysis/audio-dsp.d.ts.map +1 -0
  5. package/dist/analysis/audio-dsp.js +645 -0
  6. package/dist/analysis/audio-dsp.js.map +1 -0
  7. package/dist/analysis/media-decode.d.ts +98 -0
  8. package/dist/analysis/media-decode.d.ts.map +1 -0
  9. package/dist/analysis/media-decode.js +226 -0
  10. package/dist/analysis/media-decode.js.map +1 -0
  11. package/dist/analysis/mediabunny-runtime.d.ts +15 -0
  12. package/dist/analysis/mediabunny-runtime.d.ts.map +1 -0
  13. package/dist/analysis/mediabunny-runtime.js +30 -0
  14. package/dist/analysis/mediabunny-runtime.js.map +1 -0
  15. package/dist/analysis/video-frames.d.ts +120 -0
  16. package/dist/analysis/video-frames.d.ts.map +1 -0
  17. package/dist/analysis/video-frames.js +288 -0
  18. package/dist/analysis/video-frames.js.map +1 -0
  19. package/dist/apify/assets.d.ts +80 -0
  20. package/dist/apify/assets.d.ts.map +1 -0
  21. package/dist/apify/assets.js +192 -0
  22. package/dist/apify/assets.js.map +1 -0
  23. package/dist/apify/catalog.d.ts +44 -0
  24. package/dist/apify/catalog.d.ts.map +1 -0
  25. package/dist/apify/catalog.js +108 -0
  26. package/dist/apify/catalog.js.map +1 -0
  27. package/dist/apify/client.d.ts +137 -0
  28. package/dist/apify/client.d.ts.map +1 -0
  29. package/dist/apify/client.js +346 -0
  30. package/dist/apify/client.js.map +1 -0
  31. package/dist/apify/errors.d.ts +85 -0
  32. package/dist/apify/errors.d.ts.map +1 -0
  33. package/dist/apify/errors.js +90 -0
  34. package/dist/apify/errors.js.map +1 -0
  35. package/dist/apify/normalize.d.ts +131 -0
  36. package/dist/apify/normalize.d.ts.map +1 -0
  37. package/dist/apify/normalize.js +202 -0
  38. package/dist/apify/normalize.js.map +1 -0
  39. package/dist/apify/policy.d.ts +136 -0
  40. package/dist/apify/policy.d.ts.map +1 -0
  41. package/dist/apify/policy.js +223 -0
  42. package/dist/apify/policy.js.map +1 -0
  43. package/dist/apify/run.d.ts +86 -0
  44. package/dist/apify/run.d.ts.map +1 -0
  45. package/dist/apify/run.js +158 -0
  46. package/dist/apify/run.js.map +1 -0
  47. package/dist/app-build/author.d.ts +67 -0
  48. package/dist/app-build/author.d.ts.map +1 -0
  49. package/dist/app-build/author.js +231 -0
  50. package/dist/app-build/author.js.map +1 -0
  51. package/dist/app-build/bridge.d.ts +130 -0
  52. package/dist/app-build/bridge.d.ts.map +1 -0
  53. package/dist/app-build/bridge.js +647 -0
  54. package/dist/app-build/bridge.js.map +1 -0
  55. package/dist/app-build/build-service.d.ts +66 -0
  56. package/dist/app-build/build-service.d.ts.map +1 -0
  57. package/dist/app-build/build-service.js +249 -0
  58. package/dist/app-build/build-service.js.map +1 -0
  59. package/dist/app-build/build.d.ts +115 -0
  60. package/dist/app-build/build.d.ts.map +1 -0
  61. package/dist/app-build/build.js +901 -0
  62. package/dist/app-build/build.js.map +1 -0
  63. package/dist/app-build/interactions.d.ts +20 -0
  64. package/dist/app-build/interactions.d.ts.map +1 -0
  65. package/dist/app-build/interactions.js +121 -0
  66. package/dist/app-build/interactions.js.map +1 -0
  67. package/dist/app-build/judge.d.ts +113 -0
  68. package/dist/app-build/judge.d.ts.map +1 -0
  69. package/dist/app-build/judge.js +318 -0
  70. package/dist/app-build/judge.js.map +1 -0
  71. package/dist/app-build/markdown.d.ts +10 -0
  72. package/dist/app-build/markdown.d.ts.map +1 -0
  73. package/dist/app-build/markdown.js +65 -0
  74. package/dist/app-build/markdown.js.map +1 -0
  75. package/dist/app-build/spec.d.ts +228 -0
  76. package/dist/app-build/spec.d.ts.map +1 -0
  77. package/dist/app-build/spec.js +651 -0
  78. package/dist/app-build/spec.js.map +1 -0
  79. package/dist/app-build/tool-loop.d.ts +84 -0
  80. package/dist/app-build/tool-loop.d.ts.map +1 -0
  81. package/dist/app-build/tool-loop.js +113 -0
  82. package/dist/app-build/tool-loop.js.map +1 -0
  83. package/dist/app-build/types.d.ts +215 -0
  84. package/dist/app-build/types.d.ts.map +1 -0
  85. package/dist/app-build/types.js +28 -0
  86. package/dist/app-build/types.js.map +1 -0
  87. package/dist/author-graph.d.ts +90 -0
  88. package/dist/author-graph.d.ts.map +1 -0
  89. package/dist/author-graph.js +317 -0
  90. package/dist/author-graph.js.map +1 -0
  91. package/dist/background-subtasks.d.ts +79 -0
  92. package/dist/background-subtasks.d.ts.map +1 -0
  93. package/dist/background-subtasks.js +139 -0
  94. package/dist/background-subtasks.js.map +1 -0
  95. package/dist/blender-gate.d.ts +21 -0
  96. package/dist/blender-gate.d.ts.map +1 -0
  97. package/dist/blender-gate.js +27 -0
  98. package/dist/blender-gate.js.map +1 -0
  99. package/dist/browser-gate.d.ts +28 -0
  100. package/dist/browser-gate.d.ts.map +1 -0
  101. package/dist/browser-gate.js +34 -0
  102. package/dist/browser-gate.js.map +1 -0
  103. package/dist/capabilities/GamePublishRequest.d.ts +14 -0
  104. package/dist/capabilities/GamePublishRequest.d.ts.map +1 -0
  105. package/dist/capabilities/GamePublishRequest.js +2 -0
  106. package/dist/capabilities/GamePublishRequest.js.map +1 -0
  107. package/dist/capabilities/adapters.d.ts +27 -0
  108. package/dist/capabilities/adapters.d.ts.map +1 -0
  109. package/dist/capabilities/adapters.js +39 -0
  110. package/dist/capabilities/adapters.js.map +1 -0
  111. package/dist/capabilities/agent-activity.d.ts +27 -0
  112. package/dist/capabilities/agent-activity.d.ts.map +1 -0
  113. package/dist/capabilities/agent-activity.js +103 -0
  114. package/dist/capabilities/agent-activity.js.map +1 -0
  115. package/dist/capabilities/agentic-storyboard-finish.d.ts +67 -0
  116. package/dist/capabilities/agentic-storyboard-finish.d.ts.map +1 -0
  117. package/dist/capabilities/agentic-storyboard-finish.js +1321 -0
  118. package/dist/capabilities/agentic-storyboard-finish.js.map +1 -0
  119. package/dist/capabilities/agents.d.ts +81 -0
  120. package/dist/capabilities/agents.d.ts.map +1 -0
  121. package/dist/capabilities/agents.js +376 -0
  122. package/dist/capabilities/agents.js.map +1 -0
  123. package/dist/capabilities/agents.specs.d.ts +30 -0
  124. package/dist/capabilities/agents.specs.d.ts.map +1 -0
  125. package/dist/capabilities/agents.specs.js +313 -0
  126. package/dist/capabilities/agents.specs.js.map +1 -0
  127. package/dist/capabilities/analysis.d.ts +93 -0
  128. package/dist/capabilities/analysis.d.ts.map +1 -0
  129. package/dist/capabilities/analysis.js +823 -0
  130. package/dist/capabilities/analysis.js.map +1 -0
  131. package/dist/capabilities/analysis.specs.d.ts +39 -0
  132. package/dist/capabilities/analysis.specs.d.ts.map +1 -0
  133. package/dist/capabilities/analysis.specs.js +217 -0
  134. package/dist/capabilities/analysis.specs.js.map +1 -0
  135. package/dist/capabilities/apify.d.ts +34 -0
  136. package/dist/capabilities/apify.d.ts.map +1 -0
  137. package/dist/capabilities/apify.js +449 -0
  138. package/dist/capabilities/apify.js.map +1 -0
  139. package/dist/capabilities/apify.specs.d.ts +28 -0
  140. package/dist/capabilities/apify.specs.d.ts.map +1 -0
  141. package/dist/capabilities/apify.specs.js +232 -0
  142. package/dist/capabilities/apify.specs.js.map +1 -0
  143. package/dist/capabilities/apps.d.ts +40 -0
  144. package/dist/capabilities/apps.d.ts.map +1 -0
  145. package/dist/capabilities/apps.js +415 -0
  146. package/dist/capabilities/apps.js.map +1 -0
  147. package/dist/capabilities/apps.specs.d.ts +23 -0
  148. package/dist/capabilities/apps.specs.d.ts.map +1 -0
  149. package/dist/capabilities/apps.specs.js +236 -0
  150. package/dist/capabilities/apps.specs.js.map +1 -0
  151. package/dist/capabilities/args.d.ts +62 -0
  152. package/dist/capabilities/args.d.ts.map +1 -0
  153. package/dist/capabilities/args.js +215 -0
  154. package/dist/capabilities/args.js.map +1 -0
  155. package/dist/capabilities/assets.d.ts +45 -0
  156. package/dist/capabilities/assets.d.ts.map +1 -0
  157. package/dist/capabilities/assets.js +952 -0
  158. package/dist/capabilities/assets.js.map +1 -0
  159. package/dist/capabilities/assets.specs.d.ts +54 -0
  160. package/dist/capabilities/assets.specs.d.ts.map +1 -0
  161. package/dist/capabilities/assets.specs.js +291 -0
  162. package/dist/capabilities/assets.specs.js.map +1 -0
  163. package/dist/capabilities/background-generation.d.ts +14 -0
  164. package/dist/capabilities/background-generation.d.ts.map +1 -0
  165. package/dist/capabilities/background-generation.js +29 -0
  166. package/dist/capabilities/background-generation.js.map +1 -0
  167. package/dist/capabilities/browser.d.ts +30 -0
  168. package/dist/capabilities/browser.d.ts.map +1 -0
  169. package/dist/capabilities/browser.js +250 -0
  170. package/dist/capabilities/browser.js.map +1 -0
  171. package/dist/capabilities/browser.specs.d.ts +37 -0
  172. package/dist/capabilities/browser.specs.d.ts.map +1 -0
  173. package/dist/capabilities/browser.specs.js +173 -0
  174. package/dist/capabilities/browser.specs.js.map +1 -0
  175. package/dist/capabilities/code-grading.d.ts +68 -0
  176. package/dist/capabilities/code-grading.d.ts.map +1 -0
  177. package/dist/capabilities/code-grading.js +75 -0
  178. package/dist/capabilities/code-grading.js.map +1 -0
  179. package/dist/capabilities/code.d.ts +61 -0
  180. package/dist/capabilities/code.d.ts.map +1 -0
  181. package/dist/capabilities/code.js +366 -0
  182. package/dist/capabilities/code.js.map +1 -0
  183. package/dist/capabilities/code.specs.d.ts +22 -0
  184. package/dist/capabilities/code.specs.d.ts.map +1 -0
  185. package/dist/capabilities/code.specs.js +175 -0
  186. package/dist/capabilities/code.specs.js.map +1 -0
  187. package/dist/capabilities/collections.d.ts +44 -0
  188. package/dist/capabilities/collections.d.ts.map +1 -0
  189. package/dist/capabilities/collections.js +432 -0
  190. package/dist/capabilities/collections.js.map +1 -0
  191. package/dist/capabilities/collections.specs.d.ts +25 -0
  192. package/dist/capabilities/collections.specs.d.ts.map +1 -0
  193. package/dist/capabilities/collections.specs.js +299 -0
  194. package/dist/capabilities/collections.specs.js.map +1 -0
  195. package/dist/capabilities/compositions.d.ts +57 -0
  196. package/dist/capabilities/compositions.d.ts.map +1 -0
  197. package/dist/capabilities/compositions.js +384 -0
  198. package/dist/capabilities/compositions.js.map +1 -0
  199. package/dist/capabilities/compositions.specs.d.ts +22 -0
  200. package/dist/capabilities/compositions.specs.d.ts.map +1 -0
  201. package/dist/capabilities/compositions.specs.js +126 -0
  202. package/dist/capabilities/compositions.specs.js.map +1 -0
  203. package/dist/capabilities/concurrency.d.ts +12 -0
  204. package/dist/capabilities/concurrency.d.ts.map +1 -0
  205. package/dist/capabilities/concurrency.js +30 -0
  206. package/dist/capabilities/concurrency.js.map +1 -0
  207. package/dist/capabilities/costs.d.ts +20 -0
  208. package/dist/capabilities/costs.d.ts.map +1 -0
  209. package/dist/capabilities/costs.js +40 -0
  210. package/dist/capabilities/costs.js.map +1 -0
  211. package/dist/capabilities/costs.specs.d.ts +12 -0
  212. package/dist/capabilities/costs.specs.d.ts.map +1 -0
  213. package/dist/capabilities/costs.specs.js +35 -0
  214. package/dist/capabilities/costs.specs.js.map +1 -0
  215. package/dist/capabilities/dispatcher.d.ts +57 -0
  216. package/dist/capabilities/dispatcher.d.ts.map +1 -0
  217. package/dist/capabilities/dispatcher.js +117 -0
  218. package/dist/capabilities/dispatcher.js.map +1 -0
  219. package/dist/capabilities/documents.d.ts +25 -0
  220. package/dist/capabilities/documents.d.ts.map +1 -0
  221. package/dist/capabilities/documents.js +278 -0
  222. package/dist/capabilities/documents.js.map +1 -0
  223. package/dist/capabilities/documents.specs.d.ts +18 -0
  224. package/dist/capabilities/documents.specs.d.ts.map +1 -0
  225. package/dist/capabilities/documents.specs.js +201 -0
  226. package/dist/capabilities/documents.specs.js.map +1 -0
  227. package/dist/capabilities/email.d.ts +23 -0
  228. package/dist/capabilities/email.d.ts.map +1 -0
  229. package/dist/capabilities/email.js +226 -0
  230. package/dist/capabilities/email.js.map +1 -0
  231. package/dist/capabilities/email.specs.d.ts +16 -0
  232. package/dist/capabilities/email.specs.d.ts.map +1 -0
  233. package/dist/capabilities/email.specs.js +102 -0
  234. package/dist/capabilities/email.specs.js.map +1 -0
  235. package/dist/capabilities/entities.d.ts +52 -0
  236. package/dist/capabilities/entities.d.ts.map +1 -0
  237. package/dist/capabilities/entities.js +478 -0
  238. package/dist/capabilities/entities.js.map +1 -0
  239. package/dist/capabilities/entities.specs.d.ts +25 -0
  240. package/dist/capabilities/entities.specs.d.ts.map +1 -0
  241. package/dist/capabilities/entities.specs.js +247 -0
  242. package/dist/capabilities/entities.specs.js.map +1 -0
  243. package/dist/capabilities/errors.d.ts +19 -0
  244. package/dist/capabilities/errors.d.ts.map +1 -0
  245. package/dist/capabilities/errors.js +109 -0
  246. package/dist/capabilities/errors.js.map +1 -0
  247. package/dist/capabilities/errors.specs.d.ts +11 -0
  248. package/dist/capabilities/errors.specs.d.ts.map +1 -0
  249. package/dist/capabilities/errors.specs.js +100 -0
  250. package/dist/capabilities/errors.specs.js.map +1 -0
  251. package/dist/capabilities/example-timelines.d.ts +3 -0
  252. package/dist/capabilities/example-timelines.d.ts.map +1 -0
  253. package/dist/capabilities/example-timelines.js +233 -0
  254. package/dist/capabilities/example-timelines.js.map +1 -0
  255. package/dist/capabilities/example-timelines.specs.d.ts +6 -0
  256. package/dist/capabilities/example-timelines.specs.d.ts.map +1 -0
  257. package/dist/capabilities/example-timelines.specs.js +71 -0
  258. package/dist/capabilities/example-timelines.specs.js.map +1 -0
  259. package/dist/capabilities/files.d.ts +53 -0
  260. package/dist/capabilities/files.d.ts.map +1 -0
  261. package/dist/capabilities/files.js +1172 -0
  262. package/dist/capabilities/files.js.map +1 -0
  263. package/dist/capabilities/files.specs.d.ts +28 -0
  264. package/dist/capabilities/files.specs.d.ts.map +1 -0
  265. package/dist/capabilities/files.specs.js +259 -0
  266. package/dist/capabilities/files.specs.js.map +1 -0
  267. package/dist/capabilities/finish-storyboard.d.ts +5 -0
  268. package/dist/capabilities/finish-storyboard.d.ts.map +1 -0
  269. package/dist/capabilities/finish-storyboard.js +278 -0
  270. package/dist/capabilities/finish-storyboard.js.map +1 -0
  271. package/dist/capabilities/flow.d.ts +93 -0
  272. package/dist/capabilities/flow.d.ts.map +1 -0
  273. package/dist/capabilities/flow.js +285 -0
  274. package/dist/capabilities/flow.js.map +1 -0
  275. package/dist/capabilities/flow.specs.d.ts +25 -0
  276. package/dist/capabilities/flow.specs.d.ts.map +1 -0
  277. package/dist/capabilities/flow.specs.js +114 -0
  278. package/dist/capabilities/flow.specs.js.map +1 -0
  279. package/dist/capabilities/game-asset-source.d.ts +31 -0
  280. package/dist/capabilities/game-asset-source.d.ts.map +1 -0
  281. package/dist/capabilities/game-asset-source.js +81 -0
  282. package/dist/capabilities/game-asset-source.js.map +1 -0
  283. package/dist/capabilities/game.d.ts +24 -0
  284. package/dist/capabilities/game.d.ts.map +1 -0
  285. package/dist/capabilities/game.js +1432 -0
  286. package/dist/capabilities/game.js.map +1 -0
  287. package/dist/capabilities/game.specs.d.ts +5 -0
  288. package/dist/capabilities/game.specs.d.ts.map +1 -0
  289. package/dist/capabilities/game.specs.js +110 -0
  290. package/dist/capabilities/game.specs.js.map +1 -0
  291. package/dist/capabilities/game3d.d.ts +17 -0
  292. package/dist/capabilities/game3d.d.ts.map +1 -0
  293. package/dist/capabilities/game3d.js +433 -0
  294. package/dist/capabilities/game3d.js.map +1 -0
  295. package/dist/capabilities/gate-from-context.d.ts +39 -0
  296. package/dist/capabilities/gate-from-context.d.ts.map +1 -0
  297. package/dist/capabilities/gate-from-context.js +97 -0
  298. package/dist/capabilities/gate-from-context.js.map +1 -0
  299. package/dist/capabilities/generations.d.ts +81 -0
  300. package/dist/capabilities/generations.d.ts.map +1 -0
  301. package/dist/capabilities/generations.js +387 -0
  302. package/dist/capabilities/generations.js.map +1 -0
  303. package/dist/capabilities/generations.specs.d.ts +62 -0
  304. package/dist/capabilities/generations.specs.d.ts.map +1 -0
  305. package/dist/capabilities/generations.specs.js +230 -0
  306. package/dist/capabilities/generations.specs.js.map +1 -0
  307. package/dist/capabilities/google.d.ts +50 -0
  308. package/dist/capabilities/google.d.ts.map +1 -0
  309. package/dist/capabilities/google.js +246 -0
  310. package/dist/capabilities/google.js.map +1 -0
  311. package/dist/capabilities/google.specs.d.ts +52 -0
  312. package/dist/capabilities/google.specs.d.ts.map +1 -0
  313. package/dist/capabilities/google.specs.js +391 -0
  314. package/dist/capabilities/google.specs.js.map +1 -0
  315. package/dist/capabilities/html-text.d.ts +28 -0
  316. package/dist/capabilities/html-text.d.ts.map +1 -0
  317. package/dist/capabilities/html-text.js +76 -0
  318. package/dist/capabilities/html-text.js.map +1 -0
  319. package/dist/capabilities/index.d.ts +19 -0
  320. package/dist/capabilities/index.d.ts.map +1 -0
  321. package/dist/capabilities/index.js +14 -0
  322. package/dist/capabilities/index.js.map +1 -0
  323. package/dist/capabilities/invoke.d.ts +78 -0
  324. package/dist/capabilities/invoke.d.ts.map +1 -0
  325. package/dist/capabilities/invoke.js +251 -0
  326. package/dist/capabilities/invoke.js.map +1 -0
  327. package/dist/capabilities/jobs.d.ts +32 -0
  328. package/dist/capabilities/jobs.d.ts.map +1 -0
  329. package/dist/capabilities/jobs.js +167 -0
  330. package/dist/capabilities/jobs.js.map +1 -0
  331. package/dist/capabilities/jobs.specs.d.ts +20 -0
  332. package/dist/capabilities/jobs.specs.d.ts.map +1 -0
  333. package/dist/capabilities/jobs.specs.js +105 -0
  334. package/dist/capabilities/jobs.specs.js.map +1 -0
  335. package/dist/capabilities/js-scripts.d.ts +108 -0
  336. package/dist/capabilities/js-scripts.d.ts.map +1 -0
  337. package/dist/capabilities/js-scripts.js +807 -0
  338. package/dist/capabilities/js-scripts.js.map +1 -0
  339. package/dist/capabilities/js-scripts.specs.d.ts +52 -0
  340. package/dist/capabilities/js-scripts.specs.d.ts.map +1 -0
  341. package/dist/capabilities/js-scripts.specs.js +394 -0
  342. package/dist/capabilities/js-scripts.specs.js.map +1 -0
  343. package/dist/capabilities/lazy-tool.d.ts +41 -0
  344. package/dist/capabilities/lazy-tool.d.ts.map +1 -0
  345. package/dist/capabilities/lazy-tool.js +82 -0
  346. package/dist/capabilities/lazy-tool.js.map +1 -0
  347. package/dist/capabilities/legacy-tools.d.ts +15 -0
  348. package/dist/capabilities/legacy-tools.d.ts.map +1 -0
  349. package/dist/capabilities/legacy-tools.js +98 -0
  350. package/dist/capabilities/legacy-tools.js.map +1 -0
  351. package/dist/capabilities/local-browser.d.ts +24 -0
  352. package/dist/capabilities/local-browser.d.ts.map +1 -0
  353. package/dist/capabilities/local-browser.js +105 -0
  354. package/dist/capabilities/local-browser.js.map +1 -0
  355. package/dist/capabilities/media.d.ts +112 -0
  356. package/dist/capabilities/media.d.ts.map +1 -0
  357. package/dist/capabilities/media.js +2258 -0
  358. package/dist/capabilities/media.js.map +1 -0
  359. package/dist/capabilities/media.specs.d.ts +65 -0
  360. package/dist/capabilities/media.specs.d.ts.map +1 -0
  361. package/dist/capabilities/media.specs.js +779 -0
  362. package/dist/capabilities/media.specs.js.map +1 -0
  363. package/dist/capabilities/memory.d.ts +31 -0
  364. package/dist/capabilities/memory.d.ts.map +1 -0
  365. package/dist/capabilities/memory.js +403 -0
  366. package/dist/capabilities/memory.js.map +1 -0
  367. package/dist/capabilities/memory.specs.d.ts +55 -0
  368. package/dist/capabilities/memory.specs.d.ts.map +1 -0
  369. package/dist/capabilities/memory.specs.js +208 -0
  370. package/dist/capabilities/memory.specs.js.map +1 -0
  371. package/dist/capabilities/model3d.d.ts +29 -0
  372. package/dist/capabilities/model3d.d.ts.map +1 -0
  373. package/dist/capabilities/model3d.js +482 -0
  374. package/dist/capabilities/model3d.js.map +1 -0
  375. package/dist/capabilities/model3d.specs.d.ts +28 -0
  376. package/dist/capabilities/model3d.specs.d.ts.map +1 -0
  377. package/dist/capabilities/model3d.specs.js +305 -0
  378. package/dist/capabilities/model3d.specs.js.map +1 -0
  379. package/dist/capabilities/models.d.ts +138 -0
  380. package/dist/capabilities/models.d.ts.map +1 -0
  381. package/dist/capabilities/models.js +805 -0
  382. package/dist/capabilities/models.js.map +1 -0
  383. package/dist/capabilities/models.specs.d.ts +21 -0
  384. package/dist/capabilities/models.specs.d.ts.map +1 -0
  385. package/dist/capabilities/models.specs.js +141 -0
  386. package/dist/capabilities/models.specs.js.map +1 -0
  387. package/dist/capabilities/nodes.d.ts +26 -0
  388. package/dist/capabilities/nodes.d.ts.map +1 -0
  389. package/dist/capabilities/nodes.js +266 -0
  390. package/dist/capabilities/nodes.js.map +1 -0
  391. package/dist/capabilities/nodes.specs.d.ts +20 -0
  392. package/dist/capabilities/nodes.specs.d.ts.map +1 -0
  393. package/dist/capabilities/nodes.specs.js +106 -0
  394. package/dist/capabilities/nodes.specs.js.map +1 -0
  395. package/dist/capabilities/packs.d.ts +69 -0
  396. package/dist/capabilities/packs.d.ts.map +1 -0
  397. package/dist/capabilities/packs.js +246 -0
  398. package/dist/capabilities/packs.js.map +1 -0
  399. package/dist/capabilities/packs.specs.d.ts +27 -0
  400. package/dist/capabilities/packs.specs.d.ts.map +1 -0
  401. package/dist/capabilities/packs.specs.js +64 -0
  402. package/dist/capabilities/packs.specs.js.map +1 -0
  403. package/dist/capabilities/project-scope.d.ts +12 -0
  404. package/dist/capabilities/project-scope.d.ts.map +1 -0
  405. package/dist/capabilities/project-scope.js +19 -0
  406. package/dist/capabilities/project-scope.js.map +1 -0
  407. package/dist/capabilities/projects.d.ts +23 -0
  408. package/dist/capabilities/projects.d.ts.map +1 -0
  409. package/dist/capabilities/projects.js +206 -0
  410. package/dist/capabilities/projects.js.map +1 -0
  411. package/dist/capabilities/projects.specs.d.ts +23 -0
  412. package/dist/capabilities/projects.specs.d.ts.map +1 -0
  413. package/dist/capabilities/projects.specs.js +118 -0
  414. package/dist/capabilities/projects.specs.js.map +1 -0
  415. package/dist/capabilities/registry.d.ts +111 -0
  416. package/dist/capabilities/registry.d.ts.map +1 -0
  417. package/dist/capabilities/registry.js +473 -0
  418. package/dist/capabilities/registry.js.map +1 -0
  419. package/dist/capabilities/run-agent.d.ts +19 -0
  420. package/dist/capabilities/run-agent.d.ts.map +1 -0
  421. package/dist/capabilities/run-agent.js +183 -0
  422. package/dist/capabilities/run-agent.js.map +1 -0
  423. package/dist/capabilities/runs.d.ts +9 -0
  424. package/dist/capabilities/runs.d.ts.map +1 -0
  425. package/dist/capabilities/runs.js +46 -0
  426. package/dist/capabilities/runs.js.map +1 -0
  427. package/dist/capabilities/runs.specs.d.ts +39 -0
  428. package/dist/capabilities/runs.specs.d.ts.map +1 -0
  429. package/dist/capabilities/runs.specs.js +52 -0
  430. package/dist/capabilities/runs.specs.js.map +1 -0
  431. package/dist/capabilities/script-link.d.ts +22 -0
  432. package/dist/capabilities/script-link.d.ts.map +1 -0
  433. package/dist/capabilities/script-link.js +35 -0
  434. package/dist/capabilities/script-link.js.map +1 -0
  435. package/dist/capabilities/scripts.d.ts +43 -0
  436. package/dist/capabilities/scripts.d.ts.map +1 -0
  437. package/dist/capabilities/scripts.js +1795 -0
  438. package/dist/capabilities/scripts.js.map +1 -0
  439. package/dist/capabilities/scripts.specs.d.ts +40 -0
  440. package/dist/capabilities/scripts.specs.d.ts.map +1 -0
  441. package/dist/capabilities/scripts.specs.js +319 -0
  442. package/dist/capabilities/scripts.specs.js.map +1 -0
  443. package/dist/capabilities/serpapi.d.ts +42 -0
  444. package/dist/capabilities/serpapi.d.ts.map +1 -0
  445. package/dist/capabilities/serpapi.js +262 -0
  446. package/dist/capabilities/serpapi.js.map +1 -0
  447. package/dist/capabilities/serpapi.specs.d.ts +24 -0
  448. package/dist/capabilities/serpapi.specs.d.ts.map +1 -0
  449. package/dist/capabilities/serpapi.specs.js +174 -0
  450. package/dist/capabilities/serpapi.specs.js.map +1 -0
  451. package/dist/capabilities/settings.d.ts +48 -0
  452. package/dist/capabilities/settings.d.ts.map +1 -0
  453. package/dist/capabilities/settings.js +226 -0
  454. package/dist/capabilities/settings.js.map +1 -0
  455. package/dist/capabilities/settings.specs.d.ts +42 -0
  456. package/dist/capabilities/settings.specs.d.ts.map +1 -0
  457. package/dist/capabilities/settings.specs.js +126 -0
  458. package/dist/capabilities/settings.specs.js.map +1 -0
  459. package/dist/capabilities/shared.d.ts +35 -0
  460. package/dist/capabilities/shared.d.ts.map +1 -0
  461. package/dist/capabilities/shared.js +165 -0
  462. package/dist/capabilities/shared.js.map +1 -0
  463. package/dist/capabilities/shared.specs.d.ts +19 -0
  464. package/dist/capabilities/shared.specs.d.ts.map +1 -0
  465. package/dist/capabilities/shared.specs.js +134 -0
  466. package/dist/capabilities/shared.specs.js.map +1 -0
  467. package/dist/capabilities/sketches.d.ts +52 -0
  468. package/dist/capabilities/sketches.d.ts.map +1 -0
  469. package/dist/capabilities/sketches.js +1165 -0
  470. package/dist/capabilities/sketches.js.map +1 -0
  471. package/dist/capabilities/sketches.specs.d.ts +44 -0
  472. package/dist/capabilities/sketches.specs.d.ts.map +1 -0
  473. package/dist/capabilities/sketches.specs.js +392 -0
  474. package/dist/capabilities/sketches.specs.js.map +1 -0
  475. package/dist/capabilities/skills.d.ts +28 -0
  476. package/dist/capabilities/skills.d.ts.map +1 -0
  477. package/dist/capabilities/skills.js +289 -0
  478. package/dist/capabilities/skills.js.map +1 -0
  479. package/dist/capabilities/skills.specs.d.ts +17 -0
  480. package/dist/capabilities/skills.specs.d.ts.map +1 -0
  481. package/dist/capabilities/skills.specs.js +108 -0
  482. package/dist/capabilities/skills.specs.js.map +1 -0
  483. package/dist/capabilities/storyboard-layout-check.d.ts +33 -0
  484. package/dist/capabilities/storyboard-layout-check.d.ts.map +1 -0
  485. package/dist/capabilities/storyboard-layout-check.js +229 -0
  486. package/dist/capabilities/storyboard-layout-check.js.map +1 -0
  487. package/dist/capabilities/storyboard-measured-sources.d.ts +10 -0
  488. package/dist/capabilities/storyboard-measured-sources.d.ts.map +1 -0
  489. package/dist/capabilities/storyboard-measured-sources.js +67 -0
  490. package/dist/capabilities/storyboard-measured-sources.js.map +1 -0
  491. package/dist/capabilities/storyboard-review-times.d.ts +4 -0
  492. package/dist/capabilities/storyboard-review-times.d.ts.map +1 -0
  493. package/dist/capabilities/storyboard-review-times.js +39 -0
  494. package/dist/capabilities/storyboard-review-times.js.map +1 -0
  495. package/dist/capabilities/storyboards.d.ts +52 -0
  496. package/dist/capabilities/storyboards.d.ts.map +1 -0
  497. package/dist/capabilities/storyboards.js +2467 -0
  498. package/dist/capabilities/storyboards.js.map +1 -0
  499. package/dist/capabilities/storyboards.specs.d.ts +45 -0
  500. package/dist/capabilities/storyboards.specs.d.ts.map +1 -0
  501. package/dist/capabilities/storyboards.specs.js +457 -0
  502. package/dist/capabilities/storyboards.specs.js.map +1 -0
  503. package/dist/capabilities/threads.d.ts +25 -0
  504. package/dist/capabilities/threads.d.ts.map +1 -0
  505. package/dist/capabilities/threads.js +240 -0
  506. package/dist/capabilities/threads.js.map +1 -0
  507. package/dist/capabilities/threads.specs.d.ts +26 -0
  508. package/dist/capabilities/threads.specs.d.ts.map +1 -0
  509. package/dist/capabilities/threads.specs.js +108 -0
  510. package/dist/capabilities/threads.specs.js.map +1 -0
  511. package/dist/capabilities/timeline-audio-bake.d.ts +114 -0
  512. package/dist/capabilities/timeline-audio-bake.d.ts.map +1 -0
  513. package/dist/capabilities/timeline-audio-bake.js +188 -0
  514. package/dist/capabilities/timeline-audio-bake.js.map +1 -0
  515. package/dist/capabilities/timeline-bake.d.ts +21 -0
  516. package/dist/capabilities/timeline-bake.d.ts.map +1 -0
  517. package/dist/capabilities/timeline-bake.js +118 -0
  518. package/dist/capabilities/timeline-bake.js.map +1 -0
  519. package/dist/capabilities/timeline-bridge.d.ts +359 -0
  520. package/dist/capabilities/timeline-bridge.d.ts.map +1 -0
  521. package/dist/capabilities/timeline-bridge.js +1016 -0
  522. package/dist/capabilities/timeline-bridge.js.map +1 -0
  523. package/dist/capabilities/timeline-clip-frames.d.ts +17 -0
  524. package/dist/capabilities/timeline-clip-frames.d.ts.map +1 -0
  525. package/dist/capabilities/timeline-clip-frames.js +84 -0
  526. package/dist/capabilities/timeline-clip-frames.js.map +1 -0
  527. package/dist/capabilities/timeline-isolate-subject.d.ts +157 -0
  528. package/dist/capabilities/timeline-isolate-subject.d.ts.map +1 -0
  529. package/dist/capabilities/timeline-isolate-subject.js +293 -0
  530. package/dist/capabilities/timeline-isolate-subject.js.map +1 -0
  531. package/dist/capabilities/timeline-media-edit.d.ts +8 -0
  532. package/dist/capabilities/timeline-media-edit.d.ts.map +1 -0
  533. package/dist/capabilities/timeline-media-edit.js +94 -0
  534. package/dist/capabilities/timeline-media-edit.js.map +1 -0
  535. package/dist/capabilities/timeline-native-media.d.ts +4 -0
  536. package/dist/capabilities/timeline-native-media.d.ts.map +1 -0
  537. package/dist/capabilities/timeline-native-media.js +960 -0
  538. package/dist/capabilities/timeline-native-media.js.map +1 -0
  539. package/dist/capabilities/timeline-track-object.d.ts +83 -0
  540. package/dist/capabilities/timeline-track-object.d.ts.map +1 -0
  541. package/dist/capabilities/timeline-track-object.js +195 -0
  542. package/dist/capabilities/timeline-track-object.js.map +1 -0
  543. package/dist/capabilities/timelines.d.ts +250 -0
  544. package/dist/capabilities/timelines.d.ts.map +1 -0
  545. package/dist/capabilities/timelines.js +2825 -0
  546. package/dist/capabilities/timelines.js.map +1 -0
  547. package/dist/capabilities/timelines.specs.d.ts +142 -0
  548. package/dist/capabilities/timelines.specs.d.ts.map +1 -0
  549. package/dist/capabilities/timelines.specs.js +1527 -0
  550. package/dist/capabilities/timelines.specs.js.map +1 -0
  551. package/dist/capabilities/types.d.ts +199 -0
  552. package/dist/capabilities/types.d.ts.map +1 -0
  553. package/dist/capabilities/types.js +19 -0
  554. package/dist/capabilities/types.js.map +1 -0
  555. package/dist/capabilities/ui.d.ts +38 -0
  556. package/dist/capabilities/ui.d.ts.map +1 -0
  557. package/dist/capabilities/ui.js +150 -0
  558. package/dist/capabilities/ui.js.map +1 -0
  559. package/dist/capabilities/ui.specs.d.ts +22 -0
  560. package/dist/capabilities/ui.specs.d.ts.map +1 -0
  561. package/dist/capabilities/ui.specs.js +59 -0
  562. package/dist/capabilities/ui.specs.js.map +1 -0
  563. package/dist/capabilities/video-production-acceptance.d.ts +27 -0
  564. package/dist/capabilities/video-production-acceptance.d.ts.map +1 -0
  565. package/dist/capabilities/video-production-acceptance.js +41 -0
  566. package/dist/capabilities/video-production-acceptance.js.map +1 -0
  567. package/dist/capabilities/video-production.d.ts +179 -0
  568. package/dist/capabilities/video-production.d.ts.map +1 -0
  569. package/dist/capabilities/video-production.js +1492 -0
  570. package/dist/capabilities/video-production.js.map +1 -0
  571. package/dist/capabilities/video-production.specs.d.ts +13 -0
  572. package/dist/capabilities/video-production.specs.d.ts.map +1 -0
  573. package/dist/capabilities/video-production.specs.js +256 -0
  574. package/dist/capabilities/video-production.specs.js.map +1 -0
  575. package/dist/capabilities/web.d.ts +86 -0
  576. package/dist/capabilities/web.d.ts.map +1 -0
  577. package/dist/capabilities/web.js +850 -0
  578. package/dist/capabilities/web.js.map +1 -0
  579. package/dist/capabilities/web.specs.d.ts +33 -0
  580. package/dist/capabilities/web.specs.d.ts.map +1 -0
  581. package/dist/capabilities/web.specs.js +286 -0
  582. package/dist/capabilities/web.specs.js.map +1 -0
  583. package/dist/capabilities/workflows.d.ts +58 -0
  584. package/dist/capabilities/workflows.d.ts.map +1 -0
  585. package/dist/capabilities/workflows.js +1557 -0
  586. package/dist/capabilities/workflows.js.map +1 -0
  587. package/dist/capabilities/workflows.specs.d.ts +63 -0
  588. package/dist/capabilities/workflows.specs.d.ts.map +1 -0
  589. package/dist/capabilities/workflows.specs.js +858 -0
  590. package/dist/capabilities/workflows.specs.js.map +1 -0
  591. package/dist/code-gen/analyze.d.ts +26 -0
  592. package/dist/code-gen/analyze.d.ts.map +1 -0
  593. package/dist/code-gen/analyze.js +79 -0
  594. package/dist/code-gen/analyze.js.map +1 -0
  595. package/dist/code-gen/port-types.d.ts +58 -0
  596. package/dist/code-gen/port-types.d.ts.map +1 -0
  597. package/dist/code-gen/port-types.js +115 -0
  598. package/dist/code-gen/port-types.js.map +1 -0
  599. package/dist/code-gen/prompt.d.ts +37 -0
  600. package/dist/code-gen/prompt.d.ts.map +1 -0
  601. package/dist/code-gen/prompt.js +129 -0
  602. package/dist/code-gen/prompt.js.map +1 -0
  603. package/dist/code-gen/sandbox-manifest.d.ts +120 -0
  604. package/dist/code-gen/sandbox-manifest.d.ts.map +1 -0
  605. package/dist/code-gen/sandbox-manifest.js +1023 -0
  606. package/dist/code-gen/sandbox-manifest.js.map +1 -0
  607. package/dist/code-gen/sandbox-prompt.d.ts +26 -0
  608. package/dist/code-gen/sandbox-prompt.d.ts.map +1 -0
  609. package/dist/code-gen/sandbox-prompt.js +126 -0
  610. package/dist/code-gen/sandbox-prompt.js.map +1 -0
  611. package/dist/code-planner.d.ts +72 -0
  612. package/dist/code-planner.d.ts.map +1 -0
  613. package/dist/code-planner.js +271 -0
  614. package/dist/code-planner.js.map +1 -0
  615. package/dist/codeact/action-diagnostics.d.ts +35 -0
  616. package/dist/codeact/action-diagnostics.d.ts.map +1 -0
  617. package/dist/codeact/action-diagnostics.js +197 -0
  618. package/dist/codeact/action-diagnostics.js.map +1 -0
  619. package/dist/codeact/capability-modules.d.ts +66 -0
  620. package/dist/codeact/capability-modules.d.ts.map +1 -0
  621. package/dist/codeact/capability-modules.js +278 -0
  622. package/dist/codeact/capability-modules.js.map +1 -0
  623. package/dist/codeact/chat-codeact.d.ts +104 -0
  624. package/dist/codeact/chat-codeact.d.ts.map +1 -0
  625. package/dist/codeact/chat-codeact.js +424 -0
  626. package/dist/codeact/chat-codeact.js.map +1 -0
  627. package/dist/codeact/codeact-executor.d.ts +247 -0
  628. package/dist/codeact/codeact-executor.d.ts.map +1 -0
  629. package/dist/codeact/codeact-executor.js +1184 -0
  630. package/dist/codeact/codeact-executor.js.map +1 -0
  631. package/dist/codeact/compact-ids.d.ts +28 -0
  632. package/dist/codeact/compact-ids.d.ts.map +1 -0
  633. package/dist/codeact/compact-ids.js +81 -0
  634. package/dist/codeact/compact-ids.js.map +1 -0
  635. package/dist/codeact/execute-code-contract.d.ts +97 -0
  636. package/dist/codeact/execute-code-contract.d.ts.map +1 -0
  637. package/dist/codeact/execute-code-contract.js +225 -0
  638. package/dist/codeact/execute-code-contract.js.map +1 -0
  639. package/dist/codeact/fabric-package.d.ts +29 -0
  640. package/dist/codeact/fabric-package.d.ts.map +1 -0
  641. package/dist/codeact/fabric-package.js +62 -0
  642. package/dist/codeact/fabric-package.js.map +1 -0
  643. package/dist/codeact/flow-package.d.ts +31 -0
  644. package/dist/codeact/flow-package.d.ts.map +1 -0
  645. package/dist/codeact/flow-package.js +80 -0
  646. package/dist/codeact/flow-package.js.map +1 -0
  647. package/dist/codeact/graph-dsl-package.d.ts +42 -0
  648. package/dist/codeact/graph-dsl-package.d.ts.map +1 -0
  649. package/dist/codeact/graph-dsl-package.js +100 -0
  650. package/dist/codeact/graph-dsl-package.js.map +1 -0
  651. package/dist/codeact/graph-model.d.ts +30 -0
  652. package/dist/codeact/graph-model.d.ts.map +1 -0
  653. package/dist/codeact/graph-model.js +407 -0
  654. package/dist/codeact/graph-model.js.map +1 -0
  655. package/dist/codeact/mcp-guest-contract.d.ts +66 -0
  656. package/dist/codeact/mcp-guest-contract.d.ts.map +1 -0
  657. package/dist/codeact/mcp-guest-contract.js +108 -0
  658. package/dist/codeact/mcp-guest-contract.js.map +1 -0
  659. package/dist/codeact/nodetool-api.d.ts +60 -0
  660. package/dist/codeact/nodetool-api.d.ts.map +1 -0
  661. package/dist/codeact/nodetool-api.js +1974 -0
  662. package/dist/codeact/nodetool-api.js.map +1 -0
  663. package/dist/codeact/prompt.d.ts +88 -0
  664. package/dist/codeact/prompt.d.ts.map +1 -0
  665. package/dist/codeact/prompt.js +326 -0
  666. package/dist/codeact/prompt.js.map +1 -0
  667. package/dist/codeact/sandbox-package-docs.d.ts +48 -0
  668. package/dist/codeact/sandbox-package-docs.d.ts.map +1 -0
  669. package/dist/codeact/sandbox-package-docs.js +55 -0
  670. package/dist/codeact/sandbox-package-docs.js.map +1 -0
  671. package/dist/codeact/sandbox-package-listing.d.ts +81 -0
  672. package/dist/codeact/sandbox-package-listing.d.ts.map +1 -0
  673. package/dist/codeact/sandbox-package-listing.js +101 -0
  674. package/dist/codeact/sandbox-package-listing.js.map +1 -0
  675. package/dist/codeact/sandbox-packages.d.ts +72 -0
  676. package/dist/codeact/sandbox-packages.d.ts.map +1 -0
  677. package/dist/codeact/sandbox-packages.js +230 -0
  678. package/dist/codeact/sandbox-packages.js.map +1 -0
  679. package/dist/codeact/timeline-package.d.ts +5 -0
  680. package/dist/codeact/timeline-package.d.ts.map +1 -0
  681. package/dist/codeact/timeline-package.js +10 -0
  682. package/dist/codeact/timeline-package.js.map +1 -0
  683. package/dist/codeact/tool-api.d.ts +200 -0
  684. package/dist/codeact/tool-api.d.ts.map +1 -0
  685. package/dist/codeact/tool-api.js +452 -0
  686. package/dist/codeact/tool-api.js.map +1 -0
  687. package/dist/codeact/tools-prelude.d.ts +32 -0
  688. package/dist/codeact/tools-prelude.d.ts.map +1 -0
  689. package/dist/codeact/tools-prelude.js +65 -0
  690. package/dist/codeact/tools-prelude.js.map +1 -0
  691. package/dist/constants.d.ts +47 -2
  692. package/dist/constants.d.ts.map +1 -1
  693. package/dist/constants.js +64 -2
  694. package/dist/constants.js.map +1 -1
  695. package/dist/custom-animation-bake.d.ts +57 -0
  696. package/dist/custom-animation-bake.d.ts.map +1 -0
  697. package/dist/custom-animation-bake.js +88 -0
  698. package/dist/custom-animation-bake.js.map +1 -0
  699. package/dist/dynamic-slots.d.ts +72 -0
  700. package/dist/dynamic-slots.d.ts.map +1 -0
  701. package/dist/dynamic-slots.js +0 -0
  702. package/dist/dynamic-slots.js.map +1 -0
  703. package/dist/evals/app-build-cases.d.ts +35 -0
  704. package/dist/evals/app-build-cases.d.ts.map +1 -0
  705. package/dist/evals/app-build-cases.js +722 -0
  706. package/dist/evals/app-build-cases.js.map +1 -0
  707. package/dist/evals/app-build-eval.d.ts +208 -0
  708. package/dist/evals/app-build-eval.d.ts.map +1 -0
  709. package/dist/evals/app-build-eval.js +518 -0
  710. package/dist/evals/app-build-eval.js.map +1 -0
  711. package/dist/evals/app-build-plan.d.ts +76 -0
  712. package/dist/evals/app-build-plan.d.ts.map +1 -0
  713. package/dist/evals/app-build-plan.js +140 -0
  714. package/dist/evals/app-build-plan.js.map +1 -0
  715. package/dist/evals/code-gen-cases.d.ts +13 -0
  716. package/dist/evals/code-gen-cases.d.ts.map +1 -0
  717. package/dist/evals/code-gen-cases.js +124 -0
  718. package/dist/evals/code-gen-cases.js.map +1 -0
  719. package/dist/evals/code-gen-eval.d.ts +109 -0
  720. package/dist/evals/code-gen-eval.d.ts.map +1 -0
  721. package/dist/evals/code-gen-eval.js +299 -0
  722. package/dist/evals/code-gen-eval.js.map +1 -0
  723. package/dist/evals/codeact-api-cases.d.ts +14 -0
  724. package/dist/evals/codeact-api-cases.d.ts.map +1 -0
  725. package/dist/evals/codeact-api-cases.js +31 -0
  726. package/dist/evals/codeact-api-cases.js.map +1 -0
  727. package/dist/evals/codeact-api-core.d.ts +23 -0
  728. package/dist/evals/codeact-api-core.d.ts.map +1 -0
  729. package/dist/evals/codeact-api-core.js +1411 -0
  730. package/dist/evals/codeact-api-core.js.map +1 -0
  731. package/dist/evals/codeact-api-runs.d.ts +3 -0
  732. package/dist/evals/codeact-api-runs.d.ts.map +1 -0
  733. package/dist/evals/codeact-api-runs.js +33 -0
  734. package/dist/evals/codeact-api-runs.js.map +1 -0
  735. package/dist/evals/codeact-api-surfaces.d.ts +25 -0
  736. package/dist/evals/codeact-api-surfaces.d.ts.map +1 -0
  737. package/dist/evals/codeact-api-surfaces.js +2191 -0
  738. package/dist/evals/codeact-api-surfaces.js.map +1 -0
  739. package/dist/evals/codeact-cases.d.ts +76 -0
  740. package/dist/evals/codeact-cases.d.ts.map +1 -0
  741. package/dist/evals/codeact-cases.js +151 -0
  742. package/dist/evals/codeact-cases.js.map +1 -0
  743. package/dist/evals/codeact-eval.d.ts +66 -0
  744. package/dist/evals/codeact-eval.d.ts.map +1 -0
  745. package/dist/evals/codeact-eval.js +250 -0
  746. package/dist/evals/codeact-eval.js.map +1 -0
  747. package/dist/evals/codeact-sandbox-pack-cases.d.ts +31 -0
  748. package/dist/evals/codeact-sandbox-pack-cases.d.ts.map +1 -0
  749. package/dist/evals/codeact-sandbox-pack-cases.js +219 -0
  750. package/dist/evals/codeact-sandbox-pack-cases.js.map +1 -0
  751. package/dist/evals/escalation-cases.d.ts +22 -0
  752. package/dist/evals/escalation-cases.d.ts.map +1 -0
  753. package/dist/evals/escalation-cases.js +343 -0
  754. package/dist/evals/escalation-cases.js.map +1 -0
  755. package/dist/evals/escalation.d.ts +92 -0
  756. package/dist/evals/escalation.d.ts.map +1 -0
  757. package/dist/evals/escalation.js +152 -0
  758. package/dist/evals/escalation.js.map +1 -0
  759. package/dist/evals/goal-judge.d.ts +51 -0
  760. package/dist/evals/goal-judge.d.ts.map +1 -0
  761. package/dist/evals/goal-judge.js +152 -0
  762. package/dist/evals/goal-judge.js.map +1 -0
  763. package/dist/evals/graph-e2e-cases.d.ts +21 -0
  764. package/dist/evals/graph-e2e-cases.d.ts.map +1 -0
  765. package/dist/evals/graph-e2e-cases.js +262 -0
  766. package/dist/evals/graph-e2e-cases.js.map +1 -0
  767. package/dist/evals/graph-e2e-eval.d.ts +202 -0
  768. package/dist/evals/graph-e2e-eval.d.ts.map +1 -0
  769. package/dist/evals/graph-e2e-eval.js +438 -0
  770. package/dist/evals/graph-e2e-eval.js.map +1 -0
  771. package/dist/evals/graph-planner-cases.d.ts +12 -0
  772. package/dist/evals/graph-planner-cases.d.ts.map +1 -0
  773. package/dist/evals/graph-planner-cases.js +256 -0
  774. package/dist/evals/graph-planner-cases.js.map +1 -0
  775. package/dist/evals/graph-planner-eval.d.ts +178 -0
  776. package/dist/evals/graph-planner-eval.d.ts.map +1 -0
  777. package/dist/evals/graph-planner-eval.js +495 -0
  778. package/dist/evals/graph-planner-eval.js.map +1 -0
  779. package/dist/evals/planner-tools.d.ts +21 -0
  780. package/dist/evals/planner-tools.d.ts.map +1 -0
  781. package/dist/evals/planner-tools.js +66 -0
  782. package/dist/evals/planner-tools.js.map +1 -0
  783. package/dist/evals/subtask-cases.d.ts +88 -0
  784. package/dist/evals/subtask-cases.d.ts.map +1 -0
  785. package/dist/evals/subtask-cases.js +322 -0
  786. package/dist/evals/subtask-cases.js.map +1 -0
  787. package/dist/evals/subtask-eval.d.ts +129 -0
  788. package/dist/evals/subtask-eval.d.ts.map +1 -0
  789. package/dist/evals/subtask-eval.js +397 -0
  790. package/dist/evals/subtask-eval.js.map +1 -0
  791. package/dist/evals/surfaces/app.d.ts +19 -0
  792. package/dist/evals/surfaces/app.d.ts.map +1 -0
  793. package/dist/evals/surfaces/app.js +341 -0
  794. package/dist/evals/surfaces/app.js.map +1 -0
  795. package/dist/evals/surfaces/creative-pipeline.d.ts +203 -0
  796. package/dist/evals/surfaces/creative-pipeline.d.ts.map +1 -0
  797. package/dist/evals/surfaces/creative-pipeline.js +909 -0
  798. package/dist/evals/surfaces/creative-pipeline.js.map +1 -0
  799. package/dist/evals/surfaces/game.d.ts +5 -0
  800. package/dist/evals/surfaces/game.d.ts.map +1 -0
  801. package/dist/evals/surfaces/game.js +42 -0
  802. package/dist/evals/surfaces/game.js.map +1 -0
  803. package/dist/evals/surfaces/js-script.d.ts +66 -0
  804. package/dist/evals/surfaces/js-script.d.ts.map +1 -0
  805. package/dist/evals/surfaces/js-script.js +407 -0
  806. package/dist/evals/surfaces/js-script.js.map +1 -0
  807. package/dist/evals/surfaces/memory.d.ts +34 -0
  808. package/dist/evals/surfaces/memory.d.ts.map +1 -0
  809. package/dist/evals/surfaces/memory.js +264 -0
  810. package/dist/evals/surfaces/memory.js.map +1 -0
  811. package/dist/evals/surfaces/model3d.d.ts +45 -0
  812. package/dist/evals/surfaces/model3d.d.ts.map +1 -0
  813. package/dist/evals/surfaces/model3d.js +346 -0
  814. package/dist/evals/surfaces/model3d.js.map +1 -0
  815. package/dist/evals/surfaces/script.d.ts +96 -0
  816. package/dist/evals/surfaces/script.d.ts.map +1 -0
  817. package/dist/evals/surfaces/script.js +709 -0
  818. package/dist/evals/surfaces/script.js.map +1 -0
  819. package/dist/evals/surfaces/sketch.d.ts +126 -0
  820. package/dist/evals/surfaces/sketch.d.ts.map +1 -0
  821. package/dist/evals/surfaces/sketch.js +1306 -0
  822. package/dist/evals/surfaces/sketch.js.map +1 -0
  823. package/dist/evals/surfaces/storyboard.d.ts +97 -0
  824. package/dist/evals/surfaces/storyboard.d.ts.map +1 -0
  825. package/dist/evals/surfaces/storyboard.js +693 -0
  826. package/dist/evals/surfaces/storyboard.js.map +1 -0
  827. package/dist/evals/surfaces/timeline.d.ts +63 -0
  828. package/dist/evals/surfaces/timeline.d.ts.map +1 -0
  829. package/dist/evals/surfaces/timeline.js +655 -0
  830. package/dist/evals/surfaces/timeline.js.map +1 -0
  831. package/dist/evals/task-planner-cases.d.ts +57 -0
  832. package/dist/evals/task-planner-cases.d.ts.map +1 -0
  833. package/dist/evals/task-planner-cases.js +117 -0
  834. package/dist/evals/task-planner-cases.js.map +1 -0
  835. package/dist/evals/task-planner-eval.d.ts +101 -0
  836. package/dist/evals/task-planner-eval.d.ts.map +1 -0
  837. package/dist/evals/task-planner-eval.js +380 -0
  838. package/dist/evals/task-planner-eval.js.map +1 -0
  839. package/dist/evals/tool-loop-bridge.d.ts +61 -0
  840. package/dist/evals/tool-loop-bridge.d.ts.map +1 -0
  841. package/dist/evals/tool-loop-bridge.js +129 -0
  842. package/dist/evals/tool-loop-bridge.js.map +1 -0
  843. package/dist/evals/tool-loop-cases.d.ts +21 -0
  844. package/dist/evals/tool-loop-cases.d.ts.map +1 -0
  845. package/dist/evals/tool-loop-cases.js +401 -0
  846. package/dist/evals/tool-loop-cases.js.map +1 -0
  847. package/dist/evals/tool-loop-eval.d.ts +236 -0
  848. package/dist/evals/tool-loop-eval.d.ts.map +1 -0
  849. package/dist/evals/tool-loop-eval.js +378 -0
  850. package/dist/evals/tool-loop-eval.js.map +1 -0
  851. package/dist/evals/tool-loop-permission.d.ts +29 -0
  852. package/dist/evals/tool-loop-permission.d.ts.map +1 -0
  853. package/dist/evals/tool-loop-permission.js +58 -0
  854. package/dist/evals/tool-loop-permission.js.map +1 -0
  855. package/dist/game-authoring.d.ts +4737 -0
  856. package/dist/game-authoring.d.ts.map +1 -0
  857. package/dist/game-authoring.js +146 -0
  858. package/dist/game-authoring.js.map +1 -0
  859. package/dist/game-code-bake.d.ts +26 -0
  860. package/dist/game-code-bake.d.ts.map +1 -0
  861. package/dist/game-code-bake.js +98 -0
  862. package/dist/game-code-bake.js.map +1 -0
  863. package/dist/game-examples.d.ts +1303 -0
  864. package/dist/game-examples.d.ts.map +1 -0
  865. package/dist/game-examples.js +188 -0
  866. package/dist/game-examples.js.map +1 -0
  867. package/dist/graph-builder.d.ts +55 -3
  868. package/dist/graph-builder.d.ts.map +1 -1
  869. package/dist/graph-builder.js +159 -4
  870. package/dist/graph-builder.js.map +1 -1
  871. package/dist/graph-dsl-core.d.ts +25 -0
  872. package/dist/graph-dsl-core.d.ts.map +1 -0
  873. package/dist/graph-dsl-core.js +312 -0
  874. package/dist/graph-dsl-core.js.map +1 -0
  875. package/dist/graph-dsl.d.ts +30 -0
  876. package/dist/graph-dsl.d.ts.map +1 -0
  877. package/dist/graph-dsl.js +116 -0
  878. package/dist/graph-dsl.js.map +1 -0
  879. package/dist/host-binaries.d.ts +6 -0
  880. package/dist/host-binaries.d.ts.map +1 -0
  881. package/dist/host-binaries.js +6 -0
  882. package/dist/host-binaries.js.map +1 -0
  883. package/dist/host-binary-guard.d.ts +100 -0
  884. package/dist/host-binary-guard.d.ts.map +1 -0
  885. package/dist/host-binary-guard.js +205 -0
  886. package/dist/host-binary-guard.js.map +1 -0
  887. package/dist/host-modules/aws.d.ts +57 -0
  888. package/dist/host-modules/aws.d.ts.map +1 -0
  889. package/dist/host-modules/aws.js +309 -0
  890. package/dist/host-modules/aws.js.map +1 -0
  891. package/dist/host-modules/chrono.d.ts +15 -0
  892. package/dist/host-modules/chrono.d.ts.map +1 -0
  893. package/dist/host-modules/chrono.js +35 -0
  894. package/dist/host-modules/chrono.js.map +1 -0
  895. package/dist/host-modules/csv.d.ts +17 -0
  896. package/dist/host-modules/csv.d.ts.map +1 -0
  897. package/dist/host-modules/csv.js +64 -0
  898. package/dist/host-modules/csv.js.map +1 -0
  899. package/dist/host-modules/diff.d.ts +9 -0
  900. package/dist/host-modules/diff.d.ts.map +1 -0
  901. package/dist/host-modules/diff.js +26 -0
  902. package/dist/host-modules/diff.js.map +1 -0
  903. package/dist/host-modules/dispatcher.d.ts +41 -0
  904. package/dist/host-modules/dispatcher.d.ts.map +1 -0
  905. package/dist/host-modules/dispatcher.js +99 -0
  906. package/dist/host-modules/dispatcher.js.map +1 -0
  907. package/dist/host-modules/docx.d.ts +19 -0
  908. package/dist/host-modules/docx.d.ts.map +1 -0
  909. package/dist/host-modules/docx.js +120 -0
  910. package/dist/host-modules/docx.js.map +1 -0
  911. package/dist/host-modules/epub.d.ts +48 -0
  912. package/dist/host-modules/epub.d.ts.map +1 -0
  913. package/dist/host-modules/epub.js +100 -0
  914. package/dist/host-modules/epub.js.map +1 -0
  915. package/dist/host-modules/exif.d.ts +8 -0
  916. package/dist/host-modules/exif.d.ts.map +1 -0
  917. package/dist/host-modules/exif.js +19 -0
  918. package/dist/host-modules/exif.js.map +1 -0
  919. package/dist/host-modules/expr.d.ts +16 -0
  920. package/dist/host-modules/expr.d.ts.map +1 -0
  921. package/dist/host-modules/expr.js +18 -0
  922. package/dist/host-modules/expr.js.map +1 -0
  923. package/dist/host-modules/fabric.d.ts +46 -0
  924. package/dist/host-modules/fabric.d.ts.map +1 -0
  925. package/dist/host-modules/fabric.js +178 -0
  926. package/dist/host-modules/fabric.js.map +1 -0
  927. package/dist/host-modules/html.d.ts +51 -0
  928. package/dist/host-modules/html.d.ts.map +1 -0
  929. package/dist/host-modules/html.js +198 -0
  930. package/dist/host-modules/html.js.map +1 -0
  931. package/dist/host-modules/ics.d.ts +9 -0
  932. package/dist/host-modules/ics.d.ts.map +1 -0
  933. package/dist/host-modules/ics.js +35 -0
  934. package/dist/host-modules/ics.js.map +1 -0
  935. package/dist/host-modules/limits.d.ts +41 -0
  936. package/dist/host-modules/limits.d.ts.map +1 -0
  937. package/dist/host-modules/limits.js +76 -0
  938. package/dist/host-modules/limits.js.map +1 -0
  939. package/dist/host-modules/mammoth.d.ts +11 -0
  940. package/dist/host-modules/mammoth.d.ts.map +1 -0
  941. package/dist/host-modules/mammoth.js +29 -0
  942. package/dist/host-modules/mammoth.js.map +1 -0
  943. package/dist/host-modules/notion.d.ts +45 -0
  944. package/dist/host-modules/notion.d.ts.map +1 -0
  945. package/dist/host-modules/notion.js +128 -0
  946. package/dist/host-modules/notion.js.map +1 -0
  947. package/dist/host-modules/ocr.d.ts +25 -0
  948. package/dist/host-modules/ocr.d.ts.map +1 -0
  949. package/dist/host-modules/ocr.js +74 -0
  950. package/dist/host-modules/ocr.js.map +1 -0
  951. package/dist/host-modules/pdf.d.ts +21 -0
  952. package/dist/host-modules/pdf.d.ts.map +1 -0
  953. package/dist/host-modules/pdf.js +53 -0
  954. package/dist/host-modules/pdf.js.map +1 -0
  955. package/dist/host-modules/pdflib.d.ts +17 -0
  956. package/dist/host-modules/pdflib.d.ts.map +1 -0
  957. package/dist/host-modules/pdflib.js +138 -0
  958. package/dist/host-modules/pdflib.js.map +1 -0
  959. package/dist/host-modules/pptx.d.ts +19 -0
  960. package/dist/host-modules/pptx.d.ts.map +1 -0
  961. package/dist/host-modules/pptx.js +67 -0
  962. package/dist/host-modules/pptx.js.map +1 -0
  963. package/dist/host-modules/pptxgen.d.ts +13 -0
  964. package/dist/host-modules/pptxgen.d.ts.map +1 -0
  965. package/dist/host-modules/pptxgen.js +98 -0
  966. package/dist/host-modules/pptxgen.js.map +1 -0
  967. package/dist/host-modules/prepared-request.d.ts +41 -0
  968. package/dist/host-modules/prepared-request.d.ts.map +1 -0
  969. package/dist/host-modules/prepared-request.js +104 -0
  970. package/dist/host-modules/prepared-request.js.map +1 -0
  971. package/dist/host-modules/registry.d.ts +31 -0
  972. package/dist/host-modules/registry.d.ts.map +1 -0
  973. package/dist/host-modules/registry.js +193 -0
  974. package/dist/host-modules/registry.js.map +1 -0
  975. package/dist/host-modules/subtitle.d.ts +15 -0
  976. package/dist/host-modules/subtitle.d.ts.map +1 -0
  977. package/dist/host-modules/subtitle.js +45 -0
  978. package/dist/host-modules/subtitle.js.map +1 -0
  979. package/dist/host-modules/supabase.d.ts +42 -0
  980. package/dist/host-modules/supabase.d.ts.map +1 -0
  981. package/dist/host-modules/supabase.js +141 -0
  982. package/dist/host-modules/supabase.js.map +1 -0
  983. package/dist/host-modules/tfjs.d.ts +42 -0
  984. package/dist/host-modules/tfjs.d.ts.map +1 -0
  985. package/dist/host-modules/tfjs.js +186 -0
  986. package/dist/host-modules/tfjs.js.map +1 -0
  987. package/dist/host-modules/tokens.d.ts +17 -0
  988. package/dist/host-modules/tokens.d.ts.map +1 -0
  989. package/dist/host-modules/tokens.js +74 -0
  990. package/dist/host-modules/tokens.js.map +1 -0
  991. package/dist/host-modules/twilio.d.ts +34 -0
  992. package/dist/host-modules/twilio.d.ts.map +1 -0
  993. package/dist/host-modules/twilio.js +67 -0
  994. package/dist/host-modules/twilio.js.map +1 -0
  995. package/dist/host-modules/xlsx.d.ts +26 -0
  996. package/dist/host-modules/xlsx.d.ts.map +1 -0
  997. package/dist/host-modules/xlsx.js +323 -0
  998. package/dist/host-modules/xlsx.js.map +1 -0
  999. package/dist/host-modules/xml.d.ts +23 -0
  1000. package/dist/host-modules/xml.d.ts.map +1 -0
  1001. package/dist/host-modules/xml.js +38 -0
  1002. package/dist/host-modules/xml.js.map +1 -0
  1003. package/dist/host-modules/zip.d.ts +24 -0
  1004. package/dist/host-modules/zip.d.ts.map +1 -0
  1005. package/dist/host-modules/zip.js +70 -0
  1006. package/dist/host-modules/zip.js.map +1 -0
  1007. package/dist/index.d.ts +208 -60
  1008. package/dist/index.d.ts.map +1 -1
  1009. package/dist/index.js +163 -60
  1010. package/dist/index.js.map +1 -1
  1011. package/dist/js-sandbox-worker/engine.d.ts +4 -0
  1012. package/dist/js-sandbox-worker/engine.d.ts.map +1 -0
  1013. package/dist/js-sandbox-worker/engine.js +45 -0
  1014. package/dist/js-sandbox-worker/engine.js.map +1 -0
  1015. package/dist/js-sandbox-worker/host.d.ts +136 -0
  1016. package/dist/js-sandbox-worker/host.d.ts.map +1 -0
  1017. package/dist/js-sandbox-worker/host.js +482 -0
  1018. package/dist/js-sandbox-worker/host.js.map +1 -0
  1019. package/dist/js-sandbox-worker/interpreter.d.ts +276 -0
  1020. package/dist/js-sandbox-worker/interpreter.d.ts.map +1 -0
  1021. package/dist/js-sandbox-worker/interpreter.js +1293 -0
  1022. package/dist/js-sandbox-worker/interpreter.js.map +1 -0
  1023. package/dist/js-sandbox-worker/protocol.d.ts +168 -0
  1024. package/dist/js-sandbox-worker/protocol.d.ts.map +1 -0
  1025. package/dist/js-sandbox-worker/protocol.js +217 -0
  1026. package/dist/js-sandbox-worker/protocol.js.map +1 -0
  1027. package/dist/js-sandbox-worker/worker-entry.d.ts +26 -0
  1028. package/dist/js-sandbox-worker/worker-entry.d.ts.map +1 -0
  1029. package/dist/js-sandbox-worker/worker-entry.js +308 -0
  1030. package/dist/js-sandbox-worker/worker-entry.js.map +1 -0
  1031. package/dist/js-sandbox.d.ts +457 -15
  1032. package/dist/js-sandbox.d.ts.map +1 -1
  1033. package/dist/js-sandbox.js +2008 -311
  1034. package/dist/js-sandbox.js.map +1 -1
  1035. package/dist/js-script-app-runner.d.ts +11 -0
  1036. package/dist/js-script-app-runner.d.ts.map +1 -0
  1037. package/dist/js-script-app-runner.js +54 -0
  1038. package/dist/js-script-app-runner.js.map +1 -0
  1039. package/dist/js-script-sandbox.d.ts +27 -0
  1040. package/dist/js-script-sandbox.d.ts.map +1 -0
  1041. package/dist/js-script-sandbox.js +36 -0
  1042. package/dist/js-script-sandbox.js.map +1 -0
  1043. package/dist/jtbd/friction.d.ts +26 -0
  1044. package/dist/jtbd/friction.d.ts.map +1 -0
  1045. package/dist/jtbd/friction.js +169 -0
  1046. package/dist/jtbd/friction.js.map +1 -0
  1047. package/dist/jtbd/index.d.ts +6 -0
  1048. package/dist/jtbd/index.d.ts.map +1 -0
  1049. package/dist/jtbd/index.js +6 -0
  1050. package/dist/jtbd/index.js.map +1 -0
  1051. package/dist/jtbd/optimize.d.ts +71 -0
  1052. package/dist/jtbd/optimize.d.ts.map +1 -0
  1053. package/dist/jtbd/optimize.js +176 -0
  1054. package/dist/jtbd/optimize.js.map +1 -0
  1055. package/dist/jtbd/registry.d.ts +29 -0
  1056. package/dist/jtbd/registry.d.ts.map +1 -0
  1057. package/dist/jtbd/registry.js +451 -0
  1058. package/dist/jtbd/registry.js.map +1 -0
  1059. package/dist/jtbd/run.d.ts +70 -0
  1060. package/dist/jtbd/run.d.ts.map +1 -0
  1061. package/dist/jtbd/run.js +177 -0
  1062. package/dist/jtbd/run.js.map +1 -0
  1063. package/dist/jtbd/types.d.ts +141 -0
  1064. package/dist/jtbd/types.d.ts.map +1 -0
  1065. package/dist/jtbd/types.js +25 -0
  1066. package/dist/jtbd/types.js.map +1 -0
  1067. package/dist/model-prompting-skills.d.ts +45 -0
  1068. package/dist/model-prompting-skills.d.ts.map +1 -0
  1069. package/dist/model-prompting-skills.js +116 -0
  1070. package/dist/model-prompting-skills.js.map +1 -0
  1071. package/dist/network-guard.d.ts +50 -0
  1072. package/dist/network-guard.d.ts.map +1 -0
  1073. package/dist/network-guard.js +106 -0
  1074. package/dist/network-guard.js.map +1 -0
  1075. package/dist/normalize-model-properties.d.ts +26 -0
  1076. package/dist/normalize-model-properties.d.ts.map +1 -0
  1077. package/dist/normalize-model-properties.js +58 -0
  1078. package/dist/normalize-model-properties.js.map +1 -0
  1079. package/dist/output-format.d.ts +5 -1
  1080. package/dist/output-format.d.ts.map +1 -1
  1081. package/dist/output-format.js.map +1 -1
  1082. package/dist/parallel-task-executor.d.ts +68 -37
  1083. package/dist/parallel-task-executor.d.ts.map +1 -1
  1084. package/dist/parallel-task-executor.js +234 -203
  1085. package/dist/parallel-task-executor.js.map +1 -1
  1086. package/dist/prompts/background-subtask-prompt.d.ts +14 -0
  1087. package/dist/prompts/background-subtask-prompt.d.ts.map +1 -0
  1088. package/dist/prompts/background-subtask-prompt.js +64 -0
  1089. package/dist/prompts/background-subtask-prompt.js.map +1 -0
  1090. package/dist/prompts/product-knowledge.d.ts +3 -0
  1091. package/dist/prompts/product-knowledge.d.ts.map +1 -0
  1092. package/dist/prompts/product-knowledge.js +120 -0
  1093. package/dist/prompts/product-knowledge.js.map +1 -0
  1094. package/dist/prompts/read-only-search-prompt.d.ts +33 -0
  1095. package/dist/prompts/read-only-search-prompt.d.ts.map +1 -0
  1096. package/dist/prompts/read-only-search-prompt.js +109 -0
  1097. package/dist/prompts/read-only-search-prompt.js.map +1 -0
  1098. package/dist/prompts/sandbox-pack-catalog.d.ts +23 -0
  1099. package/dist/prompts/sandbox-pack-catalog.d.ts.map +1 -0
  1100. package/dist/prompts/sandbox-pack-catalog.js +40 -0
  1101. package/dist/prompts/sandbox-pack-catalog.js.map +1 -0
  1102. package/dist/prompts/security-monitor-prompt.d.ts +32 -0
  1103. package/dist/prompts/security-monitor-prompt.d.ts.map +1 -0
  1104. package/dist/prompts/security-monitor-prompt.js +99 -0
  1105. package/dist/prompts/security-monitor-prompt.js.map +1 -0
  1106. package/dist/prompts/workflow-authoring-knowledge.d.ts +77 -0
  1107. package/dist/prompts/workflow-authoring-knowledge.d.ts.map +1 -0
  1108. package/dist/prompts/workflow-authoring-knowledge.js +319 -0
  1109. package/dist/prompts/workflow-authoring-knowledge.js.map +1 -0
  1110. package/dist/run-policy.d.ts +25 -0
  1111. package/dist/run-policy.d.ts.map +1 -0
  1112. package/dist/run-policy.js +54 -0
  1113. package/dist/run-policy.js.map +1 -0
  1114. package/dist/sandbox-av-media.d.ts +33 -0
  1115. package/dist/sandbox-av-media.d.ts.map +1 -0
  1116. package/dist/sandbox-av-media.js +666 -0
  1117. package/dist/sandbox-av-media.js.map +1 -0
  1118. package/dist/sandbox-bootstrap-modules.d.ts +54 -0
  1119. package/dist/sandbox-bootstrap-modules.d.ts.map +1 -0
  1120. package/dist/sandbox-bootstrap-modules.js +104 -0
  1121. package/dist/sandbox-bootstrap-modules.js.map +1 -0
  1122. package/dist/sandbox-bytes.d.ts +43 -0
  1123. package/dist/sandbox-bytes.d.ts.map +1 -0
  1124. package/dist/sandbox-bytes.js +61 -0
  1125. package/dist/sandbox-bytes.js.map +1 -0
  1126. package/dist/sandbox-canvas-api.d.ts +30 -0
  1127. package/dist/sandbox-canvas-api.d.ts.map +1 -0
  1128. package/dist/sandbox-canvas-api.js +81 -0
  1129. package/dist/sandbox-canvas-api.js.map +1 -0
  1130. package/dist/sandbox-constants.d.ts +5 -0
  1131. package/dist/sandbox-constants.d.ts.map +1 -0
  1132. package/dist/sandbox-constants.js +13 -0
  1133. package/dist/sandbox-constants.js.map +1 -0
  1134. package/dist/sandbox-json-transport.d.ts +107 -0
  1135. package/dist/sandbox-json-transport.d.ts.map +1 -0
  1136. package/dist/sandbox-json-transport.js +324 -0
  1137. package/dist/sandbox-json-transport.js.map +1 -0
  1138. package/dist/sandbox-media-handle.d.ts +78 -0
  1139. package/dist/sandbox-media-handle.d.ts.map +1 -0
  1140. package/dist/sandbox-media-handle.js +114 -0
  1141. package/dist/sandbox-media-handle.js.map +1 -0
  1142. package/dist/sandbox-media-ref.d.ts +134 -0
  1143. package/dist/sandbox-media-ref.d.ts.map +1 -0
  1144. package/dist/sandbox-media-ref.js +442 -0
  1145. package/dist/sandbox-media-ref.js.map +1 -0
  1146. package/dist/sandbox-media.d.ts +177 -0
  1147. package/dist/sandbox-media.d.ts.map +1 -0
  1148. package/dist/sandbox-media.js +963 -0
  1149. package/dist/sandbox-media.js.map +1 -0
  1150. package/dist/sandbox-module-fixtures.d.ts +445 -0
  1151. package/dist/sandbox-module-fixtures.d.ts.map +1 -0
  1152. package/dist/sandbox-module-fixtures.js +214 -0
  1153. package/dist/sandbox-module-fixtures.js.map +1 -0
  1154. package/dist/sandbox-pack-resolution.d.ts +21 -0
  1155. package/dist/sandbox-pack-resolution.d.ts.map +1 -0
  1156. package/dist/sandbox-pack-resolution.js +42 -0
  1157. package/dist/sandbox-pack-resolution.js.map +1 -0
  1158. package/dist/sandbox-toolbelt.d.ts +15 -0
  1159. package/dist/sandbox-toolbelt.d.ts.map +1 -0
  1160. package/dist/sandbox-toolbelt.js +70 -0
  1161. package/dist/sandbox-toolbelt.js.map +1 -0
  1162. package/dist/security-monitor.d.ts +89 -0
  1163. package/dist/security-monitor.d.ts.map +1 -0
  1164. package/dist/security-monitor.js +307 -0
  1165. package/dist/security-monitor.js.map +1 -0
  1166. package/dist/serpapi/catalog.d.ts +101 -0
  1167. package/dist/serpapi/catalog.d.ts.map +1 -0
  1168. package/dist/serpapi/catalog.js +246 -0
  1169. package/dist/serpapi/catalog.js.map +1 -0
  1170. package/dist/serpapi/client.d.ts +81 -0
  1171. package/dist/serpapi/client.d.ts.map +1 -0
  1172. package/dist/serpapi/client.js +228 -0
  1173. package/dist/serpapi/client.js.map +1 -0
  1174. package/dist/serpapi/errors.d.ts +49 -0
  1175. package/dist/serpapi/errors.d.ts.map +1 -0
  1176. package/dist/serpapi/errors.js +64 -0
  1177. package/dist/serpapi/errors.js.map +1 -0
  1178. package/dist/serpapi/normalize.d.ts +58 -0
  1179. package/dist/serpapi/normalize.d.ts.map +1 -0
  1180. package/dist/serpapi/normalize.js +140 -0
  1181. package/dist/serpapi/normalize.js.map +1 -0
  1182. package/dist/skill-prompt.d.ts +37 -0
  1183. package/dist/skill-prompt.d.ts.map +1 -0
  1184. package/dist/skill-prompt.js +72 -0
  1185. package/dist/skill-prompt.js.map +1 -0
  1186. package/dist/step-executor.d.ts +90 -77
  1187. package/dist/step-executor.d.ts.map +1 -1
  1188. package/dist/step-executor.js +384 -690
  1189. package/dist/step-executor.js.map +1 -1
  1190. package/dist/subagent.d.ts +275 -0
  1191. package/dist/subagent.d.ts.map +1 -0
  1192. package/dist/subagent.js +444 -0
  1193. package/dist/subagent.js.map +1 -0
  1194. package/dist/supervisor/prompt.d.ts +12 -0
  1195. package/dist/supervisor/prompt.d.ts.map +1 -0
  1196. package/dist/supervisor/prompt.js +51 -0
  1197. package/dist/supervisor/prompt.js.map +1 -0
  1198. package/dist/supervisor/supervisor-agent.d.ts +72 -0
  1199. package/dist/supervisor/supervisor-agent.d.ts.map +1 -0
  1200. package/dist/supervisor/supervisor-agent.js +185 -0
  1201. package/dist/supervisor/supervisor-agent.js.map +1 -0
  1202. package/dist/supervisor/tools.d.ts +56 -0
  1203. package/dist/supervisor/tools.d.ts.map +1 -0
  1204. package/dist/supervisor/tools.js +83 -0
  1205. package/dist/supervisor/tools.js.map +1 -0
  1206. package/dist/supervisor/verdict-schema.d.ts +18 -0
  1207. package/dist/supervisor/verdict-schema.d.ts.map +1 -0
  1208. package/dist/supervisor/verdict-schema.js +58 -0
  1209. package/dist/supervisor/verdict-schema.js.map +1 -0
  1210. package/dist/system-skills.d.ts +74 -0
  1211. package/dist/system-skills.d.ts.map +1 -0
  1212. package/dist/system-skills.js +168 -0
  1213. package/dist/system-skills.js.map +1 -0
  1214. package/dist/task-executor.d.ts +90 -40
  1215. package/dist/task-executor.d.ts.map +1 -1
  1216. package/dist/task-executor.js +259 -282
  1217. package/dist/task-executor.js.map +1 -1
  1218. package/dist/task-planner.d.ts +18 -12
  1219. package/dist/task-planner.d.ts.map +1 -1
  1220. package/dist/task-planner.js +342 -328
  1221. package/dist/task-planner.js.map +1 -1
  1222. package/dist/timeline-capture.d.ts +21 -0
  1223. package/dist/timeline-capture.d.ts.map +1 -0
  1224. package/dist/timeline-capture.js +564 -0
  1225. package/dist/timeline-capture.js.map +1 -0
  1226. package/dist/timeline-code-bake.d.ts +75 -0
  1227. package/dist/timeline-code-bake.d.ts.map +1 -0
  1228. package/dist/timeline-code-bake.js +327 -0
  1229. package/dist/timeline-code-bake.js.map +1 -0
  1230. package/dist/timeline-preview/compare.d.ts +27 -0
  1231. package/dist/timeline-preview/compare.d.ts.map +1 -0
  1232. package/dist/timeline-preview/compare.js +71 -0
  1233. package/dist/timeline-preview/compare.js.map +1 -0
  1234. package/dist/timeline-preview/frames.d.ts +193 -0
  1235. package/dist/timeline-preview/frames.d.ts.map +1 -0
  1236. package/dist/timeline-preview/frames.js +731 -0
  1237. package/dist/timeline-preview/frames.js.map +1 -0
  1238. package/dist/timeline-preview/model3d.d.ts +67 -0
  1239. package/dist/timeline-preview/model3d.d.ts.map +1 -0
  1240. package/dist/timeline-preview/model3d.js +165 -0
  1241. package/dist/timeline-preview/model3d.js.map +1 -0
  1242. package/dist/timeline-preview/rasterize.d.ts +33 -0
  1243. package/dist/timeline-preview/rasterize.d.ts.map +1 -0
  1244. package/dist/timeline-preview/rasterize.js +83 -0
  1245. package/dist/timeline-preview/rasterize.js.map +1 -0
  1246. package/dist/timeline-preview/sheet.d.ts +38 -0
  1247. package/dist/timeline-preview/sheet.d.ts.map +1 -0
  1248. package/dist/timeline-preview/sheet.js +72 -0
  1249. package/dist/timeline-preview/sheet.js.map +1 -0
  1250. package/dist/tools/asset-persist.d.ts +29 -0
  1251. package/dist/tools/asset-persist.d.ts.map +1 -0
  1252. package/dist/tools/asset-persist.js +78 -0
  1253. package/dist/tools/asset-persist.js.map +1 -0
  1254. package/dist/tools/base-tool.d.ts +53 -5
  1255. package/dist/tools/base-tool.d.ts.map +1 -1
  1256. package/dist/tools/base-tool.js +180 -3
  1257. package/dist/tools/base-tool.js.map +1 -1
  1258. package/dist/tools/binary-output.d.ts +54 -0
  1259. package/dist/tools/binary-output.d.ts.map +1 -0
  1260. package/dist/tools/binary-output.js +127 -0
  1261. package/dist/tools/binary-output.js.map +1 -0
  1262. package/dist/tools/browser-tools.d.ts +5 -29
  1263. package/dist/tools/browser-tools.d.ts.map +1 -1
  1264. package/dist/tools/browser-tools.js +5 -205
  1265. package/dist/tools/browser-tools.js.map +1 -1
  1266. package/dist/tools/builtin-tools.d.ts +52 -0
  1267. package/dist/tools/builtin-tools.d.ts.map +1 -0
  1268. package/dist/tools/builtin-tools.js +289 -0
  1269. package/dist/tools/builtin-tools.js.map +1 -0
  1270. package/dist/tools/control-tool.d.ts +2 -5
  1271. package/dist/tools/control-tool.d.ts.map +1 -1
  1272. package/dist/tools/control-tool.js +18 -15
  1273. package/dist/tools/control-tool.js.map +1 -1
  1274. package/dist/tools/dataseo-tools.d.ts +34 -32
  1275. package/dist/tools/dataseo-tools.d.ts.map +1 -1
  1276. package/dist/tools/dataseo-tools.js +148 -233
  1277. package/dist/tools/dataseo-tools.js.map +1 -1
  1278. package/dist/tools/external-capability-tools.d.ts +36 -0
  1279. package/dist/tools/external-capability-tools.d.ts.map +1 -0
  1280. package/dist/tools/external-capability-tools.js +41 -0
  1281. package/dist/tools/external-capability-tools.js.map +1 -0
  1282. package/dist/tools/external-mcp-tools.d.ts +139 -0
  1283. package/dist/tools/external-mcp-tools.d.ts.map +1 -0
  1284. package/dist/tools/external-mcp-tools.js +552 -0
  1285. package/dist/tools/external-mcp-tools.js.map +1 -0
  1286. package/dist/tools/finish-step-tool.d.ts +1 -1
  1287. package/dist/tools/finish-step-tool.d.ts.map +1 -1
  1288. package/dist/tools/finish-step-tool.js +3 -3
  1289. package/dist/tools/finish-step-tool.js.map +1 -1
  1290. package/dist/tools/google-tools.d.ts +28 -39
  1291. package/dist/tools/google-tools.d.ts.map +1 -1
  1292. package/dist/tools/google-tools.js +51 -164
  1293. package/dist/tools/google-tools.js.map +1 -1
  1294. package/dist/tools/google-workspace-tools.d.ts +23 -0
  1295. package/dist/tools/google-workspace-tools.d.ts.map +1 -0
  1296. package/dist/tools/google-workspace-tools.js +26 -0
  1297. package/dist/tools/google-workspace-tools.js.map +1 -0
  1298. package/dist/tools/graph-validation-registry.d.ts +33 -0
  1299. package/dist/tools/graph-validation-registry.d.ts.map +1 -0
  1300. package/dist/tools/graph-validation-registry.js +54 -0
  1301. package/dist/tools/graph-validation-registry.js.map +1 -0
  1302. package/dist/tools/http-tools.d.ts +5 -53
  1303. package/dist/tools/http-tools.d.ts.map +1 -1
  1304. package/dist/tools/http-tools.js +5 -177
  1305. package/dist/tools/http-tools.js.map +1 -1
  1306. package/dist/tools/image-injection.d.ts +51 -0
  1307. package/dist/tools/image-injection.d.ts.map +1 -0
  1308. package/dist/tools/image-injection.js +85 -0
  1309. package/dist/tools/image-injection.js.map +1 -0
  1310. package/dist/tools/mcp-tool-support.d.ts +204 -0
  1311. package/dist/tools/mcp-tool-support.d.ts.map +1 -0
  1312. package/dist/tools/mcp-tool-support.js +537 -0
  1313. package/dist/tools/mcp-tool-support.js.map +1 -0
  1314. package/dist/tools/mcp-tools.d.ts +106 -390
  1315. package/dist/tools/mcp-tools.d.ts.map +1 -1
  1316. package/dist/tools/mcp-tools.js +132 -601
  1317. package/dist/tools/mcp-tools.js.map +1 -1
  1318. package/dist/tools/media-tools.d.ts +9 -272
  1319. package/dist/tools/media-tools.d.ts.map +1 -1
  1320. package/dist/tools/media-tools.js +11 -676
  1321. package/dist/tools/media-tools.js.map +1 -1
  1322. package/dist/tools/memory-tools.d.ts +36 -0
  1323. package/dist/tools/memory-tools.d.ts.map +1 -0
  1324. package/dist/tools/memory-tools.js +52 -0
  1325. package/dist/tools/memory-tools.js.map +1 -0
  1326. package/dist/tools/openai-tools.d.ts +28 -68
  1327. package/dist/tools/openai-tools.d.ts.map +1 -1
  1328. package/dist/tools/openai-tools.js +51 -181
  1329. package/dist/tools/openai-tools.js.map +1 -1
  1330. package/dist/tools/plan-builder-tools.d.ts +141 -7
  1331. package/dist/tools/plan-builder-tools.d.ts.map +1 -1
  1332. package/dist/tools/plan-builder-tools.js +159 -86
  1333. package/dist/tools/plan-builder-tools.js.map +1 -1
  1334. package/dist/tools/run-search-tool.d.ts +82 -0
  1335. package/dist/tools/run-search-tool.d.ts.map +1 -0
  1336. package/dist/tools/run-search-tool.js +121 -0
  1337. package/dist/tools/run-search-tool.js.map +1 -0
  1338. package/dist/tools/run-subtask-tool.d.ts +49 -0
  1339. package/dist/tools/run-subtask-tool.d.ts.map +1 -0
  1340. package/dist/tools/run-subtask-tool.js +88 -0
  1341. package/dist/tools/run-subtask-tool.js.map +1 -0
  1342. package/dist/tools/search-tools.d.ts +5 -36
  1343. package/dist/tools/search-tools.d.ts.map +1 -1
  1344. package/dist/tools/search-tools.js +5 -215
  1345. package/dist/tools/search-tools.js.map +1 -1
  1346. package/dist/tools/serp-providers/apify-provider.d.ts +18 -0
  1347. package/dist/tools/serp-providers/apify-provider.d.ts.map +1 -0
  1348. package/dist/tools/serp-providers/apify-provider.js +93 -0
  1349. package/dist/tools/serp-providers/apify-provider.js.map +1 -0
  1350. package/dist/tools/serp-providers/brave-provider.d.ts +34 -0
  1351. package/dist/tools/serp-providers/brave-provider.d.ts.map +1 -0
  1352. package/dist/tools/serp-providers/brave-provider.js +86 -0
  1353. package/dist/tools/serp-providers/brave-provider.js.map +1 -0
  1354. package/dist/tools/serp-providers/dataforseo-provider.d.ts +14 -1
  1355. package/dist/tools/serp-providers/dataforseo-provider.d.ts.map +1 -1
  1356. package/dist/tools/serp-providers/dataforseo-provider.js +0 -9
  1357. package/dist/tools/serp-providers/dataforseo-provider.js.map +1 -1
  1358. package/dist/tools/serp-providers/gemini-provider.d.ts +45 -0
  1359. package/dist/tools/serp-providers/gemini-provider.d.ts.map +1 -0
  1360. package/dist/tools/serp-providers/gemini-provider.js +148 -0
  1361. package/dist/tools/serp-providers/gemini-provider.js.map +1 -0
  1362. package/dist/tools/serp-providers/index.d.ts +61 -0
  1363. package/dist/tools/serp-providers/index.d.ts.map +1 -1
  1364. package/dist/tools/serp-providers/index.js +119 -3
  1365. package/dist/tools/serp-providers/index.js.map +1 -1
  1366. package/dist/tools/serp-providers/openai-provider.d.ts +58 -0
  1367. package/dist/tools/serp-providers/openai-provider.d.ts.map +1 -0
  1368. package/dist/tools/serp-providers/openai-provider.js +113 -0
  1369. package/dist/tools/serp-providers/openai-provider.js.map +1 -0
  1370. package/dist/tools/serp-providers/serpapi-provider.d.ts +9 -5
  1371. package/dist/tools/serp-providers/serpapi-provider.d.ts.map +1 -1
  1372. package/dist/tools/serp-providers/serpapi-provider.js +26 -44
  1373. package/dist/tools/serp-providers/serpapi-provider.js.map +1 -1
  1374. package/dist/tools/serp-tool-factory.d.ts +27 -0
  1375. package/dist/tools/serp-tool-factory.d.ts.map +1 -0
  1376. package/dist/tools/serp-tool-factory.js +56 -0
  1377. package/dist/tools/serp-tool-factory.js.map +1 -0
  1378. package/dist/tools/shared-tools.d.ts +33 -0
  1379. package/dist/tools/shared-tools.d.ts.map +1 -0
  1380. package/dist/tools/shared-tools.js +39 -0
  1381. package/dist/tools/shared-tools.js.map +1 -0
  1382. package/dist/tools/start-subtask-tool.d.ts +51 -0
  1383. package/dist/tools/start-subtask-tool.d.ts.map +1 -0
  1384. package/dist/tools/start-subtask-tool.js +189 -0
  1385. package/dist/tools/start-subtask-tool.js.map +1 -0
  1386. package/dist/tools/submit-code-tool.d.ts +159 -0
  1387. package/dist/tools/submit-code-tool.d.ts.map +1 -0
  1388. package/dist/tools/submit-code-tool.js +209 -0
  1389. package/dist/tools/submit-code-tool.js.map +1 -0
  1390. package/dist/tools/subtask-fields.d.ts +11 -0
  1391. package/dist/tools/subtask-fields.d.ts.map +1 -0
  1392. package/dist/tools/subtask-fields.js +11 -0
  1393. package/dist/tools/subtask-fields.js.map +1 -0
  1394. package/dist/tools/todo-tools.d.ts +15 -0
  1395. package/dist/tools/todo-tools.d.ts.map +1 -0
  1396. package/dist/tools/todo-tools.js +15 -0
  1397. package/dist/tools/todo-tools.js.map +1 -0
  1398. package/dist/tools/tool-permissions.d.ts +40 -0
  1399. package/dist/tools/tool-permissions.d.ts.map +1 -0
  1400. package/dist/tools/tool-permissions.js +52 -0
  1401. package/dist/tools/tool-permissions.js.map +1 -0
  1402. package/dist/tools/tool-search.d.ts +39 -0
  1403. package/dist/tools/tool-search.d.ts.map +1 -0
  1404. package/dist/tools/tool-search.js +108 -0
  1405. package/dist/tools/tool-search.js.map +1 -0
  1406. package/dist/tools/vector-tool-support.d.ts +15 -0
  1407. package/dist/tools/vector-tool-support.d.ts.map +1 -0
  1408. package/dist/tools/vector-tool-support.js +133 -0
  1409. package/dist/tools/vector-tool-support.js.map +1 -0
  1410. package/dist/tools/vector-tools.d.ts +13 -220
  1411. package/dist/tools/vector-tools.d.ts.map +1 -1
  1412. package/dist/tools/vector-tools.js +7 -578
  1413. package/dist/tools/vector-tools.js.map +1 -1
  1414. package/dist/tools/wait-subtasks-tool.d.ts +27 -0
  1415. package/dist/tools/wait-subtasks-tool.d.ts.map +1 -0
  1416. package/dist/tools/wait-subtasks-tool.js +66 -0
  1417. package/dist/tools/wait-subtasks-tool.js.map +1 -0
  1418. package/dist/types.d.ts +16 -31
  1419. package/dist/types.d.ts.map +1 -1
  1420. package/dist/types.js +8 -1
  1421. package/dist/types.js.map +1 -1
  1422. package/dist/utils/dag-scheduler.d.ts +85 -0
  1423. package/dist/utils/dag-scheduler.d.ts.map +1 -0
  1424. package/dist/utils/dag-scheduler.js +180 -0
  1425. package/dist/utils/dag-scheduler.js.map +1 -0
  1426. package/dist/utils/json-parser.d.ts +32 -1
  1427. package/dist/utils/json-parser.d.ts.map +1 -1
  1428. package/dist/utils/json-parser.js +145 -10
  1429. package/dist/utils/json-parser.js.map +1 -1
  1430. package/dist/utils/json-schema-validate.d.ts +29 -0
  1431. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  1432. package/dist/utils/json-schema-validate.js +228 -0
  1433. package/dist/utils/json-schema-validate.js.map +1 -0
  1434. package/dist/utils/link-abort.d.ts +13 -0
  1435. package/dist/utils/link-abort.d.ts.map +1 -0
  1436. package/dist/utils/link-abort.js +23 -0
  1437. package/dist/utils/link-abort.js.map +1 -0
  1438. package/dist/utils/merge-generators.d.ts +58 -0
  1439. package/dist/utils/merge-generators.d.ts.map +1 -0
  1440. package/dist/utils/merge-generators.js +148 -0
  1441. package/dist/utils/merge-generators.js.map +1 -0
  1442. package/dist/utils/remove-base64-images.d.ts +0 -5
  1443. package/dist/utils/remove-base64-images.d.ts.map +1 -1
  1444. package/dist/utils/remove-base64-images.js.map +1 -1
  1445. package/dist/utils/step-failure.d.ts +20 -0
  1446. package/dist/utils/step-failure.d.ts.map +1 -0
  1447. package/dist/utils/step-failure.js +43 -0
  1448. package/dist/utils/step-failure.js.map +1 -0
  1449. package/dist/utils/think-tags.d.ts +16 -0
  1450. package/dist/utils/think-tags.d.ts.map +1 -0
  1451. package/dist/utils/think-tags.js +23 -0
  1452. package/dist/utils/think-tags.js.map +1 -0
  1453. package/dist/utils/type-guards.d.ts +26 -0
  1454. package/dist/utils/type-guards.d.ts.map +1 -0
  1455. package/dist/utils/type-guards.js +44 -0
  1456. package/dist/utils/type-guards.js.map +1 -0
  1457. package/dist/utils/ui-event-buffer.d.ts +18 -0
  1458. package/dist/utils/ui-event-buffer.d.ts.map +1 -0
  1459. package/dist/utils/ui-event-buffer.js +18 -0
  1460. package/dist/utils/ui-event-buffer.js.map +1 -0
  1461. package/dist/utils/wrap-generators-parallel.d.ts +0 -5
  1462. package/dist/utils/wrap-generators-parallel.d.ts.map +1 -1
  1463. package/dist/utils/wrap-generators-parallel.js +3 -6
  1464. package/dist/utils/wrap-generators-parallel.js.map +1 -1
  1465. package/dist/wasm-sandbox/host.d.ts +106 -0
  1466. package/dist/wasm-sandbox/host.d.ts.map +1 -0
  1467. package/dist/wasm-sandbox/host.js +409 -0
  1468. package/dist/wasm-sandbox/host.js.map +1 -0
  1469. package/dist/wasm-sandbox/workers.d.ts +43 -0
  1470. package/dist/wasm-sandbox/workers.d.ts.map +1 -0
  1471. package/dist/wasm-sandbox/workers.js +150 -0
  1472. package/dist/wasm-sandbox/workers.js.map +1 -0
  1473. package/dist/workspace-paths.d.ts +40 -0
  1474. package/dist/workspace-paths.d.ts.map +1 -0
  1475. package/dist/workspace-paths.js +102 -0
  1476. package/dist/workspace-paths.js.map +1 -0
  1477. package/dist/yt-dlp-gate.d.ts +19 -0
  1478. package/dist/yt-dlp-gate.d.ts.map +1 -0
  1479. package/dist/yt-dlp-gate.js +22 -0
  1480. package/dist/yt-dlp-gate.js.map +1 -0
  1481. package/package.json +114 -14
  1482. package/dist/agent-executor.d.ts +0 -62
  1483. package/dist/agent-executor.d.ts.map +0 -1
  1484. package/dist/agent-executor.js +0 -324
  1485. package/dist/agent-executor.js.map +0 -1
  1486. package/dist/agent-step-executor.d.ts +0 -28
  1487. package/dist/agent-step-executor.d.ts.map +0 -1
  1488. package/dist/agent-step-executor.js +0 -99
  1489. package/dist/agent-step-executor.js.map +0 -1
  1490. package/dist/agent-workflow-runner.d.ts +0 -31
  1491. package/dist/agent-workflow-runner.d.ts.map +0 -1
  1492. package/dist/agent-workflow-runner.js +0 -124
  1493. package/dist/agent-workflow-runner.js.map +0 -1
  1494. package/dist/agent.d.ts +0 -115
  1495. package/dist/agent.d.ts.map +0 -1
  1496. package/dist/agent.js +0 -587
  1497. package/dist/agent.js.map +0 -1
  1498. package/dist/base-agent.d.ts +0 -42
  1499. package/dist/base-agent.d.ts.map +0 -1
  1500. package/dist/base-agent.js +0 -29
  1501. package/dist/base-agent.js.map +0 -1
  1502. package/dist/graph-planner.d.ts +0 -56
  1503. package/dist/graph-planner.d.ts.map +0 -1
  1504. package/dist/graph-planner.js +0 -311
  1505. package/dist/graph-planner.js.map +0 -1
  1506. package/dist/multi-mode-agent.d.ts +0 -86
  1507. package/dist/multi-mode-agent.d.ts.map +0 -1
  1508. package/dist/multi-mode-agent.js +0 -476
  1509. package/dist/multi-mode-agent.js.map +0 -1
  1510. package/dist/prompts/graph-planner-prompt.d.ts +0 -48
  1511. package/dist/prompts/graph-planner-prompt.d.ts.map +0 -1
  1512. package/dist/prompts/graph-planner-prompt.js +0 -180
  1513. package/dist/prompts/graph-planner-prompt.js.map +0 -1
  1514. package/dist/reject-agentic-provider.d.ts +0 -21
  1515. package/dist/reject-agentic-provider.d.ts.map +0 -1
  1516. package/dist/reject-agentic-provider.js +0 -32
  1517. package/dist/reject-agentic-provider.js.map +0 -1
  1518. package/dist/simple-agent.d.ts +0 -29
  1519. package/dist/simple-agent.d.ts.map +0 -1
  1520. package/dist/simple-agent.js +0 -54
  1521. package/dist/simple-agent.js.map +0 -1
  1522. package/dist/sub-agent-planner.d.ts +0 -33
  1523. package/dist/sub-agent-planner.d.ts.map +0 -1
  1524. package/dist/sub-agent-planner.js +0 -203
  1525. package/dist/sub-agent-planner.js.map +0 -1
  1526. package/dist/team/db-task-board.d.ts +0 -54
  1527. package/dist/team/db-task-board.d.ts.map +0 -1
  1528. package/dist/team/db-task-board.js +0 -361
  1529. package/dist/team/db-task-board.js.map +0 -1
  1530. package/dist/team/edge-message-bus.d.ts +0 -51
  1531. package/dist/team/edge-message-bus.d.ts.map +0 -1
  1532. package/dist/team/edge-message-bus.js +0 -169
  1533. package/dist/team/edge-message-bus.js.map +0 -1
  1534. package/dist/team/edge-task-board.d.ts +0 -77
  1535. package/dist/team/edge-task-board.d.ts.map +0 -1
  1536. package/dist/team/edge-task-board.js +0 -140
  1537. package/dist/team/edge-task-board.js.map +0 -1
  1538. package/dist/team/index.d.ts +0 -16
  1539. package/dist/team/index.d.ts.map +0 -1
  1540. package/dist/team/index.js +0 -17
  1541. package/dist/team/index.js.map +0 -1
  1542. package/dist/team/message-bus.d.ts +0 -58
  1543. package/dist/team/message-bus.d.ts.map +0 -1
  1544. package/dist/team/message-bus.js +0 -151
  1545. package/dist/team/message-bus.js.map +0 -1
  1546. package/dist/team/task-board.d.ts +0 -106
  1547. package/dist/team/task-board.d.ts.map +0 -1
  1548. package/dist/team/task-board.js +0 -370
  1549. package/dist/team/task-board.js.map +0 -1
  1550. package/dist/team/team-executor.d.ts +0 -72
  1551. package/dist/team/team-executor.d.ts.map +0 -1
  1552. package/dist/team/team-executor.js +0 -466
  1553. package/dist/team/team-executor.js.map +0 -1
  1554. package/dist/team/team-tools.d.ts +0 -252
  1555. package/dist/team/team-tools.d.ts.map +0 -1
  1556. package/dist/team/team-tools.js +0 -412
  1557. package/dist/team/team-tools.js.map +0 -1
  1558. package/dist/team/types.d.ts +0 -198
  1559. package/dist/team/types.d.ts.map +0 -1
  1560. package/dist/team/types.js +0 -8
  1561. package/dist/team/types.js.map +0 -1
  1562. package/dist/tools/add-edge-tool.d.ts +0 -18
  1563. package/dist/tools/add-edge-tool.d.ts.map +0 -1
  1564. package/dist/tools/add-edge-tool.js +0 -92
  1565. package/dist/tools/add-edge-tool.js.map +0 -1
  1566. package/dist/tools/add-node-tool.d.ts +0 -22
  1567. package/dist/tools/add-node-tool.d.ts.map +0 -1
  1568. package/dist/tools/add-node-tool.js +0 -128
  1569. package/dist/tools/add-node-tool.js.map +0 -1
  1570. package/dist/tools/asset-tools.d.ts +0 -58
  1571. package/dist/tools/asset-tools.d.ts.map +0 -1
  1572. package/dist/tools/asset-tools.js +0 -191
  1573. package/dist/tools/asset-tools.js.map +0 -1
  1574. package/dist/tools/calculator-tool.d.ts +0 -24
  1575. package/dist/tools/calculator-tool.d.ts.map +0 -1
  1576. package/dist/tools/calculator-tool.js +0 -64
  1577. package/dist/tools/calculator-tool.js.map +0 -1
  1578. package/dist/tools/claude-code-tools.d.ts +0 -96
  1579. package/dist/tools/claude-code-tools.d.ts.map +0 -1
  1580. package/dist/tools/claude-code-tools.js +0 -463
  1581. package/dist/tools/claude-code-tools.js.map +0 -1
  1582. package/dist/tools/code-tools.d.ts +0 -26
  1583. package/dist/tools/code-tools.d.ts.map +0 -1
  1584. package/dist/tools/code-tools.js +0 -82
  1585. package/dist/tools/code-tools.js.map +0 -1
  1586. package/dist/tools/create-plan-tool.d.ts +0 -29
  1587. package/dist/tools/create-plan-tool.d.ts.map +0 -1
  1588. package/dist/tools/create-plan-tool.js +0 -355
  1589. package/dist/tools/create-plan-tool.js.map +0 -1
  1590. package/dist/tools/create-task-tool.d.ts +0 -28
  1591. package/dist/tools/create-task-tool.d.ts.map +0 -1
  1592. package/dist/tools/create-task-tool.js +0 -254
  1593. package/dist/tools/create-task-tool.js.map +0 -1
  1594. package/dist/tools/email-tools.d.ts +0 -76
  1595. package/dist/tools/email-tools.d.ts.map +0 -1
  1596. package/dist/tools/email-tools.js +0 -259
  1597. package/dist/tools/email-tools.js.map +0 -1
  1598. package/dist/tools/filesystem-tools.d.ts +0 -77
  1599. package/dist/tools/filesystem-tools.d.ts.map +0 -1
  1600. package/dist/tools/filesystem-tools.js +0 -334
  1601. package/dist/tools/filesystem-tools.js.map +0 -1
  1602. package/dist/tools/find-model-tool.d.ts +0 -25
  1603. package/dist/tools/find-model-tool.d.ts.map +0 -1
  1604. package/dist/tools/find-model-tool.js +0 -236
  1605. package/dist/tools/find-model-tool.js.map +0 -1
  1606. package/dist/tools/finish-graph-tool.d.ts +0 -23
  1607. package/dist/tools/finish-graph-tool.d.ts.map +0 -1
  1608. package/dist/tools/finish-graph-tool.js +0 -46
  1609. package/dist/tools/finish-graph-tool.js.map +0 -1
  1610. package/dist/tools/js-code-tool.d.ts +0 -30
  1611. package/dist/tools/js-code-tool.d.ts.map +0 -1
  1612. package/dist/tools/js-code-tool.js +0 -98
  1613. package/dist/tools/js-code-tool.js.map +0 -1
  1614. package/dist/tools/local-get-node-info-tool.d.ts +0 -19
  1615. package/dist/tools/local-get-node-info-tool.d.ts.map +0 -1
  1616. package/dist/tools/local-get-node-info-tool.js +0 -75
  1617. package/dist/tools/local-get-node-info-tool.js.map +0 -1
  1618. package/dist/tools/local-list-nodes-tool.d.ts +0 -19
  1619. package/dist/tools/local-list-nodes-tool.d.ts.map +0 -1
  1620. package/dist/tools/local-list-nodes-tool.js +0 -69
  1621. package/dist/tools/local-list-nodes-tool.js.map +0 -1
  1622. package/dist/tools/local-search-nodes-tool.d.ts +0 -21
  1623. package/dist/tools/local-search-nodes-tool.d.ts.map +0 -1
  1624. package/dist/tools/local-search-nodes-tool.js +0 -111
  1625. package/dist/tools/local-search-nodes-tool.js.map +0 -1
  1626. package/dist/tools/math-tools.d.ts +0 -156
  1627. package/dist/tools/math-tools.d.ts.map +0 -1
  1628. package/dist/tools/math-tools.js +0 -422
  1629. package/dist/tools/math-tools.js.map +0 -1
  1630. package/dist/tools/model-tools.d.ts +0 -25
  1631. package/dist/tools/model-tools.d.ts.map +0 -1
  1632. package/dist/tools/model-tools.js +0 -48
  1633. package/dist/tools/model-tools.js.map +0 -1
  1634. package/dist/tools/pdf-tools.d.ts +0 -152
  1635. package/dist/tools/pdf-tools.d.ts.map +0 -1
  1636. package/dist/tools/pdf-tools.js +0 -339
  1637. package/dist/tools/pdf-tools.js.map +0 -1
  1638. package/dist/tools/tool-registry.d.ts +0 -9
  1639. package/dist/tools/tool-registry.d.ts.map +0 -1
  1640. package/dist/tools/tool-registry.js +0 -17
  1641. package/dist/tools/tool-registry.js.map +0 -1
  1642. package/dist/tools/workspace-tools.d.ts +0 -58
  1643. package/dist/tools/workspace-tools.d.ts.map +0 -1
  1644. package/dist/tools/workspace-tools.js +0 -152
  1645. package/dist/tools/workspace-tools.js.map +0 -1
@@ -0,0 +1,2467 @@
1
+ import { finishStoryboard, layoutStoryboard, previewStoryboardDesign } from "./finish-storyboard.js";
2
+ /**
3
+ * The `storyboards` capability module.
4
+ *
5
+ * Storyboard capabilities: list and create, render stills and clips, revise
6
+ * one take, assemble a timeline, edit the shot list, extract a script, and
7
+ * delete. The render path used to be seven `Tool` subclasses in
8
+ * `../tools/storyboard-render-tools.ts`.
9
+ *
10
+ * Wire names, descriptions and schemas are unchanged. Prompt composition,
11
+ * entity seasoning, and the shot → timeline mapping stay the editor's own
12
+ * (`entitiesForShot` from `@nodetool-ai/protocol`, `buildStoryboardTimeline`
13
+ * from `@nodetool-ai/timeline`), so a board rendered headlessly matches one
14
+ * rendered in the UI. Every heavy dependency is imported inside the
15
+ * implementation that needs it.
16
+ *
17
+ * Design: docs/tool-class-retirement-design.md § "Migration".
18
+ */
19
+ import { z } from "zod";
20
+ import { SpanStatusCode } from "@opentelemetry/api";
21
+ import { mp4DurationSeconds, withSpan } from "@nodetool-ai/runtime";
22
+ import { storyboardMotionDesign, storyboardShotGraphics } from "@nodetool-ai/protocol/api-schemas/storyboards.js";
23
+ import { assertProductionGenerationAllowed, isFullResourceId, isShortResourceId, productionRequirement } from "@nodetool-ai/protocol";
24
+ import { stampScriptStoryboardId } from "./script-link.js";
25
+ import { listStoryboardsSpec, createStoryboardSpec, getStoryboardSpec, renderStoryboardStillsSpec, renderStoryboardClipsSpec, reviseStoryboardClipSpec, assembleStoryboardTimelineSpec, editStoryboardSpec, directStoryboardSpec, extractScriptFromStoryboardSpec, deleteStoryboardSpec } from "./storyboards.specs.js";
26
+ import { measureStoryboardSources } from "./storyboard-measured-sources.js";
27
+ import { clampConcurrency } from "./concurrency.js";
28
+ import { isNonBlankString, isNumber, isRecord, isString } from "../utils/type-guards.js";
29
+ import { resolveProjectId } from "./project-scope.js";
30
+ /** Shots one call may render, so a stray `targets: "all"` cannot bankrupt a run. */
31
+ const MAX_SHOTS_PER_CALL = 24;
32
+ /** Attempts to land a document write: the first try plus one re-read-and-reapply (ADR 0001). */
33
+ const CAS_ATTEMPTS = 2;
34
+ /** The guided-setup stages, in order. Mirrors `storyboardSetupStage`. */
35
+ const SETUP_STAGES = [
36
+ "idea",
37
+ "genre",
38
+ "review",
39
+ "entities",
40
+ "look",
41
+ "done"
42
+ ];
43
+ const isError = (value) => !!value &&
44
+ typeof value === "object" &&
45
+ typeof value.error === "string";
46
+ async function loadBoard(run, storyboardId) {
47
+ if (!isString(storyboardId) || !storyboardId) {
48
+ return {
49
+ error: "storyboard_id is required (use list_storyboards to find one)."
50
+ };
51
+ }
52
+ const { Storyboard } = await import("@nodetool-ai/models");
53
+ const row = await Storyboard.findById(storyboardId);
54
+ // A board owned by someone else reads as missing — the same rule the tRPC
55
+ // router's ownership check applies.
56
+ if (!row || row.user_id !== run.context.userId) {
57
+ return { error: `Storyboard ${storyboardId} was not found.` };
58
+ }
59
+ return { row, doc: row.toDocument() };
60
+ }
61
+ /**
62
+ * The board as a {@link Screenplay}, which is the shape every script-link
63
+ * function reads. `doc.shots` is the authoritative shot list — `doc.screenplay`
64
+ * carries the piece's framing (title, narration, music, and the `script_id`
65
+ * link) and a board directed shot-by-shot may not have one at all.
66
+ */
67
+ function boardScreenplay(row, doc) {
68
+ return {
69
+ type: "screenplay",
70
+ id: `sp_${row.id}`,
71
+ title: row.name,
72
+ ...(doc.screenplay ?? {}),
73
+ shots: doc.shots
74
+ };
75
+ }
76
+ /** The linked script's document, or null when nothing links or it is gone. */
77
+ async function loadLinkedScript(screenplay, userId) {
78
+ const scriptId = screenplay.script_id;
79
+ if (!scriptId)
80
+ return null;
81
+ const { Script } = await import("@nodetool-ai/models");
82
+ const row = await Script.findById(scriptId);
83
+ if (!row || row.user_id !== userId)
84
+ return null;
85
+ return row.toDocument();
86
+ }
87
+ /**
88
+ * The linked script as the joint assembler wants it, or `null` when nothing
89
+ * links, the script is gone, or reading it failed. Never throws: a broken link
90
+ * downgrades the assemble to the unlinked path with a warning (design §1.3).
91
+ */
92
+ async function loadLinkedAssemblyScript(scriptId, userId) {
93
+ try {
94
+ const { Script } = await import("@nodetool-ai/models");
95
+ const row = await Script.findById(scriptId);
96
+ if (!row || row.user_id !== userId)
97
+ return null;
98
+ const doc = row.toDocument();
99
+ return { scriptId, cast: doc.cast, sections: doc.sections };
100
+ }
101
+ catch {
102
+ // A link that cannot be read is a link that is not there.
103
+ return null;
104
+ }
105
+ }
106
+ /**
107
+ * Link state for a board: what it links, which shots' text has drifted from
108
+ * the lines they project, which lines no shot covers, and what
109
+ * `validateScriptLink` says. Reported by `get_storyboard` so an agent can see
110
+ * what needs fixing without a second round trip.
111
+ */
112
+ async function scriptLinkSummary(screenplay, scriptDoc) {
113
+ const { orphanedLineIds, shotDialogueDrifted, validateScriptLink } = await import("@nodetool-ai/protocol");
114
+ const linked = !!screenplay.script_id;
115
+ const validation = validateScriptLink(screenplay, scriptDoc);
116
+ const linesById = new Map((scriptDoc?.sections ?? [])
117
+ .flatMap((section) => section.lines)
118
+ .map((line) => [line.id, line]));
119
+ return {
120
+ linked,
121
+ script_id: screenplay.script_id ?? null,
122
+ script_found: !!scriptDoc,
123
+ drifted_shot_ids: scriptDoc
124
+ ? screenplay.shots
125
+ .filter((shot) => shotDialogueDrifted(shot, linesById))
126
+ .map((shot) => shot.id)
127
+ : [],
128
+ orphan_line_ids: scriptDoc ? orphanedLineIds(screenplay, scriptDoc) : [],
129
+ issues: [...validation.errors, ...validation.warnings].map((i) => i.message)
130
+ };
131
+ }
132
+ /** Resolve a shot reference: shot id, 0-based index, or a slug. */
133
+ function findShot(shots, target) {
134
+ const byId = shots.find((s) => s.id === target);
135
+ if (byId)
136
+ return byId;
137
+ const index = Number(target);
138
+ if (Number.isInteger(index)) {
139
+ const byIndex = shots.find((s) => s.index === index);
140
+ if (byIndex)
141
+ return byIndex;
142
+ }
143
+ const slug = target.trim().toLowerCase();
144
+ return shots.find((s) => (s.slug ?? "").trim().toLowerCase() === slug);
145
+ }
146
+ /**
147
+ * Whether a shot's picture already exists — its own clip, or a window into the
148
+ * clip of the shot that covers it.
149
+ *
150
+ * The render selections read this rather than `shot.clip`, so a shot fused
151
+ * into a sibling's generation is not offered up to be generated a second time.
152
+ */
153
+ const shotHasPicture = (shot, shots) => {
154
+ if (shot.clip)
155
+ return true;
156
+ const coverage = shot.covered_by;
157
+ if (!coverage)
158
+ return false;
159
+ return shots.some((s) => s.id === coverage.shot_id && !!s.clip);
160
+ };
161
+ /**
162
+ * The shots a render call acts on: the explicit `targets` when given, else
163
+ * every shot `needsWork` accepts — the "render what is missing" default that
164
+ * makes a whole board one call.
165
+ */
166
+ function selectShots(shots, targets, needsWork) {
167
+ const ordered = [...shots].sort((a, b) => a.index - b.index);
168
+ if (targets === undefined || targets === null) {
169
+ return ordered.filter(needsWork);
170
+ }
171
+ const list = Array.isArray(targets) ? targets : [targets];
172
+ const selected = [];
173
+ for (const raw of list) {
174
+ const target = String(raw);
175
+ const shot = findShot(ordered, target);
176
+ if (!shot) {
177
+ return {
178
+ error: `No shot matches "${target}". Call get_storyboard to list shot ids and indexes.`
179
+ };
180
+ }
181
+ if (!selected.includes(shot))
182
+ selected.push(shot);
183
+ }
184
+ return selected;
185
+ }
186
+ /**
187
+ * Apply `patch` to one shot and persist the board.
188
+ *
189
+ * Renders run concurrently against a single row, so the write is a CAS on
190
+ * `updated_at`: on conflict the row is re-read and the patch re-applied to the
191
+ * fresher document, never to the stale copy the render started from.
192
+ */
193
+ async function patchShot(storyboardId, shotId, patch) {
194
+ const { Storyboard } = await import("@nodetool-ai/models");
195
+ for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
196
+ const row = await Storyboard.findById(storyboardId);
197
+ if (!row)
198
+ return { error: `Storyboard ${storyboardId} was not found.` };
199
+ const doc = row.toDocument();
200
+ const index = doc.shots.findIndex((s) => s.id === shotId);
201
+ if (index === -1)
202
+ return { error: `Shot ${shotId} is no longer on the board.` };
203
+ const updated = patch(doc.shots[index]);
204
+ const shots = [...doc.shots];
205
+ shots[index] = updated;
206
+ const saved = await Storyboard.updateFieldsIfUnchanged(storyboardId, row.updated_at, { document: JSON.stringify({ ...doc, shots }) },
207
+ // One update_shot per write, so an open editor merges this into its
208
+ // draft per shot instead of treating the board as replaced.
209
+ { ops: [{ tool: "update_shot", input: { id: shotId } }] });
210
+ if (saved)
211
+ return updated;
212
+ }
213
+ return {
214
+ error: `Storyboard ${storyboardId} is being modified concurrently; the render finished but could not be saved. Retry the call.`
215
+ };
216
+ }
217
+ /** The board's library entities, dropping ids that no longer resolve. */
218
+ async function loadBoardEntities(context, doc) {
219
+ const ids = doc.entityIds ?? [];
220
+ if (ids.length === 0 || !context.userId)
221
+ return [];
222
+ const { Asset } = await import("@nodetool-ai/models");
223
+ const { entityFromAsset } = await import("./entities.js");
224
+ const loaded = await Promise.all(ids.map(async (id) => {
225
+ try {
226
+ const asset = await Asset.find(context.userId, id);
227
+ return asset ? entityFromAsset(asset) : null;
228
+ }
229
+ catch {
230
+ return null;
231
+ }
232
+ }));
233
+ return loaded.filter((e) => !!e && e.name.length > 0);
234
+ }
235
+ /**
236
+ * The provider+model a render runs on: the call's override, else the board's
237
+ * own selection. There is no fallback default — an unset model is an error
238
+ * that names `find_model`, rather than silent spend on a model nobody chose.
239
+ */
240
+ function resolveModel(params, boardModel, kind, capability) {
241
+ const provider = isString(params["provider"]) && params["provider"]
242
+ ? params["provider"]
243
+ : isString(boardModel?.provider)
244
+ ? boardModel.provider
245
+ : "";
246
+ const model = isString(params["model"]) && params["model"]
247
+ ? params["model"]
248
+ : isString(boardModel?.id)
249
+ ? boardModel.id
250
+ : "";
251
+ if (!provider || !model) {
252
+ return {
253
+ error: `No ${kind} model is set on this storyboard. Pass provider + model (use find_model with capability=${capability}), or set one on the board.`
254
+ };
255
+ }
256
+ return { provider, model };
257
+ }
258
+ /**
259
+ * Render through the generation seam and answer with the asset it saved; the
260
+ * board can only reference persisted media. The seam records the row and
261
+ * links the asset (docs/media-generation-tracking-design.md § 8, S2).
262
+ */
263
+ async function renderMedia(context, req, namePrefix, mime) {
264
+ const { randomUUID } = await import("node:crypto");
265
+ const id = randomUUID();
266
+ const persist = { name: namePrefix };
267
+ if (mime)
268
+ persist.mime = mime;
269
+ const result = await context.runGeneration({
270
+ ...req,
271
+ id,
272
+ origin: { surface: "capability" },
273
+ persist
274
+ });
275
+ const asset = result.assets[0];
276
+ if (!asset?.asset_id) {
277
+ return {
278
+ error: "The render succeeded but could not be saved as an asset, so it cannot be attached to the shot. This host has no asset storage wired."
279
+ };
280
+ }
281
+ return {
282
+ assetId: asset.asset_id,
283
+ uri: asset.uri,
284
+ generationId: id,
285
+ output: result.output
286
+ };
287
+ }
288
+ /**
289
+ * The clip a render actually produced, with its real length when readable.
290
+ *
291
+ * A video model quantizes the duration it is asked for — a shot directed at
292
+ * 1.5s came back as 5.184s — and the ref carried only the asset id, so
293
+ * assembly laid down the *intended* 1.5s over five seconds of footage and
294
+ * threw the rest away without saying so. The bytes are already in hand here,
295
+ * so the length is free to read; a container we cannot parse leaves `duration`
296
+ * unset, which every reader treats as unknown rather than zero.
297
+ */
298
+ export function renderedVideoRef(saved) {
299
+ const clip = {
300
+ type: "video",
301
+ asset_id: saved.assetId,
302
+ uri: saved.uri
303
+ };
304
+ const bytes = saved.output;
305
+ if (bytes instanceof Uint8Array) {
306
+ const seconds = mp4DurationSeconds(bytes);
307
+ if (seconds !== null)
308
+ clip.duration = seconds;
309
+ }
310
+ return clip;
311
+ }
312
+ const errorMessage = (e) => e instanceof Error ? e.message : String(e);
313
+ const listStoryboards = {
314
+ spec: listStoryboardsSpec,
315
+ impl: async (run, params) => {
316
+ const userId = run.context.userId;
317
+ if (!userId)
318
+ return { error: "No user is bound to this session." };
319
+ const { Storyboard } = await import("@nodetool-ai/models");
320
+ const limit = Math.max(1, Math.min(Number(params["limit"]) || 20, 100));
321
+ const rows = await Storyboard.listByUser(userId, limit);
322
+ return {
323
+ storyboards: rows.map((row) => {
324
+ const doc = row.toDocument();
325
+ return {
326
+ id: row.id,
327
+ name: row.name,
328
+ shots: doc.shots.length,
329
+ with_keyframe: doc.shots.filter((s) => !!s.keyframe).length,
330
+ with_clip: doc.shots.filter((s) => !!s.clip).length,
331
+ timeline_id: row.timeline_id ?? undefined,
332
+ updated_at: row.updated_at,
333
+ revision: row.revision
334
+ };
335
+ })
336
+ };
337
+ }
338
+ };
339
+ /** A blank board matching `storyboards.create` on the tRPC router. */
340
+ function createdBoardSummary(row) {
341
+ const doc = row.toDocument();
342
+ return {
343
+ ok: true,
344
+ storyboard_id: row.id,
345
+ // The same value under the key a caller reaches for first. Reading `.id`
346
+ // off this result and passing the `undefined` onward is what a create/edit
347
+ // pair actually did, and the edit blamed a missing argument two calls later.
348
+ id: row.id,
349
+ name: row.name,
350
+ project_id: row.project_id,
351
+ shots: doc.shots.length,
352
+ updated_at: row.updated_at,
353
+ revision: row.revision
354
+ };
355
+ }
356
+ const createStoryboard = {
357
+ spec: createStoryboardSpec,
358
+ impl: async (run, params) => {
359
+ const userId = run.context.userId;
360
+ if (!userId)
361
+ return { error: "No user is bound to this session." };
362
+ const name = params["name"];
363
+ if (!isNonBlankString(name)) {
364
+ return { error: "name is required and must be a non-empty string." };
365
+ }
366
+ const projectId = resolveProjectId(run, params);
367
+ const requestedId = isNonBlankString(params["id"])
368
+ ? params["id"].trim()
369
+ : undefined;
370
+ const { Storyboard, emptyStoryboardDocument } = await import("@nodetool-ai/models");
371
+ if (requestedId) {
372
+ const existing = await Storyboard.findById(requestedId);
373
+ if (existing) {
374
+ if (existing.user_id !== userId) {
375
+ return {
376
+ error: `A storyboard with id ${requestedId} already exists.`
377
+ };
378
+ }
379
+ return createdBoardSummary(existing);
380
+ }
381
+ }
382
+ const document = emptyStoryboardDocument();
383
+ if (isNonBlankString(params["brief"])) {
384
+ document.brief = params["brief"].trim();
385
+ }
386
+ if (isNonBlankString(params["style"])) {
387
+ document.style = params["style"].trim();
388
+ }
389
+ if (isNonBlankString(params["aspect_ratio"])) {
390
+ document.aspectRatio = params["aspect_ratio"].trim();
391
+ }
392
+ const fields = {
393
+ user_id: userId,
394
+ project_id: projectId,
395
+ name: name.trim(),
396
+ document: JSON.stringify(document)
397
+ };
398
+ if (requestedId) {
399
+ fields.id = requestedId;
400
+ }
401
+ const board = new Storyboard(fields);
402
+ await board.save();
403
+ return createdBoardSummary(board);
404
+ }
405
+ };
406
+ const getStoryboard = {
407
+ spec: getStoryboardSpec,
408
+ impl: async (run, params) => {
409
+ const board = await loadBoard(run, params["storyboard_id"]);
410
+ if (isError(board))
411
+ return board;
412
+ const { row, doc } = board;
413
+ const screenplay = boardScreenplay(row, doc);
414
+ const scriptDoc = await loadLinkedScript(screenplay, run.context.userId);
415
+ const link = await scriptLinkSummary(screenplay, scriptDoc);
416
+ const drifted = new Set(link.drifted_shot_ids);
417
+ return {
418
+ id: row.id,
419
+ revision: row.revision,
420
+ name: row.name,
421
+ brief: doc.brief,
422
+ style: doc.style,
423
+ aspect_ratio: doc.aspectRatio,
424
+ image_model: doc.imageModel ?? null,
425
+ video_model: doc.videoModel ?? null,
426
+ entity_ids: doc.entityIds ?? [],
427
+ timeline_id: row.timeline_id ?? undefined,
428
+ narration: doc.screenplay?.narration ?? undefined,
429
+ music_prompt: doc.screenplay?.music_prompt ?? undefined,
430
+ motion_design: doc.screenplay?.motion_design ?? null,
431
+ script_id: link.script_id,
432
+ script_link: link,
433
+ shots: [...doc.shots]
434
+ .sort((a, b) => a.index - b.index)
435
+ .map((shot) => ({
436
+ id: shot.id,
437
+ index: shot.index,
438
+ slug: shot.slug,
439
+ action: shot.action,
440
+ camera: shot.camera,
441
+ motion: shot.motion,
442
+ graphics: shot.graphics,
443
+ production: shot.production,
444
+ duration_seconds: shot.duration_seconds,
445
+ status: shot.status,
446
+ has_keyframe: !!shot.keyframe,
447
+ has_clip: shotHasPicture(shot, doc.shots),
448
+ covered_by: shot.covered_by ?? null,
449
+ render_mode: shot.render_mode ?? "keyframe",
450
+ script_line_ids: shot.script_line_ids ?? [],
451
+ duration_source: shot.duration_source,
452
+ script_drifted: drifted.has(shot.id)
453
+ }))
454
+ };
455
+ }
456
+ };
457
+ /**
458
+ * The render path's host seam (`renderShots` in `@nodetool-ai/storyboard`).
459
+ *
460
+ * The package sits below runtime and models, so it takes these four operations
461
+ * rather than a `ProcessingContext`: the generation seam that records and
462
+ * persists a render, and the board read/write pair the per-shot CAS uses.
463
+ */
464
+ function renderHost(context) {
465
+ return {
466
+ runGeneration: async (request) => {
467
+ const result = await context.runGeneration({
468
+ id: request.id,
469
+ provider: request.provider,
470
+ capability: request.capability,
471
+ model: request.model,
472
+ params: request.params,
473
+ origin: { surface: "capability" },
474
+ persist: request.persist,
475
+ destination: request.destination
476
+ });
477
+ return { output: result.output, assets: result.assets };
478
+ },
479
+ getStoryboard: async (id) => {
480
+ const { Storyboard } = await import("@nodetool-ai/models");
481
+ const row = await Storyboard.findById(id);
482
+ return row
483
+ ? { document: row.toDocument(), updatedAt: row.updated_at }
484
+ : null;
485
+ },
486
+ updateStoryboard: async ({ id, document, baseUpdatedAt, shotId }) => {
487
+ const { Storyboard } = await import("@nodetool-ai/models");
488
+ const saved = await Storyboard.updateFieldsIfUnchanged(id, baseUpdatedAt, { document: JSON.stringify(document) },
489
+ // One update_shot per write, so an open editor merges this into its
490
+ // draft per shot instead of treating the board as replaced.
491
+ { ops: [{ tool: "update_shot", input: { id: shotId } }] });
492
+ return saved ? { document, updatedAt: saved.updated_at } : null;
493
+ },
494
+ loadMedia: async (ref) => {
495
+ const { loadMediaRefBytes } = await import("@nodetool-ai/runtime");
496
+ return loadMediaRefBytes(ref, context);
497
+ },
498
+ videoDurationSeconds: (bytes) => mp4DurationSeconds(bytes)
499
+ };
500
+ }
501
+ /** The per-shot result row a render capability answers with. */
502
+ function outcomeRow(outcome, withMode) {
503
+ const row = {
504
+ shot_id: outcome.shotId,
505
+ index: outcome.index,
506
+ slug: outcome.slug,
507
+ ok: outcome.ok
508
+ };
509
+ if (withMode)
510
+ row.render_mode = outcome.mode;
511
+ if (outcome.assetId !== undefined)
512
+ row.asset_id = outcome.assetId;
513
+ if (outcome.assetUri !== undefined)
514
+ row.asset_uri = outcome.assetUri;
515
+ if (outcome.generationId !== undefined) {
516
+ row.generation_id = outcome.generationId;
517
+ }
518
+ if (outcome.status !== undefined)
519
+ row.status = outcome.status;
520
+ if (outcome.error !== undefined)
521
+ row.error = outcome.error;
522
+ return row;
523
+ }
524
+ /**
525
+ * Drop the shots whose selected version is still current. Additive: without
526
+ * `stale_only` the selection is returned untouched.
527
+ *
528
+ * The freshness question is the render plan's, so a shot this skips is exactly
529
+ * a shot the node's `only_stale` skips.
530
+ */
531
+ async function filterStale(selected, params, doc, entities, kind) {
532
+ if (params["stale_only"] !== true) {
533
+ return { shots: selected, skipped: [] };
534
+ }
535
+ const { planShotRenders } = await import("@nodetool-ai/storyboard");
536
+ const fresh = new Set(planShotRenders(doc, entities, kind, selected.map((shot) => shot.id))
537
+ .filter((plan) => plan.fresh)
538
+ .map((plan) => plan.shotId));
539
+ return {
540
+ shots: selected.filter((shot) => !fresh.has(shot.id)),
541
+ skipped: selected
542
+ .filter((shot) => fresh.has(shot.id))
543
+ .map((shot) => shot.id)
544
+ };
545
+ }
546
+ function modelOverrides(params) {
547
+ const options = {};
548
+ if (isNonBlankString(params["provider"])) {
549
+ options.provider = params["provider"];
550
+ }
551
+ if (isNonBlankString(params["model"])) {
552
+ options.model = params["model"];
553
+ }
554
+ return options;
555
+ }
556
+ function missingPlanModel(plan) {
557
+ if (plan.model.provider && plan.model.model) {
558
+ return undefined;
559
+ }
560
+ return {
561
+ error: `No ${plan.kind === "keyframe" ? "still" : "clip"} model is set for shot ${plan.shotId}. Pass provider + model (use find_model), or set one on the shot or board.`
562
+ };
563
+ }
564
+ async function clipModelError(context, plans) {
565
+ const groups = new Map();
566
+ for (const plan of plans) {
567
+ const error = missingPlanModel(plan);
568
+ if (error) {
569
+ return error;
570
+ }
571
+ if (plan.preflightError) {
572
+ continue;
573
+ }
574
+ const key = JSON.stringify([plan.model.provider, plan.model.model]);
575
+ const group = groups.get(key) ?? [];
576
+ group.push(plan);
577
+ groups.set(key, group);
578
+ }
579
+ for (const group of groups.values()) {
580
+ const model = group[0].model;
581
+ let supportedTasks = model.supportedTasks;
582
+ try {
583
+ const provider = await context.getProvider(model.provider);
584
+ const models = await provider.getAvailableVideoModels();
585
+ supportedTasks =
586
+ models.find((entry) => entry.id === model.model)?.supportedTasks ??
587
+ supportedTasks;
588
+ }
589
+ catch {
590
+ // Legacy providers can lack discovery, so their persisted task declarations apply.
591
+ }
592
+ const unsupported = group.find((plan) => {
593
+ const task = plan.mode === "direct" ? "text_to_video" : plan.mode === "reference" ? "reference_to_video" : "image_to_video";
594
+ return supportedTasks?.length && !supportedTasks.includes(task);
595
+ });
596
+ if (unsupported) {
597
+ const task = unsupported.mode === "direct" ? "text_to_video" : unsupported.mode === "reference" ? "reference_to_video" : "image_to_video";
598
+ return {
599
+ error: `The selected clip model ${model.provider}/${model.model} does not support ${task}; choose a model that supports the selected shot mode.`
600
+ };
601
+ }
602
+ }
603
+ return undefined;
604
+ }
605
+ function uniformModel(plans) {
606
+ const model = plans[0]?.model;
607
+ return model && plans.every((plan) => plan.model.provider === model.provider && plan.model.model === model.model)
608
+ ? { provider: model.provider, model: model.model }
609
+ : {};
610
+ }
611
+ const renderStoryboardStills = {
612
+ spec: renderStoryboardStillsSpec,
613
+ impl: async (run, params) => {
614
+ const context = run.context;
615
+ const board = await loadBoard(run, params["storyboard_id"]);
616
+ if (isError(board))
617
+ return board;
618
+ const { row, doc } = board;
619
+ const { shotRenderMode } = await import("@nodetool-ai/protocol");
620
+ // A direct shot renders its clip from the prompt, so it needs no still.
621
+ // Naming it in `targets` still renders one — a board frame to look at is
622
+ // worth having even when the clip does not come from it.
623
+ const selected = selectShots(doc.shots, params["targets"], (s) => (params["stale_only"] === true ? !!s.keyframe : !s.keyframe) &&
624
+ shotRenderMode(s) !== "direct" &&
625
+ !shotHasPicture(s, doc.shots));
626
+ if (isError(selected))
627
+ return selected;
628
+ const entities = await loadBoardEntities(context, doc);
629
+ const fresh = await filterStale(selected, params, doc, entities, "keyframe");
630
+ const skipped = fresh.skipped;
631
+ const chosen = fresh.shots;
632
+ if (chosen.length === 0) {
633
+ return {
634
+ rendered: 0,
635
+ results: [],
636
+ skipped,
637
+ note: skipped.length > 0
638
+ ? "No selected shot's still is stale."
639
+ : "No shot needs a still: each already has one, or renders its clip directly."
640
+ };
641
+ }
642
+ const protectedStill = chosen.find((shot) => shot.production?.protected_inputs?.some((input) => input.asset_id));
643
+ if (protectedStill) {
644
+ return { error: `Shot ${protectedStill.id} protects source assets; the current still renderer cannot prove source fidelity. Use those assets directly in Timeline materialization or a policy-aware finishing path.` };
645
+ }
646
+ if (chosen.length > MAX_SHOTS_PER_CALL) {
647
+ return {
648
+ error: `${chosen.length} shots selected, over the ${MAX_SHOTS_PER_CALL}-shot per-call limit. Pass targets in batches.`
649
+ };
650
+ }
651
+ const { planShotRenders, renderShots } = await import("@nodetool-ai/storyboard");
652
+ // What this call actually renders with, which is not always what the board
653
+ // says: `style` and `model` can be overridden per call. Recording the
654
+ // override is the point — a version rendered against something other than
655
+ // the board's settings reads stale against the board, correctly.
656
+ const planOptions = modelOverrides(params);
657
+ if (isString(params["style"])) {
658
+ planOptions.style = params["style"];
659
+ }
660
+ const plans = planShotRenders(doc, entities, "keyframe", chosen.map((shot) => shot.id), planOptions);
661
+ const { imageModelSupportsTask } = await import("@nodetool-ai/runtime");
662
+ for (const plan of plans) {
663
+ const modelError = missingPlanModel(plan);
664
+ if (modelError) {
665
+ return modelError;
666
+ }
667
+ plan.stillModelTakesImages = await imageModelSupportsTask(context, plan.model, "image_to_image", plan.model.supportedTasks);
668
+ }
669
+ const outcomes = await withSpan("render", {
670
+ "document.id": row.id,
671
+ "render.kind": "keyframe",
672
+ "render.shot_count": plans.length
673
+ }, async (span) => {
674
+ const rendered = await renderShots(renderHost(context), { id: row.id }, plans, { concurrency: clampConcurrency(params["concurrency"]) });
675
+ if (rendered.some((outcome) => !outcome.ok)) {
676
+ span?.setStatus({ code: SpanStatusCode.ERROR });
677
+ }
678
+ return rendered;
679
+ });
680
+ const results = outcomes.map((outcome) => outcomeRow(outcome, false));
681
+ return {
682
+ storyboard_id: row.id,
683
+ ...uniformModel(plans),
684
+ rendered: results.filter((r) => r.ok).length,
685
+ failed: results.filter((r) => !r.ok).length,
686
+ skipped,
687
+ results
688
+ };
689
+ }
690
+ };
691
+ const renderStoryboardClips = {
692
+ spec: renderStoryboardClipsSpec,
693
+ impl: async (run, params) => {
694
+ const context = run.context;
695
+ const board = await loadBoard(run, params["storyboard_id"]);
696
+ if (isError(board))
697
+ return board;
698
+ const { row, doc } = board;
699
+ const override = params["mode"];
700
+ if (override !== undefined &&
701
+ override !== "keyframe" &&
702
+ override !== "direct" &&
703
+ override !== "reference") {
704
+ return { error: 'mode must be "keyframe", "direct", or "reference".' };
705
+ }
706
+ const candidates = selectShots(doc.shots, params["targets"], (shot) => (params["stale_only"] === true ? !!shot.clip : !shotHasPicture(shot, doc.shots)) &&
707
+ !shot.covered_by?.shot_id);
708
+ if (isError(candidates)) {
709
+ return candidates;
710
+ }
711
+ const entities = await loadBoardEntities(context, doc);
712
+ const { planShotRenders, renderShots } = await import("@nodetool-ai/storyboard");
713
+ const readinessOptions = modelOverrides(params);
714
+ if (override !== undefined) {
715
+ readinessOptions.mode = override;
716
+ }
717
+ const ready = new Set(planShotRenders(doc, entities, "clip", candidates.map((shot) => shot.id), readinessOptions)
718
+ .filter((plan) => plan.mode !== "keyframe" || !!plan.sourceKeyframe)
719
+ .map((plan) => plan.shotId));
720
+ const selected = params["targets"] === undefined || params["targets"] === null
721
+ ? candidates.filter((shot) => ready.has(shot.id))
722
+ : candidates;
723
+ const fresh = await filterStale(selected, params, doc, entities, "clip");
724
+ const skipped = fresh.skipped;
725
+ const chosen = fresh.shots;
726
+ if (chosen.length === 0) {
727
+ return {
728
+ rendered: 0,
729
+ results: [],
730
+ skipped,
731
+ note: skipped.length > 0
732
+ ? "No selected shot's clip is stale."
733
+ : 'No shot is ready for a clip. A keyframe-mode shot needs a still first (render_storyboard_stills), or set its render_mode to "direct" — or pass mode: "direct" here — to render straight from the prompt. Name shots explicitly with `targets` to override the selection.'
734
+ };
735
+ }
736
+ const forbiddenClip = chosen.find((shot) => shot.production?.media_strategy === "still_motion_graphics");
737
+ if (forbiddenClip) {
738
+ return { error: `Shot ${forbiddenClip.id} is still_motion_graphics; video generation is forbidden. Materialize its still/assets as Timeline layers instead.` };
739
+ }
740
+ if (chosen.length > MAX_SHOTS_PER_CALL) {
741
+ return {
742
+ error: `${chosen.length} shots selected, over the ${MAX_SHOTS_PER_CALL}-shot per-call limit. Pass targets in batches.`
743
+ };
744
+ }
745
+ const { scriptLinesById } = await import("@nodetool-ai/timeline");
746
+ // A linked board times its shots from the words they cover, so a clip is
747
+ // rendered long enough to hold its voiceover (design §2.3). A shot pinned
748
+ // to `manual`, an unvoiced line, or an unlinked board keeps
749
+ // `duration_seconds`.
750
+ const scriptDoc = await loadLinkedScript(boardScreenplay(row, doc), context.userId);
751
+ // As in the stills path: the record says what this call rendered with, so
752
+ // a per-call model or style override reads stale against the board.
753
+ const planOptions = {
754
+ ...modelOverrides(params),
755
+ style: isString(params["style"]) ? params["style"] : doc.style || "",
756
+ scriptLines: scriptLinesById(scriptDoc?.sections ?? [])
757
+ };
758
+ if (override !== undefined) {
759
+ planOptions.mode = override;
760
+ }
761
+ const plans = planShotRenders(doc, entities, "clip", chosen.map((shot) => shot.id), planOptions);
762
+ const modelError = await clipModelError(context, plans);
763
+ if (modelError) {
764
+ return modelError;
765
+ }
766
+ const renderOptions = {
767
+ concurrency: clampConcurrency(params["concurrency"])
768
+ };
769
+ if (isString(params["resolution"])) {
770
+ renderOptions.resolution = params["resolution"];
771
+ }
772
+ const outcomes = await withSpan("render", {
773
+ "document.id": row.id,
774
+ "render.kind": "clip",
775
+ "render.shot_count": plans.length
776
+ }, async (span) => {
777
+ const rendered = await renderShots(renderHost(context), { id: row.id }, plans, renderOptions);
778
+ if (rendered.some((outcome) => !outcome.ok)) {
779
+ span?.setStatus({ code: SpanStatusCode.ERROR });
780
+ }
781
+ return rendered;
782
+ });
783
+ const results = outcomes.map((outcome) => outcomeRow(outcome, true));
784
+ return {
785
+ storyboard_id: row.id,
786
+ ...uniformModel(plans),
787
+ rendered: results.filter((r) => r.ok).length,
788
+ failed: results.filter((r) => !r.ok).length,
789
+ skipped,
790
+ results
791
+ };
792
+ }
793
+ };
794
+ const reviseStoryboardClip = {
795
+ spec: reviseStoryboardClipSpec,
796
+ impl: async (run, params) => {
797
+ const context = run.context;
798
+ const board = await loadBoard(run, params["storyboard_id"]);
799
+ if (isError(board))
800
+ return board;
801
+ const { row, doc } = board;
802
+ const instruction = String(params["instruction"] ?? "").trim();
803
+ if (!instruction)
804
+ return { error: "instruction is required." };
805
+ const shot = findShot(doc.shots, String(params["target"] ?? ""));
806
+ if (!shot) {
807
+ return {
808
+ error: `No shot matches "${String(params["target"])}". Call get_storyboard to list shot ids.`
809
+ };
810
+ }
811
+ if (shot.production?.media_strategy === "still_motion_graphics") {
812
+ return { error: `Shot ${shot.id} is still_motion_graphics; video revision is forbidden.` };
813
+ }
814
+ try {
815
+ assertProductionGenerationAllowed(shot.production, "video_to_video");
816
+ }
817
+ catch (error) {
818
+ return { error: error instanceof Error ? error.message : String(error) };
819
+ }
820
+ if (!shot.clip) {
821
+ return {
822
+ error: "Shot has no clip to revise. Run render_storyboard_clips first."
823
+ };
824
+ }
825
+ const model = resolveModel(params, doc.videoModel, "clip", "video_to_video");
826
+ if (isError(model))
827
+ return model;
828
+ const { loadMediaRefBytes } = await import("@nodetool-ai/runtime");
829
+ try {
830
+ const source = await loadMediaRefBytes(shot.clip, context);
831
+ if (!source || source.length === 0) {
832
+ return {
833
+ error: "The shot's clip could not be read back from storage."
834
+ };
835
+ }
836
+ const current = await loadBoard(run, row.id);
837
+ if (isError(current))
838
+ return current;
839
+ const currentShot = current.doc.shots.find((value) => value.id === shot.id);
840
+ if (!currentShot)
841
+ return { error: `Shot ${shot.id} no longer exists.` };
842
+ assertProductionGenerationAllowed(currentShot.production, "video_to_video");
843
+ const saved = await renderMedia(context, {
844
+ provider: model.provider,
845
+ capability: "video_to_video",
846
+ model: model.model,
847
+ params: { video: source, prompt: instruction }
848
+ }, `shot-${shot.index + 1}-revision`, "video/mp4");
849
+ if (isError(saved))
850
+ return saved;
851
+ const clip = renderedVideoRef(saved);
852
+ const updated = await patchShot(row.id, shot.id, (current) => {
853
+ const versions = current.clip_versions ?? (current.clip ? [current.clip] : []);
854
+ return {
855
+ ...current,
856
+ clip,
857
+ clip_versions: [...versions, clip],
858
+ status: "rendered"
859
+ };
860
+ });
861
+ if (isError(updated))
862
+ return updated;
863
+ return {
864
+ ok: true,
865
+ shot_id: shot.id,
866
+ index: shot.index,
867
+ asset_id: saved.assetId,
868
+ asset_uri: saved.uri,
869
+ generation_id: saved.generationId,
870
+ status: updated.status
871
+ };
872
+ }
873
+ catch (e) {
874
+ return { error: `video_to_video failed: ${errorMessage(e)}` };
875
+ }
876
+ }
877
+ };
878
+ // ---------------------------------------------------------------------------
879
+ // assemble_storyboard_timeline
880
+ // ---------------------------------------------------------------------------
881
+ const assembleStoryboardTimeline = {
882
+ spec: assembleStoryboardTimelineSpec,
883
+ impl: async (run, params) => {
884
+ const context = run.context;
885
+ const board = await loadBoard(run, params["storyboard_id"]);
886
+ if (isError(board))
887
+ return board;
888
+ const { row, doc } = board;
889
+ const { Storyboard, TimelineSequence } = await import("@nodetool-ai/models");
890
+ const { buildLinkedTimeline, buildStoryboardTimeline, foreignTimelineParts, assertStoryboardReassemblyAllowed, frameSizeForAspect } = await import("@nodetool-ai/timeline");
891
+ // A board that links a script is cut against the words: shot lengths come
892
+ // from the takes and every voiced line gets its own clip. A link pointing
893
+ // at a script that is gone is a warning, not a failure — the board still
894
+ // assembles on its own (design §1.3).
895
+ const scriptId = doc.screenplay?.script_id ?? null;
896
+ const script = scriptId
897
+ ? await loadLinkedAssemblyScript(scriptId, context.userId)
898
+ : null;
899
+ const warnings = [];
900
+ if (scriptId && !script) {
901
+ warnings.push(`Script ${scriptId} is linked but could not be loaded, so the board was assembled on its own.`);
902
+ }
903
+ const measuredShots = await measureStoryboardSources(doc.shots, context);
904
+ const assembled = script
905
+ ? buildLinkedTimeline({
906
+ boardId: row.id,
907
+ shots: measuredShots,
908
+ musicPrompt: doc.screenplay?.music_prompt,
909
+ script
910
+ })
911
+ : buildStoryboardTimeline({
912
+ boardId: row.id,
913
+ shots: measuredShots,
914
+ narration: doc.screenplay?.narration,
915
+ musicPrompt: doc.screenplay?.music_prompt
916
+ });
917
+ const skippedLineIds = "skippedLineIds" in assembled ? assembled.skippedLineIds : [];
918
+ // A model returns the length it returns: shots directed at 1.5s come back
919
+ // at 5.2s, and the cut plays all of it. Saying which shots came back off
920
+ // the length they were directed at turns a film longer than the caller
921
+ // planned into a decision they can make.
922
+ if (assembled.retimedShots.length > 0) {
923
+ const worst = assembled.retimedShots.reduce((a, b) => Math.abs(b.directedMs - b.usedMs) > Math.abs(a.directedMs - a.usedMs)
924
+ ? b
925
+ : a);
926
+ warnings.push(`${assembled.retimedShots.length} shot(s) run at their rendered length, not the length they were directed at — ` +
927
+ `the largest difference is ${Math.round(Math.abs(worst.directedMs - worst.usedMs))}ms on shot ${worst.shotId} ` +
928
+ `(${worst.usedMs}ms in the cut, ${worst.directedMs}ms directed). ` +
929
+ `Re-render with a duration the model honours, or trim the clips in the timeline.`);
930
+ }
931
+ // A jointly assembled cut takes its lengths from the words, so a shot can
932
+ // sit in a slot its footage does not fill: black under the voiceover, or a
933
+ // render the cut never reaches the end of.
934
+ if (assembled.trimmedShots.length > 0) {
935
+ const worst = assembled.trimmedShots.reduce((a, b) => Math.abs(b.sourceMs - b.usedMs) > Math.abs(a.sourceMs - a.usedMs)
936
+ ? b
937
+ : a);
938
+ warnings.push(`${assembled.trimmedShots.length} shot(s) do not match their rendered footage — ` +
939
+ `the longest gap is ${Math.round(Math.abs(worst.sourceMs - worst.usedMs))}ms on shot ${worst.shotId} ` +
940
+ `(${worst.usedMs}ms in the cut, ${worst.sourceMs}ms rendered). ` +
941
+ `Re-render those shots at the length their lines need.`);
942
+ }
943
+ if (assembled.durationMs === 0) {
944
+ return {
945
+ error: "No shot has an allowed still, video, or graphics source. Add graphics intent or use render_storyboard_stills / render_storyboard_clips where allowed by the shot production policy.",
946
+ skipped_shot_ids: assembled.skippedShotIds,
947
+ skipped_line_ids: skippedLineIds
948
+ };
949
+ }
950
+ const { width, height } = frameSizeForAspect(doc.aspectRatio);
951
+ const fps = Math.max(1, Math.min(Number(params["fps"]) || 30, 120));
952
+ const name = isString(params["name"]) && params["name"] ? params["name"] : row.name;
953
+ // Re-assembling replaces the board's existing cut rather than leaving a
954
+ // trail of orphan sequences behind it — and rewrites only what this board
955
+ // (and, when linked, this script) owns.
956
+ const existing = row.timeline_id
957
+ ? await TimelineSequence.findById(row.timeline_id)
958
+ : null;
959
+ const reuse = existing && existing.user_id === context.userId ? existing : null;
960
+ if (!reuse) {
961
+ const sequence = new TimelineSequence({
962
+ user_id: context.userId,
963
+ project_id: row.project_id,
964
+ name
965
+ });
966
+ sequence.name = name;
967
+ sequence.fps = fps;
968
+ sequence.width = width;
969
+ sequence.height = height;
970
+ sequence.duration_ms = assembled.durationMs;
971
+ sequence.fromDocument({
972
+ tracks: assembled.tracks,
973
+ clips: assembled.clips,
974
+ markers: []
975
+ });
976
+ await sequence.save();
977
+ if (row.timeline_id !== sequence.id) {
978
+ await Storyboard.updateFieldsIfUnchanged(row.id, row.updated_at, { timeline_id: sequence.id }, { ops: [{ tool: "set_link", input: { timeline_id: sequence.id } }] });
979
+ }
980
+ const created = {
981
+ ok: true,
982
+ timeline_id: sequence.id,
983
+ name: sequence.name,
984
+ fps,
985
+ width,
986
+ height,
987
+ duration_ms: assembled.durationMs,
988
+ clip_count: assembled.clips.length,
989
+ track_count: assembled.tracks.length,
990
+ script_id: script ? scriptId : null,
991
+ skipped_shot_ids: assembled.skippedShotIds,
992
+ skipped_line_ids: skippedLineIds,
993
+ trimmed_shots: assembled.trimmedShots,
994
+ retimed_shots: assembled.retimedShots
995
+ };
996
+ if (warnings.length) {
997
+ created.warnings = warnings;
998
+ }
999
+ return created;
1000
+ }
1001
+ // Re-assembling over an existing sequence is a CAS write carrying its
1002
+ // ops (S2.1): the foreign parts are re-read per attempt, and an open
1003
+ // editor merges the change instead of seeing the sequence as replaced.
1004
+ for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
1005
+ const current = attempt === 0 ? reuse : await TimelineSequence.findById(reuse.id);
1006
+ if (!current || current.user_id !== context.userId) {
1007
+ return {
1008
+ error: `Timeline ${reuse.id} was deleted while assembling; create a new timeline by calling this again.`
1009
+ };
1010
+ }
1011
+ const previous = current.toDocument();
1012
+ assertStoryboardReassemblyAllowed(previous, row.id);
1013
+ const foreign = foreignTimelineParts(previous, (clip) => clip.storyboardBoardId === row.id ||
1014
+ (!!scriptId && clip.scriptId === scriptId));
1015
+ const tracks = [...assembled.tracks, ...foreign.tracks];
1016
+ const clips = [...assembled.clips, ...foreign.clips];
1017
+ const durationMs = clips.reduce((end, clip) => Math.max(end, clip.startMs + clip.durationMs), assembled.durationMs);
1018
+ const nextDocument = {
1019
+ ...previous,
1020
+ tracks,
1021
+ clips,
1022
+ markers: previous.markers ?? []
1023
+ };
1024
+ const saved = await TimelineSequence.updateFieldsIfUnchanged(current.id, current.updated_at, {
1025
+ name,
1026
+ fps,
1027
+ width,
1028
+ height,
1029
+ duration_ms: durationMs,
1030
+ document: JSON.stringify(nextDocument)
1031
+ }, {
1032
+ ops: [
1033
+ {
1034
+ tool: "assemble_storyboard_timeline",
1035
+ input: { storyboard_id: row.id }
1036
+ }
1037
+ ]
1038
+ });
1039
+ if (!saved)
1040
+ continue;
1041
+ if (row.timeline_id !== current.id) {
1042
+ await Storyboard.updateFieldsIfUnchanged(row.id, row.updated_at, { timeline_id: current.id }, { ops: [{ tool: "set_link", input: { timeline_id: current.id } }] });
1043
+ }
1044
+ const result = {
1045
+ ok: true,
1046
+ timeline_id: current.id,
1047
+ name,
1048
+ fps,
1049
+ width,
1050
+ height,
1051
+ duration_ms: durationMs,
1052
+ clip_count: clips.length,
1053
+ track_count: tracks.length,
1054
+ script_id: script ? scriptId : null,
1055
+ skipped_shot_ids: assembled.skippedShotIds,
1056
+ skipped_line_ids: skippedLineIds,
1057
+ trimmed_shots: assembled.trimmedShots,
1058
+ retimed_shots: assembled.retimedShots
1059
+ };
1060
+ if (warnings.length) {
1061
+ result.warnings = warnings;
1062
+ }
1063
+ return result;
1064
+ }
1065
+ return {
1066
+ error: `Timeline ${reuse.id} is being modified concurrently; the assembly finished but could not be saved. Retry the call.`
1067
+ };
1068
+ }
1069
+ };
1070
+ // ---------------------------------------------------------------------------
1071
+ // edit_storyboard
1072
+ // ---------------------------------------------------------------------------
1073
+ //
1074
+ // The render capabilities above fill a board in; this one shapes it. Adding,
1075
+ // rewriting and reordering shots was browser-only — the `ui_storyboard_*` tools
1076
+ // round-trip into the open editor's Zustand store — so an agent working
1077
+ // headlessly could render a board it could not author.
1078
+ /** Operations one call may apply, so a runaway script cannot rewrite a board. */
1079
+ const MAX_BOARD_OPS = 60;
1080
+ const BOARD_OPS = [
1081
+ "add_shot",
1082
+ "update_shot",
1083
+ "remove_shot",
1084
+ "reorder_shot",
1085
+ "move_shot",
1086
+ "duplicate_shot",
1087
+ "set_board",
1088
+ "set_setup",
1089
+ "update_scene",
1090
+ "create_scene",
1091
+ "merge_scene",
1092
+ "set_style",
1093
+ "select_version",
1094
+ "delete_version",
1095
+ "add_keyframe_version"
1096
+ ];
1097
+ /**
1098
+ * Op names an agent reaches for that mean one of {@link BOARD_OPS}.
1099
+ *
1100
+ * The browser tool that casts entities is `ui_storyboard_set_entities`, so a
1101
+ * script written against it calls `{op: "set_entities", entity_ids: [...]}`
1102
+ * here and was refused — the rejection listed the five real ops without
1103
+ * saying which one takes `entity_ids`, and the caller had to go read the tool
1104
+ * catalogue mid-task. The alias resolves to the op that already does the work.
1105
+ */
1106
+ const BOARD_OP_ALIASES = {
1107
+ set_entities: "set_board",
1108
+ set_storyboard: "set_board",
1109
+ add_shots: "add_shot",
1110
+ edit_shot: "update_shot",
1111
+ delete_shot: "remove_shot",
1112
+ // `move_shot` used to alias `reorder_shot`. It is its own op now, and the
1113
+ // two coincide on a board with no scenes: one implicit group means a
1114
+ // position inside it is a board position.
1115
+ copy_shot: "duplicate_shot",
1116
+ set_scene: "update_scene",
1117
+ add_scene: "create_scene",
1118
+ set_setup_stage: "set_setup"
1119
+ };
1120
+ const isBoardOpName = (value) => BOARD_OPS.includes(value);
1121
+ /** The op a name selects, following {@link BOARD_OP_ALIASES}. */
1122
+ export const resolveBoardOpName = (value) => {
1123
+ const name = value.trim();
1124
+ if (isBoardOpName(name))
1125
+ return name;
1126
+ return BOARD_OP_ALIASES[name] ?? null;
1127
+ };
1128
+ function parseBoardOps(raw) {
1129
+ if (!Array.isArray(raw) || raw.length === 0) {
1130
+ return {
1131
+ error: 'ops must be a non-empty array, e.g. [{"op": "add_shot", "action": "Wide of the lighthouse at dusk"}].'
1132
+ };
1133
+ }
1134
+ if (raw.length > MAX_BOARD_OPS) {
1135
+ return {
1136
+ error: `ops holds ${raw.length} entries; at most ${MAX_BOARD_OPS} per call.`
1137
+ };
1138
+ }
1139
+ const parsed = [];
1140
+ for (const [index, entry] of raw.entries()) {
1141
+ if (!isRecord(entry)) {
1142
+ return { error: `ops[${index}] must be an object.` };
1143
+ }
1144
+ const { op, ...args } = entry;
1145
+ const resolved = isString(op) ? resolveBoardOpName(op) : null;
1146
+ if (!resolved) {
1147
+ return {
1148
+ error: `ops[${index}] names "${String(op)}"; expected one of ${BOARD_OPS.join(", ")}.`
1149
+ };
1150
+ }
1151
+ parsed.push({ op: resolved, args });
1152
+ }
1153
+ return parsed;
1154
+ }
1155
+ /** Renumber `index` to the array order — the field the editor sorts on. */
1156
+ function renumberShots(shots) {
1157
+ return shots.map((shot, index) => shot.index === index ? shot : { ...shot, index });
1158
+ }
1159
+ // ── Scenes ──────────────────────────────────────────────────────────────────
1160
+ // A scene has no order of its own: its position is the position of its first
1161
+ // shot, and its shots are contiguous in `index` (PRD § 7.7.3). These mirror
1162
+ // `web/src/lib/storyboard/sceneOrder.ts` and the store's `structural`, so a
1163
+ // board edited headlessly and one edited in the browser end up the same shape.
1164
+ /** The board's scenes. They live on the screenplay; the document reads them. */
1165
+ function docScenes(doc) {
1166
+ return doc.screenplay?.scenes ?? [];
1167
+ }
1168
+ /**
1169
+ * A fresh id for a screenplay, scene or shot. A clock and a count are not
1170
+ * enough: ops in one batch run within the same millisecond, and a count
1171
+ * repeats after a remove or when two counts coincide.
1172
+ */
1173
+ function newDocId(prefix) {
1174
+ return `${prefix}_${crypto.randomUUID().replaceAll("-", "").slice(0, 16)}`;
1175
+ }
1176
+ /** Write scenes back, materializing a minimal screenplay when there is none. */
1177
+ function setDocScenes(doc, scenes) {
1178
+ if (doc.screenplay) {
1179
+ doc.screenplay = { ...doc.screenplay, scenes };
1180
+ return;
1181
+ }
1182
+ if (scenes.length === 0)
1183
+ return;
1184
+ doc.screenplay = {
1185
+ type: "screenplay",
1186
+ id: newDocId("sp"),
1187
+ title: "",
1188
+ shots: [],
1189
+ scenes
1190
+ };
1191
+ }
1192
+ /** Scenes in derived order, each with its shots. `null` is the implicit header. */
1193
+ function sceneGroups(shots) {
1194
+ const groups = [];
1195
+ const byKey = new Map();
1196
+ for (const shot of [...shots].sort((a, b) => a.index - b.index)) {
1197
+ const key = shot.scene_id ?? null;
1198
+ let group = byKey.get(key);
1199
+ if (!group) {
1200
+ group = { sceneId: key, shots: [] };
1201
+ byKey.set(key, group);
1202
+ groups.push(group);
1203
+ }
1204
+ group.shots.push(shot);
1205
+ }
1206
+ return groups;
1207
+ }
1208
+ /** Put a shot in a scene, or out of every scene when `sceneId` is null. */
1209
+ function withScene(shot, sceneId) {
1210
+ if ((shot.scene_id ?? null) === sceneId)
1211
+ return shot;
1212
+ const next = { ...shot };
1213
+ if (sceneId === null) {
1214
+ delete next.scene_id;
1215
+ }
1216
+ else {
1217
+ next.scene_id = sceneId;
1218
+ }
1219
+ return next;
1220
+ }
1221
+ /**
1222
+ * Finish a structural edit: collect each scene's shots into one run in the
1223
+ * order the board already renders them, renumber `0..n-1`, and drop every
1224
+ * scene no shot is in. The caller's array order is the intent, so it is
1225
+ * stamped before grouping.
1226
+ */
1227
+ function applyStructural(doc, shots) {
1228
+ const proposed = renumberShots(shots);
1229
+ doc.shots = renumberShots(sceneGroups(proposed).flatMap((group) => group.shots));
1230
+ const used = new Set(doc.shots.map((shot) => shot.scene_id).filter((id) => !!id));
1231
+ const scenes = docScenes(doc);
1232
+ const pruned = scenes.filter((scene) => used.has(scene.id));
1233
+ if (pruned.length !== scenes.length) {
1234
+ setDocScenes(doc, pruned);
1235
+ }
1236
+ }
1237
+ /**
1238
+ * The first scene-creating operation on a board with unscened shots puts them
1239
+ * all in one new scene, in index order (PRD § 7.7.3). Returns that scene's id,
1240
+ * or null when there was nothing unscened.
1241
+ */
1242
+ function materializeLegacyScene(doc) {
1243
+ if (!doc.shots.some((shot) => !shot.scene_id))
1244
+ return null;
1245
+ const scene = {
1246
+ type: "scene",
1247
+ id: newDocId("scene"),
1248
+ slugline: ""
1249
+ };
1250
+ doc.shots = doc.shots.map((shot) => shot.scene_id ? shot : withScene(shot, scene.id));
1251
+ setDocScenes(doc, [...docScenes(doc), scene]);
1252
+ return scene.id;
1253
+ }
1254
+ /** A blank planned shot. `index` is stamped by the reindex that follows. */
1255
+ function blankShot(id, sceneId) {
1256
+ const shot = {
1257
+ type: "shot",
1258
+ id,
1259
+ index: 0,
1260
+ action: "",
1261
+ status: "planned"
1262
+ };
1263
+ return sceneId === null ? shot : withScene(shot, sceneId);
1264
+ }
1265
+ /** A shot's stills or takes, oldest first, seeded from a legacy single ref. */
1266
+ function versionList(shot, kind) {
1267
+ if (kind === "keyframe") {
1268
+ return shot.keyframe_versions ?? (shot.keyframe ? [shot.keyframe] : []);
1269
+ }
1270
+ return shot.clip_versions ?? (shot.clip ? [shot.clip] : []);
1271
+ }
1272
+ /** Read `kind` and a 0-based `version` off an op, refusing anything else. */
1273
+ function readVersionTarget(shot, args) {
1274
+ const kind = String(args["kind"] ?? "keyframe");
1275
+ if (kind !== "keyframe" && kind !== "clip") {
1276
+ throw new Error('kind must be "keyframe" or "clip".');
1277
+ }
1278
+ const index = Number(args["version"] ?? args["index"]);
1279
+ const versions = versionList(shot, kind);
1280
+ if (!Number.isInteger(index) || index < 0 || index >= versions.length) {
1281
+ throw new Error(`version must be an integer in [0, ${Math.max(versions.length - 1, 0)}]; shot ${shot.id} holds ${versions.length} ${kind} version(s).`);
1282
+ }
1283
+ return { kind, index, versions };
1284
+ }
1285
+ const optionalString = (value) => isString(value) ? value : undefined;
1286
+ /** The shot fields an edit may set, plus the two op-level keys. */
1287
+ const SHOT_EDIT_FIELDS = new Set([
1288
+ "target",
1289
+ "index",
1290
+ "action",
1291
+ "slug",
1292
+ "camera",
1293
+ "motion",
1294
+ "graphics",
1295
+ "production",
1296
+ "dialogue",
1297
+ "narration",
1298
+ "notes",
1299
+ "duration_seconds",
1300
+ "duration_source",
1301
+ "render_mode",
1302
+ "entity_ids",
1303
+ "location_id",
1304
+ "covered_by",
1305
+ "scene_id",
1306
+ "after_shot_id"
1307
+ ]);
1308
+ /** Fields a caller reaches for to attach media, which an edit cannot set. */
1309
+ const SHOT_MEDIA_FIELDS = new Set([
1310
+ "clip",
1311
+ "clip_uri",
1312
+ "clip_asset",
1313
+ "video",
1314
+ "keyframe",
1315
+ "keyframe_uri",
1316
+ "still",
1317
+ "image",
1318
+ "status"
1319
+ ]);
1320
+ /**
1321
+ * Refuse a field an edit does not set, instead of dropping it.
1322
+ *
1323
+ * `{op: "update_shot", target, clip: "asset://…"}` came back `applied: 1` and
1324
+ * changed nothing: the write reported success, `has_clip` stayed false, and
1325
+ * the session read that as the board rejecting its asset rather than as the
1326
+ * op ignoring a field it never had. An op that silently drops half its
1327
+ * arguments is indistinguishable from one that worked.
1328
+ */
1329
+ function assertKnownShotFields(op, args) {
1330
+ const unknown = Object.keys(args).filter((key) => !SHOT_EDIT_FIELDS.has(key));
1331
+ if (unknown.length === 0)
1332
+ return;
1333
+ const media = unknown.filter((key) => SHOT_MEDIA_FIELDS.has(key));
1334
+ throw new Error(`${op} does not take ${unknown.map((k) => `\`${k}\``).join(", ")}. ` +
1335
+ (media.length > 0
1336
+ ? "A shot's still and clip are written by render_storyboard_stills / " +
1337
+ "render_storyboard_clips, not by an edit. "
1338
+ : "") +
1339
+ `Accepted: ${[...SHOT_EDIT_FIELDS].join(", ")}.`);
1340
+ }
1341
+ /** The board fields `set_board` may set. */
1342
+ const BOARD_EDIT_FIELDS = new Set([
1343
+ "brief",
1344
+ "style",
1345
+ "aspect_ratio",
1346
+ "entity_ids",
1347
+ "image_model",
1348
+ "video_model",
1349
+ "narration",
1350
+ "music_prompt",
1351
+ "motion_design"
1352
+ ]);
1353
+ const screenplayDirection = z.object({
1354
+ narration: z.string().optional(),
1355
+ music_prompt: z.string().optional(),
1356
+ motion_design: storyboardMotionDesign.nullable().optional()
1357
+ });
1358
+ /**
1359
+ * The board-level twin of {@link assertKnownShotFields}.
1360
+ *
1361
+ * `set_board` used to keep whatever it was handed and act on the keys it knew,
1362
+ * so `{op: "set_board", image_model: …}` reported success and left the board's
1363
+ * model null — and the render then refused for want of a model the caller had
1364
+ * just set.
1365
+ */
1366
+ function assertKnownBoardFields(args) {
1367
+ const unknown = Object.keys(args).filter((key) => !BOARD_EDIT_FIELDS.has(key));
1368
+ if (unknown.length === 0)
1369
+ return;
1370
+ throw new Error(`set_board does not take ${unknown.map((k) => `\`${k}\``).join(", ")}. ` +
1371
+ `Accepted: ${[...BOARD_EDIT_FIELDS].join(", ")}.`);
1372
+ }
1373
+ /**
1374
+ * Read `covered_by` on an edit: which shot's clip holds this shot's picture,
1375
+ * and the window of it this shot uses.
1376
+ *
1377
+ * A model that renders a fixed 5.2s window covers several 1.5-2.2s beats in
1378
+ * one generation, and the clip lands on one shot. Before this the siblings had
1379
+ * no way to say so: they stayed `has_clip: false`, the board read as half
1380
+ * unrendered when the cut was locked, and the default clip selection offered
1381
+ * to generate them again. The covering shot must own its clip — a window
1382
+ * measured against a window has no source length behind it.
1383
+ */
1384
+ function parseShotCoverage(shot, shots, value) {
1385
+ if (value === null)
1386
+ return null;
1387
+ const raw = isString(value) ? { shot_id: value } : value;
1388
+ if (!isRecord(raw)) {
1389
+ throw new Error("covered_by must be {shot_id, start_seconds?, end_seconds?} or null. " +
1390
+ "A bare shot id is accepted and means the whole clip.");
1391
+ }
1392
+ const ref = raw["shot_id"] ?? raw["target"] ?? raw["shot"];
1393
+ if (!isString(ref) || ref.trim() === "") {
1394
+ throw new Error("covered_by needs a `shot_id` naming the covering shot.");
1395
+ }
1396
+ const cover = findShot([...shots], ref.trim());
1397
+ if (!cover)
1398
+ throw new Error(`covered_by names no shot: "${ref}".`);
1399
+ if (cover.id === shot.id) {
1400
+ throw new Error("A shot cannot cover itself.");
1401
+ }
1402
+ if (cover.covered_by) {
1403
+ throw new Error(`Shot ${cover.id} is itself covered by ${cover.covered_by.shot_id}; ` +
1404
+ "point at the shot that owns the clip.");
1405
+ }
1406
+ const seconds = (key) => {
1407
+ const given = raw[key];
1408
+ if (given === undefined || given === null)
1409
+ return undefined;
1410
+ const n = Number(given);
1411
+ if (!Number.isFinite(n) || n < 0) {
1412
+ throw new Error(`covered_by.${key} must be a number of seconds >= 0.`);
1413
+ }
1414
+ return n;
1415
+ };
1416
+ const start = seconds("start_seconds");
1417
+ const end = seconds("end_seconds");
1418
+ if (start !== undefined && end !== undefined && end <= start) {
1419
+ throw new Error(`covered_by.end_seconds (${end}) must be after start_seconds (${start}).`);
1420
+ }
1421
+ const coverage = { shot_id: cover.id };
1422
+ if (start !== undefined)
1423
+ coverage.start_seconds = start;
1424
+ if (end !== undefined)
1425
+ coverage.end_seconds = end;
1426
+ return coverage;
1427
+ }
1428
+ /** The shot fields an edit may set. Media and status stay the render tools'. */
1429
+ function applyShotFields(shot, args, shots = []) {
1430
+ const next = { ...shot };
1431
+ if (args["action"] !== undefined)
1432
+ next.action = String(args["action"]);
1433
+ if (args["slug"] !== undefined)
1434
+ next.slug = String(args["slug"]);
1435
+ if (args["camera"] !== undefined)
1436
+ next.camera = args["camera"];
1437
+ if (args["motion"] !== undefined)
1438
+ next.motion = String(args["motion"]);
1439
+ if (args["graphics"] !== undefined) {
1440
+ if (args["graphics"] === null) {
1441
+ delete next.graphics;
1442
+ }
1443
+ else {
1444
+ const parsed = storyboardShotGraphics.safeParse(args["graphics"]);
1445
+ if (!parsed.success) {
1446
+ throw new Error(`graphics must be a valid Storyboard graphics object: ${parsed.error.issues
1447
+ .map((issue) => issue.path.join(".") || issue.message)
1448
+ .join(", ")}.`);
1449
+ }
1450
+ next.graphics = parsed.data;
1451
+ }
1452
+ }
1453
+ if (args["production"] !== undefined) {
1454
+ if (args["production"] === null) {
1455
+ delete next.production;
1456
+ }
1457
+ else {
1458
+ const parsed = productionRequirement.safeParse(args["production"]);
1459
+ if (!parsed.success) {
1460
+ throw new Error(`production must be a valid production requirement: ${parsed.error.issues
1461
+ .map((issue) => issue.path.join(".") || issue.message)
1462
+ .join(", ")}.`);
1463
+ }
1464
+ next.production = parsed.data;
1465
+ }
1466
+ }
1467
+ if (args["dialogue"] !== undefined)
1468
+ next.dialogue = String(args["dialogue"]);
1469
+ if (args["narration"] !== undefined)
1470
+ next.narration = String(args["narration"]);
1471
+ if (args["notes"] !== undefined)
1472
+ next.notes = String(args["notes"]);
1473
+ if (args["duration_seconds"] !== undefined) {
1474
+ const seconds = Number(args["duration_seconds"]);
1475
+ if (!Number.isFinite(seconds) || seconds <= 0) {
1476
+ throw new Error("duration_seconds must be a positive number.");
1477
+ }
1478
+ next.duration_seconds = seconds;
1479
+ }
1480
+ if (args["duration_source"] !== undefined) {
1481
+ const source = String(args["duration_source"]);
1482
+ if (source !== "audio" && source !== "manual") {
1483
+ throw new Error('duration_source must be "audio" or "manual".');
1484
+ }
1485
+ next.duration_source = source;
1486
+ }
1487
+ if (args["render_mode"] !== undefined) {
1488
+ const mode = String(args["render_mode"]);
1489
+ if (mode !== "keyframe" && mode !== "direct" && mode !== "reference") {
1490
+ throw new Error('render_mode must be "keyframe", "direct", or "reference".');
1491
+ }
1492
+ next.render_mode = mode;
1493
+ }
1494
+ if (Array.isArray(args["entity_ids"])) {
1495
+ next.entity_ids = args["entity_ids"].map(String);
1496
+ }
1497
+ if (args["location_id"] !== undefined) {
1498
+ next.location_id = optionalString(args["location_id"]) ?? null;
1499
+ }
1500
+ if (args["scene_id"] !== undefined) {
1501
+ const sceneId = optionalString(args["scene_id"]);
1502
+ if (sceneId) {
1503
+ next.scene_id = sceneId;
1504
+ }
1505
+ else {
1506
+ delete next.scene_id;
1507
+ }
1508
+ }
1509
+ if (args["covered_by"] !== undefined) {
1510
+ const coverage = parseShotCoverage(next, shots, args["covered_by"]);
1511
+ next.covered_by = coverage;
1512
+ // Status is the render tools' to write, with one exception: coverage is
1513
+ // the only way a shot's picture arrives without a render, and a covered
1514
+ // shot left at `keyframe_ready` is the drift this field exists to remove.
1515
+ if (coverage) {
1516
+ next.status = "rendered";
1517
+ }
1518
+ else if (!next.clip) {
1519
+ next.status = next.keyframe ? "keyframe_ready" : "planned";
1520
+ }
1521
+ }
1522
+ return next;
1523
+ }
1524
+ /**
1525
+ * Apply one board operation. Returns its summary, or throws with the reason.
1526
+ *
1527
+ * `entities` is the resolved library `set_style` reads — the document holds
1528
+ * ids, and the kinds and descriptors live in the asset rows the caller loaded.
1529
+ */
1530
+ function applyBoardOp(doc, { op, args }, entities = []) {
1531
+ switch (op) {
1532
+ case "add_shot": {
1533
+ assertKnownShotFields("add_shot", args);
1534
+ if (!isString(args["action"]) || args["action"].trim() === "") {
1535
+ throw new Error("add_shot needs a non-empty `action` describing the shot.");
1536
+ }
1537
+ const shot = applyShotFields({
1538
+ type: "shot",
1539
+ id: newDocId("shot"),
1540
+ index: doc.shots.length,
1541
+ action: "",
1542
+ status: "planned"
1543
+ }, args, doc.shots);
1544
+ // An explicit anchor is the scene-safe insert: the new shot lands in
1545
+ // the anchor's scene, which a bare index cannot say.
1546
+ const anchorRef = optionalString(args["after_shot_id"]);
1547
+ if (anchorRef !== undefined) {
1548
+ const anchor = findShot(doc.shots, anchorRef);
1549
+ if (!anchor)
1550
+ throw new Error(`after_shot_id names no shot: "${anchorRef}".`);
1551
+ const ordered = [...doc.shots].sort((a, b) => a.index - b.index);
1552
+ const at = ordered.findIndex((s) => s.id === anchor.id) + 1;
1553
+ ordered.splice(at, 0, withScene(shot, anchor.scene_id ?? null));
1554
+ applyStructural(doc, ordered);
1555
+ return { id: shot.id, index: at };
1556
+ }
1557
+ const at = isNumber(args["index"])
1558
+ ? Math.max(0, Math.min(Math.trunc(args["index"]), doc.shots.length))
1559
+ : doc.shots.length;
1560
+ const shots = [...doc.shots];
1561
+ shots.splice(at, 0, shot);
1562
+ applyStructural(doc, shots);
1563
+ return { id: shot.id, index: at };
1564
+ }
1565
+ case "update_shot": {
1566
+ assertKnownShotFields("update_shot", args);
1567
+ const target = String(args["target"] ?? "");
1568
+ const shot = findShot(doc.shots, target);
1569
+ if (!shot)
1570
+ throw new Error(`No shot matches "${target}".`);
1571
+ const updated = applyShotFields(shot, args, doc.shots);
1572
+ doc.shots = doc.shots.map((s) => (s.id === shot.id ? updated : s));
1573
+ return { id: updated.id, action: updated.action };
1574
+ }
1575
+ case "remove_shot": {
1576
+ const target = String(args["target"] ?? "");
1577
+ const shot = findShot(doc.shots, target);
1578
+ if (!shot)
1579
+ throw new Error(`No shot matches "${target}".`);
1580
+ // Coverage pointing at a shot that is gone would read as a picture that
1581
+ // exists and assemble as nothing, so the dependents go back to needing
1582
+ // their own render.
1583
+ const uncovered = doc.shots
1584
+ .filter((s) => s.covered_by?.shot_id === shot.id)
1585
+ .map((s) => s.id);
1586
+ doc.shots = renumberShots(doc.shots
1587
+ .filter((s) => s.id !== shot.id)
1588
+ .map((s) => s.covered_by?.shot_id === shot.id
1589
+ ? {
1590
+ ...s,
1591
+ covered_by: null,
1592
+ status: s.keyframe ? "keyframe_ready" : "planned"
1593
+ }
1594
+ : s));
1595
+ return uncovered.length > 0
1596
+ ? { removed: shot.id, uncovered }
1597
+ : { removed: shot.id };
1598
+ }
1599
+ case "reorder_shot": {
1600
+ const target = String(args["target"] ?? "");
1601
+ const shot = findShot(doc.shots, target);
1602
+ if (!shot)
1603
+ throw new Error(`No shot matches "${target}".`);
1604
+ const to = Number(args["index"]);
1605
+ if (!Number.isInteger(to) || to < 0 || to >= doc.shots.length) {
1606
+ throw new Error(`reorder_shot needs an \`index\` in [0, ${doc.shots.length - 1}].`);
1607
+ }
1608
+ const ordered = [...doc.shots].sort((a, b) => a.index - b.index);
1609
+ const from = ordered.findIndex((s) => s.id === shot.id);
1610
+ const [moved] = ordered.splice(from, 1);
1611
+ ordered.splice(to, 0, moved);
1612
+ doc.shots = renumberShots(ordered);
1613
+ return { id: shot.id, index: to };
1614
+ }
1615
+ case "move_shot": {
1616
+ const target = String(args["target"] ?? "");
1617
+ const shot = findShot(doc.shots, target);
1618
+ if (!shot)
1619
+ throw new Error(`No shot matches "${target}".`);
1620
+ const seeded = materializeLegacyScene(doc);
1621
+ const moved = doc.shots.find((s) => s.id === shot.id);
1622
+ const sceneGiven = args["scene_id"] !== undefined;
1623
+ const sceneId = sceneGiven
1624
+ ? (optionalString(args["scene_id"]) ?? null)
1625
+ : (moved.scene_id ?? seeded ?? null);
1626
+ if (sceneId !== null && !docScenes(doc).some((s) => s.id === sceneId)) {
1627
+ throw new Error(`move_shot names no scene on this board: "${sceneId}".`);
1628
+ }
1629
+ const position = Number(args["position"] ?? args["index"]);
1630
+ if (!Number.isInteger(position) || position < 0) {
1631
+ throw new Error("move_shot needs a `position`: the 0-based place inside the target scene.");
1632
+ }
1633
+ const ordered = sceneGroups(doc.shots).flatMap((g) => g.shots);
1634
+ const from = ordered.findIndex((s) => s.id === moved.id);
1635
+ const rest = ordered.filter((s) => s.id !== moved.id);
1636
+ const run = [];
1637
+ rest.forEach((s, i) => {
1638
+ if ((s.scene_id ?? null) === sceneId)
1639
+ run.push(i);
1640
+ });
1641
+ // A target scene the move empties has no run to count from, so the shot
1642
+ // holds its place and only changes scene.
1643
+ const at = run.length > 0
1644
+ ? run[0] + Math.min(position, run.length)
1645
+ : Math.min(Math.max(from, 0), rest.length);
1646
+ applyStructural(doc, [
1647
+ ...rest.slice(0, at),
1648
+ withScene(moved, sceneId),
1649
+ ...rest.slice(at)
1650
+ ]);
1651
+ const landed = doc.shots.find((s) => s.id === moved.id);
1652
+ return { id: landed.id, index: landed.index, scene_id: sceneId };
1653
+ }
1654
+ case "duplicate_shot": {
1655
+ const target = String(args["target"] ?? "");
1656
+ const shot = findShot(doc.shots, target);
1657
+ if (!shot)
1658
+ throw new Error(`No shot matches "${target}".`);
1659
+ const ordered = [...doc.shots].sort((a, b) => a.index - b.index);
1660
+ const at = ordered.findIndex((s) => s.id === shot.id);
1661
+ const copy = {
1662
+ ...shot,
1663
+ id: newDocId("shot"),
1664
+ // The copy covers no script line, so the link fields go with the
1665
+ // original and an ERT read off a line is now the user's own.
1666
+ duration_source: "manual"
1667
+ };
1668
+ delete copy.script_line_ids;
1669
+ delete copy.script_text_snapshot;
1670
+ delete copy.covered_by;
1671
+ ordered.splice(at + 1, 0, copy);
1672
+ applyStructural(doc, ordered);
1673
+ return { id: copy.id, index: at + 1, source: shot.id };
1674
+ }
1675
+ case "set_setup": {
1676
+ const unknown = Object.keys(args).filter((key) => !["brief", "genre", "stage"].includes(key));
1677
+ if (unknown.length > 0) {
1678
+ throw new Error(`set_setup does not take ${unknown.map((k) => `\`${k}\``).join(", ")}. Accepted: brief, genre, stage.`);
1679
+ }
1680
+ if (args["brief"] !== undefined)
1681
+ doc.brief = String(args["brief"]);
1682
+ if (args["genre"] !== undefined)
1683
+ doc.genre = String(args["genre"]);
1684
+ if (args["stage"] !== undefined) {
1685
+ const stage = String(args["stage"]);
1686
+ if (!SETUP_STAGES.includes(stage)) {
1687
+ throw new Error(`stage must be one of ${SETUP_STAGES.join(", ")}; got "${stage}".`);
1688
+ }
1689
+ doc.setupStage = stage;
1690
+ }
1691
+ return { brief: doc.brief, genre: doc.genre, stage: doc.setupStage };
1692
+ }
1693
+ case "update_scene": {
1694
+ const sceneId = String(args["scene_id"] ?? "");
1695
+ const scenes = docScenes(doc);
1696
+ const target = scenes.find((scene) => scene.id === sceneId);
1697
+ if (!target) {
1698
+ throw new Error(`No scene matches "${sceneId}".`);
1699
+ }
1700
+ const next = { ...target };
1701
+ if (args["slugline"] !== undefined)
1702
+ next.slugline = String(args["slugline"]);
1703
+ if (args["lighting"] !== undefined)
1704
+ next.lighting = String(args["lighting"]);
1705
+ setDocScenes(doc, scenes.map((scene) => (scene.id === sceneId ? next : scene)));
1706
+ return { id: next.id, slugline: next.slugline, lighting: next.lighting };
1707
+ }
1708
+ case "create_scene": {
1709
+ materializeLegacyScene(doc);
1710
+ const scene = {
1711
+ type: "scene",
1712
+ id: newDocId("scene"),
1713
+ slugline: optionalString(args["slugline"]) ?? ""
1714
+ };
1715
+ const groups = sceneGroups(doc.shots);
1716
+ const afterRef = optionalString(args["after_scene_id"]);
1717
+ const after = afterRef
1718
+ ? groups.findIndex((g) => g.sceneId === afterRef)
1719
+ : -1;
1720
+ if (afterRef && after === -1) {
1721
+ throw new Error(`after_scene_id names no scene: "${afterRef}".`);
1722
+ }
1723
+ const ordered = groups.flatMap((g) => g.shots);
1724
+ // Right after the last shot of `after_scene_id`, so the new scene lands
1725
+ // in the position its first shot's index gives it.
1726
+ const at = after === -1
1727
+ ? ordered.length
1728
+ : groups.slice(0, after + 1).reduce((n, g) => n + g.shots.length, 0);
1729
+ // A scene with no shot has no position, so it would neither render nor
1730
+ // survive the next operation: it opens holding one blank shot.
1731
+ const shotId = newDocId("shot");
1732
+ ordered.splice(at, 0, blankShot(shotId, scene.id));
1733
+ setDocScenes(doc, [...docScenes(doc), scene]);
1734
+ applyStructural(doc, ordered);
1735
+ return { id: scene.id, shot_id: shotId };
1736
+ }
1737
+ case "merge_scene": {
1738
+ const sceneId = String(args["scene_id"] ?? "");
1739
+ const groups = sceneGroups(doc.shots);
1740
+ const at = groups.findIndex((g) => g.sceneId === sceneId);
1741
+ if (at === -1)
1742
+ throw new Error(`No scene matches "${sceneId}".`);
1743
+ if (at === 0) {
1744
+ throw new Error(`Scene ${sceneId} is the first scene; there is nothing before it to merge into.`);
1745
+ }
1746
+ const into = groups[at - 1].sceneId;
1747
+ // The emptied scene is dropped by the reindex that follows.
1748
+ applyStructural(doc, groups.flatMap((g) => g === groups[at] ? g.shots.map((s) => withScene(s, into)) : g.shots));
1749
+ return { merged: sceneId, into };
1750
+ }
1751
+ case "set_style": {
1752
+ const entityId = optionalString(args["entity_id"]);
1753
+ if (entityId) {
1754
+ const chosen = entities.find((e) => e.id === entityId);
1755
+ if (!chosen) {
1756
+ throw new Error(`No entity "${entityId}" is in the library. Call list_entities, or pass \`style\` instead.`);
1757
+ }
1758
+ if (chosen.kind !== "style") {
1759
+ throw new Error(`Entity "${entityId}" is a ${chosen.kind}, not a style. Cast it with set_board's entity_ids.`);
1760
+ }
1761
+ const styleIds = new Set(entities.filter((e) => e.kind === "style").map((e) => e.id));
1762
+ doc.style = chosen.descriptor;
1763
+ doc.entityIds = [
1764
+ ...(doc.entityIds ?? []).filter((id) => !styleIds.has(id)),
1765
+ entityId
1766
+ ];
1767
+ // A shot's explicit list is its whole selection, so a style missing
1768
+ // from it reads as an exclusion. Styles are board-wide.
1769
+ doc.shots = doc.shots.map((shot) => {
1770
+ if (!shot.entity_ids)
1771
+ return shot;
1772
+ return {
1773
+ ...shot,
1774
+ entity_ids: [
1775
+ ...shot.entity_ids.filter((id) => !styleIds.has(id)),
1776
+ entityId
1777
+ ]
1778
+ };
1779
+ });
1780
+ return {
1781
+ style: doc.style,
1782
+ style_entity_id: entityId,
1783
+ entity_ids: doc.entityIds
1784
+ };
1785
+ }
1786
+ const descriptor = optionalString(args["style"]) ?? optionalString(args["descriptor"]);
1787
+ if (descriptor === undefined) {
1788
+ throw new Error("set_style needs an `entity_id` or a `style` descriptor.");
1789
+ }
1790
+ doc.style = descriptor;
1791
+ return { style: doc.style, style_entity_id: null };
1792
+ }
1793
+ case "select_version": {
1794
+ const target = String(args["target"] ?? "");
1795
+ const shot = findShot(doc.shots, target);
1796
+ if (!shot)
1797
+ throw new Error(`No shot matches "${target}".`);
1798
+ const { kind, index, versions } = readVersionTarget(shot, args);
1799
+ const chosen = versions[index];
1800
+ const updated = kind === "keyframe"
1801
+ ? {
1802
+ ...shot,
1803
+ keyframe: chosen,
1804
+ keyframe_versions: versions
1805
+ }
1806
+ : {
1807
+ ...shot,
1808
+ clip: chosen,
1809
+ clip_versions: versions
1810
+ };
1811
+ doc.shots = doc.shots.map((s) => (s.id === shot.id ? updated : s));
1812
+ return { id: shot.id, kind, version: index };
1813
+ }
1814
+ case "delete_version": {
1815
+ const target = String(args["target"] ?? "");
1816
+ const shot = findShot(doc.shots, target);
1817
+ if (!shot)
1818
+ throw new Error(`No shot matches "${target}".`);
1819
+ const { kind, index, versions } = readVersionTarget(shot, args);
1820
+ const remaining = versions.filter((_, i) => i !== index);
1821
+ const selected = kind === "keyframe" ? shot.keyframe : shot.clip;
1822
+ const refId = (v) => v?.asset_id ?? v?.uri ?? "";
1823
+ const removedSelected = !!selected && refId(versions[index]) === refId(selected);
1824
+ // The next version at the same position becomes selected, or the last
1825
+ // one when the removed version was at the end.
1826
+ const next = remaining.length === 0
1827
+ ? null
1828
+ : removedSelected
1829
+ ? remaining[Math.min(index, remaining.length - 1)]
1830
+ : (selected ?? null);
1831
+ const updated = { ...shot };
1832
+ if (kind === "keyframe") {
1833
+ updated.keyframe = next;
1834
+ updated.keyframe_versions = remaining;
1835
+ if (remaining.length === 0 && !updated.clip)
1836
+ updated.status = "planned";
1837
+ }
1838
+ else {
1839
+ updated.clip = next;
1840
+ updated.clip_versions = remaining;
1841
+ if (remaining.length === 0) {
1842
+ updated.status = updated.keyframe ? "keyframe_ready" : "planned";
1843
+ }
1844
+ }
1845
+ doc.shots = doc.shots.map((s) => (s.id === shot.id ? updated : s));
1846
+ return { id: shot.id, kind, removed: index, remaining: remaining.length };
1847
+ }
1848
+ case "add_keyframe_version": {
1849
+ const target = String(args["target"] ?? "");
1850
+ const shot = findShot(doc.shots, target);
1851
+ if (!shot)
1852
+ throw new Error(`No shot matches "${target}".`);
1853
+ const assetId = optionalString(args["asset_id"]);
1854
+ if (!assetId) {
1855
+ throw new Error("add_keyframe_version needs an `asset_id` naming a stored image.");
1856
+ }
1857
+ const keyframe = {
1858
+ type: "image",
1859
+ asset_id: assetId,
1860
+ uri: `asset://${assetId}`
1861
+ };
1862
+ const flipOf = optionalString(args["flip_of"]);
1863
+ if (flipOf) {
1864
+ // Provenance for a flip or an editor pass. It carries no render
1865
+ // record, so the still never reads stale.
1866
+ keyframe.flip_of = flipOf;
1867
+ }
1868
+ const versions = versionList(shot, "keyframe");
1869
+ const updated = {
1870
+ ...shot,
1871
+ keyframe,
1872
+ keyframe_versions: [...versions, keyframe],
1873
+ status: shot.status === "planned" ? "keyframe_ready" : shot.status
1874
+ };
1875
+ doc.shots = doc.shots.map((s) => (s.id === shot.id ? updated : s));
1876
+ return { id: shot.id, asset_id: assetId, versions: versions.length + 1 };
1877
+ }
1878
+ case "set_board": {
1879
+ assertKnownBoardFields(args);
1880
+ const direction = screenplayDirection.safeParse(args);
1881
+ if (!direction.success) {
1882
+ throw new Error("set_board has invalid screenplay direction: " +
1883
+ direction.error.issues
1884
+ .map((issue) => `${issue.path.join(".") || "direction"}: ${issue.message}`)
1885
+ .join("; "));
1886
+ }
1887
+ if (args["brief"] !== undefined)
1888
+ doc.brief = String(args["brief"]);
1889
+ if (args["style"] !== undefined)
1890
+ doc.style = String(args["style"]);
1891
+ if (args["aspect_ratio"] !== undefined) {
1892
+ doc.aspectRatio = String(args["aspect_ratio"]);
1893
+ }
1894
+ if (Array.isArray(args["entity_ids"])) {
1895
+ doc.entityIds = args["entity_ids"].map(String);
1896
+ }
1897
+ // The board's default models. Without these the only way to set one was
1898
+ // the editor, so a headless caller passed them here, saw the op succeed,
1899
+ // and then had `render_storyboard_stills` refuse for want of a model —
1900
+ // the keys were being dropped silently.
1901
+ const model = (key) => {
1902
+ const value = args[key];
1903
+ if (value === null)
1904
+ return null;
1905
+ return isRecord(value) ? value : undefined;
1906
+ };
1907
+ const imageModel = model("image_model");
1908
+ if (args["image_model"] !== undefined) {
1909
+ if (imageModel === undefined) {
1910
+ throw new Error("set_board: image_model must be a model object (use find_model) or null");
1911
+ }
1912
+ doc.imageModel = imageModel;
1913
+ }
1914
+ const videoModel = model("video_model");
1915
+ if (args["video_model"] !== undefined) {
1916
+ if (videoModel === undefined) {
1917
+ throw new Error("set_board: video_model must be a model object (use find_model) or null");
1918
+ }
1919
+ doc.videoModel = videoModel;
1920
+ }
1921
+ if (args["narration"] !== undefined ||
1922
+ args["music_prompt"] !== undefined ||
1923
+ args["motion_design"] !== undefined) {
1924
+ const needsScreenplay = args["narration"] !== undefined ||
1925
+ args["music_prompt"] !== undefined ||
1926
+ direction.data.motion_design !== null;
1927
+ if (needsScreenplay) {
1928
+ doc.screenplay = doc.screenplay ?? {
1929
+ type: "screenplay",
1930
+ id: newDocId("sp"),
1931
+ title: "",
1932
+ shots: []
1933
+ };
1934
+ }
1935
+ if (doc.screenplay && direction.data.narration !== undefined) {
1936
+ doc.screenplay.narration = direction.data.narration;
1937
+ }
1938
+ if (doc.screenplay && direction.data.music_prompt !== undefined) {
1939
+ doc.screenplay.music_prompt = direction.data.music_prompt;
1940
+ }
1941
+ if (doc.screenplay && direction.data.motion_design !== undefined) {
1942
+ if (direction.data.motion_design === null) {
1943
+ delete doc.screenplay.motion_design;
1944
+ }
1945
+ else {
1946
+ doc.screenplay.motion_design = direction.data.motion_design;
1947
+ }
1948
+ }
1949
+ }
1950
+ return {
1951
+ brief: doc.brief,
1952
+ style: doc.style,
1953
+ aspect_ratio: doc.aspectRatio,
1954
+ entity_ids: doc.entityIds,
1955
+ image_model: doc.imageModel,
1956
+ video_model: doc.videoModel,
1957
+ narration: doc.screenplay?.narration,
1958
+ music_prompt: doc.screenplay?.music_prompt,
1959
+ motion_design: doc.screenplay?.motion_design
1960
+ };
1961
+ }
1962
+ }
1963
+ }
1964
+ /**
1965
+ * The library `set_style` reads: the board's own cast, plus every entity a
1966
+ * `set_style` op names. The named one need not be cast yet — applying a preset
1967
+ * is how it gets cast.
1968
+ */
1969
+ async function loadStyleEntities(run, doc, ops) {
1970
+ const named = ops
1971
+ .filter((parsed) => parsed.op === "set_style")
1972
+ .map((parsed) => optionalString(parsed.args["entity_id"]))
1973
+ .filter((id) => !!id);
1974
+ if (named.length === 0)
1975
+ return [];
1976
+ const cast = await loadBoardEntities(run.context, doc);
1977
+ const missing = named.filter((id) => !cast.some((e) => e.id === id));
1978
+ if (missing.length === 0)
1979
+ return cast;
1980
+ const extra = await loadBoardEntities(run.context, {
1981
+ ...doc,
1982
+ entityIds: missing
1983
+ });
1984
+ return [...cast, ...extra];
1985
+ }
1986
+ /** Resolve source refs before any edit writes. Guest IDs stay short, stored refs stay canonical. */
1987
+ async function resolveStoryboardEditSources(run, ops) {
1988
+ const { Asset } = await import("@nodetool-ai/models");
1989
+ const canonical = new Map();
1990
+ const resolve = async (id) => {
1991
+ if (!isFullResourceId(id) && !isShortResourceId(id)) {
1992
+ return id;
1993
+ }
1994
+ const cached = canonical.get(id);
1995
+ if (cached) {
1996
+ return cached;
1997
+ }
1998
+ const asset = run.context.userId ? await Asset.find(run.context.userId, id) : null;
1999
+ if (!asset) {
2000
+ throw new Error(`Source asset or entity ${id} is unavailable.`);
2001
+ }
2002
+ canonical.set(id, asset.id);
2003
+ return asset.id;
2004
+ };
2005
+ const resolved = structuredClone(ops);
2006
+ for (const { args } of resolved) {
2007
+ const references = [args];
2008
+ const graphics = args["graphics"];
2009
+ if (isRecord(graphics) && Array.isArray(graphics["elements"])) {
2010
+ references.push(...graphics["elements"].filter(isRecord));
2011
+ }
2012
+ const production = args["production"];
2013
+ if (isRecord(production) && Array.isArray(production["protected_inputs"])) {
2014
+ references.push(...production["protected_inputs"].filter(isRecord));
2015
+ }
2016
+ for (const reference of references) {
2017
+ for (const field of ["asset_id", "entity_id", "location_id"]) {
2018
+ const id = reference[field];
2019
+ if (isString(id)) {
2020
+ reference[field] = await resolve(id);
2021
+ }
2022
+ }
2023
+ }
2024
+ if (Array.isArray(args["entity_ids"])) {
2025
+ args["entity_ids"] = await Promise.all(args["entity_ids"].map(async (id) => isString(id) ? resolve(id) : id));
2026
+ }
2027
+ }
2028
+ return resolved;
2029
+ }
2030
+ const editStoryboard = {
2031
+ spec: editStoryboardSpec,
2032
+ impl: async (run, params) => {
2033
+ const ops = parseBoardOps(params["ops"]);
2034
+ if (isError(ops))
2035
+ return ops;
2036
+ const { Storyboard } = await import("@nodetool-ai/models");
2037
+ for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
2038
+ const board = await loadBoard(run, params["storyboard_id"]);
2039
+ if (isError(board))
2040
+ return board;
2041
+ const { row, doc } = board;
2042
+ if (params["expected_revision"] !== undefined && params["expected_revision"] !== row.revision) {
2043
+ return { error: "Storyboard revision conflict. Refresh the board before editing." };
2044
+ }
2045
+ // A failing op is recorded and the script continues: stopping at the
2046
+ // first error hides every problem behind it.
2047
+ const records = [];
2048
+ let sourceOps;
2049
+ try {
2050
+ sourceOps = await resolveStoryboardEditSources(run, ops);
2051
+ }
2052
+ catch (error) {
2053
+ return { error: error instanceof Error ? error.message : String(error) };
2054
+ }
2055
+ const entities = await loadStyleEntities(run, doc, sourceOps);
2056
+ const resolvedOps = [];
2057
+ for (const parsed of sourceOps) {
2058
+ try {
2059
+ const result = applyBoardOp(doc, parsed, entities);
2060
+ records.push({
2061
+ op: parsed.op,
2062
+ ok: true,
2063
+ result
2064
+ });
2065
+ // Resolve non-id targets (index/slug) to the canonical shot id so
2066
+ // the merge adapter can attribute the write to the real unit.
2067
+ const canonicalId = typeof result?.["id"] === "string"
2068
+ ? result["id"]
2069
+ : typeof result?.["removed"] === "string"
2070
+ ? result["removed"]
2071
+ : undefined;
2072
+ if (canonicalId &&
2073
+ (parsed.op === "update_shot" ||
2074
+ parsed.op === "remove_shot" ||
2075
+ parsed.op === "reorder_shot" ||
2076
+ parsed.op === "move_shot" ||
2077
+ parsed.op === "select_version" ||
2078
+ parsed.op === "delete_version" ||
2079
+ parsed.op === "add_keyframe_version")) {
2080
+ resolvedOps.push({
2081
+ tool: parsed.op,
2082
+ input: { ...parsed.args, target: canonicalId, id: canonicalId }
2083
+ });
2084
+ }
2085
+ else {
2086
+ resolvedOps.push({ tool: parsed.op, input: parsed.args });
2087
+ }
2088
+ }
2089
+ catch (e) {
2090
+ records.push({
2091
+ op: parsed.op,
2092
+ ok: false,
2093
+ error: e instanceof Error ? e.message : String(e)
2094
+ });
2095
+ resolvedOps.push({ tool: parsed.op, input: parsed.args });
2096
+ }
2097
+ }
2098
+ if (doc.screenplay) {
2099
+ doc.screenplay.shots = doc.shots;
2100
+ }
2101
+ const saved = await Storyboard.updateFieldsIfUnchanged(row.id, row.updated_at, {
2102
+ document: JSON.stringify(doc)
2103
+ },
2104
+ // The ops ride on the write so an open editor can merge this change
2105
+ // per shot instead of treating the board as replaced.
2106
+ { ops: resolvedOps });
2107
+ if (!saved)
2108
+ continue;
2109
+ const failed = records.filter((record) => !record.ok);
2110
+ return {
2111
+ storyboard_id: row.id,
2112
+ updated_at: saved.updated_at,
2113
+ revision: saved.revision,
2114
+ applied: records.length - failed.length,
2115
+ failed: failed.length,
2116
+ ops: records,
2117
+ shots: [...doc.shots]
2118
+ .sort((a, b) => a.index - b.index)
2119
+ .map((shot) => ({
2120
+ id: shot.id,
2121
+ index: shot.index,
2122
+ slug: shot.slug,
2123
+ action: shot.action,
2124
+ status: shot.status
2125
+ }))
2126
+ };
2127
+ }
2128
+ return {
2129
+ error: `Storyboard ${String(params["storyboard_id"])} is being modified concurrently; nothing was saved. Retry the call.`
2130
+ };
2131
+ }
2132
+ };
2133
+ // ---------------------------------------------------------------------------
2134
+ // direct_storyboard
2135
+ // ---------------------------------------------------------------------------
2136
+ const DEFAULT_DIRECTED_SHOTS = 6;
2137
+ /**
2138
+ * The Director, headless. The browser runs the same three protocol functions
2139
+ * from `useDirectScreenplay`; keeping the prompt, the schema and the parse in
2140
+ * `@nodetool-ai/protocol` is what makes a board directed here and one directed
2141
+ * in the editor the same artifact.
2142
+ */
2143
+ const directStoryboard = {
2144
+ spec: directStoryboardSpec,
2145
+ impl: async (run, params) => {
2146
+ const context = run.context;
2147
+ const board = await loadBoard(run, params["storyboard_id"]);
2148
+ if (isError(board))
2149
+ return board;
2150
+ const { row, doc } = board;
2151
+ const brief = doc.brief.trim();
2152
+ if (!brief) {
2153
+ return {
2154
+ error: `Storyboard ${row.id} has no brief, so there is nothing to direct. Write one with edit_storyboard's set_setup op.`
2155
+ };
2156
+ }
2157
+ if (doc.shots.length > 0 && params["redirect"] !== true) {
2158
+ return {
2159
+ error: `Storyboard ${row.id} already has ${doc.shots.length} shots. Pass redirect: true to run the Director over them again — retained shots keep their ids and their rendered media.`
2160
+ };
2161
+ }
2162
+ const model = resolveModel(params, doc.directorModel, "director", "generate_text");
2163
+ if (isError(model))
2164
+ return model;
2165
+ const { DIRECTOR_SYSTEM_PROMPT, SCREENPLAY_TOOL_DESCRIPTION, SCREENPLAY_TOOL_NAME, buildDirectorPrompt, buildScreenplaySchema, clampShotCount, fallbackScreenplay, parseScreenplay } = await import("@nodetool-ai/protocol");
2166
+ const { generateStructured } = await import("@nodetool-ai/runtime");
2167
+ const shotCount = clampShotCount(isNumber(params["shot_count"])
2168
+ ? params["shot_count"]
2169
+ : DEFAULT_DIRECTED_SHOTS);
2170
+ const aspectRatio = doc.aspectRatio || "16:9";
2171
+ // The cast reaches the model so the screenplay names entities by their
2172
+ // exact names, which is what activates them per shot.
2173
+ const entities = await loadBoardEntities(context, doc);
2174
+ const castLines = entities.map((e) => `- ${e.name} (${e.kind})${e.descriptor ? `: ${e.descriptor}` : ""}`);
2175
+ const genre = doc.genre.trim();
2176
+ const directedBrief = [
2177
+ brief,
2178
+ genre ? `Genre: ${genre}` : "",
2179
+ castLines.length > 0
2180
+ ? `Cast & ingredients — reference these by exact name in the shots:\n${castLines.join("\n")}`
2181
+ : ""
2182
+ ]
2183
+ .filter((part) => part !== "")
2184
+ .join("\n\n");
2185
+ const provider = await context.getProvider(model.provider);
2186
+ const raw = await generateStructured(provider, {
2187
+ model: model.model,
2188
+ maxTokens: 8192,
2189
+ messages: [
2190
+ { role: "system", content: DIRECTOR_SYSTEM_PROMPT },
2191
+ {
2192
+ role: "user",
2193
+ content: buildDirectorPrompt(directedBrief, doc.style, shotCount, aspectRatio)
2194
+ }
2195
+ ],
2196
+ toolName: SCREENPLAY_TOOL_NAME,
2197
+ toolDescription: SCREENPLAY_TOOL_DESCRIPTION,
2198
+ schema: buildScreenplaySchema(shotCount)
2199
+ });
2200
+ const parsed = raw
2201
+ ? parseScreenplay(raw, {
2202
+ shotCount,
2203
+ aspectRatio,
2204
+ genre: genre || undefined
2205
+ })
2206
+ : null;
2207
+ // No usable answer — a provider without tool support, or the fake provider
2208
+ // — falls back to placeholder shots derived from the brief, the same rule
2209
+ // the Director node and the editor apply. A provider error still throws.
2210
+ const screenplay = parsed && parsed.shots.length > 0
2211
+ ? parsed
2212
+ : fallbackScreenplay({
2213
+ brief,
2214
+ style: doc.style,
2215
+ shotCount,
2216
+ aspectRatio
2217
+ });
2218
+ const { Storyboard } = await import("@nodetool-ai/models");
2219
+ for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
2220
+ const current = await loadBoard(run, row.id);
2221
+ if (isError(current))
2222
+ return current;
2223
+ const next = current.doc;
2224
+ // A screenplay describes direction. Its media can predate renders made
2225
+ // while the Director ran, so a retained shot keeps its own.
2226
+ const existing = new Map(next.shots.map((shot) => [shot.id, shot]));
2227
+ next.shots = screenplay.shots.map((shot, index) => {
2228
+ const held = existing.get(shot.id);
2229
+ if (!held)
2230
+ return { ...shot, index };
2231
+ return {
2232
+ ...held,
2233
+ ...shot,
2234
+ index,
2235
+ graphics: held.graphics,
2236
+ production: held.production,
2237
+ keyframe: held.keyframe,
2238
+ keyframe_versions: held.keyframe_versions,
2239
+ clip: held.clip,
2240
+ clip_versions: held.clip_versions,
2241
+ covered_by: held.covered_by,
2242
+ status: held.status
2243
+ };
2244
+ });
2245
+ const previousMotionDesign = next.screenplay?.motion_design;
2246
+ next.screenplay = { ...screenplay, shots: next.shots };
2247
+ if (previousMotionDesign !== undefined) {
2248
+ next.screenplay.motion_design = previousMotionDesign;
2249
+ }
2250
+ next.style = screenplay.style_bible ?? next.style;
2251
+ next.aspectRatio = screenplay.aspect_ratio ?? next.aspectRatio;
2252
+ if (screenplay.genre)
2253
+ next.genre = screenplay.genre;
2254
+ const saved = await Storyboard.updateFieldsIfUnchanged(current.row.id, current.row.updated_at, { document: JSON.stringify(next) });
2255
+ if (!saved)
2256
+ continue;
2257
+ return {
2258
+ storyboard_id: current.row.id,
2259
+ updated_at: saved.updated_at,
2260
+ revision: saved.revision,
2261
+ title: screenplay.title,
2262
+ genre: next.genre,
2263
+ redirected: params["redirect"] === true,
2264
+ scenes: (screenplay.scenes ?? []).map((scene) => ({
2265
+ id: scene.id,
2266
+ slugline: scene.slugline,
2267
+ lighting: scene.lighting
2268
+ })),
2269
+ shots: next.shots.map((shot) => ({
2270
+ id: shot.id,
2271
+ index: shot.index,
2272
+ slug: shot.slug,
2273
+ action: shot.action,
2274
+ scene_id: shot.scene_id,
2275
+ status: shot.status,
2276
+ has_keyframe: !!shot.keyframe,
2277
+ has_clip: !!shot.clip
2278
+ }))
2279
+ };
2280
+ }
2281
+ return {
2282
+ error: `Storyboard ${row.id} is being modified concurrently; the screenplay was directed but could not be saved. Retry the call.`
2283
+ };
2284
+ }
2285
+ };
2286
+ // ---------------------------------------------------------------------------
2287
+ // extract_script_from_storyboard
2288
+ // ---------------------------------------------------------------------------
2289
+ //
2290
+ // The board is the consumer of the words: it projects line text into shots and
2291
+ // reads take durations for timing. Extraction moves ownership of the words to a
2292
+ // script resource and leaves the keys behind — `script_id` on the screenplay,
2293
+ // `script_line_ids` and a text snapshot on each shot.
2294
+ const extractScriptFromStoryboard = {
2295
+ spec: extractScriptFromStoryboardSpec,
2296
+ impl: async (run, params) => {
2297
+ const context = run.context;
2298
+ const board = await loadBoard(run, params["storyboard_id"]);
2299
+ if (isError(board))
2300
+ return board;
2301
+ const { row, doc } = board;
2302
+ const relink = params["relink"] === true;
2303
+ const screenplay = boardScreenplay(row, doc);
2304
+ const linkedScriptId = screenplay.script_id ?? null;
2305
+ if (linkedScriptId && !relink) {
2306
+ return {
2307
+ error: `Storyboard ${row.id} already links script ${linkedScriptId}. Pass relink: true to re-project the board's words onto that script.`
2308
+ };
2309
+ }
2310
+ const { extractScriptFromScreenplay, joinLineTexts, validateScriptLink } = await import("@nodetool-ai/protocol");
2311
+ const entities = await loadBoardEntities(context, doc);
2312
+ const extracted = extractScriptFromScreenplay(screenplay, entities);
2313
+ const lines = extracted.document.sections.flatMap((s) => s.lines);
2314
+ if (lines.length === 0) {
2315
+ return {
2316
+ error: "No shot on this board carries dialogue or narration, so there is nothing to extract. Write the words with edit_storyboard first."
2317
+ };
2318
+ }
2319
+ const textByLineId = new Map(lines.map((line) => [line.id, line.text]));
2320
+ /** Stamp the projection onto whatever shots the board holds right now. */
2321
+ const project = (shots) => shots.map((shot) => {
2322
+ const lineIds = extracted.lineIdsByShotId[shot.id];
2323
+ const next = { ...shot };
2324
+ if (!lineIds || lineIds.length === 0) {
2325
+ delete next.script_line_ids;
2326
+ delete next.script_text_snapshot;
2327
+ return next;
2328
+ }
2329
+ next.script_line_ids = lineIds;
2330
+ next.script_text_snapshot = joinLineTexts(lineIds.map((id) => textByLineId.get(id) ?? ""));
2331
+ return next;
2332
+ });
2333
+ // Bound as a namespace so the `Script` / `Storyboard` row types imported at
2334
+ // the top of this file stay visible here.
2335
+ const models = await import("@nodetool-ai/models");
2336
+ const document = JSON.stringify(extracted.document);
2337
+ // The link is stamped only after the row it names exists (design §7), so a
2338
+ // failed second write leaves an unlinked-but-valid pair rather than a
2339
+ // half-link no validation would accept.
2340
+ let scriptId;
2341
+ let reused = false;
2342
+ const existing = relink && linkedScriptId
2343
+ ? await models.Script.findById(linkedScriptId)
2344
+ : null;
2345
+ if (existing && existing.user_id === context.userId) {
2346
+ const saved = await models.Script.updateFieldsIfUnchanged(existing.id, existing.updated_at, { document });
2347
+ if (!saved) {
2348
+ return {
2349
+ error: `Script ${existing.id} is being modified concurrently; nothing was written. Retry the call.`
2350
+ };
2351
+ }
2352
+ scriptId = saved.id;
2353
+ reused = true;
2354
+ }
2355
+ else {
2356
+ const name = isString(params["name"]) && params["name"]
2357
+ ? params["name"]
2358
+ : `${row.name} script`;
2359
+ const created = await models.Script.create({
2360
+ user_id: context.userId,
2361
+ project_id: row.project_id,
2362
+ name,
2363
+ document
2364
+ });
2365
+ scriptId = created.id;
2366
+ }
2367
+ const validation = validateScriptLink({ ...screenplay, script_id: scriptId, shots: project(doc.shots) }, extracted.document);
2368
+ if (validation.errors.length > 0) {
2369
+ return {
2370
+ error: `The projected link is invalid, so the board was left unlinked: ${validation.errors
2371
+ .map((issue) => issue.message)
2372
+ .join(" ")}`,
2373
+ script_id: scriptId
2374
+ };
2375
+ }
2376
+ for (let attempt = 0; attempt < CAS_ATTEMPTS; attempt++) {
2377
+ const current = await models.Storyboard.findById(row.id);
2378
+ if (!current)
2379
+ return { error: `Storyboard ${row.id} was not found.` };
2380
+ const currentDoc = current.toDocument();
2381
+ const shots = project(currentDoc.shots);
2382
+ const saved = await models.Storyboard.updateFieldsIfUnchanged(current.id, current.updated_at, {
2383
+ document: JSON.stringify({
2384
+ ...currentDoc,
2385
+ shots,
2386
+ screenplay: {
2387
+ ...boardScreenplay(current, currentDoc),
2388
+ script_id: scriptId
2389
+ }
2390
+ })
2391
+ }, { ops: [{ tool: "set_link", input: { script_id: scriptId } }] });
2392
+ if (!saved)
2393
+ continue;
2394
+ // Last write, and only now that the board carries the forward link: the
2395
+ // back-pointer never names a board that failed to link (design §7).
2396
+ const stamped = await stampScriptStoryboardId(scriptId, current.id, context.userId);
2397
+ if (isError(stamped)) {
2398
+ return {
2399
+ error: `Storyboard ${current.id} links script ${scriptId}, but the script's back-pointer could not be written: ${stamped.error} The board is valid; the script reads as unlinked until this is retried with relink: true.`,
2400
+ storyboard_id: current.id,
2401
+ script_id: scriptId
2402
+ };
2403
+ }
2404
+ return {
2405
+ ok: true,
2406
+ storyboard_id: current.id,
2407
+ script_id: scriptId,
2408
+ relinked: reused,
2409
+ line_count: lines.length,
2410
+ cast_count: extracted.document.cast.length,
2411
+ linked_shot_ids: shots
2412
+ .filter((shot) => (shot.script_line_ids ?? []).length > 0)
2413
+ .map((shot) => shot.id),
2414
+ warnings: validation.warnings.map((issue) => issue.message)
2415
+ };
2416
+ }
2417
+ return {
2418
+ error: `Storyboard ${row.id} is being modified concurrently, so script ${scriptId} was written but the board could not be linked to it. Retry with relink: true.`,
2419
+ script_id: scriptId
2420
+ };
2421
+ }
2422
+ };
2423
+ /** Every storyboard capability, in the order the tool file declared them. */
2424
+ /**
2425
+ * Delete a storyboard the caller owns.
2426
+ *
2427
+ * The ownership check and the version cascade are `Storyboard.deleteOwned`, the
2428
+ * same function the tRPC route calls — a delete is not a place for two copies
2429
+ * of one rule, and version rows outliving their document would be unreachable
2430
+ * garbage. Missing and not-yours are one answer.
2431
+ */
2432
+ const deleteStoryboard = {
2433
+ spec: deleteStoryboardSpec,
2434
+ impl: async (run, params) => {
2435
+ const userId = run.context.userId;
2436
+ if (!userId)
2437
+ return { error: "No user is bound to this session." };
2438
+ const { Storyboard } = await import("@nodetool-ai/models");
2439
+ const id = String(params["storyboard_id"]);
2440
+ const deleted = await Storyboard.deleteOwned(userId, id);
2441
+ return deleted
2442
+ ? { storyboard_id: id, deleted: true }
2443
+ : { error: `Storyboard ${id} was not found, or it is not yours.` };
2444
+ }
2445
+ };
2446
+ export const STORYBOARD_CAPABILITIES = [
2447
+ finishStoryboard,
2448
+ layoutStoryboard,
2449
+ previewStoryboardDesign,
2450
+ listStoryboards,
2451
+ createStoryboard,
2452
+ getStoryboard,
2453
+ renderStoryboardStills,
2454
+ renderStoryboardClips,
2455
+ reviseStoryboardClip,
2456
+ assembleStoryboardTimeline,
2457
+ editStoryboard,
2458
+ directStoryboard,
2459
+ extractScriptFromStoryboard,
2460
+ deleteStoryboard
2461
+ ];
2462
+ export const module = {
2463
+ module: "storyboards",
2464
+ exports: STORYBOARD_CAPABILITIES
2465
+ };
2466
+ export { finishStoryboard, layoutStoryboard, previewStoryboardDesign, listStoryboards, createStoryboard, getStoryboard, renderStoryboardStills, renderStoryboardClips, reviseStoryboardClip, assembleStoryboardTimeline, editStoryboard, directStoryboard, extractScriptFromStoryboard, deleteStoryboard };
2467
+ //# sourceMappingURL=storyboards.js.map