@nodetool-ai/agents 0.7.0-rc.22 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1554) hide show
  1. package/README.md +35 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/analysis/audio-dsp.d.ts +223 -0
  4. package/dist/analysis/audio-dsp.d.ts.map +1 -0
  5. package/dist/analysis/audio-dsp.js +642 -0
  6. package/dist/analysis/audio-dsp.js.map +1 -0
  7. package/dist/analysis/media-decode.d.ts +85 -0
  8. package/dist/analysis/media-decode.d.ts.map +1 -0
  9. package/dist/analysis/media-decode.js +199 -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 +91 -0
  88. package/dist/author-graph.d.ts.map +1 -0
  89. package/dist/author-graph.js +319 -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/adapters.d.ts +36 -0
  104. package/dist/capabilities/adapters.d.ts.map +1 -0
  105. package/dist/capabilities/adapters.js +44 -0
  106. package/dist/capabilities/adapters.js.map +1 -0
  107. package/dist/capabilities/agents.d.ts +78 -0
  108. package/dist/capabilities/agents.d.ts.map +1 -0
  109. package/dist/capabilities/agents.js +366 -0
  110. package/dist/capabilities/agents.js.map +1 -0
  111. package/dist/capabilities/agents.specs.d.ts +27 -0
  112. package/dist/capabilities/agents.specs.d.ts.map +1 -0
  113. package/dist/capabilities/agents.specs.js +243 -0
  114. package/dist/capabilities/agents.specs.js.map +1 -0
  115. package/dist/capabilities/analysis.d.ts +93 -0
  116. package/dist/capabilities/analysis.d.ts.map +1 -0
  117. package/dist/capabilities/analysis.js +812 -0
  118. package/dist/capabilities/analysis.js.map +1 -0
  119. package/dist/capabilities/analysis.specs.d.ts +39 -0
  120. package/dist/capabilities/analysis.specs.d.ts.map +1 -0
  121. package/dist/capabilities/analysis.specs.js +217 -0
  122. package/dist/capabilities/analysis.specs.js.map +1 -0
  123. package/dist/capabilities/apify.d.ts +34 -0
  124. package/dist/capabilities/apify.d.ts.map +1 -0
  125. package/dist/capabilities/apify.js +449 -0
  126. package/dist/capabilities/apify.js.map +1 -0
  127. package/dist/capabilities/apify.specs.d.ts +28 -0
  128. package/dist/capabilities/apify.specs.d.ts.map +1 -0
  129. package/dist/capabilities/apify.specs.js +232 -0
  130. package/dist/capabilities/apify.specs.js.map +1 -0
  131. package/dist/capabilities/apps.d.ts +40 -0
  132. package/dist/capabilities/apps.d.ts.map +1 -0
  133. package/dist/capabilities/apps.js +413 -0
  134. package/dist/capabilities/apps.js.map +1 -0
  135. package/dist/capabilities/apps.specs.d.ts +23 -0
  136. package/dist/capabilities/apps.specs.d.ts.map +1 -0
  137. package/dist/capabilities/apps.specs.js +236 -0
  138. package/dist/capabilities/apps.specs.js.map +1 -0
  139. package/dist/capabilities/args.d.ts +65 -0
  140. package/dist/capabilities/args.d.ts.map +1 -0
  141. package/dist/capabilities/args.js +218 -0
  142. package/dist/capabilities/args.js.map +1 -0
  143. package/dist/capabilities/assets.d.ts +45 -0
  144. package/dist/capabilities/assets.d.ts.map +1 -0
  145. package/dist/capabilities/assets.js +952 -0
  146. package/dist/capabilities/assets.js.map +1 -0
  147. package/dist/capabilities/assets.specs.d.ts +54 -0
  148. package/dist/capabilities/assets.specs.d.ts.map +1 -0
  149. package/dist/capabilities/assets.specs.js +291 -0
  150. package/dist/capabilities/assets.specs.js.map +1 -0
  151. package/dist/capabilities/background-generation.d.ts +14 -0
  152. package/dist/capabilities/background-generation.d.ts.map +1 -0
  153. package/dist/capabilities/background-generation.js +29 -0
  154. package/dist/capabilities/background-generation.js.map +1 -0
  155. package/dist/capabilities/browser.d.ts +30 -0
  156. package/dist/capabilities/browser.d.ts.map +1 -0
  157. package/dist/capabilities/browser.js +250 -0
  158. package/dist/capabilities/browser.js.map +1 -0
  159. package/dist/capabilities/browser.specs.d.ts +37 -0
  160. package/dist/capabilities/browser.specs.d.ts.map +1 -0
  161. package/dist/capabilities/browser.specs.js +173 -0
  162. package/dist/capabilities/browser.specs.js.map +1 -0
  163. package/dist/capabilities/code-grading.d.ts +68 -0
  164. package/dist/capabilities/code-grading.d.ts.map +1 -0
  165. package/dist/capabilities/code-grading.js +75 -0
  166. package/dist/capabilities/code-grading.js.map +1 -0
  167. package/dist/capabilities/code.d.ts +56 -0
  168. package/dist/capabilities/code.d.ts.map +1 -0
  169. package/dist/capabilities/code.js +327 -0
  170. package/dist/capabilities/code.js.map +1 -0
  171. package/dist/capabilities/code.specs.d.ts +22 -0
  172. package/dist/capabilities/code.specs.d.ts.map +1 -0
  173. package/dist/capabilities/code.specs.js +175 -0
  174. package/dist/capabilities/code.specs.js.map +1 -0
  175. package/dist/capabilities/collections.d.ts +44 -0
  176. package/dist/capabilities/collections.d.ts.map +1 -0
  177. package/dist/capabilities/collections.js +432 -0
  178. package/dist/capabilities/collections.js.map +1 -0
  179. package/dist/capabilities/collections.specs.d.ts +25 -0
  180. package/dist/capabilities/collections.specs.d.ts.map +1 -0
  181. package/dist/capabilities/collections.specs.js +299 -0
  182. package/dist/capabilities/collections.specs.js.map +1 -0
  183. package/dist/capabilities/compositions.d.ts +57 -0
  184. package/dist/capabilities/compositions.d.ts.map +1 -0
  185. package/dist/capabilities/compositions.js +384 -0
  186. package/dist/capabilities/compositions.js.map +1 -0
  187. package/dist/capabilities/compositions.specs.d.ts +22 -0
  188. package/dist/capabilities/compositions.specs.d.ts.map +1 -0
  189. package/dist/capabilities/compositions.specs.js +126 -0
  190. package/dist/capabilities/compositions.specs.js.map +1 -0
  191. package/dist/capabilities/concurrency.d.ts +12 -0
  192. package/dist/capabilities/concurrency.d.ts.map +1 -0
  193. package/dist/capabilities/concurrency.js +30 -0
  194. package/dist/capabilities/concurrency.js.map +1 -0
  195. package/dist/capabilities/costs.d.ts +20 -0
  196. package/dist/capabilities/costs.d.ts.map +1 -0
  197. package/dist/capabilities/costs.js +40 -0
  198. package/dist/capabilities/costs.js.map +1 -0
  199. package/dist/capabilities/costs.specs.d.ts +12 -0
  200. package/dist/capabilities/costs.specs.d.ts.map +1 -0
  201. package/dist/capabilities/costs.specs.js +35 -0
  202. package/dist/capabilities/costs.specs.js.map +1 -0
  203. package/dist/capabilities/dispatcher.d.ts +57 -0
  204. package/dist/capabilities/dispatcher.d.ts.map +1 -0
  205. package/dist/capabilities/dispatcher.js +117 -0
  206. package/dist/capabilities/dispatcher.js.map +1 -0
  207. package/dist/capabilities/documents.d.ts +25 -0
  208. package/dist/capabilities/documents.d.ts.map +1 -0
  209. package/dist/capabilities/documents.js +278 -0
  210. package/dist/capabilities/documents.js.map +1 -0
  211. package/dist/capabilities/documents.specs.d.ts +18 -0
  212. package/dist/capabilities/documents.specs.d.ts.map +1 -0
  213. package/dist/capabilities/documents.specs.js +201 -0
  214. package/dist/capabilities/documents.specs.js.map +1 -0
  215. package/dist/capabilities/email.d.ts +23 -0
  216. package/dist/capabilities/email.d.ts.map +1 -0
  217. package/dist/capabilities/email.js +226 -0
  218. package/dist/capabilities/email.js.map +1 -0
  219. package/dist/capabilities/email.specs.d.ts +16 -0
  220. package/dist/capabilities/email.specs.d.ts.map +1 -0
  221. package/dist/capabilities/email.specs.js +102 -0
  222. package/dist/capabilities/email.specs.js.map +1 -0
  223. package/dist/capabilities/entities.d.ts +52 -0
  224. package/dist/capabilities/entities.d.ts.map +1 -0
  225. package/dist/capabilities/entities.js +478 -0
  226. package/dist/capabilities/entities.js.map +1 -0
  227. package/dist/capabilities/entities.specs.d.ts +25 -0
  228. package/dist/capabilities/entities.specs.d.ts.map +1 -0
  229. package/dist/capabilities/entities.specs.js +247 -0
  230. package/dist/capabilities/entities.specs.js.map +1 -0
  231. package/dist/capabilities/example-timelines.d.ts +3 -0
  232. package/dist/capabilities/example-timelines.d.ts.map +1 -0
  233. package/dist/capabilities/example-timelines.js +191 -0
  234. package/dist/capabilities/example-timelines.js.map +1 -0
  235. package/dist/capabilities/example-timelines.specs.d.ts +5 -0
  236. package/dist/capabilities/example-timelines.specs.d.ts.map +1 -0
  237. package/dist/capabilities/example-timelines.specs.js +53 -0
  238. package/dist/capabilities/example-timelines.specs.js.map +1 -0
  239. package/dist/capabilities/files.d.ts +53 -0
  240. package/dist/capabilities/files.d.ts.map +1 -0
  241. package/dist/capabilities/files.js +1172 -0
  242. package/dist/capabilities/files.js.map +1 -0
  243. package/dist/capabilities/files.specs.d.ts +28 -0
  244. package/dist/capabilities/files.specs.d.ts.map +1 -0
  245. package/dist/capabilities/files.specs.js +259 -0
  246. package/dist/capabilities/files.specs.js.map +1 -0
  247. package/dist/capabilities/flow.d.ts +93 -0
  248. package/dist/capabilities/flow.d.ts.map +1 -0
  249. package/dist/capabilities/flow.js +285 -0
  250. package/dist/capabilities/flow.js.map +1 -0
  251. package/dist/capabilities/flow.specs.d.ts +25 -0
  252. package/dist/capabilities/flow.specs.d.ts.map +1 -0
  253. package/dist/capabilities/flow.specs.js +114 -0
  254. package/dist/capabilities/flow.specs.js.map +1 -0
  255. package/dist/capabilities/game-asset-source.d.ts +31 -0
  256. package/dist/capabilities/game-asset-source.d.ts.map +1 -0
  257. package/dist/capabilities/game-asset-source.js +81 -0
  258. package/dist/capabilities/game-asset-source.js.map +1 -0
  259. package/dist/capabilities/game.d.ts +12 -0
  260. package/dist/capabilities/game.d.ts.map +1 -0
  261. package/dist/capabilities/game.js +1262 -0
  262. package/dist/capabilities/game.js.map +1 -0
  263. package/dist/capabilities/game.specs.d.ts +3 -0
  264. package/dist/capabilities/game.specs.d.ts.map +1 -0
  265. package/dist/capabilities/game.specs.js +96 -0
  266. package/dist/capabilities/game.specs.js.map +1 -0
  267. package/dist/capabilities/gate-from-context.d.ts +39 -0
  268. package/dist/capabilities/gate-from-context.d.ts.map +1 -0
  269. package/dist/capabilities/gate-from-context.js +97 -0
  270. package/dist/capabilities/gate-from-context.js.map +1 -0
  271. package/dist/capabilities/gate-tools.d.ts +18 -0
  272. package/dist/capabilities/gate-tools.d.ts.map +1 -0
  273. package/dist/capabilities/gate-tools.js +66 -0
  274. package/dist/capabilities/gate-tools.js.map +1 -0
  275. package/dist/capabilities/generations.d.ts +79 -0
  276. package/dist/capabilities/generations.d.ts.map +1 -0
  277. package/dist/capabilities/generations.js +382 -0
  278. package/dist/capabilities/generations.js.map +1 -0
  279. package/dist/capabilities/generations.specs.d.ts +62 -0
  280. package/dist/capabilities/generations.specs.d.ts.map +1 -0
  281. package/dist/capabilities/generations.specs.js +230 -0
  282. package/dist/capabilities/generations.specs.js.map +1 -0
  283. package/dist/capabilities/google.d.ts +50 -0
  284. package/dist/capabilities/google.d.ts.map +1 -0
  285. package/dist/capabilities/google.js +246 -0
  286. package/dist/capabilities/google.js.map +1 -0
  287. package/dist/capabilities/google.specs.d.ts +52 -0
  288. package/dist/capabilities/google.specs.d.ts.map +1 -0
  289. package/dist/capabilities/google.specs.js +391 -0
  290. package/dist/capabilities/google.specs.js.map +1 -0
  291. package/dist/capabilities/html-text.d.ts +28 -0
  292. package/dist/capabilities/html-text.d.ts.map +1 -0
  293. package/dist/capabilities/html-text.js +76 -0
  294. package/dist/capabilities/html-text.js.map +1 -0
  295. package/dist/capabilities/index.d.ts +19 -0
  296. package/dist/capabilities/index.d.ts.map +1 -0
  297. package/dist/capabilities/index.js +14 -0
  298. package/dist/capabilities/index.js.map +1 -0
  299. package/dist/capabilities/invoke.d.ts +89 -0
  300. package/dist/capabilities/invoke.d.ts.map +1 -0
  301. package/dist/capabilities/invoke.js +214 -0
  302. package/dist/capabilities/invoke.js.map +1 -0
  303. package/dist/capabilities/jobs.d.ts +32 -0
  304. package/dist/capabilities/jobs.d.ts.map +1 -0
  305. package/dist/capabilities/jobs.js +123 -0
  306. package/dist/capabilities/jobs.js.map +1 -0
  307. package/dist/capabilities/jobs.specs.d.ts +20 -0
  308. package/dist/capabilities/jobs.specs.d.ts.map +1 -0
  309. package/dist/capabilities/jobs.specs.js +103 -0
  310. package/dist/capabilities/jobs.specs.js.map +1 -0
  311. package/dist/capabilities/js-scripts.d.ts +90 -0
  312. package/dist/capabilities/js-scripts.d.ts.map +1 -0
  313. package/dist/capabilities/js-scripts.js +700 -0
  314. package/dist/capabilities/js-scripts.js.map +1 -0
  315. package/dist/capabilities/js-scripts.specs.d.ts +50 -0
  316. package/dist/capabilities/js-scripts.specs.d.ts.map +1 -0
  317. package/dist/capabilities/js-scripts.specs.js +344 -0
  318. package/dist/capabilities/js-scripts.specs.js.map +1 -0
  319. package/dist/capabilities/lazy-tool.d.ts +42 -0
  320. package/dist/capabilities/lazy-tool.d.ts.map +1 -0
  321. package/dist/capabilities/lazy-tool.js +88 -0
  322. package/dist/capabilities/lazy-tool.js.map +1 -0
  323. package/dist/capabilities/local-browser.d.ts +24 -0
  324. package/dist/capabilities/local-browser.d.ts.map +1 -0
  325. package/dist/capabilities/local-browser.js +105 -0
  326. package/dist/capabilities/local-browser.js.map +1 -0
  327. package/dist/capabilities/media.d.ts +121 -0
  328. package/dist/capabilities/media.d.ts.map +1 -0
  329. package/dist/capabilities/media.js +2217 -0
  330. package/dist/capabilities/media.js.map +1 -0
  331. package/dist/capabilities/media.specs.d.ts +65 -0
  332. package/dist/capabilities/media.specs.d.ts.map +1 -0
  333. package/dist/capabilities/media.specs.js +779 -0
  334. package/dist/capabilities/media.specs.js.map +1 -0
  335. package/dist/capabilities/memory.d.ts +31 -0
  336. package/dist/capabilities/memory.d.ts.map +1 -0
  337. package/dist/capabilities/memory.js +403 -0
  338. package/dist/capabilities/memory.js.map +1 -0
  339. package/dist/capabilities/memory.specs.d.ts +55 -0
  340. package/dist/capabilities/memory.specs.d.ts.map +1 -0
  341. package/dist/capabilities/memory.specs.js +208 -0
  342. package/dist/capabilities/memory.specs.js.map +1 -0
  343. package/dist/capabilities/model3d.d.ts +29 -0
  344. package/dist/capabilities/model3d.d.ts.map +1 -0
  345. package/dist/capabilities/model3d.js +482 -0
  346. package/dist/capabilities/model3d.js.map +1 -0
  347. package/dist/capabilities/model3d.specs.d.ts +28 -0
  348. package/dist/capabilities/model3d.specs.d.ts.map +1 -0
  349. package/dist/capabilities/model3d.specs.js +305 -0
  350. package/dist/capabilities/model3d.specs.js.map +1 -0
  351. package/dist/capabilities/models.d.ts +138 -0
  352. package/dist/capabilities/models.d.ts.map +1 -0
  353. package/dist/capabilities/models.js +803 -0
  354. package/dist/capabilities/models.js.map +1 -0
  355. package/dist/capabilities/models.specs.d.ts +21 -0
  356. package/dist/capabilities/models.specs.d.ts.map +1 -0
  357. package/dist/capabilities/models.specs.js +141 -0
  358. package/dist/capabilities/models.specs.js.map +1 -0
  359. package/dist/capabilities/nodes.d.ts +26 -0
  360. package/dist/capabilities/nodes.d.ts.map +1 -0
  361. package/dist/capabilities/nodes.js +266 -0
  362. package/dist/capabilities/nodes.js.map +1 -0
  363. package/dist/capabilities/nodes.specs.d.ts +20 -0
  364. package/dist/capabilities/nodes.specs.d.ts.map +1 -0
  365. package/dist/capabilities/nodes.specs.js +106 -0
  366. package/dist/capabilities/nodes.specs.js.map +1 -0
  367. package/dist/capabilities/packs.d.ts +69 -0
  368. package/dist/capabilities/packs.d.ts.map +1 -0
  369. package/dist/capabilities/packs.js +246 -0
  370. package/dist/capabilities/packs.js.map +1 -0
  371. package/dist/capabilities/packs.specs.d.ts +27 -0
  372. package/dist/capabilities/packs.specs.d.ts.map +1 -0
  373. package/dist/capabilities/packs.specs.js +64 -0
  374. package/dist/capabilities/packs.specs.js.map +1 -0
  375. package/dist/capabilities/project-scope.d.ts +12 -0
  376. package/dist/capabilities/project-scope.d.ts.map +1 -0
  377. package/dist/capabilities/project-scope.js +19 -0
  378. package/dist/capabilities/project-scope.js.map +1 -0
  379. package/dist/capabilities/projects.d.ts +23 -0
  380. package/dist/capabilities/projects.d.ts.map +1 -0
  381. package/dist/capabilities/projects.js +206 -0
  382. package/dist/capabilities/projects.js.map +1 -0
  383. package/dist/capabilities/projects.specs.d.ts +23 -0
  384. package/dist/capabilities/projects.specs.d.ts.map +1 -0
  385. package/dist/capabilities/projects.specs.js +118 -0
  386. package/dist/capabilities/projects.specs.js.map +1 -0
  387. package/dist/capabilities/registry.d.ts +109 -0
  388. package/dist/capabilities/registry.d.ts.map +1 -0
  389. package/dist/capabilities/registry.js +445 -0
  390. package/dist/capabilities/registry.js.map +1 -0
  391. package/dist/capabilities/script-link.d.ts +22 -0
  392. package/dist/capabilities/script-link.d.ts.map +1 -0
  393. package/dist/capabilities/script-link.js +35 -0
  394. package/dist/capabilities/script-link.js.map +1 -0
  395. package/dist/capabilities/scripts.d.ts +43 -0
  396. package/dist/capabilities/scripts.d.ts.map +1 -0
  397. package/dist/capabilities/scripts.js +1789 -0
  398. package/dist/capabilities/scripts.js.map +1 -0
  399. package/dist/capabilities/scripts.specs.d.ts +40 -0
  400. package/dist/capabilities/scripts.specs.d.ts.map +1 -0
  401. package/dist/capabilities/scripts.specs.js +319 -0
  402. package/dist/capabilities/scripts.specs.js.map +1 -0
  403. package/dist/capabilities/serpapi.d.ts +42 -0
  404. package/dist/capabilities/serpapi.d.ts.map +1 -0
  405. package/dist/capabilities/serpapi.js +262 -0
  406. package/dist/capabilities/serpapi.js.map +1 -0
  407. package/dist/capabilities/serpapi.specs.d.ts +24 -0
  408. package/dist/capabilities/serpapi.specs.d.ts.map +1 -0
  409. package/dist/capabilities/serpapi.specs.js +174 -0
  410. package/dist/capabilities/serpapi.specs.js.map +1 -0
  411. package/dist/capabilities/settings.d.ts +48 -0
  412. package/dist/capabilities/settings.d.ts.map +1 -0
  413. package/dist/capabilities/settings.js +226 -0
  414. package/dist/capabilities/settings.js.map +1 -0
  415. package/dist/capabilities/settings.specs.d.ts +42 -0
  416. package/dist/capabilities/settings.specs.d.ts.map +1 -0
  417. package/dist/capabilities/settings.specs.js +126 -0
  418. package/dist/capabilities/settings.specs.js.map +1 -0
  419. package/dist/capabilities/shared.d.ts +35 -0
  420. package/dist/capabilities/shared.d.ts.map +1 -0
  421. package/dist/capabilities/shared.js +165 -0
  422. package/dist/capabilities/shared.js.map +1 -0
  423. package/dist/capabilities/shared.specs.d.ts +19 -0
  424. package/dist/capabilities/shared.specs.d.ts.map +1 -0
  425. package/dist/capabilities/shared.specs.js +134 -0
  426. package/dist/capabilities/shared.specs.js.map +1 -0
  427. package/dist/capabilities/sketches.d.ts +52 -0
  428. package/dist/capabilities/sketches.d.ts.map +1 -0
  429. package/dist/capabilities/sketches.js +1163 -0
  430. package/dist/capabilities/sketches.js.map +1 -0
  431. package/dist/capabilities/sketches.specs.d.ts +44 -0
  432. package/dist/capabilities/sketches.specs.d.ts.map +1 -0
  433. package/dist/capabilities/sketches.specs.js +392 -0
  434. package/dist/capabilities/sketches.specs.js.map +1 -0
  435. package/dist/capabilities/skills.d.ts +28 -0
  436. package/dist/capabilities/skills.d.ts.map +1 -0
  437. package/dist/capabilities/skills.js +269 -0
  438. package/dist/capabilities/skills.js.map +1 -0
  439. package/dist/capabilities/skills.specs.d.ts +17 -0
  440. package/dist/capabilities/skills.specs.d.ts.map +1 -0
  441. package/dist/capabilities/skills.specs.js +108 -0
  442. package/dist/capabilities/skills.specs.js.map +1 -0
  443. package/dist/capabilities/storyboards.d.ts +68 -0
  444. package/dist/capabilities/storyboards.d.ts.map +1 -0
  445. package/dist/capabilities/storyboards.js +2246 -0
  446. package/dist/capabilities/storyboards.js.map +1 -0
  447. package/dist/capabilities/storyboards.specs.d.ts +42 -0
  448. package/dist/capabilities/storyboards.specs.d.ts.map +1 -0
  449. package/dist/capabilities/storyboards.specs.js +418 -0
  450. package/dist/capabilities/storyboards.specs.js.map +1 -0
  451. package/dist/capabilities/threads.d.ts +25 -0
  452. package/dist/capabilities/threads.d.ts.map +1 -0
  453. package/dist/capabilities/threads.js +240 -0
  454. package/dist/capabilities/threads.js.map +1 -0
  455. package/dist/capabilities/threads.specs.d.ts +26 -0
  456. package/dist/capabilities/threads.specs.d.ts.map +1 -0
  457. package/dist/capabilities/threads.specs.js +108 -0
  458. package/dist/capabilities/threads.specs.js.map +1 -0
  459. package/dist/capabilities/timeline-audio-bake.d.ts +114 -0
  460. package/dist/capabilities/timeline-audio-bake.d.ts.map +1 -0
  461. package/dist/capabilities/timeline-audio-bake.js +188 -0
  462. package/dist/capabilities/timeline-audio-bake.js.map +1 -0
  463. package/dist/capabilities/timeline-bake.d.ts +21 -0
  464. package/dist/capabilities/timeline-bake.d.ts.map +1 -0
  465. package/dist/capabilities/timeline-bake.js +118 -0
  466. package/dist/capabilities/timeline-bake.js.map +1 -0
  467. package/dist/capabilities/timeline-isolate-subject.d.ts +157 -0
  468. package/dist/capabilities/timeline-isolate-subject.d.ts.map +1 -0
  469. package/dist/capabilities/timeline-isolate-subject.js +293 -0
  470. package/dist/capabilities/timeline-isolate-subject.js.map +1 -0
  471. package/dist/capabilities/timeline-native-media.d.ts +4 -0
  472. package/dist/capabilities/timeline-native-media.d.ts.map +1 -0
  473. package/dist/capabilities/timeline-native-media.js +920 -0
  474. package/dist/capabilities/timeline-native-media.js.map +1 -0
  475. package/dist/capabilities/timeline-track-object.d.ts +83 -0
  476. package/dist/capabilities/timeline-track-object.d.ts.map +1 -0
  477. package/dist/capabilities/timeline-track-object.js +195 -0
  478. package/dist/capabilities/timeline-track-object.js.map +1 -0
  479. package/dist/capabilities/timelines.d.ts +190 -0
  480. package/dist/capabilities/timelines.d.ts.map +1 -0
  481. package/dist/capabilities/timelines.js +2326 -0
  482. package/dist/capabilities/timelines.js.map +1 -0
  483. package/dist/capabilities/timelines.specs.d.ts +134 -0
  484. package/dist/capabilities/timelines.specs.d.ts.map +1 -0
  485. package/dist/capabilities/timelines.specs.js +1362 -0
  486. package/dist/capabilities/timelines.specs.js.map +1 -0
  487. package/dist/capabilities/types.d.ts +197 -0
  488. package/dist/capabilities/types.d.ts.map +1 -0
  489. package/dist/capabilities/types.js +19 -0
  490. package/dist/capabilities/types.js.map +1 -0
  491. package/dist/capabilities/ui.d.ts +38 -0
  492. package/dist/capabilities/ui.d.ts.map +1 -0
  493. package/dist/capabilities/ui.js +128 -0
  494. package/dist/capabilities/ui.js.map +1 -0
  495. package/dist/capabilities/ui.specs.d.ts +22 -0
  496. package/dist/capabilities/ui.specs.d.ts.map +1 -0
  497. package/dist/capabilities/ui.specs.js +59 -0
  498. package/dist/capabilities/ui.specs.js.map +1 -0
  499. package/dist/capabilities/video-production-acceptance.d.ts +27 -0
  500. package/dist/capabilities/video-production-acceptance.d.ts.map +1 -0
  501. package/dist/capabilities/video-production-acceptance.js +41 -0
  502. package/dist/capabilities/video-production-acceptance.js.map +1 -0
  503. package/dist/capabilities/video-production.d.ts +179 -0
  504. package/dist/capabilities/video-production.d.ts.map +1 -0
  505. package/dist/capabilities/video-production.js +1492 -0
  506. package/dist/capabilities/video-production.js.map +1 -0
  507. package/dist/capabilities/video-production.specs.d.ts +13 -0
  508. package/dist/capabilities/video-production.specs.d.ts.map +1 -0
  509. package/dist/capabilities/video-production.specs.js +256 -0
  510. package/dist/capabilities/video-production.specs.js.map +1 -0
  511. package/dist/capabilities/web.d.ts +86 -0
  512. package/dist/capabilities/web.d.ts.map +1 -0
  513. package/dist/capabilities/web.js +850 -0
  514. package/dist/capabilities/web.js.map +1 -0
  515. package/dist/capabilities/web.specs.d.ts +33 -0
  516. package/dist/capabilities/web.specs.d.ts.map +1 -0
  517. package/dist/capabilities/web.specs.js +286 -0
  518. package/dist/capabilities/web.specs.js.map +1 -0
  519. package/dist/capabilities/workflows.d.ts +58 -0
  520. package/dist/capabilities/workflows.d.ts.map +1 -0
  521. package/dist/capabilities/workflows.js +1530 -0
  522. package/dist/capabilities/workflows.js.map +1 -0
  523. package/dist/capabilities/workflows.specs.d.ts +63 -0
  524. package/dist/capabilities/workflows.specs.d.ts.map +1 -0
  525. package/dist/capabilities/workflows.specs.js +852 -0
  526. package/dist/capabilities/workflows.specs.js.map +1 -0
  527. package/dist/code-gen/analyze.d.ts +26 -0
  528. package/dist/code-gen/analyze.d.ts.map +1 -0
  529. package/dist/code-gen/analyze.js +79 -0
  530. package/dist/code-gen/analyze.js.map +1 -0
  531. package/dist/code-gen/port-types.d.ts +58 -0
  532. package/dist/code-gen/port-types.d.ts.map +1 -0
  533. package/dist/code-gen/port-types.js +115 -0
  534. package/dist/code-gen/port-types.js.map +1 -0
  535. package/dist/code-gen/prompt.d.ts +37 -0
  536. package/dist/code-gen/prompt.d.ts.map +1 -0
  537. package/dist/code-gen/prompt.js +129 -0
  538. package/dist/code-gen/prompt.js.map +1 -0
  539. package/dist/code-gen/sandbox-manifest.d.ts +120 -0
  540. package/dist/code-gen/sandbox-manifest.d.ts.map +1 -0
  541. package/dist/code-gen/sandbox-manifest.js +1023 -0
  542. package/dist/code-gen/sandbox-manifest.js.map +1 -0
  543. package/dist/code-gen/sandbox-prompt.d.ts +26 -0
  544. package/dist/code-gen/sandbox-prompt.d.ts.map +1 -0
  545. package/dist/code-gen/sandbox-prompt.js +126 -0
  546. package/dist/code-gen/sandbox-prompt.js.map +1 -0
  547. package/dist/code-planner.d.ts +72 -0
  548. package/dist/code-planner.d.ts.map +1 -0
  549. package/dist/code-planner.js +271 -0
  550. package/dist/code-planner.js.map +1 -0
  551. package/dist/codeact/action-diagnostics.d.ts +35 -0
  552. package/dist/codeact/action-diagnostics.d.ts.map +1 -0
  553. package/dist/codeact/action-diagnostics.js +147 -0
  554. package/dist/codeact/action-diagnostics.js.map +1 -0
  555. package/dist/codeact/capability-modules.d.ts +66 -0
  556. package/dist/codeact/capability-modules.d.ts.map +1 -0
  557. package/dist/codeact/capability-modules.js +278 -0
  558. package/dist/codeact/capability-modules.js.map +1 -0
  559. package/dist/codeact/chat-codeact.d.ts +104 -0
  560. package/dist/codeact/chat-codeact.d.ts.map +1 -0
  561. package/dist/codeact/chat-codeact.js +424 -0
  562. package/dist/codeact/chat-codeact.js.map +1 -0
  563. package/dist/codeact/codeact-executor.d.ts +247 -0
  564. package/dist/codeact/codeact-executor.d.ts.map +1 -0
  565. package/dist/codeact/codeact-executor.js +1176 -0
  566. package/dist/codeact/codeact-executor.js.map +1 -0
  567. package/dist/codeact/compact-ids.d.ts +28 -0
  568. package/dist/codeact/compact-ids.d.ts.map +1 -0
  569. package/dist/codeact/compact-ids.js +77 -0
  570. package/dist/codeact/compact-ids.js.map +1 -0
  571. package/dist/codeact/execute-code-contract.d.ts +97 -0
  572. package/dist/codeact/execute-code-contract.d.ts.map +1 -0
  573. package/dist/codeact/execute-code-contract.js +225 -0
  574. package/dist/codeact/execute-code-contract.js.map +1 -0
  575. package/dist/codeact/fabric-package.d.ts +29 -0
  576. package/dist/codeact/fabric-package.d.ts.map +1 -0
  577. package/dist/codeact/fabric-package.js +62 -0
  578. package/dist/codeact/fabric-package.js.map +1 -0
  579. package/dist/codeact/flow-package.d.ts +31 -0
  580. package/dist/codeact/flow-package.d.ts.map +1 -0
  581. package/dist/codeact/flow-package.js +80 -0
  582. package/dist/codeact/flow-package.js.map +1 -0
  583. package/dist/codeact/graph-dsl-package.d.ts +42 -0
  584. package/dist/codeact/graph-dsl-package.d.ts.map +1 -0
  585. package/dist/codeact/graph-dsl-package.js +100 -0
  586. package/dist/codeact/graph-dsl-package.js.map +1 -0
  587. package/dist/codeact/graph-model.d.ts +30 -0
  588. package/dist/codeact/graph-model.d.ts.map +1 -0
  589. package/dist/codeact/graph-model.js +408 -0
  590. package/dist/codeact/graph-model.js.map +1 -0
  591. package/dist/codeact/mcp-guest-contract.d.ts +66 -0
  592. package/dist/codeact/mcp-guest-contract.d.ts.map +1 -0
  593. package/dist/codeact/mcp-guest-contract.js +108 -0
  594. package/dist/codeact/mcp-guest-contract.js.map +1 -0
  595. package/dist/codeact/nodetool-api.d.ts +60 -0
  596. package/dist/codeact/nodetool-api.d.ts.map +1 -0
  597. package/dist/codeact/nodetool-api.js +2056 -0
  598. package/dist/codeact/nodetool-api.js.map +1 -0
  599. package/dist/codeact/prompt.d.ts +88 -0
  600. package/dist/codeact/prompt.d.ts.map +1 -0
  601. package/dist/codeact/prompt.js +326 -0
  602. package/dist/codeact/prompt.js.map +1 -0
  603. package/dist/codeact/sandbox-package-docs.d.ts +48 -0
  604. package/dist/codeact/sandbox-package-docs.d.ts.map +1 -0
  605. package/dist/codeact/sandbox-package-docs.js +55 -0
  606. package/dist/codeact/sandbox-package-docs.js.map +1 -0
  607. package/dist/codeact/sandbox-package-listing.d.ts +81 -0
  608. package/dist/codeact/sandbox-package-listing.d.ts.map +1 -0
  609. package/dist/codeact/sandbox-package-listing.js +101 -0
  610. package/dist/codeact/sandbox-package-listing.js.map +1 -0
  611. package/dist/codeact/sandbox-packages.d.ts +72 -0
  612. package/dist/codeact/sandbox-packages.d.ts.map +1 -0
  613. package/dist/codeact/sandbox-packages.js +230 -0
  614. package/dist/codeact/sandbox-packages.js.map +1 -0
  615. package/dist/codeact/timeline-package.d.ts +5 -0
  616. package/dist/codeact/timeline-package.d.ts.map +1 -0
  617. package/dist/codeact/timeline-package.js +10 -0
  618. package/dist/codeact/timeline-package.js.map +1 -0
  619. package/dist/codeact/tool-api.d.ts +197 -0
  620. package/dist/codeact/tool-api.d.ts.map +1 -0
  621. package/dist/codeact/tool-api.js +445 -0
  622. package/dist/codeact/tool-api.js.map +1 -0
  623. package/dist/codeact/tools-prelude.d.ts +32 -0
  624. package/dist/codeact/tools-prelude.d.ts.map +1 -0
  625. package/dist/codeact/tools-prelude.js +65 -0
  626. package/dist/codeact/tools-prelude.js.map +1 -0
  627. package/dist/constants.d.ts +47 -2
  628. package/dist/constants.d.ts.map +1 -1
  629. package/dist/constants.js +64 -2
  630. package/dist/constants.js.map +1 -1
  631. package/dist/custom-animation-bake.d.ts +57 -0
  632. package/dist/custom-animation-bake.d.ts.map +1 -0
  633. package/dist/custom-animation-bake.js +88 -0
  634. package/dist/custom-animation-bake.js.map +1 -0
  635. package/dist/dynamic-slots.d.ts +72 -0
  636. package/dist/dynamic-slots.d.ts.map +1 -0
  637. package/dist/dynamic-slots.js +0 -0
  638. package/dist/dynamic-slots.js.map +1 -0
  639. package/dist/evals/app-build-cases.d.ts +35 -0
  640. package/dist/evals/app-build-cases.d.ts.map +1 -0
  641. package/dist/evals/app-build-cases.js +722 -0
  642. package/dist/evals/app-build-cases.js.map +1 -0
  643. package/dist/evals/app-build-eval.d.ts +208 -0
  644. package/dist/evals/app-build-eval.d.ts.map +1 -0
  645. package/dist/evals/app-build-eval.js +518 -0
  646. package/dist/evals/app-build-eval.js.map +1 -0
  647. package/dist/evals/app-build-plan.d.ts +76 -0
  648. package/dist/evals/app-build-plan.d.ts.map +1 -0
  649. package/dist/evals/app-build-plan.js +140 -0
  650. package/dist/evals/app-build-plan.js.map +1 -0
  651. package/dist/evals/code-gen-cases.d.ts +13 -0
  652. package/dist/evals/code-gen-cases.d.ts.map +1 -0
  653. package/dist/evals/code-gen-cases.js +124 -0
  654. package/dist/evals/code-gen-cases.js.map +1 -0
  655. package/dist/evals/code-gen-eval.d.ts +109 -0
  656. package/dist/evals/code-gen-eval.d.ts.map +1 -0
  657. package/dist/evals/code-gen-eval.js +299 -0
  658. package/dist/evals/code-gen-eval.js.map +1 -0
  659. package/dist/evals/codeact-api-cases.d.ts +14 -0
  660. package/dist/evals/codeact-api-cases.d.ts.map +1 -0
  661. package/dist/evals/codeact-api-cases.js +29 -0
  662. package/dist/evals/codeact-api-cases.js.map +1 -0
  663. package/dist/evals/codeact-api-core.d.ts +23 -0
  664. package/dist/evals/codeact-api-core.d.ts.map +1 -0
  665. package/dist/evals/codeact-api-core.js +1411 -0
  666. package/dist/evals/codeact-api-core.js.map +1 -0
  667. package/dist/evals/codeact-api-surfaces.d.ts +25 -0
  668. package/dist/evals/codeact-api-surfaces.d.ts.map +1 -0
  669. package/dist/evals/codeact-api-surfaces.js +2191 -0
  670. package/dist/evals/codeact-api-surfaces.js.map +1 -0
  671. package/dist/evals/codeact-cases.d.ts +76 -0
  672. package/dist/evals/codeact-cases.d.ts.map +1 -0
  673. package/dist/evals/codeact-cases.js +151 -0
  674. package/dist/evals/codeact-cases.js.map +1 -0
  675. package/dist/evals/codeact-eval.d.ts +66 -0
  676. package/dist/evals/codeact-eval.d.ts.map +1 -0
  677. package/dist/evals/codeact-eval.js +250 -0
  678. package/dist/evals/codeact-eval.js.map +1 -0
  679. package/dist/evals/codeact-sandbox-pack-cases.d.ts +31 -0
  680. package/dist/evals/codeact-sandbox-pack-cases.d.ts.map +1 -0
  681. package/dist/evals/codeact-sandbox-pack-cases.js +219 -0
  682. package/dist/evals/codeact-sandbox-pack-cases.js.map +1 -0
  683. package/dist/evals/escalation-cases.d.ts +22 -0
  684. package/dist/evals/escalation-cases.d.ts.map +1 -0
  685. package/dist/evals/escalation-cases.js +343 -0
  686. package/dist/evals/escalation-cases.js.map +1 -0
  687. package/dist/evals/escalation.d.ts +92 -0
  688. package/dist/evals/escalation.d.ts.map +1 -0
  689. package/dist/evals/escalation.js +152 -0
  690. package/dist/evals/escalation.js.map +1 -0
  691. package/dist/evals/goal-judge.d.ts +51 -0
  692. package/dist/evals/goal-judge.d.ts.map +1 -0
  693. package/dist/evals/goal-judge.js +152 -0
  694. package/dist/evals/goal-judge.js.map +1 -0
  695. package/dist/evals/graph-e2e-cases.d.ts +21 -0
  696. package/dist/evals/graph-e2e-cases.d.ts.map +1 -0
  697. package/dist/evals/graph-e2e-cases.js +262 -0
  698. package/dist/evals/graph-e2e-cases.js.map +1 -0
  699. package/dist/evals/graph-e2e-eval.d.ts +202 -0
  700. package/dist/evals/graph-e2e-eval.d.ts.map +1 -0
  701. package/dist/evals/graph-e2e-eval.js +438 -0
  702. package/dist/evals/graph-e2e-eval.js.map +1 -0
  703. package/dist/evals/graph-planner-cases.d.ts +12 -0
  704. package/dist/evals/graph-planner-cases.d.ts.map +1 -0
  705. package/dist/evals/graph-planner-cases.js +256 -0
  706. package/dist/evals/graph-planner-cases.js.map +1 -0
  707. package/dist/evals/graph-planner-eval.d.ts +178 -0
  708. package/dist/evals/graph-planner-eval.d.ts.map +1 -0
  709. package/dist/evals/graph-planner-eval.js +495 -0
  710. package/dist/evals/graph-planner-eval.js.map +1 -0
  711. package/dist/evals/planner-tools.d.ts +21 -0
  712. package/dist/evals/planner-tools.d.ts.map +1 -0
  713. package/dist/evals/planner-tools.js +66 -0
  714. package/dist/evals/planner-tools.js.map +1 -0
  715. package/dist/evals/subtask-cases.d.ts +88 -0
  716. package/dist/evals/subtask-cases.d.ts.map +1 -0
  717. package/dist/evals/subtask-cases.js +322 -0
  718. package/dist/evals/subtask-cases.js.map +1 -0
  719. package/dist/evals/subtask-eval.d.ts +129 -0
  720. package/dist/evals/subtask-eval.d.ts.map +1 -0
  721. package/dist/evals/subtask-eval.js +397 -0
  722. package/dist/evals/subtask-eval.js.map +1 -0
  723. package/dist/evals/surfaces/app.d.ts +19 -0
  724. package/dist/evals/surfaces/app.d.ts.map +1 -0
  725. package/dist/evals/surfaces/app.js +341 -0
  726. package/dist/evals/surfaces/app.js.map +1 -0
  727. package/dist/evals/surfaces/creative-pipeline.d.ts +203 -0
  728. package/dist/evals/surfaces/creative-pipeline.d.ts.map +1 -0
  729. package/dist/evals/surfaces/creative-pipeline.js +909 -0
  730. package/dist/evals/surfaces/creative-pipeline.js.map +1 -0
  731. package/dist/evals/surfaces/game.d.ts +5 -0
  732. package/dist/evals/surfaces/game.d.ts.map +1 -0
  733. package/dist/evals/surfaces/game.js +42 -0
  734. package/dist/evals/surfaces/game.js.map +1 -0
  735. package/dist/evals/surfaces/js-script.d.ts +66 -0
  736. package/dist/evals/surfaces/js-script.d.ts.map +1 -0
  737. package/dist/evals/surfaces/js-script.js +407 -0
  738. package/dist/evals/surfaces/js-script.js.map +1 -0
  739. package/dist/evals/surfaces/memory.d.ts +34 -0
  740. package/dist/evals/surfaces/memory.d.ts.map +1 -0
  741. package/dist/evals/surfaces/memory.js +264 -0
  742. package/dist/evals/surfaces/memory.js.map +1 -0
  743. package/dist/evals/surfaces/model3d.d.ts +45 -0
  744. package/dist/evals/surfaces/model3d.d.ts.map +1 -0
  745. package/dist/evals/surfaces/model3d.js +346 -0
  746. package/dist/evals/surfaces/model3d.js.map +1 -0
  747. package/dist/evals/surfaces/script.d.ts +96 -0
  748. package/dist/evals/surfaces/script.d.ts.map +1 -0
  749. package/dist/evals/surfaces/script.js +709 -0
  750. package/dist/evals/surfaces/script.js.map +1 -0
  751. package/dist/evals/surfaces/sketch.d.ts +124 -0
  752. package/dist/evals/surfaces/sketch.d.ts.map +1 -0
  753. package/dist/evals/surfaces/sketch.js +1298 -0
  754. package/dist/evals/surfaces/sketch.js.map +1 -0
  755. package/dist/evals/surfaces/storyboard.d.ts +97 -0
  756. package/dist/evals/surfaces/storyboard.d.ts.map +1 -0
  757. package/dist/evals/surfaces/storyboard.js +693 -0
  758. package/dist/evals/surfaces/storyboard.js.map +1 -0
  759. package/dist/evals/surfaces/timeline.d.ts +416 -0
  760. package/dist/evals/surfaces/timeline.d.ts.map +1 -0
  761. package/dist/evals/surfaces/timeline.js +3267 -0
  762. package/dist/evals/surfaces/timeline.js.map +1 -0
  763. package/dist/evals/task-planner-cases.d.ts +57 -0
  764. package/dist/evals/task-planner-cases.d.ts.map +1 -0
  765. package/dist/evals/task-planner-cases.js +117 -0
  766. package/dist/evals/task-planner-cases.js.map +1 -0
  767. package/dist/evals/task-planner-eval.d.ts +101 -0
  768. package/dist/evals/task-planner-eval.d.ts.map +1 -0
  769. package/dist/evals/task-planner-eval.js +380 -0
  770. package/dist/evals/task-planner-eval.js.map +1 -0
  771. package/dist/evals/tool-loop-bridge.d.ts +57 -0
  772. package/dist/evals/tool-loop-bridge.d.ts.map +1 -0
  773. package/dist/evals/tool-loop-bridge.js +129 -0
  774. package/dist/evals/tool-loop-bridge.js.map +1 -0
  775. package/dist/evals/tool-loop-cases.d.ts +21 -0
  776. package/dist/evals/tool-loop-cases.d.ts.map +1 -0
  777. package/dist/evals/tool-loop-cases.js +401 -0
  778. package/dist/evals/tool-loop-cases.js.map +1 -0
  779. package/dist/evals/tool-loop-eval.d.ts +234 -0
  780. package/dist/evals/tool-loop-eval.d.ts.map +1 -0
  781. package/dist/evals/tool-loop-eval.js +373 -0
  782. package/dist/evals/tool-loop-eval.js.map +1 -0
  783. package/dist/evals/tool-loop-permission.d.ts +43 -0
  784. package/dist/evals/tool-loop-permission.d.ts.map +1 -0
  785. package/dist/evals/tool-loop-permission.js +76 -0
  786. package/dist/evals/tool-loop-permission.js.map +1 -0
  787. package/dist/game-examples.d.ts +447 -0
  788. package/dist/game-examples.d.ts.map +1 -0
  789. package/dist/game-examples.js +187 -0
  790. package/dist/game-examples.js.map +1 -0
  791. package/dist/graph-builder.d.ts +55 -3
  792. package/dist/graph-builder.d.ts.map +1 -1
  793. package/dist/graph-builder.js +159 -4
  794. package/dist/graph-builder.js.map +1 -1
  795. package/dist/graph-dsl-core.d.ts +25 -0
  796. package/dist/graph-dsl-core.d.ts.map +1 -0
  797. package/dist/graph-dsl-core.js +312 -0
  798. package/dist/graph-dsl-core.js.map +1 -0
  799. package/dist/graph-dsl.d.ts +30 -0
  800. package/dist/graph-dsl.d.ts.map +1 -0
  801. package/dist/graph-dsl.js +116 -0
  802. package/dist/graph-dsl.js.map +1 -0
  803. package/dist/host-binaries.d.ts +6 -0
  804. package/dist/host-binaries.d.ts.map +1 -0
  805. package/dist/host-binaries.js +6 -0
  806. package/dist/host-binaries.js.map +1 -0
  807. package/dist/host-binary-guard.d.ts +100 -0
  808. package/dist/host-binary-guard.d.ts.map +1 -0
  809. package/dist/host-binary-guard.js +205 -0
  810. package/dist/host-binary-guard.js.map +1 -0
  811. package/dist/host-modules/aws.d.ts +57 -0
  812. package/dist/host-modules/aws.d.ts.map +1 -0
  813. package/dist/host-modules/aws.js +309 -0
  814. package/dist/host-modules/aws.js.map +1 -0
  815. package/dist/host-modules/chrono.d.ts +15 -0
  816. package/dist/host-modules/chrono.d.ts.map +1 -0
  817. package/dist/host-modules/chrono.js +35 -0
  818. package/dist/host-modules/chrono.js.map +1 -0
  819. package/dist/host-modules/csv.d.ts +17 -0
  820. package/dist/host-modules/csv.d.ts.map +1 -0
  821. package/dist/host-modules/csv.js +64 -0
  822. package/dist/host-modules/csv.js.map +1 -0
  823. package/dist/host-modules/diff.d.ts +9 -0
  824. package/dist/host-modules/diff.d.ts.map +1 -0
  825. package/dist/host-modules/diff.js +26 -0
  826. package/dist/host-modules/diff.js.map +1 -0
  827. package/dist/host-modules/dispatcher.d.ts +41 -0
  828. package/dist/host-modules/dispatcher.d.ts.map +1 -0
  829. package/dist/host-modules/dispatcher.js +99 -0
  830. package/dist/host-modules/dispatcher.js.map +1 -0
  831. package/dist/host-modules/docx.d.ts +19 -0
  832. package/dist/host-modules/docx.d.ts.map +1 -0
  833. package/dist/host-modules/docx.js +120 -0
  834. package/dist/host-modules/docx.js.map +1 -0
  835. package/dist/host-modules/epub.d.ts +48 -0
  836. package/dist/host-modules/epub.d.ts.map +1 -0
  837. package/dist/host-modules/epub.js +100 -0
  838. package/dist/host-modules/epub.js.map +1 -0
  839. package/dist/host-modules/exif.d.ts +8 -0
  840. package/dist/host-modules/exif.d.ts.map +1 -0
  841. package/dist/host-modules/exif.js +19 -0
  842. package/dist/host-modules/exif.js.map +1 -0
  843. package/dist/host-modules/expr.d.ts +16 -0
  844. package/dist/host-modules/expr.d.ts.map +1 -0
  845. package/dist/host-modules/expr.js +18 -0
  846. package/dist/host-modules/expr.js.map +1 -0
  847. package/dist/host-modules/fabric.d.ts +46 -0
  848. package/dist/host-modules/fabric.d.ts.map +1 -0
  849. package/dist/host-modules/fabric.js +178 -0
  850. package/dist/host-modules/fabric.js.map +1 -0
  851. package/dist/host-modules/html.d.ts +51 -0
  852. package/dist/host-modules/html.d.ts.map +1 -0
  853. package/dist/host-modules/html.js +198 -0
  854. package/dist/host-modules/html.js.map +1 -0
  855. package/dist/host-modules/ics.d.ts +9 -0
  856. package/dist/host-modules/ics.d.ts.map +1 -0
  857. package/dist/host-modules/ics.js +35 -0
  858. package/dist/host-modules/ics.js.map +1 -0
  859. package/dist/host-modules/limits.d.ts +41 -0
  860. package/dist/host-modules/limits.d.ts.map +1 -0
  861. package/dist/host-modules/limits.js +76 -0
  862. package/dist/host-modules/limits.js.map +1 -0
  863. package/dist/host-modules/mammoth.d.ts +11 -0
  864. package/dist/host-modules/mammoth.d.ts.map +1 -0
  865. package/dist/host-modules/mammoth.js +29 -0
  866. package/dist/host-modules/mammoth.js.map +1 -0
  867. package/dist/host-modules/notion.d.ts +45 -0
  868. package/dist/host-modules/notion.d.ts.map +1 -0
  869. package/dist/host-modules/notion.js +128 -0
  870. package/dist/host-modules/notion.js.map +1 -0
  871. package/dist/host-modules/ocr.d.ts +25 -0
  872. package/dist/host-modules/ocr.d.ts.map +1 -0
  873. package/dist/host-modules/ocr.js +74 -0
  874. package/dist/host-modules/ocr.js.map +1 -0
  875. package/dist/host-modules/pdf.d.ts +21 -0
  876. package/dist/host-modules/pdf.d.ts.map +1 -0
  877. package/dist/host-modules/pdf.js +53 -0
  878. package/dist/host-modules/pdf.js.map +1 -0
  879. package/dist/host-modules/pdflib.d.ts +17 -0
  880. package/dist/host-modules/pdflib.d.ts.map +1 -0
  881. package/dist/host-modules/pdflib.js +138 -0
  882. package/dist/host-modules/pdflib.js.map +1 -0
  883. package/dist/host-modules/pptx.d.ts +19 -0
  884. package/dist/host-modules/pptx.d.ts.map +1 -0
  885. package/dist/host-modules/pptx.js +67 -0
  886. package/dist/host-modules/pptx.js.map +1 -0
  887. package/dist/host-modules/pptxgen.d.ts +13 -0
  888. package/dist/host-modules/pptxgen.d.ts.map +1 -0
  889. package/dist/host-modules/pptxgen.js +98 -0
  890. package/dist/host-modules/pptxgen.js.map +1 -0
  891. package/dist/host-modules/prepared-request.d.ts +41 -0
  892. package/dist/host-modules/prepared-request.d.ts.map +1 -0
  893. package/dist/host-modules/prepared-request.js +104 -0
  894. package/dist/host-modules/prepared-request.js.map +1 -0
  895. package/dist/host-modules/registry.d.ts +31 -0
  896. package/dist/host-modules/registry.d.ts.map +1 -0
  897. package/dist/host-modules/registry.js +193 -0
  898. package/dist/host-modules/registry.js.map +1 -0
  899. package/dist/host-modules/subtitle.d.ts +15 -0
  900. package/dist/host-modules/subtitle.d.ts.map +1 -0
  901. package/dist/host-modules/subtitle.js +45 -0
  902. package/dist/host-modules/subtitle.js.map +1 -0
  903. package/dist/host-modules/supabase.d.ts +42 -0
  904. package/dist/host-modules/supabase.d.ts.map +1 -0
  905. package/dist/host-modules/supabase.js +141 -0
  906. package/dist/host-modules/supabase.js.map +1 -0
  907. package/dist/host-modules/tfjs.d.ts +42 -0
  908. package/dist/host-modules/tfjs.d.ts.map +1 -0
  909. package/dist/host-modules/tfjs.js +186 -0
  910. package/dist/host-modules/tfjs.js.map +1 -0
  911. package/dist/host-modules/tokens.d.ts +17 -0
  912. package/dist/host-modules/tokens.d.ts.map +1 -0
  913. package/dist/host-modules/tokens.js +74 -0
  914. package/dist/host-modules/tokens.js.map +1 -0
  915. package/dist/host-modules/twilio.d.ts +34 -0
  916. package/dist/host-modules/twilio.d.ts.map +1 -0
  917. package/dist/host-modules/twilio.js +67 -0
  918. package/dist/host-modules/twilio.js.map +1 -0
  919. package/dist/host-modules/xlsx.d.ts +26 -0
  920. package/dist/host-modules/xlsx.d.ts.map +1 -0
  921. package/dist/host-modules/xlsx.js +323 -0
  922. package/dist/host-modules/xlsx.js.map +1 -0
  923. package/dist/host-modules/xml.d.ts +23 -0
  924. package/dist/host-modules/xml.d.ts.map +1 -0
  925. package/dist/host-modules/xml.js +38 -0
  926. package/dist/host-modules/xml.js.map +1 -0
  927. package/dist/host-modules/zip.d.ts +24 -0
  928. package/dist/host-modules/zip.d.ts.map +1 -0
  929. package/dist/host-modules/zip.js +70 -0
  930. package/dist/host-modules/zip.js.map +1 -0
  931. package/dist/index.d.ts +197 -60
  932. package/dist/index.d.ts.map +1 -1
  933. package/dist/index.js +153 -60
  934. package/dist/index.js.map +1 -1
  935. package/dist/js-sandbox-worker/host.d.ts +136 -0
  936. package/dist/js-sandbox-worker/host.d.ts.map +1 -0
  937. package/dist/js-sandbox-worker/host.js +482 -0
  938. package/dist/js-sandbox-worker/host.js.map +1 -0
  939. package/dist/js-sandbox-worker/interpreter.d.ts +276 -0
  940. package/dist/js-sandbox-worker/interpreter.d.ts.map +1 -0
  941. package/dist/js-sandbox-worker/interpreter.js +1201 -0
  942. package/dist/js-sandbox-worker/interpreter.js.map +1 -0
  943. package/dist/js-sandbox-worker/protocol.d.ts +168 -0
  944. package/dist/js-sandbox-worker/protocol.d.ts.map +1 -0
  945. package/dist/js-sandbox-worker/protocol.js +217 -0
  946. package/dist/js-sandbox-worker/protocol.js.map +1 -0
  947. package/dist/js-sandbox-worker/worker-entry.d.ts +26 -0
  948. package/dist/js-sandbox-worker/worker-entry.d.ts.map +1 -0
  949. package/dist/js-sandbox-worker/worker-entry.js +307 -0
  950. package/dist/js-sandbox-worker/worker-entry.js.map +1 -0
  951. package/dist/js-sandbox.d.ts +455 -15
  952. package/dist/js-sandbox.d.ts.map +1 -1
  953. package/dist/js-sandbox.js +1961 -309
  954. package/dist/js-sandbox.js.map +1 -1
  955. package/dist/js-script-app-runner.d.ts +9 -0
  956. package/dist/js-script-app-runner.d.ts.map +1 -0
  957. package/dist/js-script-app-runner.js +49 -0
  958. package/dist/js-script-app-runner.js.map +1 -0
  959. package/dist/js-script-sandbox.d.ts +33 -0
  960. package/dist/js-script-sandbox.d.ts.map +1 -0
  961. package/dist/js-script-sandbox.js +82 -0
  962. package/dist/js-script-sandbox.js.map +1 -0
  963. package/dist/jtbd/friction.d.ts +26 -0
  964. package/dist/jtbd/friction.d.ts.map +1 -0
  965. package/dist/jtbd/friction.js +169 -0
  966. package/dist/jtbd/friction.js.map +1 -0
  967. package/dist/jtbd/index.d.ts +6 -0
  968. package/dist/jtbd/index.d.ts.map +1 -0
  969. package/dist/jtbd/index.js +6 -0
  970. package/dist/jtbd/index.js.map +1 -0
  971. package/dist/jtbd/optimize.d.ts +71 -0
  972. package/dist/jtbd/optimize.d.ts.map +1 -0
  973. package/dist/jtbd/optimize.js +176 -0
  974. package/dist/jtbd/optimize.js.map +1 -0
  975. package/dist/jtbd/registry.d.ts +29 -0
  976. package/dist/jtbd/registry.d.ts.map +1 -0
  977. package/dist/jtbd/registry.js +451 -0
  978. package/dist/jtbd/registry.js.map +1 -0
  979. package/dist/jtbd/run.d.ts +70 -0
  980. package/dist/jtbd/run.d.ts.map +1 -0
  981. package/dist/jtbd/run.js +177 -0
  982. package/dist/jtbd/run.js.map +1 -0
  983. package/dist/jtbd/types.d.ts +141 -0
  984. package/dist/jtbd/types.d.ts.map +1 -0
  985. package/dist/jtbd/types.js +25 -0
  986. package/dist/jtbd/types.js.map +1 -0
  987. package/dist/model-prompting-skills.d.ts +45 -0
  988. package/dist/model-prompting-skills.d.ts.map +1 -0
  989. package/dist/model-prompting-skills.js +116 -0
  990. package/dist/model-prompting-skills.js.map +1 -0
  991. package/dist/network-guard.d.ts +50 -0
  992. package/dist/network-guard.d.ts.map +1 -0
  993. package/dist/network-guard.js +106 -0
  994. package/dist/network-guard.js.map +1 -0
  995. package/dist/normalize-model-properties.d.ts +26 -0
  996. package/dist/normalize-model-properties.d.ts.map +1 -0
  997. package/dist/normalize-model-properties.js +58 -0
  998. package/dist/normalize-model-properties.js.map +1 -0
  999. package/dist/output-format.d.ts +5 -1
  1000. package/dist/output-format.d.ts.map +1 -1
  1001. package/dist/output-format.js.map +1 -1
  1002. package/dist/parallel-task-executor.d.ts +68 -37
  1003. package/dist/parallel-task-executor.d.ts.map +1 -1
  1004. package/dist/parallel-task-executor.js +234 -203
  1005. package/dist/parallel-task-executor.js.map +1 -1
  1006. package/dist/prompts/background-subtask-prompt.d.ts +14 -0
  1007. package/dist/prompts/background-subtask-prompt.d.ts.map +1 -0
  1008. package/dist/prompts/background-subtask-prompt.js +64 -0
  1009. package/dist/prompts/background-subtask-prompt.js.map +1 -0
  1010. package/dist/prompts/product-knowledge.d.ts +3 -0
  1011. package/dist/prompts/product-knowledge.d.ts.map +1 -0
  1012. package/dist/prompts/product-knowledge.js +79 -0
  1013. package/dist/prompts/product-knowledge.js.map +1 -0
  1014. package/dist/prompts/read-only-search-prompt.d.ts +33 -0
  1015. package/dist/prompts/read-only-search-prompt.d.ts.map +1 -0
  1016. package/dist/prompts/read-only-search-prompt.js +109 -0
  1017. package/dist/prompts/read-only-search-prompt.js.map +1 -0
  1018. package/dist/prompts/sandbox-pack-catalog.d.ts +23 -0
  1019. package/dist/prompts/sandbox-pack-catalog.d.ts.map +1 -0
  1020. package/dist/prompts/sandbox-pack-catalog.js +40 -0
  1021. package/dist/prompts/sandbox-pack-catalog.js.map +1 -0
  1022. package/dist/prompts/security-monitor-prompt.d.ts +32 -0
  1023. package/dist/prompts/security-monitor-prompt.d.ts.map +1 -0
  1024. package/dist/prompts/security-monitor-prompt.js +99 -0
  1025. package/dist/prompts/security-monitor-prompt.js.map +1 -0
  1026. package/dist/prompts/workflow-authoring-knowledge.d.ts +77 -0
  1027. package/dist/prompts/workflow-authoring-knowledge.d.ts.map +1 -0
  1028. package/dist/prompts/workflow-authoring-knowledge.js +319 -0
  1029. package/dist/prompts/workflow-authoring-knowledge.js.map +1 -0
  1030. package/dist/run-policy.d.ts +25 -0
  1031. package/dist/run-policy.d.ts.map +1 -0
  1032. package/dist/run-policy.js +54 -0
  1033. package/dist/run-policy.js.map +1 -0
  1034. package/dist/sandbox-av-media.d.ts +33 -0
  1035. package/dist/sandbox-av-media.d.ts.map +1 -0
  1036. package/dist/sandbox-av-media.js +666 -0
  1037. package/dist/sandbox-av-media.js.map +1 -0
  1038. package/dist/sandbox-bootstrap-modules.d.ts +54 -0
  1039. package/dist/sandbox-bootstrap-modules.d.ts.map +1 -0
  1040. package/dist/sandbox-bootstrap-modules.js +104 -0
  1041. package/dist/sandbox-bootstrap-modules.js.map +1 -0
  1042. package/dist/sandbox-bytes.d.ts +43 -0
  1043. package/dist/sandbox-bytes.d.ts.map +1 -0
  1044. package/dist/sandbox-bytes.js +61 -0
  1045. package/dist/sandbox-bytes.js.map +1 -0
  1046. package/dist/sandbox-canvas-api.d.ts +30 -0
  1047. package/dist/sandbox-canvas-api.d.ts.map +1 -0
  1048. package/dist/sandbox-canvas-api.js +81 -0
  1049. package/dist/sandbox-canvas-api.js.map +1 -0
  1050. package/dist/sandbox-constants.d.ts +5 -0
  1051. package/dist/sandbox-constants.d.ts.map +1 -0
  1052. package/dist/sandbox-constants.js +13 -0
  1053. package/dist/sandbox-constants.js.map +1 -0
  1054. package/dist/sandbox-json-transport.d.ts +107 -0
  1055. package/dist/sandbox-json-transport.d.ts.map +1 -0
  1056. package/dist/sandbox-json-transport.js +324 -0
  1057. package/dist/sandbox-json-transport.js.map +1 -0
  1058. package/dist/sandbox-media-handle.d.ts +78 -0
  1059. package/dist/sandbox-media-handle.d.ts.map +1 -0
  1060. package/dist/sandbox-media-handle.js +114 -0
  1061. package/dist/sandbox-media-handle.js.map +1 -0
  1062. package/dist/sandbox-media-ref.d.ts +134 -0
  1063. package/dist/sandbox-media-ref.d.ts.map +1 -0
  1064. package/dist/sandbox-media-ref.js +442 -0
  1065. package/dist/sandbox-media-ref.js.map +1 -0
  1066. package/dist/sandbox-media.d.ts +177 -0
  1067. package/dist/sandbox-media.d.ts.map +1 -0
  1068. package/dist/sandbox-media.js +963 -0
  1069. package/dist/sandbox-media.js.map +1 -0
  1070. package/dist/sandbox-module-fixtures.d.ts +445 -0
  1071. package/dist/sandbox-module-fixtures.d.ts.map +1 -0
  1072. package/dist/sandbox-module-fixtures.js +214 -0
  1073. package/dist/sandbox-module-fixtures.js.map +1 -0
  1074. package/dist/sandbox-toolbelt.d.ts +13 -0
  1075. package/dist/sandbox-toolbelt.d.ts.map +1 -0
  1076. package/dist/sandbox-toolbelt.js +64 -0
  1077. package/dist/sandbox-toolbelt.js.map +1 -0
  1078. package/dist/security-monitor.d.ts +89 -0
  1079. package/dist/security-monitor.d.ts.map +1 -0
  1080. package/dist/security-monitor.js +307 -0
  1081. package/dist/security-monitor.js.map +1 -0
  1082. package/dist/serpapi/catalog.d.ts +101 -0
  1083. package/dist/serpapi/catalog.d.ts.map +1 -0
  1084. package/dist/serpapi/catalog.js +246 -0
  1085. package/dist/serpapi/catalog.js.map +1 -0
  1086. package/dist/serpapi/client.d.ts +81 -0
  1087. package/dist/serpapi/client.d.ts.map +1 -0
  1088. package/dist/serpapi/client.js +228 -0
  1089. package/dist/serpapi/client.js.map +1 -0
  1090. package/dist/serpapi/errors.d.ts +49 -0
  1091. package/dist/serpapi/errors.d.ts.map +1 -0
  1092. package/dist/serpapi/errors.js +64 -0
  1093. package/dist/serpapi/errors.js.map +1 -0
  1094. package/dist/serpapi/normalize.d.ts +58 -0
  1095. package/dist/serpapi/normalize.d.ts.map +1 -0
  1096. package/dist/serpapi/normalize.js +140 -0
  1097. package/dist/serpapi/normalize.js.map +1 -0
  1098. package/dist/skill-prompt.d.ts +27 -0
  1099. package/dist/skill-prompt.d.ts.map +1 -0
  1100. package/dist/skill-prompt.js +61 -0
  1101. package/dist/skill-prompt.js.map +1 -0
  1102. package/dist/step-executor.d.ts +90 -77
  1103. package/dist/step-executor.d.ts.map +1 -1
  1104. package/dist/step-executor.js +384 -690
  1105. package/dist/step-executor.js.map +1 -1
  1106. package/dist/subagent.d.ts +275 -0
  1107. package/dist/subagent.d.ts.map +1 -0
  1108. package/dist/subagent.js +444 -0
  1109. package/dist/subagent.js.map +1 -0
  1110. package/dist/supervisor/prompt.d.ts +12 -0
  1111. package/dist/supervisor/prompt.d.ts.map +1 -0
  1112. package/dist/supervisor/prompt.js +51 -0
  1113. package/dist/supervisor/prompt.js.map +1 -0
  1114. package/dist/supervisor/supervisor-agent.d.ts +72 -0
  1115. package/dist/supervisor/supervisor-agent.d.ts.map +1 -0
  1116. package/dist/supervisor/supervisor-agent.js +185 -0
  1117. package/dist/supervisor/supervisor-agent.js.map +1 -0
  1118. package/dist/supervisor/tools.d.ts +56 -0
  1119. package/dist/supervisor/tools.d.ts.map +1 -0
  1120. package/dist/supervisor/tools.js +83 -0
  1121. package/dist/supervisor/tools.js.map +1 -0
  1122. package/dist/supervisor/verdict-schema.d.ts +18 -0
  1123. package/dist/supervisor/verdict-schema.d.ts.map +1 -0
  1124. package/dist/supervisor/verdict-schema.js +58 -0
  1125. package/dist/supervisor/verdict-schema.js.map +1 -0
  1126. package/dist/system-skills.d.ts +68 -0
  1127. package/dist/system-skills.d.ts.map +1 -0
  1128. package/dist/system-skills.js +168 -0
  1129. package/dist/system-skills.js.map +1 -0
  1130. package/dist/task-executor.d.ts +90 -40
  1131. package/dist/task-executor.d.ts.map +1 -1
  1132. package/dist/task-executor.js +259 -282
  1133. package/dist/task-executor.js.map +1 -1
  1134. package/dist/task-planner.d.ts +18 -12
  1135. package/dist/task-planner.d.ts.map +1 -1
  1136. package/dist/task-planner.js +342 -328
  1137. package/dist/task-planner.js.map +1 -1
  1138. package/dist/timeline-preview/compare.d.ts +27 -0
  1139. package/dist/timeline-preview/compare.d.ts.map +1 -0
  1140. package/dist/timeline-preview/compare.js +71 -0
  1141. package/dist/timeline-preview/compare.js.map +1 -0
  1142. package/dist/timeline-preview/frames.d.ts +167 -0
  1143. package/dist/timeline-preview/frames.d.ts.map +1 -0
  1144. package/dist/timeline-preview/frames.js +646 -0
  1145. package/dist/timeline-preview/frames.js.map +1 -0
  1146. package/dist/timeline-preview/model3d.d.ts +67 -0
  1147. package/dist/timeline-preview/model3d.d.ts.map +1 -0
  1148. package/dist/timeline-preview/model3d.js +165 -0
  1149. package/dist/timeline-preview/model3d.js.map +1 -0
  1150. package/dist/timeline-preview/rasterize.d.ts +33 -0
  1151. package/dist/timeline-preview/rasterize.d.ts.map +1 -0
  1152. package/dist/timeline-preview/rasterize.js +83 -0
  1153. package/dist/timeline-preview/rasterize.js.map +1 -0
  1154. package/dist/timeline-preview/sheet.d.ts +38 -0
  1155. package/dist/timeline-preview/sheet.d.ts.map +1 -0
  1156. package/dist/timeline-preview/sheet.js +72 -0
  1157. package/dist/timeline-preview/sheet.js.map +1 -0
  1158. package/dist/tools/asset-persist.d.ts +29 -0
  1159. package/dist/tools/asset-persist.d.ts.map +1 -0
  1160. package/dist/tools/asset-persist.js +78 -0
  1161. package/dist/tools/asset-persist.js.map +1 -0
  1162. package/dist/tools/base-tool.d.ts +52 -5
  1163. package/dist/tools/base-tool.d.ts.map +1 -1
  1164. package/dist/tools/base-tool.js +180 -3
  1165. package/dist/tools/base-tool.js.map +1 -1
  1166. package/dist/tools/binary-output.d.ts +54 -0
  1167. package/dist/tools/binary-output.d.ts.map +1 -0
  1168. package/dist/tools/binary-output.js +127 -0
  1169. package/dist/tools/binary-output.js.map +1 -0
  1170. package/dist/tools/browser-tools.d.ts +5 -29
  1171. package/dist/tools/browser-tools.d.ts.map +1 -1
  1172. package/dist/tools/browser-tools.js +5 -205
  1173. package/dist/tools/browser-tools.js.map +1 -1
  1174. package/dist/tools/builtin-tools.d.ts +52 -0
  1175. package/dist/tools/builtin-tools.d.ts.map +1 -0
  1176. package/dist/tools/builtin-tools.js +276 -0
  1177. package/dist/tools/builtin-tools.js.map +1 -0
  1178. package/dist/tools/control-tool.d.ts +2 -5
  1179. package/dist/tools/control-tool.d.ts.map +1 -1
  1180. package/dist/tools/control-tool.js +18 -15
  1181. package/dist/tools/control-tool.js.map +1 -1
  1182. package/dist/tools/dataseo-tools.d.ts +34 -32
  1183. package/dist/tools/dataseo-tools.d.ts.map +1 -1
  1184. package/dist/tools/dataseo-tools.js +148 -233
  1185. package/dist/tools/dataseo-tools.js.map +1 -1
  1186. package/dist/tools/external-capability-tools.d.ts +36 -0
  1187. package/dist/tools/external-capability-tools.d.ts.map +1 -0
  1188. package/dist/tools/external-capability-tools.js +41 -0
  1189. package/dist/tools/external-capability-tools.js.map +1 -0
  1190. package/dist/tools/external-mcp-tools.d.ts +139 -0
  1191. package/dist/tools/external-mcp-tools.d.ts.map +1 -0
  1192. package/dist/tools/external-mcp-tools.js +552 -0
  1193. package/dist/tools/external-mcp-tools.js.map +1 -0
  1194. package/dist/tools/finish-step-tool.d.ts +1 -1
  1195. package/dist/tools/finish-step-tool.d.ts.map +1 -1
  1196. package/dist/tools/finish-step-tool.js +3 -3
  1197. package/dist/tools/finish-step-tool.js.map +1 -1
  1198. package/dist/tools/google-tools.d.ts +28 -39
  1199. package/dist/tools/google-tools.d.ts.map +1 -1
  1200. package/dist/tools/google-tools.js +51 -164
  1201. package/dist/tools/google-tools.js.map +1 -1
  1202. package/dist/tools/google-workspace-tools.d.ts +23 -0
  1203. package/dist/tools/google-workspace-tools.d.ts.map +1 -0
  1204. package/dist/tools/google-workspace-tools.js +26 -0
  1205. package/dist/tools/google-workspace-tools.js.map +1 -0
  1206. package/dist/tools/graph-validation-registry.d.ts +33 -0
  1207. package/dist/tools/graph-validation-registry.d.ts.map +1 -0
  1208. package/dist/tools/graph-validation-registry.js +54 -0
  1209. package/dist/tools/graph-validation-registry.js.map +1 -0
  1210. package/dist/tools/http-tools.d.ts +5 -53
  1211. package/dist/tools/http-tools.d.ts.map +1 -1
  1212. package/dist/tools/http-tools.js +5 -177
  1213. package/dist/tools/http-tools.js.map +1 -1
  1214. package/dist/tools/image-injection.d.ts +51 -0
  1215. package/dist/tools/image-injection.d.ts.map +1 -0
  1216. package/dist/tools/image-injection.js +85 -0
  1217. package/dist/tools/image-injection.js.map +1 -0
  1218. package/dist/tools/mcp-tool-support.d.ts +203 -0
  1219. package/dist/tools/mcp-tool-support.d.ts.map +1 -0
  1220. package/dist/tools/mcp-tool-support.js +536 -0
  1221. package/dist/tools/mcp-tool-support.js.map +1 -0
  1222. package/dist/tools/mcp-tools.d.ts +104 -390
  1223. package/dist/tools/mcp-tools.d.ts.map +1 -1
  1224. package/dist/tools/mcp-tools.js +128 -600
  1225. package/dist/tools/mcp-tools.js.map +1 -1
  1226. package/dist/tools/media-tools.d.ts +9 -272
  1227. package/dist/tools/media-tools.d.ts.map +1 -1
  1228. package/dist/tools/media-tools.js +11 -676
  1229. package/dist/tools/media-tools.js.map +1 -1
  1230. package/dist/tools/memory-tools.d.ts +36 -0
  1231. package/dist/tools/memory-tools.d.ts.map +1 -0
  1232. package/dist/tools/memory-tools.js +52 -0
  1233. package/dist/tools/memory-tools.js.map +1 -0
  1234. package/dist/tools/openai-tools.d.ts +28 -68
  1235. package/dist/tools/openai-tools.d.ts.map +1 -1
  1236. package/dist/tools/openai-tools.js +51 -181
  1237. package/dist/tools/openai-tools.js.map +1 -1
  1238. package/dist/tools/plan-builder-tools.d.ts +141 -7
  1239. package/dist/tools/plan-builder-tools.d.ts.map +1 -1
  1240. package/dist/tools/plan-builder-tools.js +159 -86
  1241. package/dist/tools/plan-builder-tools.js.map +1 -1
  1242. package/dist/tools/run-search-tool.d.ts +82 -0
  1243. package/dist/tools/run-search-tool.d.ts.map +1 -0
  1244. package/dist/tools/run-search-tool.js +121 -0
  1245. package/dist/tools/run-search-tool.js.map +1 -0
  1246. package/dist/tools/run-subtask-tool.d.ts +49 -0
  1247. package/dist/tools/run-subtask-tool.d.ts.map +1 -0
  1248. package/dist/tools/run-subtask-tool.js +88 -0
  1249. package/dist/tools/run-subtask-tool.js.map +1 -0
  1250. package/dist/tools/search-tools.d.ts +5 -36
  1251. package/dist/tools/search-tools.d.ts.map +1 -1
  1252. package/dist/tools/search-tools.js +5 -215
  1253. package/dist/tools/search-tools.js.map +1 -1
  1254. package/dist/tools/serp-providers/apify-provider.d.ts +18 -0
  1255. package/dist/tools/serp-providers/apify-provider.d.ts.map +1 -0
  1256. package/dist/tools/serp-providers/apify-provider.js +93 -0
  1257. package/dist/tools/serp-providers/apify-provider.js.map +1 -0
  1258. package/dist/tools/serp-providers/brave-provider.d.ts +34 -0
  1259. package/dist/tools/serp-providers/brave-provider.d.ts.map +1 -0
  1260. package/dist/tools/serp-providers/brave-provider.js +86 -0
  1261. package/dist/tools/serp-providers/brave-provider.js.map +1 -0
  1262. package/dist/tools/serp-providers/dataforseo-provider.d.ts +14 -1
  1263. package/dist/tools/serp-providers/dataforseo-provider.d.ts.map +1 -1
  1264. package/dist/tools/serp-providers/dataforseo-provider.js +0 -9
  1265. package/dist/tools/serp-providers/dataforseo-provider.js.map +1 -1
  1266. package/dist/tools/serp-providers/gemini-provider.d.ts +45 -0
  1267. package/dist/tools/serp-providers/gemini-provider.d.ts.map +1 -0
  1268. package/dist/tools/serp-providers/gemini-provider.js +148 -0
  1269. package/dist/tools/serp-providers/gemini-provider.js.map +1 -0
  1270. package/dist/tools/serp-providers/index.d.ts +61 -0
  1271. package/dist/tools/serp-providers/index.d.ts.map +1 -1
  1272. package/dist/tools/serp-providers/index.js +119 -3
  1273. package/dist/tools/serp-providers/index.js.map +1 -1
  1274. package/dist/tools/serp-providers/openai-provider.d.ts +58 -0
  1275. package/dist/tools/serp-providers/openai-provider.d.ts.map +1 -0
  1276. package/dist/tools/serp-providers/openai-provider.js +113 -0
  1277. package/dist/tools/serp-providers/openai-provider.js.map +1 -0
  1278. package/dist/tools/serp-providers/serpapi-provider.d.ts +9 -5
  1279. package/dist/tools/serp-providers/serpapi-provider.d.ts.map +1 -1
  1280. package/dist/tools/serp-providers/serpapi-provider.js +26 -44
  1281. package/dist/tools/serp-providers/serpapi-provider.js.map +1 -1
  1282. package/dist/tools/serp-tool-factory.d.ts +27 -0
  1283. package/dist/tools/serp-tool-factory.d.ts.map +1 -0
  1284. package/dist/tools/serp-tool-factory.js +56 -0
  1285. package/dist/tools/serp-tool-factory.js.map +1 -0
  1286. package/dist/tools/shared-tools.d.ts +33 -0
  1287. package/dist/tools/shared-tools.d.ts.map +1 -0
  1288. package/dist/tools/shared-tools.js +39 -0
  1289. package/dist/tools/shared-tools.js.map +1 -0
  1290. package/dist/tools/start-subtask-tool.d.ts +51 -0
  1291. package/dist/tools/start-subtask-tool.d.ts.map +1 -0
  1292. package/dist/tools/start-subtask-tool.js +189 -0
  1293. package/dist/tools/start-subtask-tool.js.map +1 -0
  1294. package/dist/tools/submit-code-tool.d.ts +159 -0
  1295. package/dist/tools/submit-code-tool.d.ts.map +1 -0
  1296. package/dist/tools/submit-code-tool.js +209 -0
  1297. package/dist/tools/submit-code-tool.js.map +1 -0
  1298. package/dist/tools/subtask-fields.d.ts +11 -0
  1299. package/dist/tools/subtask-fields.d.ts.map +1 -0
  1300. package/dist/tools/subtask-fields.js +11 -0
  1301. package/dist/tools/subtask-fields.js.map +1 -0
  1302. package/dist/tools/todo-tools.d.ts +15 -0
  1303. package/dist/tools/todo-tools.d.ts.map +1 -0
  1304. package/dist/tools/todo-tools.js +15 -0
  1305. package/dist/tools/todo-tools.js.map +1 -0
  1306. package/dist/tools/tool-permissions.d.ts +40 -0
  1307. package/dist/tools/tool-permissions.d.ts.map +1 -0
  1308. package/dist/tools/tool-permissions.js +52 -0
  1309. package/dist/tools/tool-permissions.js.map +1 -0
  1310. package/dist/tools/tool-search.d.ts +39 -0
  1311. package/dist/tools/tool-search.d.ts.map +1 -0
  1312. package/dist/tools/tool-search.js +108 -0
  1313. package/dist/tools/tool-search.js.map +1 -0
  1314. package/dist/tools/vector-tool-support.d.ts +15 -0
  1315. package/dist/tools/vector-tool-support.d.ts.map +1 -0
  1316. package/dist/tools/vector-tool-support.js +133 -0
  1317. package/dist/tools/vector-tool-support.js.map +1 -0
  1318. package/dist/tools/vector-tools.d.ts +13 -220
  1319. package/dist/tools/vector-tools.d.ts.map +1 -1
  1320. package/dist/tools/vector-tools.js +7 -578
  1321. package/dist/tools/vector-tools.js.map +1 -1
  1322. package/dist/tools/wait-subtasks-tool.d.ts +27 -0
  1323. package/dist/tools/wait-subtasks-tool.d.ts.map +1 -0
  1324. package/dist/tools/wait-subtasks-tool.js +66 -0
  1325. package/dist/tools/wait-subtasks-tool.js.map +1 -0
  1326. package/dist/tsconfig.tests.tmp.tsbuildinfo +1 -0
  1327. package/dist/types.d.ts +16 -31
  1328. package/dist/types.d.ts.map +1 -1
  1329. package/dist/types.js +8 -1
  1330. package/dist/types.js.map +1 -1
  1331. package/dist/utils/dag-scheduler.d.ts +85 -0
  1332. package/dist/utils/dag-scheduler.d.ts.map +1 -0
  1333. package/dist/utils/dag-scheduler.js +180 -0
  1334. package/dist/utils/dag-scheduler.js.map +1 -0
  1335. package/dist/utils/json-parser.d.ts +32 -1
  1336. package/dist/utils/json-parser.d.ts.map +1 -1
  1337. package/dist/utils/json-parser.js +145 -10
  1338. package/dist/utils/json-parser.js.map +1 -1
  1339. package/dist/utils/json-schema-validate.d.ts +29 -0
  1340. package/dist/utils/json-schema-validate.d.ts.map +1 -0
  1341. package/dist/utils/json-schema-validate.js +228 -0
  1342. package/dist/utils/json-schema-validate.js.map +1 -0
  1343. package/dist/utils/link-abort.d.ts +13 -0
  1344. package/dist/utils/link-abort.d.ts.map +1 -0
  1345. package/dist/utils/link-abort.js +23 -0
  1346. package/dist/utils/link-abort.js.map +1 -0
  1347. package/dist/utils/merge-generators.d.ts +58 -0
  1348. package/dist/utils/merge-generators.d.ts.map +1 -0
  1349. package/dist/utils/merge-generators.js +148 -0
  1350. package/dist/utils/merge-generators.js.map +1 -0
  1351. package/dist/utils/remove-base64-images.d.ts +0 -5
  1352. package/dist/utils/remove-base64-images.d.ts.map +1 -1
  1353. package/dist/utils/remove-base64-images.js.map +1 -1
  1354. package/dist/utils/step-failure.d.ts +20 -0
  1355. package/dist/utils/step-failure.d.ts.map +1 -0
  1356. package/dist/utils/step-failure.js +43 -0
  1357. package/dist/utils/step-failure.js.map +1 -0
  1358. package/dist/utils/think-tags.d.ts +16 -0
  1359. package/dist/utils/think-tags.d.ts.map +1 -0
  1360. package/dist/utils/think-tags.js +23 -0
  1361. package/dist/utils/think-tags.js.map +1 -0
  1362. package/dist/utils/type-guards.d.ts +26 -0
  1363. package/dist/utils/type-guards.d.ts.map +1 -0
  1364. package/dist/utils/type-guards.js +44 -0
  1365. package/dist/utils/type-guards.js.map +1 -0
  1366. package/dist/utils/ui-event-buffer.d.ts +18 -0
  1367. package/dist/utils/ui-event-buffer.d.ts.map +1 -0
  1368. package/dist/utils/ui-event-buffer.js +18 -0
  1369. package/dist/utils/ui-event-buffer.js.map +1 -0
  1370. package/dist/utils/wrap-generators-parallel.d.ts +0 -5
  1371. package/dist/utils/wrap-generators-parallel.d.ts.map +1 -1
  1372. package/dist/utils/wrap-generators-parallel.js +3 -6
  1373. package/dist/utils/wrap-generators-parallel.js.map +1 -1
  1374. package/dist/wasm-sandbox/host.d.ts +106 -0
  1375. package/dist/wasm-sandbox/host.d.ts.map +1 -0
  1376. package/dist/wasm-sandbox/host.js +409 -0
  1377. package/dist/wasm-sandbox/host.js.map +1 -0
  1378. package/dist/wasm-sandbox/workers.d.ts +43 -0
  1379. package/dist/wasm-sandbox/workers.d.ts.map +1 -0
  1380. package/dist/wasm-sandbox/workers.js +150 -0
  1381. package/dist/wasm-sandbox/workers.js.map +1 -0
  1382. package/dist/workspace-paths.d.ts +40 -0
  1383. package/dist/workspace-paths.d.ts.map +1 -0
  1384. package/dist/workspace-paths.js +102 -0
  1385. package/dist/workspace-paths.js.map +1 -0
  1386. package/dist/yt-dlp-gate.d.ts +19 -0
  1387. package/dist/yt-dlp-gate.d.ts.map +1 -0
  1388. package/dist/yt-dlp-gate.js +22 -0
  1389. package/dist/yt-dlp-gate.js.map +1 -0
  1390. package/package.json +112 -14
  1391. package/dist/agent-executor.d.ts +0 -62
  1392. package/dist/agent-executor.d.ts.map +0 -1
  1393. package/dist/agent-executor.js +0 -324
  1394. package/dist/agent-executor.js.map +0 -1
  1395. package/dist/agent-step-executor.d.ts +0 -28
  1396. package/dist/agent-step-executor.d.ts.map +0 -1
  1397. package/dist/agent-step-executor.js +0 -99
  1398. package/dist/agent-step-executor.js.map +0 -1
  1399. package/dist/agent-workflow-runner.d.ts +0 -31
  1400. package/dist/agent-workflow-runner.d.ts.map +0 -1
  1401. package/dist/agent-workflow-runner.js +0 -124
  1402. package/dist/agent-workflow-runner.js.map +0 -1
  1403. package/dist/agent.d.ts +0 -115
  1404. package/dist/agent.d.ts.map +0 -1
  1405. package/dist/agent.js +0 -587
  1406. package/dist/agent.js.map +0 -1
  1407. package/dist/base-agent.d.ts +0 -42
  1408. package/dist/base-agent.d.ts.map +0 -1
  1409. package/dist/base-agent.js +0 -29
  1410. package/dist/base-agent.js.map +0 -1
  1411. package/dist/graph-planner.d.ts +0 -56
  1412. package/dist/graph-planner.d.ts.map +0 -1
  1413. package/dist/graph-planner.js +0 -311
  1414. package/dist/graph-planner.js.map +0 -1
  1415. package/dist/multi-mode-agent.d.ts +0 -86
  1416. package/dist/multi-mode-agent.d.ts.map +0 -1
  1417. package/dist/multi-mode-agent.js +0 -476
  1418. package/dist/multi-mode-agent.js.map +0 -1
  1419. package/dist/prompts/graph-planner-prompt.d.ts +0 -48
  1420. package/dist/prompts/graph-planner-prompt.d.ts.map +0 -1
  1421. package/dist/prompts/graph-planner-prompt.js +0 -180
  1422. package/dist/prompts/graph-planner-prompt.js.map +0 -1
  1423. package/dist/reject-agentic-provider.d.ts +0 -21
  1424. package/dist/reject-agentic-provider.d.ts.map +0 -1
  1425. package/dist/reject-agentic-provider.js +0 -32
  1426. package/dist/reject-agentic-provider.js.map +0 -1
  1427. package/dist/simple-agent.d.ts +0 -29
  1428. package/dist/simple-agent.d.ts.map +0 -1
  1429. package/dist/simple-agent.js +0 -54
  1430. package/dist/simple-agent.js.map +0 -1
  1431. package/dist/sub-agent-planner.d.ts +0 -33
  1432. package/dist/sub-agent-planner.d.ts.map +0 -1
  1433. package/dist/sub-agent-planner.js +0 -203
  1434. package/dist/sub-agent-planner.js.map +0 -1
  1435. package/dist/team/db-task-board.d.ts +0 -54
  1436. package/dist/team/db-task-board.d.ts.map +0 -1
  1437. package/dist/team/db-task-board.js +0 -361
  1438. package/dist/team/db-task-board.js.map +0 -1
  1439. package/dist/team/edge-message-bus.d.ts +0 -51
  1440. package/dist/team/edge-message-bus.d.ts.map +0 -1
  1441. package/dist/team/edge-message-bus.js +0 -169
  1442. package/dist/team/edge-message-bus.js.map +0 -1
  1443. package/dist/team/edge-task-board.d.ts +0 -77
  1444. package/dist/team/edge-task-board.d.ts.map +0 -1
  1445. package/dist/team/edge-task-board.js +0 -140
  1446. package/dist/team/edge-task-board.js.map +0 -1
  1447. package/dist/team/index.d.ts +0 -16
  1448. package/dist/team/index.d.ts.map +0 -1
  1449. package/dist/team/index.js +0 -17
  1450. package/dist/team/index.js.map +0 -1
  1451. package/dist/team/message-bus.d.ts +0 -58
  1452. package/dist/team/message-bus.d.ts.map +0 -1
  1453. package/dist/team/message-bus.js +0 -151
  1454. package/dist/team/message-bus.js.map +0 -1
  1455. package/dist/team/task-board.d.ts +0 -106
  1456. package/dist/team/task-board.d.ts.map +0 -1
  1457. package/dist/team/task-board.js +0 -370
  1458. package/dist/team/task-board.js.map +0 -1
  1459. package/dist/team/team-executor.d.ts +0 -72
  1460. package/dist/team/team-executor.d.ts.map +0 -1
  1461. package/dist/team/team-executor.js +0 -466
  1462. package/dist/team/team-executor.js.map +0 -1
  1463. package/dist/team/team-tools.d.ts +0 -252
  1464. package/dist/team/team-tools.d.ts.map +0 -1
  1465. package/dist/team/team-tools.js +0 -412
  1466. package/dist/team/team-tools.js.map +0 -1
  1467. package/dist/team/types.d.ts +0 -198
  1468. package/dist/team/types.d.ts.map +0 -1
  1469. package/dist/team/types.js +0 -8
  1470. package/dist/team/types.js.map +0 -1
  1471. package/dist/tools/add-edge-tool.d.ts +0 -18
  1472. package/dist/tools/add-edge-tool.d.ts.map +0 -1
  1473. package/dist/tools/add-edge-tool.js +0 -92
  1474. package/dist/tools/add-edge-tool.js.map +0 -1
  1475. package/dist/tools/add-node-tool.d.ts +0 -22
  1476. package/dist/tools/add-node-tool.d.ts.map +0 -1
  1477. package/dist/tools/add-node-tool.js +0 -128
  1478. package/dist/tools/add-node-tool.js.map +0 -1
  1479. package/dist/tools/asset-tools.d.ts +0 -58
  1480. package/dist/tools/asset-tools.d.ts.map +0 -1
  1481. package/dist/tools/asset-tools.js +0 -191
  1482. package/dist/tools/asset-tools.js.map +0 -1
  1483. package/dist/tools/calculator-tool.d.ts +0 -24
  1484. package/dist/tools/calculator-tool.d.ts.map +0 -1
  1485. package/dist/tools/calculator-tool.js +0 -64
  1486. package/dist/tools/calculator-tool.js.map +0 -1
  1487. package/dist/tools/claude-code-tools.d.ts +0 -96
  1488. package/dist/tools/claude-code-tools.d.ts.map +0 -1
  1489. package/dist/tools/claude-code-tools.js +0 -463
  1490. package/dist/tools/claude-code-tools.js.map +0 -1
  1491. package/dist/tools/code-tools.d.ts +0 -26
  1492. package/dist/tools/code-tools.d.ts.map +0 -1
  1493. package/dist/tools/code-tools.js +0 -82
  1494. package/dist/tools/code-tools.js.map +0 -1
  1495. package/dist/tools/create-plan-tool.d.ts +0 -29
  1496. package/dist/tools/create-plan-tool.d.ts.map +0 -1
  1497. package/dist/tools/create-plan-tool.js +0 -355
  1498. package/dist/tools/create-plan-tool.js.map +0 -1
  1499. package/dist/tools/create-task-tool.d.ts +0 -28
  1500. package/dist/tools/create-task-tool.d.ts.map +0 -1
  1501. package/dist/tools/create-task-tool.js +0 -254
  1502. package/dist/tools/create-task-tool.js.map +0 -1
  1503. package/dist/tools/email-tools.d.ts +0 -76
  1504. package/dist/tools/email-tools.d.ts.map +0 -1
  1505. package/dist/tools/email-tools.js +0 -259
  1506. package/dist/tools/email-tools.js.map +0 -1
  1507. package/dist/tools/filesystem-tools.d.ts +0 -77
  1508. package/dist/tools/filesystem-tools.d.ts.map +0 -1
  1509. package/dist/tools/filesystem-tools.js +0 -334
  1510. package/dist/tools/filesystem-tools.js.map +0 -1
  1511. package/dist/tools/find-model-tool.d.ts +0 -25
  1512. package/dist/tools/find-model-tool.d.ts.map +0 -1
  1513. package/dist/tools/find-model-tool.js +0 -236
  1514. package/dist/tools/find-model-tool.js.map +0 -1
  1515. package/dist/tools/finish-graph-tool.d.ts +0 -23
  1516. package/dist/tools/finish-graph-tool.d.ts.map +0 -1
  1517. package/dist/tools/finish-graph-tool.js +0 -46
  1518. package/dist/tools/finish-graph-tool.js.map +0 -1
  1519. package/dist/tools/js-code-tool.d.ts +0 -30
  1520. package/dist/tools/js-code-tool.d.ts.map +0 -1
  1521. package/dist/tools/js-code-tool.js +0 -98
  1522. package/dist/tools/js-code-tool.js.map +0 -1
  1523. package/dist/tools/local-get-node-info-tool.d.ts +0 -19
  1524. package/dist/tools/local-get-node-info-tool.d.ts.map +0 -1
  1525. package/dist/tools/local-get-node-info-tool.js +0 -75
  1526. package/dist/tools/local-get-node-info-tool.js.map +0 -1
  1527. package/dist/tools/local-list-nodes-tool.d.ts +0 -19
  1528. package/dist/tools/local-list-nodes-tool.d.ts.map +0 -1
  1529. package/dist/tools/local-list-nodes-tool.js +0 -69
  1530. package/dist/tools/local-list-nodes-tool.js.map +0 -1
  1531. package/dist/tools/local-search-nodes-tool.d.ts +0 -21
  1532. package/dist/tools/local-search-nodes-tool.d.ts.map +0 -1
  1533. package/dist/tools/local-search-nodes-tool.js +0 -111
  1534. package/dist/tools/local-search-nodes-tool.js.map +0 -1
  1535. package/dist/tools/math-tools.d.ts +0 -156
  1536. package/dist/tools/math-tools.d.ts.map +0 -1
  1537. package/dist/tools/math-tools.js +0 -422
  1538. package/dist/tools/math-tools.js.map +0 -1
  1539. package/dist/tools/model-tools.d.ts +0 -25
  1540. package/dist/tools/model-tools.d.ts.map +0 -1
  1541. package/dist/tools/model-tools.js +0 -48
  1542. package/dist/tools/model-tools.js.map +0 -1
  1543. package/dist/tools/pdf-tools.d.ts +0 -152
  1544. package/dist/tools/pdf-tools.d.ts.map +0 -1
  1545. package/dist/tools/pdf-tools.js +0 -339
  1546. package/dist/tools/pdf-tools.js.map +0 -1
  1547. package/dist/tools/tool-registry.d.ts +0 -9
  1548. package/dist/tools/tool-registry.d.ts.map +0 -1
  1549. package/dist/tools/tool-registry.js +0 -17
  1550. package/dist/tools/tool-registry.js.map +0 -1
  1551. package/dist/tools/workspace-tools.d.ts +0 -58
  1552. package/dist/tools/workspace-tools.d.ts.map +0 -1
  1553. package/dist/tools/workspace-tools.js +0 -152
  1554. package/dist/tools/workspace-tools.js.map +0 -1
@@ -0,0 +1,2056 @@
1
+ /**
2
+ * The `nodetool` object model — the agent-facing JS API for the CodeAct
3
+ * sandbox. Where an imported capability is the raw RPC surface, `nodetool.*` is the
4
+ * platform as objects: workflows, models, assets,
5
+ * jobs, collections, games, timelines, sketches, scripts, and storyboards, plus a
6
+ * bounded-concurrency `batch()` for fan-out (run a workflow once per CSV row,
7
+ * validate every timeline, render all boards).
8
+ *
9
+ * Every method is a thin wrapper over an existing belt tool, so permission
10
+ * gating, routing, and validation stay where they are. A method whose backing
11
+ * tool is missing from the belt throws a message naming the tool instead of a
12
+ * TypeError. The prelude assumes `CODEACT_PRELUDE` ran first (it uses
13
+ * the belt); `nodetool.workflows.open()` additionally uses `openWorkflow`
14
+ * from the graph-model prelude when that is loaded.
15
+ */
16
+ import { GRAPH_JSON_PRELUDE } from "../graph-dsl-core.js";
17
+ import { GRAPH_DSL_PACKAGE, GRAPH_DSL_PROMPT_SECTION } from "./graph-dsl-package.js";
18
+ import { FLOW_PACKAGE, FLOW_PROMPT_SECTION } from "./flow-package.js";
19
+ /** Namespace → the belt tools that light it up (any one is enough). */
20
+ export const NODETOOL_API_NAMESPACE_TOOLS = {
21
+ workflows: [
22
+ "list_workflows",
23
+ "get_workflow",
24
+ "create_workflow",
25
+ "list_workflow_versions",
26
+ "get_workflow_version",
27
+ "create_workflow_version",
28
+ "restore_workflow_version",
29
+ "delete_workflow_version",
30
+ "run_workflow",
31
+ "start_background_job",
32
+ "debug_workflow",
33
+ "validate_workflow",
34
+ "resolve_workflow_escalation",
35
+ "get_example_workflow"
36
+ ],
37
+ // Documented in the sandbox-packages section rather than in the namespace
38
+ // list, but covered here so the two discovery tools are not also catalogued
39
+ // as raw catalog signatures.
40
+ packs: ["list_sandbox_packages", "get_sandbox_package_docs"],
41
+ nodes: ["search_nodes", "get_node_info", "list_nodes", "run_node"],
42
+ agents: ["run_subtask", "start_subtask", "wait_subtasks"],
43
+ models: [
44
+ "find_model",
45
+ "list_models",
46
+ "list_provider_models",
47
+ "generate_text"
48
+ ],
49
+ media: [
50
+ "generate_image",
51
+ "edit_image",
52
+ "generate_video",
53
+ "animate_image",
54
+ "generate_video_from_references",
55
+ "generate_speech",
56
+ "generate_music",
57
+ "transcribe_audio",
58
+ "embed_text",
59
+ "critique_image",
60
+ "compare_images",
61
+ "score_image_adherence",
62
+ "understand_video",
63
+ "ffmpeg",
64
+ "ffprobe",
65
+ "yt_dlp"
66
+ ],
67
+ documents: [
68
+ "convert_document",
69
+ "extract_pdf_text",
70
+ "extract_pdf_tables",
71
+ "convert_markdown_to_pdf",
72
+ "convert_pdf_to_markdown"
73
+ ],
74
+ web: [
75
+ "web_search",
76
+ "image_search",
77
+ "http_request",
78
+ "download_file",
79
+ "browser",
80
+ "take_screenshot"
81
+ ],
82
+ memory: [
83
+ "memory_save",
84
+ "memory_list",
85
+ "memory_search",
86
+ "memory_update",
87
+ "memory_delete"
88
+ ],
89
+ shared: ["list_shared", "read_shared", "share_result"],
90
+ threads: ["list_threads", "get_thread", "get_message"],
91
+ email: ["search_email", "archive_email", "add_label_to_email"],
92
+ settings: [
93
+ "list_settings",
94
+ "get_setting",
95
+ "set_setting",
96
+ "list_secrets",
97
+ "request_secret"
98
+ ],
99
+ assets: [
100
+ "list_assets",
101
+ "get_asset",
102
+ "asset_search",
103
+ "save_asset",
104
+ "read_asset",
105
+ "list_images"
106
+ ],
107
+ jobs: ["list_jobs", "get_job", "get_job_logs"],
108
+ generations: [
109
+ "list_generations",
110
+ "get_generation",
111
+ "await_generation",
112
+ "cancel_generation",
113
+ "reconcile_generation",
114
+ "list_provider_generations",
115
+ "get_provider_generation"
116
+ ],
117
+ collections: [
118
+ "list_collections",
119
+ "query_collection",
120
+ "vector_index",
121
+ "vector_batch_index",
122
+ "vector_text_search",
123
+ "vector_hybrid_search"
124
+ ],
125
+ apps: ["list_apps", "get_app", "create_app", "edit_app", "debug_app"],
126
+ games: [
127
+ "create_native_game", "get_native_game", "edit_native_game", "publish_native_game",
128
+ "install_native_game_asset", "playtest_native_game", "capture_native_game_frame",
129
+ "generate_game_asset", "build_native_game", "list_example_games", "get_example_game",
130
+ "install_example_game", "autoplay_native_game"
131
+ ],
132
+ timelines: [
133
+ "list_timelines",
134
+ "list_example_timelines",
135
+ "get_example_timeline",
136
+ "create_timeline",
137
+ "get_timeline",
138
+ "list_timeline_versions",
139
+ "get_timeline_version",
140
+ "create_timeline_version",
141
+ "restore_timeline_version",
142
+ "delete_timeline_version",
143
+ "validate_timeline",
144
+ "preview_timeline_frame",
145
+ "compare_timeline_frames",
146
+ "edit_timeline",
147
+ "set_timeline_document",
148
+ "render_timeline",
149
+ "list_compositions",
150
+ "get_composition",
151
+ "save_composition",
152
+ "delete_composition"
153
+ ],
154
+ sketches: [
155
+ "list_sketches",
156
+ "create_sketch",
157
+ "get_sketch",
158
+ "list_sketch_versions",
159
+ "get_sketch_version",
160
+ "create_sketch_version",
161
+ "restore_sketch_version",
162
+ "delete_sketch_version",
163
+ "validate_sketch",
164
+ "edit_sketch"
165
+ ],
166
+ scripts: [
167
+ "list_scripts",
168
+ "create_script",
169
+ "get_script",
170
+ "voice_script_lines",
171
+ "assemble_script_timeline",
172
+ "edit_script"
173
+ ],
174
+ storyboards: [
175
+ "list_storyboards",
176
+ "create_storyboard",
177
+ "get_storyboard",
178
+ "render_storyboard_stills",
179
+ "render_storyboard_clips",
180
+ "revise_storyboard_clip",
181
+ "assemble_storyboard_timeline",
182
+ "edit_storyboard"
183
+ ]
184
+ };
185
+ /** Whether a belt carries anything the `nodetool` object model can drive. */
186
+ export function hasNodetoolApiTools(toolNames) {
187
+ const names = new Set(toolNames);
188
+ for (const group of Object.values(NODETOOL_API_NAMESPACE_TOOLS)) {
189
+ if (group.some((name) => names.has(name)))
190
+ return true;
191
+ }
192
+ return false;
193
+ }
194
+ /**
195
+ * The belt tools the object model wraps — the ones the prompt should NOT
196
+ * also document as raw catalog signatures. One surface per capability: wrapped
197
+ * tools stay callable through the bridge, but the catalog documents only the
198
+ * `nodetool.*` form.
199
+ */
200
+ export function nodetoolApiCoveredToolNames(toolNames) {
201
+ const names = new Set(toolNames);
202
+ const covered = new Set();
203
+ for (const group of Object.values(NODETOOL_API_NAMESPACE_TOOLS)) {
204
+ for (const name of group) {
205
+ if (names.has(name))
206
+ covered.add(name);
207
+ }
208
+ }
209
+ return covered;
210
+ }
211
+ /**
212
+ * Guest-side prelude defining the global `nodetool`. Plain QuickJS-safe JS —
213
+ * no host bridges of its own; every effect goes through `__callBeltTool`.
214
+ */
215
+ export const NODETOOL_API_PRELUDE = `
216
+ const nodetool = (() => {
217
+ // \`__toolNames\` is the belt, and the object model calls it through
218
+ // \`__callBeltTool\` rather than through a global belt object — there is no
219
+ // longer one for it to read.
220
+ const __belt = new Set(__toolNames);
221
+ const __has = (name) => __belt.has(name);
222
+ const __need = (name) => {
223
+ if (!__belt.has(name)) {
224
+ throw new Error(
225
+ 'nodetool: tool "' + name + '" is not in this toolbelt, so this ' +
226
+ "method is unavailable here. nodetool.searchTools() lists what is."
227
+ );
228
+ }
229
+ return __callBeltTool(name);
230
+ };
231
+ const __merge = (a, b) => Object.assign({}, a || {}, b || {});
232
+
233
+ /**
234
+ * A \`create(name, opts)\` call's arguments, however the caller spelled them.
235
+ * The documented form passes the name first, but a caller holding an options
236
+ * bag reaches for \`create({name, ...})\` — and that used to arrive at the tool
237
+ * as \`name: {name: "..."}\`, refused as "name is required and must be a
238
+ * non-empty string". The message described the argument, not the call, so
239
+ * there was nothing to correct against: a chat retried the same object shape
240
+ * three times before falling back to the positional form by accident. Both
241
+ * spellings are the same call, so both are accepted, and a name that is
242
+ * genuinely missing is named as the caller's own argument.
243
+ */
244
+ const __named = (nameOrOpts, opts, method) => {
245
+ const args =
246
+ nameOrOpts && typeof nameOrOpts === "object"
247
+ ? __merge(nameOrOpts, opts)
248
+ : __merge(opts, { name: nameOrOpts });
249
+ if (typeof args.name !== "string" || args.name.trim() === "") {
250
+ throw new Error(
251
+ "nodetool." + method + ": a name is required. Pass it first — " +
252
+ 'nodetool.' + method + '("My name", {...}) — or in the options ' +
253
+ 'object as {name: "My name"}.'
254
+ );
255
+ }
256
+ return args;
257
+ };
258
+
259
+ /**
260
+ * A job id from either an id or a job/receipt object. \`start()\` answers with
261
+ * a record, and reaching for the wrong field on it used to reach the tool as
262
+ * \`job_id: undefined\`, which came back as "Job undefined was not found" —
263
+ * a message about a job rather than about the call that asked for it.
264
+ */
265
+ const __jobId = (idOrJob, method) => {
266
+ if (typeof idOrJob === "string" && idOrJob) return idOrJob;
267
+ if (idOrJob && typeof idOrJob === "object") {
268
+ const id = idOrJob.job_id || idOrJob.id;
269
+ if (typeof id === "string" && id) return id;
270
+ }
271
+ throw new Error(
272
+ "nodetool.jobs." + method + ": no job id. Pass the id string, or the " +
273
+ "record nodetool.workflows.start() returned (its id is job_id)."
274
+ );
275
+ };
276
+
277
+ /** A generation id, or the record a generation capability answered with. */
278
+ const __generationId = (idOrRecord, method) => {
279
+ if (typeof idOrRecord === "string" && idOrRecord) return idOrRecord;
280
+ if (idOrRecord && typeof idOrRecord === "object") {
281
+ const id = idOrRecord.generation_id;
282
+ if (typeof id === "string" && id) return id;
283
+ }
284
+ throw new Error(
285
+ "nodetool.generations." + method + ": no generation id. Pass the id " +
286
+ "string, or the record a generate* call returned (its id is generation_id)."
287
+ );
288
+ };
289
+
290
+ /**
291
+ * Accept a GraphBuilder, a bare {nodes, edges}, or a workflow record —
292
+ * the shared graph DSL core's normalizer.
293
+ */
294
+ const __graphJson = __graphJsonOf;
295
+
296
+ /**
297
+ * Build the args for a routed web-search tool. The tool routes across the
298
+ * configured backends host-side; \`opts.provider\` maps onto its \`backend\`
299
+ * pin (\`aliases\` translates the old guest names — "default", "google" —
300
+ * onto the tool's backend enum; other values pass through).
301
+ */
302
+ const __webArgs = (opts, aliases, field, query) => {
303
+ const args = __merge(opts);
304
+ const provider = args.provider;
305
+ delete args.provider;
306
+ if (provider !== undefined) args.backend = aliases[provider] || provider;
307
+ args[field] = String(query === undefined || query === null ? "" : query);
308
+ return args;
309
+ };
310
+
311
+ /**
312
+ * Normalize a model reference to the {provider, model} pair the media
313
+ * tools take. Accepts a find/pick result ({provider, model_id}), a bare
314
+ * {provider, model|id}, or a "provider/model_id" string (split on the
315
+ * FIRST slash, so fal ids like "fal_ai/fal-ai/flux/schnell" work).
316
+ */
317
+ const __model = (m) => {
318
+ if (m && typeof m === "object") {
319
+ const id = m.model_id || m.model || m.id;
320
+ if (m.provider && id) return { provider: m.provider, model: id };
321
+ }
322
+ if (typeof m === "string" && m.indexOf("/") > 0) {
323
+ return {
324
+ provider: m.slice(0, m.indexOf("/")),
325
+ model: m.slice(m.indexOf("/") + 1)
326
+ };
327
+ }
328
+ throw new Error(
329
+ "nodetool: a model is required — pass a nodetool.models.find/pick " +
330
+ 'result, {provider, model_id}, or "provider/model_id". Use ' +
331
+ 'await nodetool.models.pick("<capability>") to resolve one.'
332
+ );
333
+ };
334
+
335
+ const api = {
336
+ /**
337
+ * Credentials, through the one bridge that has them.
338
+ *
339
+ * \`getSecret\` answers \`undefined\` for a secret nobody configured, which
340
+ * turns a missing key into a 401 three calls later. These throw at the
341
+ * point the credential was needed and name it.
342
+ */
343
+ secrets: {
344
+ /** A secret's value, or an error naming the one that is not set. */
345
+ async get(name) {
346
+ if (typeof name !== "string" || name === "") {
347
+ throw new Error("nodetool.secrets.get: a secret name is required");
348
+ }
349
+ if (typeof getSecret !== "function") {
350
+ throw new Error(
351
+ 'nodetool.secrets.get("' + name + '"): this run has no secret store'
352
+ );
353
+ }
354
+ const value = await getSecret(name);
355
+ if (value === undefined || value === null || value === "") {
356
+ throw new Error(
357
+ 'nodetool.secrets.get("' + name + '"): not set. Add it under ' +
358
+ "Settings > Secrets, or on the node's secret scope."
359
+ );
360
+ }
361
+ return value;
362
+ },
363
+ /** The value, or undefined — for a credential that is genuinely optional. */
364
+ async tryGet(name) {
365
+ if (typeof getSecret !== "function") return undefined;
366
+ const value = await getSecret(name);
367
+ return value === null || value === "" ? undefined : value;
368
+ },
369
+ /**
370
+ * The names this node declared, or null when it declared no scope and
371
+ * may read the whole store. Reading this is not the check: a name
372
+ * outside the scope is refused by the bridge, not by this list.
373
+ */
374
+ list() {
375
+ return typeof __secretScope === "undefined" || __secretScope === null
376
+ ? null
377
+ : __secretScope.slice();
378
+ }
379
+ },
380
+
381
+ /**
382
+ * NodeTool's own configuration, and the one way to get a credential set.
383
+ *
384
+ * \`secrets\` above reads; this asks. \`requestSecret\` sends no value and
385
+ * receives none — it opens a dialog where the user types the key, and
386
+ * answers only whether they saved one.
387
+ */
388
+ settings: {
389
+ /** Every non-secret setting, or one group's worth. */
390
+ list: (opts) => __need("list_settings")(__merge(opts)),
391
+ /** One setting's value, resolved from this user then the environment. */
392
+ get: (key) => __need("get_setting")({ key: key }),
393
+ /** Change one setting. Refuses a secret and anything undeclared. */
394
+ set: (key, value) => __need("set_setting")({ key: key, value: value }),
395
+ /** Which credentials exist, never what they are. */
396
+ secrets: () => __need("list_secrets")({}),
397
+ /** Ask the user to enter one, in a dialog you never see the contents of. */
398
+ requestSecret: (key, opts) =>
399
+ __need("request_secret")(__merge(opts, { key: key }))
400
+ },
401
+
402
+ /**
403
+ * Find a tool the prompt lists by name only, or does not list at all.
404
+ * Takes the ToolSearch grammar ("select:a,b" for exact names, "+term" to
405
+ * require one) and returns each match's name, signature and description.
406
+ * Call it before calling a tool whose arguments you have not seen.
407
+ */
408
+ async searchTools(query, maxResults) {
409
+ if (typeof __searchTools !== "function") {
410
+ throw new Error(
411
+ "nodetool.searchTools: this run has no tool catalog to search."
412
+ );
413
+ }
414
+ const r = await __searchTools(
415
+ String(query === undefined || query === null ? "" : query),
416
+ maxResults === undefined ? 5 : maxResults
417
+ );
418
+ if (!r || r.ok !== true) {
419
+ throw new Error(r && r.error ? r.error : "nodetool.searchTools failed");
420
+ }
421
+ return r.result;
422
+ },
423
+
424
+ /**
425
+ * What this action can import: the sandbox packs installed here, the
426
+ * modules each declares, the functions those export, and each pack's own
427
+ * documentation. A pack marked allowed:false is installed but off this
428
+ * session's allowlist — importing it is refused.
429
+ */
430
+ packs: (() => {
431
+ let cached = null;
432
+ const load = async (refresh) => {
433
+ if (cached === null || refresh === true) {
434
+ cached = await __need("list_sandbox_packages")({});
435
+ }
436
+ return cached;
437
+ };
438
+ const packOf = (entry) => entry.packName;
439
+ return {
440
+ /**
441
+ * One entry per pack: {packName, description, allowed, kinds,
442
+ * specifiers}. Pass {refresh: true} to re-read the catalog.
443
+ */
444
+ async list(opts) {
445
+ const listing = await load(opts && opts.refresh);
446
+ const byPack = {};
447
+ const order = [];
448
+ for (const entry of listing.packages) {
449
+ const name = packOf(entry);
450
+ if (byPack[name] === undefined) {
451
+ byPack[name] = {
452
+ packName: name,
453
+ packVersion: entry.packVersion,
454
+ description: entry.description || "",
455
+ allowed: false,
456
+ kinds: [],
457
+ specifiers: []
458
+ };
459
+ order.push(name);
460
+ }
461
+ const pack = byPack[name];
462
+ if (!pack.description && entry.description) {
463
+ pack.description = entry.description;
464
+ }
465
+ if (entry.allowed) pack.allowed = true;
466
+ if (pack.kinds.indexOf(entry.kind) < 0) pack.kinds.push(entry.kind);
467
+ pack.specifiers.push(entry.specifier);
468
+ }
469
+ const packs = order.map((name) => byPack[name]);
470
+ if (listing.platform && listing.platform.length > 0) {
471
+ packs.push({
472
+ packName: "@nodetool-ai/sandbox-nodetool",
473
+ description:
474
+ "NodeTool's own surface — the same gated calls as nodetool.*.",
475
+ allowed: true,
476
+ kinds: ["platform"],
477
+ specifiers: listing.platform.map((entry) => entry.specifier)
478
+ });
479
+ }
480
+ return packs;
481
+ },
482
+ /**
483
+ * The importable module specifiers of one pack, each with its kind and
484
+ * whether this session allows it. Takes a pack name or any specifier
485
+ * inside the pack.
486
+ */
487
+ async modules(pack, opts) {
488
+ const listing = await load(opts && opts.refresh);
489
+ const name = String(pack === undefined || pack === null ? "" : pack);
490
+ const platform = (listing.platform || []).filter(
491
+ (entry) => entry.specifier === name || entry.specifier.indexOf(name) === 0
492
+ );
493
+ if (platform.length > 0) {
494
+ return platform.map((entry) => ({
495
+ specifier: entry.specifier,
496
+ kind: "platform",
497
+ allowed: true
498
+ }));
499
+ }
500
+ return listing.packages
501
+ .filter(
502
+ (entry) =>
503
+ packOf(entry) === name ||
504
+ entry.specifier === name ||
505
+ entry.specifier.indexOf(name + "/") === 0
506
+ )
507
+ .map((entry) => ({
508
+ specifier: entry.specifier,
509
+ kind: entry.kind,
510
+ description: entry.description,
511
+ allowed: entry.allowed
512
+ }));
513
+ },
514
+ /**
515
+ * The function names one module exports: {specifier, kind, exports,
516
+ * complete, note?}. A module whose exports cannot be read answers
517
+ * exports:null with the reason in note — read docs() instead of
518
+ * guessing.
519
+ */
520
+ exports(specifier) {
521
+ return __need("list_sandbox_packages")({
522
+ specifier: String(specifier === undefined ? "" : specifier)
523
+ });
524
+ },
525
+ /** Returns a pack's SKILL.md as a markdown string. Untrusted docs retain their warning wrapper. */
526
+ async docs(specifier) {
527
+ const result = await __need("get_sandbox_package_docs")({
528
+ specifier: String(specifier === undefined ? "" : specifier)
529
+ });
530
+ return result.documentation;
531
+ }
532
+ };
533
+ })(),
534
+
535
+ /** What this belt supports, namespace by namespace. */
536
+ capabilities() {
537
+ const caps = {};
538
+ const groups = __NT_NAMESPACE_TOOLS;
539
+ for (const ns of Object.keys(groups)) {
540
+ const present = groups[ns].filter(__has);
541
+ if (present.length > 0) caps[ns] = present;
542
+ }
543
+ return caps;
544
+ },
545
+
546
+ /**
547
+ * Bounded-concurrency map. Returns one settled entry per item:
548
+ * { ok, index, item, value | error }. Never throws; failures are entries.
549
+ * Respect the per-action tool-call budget: chunk large item lists across
550
+ * actions, persisting partial progress with \`nodetool.memory.save\`.
551
+ */
552
+ async batch(items, fn, opts) {
553
+ const list = Array.from(items);
554
+ const width = Math.max(
555
+ 1,
556
+ Math.min(8, (opts && opts.concurrency) || 4)
557
+ );
558
+ const stopOnError = !!(opts && opts.stopOnError);
559
+ const results = new Array(list.length);
560
+ let next = 0;
561
+ let stopped = false;
562
+ const worker = async () => {
563
+ while (next < list.length && !stopped) {
564
+ const i = next++;
565
+ try {
566
+ results[i] = {
567
+ ok: true,
568
+ index: i,
569
+ item: list[i],
570
+ value: await fn(list[i], i)
571
+ };
572
+ } catch (e) {
573
+ results[i] = {
574
+ ok: false,
575
+ index: i,
576
+ item: list[i],
577
+ error: e && e.message ? e.message : String(e)
578
+ };
579
+ if (stopOnError) stopped = true;
580
+ }
581
+ }
582
+ };
583
+ const workers = [];
584
+ for (let w = 0; w < Math.min(width, list.length); w++) {
585
+ workers.push(worker());
586
+ }
587
+ await Promise.all(workers);
588
+ return results.filter((entry) => entry !== undefined);
589
+ },
590
+
591
+ nodes: {
592
+ /**
593
+ * Search the node catalog. \`query\` takes a string or an array of
594
+ * strings; \`opts\` passes n_results / input_type / output_type through.
595
+ * Answers { total, results }; a result's node type is on "type".
596
+ */
597
+ search: (query, opts) =>
598
+ __need("search_nodes")(
599
+ __merge(opts, {
600
+ query: Array.isArray(query) ? query : [String(query)]
601
+ })
602
+ ),
603
+ /** Full metadata for ONE node type: properties, inputs, outputs. */
604
+ info: (type) => __need("get_node_info")({ node_type: type }),
605
+ list: (opts) => __need("list_nodes")(__merge(opts)),
606
+ /**
607
+ * The single-node harness: run ONE node by type with a property bag,
608
+ * no workflow needed. The cheap way to probe what a node does before
609
+ * wiring it into a graph.
610
+ */
611
+ run: (type, inputs) =>
612
+ __need("run_node")({ node_type: type, inputs: inputs || {} })
613
+ },
614
+
615
+ agents: {
616
+ /**
617
+ * Run a sub-agent on a self-contained prompt and return its result.
618
+ * The child inherits this belt's tools but sees NONE of this
619
+ * conversation — put everything it needs into the prompt, and ask for
620
+ * JSON there when you want structure. Runs take real time and money;
621
+ * delegate work that benefits from a fresh focused context, not
622
+ * one-tool errands. Blocks until the child finishes; fan out with
623
+ * \`Promise.all\` or \`nodetool.batch\`.
624
+ */
625
+ run(prompt, opts) {
626
+ const text = String(prompt === undefined || prompt === null ? "" : prompt);
627
+ const description =
628
+ (opts && opts.description) ||
629
+ text.split(/\\s+/).slice(0, 6).join(" ") ||
630
+ "Subtask";
631
+ return __need("run_subtask")({ description: description, prompt: text });
632
+ },
633
+ /**
634
+ * Start a sub-agent WITHOUT blocking: returns
635
+ * \`{subtask_id, status: "running"}\` right away while the child works.
636
+ * Collect results later in the same action with \`wait()\` — results of
637
+ * subtasks you never wait for are lost to the turn.
638
+ */
639
+ start(prompt, opts) {
640
+ const text = String(prompt === undefined || prompt === null ? "" : prompt);
641
+ const description =
642
+ (opts && opts.description) ||
643
+ text.split(/\\s+/).slice(0, 6).join(" ") ||
644
+ "Subtask";
645
+ return __need("start_subtask")({ description: description, prompt: text });
646
+ },
647
+ /**
648
+ * Wait for background subagents started with \`start()\`. Pass
649
+ * \`{ids: [...], timeoutMs}\` to bound the block. Resolves with rows:
650
+ * \`{subtask_id, status, result | error}\`. Never end an action with
651
+ * unwaited subtasks whose results you still need.
652
+ */
653
+ wait(opts) {
654
+ return __need("wait_subtasks")(
655
+ opts
656
+ ? {
657
+ ids: opts.ids,
658
+ timeout_ms: opts.timeoutMs
659
+ }
660
+ : {}
661
+ );
662
+ }
663
+ },
664
+
665
+ workflows: {
666
+ list: (opts) => __need("list_workflows")(__merge(opts)),
667
+ get: (id) => __need("get_workflow")({ workflow_id: id }),
668
+ create: (name, graph, opts) =>
669
+ __need("create_workflow")(
670
+ __merge(__named(name, opts, "workflows.create"), {
671
+ graph: __graphJson(
672
+ graph === undefined && name && typeof name === "object"
673
+ ? name.graph
674
+ : graph
675
+ )
676
+ })
677
+ ),
678
+ versions: (id, opts) =>
679
+ __need("list_workflow_versions")(__merge(opts, { workflow_id: id })),
680
+ getVersion: (id, version) =>
681
+ __need("get_workflow_version")({ workflow_id: id, version: version }),
682
+ snapshot: (id, opts) =>
683
+ __need("create_workflow_version")(__merge(opts, { workflow_id: id })),
684
+ restore: (id, version) =>
685
+ __need("restore_workflow_version")({
686
+ workflow_id: id,
687
+ version: version
688
+ }),
689
+ deleteVersion: (id, version) =>
690
+ __need("delete_workflow_version")({
691
+ workflow_id: id,
692
+ version: version
693
+ }),
694
+ run: (id, params, opts) =>
695
+ __need("run_workflow")(
696
+ __merge(opts, { workflow_id: id, params: params || {} })
697
+ ),
698
+ /**
699
+ * Start a run and return a receipt — {job_id, id, status: "running"} —
700
+ * without waiting for it. Pass it to nodetool.jobs.wait() and read the
701
+ * settled job's outputs.
702
+ */
703
+ start: (id, params) =>
704
+ __need("start_background_job")({
705
+ workflow_id: id,
706
+ params: params || {}
707
+ }),
708
+ debug: (id, params, opts) =>
709
+ __need("debug_workflow")(
710
+ __merge(opts, { workflow_id: id, params: params || {} })
711
+ ),
712
+ async validate(target) {
713
+ const report = await (typeof target === "string"
714
+ ? __need("validate_workflow")({ workflow_id: target })
715
+ : __need("validate_workflow")({ graph: __graphJson(target) }));
716
+ // A report with errors is a refusal, not data: throw so a caller
717
+ // that forgets to check report.ok cannot carry a broken graph into a
718
+ // paid run.
719
+ if (report && report.ok === false && Array.isArray(report.issues)) {
720
+ // report.ok is decided by the errors alone, so the throw lists the
721
+ // errors alone. Mixing in warnings and the "untyped dynamic slot"
722
+ // info notes buried one real problem under seven non-problems, and
723
+ // a model reading eight bullets rewrites eight things.
724
+ const errors = report.issues.filter(function (i) {
725
+ return i && i.severity === "error" && i.message;
726
+ });
727
+ const other = report.issues.length - errors.length;
728
+ const messages = (errors.length > 0 ? errors : report.issues)
729
+ .map(function (i) {
730
+ return i && i.message;
731
+ })
732
+ .filter(Boolean);
733
+ throw new Error(
734
+ "Graph validation failed:\\n- " +
735
+ messages.slice(0, 8).join("\\n- ") +
736
+ (errors.length > 0 && other > 0
737
+ ? "\\n(" +
738
+ other +
739
+ " warning/info issue(s) not blocking; read report.issues" +
740
+ " for them.)"
741
+ : "")
742
+ );
743
+ }
744
+ return report;
745
+ },
746
+ /**
747
+ * Answer an escalation from an interactive run/debug. Action is one of
748
+ * the escalation's allowedActions; pass {outputs} with "substitute",
749
+ * {reason} with "fail", {apply_to: "signature"} to resolve every later
750
+ * failure with the same signature. Returns the NEXT escalation (answer
751
+ * it the same way) or the run's final report.
752
+ */
753
+ resolve: (sessionId, escalationId, action, opts) =>
754
+ __need("resolve_workflow_escalation")(
755
+ __merge(opts, {
756
+ session_id: sessionId,
757
+ escalation_id: escalationId,
758
+ action: action
759
+ })
760
+ ),
761
+ /**
762
+ * One example workflow, graph included — a worked graph to read before
763
+ * authoring one. Name is "<package>/<example>", or pass the package
764
+ * separately as {package}.
765
+ */
766
+ example(name, opts) {
767
+ const explicit = (opts && (opts.package || opts.package_name)) || "";
768
+ let pkg = explicit;
769
+ let example = String(name || "");
770
+ if (!explicit) {
771
+ const slash = example.indexOf("/");
772
+ if (slash > 0) {
773
+ pkg = example.slice(0, slash);
774
+ example = example.slice(slash + 1);
775
+ } else {
776
+ pkg = "nodetool-base";
777
+ }
778
+ }
779
+ if (!example) {
780
+ throw new Error(
781
+ "nodetool.workflows.example: name an example — " +
782
+ '"<package>/<example>", or (example, {package}). ' +
783
+ 'nodetool.workflows.list({workflow_type: "example"}) lists them.'
784
+ );
785
+ }
786
+ return __need("get_example_workflow")({
787
+ package_name: pkg,
788
+ example_name: example
789
+ });
790
+ },
791
+ open(id) {
792
+ if (typeof openWorkflow !== "function") {
793
+ // Thrown synchronously: a caller without await still sees it.
794
+ throw new Error(
795
+ "nodetool.workflows.open: the graph editing tools (ui_*) are " +
796
+ "not in this toolbelt. Author a graph with the sandbox DSL " +
797
+ "package instead, then create() it."
798
+ );
799
+ }
800
+ return openWorkflow(id).catch((e) => {
801
+ const msg = e && e.message ? e.message : String(e);
802
+ // A browser bridge that is gone (window reloaded before the editor
803
+ // panel re-registered) used to surface as this bare sentence, which
804
+ // left one agent retrying the identical call for several turns.
805
+ if (/Frontend tool runtime state is not initialized/i.test(msg)) {
806
+ throw new Error(
807
+ "nodetool.workflows.open: " + msg +
808
+ " The browser bridge answers nothing right now. Ask the user to " +
809
+ "open (or reload) the NodeTool workspace window and retry once " +
810
+ "the editor has loaded; meanwhile get_workflow still reads saved " +
811
+ "graphs and create_workflow saves new ones."
812
+ );
813
+ }
814
+ throw e;
815
+ });
816
+ }
817
+ },
818
+
819
+ models: {
820
+ find: (capability, opts) =>
821
+ __need("find_model")(__merge(opts, { capability: capability })),
822
+ /**
823
+ * Resolve ONE model for a capability — the leaderboard's best for that
824
+ * task, ready to pass to nodetool.media.*. To put it in a node's model
825
+ * property, assign the result's "ref" field verbatim (the flat fields use
826
+ * "model_id"; the property wants "id"). Throws when no configured
827
+ * provider offers the capability.
828
+ */
829
+ async pick(capability, opts) {
830
+ const found = await __need("find_model")(
831
+ __merge(opts, { capability: capability, limit: 1 })
832
+ );
833
+ const results = (found && found.results) || [];
834
+ if (results.length === 0) {
835
+ throw new Error(
836
+ 'nodetool.models.pick: no configured model offers "' +
837
+ capability +
838
+ '"' +
839
+ (found && found.note ? " — " + found.note : "")
840
+ );
841
+ }
842
+ // A missed search must not resolve to an unrelated model — the caller
843
+ // asked for a named one.
844
+ if (found && found.query_matched === false) {
845
+ throw new Error(
846
+ "nodetool.models.pick: no model matches " +
847
+ JSON.stringify(opts && opts.query) +
848
+ " for " +
849
+ capability +
850
+ '. Call nodetool.models.find("' +
851
+ capability +
852
+ '") to see what is configured.'
853
+ );
854
+ }
855
+ return results[0];
856
+ },
857
+ list: (opts) => __need("list_models")(__merge(opts)),
858
+ /** One provider's own catalog. */
859
+ forProvider: (provider, opts) =>
860
+ __need("list_provider_models")(__merge(opts, { provider: provider })),
861
+ /** One language-model roundtrip, with optional image references. */
862
+ generate: (prompt, model, opts) =>
863
+ __need("generate_text")(
864
+ __merge(opts, __merge(__model(model), { prompt: prompt }))
865
+ )
866
+ },
867
+
868
+ media: {
869
+ generateImage: (prompt, model, opts) =>
870
+ __need("generate_image")(
871
+ __merge(opts, __merge(__model(model), { prompt: prompt }))
872
+ ),
873
+ editImage: (inputFile, prompt, model, opts) =>
874
+ __need("edit_image")(
875
+ __merge(
876
+ opts,
877
+ __merge(__model(model), { input_file: inputFile, prompt: prompt })
878
+ )
879
+ ),
880
+ /**
881
+ * Promote an image handle (or a generation result) to a durable asset.
882
+ * Bytes stay on the host; the guest only sees the asset:// ref.
883
+ */
884
+ toImage: (src, opts) => image.toAsset(src, opts),
885
+ /** Promote an audio handle to a durable asset. */
886
+ toAudio: (src, opts) => audio.toAsset(src, opts),
887
+ /** Promote a video handle to a durable asset. */
888
+ toVideo: (src, opts) => video.toAsset(src, opts),
889
+ generateVideo: (prompt, model, opts) =>
890
+ __need("generate_video")(
891
+ __merge(opts, __merge(__model(model), { prompt: prompt }))
892
+ ),
893
+ animateImage: (inputFile, model, opts) =>
894
+ __need("animate_image")(
895
+ __merge(opts, __merge(__model(model), { input_file: inputFile }))
896
+ ),
897
+ videoFromReferences: (referenceFiles, model, opts) =>
898
+ __need("generate_video_from_references")(
899
+ __merge(
900
+ opts,
901
+ __merge(__model(model), { reference_files: referenceFiles })
902
+ )
903
+ ),
904
+ speak: (text, model, opts) =>
905
+ __need("generate_speech")(
906
+ __merge(opts, __merge(__model(model), { text: text }))
907
+ ),
908
+ /** Music from a prompt — the counterpart of speak(). */
909
+ generateMusic: (prompt, model, opts) =>
910
+ __need("generate_music")(
911
+ __merge(opts, __merge(__model(model), { prompt: prompt }))
912
+ ),
913
+ transcribe: (inputFile, model, opts) =>
914
+ __need("transcribe_audio")(
915
+ __merge(opts, __merge(__model(model), { input_file: inputFile }))
916
+ ),
917
+ embed: (text, model, opts) =>
918
+ __need("embed_text")(
919
+ __merge(opts, __merge(__model(model), { text: text }))
920
+ ),
921
+ /**
922
+ * Judge one image against the brief with a VISION chat model (pick
923
+ * "generate_message" on a vision-capable model). Returns a verdict plus
924
+ * directional defects — feed the fixes back into generateImage.
925
+ */
926
+ critique: (image, brief, model, opts) =>
927
+ __need("critique_image")(
928
+ __merge(
929
+ opts,
930
+ __merge(__model(model), { image: image, brief: brief })
931
+ )
932
+ ),
933
+ /** Pick the best of 2-8 candidates by pairwise knockout. */
934
+ compare: (images, brief, model, opts) =>
935
+ __need("compare_images")(
936
+ __merge(
937
+ opts,
938
+ __merge(__model(model), { images: images, brief: brief })
939
+ )
940
+ ),
941
+ /** Explainable adherence score: the brief as binary yes/no checks. */
942
+ scoreAdherence: (image, brief, model, opts) =>
943
+ __need("score_image_adherence")(
944
+ __merge(
945
+ opts,
946
+ __merge(__model(model), { image: image, brief: brief })
947
+ )
948
+ ),
949
+ /**
950
+ * Read a video with a multimodal chat model (Gemini reads video
951
+ * natively). Returns \`{text}\` — the model's answer to \`prompt\`.
952
+ */
953
+ understandVideo: (video, prompt, model, opts) =>
954
+ __need("understand_video")(
955
+ __merge(
956
+ opts,
957
+ __merge(__model(model), { video: video, prompt: prompt })
958
+ )
959
+ ),
960
+ /** Run ffmpeg on workspace files. \`args\` is argv after the binary name. */
961
+ ffmpeg: (args, opts) => __need("ffmpeg")(__merge(opts, { args: args })),
962
+ /** Read a media file's format and streams with ffprobe. */
963
+ ffprobe: (path, opts) => __need("ffprobe")(__merge(opts, { path: path })),
964
+ /** Download a video with yt-dlp. */
965
+ downloadVideo: (url, outputFile, opts) =>
966
+ __need("yt_dlp")(__merge(opts, { url: url, output_file: outputFile }))
967
+ },
968
+
969
+ documents: {
970
+ convert: (inputFile, outputFile, opts) =>
971
+ __need("convert_document")(
972
+ __merge(opts, { input_file: inputFile, output_file: outputFile })
973
+ ),
974
+ extractText: (inputFile, opts) =>
975
+ __need("extract_pdf_text")(__merge(opts, { path: inputFile })),
976
+ extractTables: (inputFile, outputFile, opts) =>
977
+ __need("extract_pdf_tables")(
978
+ __merge(opts, { path: inputFile, output_file: outputFile })
979
+ ),
980
+ markdownToPdf: (inputFile, outputFile, opts) =>
981
+ __need("convert_markdown_to_pdf")(
982
+ __merge(opts, { input_file: inputFile, output_file: outputFile })
983
+ ),
984
+ pdfToMarkdown: (inputFile, outputFile, opts) =>
985
+ __need("convert_pdf_to_markdown")(
986
+ __merge(opts, { input_file: inputFile, output_file: outputFile })
987
+ )
988
+ },
989
+
990
+ web: {
991
+ /**
992
+ * Search the web. \`web_search\` routes across the configured backends
993
+ * host-side; \`opts.provider\` pins one — "default", "serpapi",
994
+ * "dataforseo", "brave", "apify", "openai", "google" (grounded/Gemini).
995
+ */
996
+ search: (query, opts) =>
997
+ __need("web_search")(
998
+ __webArgs(opts, { google: "gemini" }, "query", query)
999
+ ),
1000
+ /** News articles. One \`web_search\` with search_type: "news". */
1001
+ news: (query, opts) =>
1002
+ __need("web_search")(
1003
+ __merge(__webArgs(opts, { google: "serpapi" }, "query", query), {
1004
+ search_type: "news"
1005
+ })
1006
+ ),
1007
+ /**
1008
+ * Image results: title, page link, original image URL, thumbnail URL.
1009
+ * Routes across the same backends as \`search\`/\`news\`, minus the two
1010
+ * that answer with prose instead of results (openai, google/gemini).
1011
+ */
1012
+ images: (query, opts) =>
1013
+ __need("image_search")(__webArgs(opts, {}, "query", query)),
1014
+ /** One HTTP request; returns the response body as text. */
1015
+ fetch: (url, opts) => __need("http_request")(__merge(opts, { url: url })),
1016
+ /** Fetch a page and get its readable text (HTML stripped). */
1017
+ browse: (url) => __need("browser")({ url: url }),
1018
+ /** Save a URL's bytes into the workspace. */
1019
+ download: (url, outputFile) =>
1020
+ __need("download_file")({ url: url, output_file: outputFile }),
1021
+ /** Render a page in a remote browser and save the PNG. */
1022
+ screenshot: (url, outputFile) =>
1023
+ __need("take_screenshot")({
1024
+ url: url,
1025
+ output_file: outputFile || "screenshot.png"
1026
+ })
1027
+ },
1028
+
1029
+ memory: {
1030
+ /** Remember something durably. Readable from every conversation. */
1031
+ save: (content, opts) =>
1032
+ __need("memory_save")(__merge(opts, { content: content })),
1033
+ list: (opts) => __need("memory_list")(__merge(opts)),
1034
+ /** Find memories by keyword. Every word must appear. */
1035
+ search: (query, opts) =>
1036
+ __need("memory_search")(__merge(opts, { query: query })),
1037
+ update: (memoryId, fields) =>
1038
+ __need("memory_update")(
1039
+ __merge(fields, { memory_id: memoryId })
1040
+ ),
1041
+ remove: (memoryId) =>
1042
+ __need("memory_delete")({ memory_id: memoryId })
1043
+ },
1044
+
1045
+ threads: {
1046
+ /** Past conversations, most recently updated first. */
1047
+ list: (opts) => __need("list_threads")(__merge(opts)),
1048
+ /** One thread and a page of its messages. */
1049
+ get: (threadId, opts) =>
1050
+ __need("get_thread")(__merge(opts, { thread_id: threadId })),
1051
+ /** The newest message in a thread, or undefined when it has none. */
1052
+ last: (threadId) =>
1053
+ __need("get_thread")({
1054
+ thread_id: threadId,
1055
+ limit: 1,
1056
+ newest_first: true
1057
+ }).then((t) => (t && t.messages ? t.messages[0] : undefined)),
1058
+ /** One message in full — untruncated content and every tool call. */
1059
+ message: (messageId) =>
1060
+ __need("get_message")({ message_id: messageId })
1061
+ },
1062
+
1063
+ shared: {
1064
+ /** Metadata for every entry this run shares — no values. */
1065
+ list: (opts) => __need("list_shared")(__merge(opts)),
1066
+ /** Full values for the keys you name; misses come back in \`missing\`. */
1067
+ read: (keys) =>
1068
+ __need("read_shared")({
1069
+ keys: Array.isArray(keys) ? keys : [keys]
1070
+ }),
1071
+ /** Publish under \`shared:<key>\` for the rest of this run to find. */
1072
+ publish: (key, value, opts) =>
1073
+ __need("share_result")(__merge(opts, { key: key, value: value }))
1074
+ },
1075
+
1076
+ email: {
1077
+ search: (opts) => __need("search_email")(__merge(opts)),
1078
+ archive: (messageIds) =>
1079
+ __need("archive_email")({
1080
+ message_ids: Array.isArray(messageIds) ? messageIds : [messageIds]
1081
+ }),
1082
+ label: (messageId, label) =>
1083
+ __need("add_label_to_email")({ message_id: messageId, label: label })
1084
+ },
1085
+
1086
+ assets: {
1087
+ list: (opts) => __need("list_assets")(__merge(opts)),
1088
+ /** Image assets as lightweight handles — feed an id to view_image. */
1089
+ images: (opts) => __need("list_images")(__merge(opts)),
1090
+ search: (query, opts) =>
1091
+ __need("asset_search")(__merge(opts, { query: query })),
1092
+ get: (id) => __need("get_asset")({ asset_id: id }),
1093
+ save: (name, opts) => __need("save_asset")(__merge(opts, { name: name })),
1094
+ read: (name, opts) => __need("read_asset")(__merge(opts, { name: name }))
1095
+ },
1096
+
1097
+ jobs: {
1098
+ list: (opts) => __need("list_jobs")(__merge(opts)),
1099
+ /** The job row, including the run's outputs once it has settled. */
1100
+ get: (id) => __need("get_job")({ job_id: __jobId(id, "get") }),
1101
+ logs: (id, opts) =>
1102
+ __need("get_job_logs")(__merge(opts, { job_id: __jobId(id, "logs") })),
1103
+ /**
1104
+ * Poll a background job until it settles, then return the job record.
1105
+ * Terminal statuses are completed / failed / cancelled / error (the
1106
+ * jobs API's own terminal set). Throws after timeoutMs, naming the job
1107
+ * and the last status seen.
1108
+ */
1109
+ async wait(id, opts) {
1110
+ const jobId = __jobId(id, "wait");
1111
+ const pollMs = Math.max(1000, (opts && opts.pollMs) || 3000);
1112
+ const timeoutMs = (opts && opts.timeoutMs) || 600000;
1113
+ const terminal = ["completed", "failed", "cancelled", "error"];
1114
+ const deadline = Date.now() + timeoutMs;
1115
+ let status = "unknown";
1116
+ for (;;) {
1117
+ const job = await api.jobs.get(jobId);
1118
+ status = (job && (job.status || job.state)) || "unknown";
1119
+ if (terminal.indexOf(status) >= 0) return job;
1120
+ if (Date.now() >= deadline) {
1121
+ throw new Error(
1122
+ "nodetool.jobs.wait: job " + jobId + " did not finish within " +
1123
+ timeoutMs + "ms (last status: " + status + "). Poll it with " +
1124
+ "nodetool.jobs.get(id) or read nodetool.jobs.logs(id)."
1125
+ );
1126
+ }
1127
+ await sleep(pollMs);
1128
+ }
1129
+ }
1130
+ },
1131
+
1132
+ generations: {
1133
+ /** The record of every media generation: status, cost, assets. */
1134
+ list: (opts) => __need("list_generations")(__merge(opts)),
1135
+ get: (id) =>
1136
+ __need("get_generation")({ generation_id: __generationId(id, "get") }),
1137
+ /**
1138
+ * Wait for a generation started with background: true to settle and
1139
+ * return its record — cost and asset ids included.
1140
+ */
1141
+ wait: (id, opts) =>
1142
+ __need("await_generation")(
1143
+ __merge(opts, { generation_id: __generationId(id, "wait") })
1144
+ ),
1145
+ cancel: (id) =>
1146
+ __need("cancel_generation")({
1147
+ generation_id: __generationId(id, "cancel")
1148
+ }),
1149
+ /** Ask the provider what it billed, by request id, and update the row. */
1150
+ reconcile: (id) =>
1151
+ __need("reconcile_generation")({
1152
+ generation_id: __generationId(id, "reconcile")
1153
+ }),
1154
+ /**
1155
+ * The provider's own record instead of this installation's: what it ran
1156
+ * from any machine, at the price it billed. Not every provider keeps one.
1157
+ */
1158
+ fromProvider: (provider, opts) =>
1159
+ __need("list_provider_generations")(__merge(opts, { provider: provider })),
1160
+ /** One provider-side generation by the provider's own request id. */
1161
+ getFromProvider: (provider, requestId, opts) =>
1162
+ __need("get_provider_generation")(
1163
+ __merge(opts, { provider: provider, request_id: requestId })
1164
+ )
1165
+ },
1166
+
1167
+ collections: {
1168
+ list: () => __need("list_collections")({}),
1169
+ query: (collection, query, opts) =>
1170
+ __need("query_collection")(
1171
+ __merge(opts, { collection: collection, query: query })
1172
+ ),
1173
+ /** Index one chunk under a source id (re-indexing the same id updates it). */
1174
+ index: (text, sourceId, opts) =>
1175
+ __need("vector_index")(
1176
+ __merge(opts, { text: text, source_id: sourceId })
1177
+ ),
1178
+ /** Index many at once: [{text, source_id, metadata?}, ...]. */
1179
+ indexBatch: (chunks, opts) =>
1180
+ __need("vector_batch_index")(__merge(opts, { chunks: chunks })),
1181
+ /** Semantic search over the indexed chunks. */
1182
+ search: (text, opts) =>
1183
+ __need("vector_text_search")(__merge(opts, { text: text })),
1184
+ /** Semantic + keyword search fused by reciprocal rank. */
1185
+ hybridSearch: (text, opts) =>
1186
+ __need("vector_hybrid_search")(__merge(opts, { text: text }))
1187
+ },
1188
+
1189
+ apps: {
1190
+ list: (opts) => __need("list_apps")(__merge(opts)),
1191
+ get: (id) => __need("get_app")({ application_id: id }),
1192
+ /** Create an empty app and get its id back. */
1193
+ create: (name, opts) =>
1194
+ __need("create_app")(__named(name, opts, "apps.create")),
1195
+ /** Apply App Builder steps to a saved app, then save it. */
1196
+ edit: (id, steps, opts) =>
1197
+ __need("edit_app")(
1198
+ __merge(opts, { application_id: id, steps: steps })
1199
+ ),
1200
+ /** Validate + simulate a saved app. {run: false} is the free check. */
1201
+ debug: (id, opts) =>
1202
+ __need("debug_app")(__merge(opts, { application_id: id }))
1203
+ },
1204
+
1205
+ games: {
1206
+ create: (name, opts) =>
1207
+ __need("create_native_game")(__named(name, opts, "games.create")),
1208
+ get: (id, opts) => __need("get_native_game")(__merge(opts, { game_id: id })),
1209
+ edit: (id, ops, opts) => __need("edit_native_game")(__merge(opts, { game_id: id, ops })),
1210
+ setDocument: (id, document, opts) =>
1211
+ __need("edit_native_game")(__merge(opts, { game_id: id, ops: [{ op: "set_document", document }] })),
1212
+ publish: (id, opts) => __need("publish_native_game")(__merge(opts, { game_id: id })),
1213
+ installAsset: (id, slot, binding, opts) =>
1214
+ __need("install_native_game_asset")(__merge(opts, { game_id: id, slot, binding })),
1215
+ playtest: (id, opts) => __need("playtest_native_game")(__merge(opts, { game_id: id })),
1216
+ capture: (id, opts) => __need("capture_native_game_frame")(__merge(opts, { game_id: id })),
1217
+ generateAsset: (id, slot, kind, prompt, opts) =>
1218
+ __need("generate_game_asset")(__merge(opts, { game_id: id, slot, kind, prompt })),
1219
+ build: (id, opts) => __need("build_native_game")(__merge(opts, { game_id: id })),
1220
+ listExamples: (opts) => __need("list_example_games")(__merge(opts)),
1221
+ getExample: (slug) => __need("get_example_game")({ slug }),
1222
+ installExample: (slug, opts) => __need("install_example_game")(__merge(opts, { slug })),
1223
+ autoplay: (id, opts) => __need("autoplay_native_game")(__merge(opts, { game_id: id }))
1224
+ },
1225
+
1226
+ timelines: {
1227
+ list: (opts) => __need("list_timelines")(__merge(opts)),
1228
+ examples: {
1229
+ list: (opts) => __need("list_example_timelines")(__merge(opts)),
1230
+ get: (slug, opts) =>
1231
+ __need("get_example_timeline")(__merge(opts, { slug: slug }))
1232
+ },
1233
+ create: (name, opts) =>
1234
+ __need("create_timeline")(__named(name, opts, "timelines.create")),
1235
+ get: (id) => __need("get_timeline")({ timeline_id: id }),
1236
+ versions: (id, opts) =>
1237
+ __need("list_timeline_versions")(__merge(opts, { timeline_id: id })),
1238
+ getVersion: (id, version) =>
1239
+ __need("get_timeline_version")({ timeline_id: id, version: version }),
1240
+ /** Save the current state as a version. Options: {name}. */
1241
+ snapshot: (id, opts) =>
1242
+ __need("create_timeline_version")(__merge(opts, { timeline_id: id })),
1243
+ /** Alias of snapshot(), named after the create_timeline_version tool. */
1244
+ createVersion: (id, opts) =>
1245
+ __need("create_timeline_version")(__merge(opts, { timeline_id: id })),
1246
+ restore: (id, version) =>
1247
+ __need("restore_timeline_version")({
1248
+ timeline_id: id,
1249
+ version: version
1250
+ }),
1251
+ deleteVersion: (id, version) =>
1252
+ __need("delete_timeline_version")({
1253
+ timeline_id: id,
1254
+ version: version
1255
+ }),
1256
+ /** Options: {fps, width, height, tier, normalize}. normalize:true preflights authoring defaults for an inline document. */
1257
+ validate: (target, opts) =>
1258
+ typeof target === "string"
1259
+ ? __need("validate_timeline")(__merge(opts, { timeline_id: target }))
1260
+ : __need("validate_timeline")(__merge(opts, { document: target })),
1261
+ /**
1262
+ * Composited frames at chosen timecodes — the finished picture, with
1263
+ * every track layered, animations sampled mid-flight and transitions
1264
+ * part way through. Takes an id or an inline document, like validate().
1265
+ * Options: {times_ms, count, width}.
1266
+ */
1267
+ preview: (target, opts) =>
1268
+ typeof target === "string"
1269
+ ? __need("preview_timeline_frame")(
1270
+ __merge(opts, { timeline_id: target })
1271
+ )
1272
+ : __need("preview_timeline_frame")(
1273
+ __merge(opts, { document: target })
1274
+ ),
1275
+ /**
1276
+ * Per-frame pixel difference between two timelines, plus a side-by-side
1277
+ * sheet. Each side is an id, {timeline_id, version} or a document.
1278
+ * Options: {times_ms, range, width}.
1279
+ */
1280
+ compare: (a, b, opts) =>
1281
+ __need("compare_timeline_frames")(__merge(opts, { a: a, b: b })),
1282
+ /** Apply document edits to a saved sequence, server-side. */
1283
+ edit: (id, ops) => __need("edit_timeline")({ timeline_id: id, ops: ops }),
1284
+ /**
1285
+ * Write a whole document at once. The document replaces the stored one,
1286
+ * so send back what get() returned, changed. Validated before anything
1287
+ * is written and snapshotted first, so a bad document is refused and a
1288
+ * good one is undoable. Options: {fps, width, height,
1289
+ * expected_updated_at, snapshot_name}.
1290
+ *
1291
+ * Bookkeeping you leave out is filled in rather than refused: a track's
1292
+ * index (its position in the array), visible: true and locked: false; a
1293
+ * clip's sourceType (generated when it names a prompt, workflow or
1294
+ * binding, else imported), status "generated", locked: false and
1295
+ * versions: []; animation ids (anim_1, anim_2, …), clip and track
1296
+ * effect ids (effect_1, effect_2, …) and enabled: true; missing clip
1297
+ * tracks inferred from mediaType; and markers: [].
1298
+ * Anything you do send is kept as sent. fps/width/height on the document
1299
+ * itself are read as the sequence's settings when the options omit them.
1300
+ */
1301
+ setDocument: (id, document, opts) =>
1302
+ __need("set_timeline_document")(
1303
+ __merge(opts, { timeline_id: id, document: document })
1304
+ ),
1305
+ /**
1306
+ * Render the finished cut as a job. Returns {job_id} immediately;
1307
+ * {wait: true} blocks and returns the rendered asset. Options:
1308
+ * {format, alpha, video_codec, bitrate, motion_blur_samples,
1309
+ * shutter_angle, preview_scale, include_audio, wait, timeout_ms}.
1310
+ */
1311
+ render: (id, opts) =>
1312
+ __need("render_timeline")(__merge(opts, { timeline_id: id })),
1313
+ /**
1314
+ * Reusable templates — a group of clips with named parameters. The ones
1315
+ * NodeTool ships and the ones this user saved, both listed by list().
1316
+ * Insert one with edit(id, [{op: "insert_composition", composition_id,
1317
+ * startMs, params}]).
1318
+ */
1319
+ compositions: {
1320
+ /** Options: {source: "shipped" | "user", query, limit}. */
1321
+ list: (opts) => __need("list_compositions")(__merge(opts)),
1322
+ get: (id) => __need("get_composition")({ composition_id: id }),
1323
+ /**
1324
+ * Save a group on a timeline as a template. params names what varies:
1325
+ * {"<name>": {type, default, path}}.
1326
+ */
1327
+ save: (timelineId, groupTarget, name, params, opts) =>
1328
+ __need("save_composition")(
1329
+ __merge(opts, {
1330
+ timeline_id: timelineId,
1331
+ group_target: groupTarget,
1332
+ name: name,
1333
+ params: params
1334
+ })
1335
+ ),
1336
+ remove: (id) => __need("delete_composition")({ composition_id: id })
1337
+ }
1338
+ },
1339
+
1340
+ sketches: {
1341
+ list: (opts) => __need("list_sketches")(__merge(opts)),
1342
+ /** Create a blank sketch. Pass {width, height} for the canvas size. */
1343
+ create: (name, opts) =>
1344
+ __need("create_sketch")(__named(name, opts, "sketches.create")),
1345
+ get: (id) => __need("get_sketch")({ image_document_id: id }),
1346
+ versions: (id, opts) =>
1347
+ __need("list_sketch_versions")(
1348
+ __merge(opts, { image_document_id: id })
1349
+ ),
1350
+ getVersion: (id, version) =>
1351
+ __need("get_sketch_version")({
1352
+ image_document_id: id,
1353
+ version: version
1354
+ }),
1355
+ snapshot: (id, opts) =>
1356
+ __need("create_sketch_version")(
1357
+ __merge(opts, { image_document_id: id })
1358
+ ),
1359
+ restore: (id, version) =>
1360
+ __need("restore_sketch_version")({
1361
+ image_document_id: id,
1362
+ version: version
1363
+ }),
1364
+ deleteVersion: (id, version) =>
1365
+ __need("delete_sketch_version")({
1366
+ image_document_id: id,
1367
+ version: version
1368
+ }),
1369
+ validate: (target) =>
1370
+ typeof target === "string"
1371
+ ? __need("validate_sketch")({ image_document_id: target })
1372
+ : __need("validate_sketch")({ document: target }),
1373
+ /** Apply layer-structure edits to a saved sketch, server-side. */
1374
+ edit: (id, ops) =>
1375
+ __need("edit_sketch")({ image_document_id: id, ops: ops })
1376
+ },
1377
+
1378
+ scripts: {
1379
+ list: (opts) => __need("list_scripts")(__merge(opts)),
1380
+ /** Create an empty script. Pass {project_id} to place it. */
1381
+ create: (name, opts) =>
1382
+ __need("create_script")(__named(name, opts, "scripts.create")),
1383
+ get: (id) => __need("get_script")({ script_id: id }),
1384
+ voice: (id, opts) =>
1385
+ __need("voice_script_lines")(__merge(opts, { script_id: id })),
1386
+ assembleTimeline: (id, opts) =>
1387
+ __need("assemble_script_timeline")(__merge(opts, { script_id: id })),
1388
+ /** Apply cast/line edits to a saved script, server-side. */
1389
+ edit: (id, ops) => __need("edit_script")({ script_id: id, ops: ops })
1390
+ },
1391
+
1392
+ storyboards: {
1393
+ list: (opts) => __need("list_storyboards")(__merge(opts)),
1394
+ /** Create a blank storyboard. Pass {brief, style, aspect_ratio} for board settings. */
1395
+ create: (name, opts) =>
1396
+ __need("create_storyboard")(__named(name, opts, "storyboards.create")),
1397
+ get: (id) => __need("get_storyboard")({ storyboard_id: id }),
1398
+ renderStills: (id, opts) =>
1399
+ __need("render_storyboard_stills")(
1400
+ __merge(opts, { storyboard_id: id })
1401
+ ),
1402
+ renderClips: (id, opts) =>
1403
+ __need("render_storyboard_clips")(__merge(opts, { storyboard_id: id })),
1404
+ reviseClip: (id, target, instruction, opts) =>
1405
+ __need("revise_storyboard_clip")(
1406
+ __merge(opts, {
1407
+ storyboard_id: id,
1408
+ target: target,
1409
+ instruction: instruction
1410
+ })
1411
+ ),
1412
+ assembleTimeline: (id, opts) =>
1413
+ __need("assemble_storyboard_timeline")(
1414
+ __merge(opts, { storyboard_id: id })
1415
+ ),
1416
+ /** Apply shot-list edits to a saved board, server-side. */
1417
+ edit: (id, ops) => __need("edit_storyboard")({ storyboard_id: id, ops: ops })
1418
+ }
1419
+ };
1420
+
1421
+ /**
1422
+ * Guest globals a caller reaches for under \`nodetool.\` — the namespaces that
1423
+ * live at the top level of the sandbox rather than on the object model. Each
1424
+ * value is the one sentence that sends the caller to the right place.
1425
+ */
1426
+ const __GUEST_GLOBALS = {
1427
+ image: "Probing and editing pixels is \`image.*\`; generating a picture is \`nodetool.media.generateImage\`.",
1428
+ audio: "Sample-level work is \`audio.*\`; generating speech or music is \`nodetool.media.generateSpeech\`/\`generateMusic\`.",
1429
+ video: "Frame and container work is \`video.*\`; generating a clip is \`nodetool.media.generateVideo\`, and probing or encoding a file with a host binary is \`nodetool.media.ffprobe\`/\`ffmpeg\`.",
1430
+ canvas: "Drawing is \`canvas.*\`.",
1431
+ media: "The bare \`media.*\` global holds byte helpers; the tools are \`nodetool.media.*\`.",
1432
+ format: "Text and table formatting is \`format.*\`.",
1433
+ workspace: "Run files are \`workspace.*\`; the library is \`nodetool.assets.*\`.",
1434
+ fetch: "The network is the \`fetch\` global, or \`nodetool.web.fetch\`."
1435
+ };
1436
+
1437
+ /**
1438
+ * What a member that does not exist answers with: callable, and a namespace
1439
+ * all the way down, so \`nodetool.script.list()\` reports the typo in
1440
+ * \`script\` rather than bottoming out one hop later as
1441
+ * \`TypeError: not a function\` — the message the whole guard exists to
1442
+ * replace.
1443
+ */
1444
+ const __missing = (message) =>
1445
+ new Proxy(function () {}, {
1446
+ apply() {
1447
+ throw new Error(message);
1448
+ },
1449
+ get(target, prop) {
1450
+ if (typeof prop !== "string" || prop === "then") return target[prop];
1451
+ return __missing(message);
1452
+ }
1453
+ });
1454
+
1455
+ /**
1456
+ * The nearest member name to one that does not exist, comparing on letters
1457
+ * and digits alone: \`find_model\` finds \`find\`, \`assemble_timeline\` finds
1458
+ * \`assembleTimeline\`, \`create_script\` finds \`create\`.
1459
+ */
1460
+ const __nearest = (prop, names) => {
1461
+ const flatten = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
1462
+ const want = flatten(prop);
1463
+ let best = null;
1464
+ for (const name of names) {
1465
+ const have = flatten(name);
1466
+ if (have === want) return name;
1467
+ if (have.length === 0) continue;
1468
+ const near = want.indexOf(have) === 0 || have.indexOf(want) === 0;
1469
+ if (near && (best === null || have.length > flatten(best).length)) {
1470
+ best = name;
1471
+ }
1472
+ }
1473
+ return best;
1474
+ };
1475
+
1476
+ /**
1477
+ * Every namespace is guarded, so a member that does not exist answers with
1478
+ * its own name instead of QuickJS's \`TypeError: not a function\`.
1479
+ *
1480
+ * The name a capability has on the belt is not the name it has here — the
1481
+ * object model curates: \`find_model\` is \`nodetool.models.find\`,
1482
+ * \`create_script\` is \`nodetool.scripts.create\`. A caller reaching for the
1483
+ * belt spelling got a message that named neither the call it made nor the
1484
+ * one it meant, and a bare \`TypeError\` reads like the sandbox is broken
1485
+ * rather than like a typo: one chat took it as "models are unavailable here"
1486
+ * and abandoned the namespace. An unknown member answers with a thrower
1487
+ * rather than \`undefined\` — the shape \`tools.<name>\` already uses — so the
1488
+ * report lands at the call, where the mistake is, and reads the same whether
1489
+ * the missing half is the method or the namespace.
1490
+ */
1491
+ const __guard = (path, obj) =>
1492
+ new Proxy(obj, {
1493
+ get(target, prop) {
1494
+ // Symbols, everything that really is there, and the handful of names
1495
+ // the language itself reaches for pass straight through: \`then\` so
1496
+ // awaiting a namespace cannot mistake it for a thenable, \`toJSON\` and
1497
+ // \`inspect\` so logging one still prints it instead of throwing.
1498
+ if (
1499
+ typeof prop !== "string" ||
1500
+ prop === "then" ||
1501
+ prop === "toJSON" ||
1502
+ prop === "inspect" ||
1503
+ prop in target
1504
+ ) {
1505
+ return target[prop];
1506
+ }
1507
+ const names = Object.keys(target).sort();
1508
+ const nearest = __nearest(prop, names);
1509
+ // A name that is a *global* here reads as a missing namespace: the
1510
+ // pixel and sample ops are \`image.*\`/\`audio.*\`/\`video.*\`, not
1511
+ // \`nodetool.video.*\`, and a chat that took the miss at face value
1512
+ // gave up on the operation instead of dropping the prefix.
1513
+ const global = path === "nodetool" ? __GUEST_GLOBALS[prop] : undefined;
1514
+ return __missing(
1515
+ path + "." + prop + " does not exist" +
1516
+ (global
1517
+ ? ". \`" + prop + "\` is a global in this sandbox — call \`" +
1518
+ prop + ".*\` with no \`nodetool.\` prefix. " + global
1519
+ : nearest
1520
+ ? ". Did you mean " + path + "." + nearest + "?"
1521
+ : ".") +
1522
+ " " + path + " has: " + names.join(", ") + "." +
1523
+ (path === "nodetool"
1524
+ ? ""
1525
+ : ' nodetool.searchTools("' + prop + '") finds the tool ' +
1526
+ "behind a name if it is one.")
1527
+ );
1528
+ }
1529
+ });
1530
+
1531
+ for (const key of Object.keys(api)) {
1532
+ const value = api[key];
1533
+ if (value && typeof value === "object") {
1534
+ api[key] = __guard("nodetool." + key, value);
1535
+ }
1536
+ }
1537
+ return __guard("nodetool", api);
1538
+ })();
1539
+ `;
1540
+ /** The namespace→tools map, serialized once for the guest's capabilities(). */
1541
+ const NAMESPACE_TOOLS_LITERAL = `const __NT_NAMESPACE_TOOLS = ${JSON.stringify(NODETOOL_API_NAMESPACE_TOOLS)};`;
1542
+ /** The full prelude: namespace map, graph normalizer, API definition. */
1543
+ export const NODETOOL_API_PRELUDE_FULL = `${NAMESPACE_TOOLS_LITERAL}\n${GRAPH_JSON_PRELUDE}\n${NODETOOL_API_PRELUDE}`;
1544
+ /** Guest names {@link NODETOOL_API_PRELUDE_FULL} defines. */
1545
+ export const NODETOOL_API_GLOBALS = [
1546
+ "nodetool",
1547
+ "__NT_NAMESPACE_TOOLS",
1548
+ "__graphJsonOf"
1549
+ ];
1550
+ const NAMESPACE_DOCS = [
1551
+ {
1552
+ namespace: "workflows",
1553
+ doc: `- \`nodetool.workflows\` — \`list()\` returns \`{workflows}\`
1554
+ (an envelope, not a bare array), \`get(id)\`, \`run(id, params, {interactive})\`,
1555
+ \`start(id, params)\` (background job), \`debug(id, params)\`, \`validate(idOrGraph)\`,
1556
+ \`create(name, graph, {description, tags})\`, \`versions(id)\`, \`getVersion(id, n)\`,
1557
+ \`snapshot(id, {name})\`, \`restore(id, n)\`, \`deleteVersion(id, n)\`,
1558
+ \`open(id?)\` (the editable object
1559
+ model — see the graph-editing section). \`validate\` answers
1560
+ \`{ok, issues}\` and throws when the graph has errors. \`debug\` runs the
1561
+ workflow and answers one report: \`{workflow_id, run, job, workflow}\` where
1562
+ \`run\` carries \`{status, outputs, error, verdict}\`, \`job\` carries status,
1563
+ cost and logs, and \`outputs\` is keyed by output name with an array of
1564
+ emitted values per name (\`outputs.hook[0]\`). An interactive run returns an
1565
+ escalation: answer it with \`resolve(sessionId, escalationId, action,
1566
+ {outputs, reason, apply_to})\` — retry/substitute/skip/end_stream/fail — and
1567
+ get the next escalation or the final report. Write the whole
1568
+ run-and-resolve loop (\`while (report.status === "escalated") ...\`) in one
1569
+ action. \`list({workflow_type: "example"})\` enumerates the shipped
1570
+ example workflows and \`example("<package>/<name>")\` loads one with its
1571
+ graph — a worked example to read before authoring one.`
1572
+ },
1573
+ {
1574
+ namespace: "settings",
1575
+ doc: `- \`nodetool.settings\` — this install's configuration. \`list({group})\`,
1576
+ \`get(key)\` and \`set(key, value)\` cover the ordinary settings; \`secrets()\`
1577
+ reports which credentials are configured, without their values. A secret is
1578
+ never set from code: \`requestSecret(key, {reason, help_url})\` opens a dialog
1579
+ where the user types it, and answers only whether they saved one — read it
1580
+ afterwards with \`nodetool.secrets.get(key)\`, which works only if this run
1581
+ declares the name in its secret scope. When a run has no interactive client
1582
+ the request is refused; say what is missing instead of asking again.`
1583
+ },
1584
+ {
1585
+ namespace: "nodes",
1586
+ doc: `- \`nodetool.nodes\` — the graph author's discovery half. \`search_nodes\`,
1587
+ \`get_node_info\` and \`list_nodes\` are direct tool calls — reach for those
1588
+ when you are only looking something up; these are the same lookups inside an
1589
+ action. NEVER guess a node
1590
+ type: \`await search(["summarize text"], {n_results, input_type, output_type})\`
1591
+ (a bare string works too) to find candidates — it returns
1592
+ \`{total, results}\`, and each result carries its node type on \`type\`
1593
+ (not \`node_type\`) — then
1594
+ \`await info("nodetool.text.Concat")\` for the exact properties, inputs and
1595
+ outputs before you import that node's namespace from the DSL package.
1596
+ \`list({namespace, limit})\`
1597
+ browses a namespace. \`run(type, inputs)\` is the single-node harness — probe
1598
+ one node with a property bag before wiring it into a graph.`
1599
+ },
1600
+ {
1601
+ namespace: "agents",
1602
+ doc: `- \`nodetool.agents\` — delegate to sub-agents. \`await run(prompt, {description})\`
1603
+ spawns a child with this belt's tools but a FRESH context: the prompt must be
1604
+ self-contained (ask for JSON in it when you want structure back). Fan out
1605
+ with \`nodetool.batch(prompts, (p) => nodetool.agents.run(p))\` — one
1606
+ settled \`{ok, value | error}\` entry per prompt. For independent work that
1607
+ can run while you do something else, \`start(prompt)\` returns
1608
+ \`(subtask_id)\` immediately and \`await wait({ids})\` collects
1609
+ \`(status, result | error)\` later in the same action — never end without
1610
+ waiting for results you need. Delegate work that benefits
1611
+ from a fresh focused context, not one-tool errands.`
1612
+ },
1613
+ {
1614
+ namespace: "models",
1615
+ doc: `- \`nodetool.models\` — model discovery. \`find_model\` / \`list_models\` are
1616
+ direct tool calls, so a plain lookup is one call and not an action; these are
1617
+ the same lookups from inside an action, where a picked model feeds the next
1618
+ call. \`await pick(capability)\` resolves ONE model — the best for that job,
1619
+ the top of the quality leaderboard for image, video, speech and music
1620
+ (e.g. \`pick("text_to_image")\` → \`{provider, model_id, ref}\`). Do not shop
1621
+ around: pick with no options IS the good default. When the user
1622
+ named a model, search for it in the SAME call:
1623
+ \`pick("text_to_image", {query: "flux schnell"})\` — \`query\` is free text over
1624
+ model id and name, and \`pick\` throws when nothing matches instead of
1625
+ returning something else. \`find(capability,
1626
+ {query, provider_hint, prefer_local, limit})\` for the ranked list (returns
1627
+ \`{results}\`),
1628
+ \`list({provider, model_type})\` to browse (also \`{results}\` — neither
1629
+ answers with a bare array), \`forProvider(provider)\` for one
1630
+ provider's own catalog. Never guess a model id — pick one, then pass it to
1631
+ \`nodetool.media.*\`. To set a node's model property, assign the result's
1632
+ \`ref\` verbatim (it is the typed \`{type, provider, id, name}\` value the
1633
+ property wants — the flat \`model_id\` field does not fit).`
1634
+ },
1635
+ {
1636
+ namespace: "media",
1637
+ doc: `- \`nodetool.media\` — direct generation, no workflow needed. Each call takes a
1638
+ model from \`nodetool.models.pick/find\` (or \`{provider, model_id}\`):
1639
+ \`generateImage(prompt, model, {width, height, output_file})\`,
1640
+ \`editImage(inputFile, prompt, model, {reference_files})\`,
1641
+ \`generateVideo(prompt, model)\`,
1642
+ \`animateImage(inputFile, model)\`,
1643
+ \`videoFromReferences(referenceFiles, model, {prompt})\` — one clip from several
1644
+ image/video references, when more than one reference defines the shot,
1645
+ \`speak(text, model, {voice})\`,
1646
+ \`generateMusic(prompt, model, {lyrics, duration_seconds})\`,
1647
+ \`transcribe(inputFile, model)\`, \`embed(text, model)\`. Results are saved as
1648
+ assets (\`asset://\` URI); pass \`output_file\` for a workspace copy too.
1649
+ Hold each result in a local variable and feed it straight into the next call;
1650
+ record the uris a later action or turn will need with
1651
+ \`nodetool.memory.save\` — never re-run generation for something already saved.
1652
+ Feed results into \`image.*\`, \`audio.*\`, or \`video.*\` by uri. These namespaces take a
1653
+ result, its \`asset_uri\`, or an asset id and return run-local handles. They
1654
+ can combine media too: for example, \`video.addAudio(videoHandle, audioHandle)\`.
1655
+ Save finished handles with \`nodetool.media.toImage/toAudio/toVideo\` before
1656
+ the action ends; keep the returned \`asset://\` ref (in memory if a
1657
+ later turn needs it). Do not pull bytes into the guest, and do not use a
1658
+ handle in a later action — it is dead there.
1659
+ \`editImage\` is the call for "make it like this": pass the image the user
1660
+ attached (or an earlier approved result) as \`inputFile\`, and any further
1661
+ images to match in \`reference_files\` — both take an \`asset://\` uri or a
1662
+ workspace path.
1663
+ To put words on a picture, draw them yourself: \`createCanvas\` with
1664
+ \`fillText\` in the guest, or the flow call
1665
+ \`import { renderText } from "@nodetool-ai/sandbox-flow/lib.image.draw"\`.
1666
+ Never send the user to another tool for text on an image.
1667
+ Judging lives here too, so generate → critique → regenerate is one namespace:
1668
+ \`critique(image, brief, visionModel, {taste_profile})\`,
1669
+ \`compare([imageA, imageB, ...], brief, visionModel)\` (pairwise knockout),
1670
+ \`scoreAdherence(image, brief, visionModel, {questions})\`. The judge takes a
1671
+ VISION chat model — \`pick("generate_message")\` on a vision-capable one, not
1672
+ the image model that generated the picture.
1673
+ \`understandVideo(video, prompt, videoModel, {max_tokens})\` reads a whole clip
1674
+ with a model that takes video (Gemini) and answers \`prompt\` as \`{text}\` —
1675
+ describe it, summarize it, or pull the on-screen text out.
1676
+ Host binaries: \`ffmpeg(args, {inputs, output_file, timeout_seconds})\` runs
1677
+ ffmpeg in the workspace (no shell, workspace paths only, no URL inputs).
1678
+ \`inputs\` stages refs under workspace names first, which is how an asset
1679
+ reaches ffmpeg — concatenating two of them is one call:
1680
+ \`ffmpeg(["-i", "a.mp4", "-i", "b.mp4", "-filter_complex",
1681
+ "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]", "-map", "[v]", "-map", "[a]",
1682
+ "out.mp4"], {inputs: {"a.mp4": uriA, "b.mp4": uriB}, output_file: "out.mp4"})\`;
1683
+ \`ffprobe(path)\` reads a file's format and streams before you decide what to
1684
+ run; \`downloadVideo(url, outputFile, {format,
1685
+ timeout_seconds})\` downloads with yt-dlp. Browse pages with
1686
+ \`nodetool.web.browse(url)\`.`
1687
+ },
1688
+ {
1689
+ namespace: "documents",
1690
+ doc: `- \`nodetool.documents\` — file-to-file document conversion (Pandoc/PDF), paths
1691
+ relative to the workspace: \`convert(inputFile, outputFile, {from_format,
1692
+ to_format, extra_args})\`, \`extractText(pdfPath, {start_page, end_page})\`
1693
+ (returns \`{text}\`), \`extractTables(pdfPath, outputJsonFile)\`,
1694
+ \`markdownToPdf(inputFile, outputFile)\`, \`pdfToMarkdown(inputFile, outputFile)\`.`
1695
+ },
1696
+ {
1697
+ namespace: "web",
1698
+ doc: `- \`nodetool.web\` — the outside world. \`await search(query, {provider})\`
1699
+ and \`news(query)\` route across the configured search backends host-side;
1700
+ \`provider\` pins one (\`"default"\`, \`"openai"\`, \`"google"\`,
1701
+ \`"dataforseo"\`). \`images(query, {provider})\` is the dedicated image search
1702
+ — title, page link, original image URL, thumbnail URL — routed the same way
1703
+ minus the two providers that answer with prose instead of results
1704
+ (\`"openai"\`, \`"google"\`). \`browse(url)\` returns a page's readable text,
1705
+ \`fetch(url, {method, headers, body})\` is a raw HTTP request,
1706
+ \`download(url, outputFile)\` saves bytes into the workspace, and
1707
+ \`screenshot(url, outputFile)\` renders a page to PNG.`
1708
+ },
1709
+ {
1710
+ namespace: "memory",
1711
+ doc: `- \`nodetool.memory\` — durable notes that outlive the conversation. What
1712
+ you save here is readable from every later thread; this thread's notes are
1713
+ shown back to you at the start of each turn, the rest you search for.
1714
+ \`save(content, {title, kind, resources})\` — put the assets, workflows and
1715
+ collections you produce in \`resources\` so you can reuse them later —
1716
+ \`search(query, {limit, thread, kinds})\` finds them by keyword — every word
1717
+ must appear in the title or content — plus \`list({limit, thread, kinds})\`,
1718
+ \`update(memoryId, {content, title, resources})\`, and \`remove(memoryId)\`.`
1719
+ },
1720
+ {
1721
+ namespace: "threads",
1722
+ doc: `- \`nodetool.threads\` — the chat history, read-only. \`list({limit,
1723
+ workflow_id, cursor})\` returns past conversations newest first, each with
1724
+ its last message; \`get(threadId, {limit, newest_first, cursor, max_chars})\`
1725
+ reads a page of messages; \`last(threadId)\` is the newest one; and
1726
+ \`message(messageId)\` is the full record when a summarized message is not
1727
+ enough. Use it to answer "what did we decide last time" instead of asking
1728
+ the user to repeat it.`
1729
+ },
1730
+ {
1731
+ namespace: "shared",
1732
+ doc: `- \`nodetool.shared\` — the scratchpad for THIS run, gone when it ends (use
1733
+ \`nodetool.memory\` for anything that must outlive it). \`list({kind,
1734
+ key_prefix, sources})\` returns metadata only — keys, titles, kinds, byte
1735
+ sizes — so discovery costs no tokens; \`read(keys)\` fetches the full values
1736
+ of the keys you name and reports misses in \`missing\`; \`publish(key, value,
1737
+ {title, description})\` stores under \`shared:<key>\` for later steps and
1738
+ sub-agents to find. Upstream step and task results land here, so read them
1739
+ rather than asking for them again.`
1740
+ },
1741
+ {
1742
+ namespace: "email",
1743
+ doc: `- \`nodetool.email\` — \`search({subject, text, since_hours_ago, max_results})\`,
1744
+ \`archive(messageIds)\`, \`label(messageId, label)\`.`
1745
+ },
1746
+ {
1747
+ namespace: "assets",
1748
+ doc: `- \`nodetool.assets\` — \`list({content_type, limit})\`, \`search(query)\`,
1749
+ \`images({query, limit})\` (image handles — pass an id to \`view_image\`),
1750
+ \`get(assetId)\` (the row — no bytes), \`save(name, {content |
1751
+ content_base64 | source, content_type})\` — \`source\` is the asset_url or
1752
+ /api/storage/ key another tool returned, an \`asset://\` URI, or an http(s)
1753
+ URL, copied host-side: to keep a file download_file or run_apify_actor
1754
+ produced, pass its \`asset_url\` as \`source\`; never \`read()\` it to base64
1755
+ first. \`read(nameOrUri)\` (an \`asset://\` URI, an asset id, a
1756
+ /api/storage/ key, or a stored file name → \`{content, content_base64}\`).
1757
+ To edit a generated image, pass the generation result to \`image.*\` and
1758
+ save with \`nodetool.media.toImage(handle).\``
1759
+ },
1760
+ {
1761
+ namespace: "jobs",
1762
+ doc: `- \`nodetool.jobs\` — \`list({workflow_id})\`, \`get(jobId)\`, \`logs(jobId)\`,
1763
+ \`await wait(jobId, {timeoutMs, pollMs})\` polls until the job settles
1764
+ (completed/failed/cancelled) and returns the job, whose \`outputs\` hold what
1765
+ the run produced. Pair it with
1766
+ \`nodetool.workflows.start(id, params)\`: start the run — it returns a
1767
+ receipt immediately, it does not wait — do other work, then \`wait\` on
1768
+ \`receipt.job_id\` instead of blocking on \`run()\`. \`wait\` replaces a
1769
+ \`get()\` polling loop — start, wait, and read \`settled.outputs\` in one
1770
+ action, never one \`get()\` per action.`
1771
+ },
1772
+ {
1773
+ namespace: "generations",
1774
+ doc: `- \`nodetool.generations\` — the record of every media generation:
1775
+ \`list({status, provider, capability, thread_id, job_id, since, limit})\`,
1776
+ \`get(generationId)\` (status, cost and how it was priced, the assets it
1777
+ produced, the provider's request id), \`await wait(generationId,
1778
+ {timeout_seconds})\` for one started with \`background: true\`,
1779
+ \`cancel(generationId)\`, \`reconcile(generationId)\` to ask the provider
1780
+ what it billed. Every \`generateImage\`/\`generateVideo\`/… result carries
1781
+ \`generation_id\`; read its cost with \`get\` instead of guessing. For the
1782
+ provider's own record — generations this installation never ran, at the price
1783
+ the provider billed — \`fromProvider(provider, {model, status, since, limit})\`
1784
+ and \`getFromProvider(provider, requestId, {model})\`.`
1785
+ },
1786
+ {
1787
+ namespace: "collections",
1788
+ doc: `- \`nodetool.collections\` — RAG, end to end. Index with
1789
+ \`index(text, sourceId, {metadata})\` or \`indexBatch([{text, source_id, metadata}],
1790
+ {base_metadata})\`, then retrieve with \`search(text, {n_results})\`,
1791
+ \`hybridSearch(text, {n_results, k_constant})\` (semantic + keyword), or
1792
+ \`query(collection, text, {n_results})\` against a named collection;
1793
+ \`list()\` shows what exists.`
1794
+ },
1795
+ {
1796
+ namespace: "apps",
1797
+ doc: `- \`nodetool.apps\` — \`list()\`, \`get(id)\`, \`create(name,
1798
+ {description, from_workflow_id})\`, \`edit(id, steps)\` and
1799
+ \`debug(applicationId, {params, interact, run, poll})\`. Build an app by
1800
+ creating it, then driving the App Builder tools through \`edit\`:
1801
+ \`[{tool: "add_operation", input: {…}}, {tool: "add_component", input: {…}}]\`
1802
+ — \`edit(id, [])\` returns every tool and its schema. \`debug\` with
1803
+ \`{run: false}\` is the free, instant wiring check after each change.`
1804
+ },
1805
+ {
1806
+ namespace: "games",
1807
+ doc: `- \`nodetool.games\` — \`create(name, {project_id})\`, \`get(id, {view, source, revision})\`,
1808
+ \`edit(id, ops, {base_updated_at})\`, and \`setDocument(id, document, {base_updated_at})\`.
1809
+ A whole document is one \`set_document\` edit, validated atomically. Build it with
1810
+ \`@nodetool-ai/sandbox-game\` and \`saveGame({name, document}, {games: nodetool.games, project_id})\`.
1811
+ \`publish(id, {base_revision, message})\` saves an immutable revision when requested.
1812
+ \`installAsset(id, slot, binding, opts)\`, \`generateAsset(id, slot, kind, prompt, opts)\`,
1813
+ \`playtest(id, opts)\`, \`capture(id, opts)\`, \`autoplay(id, {win, target_prefix})\`,
1814
+ and \`build(id, {revision})\` install art, verify routes, inspect frames and export.
1815
+ Read a shipped benchmark with \`listExamples()\` and \`getExample("kindle")\`, then
1816
+ \`installExample(slug, {project_id, name})\` to copy it into a project.`
1817
+ },
1818
+ {
1819
+ namespace: "timelines",
1820
+ doc: `- \`nodetool.timelines\` — \`list()\` (→ \`{timelines}\`),
1821
+ \`create(name, {fps, width, height})\` (→ \`{timeline_id}\`; make your own
1822
+ rather than editing one the user has open — vertical is 1080×1920),
1823
+ \`examples.list({query})\` and \`examples.get(slug, {scene_id, clip_offset,
1824
+ clip_limit})\` — shipped reference timelines, structural stats and bounded
1825
+ scene excerpts. Read a scene before building a showcase. The examples are
1826
+ readable directly; they do not need to be installed in the user's library.
1827
+ \`validate(idOrDocument, {tier: "showcase"})\` — structural validation plus
1828
+ showcase warnings about scene groups, custom animation, finish, camera and
1829
+ concurrent visual layers. Omit the tier for standard validation. Warnings
1830
+ describe document structure; inspect rendered frames to judge the picture.
1831
+ \`preview(idOrDocument, {times_ms, count, range, sheet, width})\` (composited
1832
+ frames at chosen timecodes — read the picture back instead of guessing at it;
1833
+ \`range\` sweeps a window and \`sheet: true\` returns it as one labelled
1834
+ contact sheet),
1835
+ \`compare(a, b, {times_ms, range})\` (what actually changed between two
1836
+ timelines or two versions — per-frame pixel difference and a side-by-side
1837
+ sheet),
1838
+ \`versions(id)\`,
1839
+ \`getVersion(id, n)\`, \`snapshot(id, {name})\` (also \`createVersion\`,
1840
+ the same call under the tool's own name), \`restore(id, n)\`,
1841
+ \`deleteVersion(id, n)\`,
1842
+ \`setDocument(id, document, {fps, width, height, expected_updated_at,
1843
+ snapshot_name})\` — the whole document in one call, validated before it is
1844
+ written and snapshotted first, for authoring a cut from scratch. Missing
1845
+ bookkeeping is filled in: track \`index\`/\`visible\`/\`locked\`, clip
1846
+ \`sourceType\`/\`status\`/\`locked\`/\`versions\`, animation ids and
1847
+ \`markers\`; document-level \`fps\`/\`width\`/\`height\` are read as
1848
+ the sequence's settings; a midi track's \`instrument: {preset}\` and a
1849
+ typewriter's plain \`durationMs\` resolve as the edit ops resolve them. To
1850
+ build that document in code — scenes, shapes, text, keyframes, a beat grid —
1851
+ import \`@nodetool-ai/sandbox-timeline\` and save it with its
1852
+ \`saveTimeline\` —
1853
+ \`render(id, {wait, preview_scale, format, alpha, timeout_ms})\` — the cut
1854
+ as a video, run as a job; render and look before you call a cut done, and
1855
+ draft at a \`preview_scale\` below 1 while you are still iterating — and
1856
+ \`edit(id, ops)\` — the cut itself, server-side: \`[{op: "add_track", type:
1857
+ "audio"}, {op: "add_text_clip", text: "Hi"}, {op: "split_clip", target:
1858
+ "shot", atMs: 3000}, {op: "animate_clip", target: "Hi", animations:
1859
+ [{role: "in", preset: "fade"}]}]\`. Start with \`{op: "get_state"}\` for ids.
1860
+ Shape \`shape.x/y/width/height\` use 0..1 frame fractions from the top-left.
1861
+ Every clip's \`transform.position.x/y\` uses sequence pixels relative to
1862
+ the frame center (positive x right, positive y down), including text and
1863
+ shapes. \`set_effects\` blur takes \`{type: "blur", radius: 80}\` in pixels;
1864
+ unknown effect parameters are rejected.
1865
+ Existing library media goes on with \`{op: "add_media_clip", asset:
1866
+ "asset://<id>.mp4"}\`, which appends after the track's last clip — so one
1867
+ call per asset lays them end to end.`
1868
+ },
1869
+ {
1870
+ namespace: "sketches",
1871
+ doc: `- \`nodetool.sketches\` — \`list()\`, \`create(name, {width, height})\`,
1872
+ \`validate(idOrDocument)\`, \`versions(id)\`, \`getVersion(id, n)\`,
1873
+ \`snapshot(id, {name})\`, \`restore(id, n)\`, \`deleteVersion(id, n)\`, and \`edit(id, ops)\` for layer
1874
+ structure server-side: \`[{op: "add_layer", name: "Shadow"}, {op:
1875
+ "set_layer_props", target: "Shadow", opacity: 0.4, blendMode:
1876
+ "multiply"}]\`. Create a blank canvas first, then edit. Pixels are never
1877
+ touched — painting and generation stay with an open editor or a workflow
1878
+ run.`
1879
+ },
1880
+ {
1881
+ namespace: "scripts",
1882
+ doc: `- \`nodetool.scripts\` — \`list()\`, \`get(id)\`, \`voice(id, {targets, provider,
1883
+ model, voice})\`, \`assembleTimeline(id)\`, and \`edit(id, ops)\` for the words
1884
+ themselves: \`[{op: "add_speaker", name: "Narrator"}, {op: "add_line", text:
1885
+ "Once upon a time.", speaker: "Narrator"}]\`. Rewriting a line leaves its
1886
+ takes stale, so \`voice()\` re-records exactly those.`
1887
+ },
1888
+ {
1889
+ namespace: "storyboards",
1890
+ doc: `- \`nodetool.storyboards\` — \`list()\`, \`create(name, {brief, style,
1891
+ aspect_ratio})\`, \`get(id)\`, \`renderStills(id, {targets})\`,
1892
+ \`renderClips(id, {targets})\`, \`reviseClip(id, target, instruction)\`,
1893
+ \`assembleTimeline(id)\`, and \`edit(id, ops)\` for the shot list:
1894
+ \`[{op: "add_shot", action: "Wide of the lighthouse at dusk",
1895
+ duration_seconds: 4}, {op: "reorder_shot", target: "shot_2", index: 0}]\`.
1896
+ Create a blank board first, then add shots with \`edit\`.`
1897
+ }
1898
+ ];
1899
+ const BATCH_EXAMPLE = `Batching turns one workflow into a dynamic pipeline — loops, joins, and
1900
+ per-item parameters live in your code:
1901
+
1902
+ \`\`\`js
1903
+ const rows = JSON.parse(await workspace.read("products.json"));
1904
+ const runs = await nodetool.batch(rows, (row) =>
1905
+ nodetool.workflows.run(wfId, { image_url: row.image_url, title: row.title }),
1906
+ { concurrency: 3 });
1907
+ const failed = runs.filter((r) => !r.ok);
1908
+ if (failed.length) {
1909
+ await nodetool.memory.save("failed rows: " + failed.map((r) => r.index).join(","), { title: "Batch failures" });
1910
+ }
1911
+ return { ok: runs.filter((r) => r.ok).length, failed: failed.length };
1912
+ \`\`\`
1913
+
1914
+ \`nodetool.batch(items, fn, {concurrency, stopOnError})\` never throws — each
1915
+ entry settles as \`{ok, index, item, value | error}\`. A handful of items is one
1916
+ \`batch\` call in one action; only lists big enough to threaten the sandbox
1917
+ limits get chunked across actions, persisting partial progress with
1918
+ \`nodetool.memory.save\`.`;
1919
+ const MEDIA_EXAMPLE = `Pick a model, then generate — batching included. Every result
1920
+ is already a saved asset; return the uris and record the ones you will need
1921
+ after this action:
1922
+
1923
+ \`\`\`js
1924
+ const model = await nodetool.models.pick("text_to_image");
1925
+ const shots = ["a red fox in snow", "a fox by a river"];
1926
+ const images = await nodetool.batch(shots, (prompt) =>
1927
+ nodetool.media.generateImage(prompt, model), { concurrency: 2 });
1928
+ const uris = images.map((r) => (r.ok ? r.value.asset_uri : null)).filter(Boolean);
1929
+ await nodetool.memory.save(uris.join("\\n"), { title: "Fox stills" });
1930
+ return uris;
1931
+ \`\`\``;
1932
+ /**
1933
+ * The `nodetool` API section for codeact system prompts, documenting only the
1934
+ * namespaces this belt can actually serve. Empty string when none can.
1935
+ */
1936
+ /** Client tool families that address a document open in the user's browser. */
1937
+ const DOCUMENT_UI_TOOL_PREFIXES = [
1938
+ "ui_timeline_",
1939
+ "ui_sketch_",
1940
+ "ui_script_",
1941
+ "ui_storyboard_"
1942
+ ];
1943
+ const DOCUMENT_SURFACE_GUIDANCE = `# Editing documents: server-side first
1944
+
1945
+ A timeline, sketch, script, or storyboard that has an id is editable
1946
+ server-side through \`nodetool.<surface>.edit(id, ops)\`. Prefer it. The edit
1947
+ lands on the stored document under a compare-and-swap, works whether or not the
1948
+ user has that document open, and an open editor picks the change up live — so
1949
+ one path covers both cases.
1950
+
1951
+ Reach for a \`ui_*\` tool only for what a server-side edit cannot do:
1952
+
1953
+ - \`ui_sketch_get_layer_image\`, \`ui_sketch_render_to_asset\` — real pixels off
1954
+ the canvas.
1955
+ - \`ui_timeline_get_clip_frames\` — rendered video frames.
1956
+ - \`ui_sketch_generate\`, \`ui_timeline_generate_clip\`,
1957
+ \`ui_storyboard_generate_*\`, \`ui_script_voice_*\` — generation the browser
1958
+ drives. Headlessly these are \`nodetool.storyboards.renderStills/renderClips\`,
1959
+ \`nodetool.scripts.voice\`, \`nodetool.media.*\`, or a workflow run.
1960
+ - Moving the user's view: selection, playhead, active tool.
1961
+
1962
+ If you do not know the document's id, find it with \`list()\` on the namespace.`;
1963
+ /**
1964
+ * Heading of the prompt section {@link buildNodetoolApiPromptSection} renders.
1965
+ * `buildCodeActSystemPrompt` keys on it to know the `nodetool` object model is
1966
+ * loaded — and then documents `nodetool.batch` as THE fan-out primitive
1967
+ * instead of the bare-sandbox `parallelMap` helper.
1968
+ */
1969
+ export const NODETOOL_API_SECTION_HEADER = "# The `nodetool` object model";
1970
+ /**
1971
+ * The rule for choosing between the three ways a turn makes node work happen.
1972
+ * Rendered only for the surfaces this session actually has, so it never sends
1973
+ * the model at a pack that is not installed.
1974
+ *
1975
+ * It exists because the surfaces answer different questions and a model that
1976
+ * knows all three still picks by habit: a chat turn asked to "run a pipeline
1977
+ * that generates an image and removes its background" authored a graph, saved
1978
+ * it, never ran it, and then — asked to do it "without a graph" — bent
1979
+ * `media.editImage` into a background remover instead of calling the
1980
+ * `RemoveBackground` node it had already found.
1981
+ */
1982
+ function surfaceChoiceSection(options, names) {
1983
+ if (!options.nativeFlow && !options.graphDsl)
1984
+ return "";
1985
+ const bullets = [];
1986
+ if (names.has("generate_image")) {
1987
+ bullets.push(`- \`nodetool.media.*\` — ONE generation with a picked model: an image, a
1988
+ video, speech, a transcript. The short path when a verb there does exactly
1989
+ what was asked. It has no verb for most node work, and stretching one to
1990
+ cover a node — an edit prompt in place of a background remover, an
1991
+ upscaler, a converter — produces something other than the node the user
1992
+ meant.`);
1993
+ }
1994
+ if (options.nativeFlow) {
1995
+ bullets.push(`- **Native flow** (\`${FLOW_PACKAGE}\`) — the user wants the RESULT:
1996
+ "run", "generate", "then", "for each". Any node in the registry, several in
1997
+ a row, in this action. Nothing is saved and nothing opens in the editor.`);
1998
+ }
1999
+ if (options.graphDsl) {
2000
+ bullets.push(`- **Graph DSL** (\`${GRAPH_DSL_PACKAGE}\`) — the user wants the WORKFLOW:
2001
+ something saved, opened in the editor, re-run later, or handed to someone
2002
+ else. Authoring it does not run it — \`nodetool.workflows.run(id, params)\`
2003
+ does.`);
2004
+ }
2005
+ const closer = options.nativeFlow
2006
+ ? `
2007
+
2008
+ When the ask is to do the work and the user never mentioned a workflow, run
2009
+ the nodes and report what came out. Reaching for a graph there leaves the
2010
+ user with an artifact they did not ask for and the work still undone.`
2011
+ : "";
2012
+ return `# Which surface runs the work
2013
+
2014
+ Pick by what the user asked for, not by what the last turn used.
2015
+
2016
+ ${bullets.join("\n")}${closer}`;
2017
+ }
2018
+ export function buildNodetoolApiPromptSection(toolNames, options = {}) {
2019
+ const names = new Set(toolNames);
2020
+ const active = NAMESPACE_DOCS.filter((entry) => NODETOOL_API_NAMESPACE_TOOLS[entry.namespace].some((tool) => names.has(tool)));
2021
+ if (active.length === 0)
2022
+ return "";
2023
+ const sections = [
2024
+ NODETOOL_API_SECTION_HEADER,
2025
+ `Platform objects — workflows, models, media, documents — are
2026
+ driven through \`nodetool.*\`, not through the raw imported calls. The backing
2027
+ tools are deliberately absent from the tool catalog above; this object model
2028
+ is their one documented surface. \`nodetool.capabilities()\` reports what is
2029
+ available. A method whose backing tool is missing throws and names the tool.`,
2030
+ `The same capabilities are also importable, one module per namespace:
2031
+ \`import { list_workflows } from "@nodetool-ai/sandbox-nodetool/workflows"\`, or
2032
+ \`import workflows from "@nodetool-ai/sandbox-nodetool/workflows"\` for the whole
2033
+ namespace. Each export takes the one arguments object its tool takes. This is
2034
+ the same gated implementation \`nodetool.*\` calls — \`nodetool.*\` stays
2035
+ available, and the two cannot disagree. A module this session does not mount
2036
+ fails the action by name, before any code runs.`,
2037
+ active.map((entry) => entry.doc).join("\n")
2038
+ ];
2039
+ const choice = surfaceChoiceSection(options, names);
2040
+ if (choice)
2041
+ sections.push(choice);
2042
+ if (options.graphDsl)
2043
+ sections.push(GRAPH_DSL_PROMPT_SECTION);
2044
+ if (options.nativeFlow)
2045
+ sections.push(FLOW_PROMPT_SECTION);
2046
+ if (names.has("find_model") && names.has("generate_image")) {
2047
+ sections.push(MEDIA_EXAMPLE);
2048
+ }
2049
+ if (names.has("run_workflow"))
2050
+ sections.push(BATCH_EXAMPLE);
2051
+ if ([...names].some((name) => DOCUMENT_UI_TOOL_PREFIXES.some((p) => name.startsWith(p)))) {
2052
+ sections.push(DOCUMENT_SURFACE_GUIDANCE);
2053
+ }
2054
+ return sections.join("\n\n");
2055
+ }
2056
+ //# sourceMappingURL=nodetool-api.js.map