@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,1306 @@
1
+ /**
2
+ * Headless bridge for the Sketch / image editor tool-loop eval.
3
+ *
4
+ * The real frontend tools (`web/src/lib/tools/builtin/sketch.ts`) delegate to
5
+ * a `SketchAgentHandler` the live `SketchEditor` registers on the
6
+ * `sketchAgentBridge` under its document id — it mutates a layered raster
7
+ * document backed by real canvases and (for generation) dispatches actual
8
+ * image-generation jobs. This bridge reimplements the *effects* of those tools
9
+ * against an in-memory layer stack, so a model can drive the same
10
+ * `ui_sketch_*` tool surface headlessly.
11
+ *
12
+ * The pixels are real. Every raster layer is backed by an `@napi-rs/canvas`
13
+ * bitmap, and `ui_sketch_stroke` runs the editor's own brush/pencil/eraser
14
+ * engine — `@nodetool-ai/image-editor/painting.js`, the same module the browser
15
+ * calls — through `setPaintSurfaceFactory(createCanvas)`. So a headless run
16
+ * paints the strokes a live editor would, and `ui_sketch_get_layer_image`
17
+ * hands the model a PNG of its own work.
18
+ *
19
+ * What it does NOT fork is the tool *contract*: names and descriptions are
20
+ * copied verbatim from the builtin file, and parameters mirror its Zod
21
+ * shapes — minus the `sketch_id` param, since this bridge addresses a single
22
+ * implicit document rather than a registry of open editors.
23
+ *
24
+ * `ui_sketch_place_image` records the locator it is given without fetching the
25
+ * bytes — there is no asset store here — so it moves the layer's reference,
26
+ * not its pixels. `ui_sketch_render_to_asset` stays excluded: it needs an
27
+ * asset-upload service,
28
+ * which has no meaningful headless equivalent. To look at what a run drew, take
29
+ * the composite PNG off the bridge instead ({@link SketchToolBridge.compositePng},
30
+ * or {@link getLastSketchToolBridge} when the eval runner owns the instance).
31
+ */
32
+ import { createCanvas } from "@napi-rs/canvas";
33
+ import { DEFAULT_BRUSH_SETTINGS, DEFAULT_ERASER_SETTINGS, DEFAULT_PENCIL_SETTINGS, drawBrushStroke, drawEraserStroke, drawPencilStroke, setPaintSurfaceFactory } from "@nodetool-ai/image-editor/painting.js";
34
+ import { adjustOnContext, combineSelections, cropLayerInPlace, drawGradient, drawShape, ellipseSelection, featherSelection, fillOnContext, hasSelectionPixels, pickPixel, polygonSelection, rectSelection, readFullImage, requireRasterContext, transformRaster } from "@nodetool-ai/image-editor/raster.js";
35
+ import { z } from "zod";
36
+ import { parseWithTypeCoercion } from "@nodetool-ai/runtime";
37
+ import { IMAGE_USE_CASES, findImageUseCase } from "@nodetool-ai/protocol/api-schemas/sketch.js";
38
+ import { isString } from "../../utils/type-guards.js";
39
+ /**
40
+ * Point the paint core at skia. Idempotent and process-wide: the engine only
41
+ * uses it to allocate its brush-stamp scratch bitmaps, so every bridge in this
42
+ * process shares one factory.
43
+ */
44
+ setPaintSurfaceFactory((w, h) =>
45
+ // SAFETY: the engine only draws brush stamps on the surface, and a skia
46
+ // canvas provides every member `PaintSurface` names for that.
47
+ createCanvas(w, h));
48
+ /** The blend modes NodeTool's compositor ships, in menu order. */
49
+ export const SKETCH_BLEND_MODES = [
50
+ "normal",
51
+ "multiply",
52
+ "screen",
53
+ "overlay",
54
+ "darken",
55
+ "lighten",
56
+ "color-dodge",
57
+ "color-burn",
58
+ "hard-light",
59
+ "soft-light",
60
+ "difference",
61
+ "exclusion",
62
+ "add"
63
+ ];
64
+ const BLEND_MODES = SKETCH_BLEND_MODES;
65
+ /**
66
+ * NodeTool's blend-mode names onto Canvas2D `globalCompositeOperation`. All but
67
+ * two are spelled the same; `"normal"` is Canvas's default `"source-over"` and
68
+ * `"add"` is its additive `"lighter"`.
69
+ */
70
+ const CANVAS_COMPOSITE_OP = {
71
+ normal: "source-over",
72
+ multiply: "multiply",
73
+ screen: "screen",
74
+ overlay: "overlay",
75
+ darken: "darken",
76
+ lighten: "lighten",
77
+ "color-dodge": "color-dodge",
78
+ "color-burn": "color-burn",
79
+ "hard-light": "hard-light",
80
+ "soft-light": "soft-light",
81
+ difference: "difference",
82
+ exclusion: "exclusion",
83
+ add: "lighter"
84
+ };
85
+ const TOOLS = [
86
+ "move",
87
+ "transform",
88
+ "select",
89
+ "brush",
90
+ "pencil",
91
+ "eraser",
92
+ "eyedropper",
93
+ "fill",
94
+ "shape",
95
+ "blur",
96
+ "gradient",
97
+ "crop",
98
+ "clone_stamp",
99
+ "adjust",
100
+ "segment"
101
+ ];
102
+ const targetParam = z
103
+ .string()
104
+ .describe('Layer id, layer name (case-insensitive), or the literal "active" for the active layer.');
105
+ const blendModeEnum = z.enum(BLEND_MODES);
106
+ const toolEnum = z.enum(TOOLS);
107
+ const strokePointSchema = z.object({
108
+ x: z.number(),
109
+ y: z.number(),
110
+ pressure: z
111
+ .number()
112
+ .min(0)
113
+ .max(1)
114
+ .optional()
115
+ .describe("Pen pressure in [0,1]; omit for an even, mouse-like stroke.")
116
+ });
117
+ const strokeSchema = z.object({
118
+ target: targetParam
119
+ .optional()
120
+ .describe("Layer to paint on; defaults to the active layer."),
121
+ tool: z
122
+ .enum(["brush", "pencil", "eraser"])
123
+ .optional()
124
+ .describe("Paint engine (default `brush`). `pencil` is aliased hard-edged, `eraser` removes pixels."),
125
+ points: z
126
+ .array(strokePointSchema)
127
+ .min(1)
128
+ .describe("Polyline the stroke follows, in canvas pixels (x right, y down, origin top-left). Dabs are interpolated along each segment, so a smooth curve just needs enough points — roughly one every few pixels of arc."),
129
+ color: z
130
+ .string()
131
+ .optional()
132
+ .describe("Hex color; defaults to the foreground. Ignored by the eraser."),
133
+ size: z.number().min(0.1).optional().describe("Brush diameter in pixels."),
134
+ opacity: z.number().min(0).max(1).optional(),
135
+ hardness: z
136
+ .number()
137
+ .min(0)
138
+ .max(1)
139
+ .optional()
140
+ .describe("Edge hardness — 1 is crisp, 0 is a soft airbrushed falloff."),
141
+ closed: z
142
+ .boolean()
143
+ .optional()
144
+ .describe("Connect the last point back to the first, closing the shape.")
145
+ });
146
+ /**
147
+ * Normalize what a caller named as an image into the locator form the editor
148
+ * stores. A bare id becomes `asset://<id>`; a scheme the canvas cannot load is
149
+ * refused here the way the live bridge refuses it.
150
+ */
151
+ function normalizePlacedImage(value) {
152
+ const image = isString(value) ? value.trim() : "";
153
+ if (!image) {
154
+ throw new Error("place_image needs an `image`: an asset id, an asset:// locator, a data: URL, or an http(s) URL.");
155
+ }
156
+ if (/^(asset:\/\/|data:|https?:\/\/)/.test(image))
157
+ return image;
158
+ if (image.includes("://")) {
159
+ throw new Error(`image "${image}" uses a scheme the sketch canvas cannot load. Use an asset id, asset://, data:, or http(s)://.`);
160
+ }
161
+ return `asset://${image}`;
162
+ }
163
+ function tool(name, description, parameters, impl) {
164
+ return {
165
+ name,
166
+ description,
167
+ parameters,
168
+ execute: (args) => {
169
+ const parsed = parseWithTypeCoercion(parameters, args ?? {});
170
+ return impl(parsed);
171
+ }
172
+ };
173
+ }
174
+ /** The 2D context of a skia canvas, seen as the paint core's context. */
175
+ const paintContext = (canvas) => {
176
+ const ctx = canvas.getContext("2d");
177
+ if (!ctx)
178
+ throw new Error("Could not acquire a 2D context.");
179
+ return ctx;
180
+ };
181
+ /** Count pixels with a non-zero alpha — "how much of this bitmap is painted". */
182
+ function countPaintedPixels(canvas) {
183
+ if (!canvas)
184
+ return 0;
185
+ const { data } = paintContext(canvas).getImageData(0, 0, canvas.width, canvas.height);
186
+ let painted = 0;
187
+ for (let i = 3; i < data.length; i += 4) {
188
+ if (data[i] !== 0)
189
+ painted += 1;
190
+ }
191
+ return painted;
192
+ }
193
+ /**
194
+ * Run one polyline through a paint engine into a fresh doc-sized stroke buffer.
195
+ *
196
+ * This is the editor's own compositing model: dabs land at full alpha in a
197
+ * buffer, and the buffer goes onto the layer once — `source-over` at the
198
+ * stroke's opacity for brush/pencil, `destination-out` for the eraser, which is
199
+ * what makes a semi-transparent stroke a single even wash instead of a chain of
200
+ * overlapping dabs.
201
+ */
202
+ function renderStroke(options) {
203
+ const { width, height, tool, color, size, hardness, closed } = options;
204
+ const buffer = createCanvas(width, height);
205
+ const ctx = paintContext(buffer);
206
+ const dirty = { current: null };
207
+ const stampCache = new Map();
208
+ const stampState = {
209
+ hasStamped: false,
210
+ distanceToNextDab: 0
211
+ };
212
+ const points = [...options.points];
213
+ if (closed && points.length > 2) {
214
+ points.push(points[0]);
215
+ }
216
+ // The engine is opacity-agnostic here: the buffer carries the stroke at full
217
+ // strength and the caller applies opacity when it composites.
218
+ const brush = {
219
+ ...DEFAULT_BRUSH_SETTINGS,
220
+ color,
221
+ size,
222
+ hardness,
223
+ opacity: 1
224
+ };
225
+ const pencil = { ...DEFAULT_PENCIL_SETTINGS, color, size, opacity: 1 };
226
+ const eraser = { ...DEFAULT_ERASER_SETTINGS, size, opacity: 1 };
227
+ const segment = (from, to) => {
228
+ const pressure = to.pressure ?? from.pressure;
229
+ switch (tool) {
230
+ case "brush":
231
+ drawBrushStroke(from, to, brush, ctx, pressure, dirty, stampCache, stampState);
232
+ return;
233
+ case "pencil":
234
+ drawPencilStroke(from, to, pencil, ctx, pressure, dirty, stampState);
235
+ return;
236
+ case "eraser":
237
+ drawEraserStroke(from, to, eraser, brush, pencil, ctx, pressure, dirty, stampCache, stampState);
238
+ }
239
+ };
240
+ if (points.length === 1) {
241
+ // A one-point stroke is a single dab, not a no-op.
242
+ segment(points[0], points[0]);
243
+ }
244
+ else {
245
+ for (let i = 1; i < points.length; i += 1) {
246
+ segment(points[i - 1], points[i]);
247
+ }
248
+ }
249
+ return { buffer, dirty };
250
+ }
251
+ let lastCreatedBridge = null;
252
+ /**
253
+ * The most recently created sketch bridge, or null before the first one.
254
+ *
255
+ * `ToolLoopEvalCase.createBridge` builds the bridge inside the runner, so a
256
+ * caller that wants the drawing afterwards has no handle on it. Cases run
257
+ * sequentially, so after a single-case run this is that run's bridge — enough
258
+ * to write the composite PNG somewhere a human can look at it.
259
+ */
260
+ export function getLastSketchToolBridge() {
261
+ return lastCreatedBridge;
262
+ }
263
+ /**
264
+ * Build an in-memory sketch/image-editor bridge whose tools share the
265
+ * `ui_sketch_*` contract but run headlessly, against a layer stack of real
266
+ * skia bitmaps driven by the editor's own paint engine.
267
+ */
268
+ export function createSketchToolBridge(initial = {}) {
269
+ const name = initial.name ?? "Untitled";
270
+ let width = initial.width ?? 1024;
271
+ let height = initial.height ?? 1024;
272
+ let foregroundColor = "#000000";
273
+ let backgroundColor = "#ffffff";
274
+ let activeTool = "brush";
275
+ let selection = null;
276
+ let setup;
277
+ let layerSeq = 0;
278
+ const nextLayerId = () => `layer_${++layerSeq}`;
279
+ const makeLayer = (id, layerName, type) => ({
280
+ id,
281
+ name: layerName,
282
+ type,
283
+ visible: true,
284
+ opacity: 1,
285
+ blendMode: "normal",
286
+ locked: false,
287
+ alphaLock: false,
288
+ parentId: null,
289
+ hasBinding: false,
290
+ strokeCount: 0,
291
+ raster: null
292
+ });
293
+ const layers = [];
294
+ let activeLayerId = null;
295
+ if (initial.layers && initial.layers.length > 0) {
296
+ for (const l of initial.layers) {
297
+ const id = nextLayerId();
298
+ layers.push(makeLayer(id, l.name, l.type ?? "raster"));
299
+ }
300
+ activeLayerId = layers[layers.length - 1].id;
301
+ }
302
+ else {
303
+ const id = nextLayerId();
304
+ layers.push(makeLayer(id, "Background", "raster"));
305
+ activeLayerId = id;
306
+ }
307
+ const indexOf = (id) => layers.findIndex((l) => l.id === id);
308
+ const resolveTarget = (target) => {
309
+ if (target === "active") {
310
+ if (!activeLayerId)
311
+ throw new Error("No active layer.");
312
+ const l = layers.find((x) => x.id === activeLayerId);
313
+ if (!l)
314
+ throw new Error("No active layer.");
315
+ return l;
316
+ }
317
+ const byId = layers.find((l) => l.id === target);
318
+ if (byId)
319
+ return byId;
320
+ const lower = target.toLowerCase();
321
+ const byName = layers.find((l) => l.name.toLowerCase() === lower);
322
+ if (byName)
323
+ return byName;
324
+ throw new Error(`No layer found matching "${target}".`);
325
+ };
326
+ const serialize = (l) => {
327
+ const { raster: _raster, ...view } = l;
328
+ return view;
329
+ };
330
+ /**
331
+ * Materialize this layer's bitmap at the current canvas size, applying its
332
+ * `fillColor` the first time. A layer that was resized while empty is
333
+ * reallocated rather than kept at the old size.
334
+ */
335
+ const ensureRaster = (layer) => {
336
+ const existing = layer.raster;
337
+ if (existing && existing.width === width && existing.height === height) {
338
+ return existing;
339
+ }
340
+ const next = createCanvas(width, height);
341
+ const ctx = paintContext(next);
342
+ if (existing) {
343
+ // Resize keeps pixels; anything past the new bounds is clipped.
344
+ ctx.drawImage(existing, 0, 0);
345
+ }
346
+ else if (layer.fillColor) {
347
+ ctx.fillStyle = layer.fillColor;
348
+ ctx.fillRect(0, 0, width, height);
349
+ }
350
+ layer.raster = next;
351
+ return next;
352
+ };
353
+ /** Composite the given layers bottom-to-top honoring visibility, opacity and blend. */
354
+ const compositeOf = (source) => {
355
+ const out = createCanvas(width, height);
356
+ const ctx = paintContext(out);
357
+ for (const layer of source) {
358
+ if (!layer.visible || layer.opacity <= 0 || !layer.raster)
359
+ continue;
360
+ ctx.save();
361
+ ctx.globalAlpha = layer.opacity;
362
+ ctx.globalCompositeOperation = CANVAS_COMPOSITE_OP[layer.blendMode];
363
+ ctx.drawImage(ensureRaster(layer), 0, 0);
364
+ ctx.restore();
365
+ }
366
+ return out;
367
+ };
368
+ const composite = () => compositeOf(layers);
369
+ const tools = [
370
+ tool("ui_sketch_get_state", "Read the specified image document: name, canvas size, the active layer, foreground/background color, the active tool, whether a pixel selection is active, and every layer (id, name, type, visibility, opacity, blend mode, lock state, and any generation binding prompt/provider/model/status). Call this first to discover what's on the canvas and to get the ids/names other image-editor tools need.", z.object({}), async () => {
371
+ return {
372
+ ok: true,
373
+ documentId: null,
374
+ name,
375
+ width,
376
+ height,
377
+ activeLayerId,
378
+ foregroundColor,
379
+ backgroundColor,
380
+ activeTool,
381
+ hasSelection: hasSelectionPixels(selection),
382
+ layers: layers.map((l, i) => ({ ...serialize(l), index: i }))
383
+ };
384
+ }),
385
+ tool("ui_sketch_add_layer", "Add a new layer above the active one. `type` is raster (default) or mask. Optionally give it a `name` and a `fillColor` (hex) to fill it with a solid color.", z.object({
386
+ name: z.string().optional(),
387
+ type: z.enum(["raster", "mask"]).optional(),
388
+ fillColor: z
389
+ .string()
390
+ .optional()
391
+ .describe("Hex color to fill the new layer with, e.g. #ff0000.")
392
+ }), async ({ name: layerName, type, fillColor }) => {
393
+ const id = nextLayerId();
394
+ const idx = activeLayerId ? indexOf(activeLayerId) + 1 : layers.length;
395
+ const layer = makeLayer(id, layerName ?? `Layer ${layerSeq}`, type ?? "raster");
396
+ if (isString(fillColor) && fillColor) {
397
+ layer.fillColor = fillColor;
398
+ // A fill is pixels, not a label — lay them down now.
399
+ ensureRaster(layer);
400
+ }
401
+ layers.splice(idx, 0, layer);
402
+ activeLayerId = id;
403
+ return { ok: true, layer: serialize(layer) };
404
+ }),
405
+ tool("ui_sketch_remove_layer", "Delete a layer from the specified image document.", z.object({ target: targetParam }), async ({ target }) => {
406
+ const layer = resolveTarget(target);
407
+ const idx = indexOf(layer.id);
408
+ layers.splice(idx, 1);
409
+ if (activeLayerId === layer.id) {
410
+ const neighbor = layers[idx] ?? layers[idx - 1] ?? null;
411
+ activeLayerId = neighbor ? neighbor.id : null;
412
+ }
413
+ return { ok: true, deleted: serialize(layer) };
414
+ }),
415
+ tool("ui_sketch_duplicate_layer", "Duplicate a layer. The copy is inserted directly above the source.", z.object({ target: targetParam }), async ({ target }) => {
416
+ const source = resolveTarget(target);
417
+ const id = nextLayerId();
418
+ const copy = {
419
+ ...source,
420
+ id,
421
+ name: `${source.name} copy`,
422
+ raster: null
423
+ };
424
+ if (source.raster) {
425
+ // Own bitmap, not a shared reference — painting the copy must not
426
+ // paint the original.
427
+ const dup = createCanvas(source.raster.width, source.raster.height);
428
+ paintContext(dup).drawImage(source.raster, 0, 0);
429
+ copy.raster = dup;
430
+ }
431
+ layers.splice(indexOf(source.id) + 1, 0, copy);
432
+ activeLayerId = id;
433
+ return { ok: true, layer: serialize(copy) };
434
+ }),
435
+ tool("ui_sketch_select_layer", "Make a layer the active layer (subsequent edits target it).", z.object({ target: targetParam }), async ({ target }) => {
436
+ const layer = resolveTarget(target);
437
+ activeLayerId = layer.id;
438
+ return { ok: true, active: serialize(layer) };
439
+ }),
440
+ tool("ui_sketch_set_layer_props", "Change a layer's properties: `name`, `visible`, `opacity` (0..1), `blendMode`, `locked`, or `alphaLock` (lock transparency). Omit a field to leave it unchanged.", z.object({
441
+ target: targetParam,
442
+ name: z.string().optional(),
443
+ visible: z.boolean().optional(),
444
+ opacity: z.number().min(0).max(1).optional(),
445
+ blendMode: blendModeEnum.optional(),
446
+ locked: z.boolean().optional(),
447
+ alphaLock: z.boolean().optional()
448
+ }), async ({ target, ...patch }) => {
449
+ const layer = resolveTarget(target);
450
+ if (patch.name !== undefined)
451
+ layer.name = patch.name;
452
+ if (patch.visible !== undefined)
453
+ layer.visible = patch.visible;
454
+ if (patch.opacity !== undefined)
455
+ layer.opacity = patch.opacity;
456
+ if (patch.blendMode !== undefined)
457
+ layer.blendMode = patch.blendMode;
458
+ if (patch.locked !== undefined)
459
+ layer.locked = patch.locked;
460
+ if (patch.alphaLock !== undefined)
461
+ layer.alphaLock = patch.alphaLock;
462
+ return { ok: true, layer: serialize(layer) };
463
+ }),
464
+ tool("ui_sketch_reorder_layer", "Move a layer up or down in the stack. `up` moves it toward the top (composited above its neighbors); `down` moves it toward the bottom.", z.object({
465
+ target: targetParam,
466
+ direction: z.enum(["up", "down"])
467
+ }), async ({ target, direction }) => {
468
+ const layer = resolveTarget(target);
469
+ const idx = indexOf(layer.id);
470
+ const swapWith = direction === "up" ? idx + 1 : idx - 1;
471
+ if (swapWith >= 0 && swapWith < layers.length) {
472
+ layers[idx] = layers[swapWith];
473
+ layers[swapWith] = layer;
474
+ }
475
+ return { ok: true, layer: serialize(layer) };
476
+ }),
477
+ tool("ui_sketch_merge_down", "Merge a layer into the layer directly below it, replacing the two with a single flattened raster layer.", z.object({ target: targetParam }), async ({ target }) => {
478
+ const layer = resolveTarget(target);
479
+ const idx = indexOf(layer.id);
480
+ if (idx <= 0) {
481
+ return { ok: true, layer: null };
482
+ }
483
+ const below = layers[idx - 1];
484
+ const merged = makeLayer(nextLayerId(), below.name, "raster");
485
+ merged.raster = compositeOf([below, layer]);
486
+ layers.splice(idx - 1, 2, merged);
487
+ activeLayerId = merged.id;
488
+ return { ok: true, layer: serialize(merged) };
489
+ }),
490
+ tool("ui_sketch_flatten_visible", "Flatten all visible layers into a single raster layer. Returns the resulting layer.", z.object({}), async () => {
491
+ const visibleIndices = layers
492
+ .map((l, i) => (l.visible ? i : -1))
493
+ .filter((i) => i >= 0);
494
+ const insertAt = visibleIndices.length > 0 ? visibleIndices[0] : layers.length;
495
+ const removeCount = visibleIndices.length;
496
+ const flattened = makeLayer(nextLayerId(), "Flattened", "raster");
497
+ flattened.raster = compositeOf(visibleIndices.map((i) => layers[i]));
498
+ if (removeCount > 0) {
499
+ for (let i = layers.length - 1; i >= 0; i -= 1) {
500
+ if (visibleIndices.includes(i))
501
+ layers.splice(i, 1);
502
+ }
503
+ layers.splice(insertAt, 0, flattened);
504
+ }
505
+ else {
506
+ layers.push(flattened);
507
+ }
508
+ activeLayerId = flattened.id;
509
+ return { ok: true, layer: serialize(flattened) };
510
+ }),
511
+ tool("ui_sketch_generate", 'Generate imagery onto a new layer. `kind` is text-to-image (from a prompt) or image-to-image (transform an existing layer — pass `sourceLayer`). Provide `provider` and `model` (discover valid ones with the model-search tool); when omitted the last-used image model is reused. Optional `width`/`height` (default the canvas size), `aspectRatio` (e.g. "16:9"), and `resolution` (e.g. "1K") shape the output for models that use size enums. Generation starts immediately unless `autoGenerate` is false. Poll ui_sketch_get_state for the layer\'s binding status.', z.object({
512
+ kind: z.enum(["text-to-image", "image-to-image"]),
513
+ prompt: z.string(),
514
+ name: z.string().optional(),
515
+ sourceLayer: targetParam
516
+ .optional()
517
+ .describe("For image-to-image: the layer to transform."),
518
+ provider: z.string().optional(),
519
+ model: z.string().optional(),
520
+ width: z.number().optional(),
521
+ height: z.number().optional(),
522
+ aspectRatio: z.string().optional(),
523
+ resolution: z.string().optional(),
524
+ seed: z
525
+ .number()
526
+ .int()
527
+ .optional()
528
+ .describe("Sampling seed. Call once per variation with the same prompt, size and model and a different seed to get a set to choose from."),
529
+ autoGenerate: z.boolean().optional()
530
+ }), async (args) => {
531
+ const kind = args.kind;
532
+ const prompt = args.prompt;
533
+ if (kind === "image-to-image" && args.sourceLayer !== undefined) {
534
+ // Throws when unresolved.
535
+ resolveTarget(args.sourceLayer);
536
+ }
537
+ const id = nextLayerId();
538
+ const idx = activeLayerId ? indexOf(activeLayerId) + 1 : layers.length;
539
+ const generationStarted = args.autoGenerate !== false;
540
+ const layer = {
541
+ ...makeLayer(id, args.name ?? `Generated ${layerSeq}`, "raster"),
542
+ hasBinding: true,
543
+ bindingKind: kind,
544
+ prompt,
545
+ provider: args.provider,
546
+ model: args.model,
547
+ seed: args.seed,
548
+ bindingStatus: generationStarted ? "generating" : "idle"
549
+ };
550
+ layers.splice(idx, 0, layer);
551
+ activeLayerId = id;
552
+ const result = {
553
+ ok: true,
554
+ layer: serialize(layer),
555
+ generationStarted,
556
+ visual_output_verified: false,
557
+ note: "Headless replay records the generation request only. No provider ran and no generated pixels were verified."
558
+ };
559
+ if (!generationStarted) {
560
+ result.note = "Generation not started (autoGenerate=false). No generated pixels were verified.";
561
+ }
562
+ return result;
563
+ }),
564
+ tool("ui_sketch_set_setup", "Write the guided image flow's state onto the image document: the `brief` (what the picture should be), the `use_case` (product, portrait, key-art, social, logo, concept, texture), how many `variations` to render, and the `stage` the flow resumes at. Nothing is rendered here — this is the step-by-step state the Image flow reads, and a document whose stage is `done` opens straight in the editor. Omit a field to leave it unchanged.", z.object({
565
+ brief: z.string().optional(),
566
+ use_case: z
567
+ .string()
568
+ .optional()
569
+ .describe("One of: product, portrait, key-art, social, logo, concept, texture."),
570
+ variations: z.number().int().min(1).max(8).optional(),
571
+ stage: z
572
+ .enum(["idea", "useCase", "review", "look", "done"])
573
+ .optional()
574
+ .describe("Where the flow resumes: idea, useCase, review, look, or done (the editor).")
575
+ }), async (args) => {
576
+ const useCase = args.use_case;
577
+ if (useCase !== undefined && !findImageUseCase(useCase)) {
578
+ throw new Error(`use_case must be one of ${IMAGE_USE_CASES.map((entry) => entry.id).join(", ")}.`);
579
+ }
580
+ const next = { ...(setup ?? {}) };
581
+ if (args.brief !== undefined)
582
+ next.brief = args.brief;
583
+ if (useCase !== undefined) {
584
+ next.use_case = useCase;
585
+ const picked = findImageUseCase(useCase);
586
+ if (picked) {
587
+ next.variations ??= picked.defaultVariations;
588
+ width = picked.defaultSize.width;
589
+ height = picked.defaultSize.height;
590
+ // Re-cut the bitmaps, as ui_sketch_resize_canvas does, so the
591
+ // reported pixel counts describe the canvas the flow just chose.
592
+ for (const layer of layers) {
593
+ if (layer.raster)
594
+ ensureRaster(layer);
595
+ }
596
+ }
597
+ }
598
+ if (args.variations !== undefined) {
599
+ next.variations = args.variations;
600
+ }
601
+ if (args.stage !== undefined)
602
+ next.stage = args.stage;
603
+ setup = next;
604
+ return { ok: true, setup: next };
605
+ }),
606
+ tool("ui_sketch_place_image", "Put an existing image onto a layer — an asset from the library, or a URL. `image` is an asset id (find one with the asset tools), an asset:// locator, a data: URL, or an http(s) URL. Omit `target` to place it on a new layer, or name a layer to replace what it shows. The image is drawn at its own size from (`x`, `y`) unless `width`/`height` say otherwise. This is how a picture gets onto a canvas; ui_sketch_generate makes a new one from a prompt instead.", z.object({
607
+ image: z.string(),
608
+ target: targetParam.optional(),
609
+ name: z.string().optional(),
610
+ x: z.number().optional(),
611
+ y: z.number().optional(),
612
+ width: z.number().optional(),
613
+ height: z.number().optional()
614
+ }), async (args) => {
615
+ const image = normalizePlacedImage(args["image"]);
616
+ const layer = isString(args["target"]) && args["target"]
617
+ ? resolveTarget(args["target"])
618
+ : (() => {
619
+ const id = nextLayerId();
620
+ const created = makeLayer(id, (isString(args["name"]) && args["name"]) || `Layer ${layerSeq}`, "raster");
621
+ const idx = activeLayerId
622
+ ? indexOf(activeLayerId) + 1
623
+ : layers.length;
624
+ layers.splice(idx, 0, created);
625
+ activeLayerId = id;
626
+ return created;
627
+ })();
628
+ const num = (value, fallback) => typeof value === "number" && Number.isFinite(value)
629
+ ? value
630
+ : fallback;
631
+ layer.imageRef = image;
632
+ layer.imageBounds = {
633
+ x: num(args["x"], 0),
634
+ y: num(args["y"], 0),
635
+ width: num(args["width"], width),
636
+ height: num(args["height"], height)
637
+ };
638
+ activeLayerId = layer.id;
639
+ return {
640
+ ok: true,
641
+ layer: serialize(layer),
642
+ visual_output_verified: false,
643
+ note: "Headless replay records the image locator only. Asset bytes were not loaded or verified."
644
+ };
645
+ }),
646
+ tool("ui_sketch_set_color", "Set the specified image document's foreground and/or background color (hex). The foreground color is used by the brush, fill, and shape tools.", z.object({
647
+ foreground: z.string().optional(),
648
+ background: z.string().optional()
649
+ }), async ({ foreground, background }) => {
650
+ const result = {};
651
+ if (foreground !== undefined) {
652
+ foregroundColor = foreground;
653
+ result.foreground = foregroundColor;
654
+ }
655
+ if (background !== undefined) {
656
+ backgroundColor = background;
657
+ result.background = backgroundColor;
658
+ }
659
+ return { ok: true, ...result };
660
+ }),
661
+ tool("ui_sketch_set_tool", "Select the active tool in the specified image document (e.g. brush, eraser, fill, select, move, transform, crop). Drives which tool the editor's pointer uses.", z.object({ tool: toolEnum }), async ({ tool: nextTool }) => {
662
+ activeTool = nextTool;
663
+ return { ok: true, activeTool };
664
+ }),
665
+ tool("ui_sketch_stroke", "Paint one or more brush/pencil/eraser strokes onto raster layers — the actual drawing tool. Each stroke is a polyline of canvas-pixel points that the paint engine interpolates into a smooth line, with its own color, size, opacity and hardness. Pass several strokes in one call to draw a whole figure at once; the batch commits as a single undo step. Build curves by sampling points along them (a circle is ~24 points), and put separate parts of a drawing on separate layers so they can be edited independently. Call ui_sketch_get_layer_image afterwards to see what you drew.", z.object({ strokes: z.array(strokeSchema).min(1) }), async ({ strokes }) => {
666
+ const batch = strokes;
667
+ // Resolve and validate every target before painting anything, so a bad
668
+ // stroke in the batch leaves no half-drawn figure behind.
669
+ const resolved = batch.map((stroke) => {
670
+ const layer = resolveTarget(stroke.target ?? "active");
671
+ if (layer.locked) {
672
+ throw new Error(`Layer "${layer.name}" is locked — unlock it with ui_sketch_set_layer_props before painting.`);
673
+ }
674
+ if (layer.type !== "raster") {
675
+ throw new Error(`Layer "${layer.name}" is a ${layer.type} layer; strokes only paint on raster layers.`);
676
+ }
677
+ return { layer, stroke };
678
+ });
679
+ const results = resolved.map(({ layer, stroke }) => {
680
+ const strokeTool = stroke.tool ?? "brush";
681
+ const opacity = stroke.opacity ?? 1;
682
+ const { buffer, dirty } = renderStroke({
683
+ width,
684
+ height,
685
+ tool: strokeTool,
686
+ points: stroke.points,
687
+ color: stroke.color ?? foregroundColor,
688
+ size: stroke.size ?? DEFAULT_BRUSH_SETTINGS.size,
689
+ hardness: stroke.hardness ?? DEFAULT_BRUSH_SETTINGS.hardness,
690
+ closed: stroke.closed ?? false
691
+ });
692
+ const ctx = paintContext(ensureRaster(layer));
693
+ ctx.save();
694
+ ctx.globalAlpha = opacity;
695
+ ctx.globalCompositeOperation =
696
+ strokeTool === "eraser" ? "destination-out" : "source-over";
697
+ ctx.drawImage(buffer, 0, 0);
698
+ ctx.restore();
699
+ layer.strokeCount += 1;
700
+ const box = dirty.current;
701
+ const bounds = box
702
+ ? (() => {
703
+ const x = Math.max(0, Math.min(width, box.minX));
704
+ const y = Math.max(0, Math.min(height, box.minY));
705
+ const right = Math.max(0, Math.min(width, box.maxX));
706
+ const bottom = Math.max(0, Math.min(height, box.maxY));
707
+ return right > x && bottom > y
708
+ ? { x, y, width: right - x, height: bottom - y }
709
+ : null;
710
+ })()
711
+ : null;
712
+ return {
713
+ layerId: layer.id,
714
+ layerName: layer.name,
715
+ tool: strokeTool,
716
+ points: stroke.points.length,
717
+ bounds
718
+ };
719
+ });
720
+ return { ok: true, strokes: results };
721
+ }),
722
+ tool("ui_sketch_resize_canvas", "Resize the canvas (artboard) to `width` x `height` pixels. Existing layers keep their pixels; content outside the new bounds is clipped.", z.object({
723
+ width: z.number().min(1),
724
+ height: z.number().min(1)
725
+ }), async ({ width: w, height: h }) => {
726
+ width = Math.max(1, Math.round(w));
727
+ height = Math.max(1, Math.round(h));
728
+ // Re-cut every existing bitmap now rather than on next use, so the
729
+ // reported pixel counts always describe the current canvas.
730
+ for (const layer of layers) {
731
+ if (layer.raster)
732
+ ensureRaster(layer);
733
+ }
734
+ return { ok: true, width, height };
735
+ }),
736
+ tool("ui_sketch_selection", "Shape the pixel selection: `all` selects the whole canvas, `invert` inverts the current selection, `clear` deselects. Inpainting and selection-scoped edits act within this selection.", z.object({ op: z.enum(["all", "clear", "invert"]) }), async ({ op }) => {
737
+ if (op === "all") {
738
+ selection = rectSelection(width, height, 0, 0, width, height);
739
+ }
740
+ else if (op === "clear") {
741
+ selection = null;
742
+ }
743
+ else if (!selection) {
744
+ selection = rectSelection(width, height, 0, 0, width, height);
745
+ }
746
+ else {
747
+ const all = rectSelection(width, height, 0, 0, width, height);
748
+ selection = combineSelections(all, selection, "subtract");
749
+ }
750
+ return { ok: true, hasSelection: hasSelectionPixels(selection) };
751
+ }),
752
+ tool("ui_sketch_fill", "Flood fill a connected region on a raster layer starting from canvas pixel coordinates (x, y) with color and tolerance.", z.object({
753
+ target: targetParam.optional(),
754
+ x: z.number(),
755
+ y: z.number(),
756
+ color: z.string().optional(),
757
+ tolerance: z.number().min(0).max(255).optional(),
758
+ contiguous: z.boolean().optional()
759
+ }), async ({ target, x, y, color, tolerance, contiguous }) => {
760
+ const layer = resolveTarget(target ?? "active");
761
+ if (layer.locked) {
762
+ throw new Error(`Layer "${layer.name}" is locked and cannot take pixels.`);
763
+ }
764
+ if (layer.type !== "raster") {
765
+ throw new Error(`Layer "${layer.name}" is a ${layer.type} layer; fill only writes raster layers.`);
766
+ }
767
+ const fillColor = color ?? foregroundColor;
768
+ fillOnContext(requireRasterContext(paintContext(ensureRaster(layer))), x, y, {
769
+ color: fillColor,
770
+ tolerance: tolerance ?? 16,
771
+ contiguous: contiguous ?? true
772
+ });
773
+ return {
774
+ ok: true,
775
+ layerId: layer.id,
776
+ layerName: layer.name,
777
+ x,
778
+ y,
779
+ color: fillColor
780
+ };
781
+ }),
782
+ tool("ui_sketch_gradient", "Draw a linear or radial gradient across a raster layer from start to end points.", z.object({
783
+ target: targetParam.optional(),
784
+ type: z.enum(["linear", "radial"]),
785
+ start: z.object({ x: z.number(), y: z.number() }),
786
+ end: z.object({ x: z.number(), y: z.number() }),
787
+ stops: z
788
+ .array(z.object({ offset: z.number().min(0).max(1), color: z.string() }))
789
+ .optional()
790
+ }), async ({ target, type, start, end, stops }) => {
791
+ const layer = resolveTarget(target ?? "active");
792
+ if (layer.locked || layer.type !== "raster") {
793
+ throw new Error(`Layer "${layer.name}" cannot take a gradient.`);
794
+ }
795
+ const ramp = stops ?? [
796
+ { offset: 0, color: foregroundColor },
797
+ { offset: 1, color: backgroundColor }
798
+ ];
799
+ if (ramp.length < 2) {
800
+ throw new Error("A gradient needs at least two color stops.");
801
+ }
802
+ drawGradient(requireRasterContext(paintContext(ensureRaster(layer))), type, start, end, ramp);
803
+ return { ok: true, layerId: layer.id, layerName: layer.name, type };
804
+ }),
805
+ tool("ui_sketch_draw_shape", "Draw geometric shapes (rect, ellipse, line, arrow, polygon, star) with optional fill, stroke, and corner radius.", z.object({
806
+ target: targetParam.optional(),
807
+ shape: z.enum(["rect", "ellipse", "line", "arrow", "polygon", "star"]),
808
+ x: z.number(),
809
+ y: z.number(),
810
+ width: z.number().positive().optional(),
811
+ height: z.number().positive().optional(),
812
+ fill: z.string().optional(),
813
+ stroke: z.string().optional(),
814
+ strokeWidth: z.number().min(0).optional(),
815
+ cornerRadius: z.number().min(0).optional(),
816
+ points: z.number().int().min(3).optional(),
817
+ innerRadius: z.number().optional()
818
+ }), async (args) => {
819
+ const layer = resolveTarget(args.target ?? "active");
820
+ if (layer.locked || layer.type !== "raster") {
821
+ throw new Error(`Layer "${layer.name}" cannot take a shape.`);
822
+ }
823
+ const bounds = drawShape(requireRasterContext(paintContext(ensureRaster(layer))), {
824
+ shape: args.shape,
825
+ x: args.x,
826
+ y: args.y,
827
+ width: args.width,
828
+ height: args.height,
829
+ fill: args.fill,
830
+ stroke: args.stroke,
831
+ strokeWidth: args.strokeWidth,
832
+ cornerRadius: args.cornerRadius,
833
+ points: args.points,
834
+ innerRadius: args.innerRadius
835
+ });
836
+ return {
837
+ ok: true,
838
+ layerId: layer.id,
839
+ layerName: layer.name,
840
+ shape: args.shape,
841
+ bounds
842
+ };
843
+ }),
844
+ tool("ui_sketch_set_selection_shape", "Define or modify a pixel selection mask using geometric shapes (rect, ellipse) or polylines (lasso, polygon).", z.object({
845
+ mode: z.enum(["replace", "add", "subtract", "intersect"]).optional(),
846
+ shape: z.enum(["rect", "ellipse", "lasso", "polygon"]),
847
+ bounds: z
848
+ .object({
849
+ x: z.number(),
850
+ y: z.number(),
851
+ width: z.number(),
852
+ height: z.number()
853
+ })
854
+ .optional(),
855
+ points: z.array(z.object({ x: z.number(), y: z.number() })).optional(),
856
+ feather: z.number().min(0).optional()
857
+ }), async ({ mode, shape, bounds, points, feather }) => {
858
+ const op = mode ?? "replace";
859
+ let overlay;
860
+ if (shape === "rect" || shape === "ellipse") {
861
+ const box = bounds;
862
+ if (!box) {
863
+ throw new Error(`Shape "${shape}" needs a bounds box.`);
864
+ }
865
+ overlay =
866
+ shape === "rect"
867
+ ? rectSelection(width, height, box.x, box.y, box.width, box.height)
868
+ : ellipseSelection(width, height, box.x, box.y, box.width, box.height);
869
+ }
870
+ else {
871
+ const pts = points;
872
+ if (!pts || pts.length < 3) {
873
+ throw new Error(`Shape "${shape}" needs at least three points.`);
874
+ }
875
+ overlay = polygonSelection(width, height, pts);
876
+ }
877
+ selection = combineSelections(selection, overlay, op);
878
+ if (feather && feather > 0) {
879
+ selection = featherSelection(selection, feather);
880
+ }
881
+ return {
882
+ ok: true,
883
+ hasSelection: hasSelectionPixels(selection),
884
+ shape,
885
+ mode: op
886
+ };
887
+ }),
888
+ tool("ui_sketch_transform", "Translate, scale, rotate, or flip a layer's raster pixels or active selection.", z.object({
889
+ target: targetParam.optional(),
890
+ dx: z.number().optional(),
891
+ dy: z.number().optional(),
892
+ scaleX: z.number().optional(),
893
+ scaleY: z.number().optional(),
894
+ rotation: z.number().optional(),
895
+ flipH: z.boolean().optional(),
896
+ flipV: z.boolean().optional()
897
+ }), async (args) => {
898
+ const layer = resolveTarget(args.target ?? "active");
899
+ if (layer.locked || layer.type !== "raster") {
900
+ throw new Error(`Layer "${layer.name}" cannot be transformed.`);
901
+ }
902
+ const dx = args.dx ?? 0;
903
+ const dy = args.dy ?? 0;
904
+ const scaleX = args.scaleX ?? 1;
905
+ const scaleY = args.scaleY ?? 1;
906
+ const rotation = args.rotation ?? 0;
907
+ const flipH = args.flipH ?? false;
908
+ const flipV = args.flipV ?? false;
909
+ transformRaster(requireRasterContext(paintContext(ensureRaster(layer))), {
910
+ dx,
911
+ dy,
912
+ scaleX,
913
+ scaleY,
914
+ rotation,
915
+ flipH,
916
+ flipV
917
+ });
918
+ return {
919
+ ok: true,
920
+ layerId: layer.id,
921
+ layerName: layer.name,
922
+ dx,
923
+ dy,
924
+ scaleX,
925
+ scaleY,
926
+ rotation,
927
+ flipH,
928
+ flipV
929
+ };
930
+ }),
931
+ tool("ui_sketch_adjust_layer", "Apply tone and color adjustments (brightness, contrast, exposure, saturation, hue, blur) to a layer.", z.object({
932
+ target: targetParam.optional(),
933
+ brightness: z.number().min(-1).max(1).optional(),
934
+ contrast: z.number().min(-1).max(1).optional(),
935
+ exposure: z.number().min(-2).max(2).optional(),
936
+ saturation: z.number().min(-1).max(1).optional(),
937
+ hue: z.number().min(-180).max(180).optional(),
938
+ blur: z.number().min(0).max(100).optional()
939
+ }), async (args) => {
940
+ const layer = resolveTarget(args.target ?? "active");
941
+ if (layer.locked || layer.type !== "raster") {
942
+ throw new Error(`Layer "${layer.name}" cannot be adjusted.`);
943
+ }
944
+ const adjustments = {};
945
+ if (args.brightness !== undefined) {
946
+ adjustments.brightness = args.brightness;
947
+ }
948
+ if (args.contrast !== undefined) {
949
+ adjustments.contrast = args.contrast;
950
+ }
951
+ if (args.exposure !== undefined) {
952
+ adjustments.exposure = args.exposure;
953
+ }
954
+ if (args.saturation !== undefined) {
955
+ adjustments.saturation = args.saturation;
956
+ }
957
+ if (args.hue !== undefined)
958
+ adjustments.hue = args.hue;
959
+ if (args.blur !== undefined)
960
+ adjustments.blur = args.blur;
961
+ if (Object.keys(adjustments).length === 0) {
962
+ throw new Error("Provide at least one adjustment.");
963
+ }
964
+ adjustOnContext(requireRasterContext(paintContext(ensureRaster(layer))), adjustments);
965
+ return {
966
+ ok: true,
967
+ layerId: layer.id,
968
+ layerName: layer.name,
969
+ adjustments
970
+ };
971
+ }),
972
+ tool("ui_sketch_crop", "Crop the document canvas or a specific layer to a defined bounding box (x, y, width, height).", z.object({
973
+ target: targetParam.nullable().optional(),
974
+ x: z.number(),
975
+ y: z.number(),
976
+ width: z.number().positive(),
977
+ height: z.number().positive()
978
+ }), async ({ target, x, y, width: cw, height: ch }) => {
979
+ const box = {
980
+ x: Math.round(x),
981
+ y: Math.round(y),
982
+ width: Math.round(cw),
983
+ height: Math.round(ch)
984
+ };
985
+ if (target == null) {
986
+ for (const layer of layers) {
987
+ if (!layer.raster) {
988
+ continue;
989
+ }
990
+ const next = createCanvas(box.width, box.height);
991
+ paintContext(next).drawImage(layer.raster, -box.x, -box.y);
992
+ layer.raster = next;
993
+ }
994
+ width = box.width;
995
+ height = box.height;
996
+ return { ok: true, layerId: null, width, height };
997
+ }
998
+ const layer = resolveTarget(target);
999
+ if (layer.locked || layer.type !== "raster") {
1000
+ throw new Error(`Layer "${layer.name}" cannot be cropped.`);
1001
+ }
1002
+ cropLayerInPlace(requireRasterContext(paintContext(ensureRaster(layer))), box.x, box.y, box.width, box.height);
1003
+ return {
1004
+ ok: true,
1005
+ layerId: layer.id,
1006
+ width: box.width,
1007
+ height: box.height
1008
+ };
1009
+ }),
1010
+ tool("ui_sketch_pick_color", "Sample the pixel color at (x, y) on the composite canvas or on a specific layer (eyedropper).", z.object({
1011
+ target: targetParam.nullable().optional(),
1012
+ x: z.number(),
1013
+ y: z.number()
1014
+ }), async ({ target, x, y }) => {
1015
+ const canvas = target == null
1016
+ ? composite()
1017
+ : ensureRaster(resolveTarget(target));
1018
+ const sample = pickPixel(readFullImage(requireRasterContext(paintContext(canvas))), x, y);
1019
+ return { ok: true, ...sample };
1020
+ }),
1021
+ tool("ui_sketch_get_layer_image", "Inspect the canvas as an image. Omit `target` (or pass null) for the flattened composite of all visible layers; pass a layer id/name to read that single layer's pixels. Returns the dimensions plus an image you can visually inspect, so you can see the current artwork before editing it.", z.object({
1022
+ target: targetParam
1023
+ .nullable()
1024
+ .optional()
1025
+ .describe("Layer to read; omit or null for the flattened composite.")
1026
+ }), async ({ target }) => {
1027
+ const addressed = (target ?? null);
1028
+ const layer = addressed === null ? null : resolveTarget(addressed);
1029
+ const canvas = layer ? ensureRaster(layer) : composite();
1030
+ return {
1031
+ ok: true,
1032
+ layerId: layer?.id ?? null,
1033
+ layerName: layer?.name ?? null,
1034
+ width,
1035
+ height,
1036
+ note: layer === null
1037
+ ? "Flattened composite of all visible layers (PNG)."
1038
+ : `Pixels of layer "${layer.name}" (PNG).`,
1039
+ // Mirrors the frontend tool: the base64 rides in `image_content`, not
1040
+ // in the result body, so a full-canvas PNG never lands in the
1041
+ // transcript verbatim.
1042
+ image_content: {
1043
+ uri: canvas.toDataURL("image/png"),
1044
+ mimeType: "image/png"
1045
+ }
1046
+ };
1047
+ })
1048
+ ];
1049
+ const bridge = {
1050
+ tools,
1051
+ compositePng: () => composite().toBuffer("image/png"),
1052
+ compositeDataUrl: () => composite().toDataURL("image/png"),
1053
+ finalState: () => {
1054
+ const area = width * height;
1055
+ const paintedPixels = countPaintedPixels(composite());
1056
+ const strokedPixels = countPaintedPixels(compositeOf(layers.filter((l) => l.strokeCount > 0)));
1057
+ return {
1058
+ visual_output_verified: false,
1059
+ name,
1060
+ width,
1061
+ height,
1062
+ activeLayerId,
1063
+ foregroundColor,
1064
+ backgroundColor,
1065
+ activeTool,
1066
+ hasSelection: hasSelectionPixels(selection),
1067
+ setup,
1068
+ paintedPixels,
1069
+ paintedFraction: paintedPixels / area,
1070
+ strokedFraction: strokedPixels / area,
1071
+ layers: layers.map((l, i) => {
1072
+ const entry = {
1073
+ id: l.id,
1074
+ name: l.name,
1075
+ type: l.type,
1076
+ visible: l.visible,
1077
+ opacity: l.opacity,
1078
+ blendMode: l.blendMode,
1079
+ index: i,
1080
+ hasBinding: l.hasBinding,
1081
+ paintedPixels: countPaintedPixels(l.raster),
1082
+ strokeCount: l.strokeCount
1083
+ };
1084
+ if (l.prompt !== undefined)
1085
+ entry.prompt = l.prompt;
1086
+ if (l.provider !== undefined)
1087
+ entry.provider = l.provider;
1088
+ if (l.model !== undefined)
1089
+ entry.model = l.model;
1090
+ if (l.seed !== undefined)
1091
+ entry.seed = l.seed;
1092
+ if (l.fillColor !== undefined)
1093
+ entry.fillColor = l.fillColor;
1094
+ if (l.imageRef !== undefined)
1095
+ entry.imageRef = l.imageRef;
1096
+ if (l.imageBounds !== undefined)
1097
+ entry.imageBounds = l.imageBounds;
1098
+ return entry;
1099
+ })
1100
+ };
1101
+ }
1102
+ };
1103
+ lastCreatedBridge = bridge;
1104
+ return bridge;
1105
+ }
1106
+ const SKETCH_SYSTEM_PROMPT = `You are an assistant driving a Sketch / image editor through UI tools.
1107
+
1108
+ Use the ui_sketch_* tools to inspect and modify the open image document:
1109
+ - Call ui_sketch_get_state first to see the layer stack, active layer, colors, and tool.
1110
+ - Layers are addressed by id, by (case-insensitive) name, or the literal "active" for the active layer.
1111
+ - Add layers with ui_sketch_add_layer, adjust them with ui_sketch_set_layer_props (opacity, blend mode, name, visibility, lock).
1112
+ - Put an existing image (an asset id or a URL) on a layer with ui_sketch_place_image; generate a new one with ui_sketch_generate; recolor with ui_sketch_set_color; resize the canvas with ui_sketch_resize_canvas; shape the pixel selection with ui_sketch_selection or ui_sketch_set_selection_shape.
1113
+ - Paint regions with ui_sketch_fill, ui_sketch_gradient, and ui_sketch_draw_shape. Transform or grade a layer with ui_sketch_transform and ui_sketch_adjust_layer. Crop with ui_sketch_crop. Sample a pixel with ui_sketch_pick_color.
1114
+
1115
+ You can draw. ui_sketch_stroke paints real pixels with the editor's brush, pencil and eraser:
1116
+ - A stroke is a polyline of canvas-pixel points (x right, y down, origin top-left) plus its own color, size, opacity and hardness. The engine interpolates dabs along each segment, so a curve is just enough sampled points — a circle is about 24 points around it, and you can pass "closed": true to join the last point back to the first.
1117
+ - Pass several strokes in one call to lay down a whole figure at once. Paint on raster layers only, and never on a locked one.
1118
+ - Put separate parts of a drawing on separate, named layers (ui_sketch_add_layer) so each can be moved, recolored or hidden on its own.
1119
+ - Call ui_sketch_get_layer_image to look at your own work — omit target for the flattened composite, or name a layer to see it alone. Check the result and fix what looks wrong before you finish.
1120
+
1121
+ The guided image flow lives on the document: ui_sketch_set_setup writes its brief, use case, variation count and stage. It renders nothing. To make a set of variations, call ui_sketch_generate once per variation with the same prompt, size and model and a different seed each time.
1122
+
1123
+ Call one tool at a time and use the result before the next call. When the objective is fully satisfied, STOP calling tools and give a one-line summary.`;
1124
+ export const SKETCH_TOOL_LOOP_CASES = [
1125
+ {
1126
+ id: "compose-layers",
1127
+ description: "Add two layers, set the top layer to 50% opacity + multiply blend, and name them",
1128
+ objective: "The document has a single 'Background' layer. Add two new layers, name them, and set the top new layer to 50% opacity with 'multiply' blend mode.",
1129
+ createBridge: () => createSketchToolBridge(),
1130
+ systemPrompt: SKETCH_SYSTEM_PROMPT,
1131
+ expect: {
1132
+ requiredTools: ["ui_sketch_add_layer", "ui_sketch_set_layer_props"],
1133
+ noErrorResults: true,
1134
+ minToolCalls: 2,
1135
+ maxToolCalls: 15,
1136
+ finalState: [
1137
+ {
1138
+ name: "hasThreeLayers",
1139
+ detail: "fewer than 3 layers in the document",
1140
+ test: (s) => s.layers.length >= 3
1141
+ },
1142
+ {
1143
+ name: "hasHalfOpacityLayer",
1144
+ detail: "no layer has opacity < 1",
1145
+ test: (s) => s.layers.some((l) => l.opacity < 1)
1146
+ },
1147
+ {
1148
+ name: "hasMultiplyBlend",
1149
+ detail: "no layer uses multiply blend mode",
1150
+ test: (s) => s.layers.some((l) => l.blendMode === "multiply")
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ {
1156
+ id: "generate-layer",
1157
+ description: "Generate a text-to-image layer from a prompt and set the foreground color",
1158
+ objective: "Generate a text-to-image layer using provider 'fal_ai' and model 'fal-ai/flux/schnell' with a descriptive prompt, and set the foreground color to #ff8800.",
1159
+ createBridge: () => createSketchToolBridge(),
1160
+ systemPrompt: SKETCH_SYSTEM_PROMPT,
1161
+ expect: {
1162
+ requiredTools: ["ui_sketch_generate", "ui_sketch_set_color"],
1163
+ noErrorResults: true,
1164
+ minToolCalls: 2,
1165
+ maxToolCalls: 12,
1166
+ finalState: [
1167
+ {
1168
+ name: "hasBoundLayerWithPrompt",
1169
+ detail: "no layer has a generation binding with a prompt set",
1170
+ test: (s) => s.layers.some((l) => l.hasBinding && !!l.prompt && l.prompt.length > 0)
1171
+ },
1172
+ {
1173
+ name: "foregroundSet",
1174
+ detail: "foreground color is not #ff8800",
1175
+ test: (s) => s.foregroundColor.toLowerCase() === "#ff8800"
1176
+ }
1177
+ ]
1178
+ }
1179
+ },
1180
+ {
1181
+ id: "resize-and-select",
1182
+ description: "Resize the canvas to 1024x768 and select the whole canvas",
1183
+ objective: "Resize the canvas to 1024x768 pixels and select the whole canvas.",
1184
+ createBridge: () => createSketchToolBridge(),
1185
+ systemPrompt: SKETCH_SYSTEM_PROMPT,
1186
+ expect: {
1187
+ requiredTools: ["ui_sketch_resize_canvas", "ui_sketch_selection"],
1188
+ noErrorResults: true,
1189
+ minToolCalls: 2,
1190
+ maxToolCalls: 8,
1191
+ finalState: [
1192
+ {
1193
+ name: "resizedWidth",
1194
+ detail: "canvas width is not 1024",
1195
+ test: (s) => s.width === 1024
1196
+ },
1197
+ {
1198
+ name: "resizedHeight",
1199
+ detail: "canvas height is not 768",
1200
+ test: (s) => s.height === 768
1201
+ },
1202
+ {
1203
+ name: "hasSelection",
1204
+ detail: "canvas has no active selection",
1205
+ test: (s) => s.hasSelection === true
1206
+ }
1207
+ ]
1208
+ }
1209
+ },
1210
+ {
1211
+ id: "image-flow-variations",
1212
+ description: "Walk the guided image flow's state and render a set of variations that differ only by seed",
1213
+ objective: "Set up the guided image flow for a product shot of a ceramic pour-over coffee dripper on a sunlit kitchen counter, asking for 3 variations, and leave the flow finished. Then render those 3 variations with provider 'fal_ai' and model 'fal-ai/flux/schnell', using the same prompt and size for every one and a different seed each time.",
1214
+ createBridge: () => createSketchToolBridge(),
1215
+ systemPrompt: SKETCH_SYSTEM_PROMPT,
1216
+ maxIterations: 20,
1217
+ expect: {
1218
+ requiredTools: ["ui_sketch_set_setup", "ui_sketch_generate"],
1219
+ // The brief is written before anything is rendered (D4).
1220
+ ordering: [["ui_sketch_set_setup", "ui_sketch_generate"]],
1221
+ noErrorResults: true,
1222
+ minToolCalls: 4,
1223
+ maxToolCalls: 20,
1224
+ finalState: [
1225
+ {
1226
+ name: "setupNamesTheProductShot",
1227
+ detail: "the flow state does not name a product shot with a brief",
1228
+ test: (s) => s.setup?.use_case === "product" &&
1229
+ (s.setup?.brief ?? "").trim().length > 0
1230
+ },
1231
+ {
1232
+ name: "askedForThreeVariations",
1233
+ detail: "the flow state does not ask for 3 variations",
1234
+ test: (s) => s.setup?.variations === 3
1235
+ },
1236
+ {
1237
+ name: "renderedThreeVariations",
1238
+ detail: "fewer than 3 generated layers",
1239
+ test: (s) => s.layers.filter((l) => l.hasBinding).length >= 3
1240
+ },
1241
+ {
1242
+ name: "variationsShareOnePrompt",
1243
+ // Criterion 4: same prompt, same model, differing only by seed.
1244
+ detail: "the generated layers do not share one prompt and model",
1245
+ test: (s) => {
1246
+ const generated = s.layers.filter((l) => l.hasBinding);
1247
+ return (new Set(generated.map((l) => `${l.prompt ?? ""}|${l.model ?? ""}`)).size === 1);
1248
+ }
1249
+ },
1250
+ {
1251
+ name: "variationsDifferBySeed",
1252
+ detail: "the generated layers do not each carry a distinct seed",
1253
+ test: (s) => {
1254
+ const seeds = s.layers
1255
+ .filter((l) => l.hasBinding)
1256
+ .map((l) => l.seed);
1257
+ return (seeds.length >= 3 &&
1258
+ seeds.every((seed) => seed !== undefined) &&
1259
+ new Set(seeds).size === seeds.length);
1260
+ }
1261
+ }
1262
+ ]
1263
+ }
1264
+ },
1265
+ {
1266
+ id: "draw-an-animal",
1267
+ description: "Draw a cat with ui_sketch_stroke across separate named layers, then look at the result",
1268
+ objective: "Draw a simple cat on the canvas. Put the body, the head, and the face details (eyes, nose, whiskers) on separate layers, each with a name that says what it holds, and draw each part with strokes. When you are done, look at the flattened result to check what you drew.",
1269
+ createBridge: () => createSketchToolBridge({ width: 512, height: 512 }),
1270
+ systemPrompt: SKETCH_SYSTEM_PROMPT,
1271
+ // Drawing is many-turned: a layer per part, a stroke batch per layer, and
1272
+ // a look at the result. Measured runs land around 8-20 calls, well past
1273
+ // the runner's default cap of 12.
1274
+ maxIterations: 40,
1275
+ expect: {
1276
+ requiredTools: ["ui_sketch_stroke", "ui_sketch_get_layer_image"],
1277
+ // Looking at the drawing only means something once there is one.
1278
+ ordering: [["ui_sketch_stroke", "ui_sketch_get_layer_image"]],
1279
+ noErrorResults: true,
1280
+ minToolCalls: 3,
1281
+ maxToolCalls: 40,
1282
+ finalState: [
1283
+ {
1284
+ name: "hasSeparateNamedLayers",
1285
+ detail: "fewer than 3 distinctly named layers — the parts were not separated",
1286
+ test: (s) => new Set(s.layers.map((l) => l.name.trim().toLowerCase())).size >=
1287
+ 3
1288
+ },
1289
+ {
1290
+ name: "partsAreOnDifferentLayers",
1291
+ detail: "strokes landed on fewer than 2 layers",
1292
+ test: (s) => s.layers.filter((l) => l.strokeCount > 0).length >= 2
1293
+ },
1294
+ {
1295
+ name: "canvasIsMeaningfullyPainted",
1296
+ // Structural, not pictorial: a cat this cannot judge, but a canvas
1297
+ // still 99% empty is not a drawing by any reading. Measured over
1298
+ // the stroked layers only, so a solid backdrop fill cannot pass it.
1299
+ detail: "strokes covered less than 1% of the canvas",
1300
+ test: (s) => s.strokedFraction >= 0.01
1301
+ }
1302
+ ]
1303
+ }
1304
+ }
1305
+ ];
1306
+ //# sourceMappingURL=sketch.js.map