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

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