@nodetool-ai/protocol 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 (624) hide show
  1. package/README.md +56 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/ai-video-production.d.ts +276 -0
  4. package/dist/ai-video-production.d.ts.map +1 -0
  5. package/dist/ai-video-production.js +131 -0
  6. package/dist/ai-video-production.js.map +1 -0
  7. package/dist/api-schemas/agent-access.d.ts +134 -0
  8. package/dist/api-schemas/agent-access.d.ts.map +1 -0
  9. package/dist/api-schemas/agent-access.js +93 -0
  10. package/dist/api-schemas/agent-access.js.map +1 -0
  11. package/dist/api-schemas/api-error-code.d.ts +11 -1
  12. package/dist/api-schemas/api-error-code.d.ts.map +1 -1
  13. package/dist/api-schemas/api-error-code.js +10 -0
  14. package/dist/api-schemas/api-error-code.js.map +1 -1
  15. package/dist/api-schemas/app-runs.d.ts +1410 -0
  16. package/dist/api-schemas/app-runs.d.ts.map +1 -0
  17. package/dist/api-schemas/app-runs.js +105 -0
  18. package/dist/api-schemas/app-runs.js.map +1 -0
  19. package/dist/api-schemas/applications.d.ts +3216 -0
  20. package/dist/api-schemas/applications.d.ts.map +1 -0
  21. package/dist/api-schemas/applications.js +487 -0
  22. package/dist/api-schemas/applications.js.map +1 -0
  23. package/dist/api-schemas/assets.d.ts +239 -0
  24. package/dist/api-schemas/assets.d.ts.map +1 -1
  25. package/dist/api-schemas/assets.js +136 -5
  26. package/dist/api-schemas/assets.js.map +1 -1
  27. package/dist/api-schemas/bug-reports.d.ts +38 -0
  28. package/dist/api-schemas/bug-reports.d.ts.map +1 -0
  29. package/dist/api-schemas/bug-reports.js +34 -0
  30. package/dist/api-schemas/bug-reports.js.map +1 -0
  31. package/dist/api-schemas/code-gen.d.ts +176 -0
  32. package/dist/api-schemas/code-gen.d.ts.map +1 -0
  33. package/dist/api-schemas/code-gen.js +205 -0
  34. package/dist/api-schemas/code-gen.js.map +1 -0
  35. package/dist/api-schemas/collections.d.ts.map +1 -1
  36. package/dist/api-schemas/collections.js +3 -4
  37. package/dist/api-schemas/collections.js.map +1 -1
  38. package/dist/api-schemas/costs.d.ts +179 -0
  39. package/dist/api-schemas/costs.d.ts.map +1 -1
  40. package/dist/api-schemas/costs.js +100 -4
  41. package/dist/api-schemas/costs.js.map +1 -1
  42. package/dist/api-schemas/credits.d.ts +42 -0
  43. package/dist/api-schemas/credits.d.ts.map +1 -0
  44. package/dist/api-schemas/credits.js +43 -0
  45. package/dist/api-schemas/credits.js.map +1 -0
  46. package/dist/api-schemas/documents.d.ts +163 -0
  47. package/dist/api-schemas/documents.d.ts.map +1 -0
  48. package/dist/api-schemas/documents.js +75 -0
  49. package/dist/api-schemas/documents.js.map +1 -0
  50. package/dist/api-schemas/error-traces.d.ts +249 -0
  51. package/dist/api-schemas/error-traces.d.ts.map +1 -0
  52. package/dist/api-schemas/error-traces.js +112 -0
  53. package/dist/api-schemas/error-traces.js.map +1 -0
  54. package/dist/api-schemas/files.d.ts +13 -0
  55. package/dist/api-schemas/files.d.ts.map +1 -1
  56. package/dist/api-schemas/files.js +8 -0
  57. package/dist/api-schemas/files.js.map +1 -1
  58. package/dist/api-schemas/fonts.d.ts +17 -1
  59. package/dist/api-schemas/fonts.d.ts.map +1 -1
  60. package/dist/api-schemas/fonts.js +19 -3
  61. package/dist/api-schemas/fonts.js.map +1 -1
  62. package/dist/api-schemas/index.d.ts +27 -1
  63. package/dist/api-schemas/index.d.ts.map +1 -1
  64. package/dist/api-schemas/index.js +27 -1
  65. package/dist/api-schemas/index.js.map +1 -1
  66. package/dist/api-schemas/jobs.d.ts +44 -0
  67. package/dist/api-schemas/jobs.d.ts.map +1 -1
  68. package/dist/api-schemas/jobs.js +26 -2
  69. package/dist/api-schemas/jobs.js.map +1 -1
  70. package/dist/api-schemas/js-scripts.d.ts +367 -0
  71. package/dist/api-schemas/js-scripts.d.ts.map +1 -0
  72. package/dist/api-schemas/js-scripts.js +341 -0
  73. package/dist/api-schemas/js-scripts.js.map +1 -0
  74. package/dist/api-schemas/mcp-config.d.ts +4 -1
  75. package/dist/api-schemas/mcp-config.d.ts.map +1 -1
  76. package/dist/api-schemas/mcp-config.js +10 -3
  77. package/dist/api-schemas/mcp-config.js.map +1 -1
  78. package/dist/api-schemas/memories.d.ts +84 -0
  79. package/dist/api-schemas/memories.d.ts.map +1 -0
  80. package/dist/api-schemas/memories.js +54 -0
  81. package/dist/api-schemas/memories.js.map +1 -0
  82. package/dist/api-schemas/messages.d.ts +1 -0
  83. package/dist/api-schemas/messages.d.ts.map +1 -1
  84. package/dist/api-schemas/messages.js +4 -4
  85. package/dist/api-schemas/messages.js.map +1 -1
  86. package/dist/api-schemas/models.d.ts +164 -0
  87. package/dist/api-schemas/models.d.ts.map +1 -1
  88. package/dist/api-schemas/models.js +53 -6
  89. package/dist/api-schemas/models.js.map +1 -1
  90. package/dist/api-schemas/nodes.d.ts +97 -0
  91. package/dist/api-schemas/nodes.d.ts.map +1 -1
  92. package/dist/api-schemas/nodes.js +89 -0
  93. package/dist/api-schemas/nodes.js.map +1 -1
  94. package/dist/api-schemas/projects.d.ts +427 -0
  95. package/dist/api-schemas/projects.d.ts.map +1 -0
  96. package/dist/api-schemas/projects.js +224 -0
  97. package/dist/api-schemas/projects.js.map +1 -0
  98. package/dist/api-schemas/recipes.d.ts +172 -0
  99. package/dist/api-schemas/recipes.d.ts.map +1 -0
  100. package/dist/api-schemas/recipes.js +144 -0
  101. package/dist/api-schemas/recipes.js.map +1 -0
  102. package/dist/api-schemas/resources.d.ts +112 -0
  103. package/dist/api-schemas/resources.d.ts.map +1 -0
  104. package/dist/api-schemas/resources.js +44 -0
  105. package/dist/api-schemas/resources.js.map +1 -0
  106. package/dist/api-schemas/runs.d.ts +6 -0
  107. package/dist/api-schemas/runs.d.ts.map +1 -0
  108. package/dist/api-schemas/runs.js +4 -0
  109. package/dist/api-schemas/runs.js.map +1 -0
  110. package/dist/api-schemas/scripts.d.ts +1571 -0
  111. package/dist/api-schemas/scripts.d.ts.map +1 -0
  112. package/dist/api-schemas/scripts.js +153 -0
  113. package/dist/api-schemas/scripts.js.map +1 -0
  114. package/dist/api-schemas/sdk-execution-v1.d.ts +468 -0
  115. package/dist/api-schemas/sdk-execution-v1.d.ts.map +1 -0
  116. package/dist/api-schemas/sdk-execution-v1.js +115 -0
  117. package/dist/api-schemas/sdk-execution-v1.js.map +1 -0
  118. package/dist/api-schemas/sdk-lifecycle-v1.d.ts +217 -0
  119. package/dist/api-schemas/sdk-lifecycle-v1.d.ts.map +1 -0
  120. package/dist/api-schemas/sdk-lifecycle-v1.js +117 -0
  121. package/dist/api-schemas/sdk-lifecycle-v1.js.map +1 -0
  122. package/dist/api-schemas/sdk-models-v1.d.ts +181 -0
  123. package/dist/api-schemas/sdk-models-v1.d.ts.map +1 -0
  124. package/dist/api-schemas/sdk-models-v1.js +108 -0
  125. package/dist/api-schemas/sdk-models-v1.js.map +1 -0
  126. package/dist/api-schemas/sdk-v1-http-operations.d.ts +941 -0
  127. package/dist/api-schemas/sdk-v1-http-operations.d.ts.map +1 -0
  128. package/dist/api-schemas/sdk-v1-http-operations.js +465 -0
  129. package/dist/api-schemas/sdk-v1-http-operations.js.map +1 -0
  130. package/dist/api-schemas/sdk-v1-operations.d.ts +151 -0
  131. package/dist/api-schemas/sdk-v1-operations.d.ts.map +1 -0
  132. package/dist/api-schemas/sdk-v1-operations.js +97 -0
  133. package/dist/api-schemas/sdk-v1-operations.js.map +1 -0
  134. package/dist/api-schemas/sdk-v1-websocket-operations.d.ts +97 -0
  135. package/dist/api-schemas/sdk-v1-websocket-operations.d.ts.map +1 -0
  136. package/dist/api-schemas/sdk-v1-websocket-operations.js +96 -0
  137. package/dist/api-schemas/sdk-v1-websocket-operations.js.map +1 -0
  138. package/dist/api-schemas/sdk-v1.d.ts +15 -0
  139. package/dist/api-schemas/sdk-v1.d.ts.map +1 -0
  140. package/dist/api-schemas/sdk-v1.js +22 -0
  141. package/dist/api-schemas/sdk-v1.js.map +1 -0
  142. package/dist/api-schemas/segmentation.d.ts +75 -0
  143. package/dist/api-schemas/segmentation.d.ts.map +1 -0
  144. package/dist/api-schemas/segmentation.js +54 -0
  145. package/dist/api-schemas/segmentation.js.map +1 -0
  146. package/dist/api-schemas/settings.d.ts +162 -0
  147. package/dist/api-schemas/settings.d.ts.map +1 -1
  148. package/dist/api-schemas/settings.js +71 -0
  149. package/dist/api-schemas/settings.js.map +1 -1
  150. package/dist/api-schemas/sketch.d.ts +858 -0
  151. package/dist/api-schemas/sketch.d.ts.map +1 -0
  152. package/dist/api-schemas/sketch.js +546 -0
  153. package/dist/api-schemas/sketch.js.map +1 -0
  154. package/dist/api-schemas/skills.d.ts +27 -14
  155. package/dist/api-schemas/skills.d.ts.map +1 -1
  156. package/dist/api-schemas/skills.js +64 -11
  157. package/dist/api-schemas/skills.js.map +1 -1
  158. package/dist/api-schemas/storage.d.ts +8 -0
  159. package/dist/api-schemas/storage.d.ts.map +1 -1
  160. package/dist/api-schemas/storage.js +7 -0
  161. package/dist/api-schemas/storage.js.map +1 -1
  162. package/dist/api-schemas/storyboards.d.ts +8595 -0
  163. package/dist/api-schemas/storyboards.d.ts.map +1 -0
  164. package/dist/api-schemas/storyboards.js +524 -0
  165. package/dist/api-schemas/storyboards.js.map +1 -0
  166. package/dist/api-schemas/threads.d.ts +12 -4
  167. package/dist/api-schemas/threads.d.ts.map +1 -1
  168. package/dist/api-schemas/threads.js +12 -4
  169. package/dist/api-schemas/threads.js.map +1 -1
  170. package/dist/api-schemas/timeline-tool-contracts.d.ts +1687 -0
  171. package/dist/api-schemas/timeline-tool-contracts.d.ts.map +1 -0
  172. package/dist/api-schemas/timeline-tool-contracts.js +725 -0
  173. package/dist/api-schemas/timeline-tool-contracts.js.map +1 -0
  174. package/dist/api-schemas/timeline-tool-params.d.ts +1270 -0
  175. package/dist/api-schemas/timeline-tool-params.d.ts.map +1 -0
  176. package/dist/api-schemas/timeline-tool-params.js +1529 -0
  177. package/dist/api-schemas/timeline-tool-params.js.map +1 -0
  178. package/dist/api-schemas/timeline.d.ts +13740 -0
  179. package/dist/api-schemas/timeline.d.ts.map +1 -0
  180. package/dist/api-schemas/timeline.js +1928 -0
  181. package/dist/api-schemas/timeline.js.map +1 -0
  182. package/dist/api-schemas/ui-tool-contract.d.ts +35 -0
  183. package/dist/api-schemas/ui-tool-contract.d.ts.map +1 -0
  184. package/dist/api-schemas/ui-tool-contract.js +31 -0
  185. package/dist/api-schemas/ui-tool-contract.js.map +1 -0
  186. package/dist/api-schemas/workflows.d.ts +904 -18
  187. package/dist/api-schemas/workflows.d.ts.map +1 -1
  188. package/dist/api-schemas/workflows.js +507 -6
  189. package/dist/api-schemas/workflows.js.map +1 -1
  190. package/dist/api-schemas/workspace.d.ts +45 -0
  191. package/dist/api-schemas/workspace.d.ts.map +1 -1
  192. package/dist/api-schemas/workspace.js +47 -1
  193. package/dist/api-schemas/workspace.js.map +1 -1
  194. package/dist/api-types.d.ts +651 -27
  195. package/dist/api-types.d.ts.map +1 -1
  196. package/dist/api-types.js +252 -1
  197. package/dist/api-types.js.map +1 -1
  198. package/dist/app-deployment.d.ts +37 -0
  199. package/dist/app-deployment.d.ts.map +1 -0
  200. package/dist/app-deployment.js +42 -0
  201. package/dist/app-deployment.js.map +1 -0
  202. package/dist/asset-file-name.d.ts +15 -0
  203. package/dist/asset-file-name.d.ts.map +1 -0
  204. package/dist/asset-file-name.js +61 -0
  205. package/dist/asset-file-name.js.map +1 -0
  206. package/dist/asset-generation.d.ts +58 -0
  207. package/dist/asset-generation.d.ts.map +1 -0
  208. package/dist/asset-generation.js +147 -0
  209. package/dist/asset-generation.js.map +1 -0
  210. package/dist/blend-modes.d.ts +20 -0
  211. package/dist/blend-modes.d.ts.map +1 -0
  212. package/dist/blend-modes.js +33 -0
  213. package/dist/blend-modes.js.map +1 -0
  214. package/dist/bridge-frames.d.ts +654 -0
  215. package/dist/bridge-frames.d.ts.map +1 -0
  216. package/dist/bridge-frames.js +448 -0
  217. package/dist/bridge-frames.js.map +1 -0
  218. package/dist/bridge-frames.schema.json +862 -0
  219. package/dist/bridge-protocol.d.ts +57 -20
  220. package/dist/bridge-protocol.d.ts.map +1 -1
  221. package/dist/bridge-protocol.js +57 -20
  222. package/dist/bridge-protocol.js.map +1 -1
  223. package/dist/browser-run-traces.d.ts +102 -0
  224. package/dist/browser-run-traces.d.ts.map +1 -0
  225. package/dist/browser-run-traces.js +30 -0
  226. package/dist/browser-run-traces.js.map +1 -0
  227. package/dist/builtin-packs.d.ts +45 -0
  228. package/dist/builtin-packs.d.ts.map +1 -0
  229. package/dist/builtin-packs.js +121 -0
  230. package/dist/builtin-packs.js.map +1 -0
  231. package/dist/caption-word.d.ts +15 -0
  232. package/dist/caption-word.d.ts.map +1 -0
  233. package/dist/caption-word.js +10 -0
  234. package/dist/caption-word.js.map +1 -0
  235. package/dist/cloud-profile.d.ts +187 -0
  236. package/dist/cloud-profile.d.ts.map +1 -0
  237. package/dist/cloud-profile.js +286 -0
  238. package/dist/cloud-profile.js.map +1 -0
  239. package/dist/creative.d.ts +580 -0
  240. package/dist/creative.d.ts.map +1 -0
  241. package/dist/creative.js +274 -0
  242. package/dist/creative.js.map +1 -0
  243. package/dist/custom-providers.d.ts +70 -0
  244. package/dist/custom-providers.d.ts.map +1 -0
  245. package/dist/custom-providers.js +125 -0
  246. package/dist/custom-providers.js.map +1 -0
  247. package/dist/document-ops.d.ts +15 -0
  248. package/dist/document-ops.d.ts.map +1 -0
  249. package/dist/document-ops.js +2 -0
  250. package/dist/document-ops.js.map +1 -0
  251. package/dist/game-assets.d.ts +344 -0
  252. package/dist/game-assets.d.ts.map +1 -0
  253. package/dist/game-assets.js +297 -0
  254. package/dist/game-assets.js.map +1 -0
  255. package/dist/game-authoring.d.ts +113 -0
  256. package/dist/game-authoring.d.ts.map +1 -0
  257. package/dist/game-authoring.js +37 -0
  258. package/dist/game-authoring.js.map +1 -0
  259. package/dist/game-design.d.ts +90 -0
  260. package/dist/game-design.d.ts.map +1 -0
  261. package/dist/game-design.js +417 -0
  262. package/dist/game-design.js.map +1 -0
  263. package/dist/game-flow-prompt.d.ts +68 -0
  264. package/dist/game-flow-prompt.d.ts.map +1 -0
  265. package/dist/game-flow-prompt.js +121 -0
  266. package/dist/game-flow-prompt.js.map +1 -0
  267. package/dist/game-graph.d.ts +96 -0
  268. package/dist/game-graph.d.ts.map +1 -0
  269. package/dist/game-graph.js +481 -0
  270. package/dist/game-graph.js.map +1 -0
  271. package/dist/game-migration.d.ts +4 -0
  272. package/dist/game-migration.d.ts.map +1 -0
  273. package/dist/game-migration.js +6 -0
  274. package/dist/game-migration.js.map +1 -0
  275. package/dist/game-slot-prompt.d.ts +90 -0
  276. package/dist/game-slot-prompt.d.ts.map +1 -0
  277. package/dist/game-slot-prompt.js +237 -0
  278. package/dist/game-slot-prompt.js.map +1 -0
  279. package/dist/game-step.d.ts +10 -0
  280. package/dist/game-step.d.ts.map +1 -0
  281. package/dist/game-step.js +2 -0
  282. package/dist/game-step.js.map +1 -0
  283. package/dist/game.d.ts +2 -0
  284. package/dist/game.d.ts.map +1 -0
  285. package/dist/game.js +2 -0
  286. package/dist/game.js.map +1 -0
  287. package/dist/game2d/components/animator.d.ts +22 -0
  288. package/dist/game2d/components/animator.d.ts.map +1 -0
  289. package/dist/game2d/components/animator.js +6 -0
  290. package/dist/game2d/components/animator.js.map +1 -0
  291. package/dist/game2d/components/assets.d.ts +132 -0
  292. package/dist/game2d/components/assets.d.ts.map +1 -0
  293. package/dist/game2d/components/assets.js +52 -0
  294. package/dist/game2d/components/assets.js.map +1 -0
  295. package/dist/game2d/components/audioSource.d.ts +7 -0
  296. package/dist/game2d/components/audioSource.d.ts.map +1 -0
  297. package/dist/game2d/components/audioSource.js +4 -0
  298. package/dist/game2d/components/audioSource.js.map +1 -0
  299. package/dist/game2d/components/background.d.ts +38 -0
  300. package/dist/game2d/components/background.d.ts.map +1 -0
  301. package/dist/game2d/components/background.js +10 -0
  302. package/dist/game2d/components/background.js.map +1 -0
  303. package/dist/game2d/components/behaviors.d.ts +50 -0
  304. package/dist/game2d/components/behaviors.d.ts.map +1 -0
  305. package/dist/game2d/components/behaviors.js +15 -0
  306. package/dist/game2d/components/behaviors.js.map +1 -0
  307. package/dist/game2d/components/body2d.d.ts +13 -0
  308. package/dist/game2d/components/body2d.d.ts.map +1 -0
  309. package/dist/game2d/components/body2d.js +4 -0
  310. package/dist/game2d/components/body2d.js.map +1 -0
  311. package/dist/game2d/components/camera2d.d.ts +7 -0
  312. package/dist/game2d/components/camera2d.d.ts.map +1 -0
  313. package/dist/game2d/components/camera2d.js +4 -0
  314. package/dist/game2d/components/camera2d.js.map +1 -0
  315. package/dist/game2d/components/collider2d.d.ts +10 -0
  316. package/dist/game2d/components/collider2d.d.ts.map +1 -0
  317. package/dist/game2d/components/collider2d.js +5 -0
  318. package/dist/game2d/components/collider2d.js.map +1 -0
  319. package/dist/game2d/components/common.d.ts +16 -0
  320. package/dist/game2d/components/common.d.ts.map +1 -0
  321. package/dist/game2d/components/common.js +13 -0
  322. package/dist/game2d/components/common.js.map +1 -0
  323. package/dist/game2d/components/entity-components.d.ts +181 -0
  324. package/dist/game2d/components/entity-components.d.ts.map +1 -0
  325. package/dist/game2d/components/entity-components.js +21 -0
  326. package/dist/game2d/components/entity-components.js.map +1 -0
  327. package/dist/game2d/components/light2d.d.ts +12 -0
  328. package/dist/game2d/components/light2d.d.ts.map +1 -0
  329. package/dist/game2d/components/light2d.js +5 -0
  330. package/dist/game2d/components/light2d.js.map +1 -0
  331. package/dist/game2d/components/lighting.d.ts +17 -0
  332. package/dist/game2d/components/lighting.d.ts.map +1 -0
  333. package/dist/game2d/components/lighting.js +6 -0
  334. package/dist/game2d/components/lighting.js.map +1 -0
  335. package/dist/game2d/components/music.d.ts +8 -0
  336. package/dist/game2d/components/music.d.ts.map +1 -0
  337. package/dist/game2d/components/music.js +4 -0
  338. package/dist/game2d/components/music.js.map +1 -0
  339. package/dist/game2d/components/sprite.d.ts +26 -0
  340. package/dist/game2d/components/sprite.d.ts.map +1 -0
  341. package/dist/game2d/components/sprite.js +6 -0
  342. package/dist/game2d/components/sprite.js.map +1 -0
  343. package/dist/game2d/components/tilemap.d.ts +23 -0
  344. package/dist/game2d/components/tilemap.d.ts.map +1 -0
  345. package/dist/game2d/components/tilemap.js +6 -0
  346. package/dist/game2d/components/tilemap.js.map +1 -0
  347. package/dist/game2d/components/transform.d.ts +10 -0
  348. package/dist/game2d/components/transform.d.ts.map +1 -0
  349. package/dist/game2d/components/transform.js +10 -0
  350. package/dist/game2d/components/transform.js.map +1 -0
  351. package/dist/game2d/components/visual-animation.d.ts +148 -0
  352. package/dist/game2d/components/visual-animation.d.ts.map +1 -0
  353. package/dist/game2d/components/visual-animation.js +10 -0
  354. package/dist/game2d/components/visual-animation.js.map +1 -0
  355. package/dist/game2d/index.d.ts +1426 -0
  356. package/dist/game2d/index.d.ts.map +1 -0
  357. package/dist/game2d/index.js +135 -0
  358. package/dist/game2d/index.js.map +1 -0
  359. package/dist/game3d/components/animator.d.ts +9 -0
  360. package/dist/game3d/components/animator.d.ts.map +1 -0
  361. package/dist/game3d/components/animator.js +7 -0
  362. package/dist/game3d/components/animator.js.map +1 -0
  363. package/dist/game3d/components/assets.d.ts +261 -0
  364. package/dist/game3d/components/assets.d.ts.map +1 -0
  365. package/dist/game3d/components/assets.js +21 -0
  366. package/dist/game3d/components/assets.js.map +1 -0
  367. package/dist/game3d/components/behaviors.d.ts +66 -0
  368. package/dist/game3d/components/behaviors.d.ts.map +1 -0
  369. package/dist/game3d/components/behaviors.js +9 -0
  370. package/dist/game3d/components/behaviors.js.map +1 -0
  371. package/dist/game3d/components/body.d.ts +53 -0
  372. package/dist/game3d/components/body.d.ts.map +1 -0
  373. package/dist/game3d/components/body.js +15 -0
  374. package/dist/game3d/components/body.js.map +1 -0
  375. package/dist/game3d/components/camera.d.ts +49 -0
  376. package/dist/game3d/components/camera.d.ts.map +1 -0
  377. package/dist/game3d/components/camera.js +20 -0
  378. package/dist/game3d/components/camera.js.map +1 -0
  379. package/dist/game3d/components/character.d.ts +16 -0
  380. package/dist/game3d/components/character.d.ts.map +1 -0
  381. package/dist/game3d/components/character.js +10 -0
  382. package/dist/game3d/components/character.js.map +1 -0
  383. package/dist/game3d/components/collider-geometry.d.ts +7 -0
  384. package/dist/game3d/components/collider-geometry.d.ts.map +1 -0
  385. package/dist/game3d/components/collider-geometry.js +13 -0
  386. package/dist/game3d/components/collider-geometry.js.map +1 -0
  387. package/dist/game3d/components/collider.d.ts +79 -0
  388. package/dist/game3d/components/collider.d.ts.map +1 -0
  389. package/dist/game3d/components/collider.js +16 -0
  390. package/dist/game3d/components/collider.js.map +1 -0
  391. package/dist/game3d/components/common.d.ts +8 -0
  392. package/dist/game3d/components/common.d.ts.map +1 -0
  393. package/dist/game3d/components/common.js +8 -0
  394. package/dist/game3d/components/common.js.map +1 -0
  395. package/dist/game3d/components/environment.d.ts +20 -0
  396. package/dist/game3d/components/environment.d.ts.map +1 -0
  397. package/dist/game3d/components/environment.js +8 -0
  398. package/dist/game3d/components/environment.js.map +1 -0
  399. package/dist/game3d/components/interaction-actor.d.ts +6 -0
  400. package/dist/game3d/components/interaction-actor.d.ts.map +1 -0
  401. package/dist/game3d/components/interaction-actor.js +3 -0
  402. package/dist/game3d/components/interaction-actor.js.map +1 -0
  403. package/dist/game3d/components/light.d.ts +23 -0
  404. package/dist/game3d/components/light.d.ts.map +1 -0
  405. package/dist/game3d/components/light.js +9 -0
  406. package/dist/game3d/components/light.js.map +1 -0
  407. package/dist/game3d/components/material.d.ts +15 -0
  408. package/dist/game3d/components/material.d.ts.map +1 -0
  409. package/dist/game3d/components/material.js +9 -0
  410. package/dist/game3d/components/material.js.map +1 -0
  411. package/dist/game3d/components/model.d.ts +22 -0
  412. package/dist/game3d/components/model.d.ts.map +1 -0
  413. package/dist/game3d/components/model.js +8 -0
  414. package/dist/game3d/components/model.js.map +1 -0
  415. package/dist/game3d/components/primitive.d.ts +31 -0
  416. package/dist/game3d/components/primitive.d.ts.map +1 -0
  417. package/dist/game3d/components/primitive.js +10 -0
  418. package/dist/game3d/components/primitive.js.map +1 -0
  419. package/dist/game3d/components/transform.d.ts +24 -0
  420. package/dist/game3d/components/transform.d.ts.map +1 -0
  421. package/dist/game3d/components/transform.js +10 -0
  422. package/dist/game3d/components/transform.js.map +1 -0
  423. package/dist/game3d/index.d.ts +4045 -0
  424. package/dist/game3d/index.d.ts.map +1 -0
  425. package/dist/game3d/index.js +159 -0
  426. package/dist/game3d/index.js.map +1 -0
  427. package/dist/game3d.d.ts +2 -0
  428. package/dist/game3d.d.ts.map +1 -0
  429. package/dist/game3d.js +2 -0
  430. package/dist/game3d.js.map +1 -0
  431. package/dist/graph.d.ts +192 -5
  432. package/dist/graph.d.ts.map +1 -1
  433. package/dist/graph.js +515 -0
  434. package/dist/graph.js.map +1 -1
  435. package/dist/index.d.ts +59 -2
  436. package/dist/index.d.ts.map +1 -1
  437. package/dist/index.js +57 -2
  438. package/dist/index.js.map +1 -1
  439. package/dist/loop.d.ts +38 -0
  440. package/dist/loop.d.ts.map +1 -0
  441. package/dist/loop.js +69 -0
  442. package/dist/loop.js.map +1 -0
  443. package/dist/mcp-server-config.d.ts +113 -0
  444. package/dist/mcp-server-config.d.ts.map +1 -0
  445. package/dist/mcp-server-config.js +147 -0
  446. package/dist/mcp-server-config.js.map +1 -0
  447. package/dist/messages.d.ts +1577 -243
  448. package/dist/messages.d.ts.map +1 -1
  449. package/dist/messages.js +718 -22
  450. package/dist/messages.js.map +1 -1
  451. package/dist/missing-runtime-package.d.ts +23 -0
  452. package/dist/missing-runtime-package.d.ts.map +1 -0
  453. package/dist/missing-runtime-package.js +34 -0
  454. package/dist/missing-runtime-package.js.map +1 -0
  455. package/dist/model-selection.d.ts +20 -0
  456. package/dist/model-selection.d.ts.map +1 -0
  457. package/dist/model-selection.js +27 -0
  458. package/dist/model-selection.js.map +1 -0
  459. package/dist/nodetool-models.d.ts +71 -0
  460. package/dist/nodetool-models.d.ts.map +1 -0
  461. package/dist/nodetool-models.js +138 -0
  462. package/dist/nodetool-models.js.map +1 -0
  463. package/dist/package-assets.d.ts +39 -0
  464. package/dist/package-assets.d.ts.map +1 -0
  465. package/dist/package-assets.js +63 -0
  466. package/dist/package-assets.js.map +1 -0
  467. package/dist/platform.d.ts +66 -0
  468. package/dist/platform.d.ts.map +1 -0
  469. package/dist/platform.js +68 -0
  470. package/dist/platform.js.map +1 -0
  471. package/dist/predicates.d.ts +43 -0
  472. package/dist/predicates.d.ts.map +1 -0
  473. package/dist/predicates.js +65 -0
  474. package/dist/predicates.js.map +1 -0
  475. package/dist/processing-messages.schema.json +2545 -0
  476. package/dist/production-authoring.d.ts +931 -0
  477. package/dist/production-authoring.d.ts.map +1 -0
  478. package/dist/production-authoring.js +931 -0
  479. package/dist/production-authoring.js.map +1 -0
  480. package/dist/python-packs.d.ts +25 -0
  481. package/dist/python-packs.d.ts.map +1 -0
  482. package/dist/python-packs.js +51 -0
  483. package/dist/python-packs.js.map +1 -0
  484. package/dist/render-record.d.ts +228 -0
  485. package/dist/render-record.d.ts.map +1 -0
  486. package/dist/render-record.js +212 -0
  487. package/dist/render-record.js.map +1 -0
  488. package/dist/resource-id.d.ts +22 -0
  489. package/dist/resource-id.d.ts.map +1 -0
  490. package/dist/resource-id.js +32 -0
  491. package/dist/resource-id.js.map +1 -0
  492. package/dist/resource-uri.d.ts +15 -0
  493. package/dist/resource-uri.d.ts.map +1 -0
  494. package/dist/resource-uri.js +91 -0
  495. package/dist/resource-uri.js.map +1 -0
  496. package/dist/run-readers.d.ts +760 -0
  497. package/dist/run-readers.d.ts.map +1 -0
  498. package/dist/run-readers.js +153 -0
  499. package/dist/run-readers.js.map +1 -0
  500. package/dist/run-trace.d.ts +206 -0
  501. package/dist/run-trace.d.ts.map +1 -0
  502. package/dist/run-trace.js +177 -0
  503. package/dist/run-trace.js.map +1 -0
  504. package/dist/sandbox-capability.d.ts +86 -0
  505. package/dist/sandbox-capability.d.ts.map +1 -0
  506. package/dist/sandbox-capability.js +106 -0
  507. package/dist/sandbox-capability.js.map +1 -0
  508. package/dist/sandbox-host.d.ts +98 -0
  509. package/dist/sandbox-host.d.ts.map +1 -0
  510. package/dist/sandbox-host.js +311 -0
  511. package/dist/sandbox-host.js.map +1 -0
  512. package/dist/sandbox-package.d.ts +674 -0
  513. package/dist/sandbox-package.d.ts.map +1 -0
  514. package/dist/sandbox-package.js +622 -0
  515. package/dist/sandbox-package.js.map +1 -0
  516. package/dist/sandbox-wasm.d.ts +84 -0
  517. package/dist/sandbox-wasm.d.ts.map +1 -0
  518. package/dist/sandbox-wasm.js +139 -0
  519. package/dist/sandbox-wasm.js.map +1 -0
  520. package/dist/screenplay-authoring.d.ts +69 -0
  521. package/dist/screenplay-authoring.d.ts.map +1 -0
  522. package/dist/screenplay-authoring.js +352 -0
  523. package/dist/screenplay-authoring.js.map +1 -0
  524. package/dist/script-authoring.d.ts +161 -0
  525. package/dist/script-authoring.d.ts.map +1 -0
  526. package/dist/script-authoring.js +503 -0
  527. package/dist/script-authoring.js.map +1 -0
  528. package/dist/script-fill.d.ts +39 -0
  529. package/dist/script-fill.d.ts.map +1 -0
  530. package/dist/script-fill.js +67 -0
  531. package/dist/script-fill.js.map +1 -0
  532. package/dist/script-link.d.ts +110 -0
  533. package/dist/script-link.d.ts.map +1 -0
  534. package/dist/script-link.js +252 -0
  535. package/dist/script-link.js.map +1 -0
  536. package/dist/script-pace.d.ts +4 -0
  537. package/dist/script-pace.d.ts.map +1 -0
  538. package/dist/script-pace.js +11 -0
  539. package/dist/script-pace.js.map +1 -0
  540. package/dist/sha256.d.ts +11 -0
  541. package/dist/sha256.d.ts.map +1 -0
  542. package/dist/sha256.js +110 -0
  543. package/dist/sha256.js.map +1 -0
  544. package/dist/shot-prompt.d.ts +78 -0
  545. package/dist/shot-prompt.d.ts.map +1 -0
  546. package/dist/shot-prompt.js +120 -0
  547. package/dist/shot-prompt.js.map +1 -0
  548. package/dist/skill-document.d.ts +36 -0
  549. package/dist/skill-document.d.ts.map +1 -0
  550. package/dist/skill-document.js +140 -0
  551. package/dist/skill-document.js.map +1 -0
  552. package/dist/storyboard-render-spec.d.ts +4 -0
  553. package/dist/storyboard-render-spec.d.ts.map +1 -0
  554. package/dist/storyboard-render-spec.js +4 -0
  555. package/dist/storyboard-render-spec.js.map +1 -0
  556. package/dist/style-presets.d.ts +73 -0
  557. package/dist/style-presets.d.ts.map +1 -0
  558. package/dist/style-presets.js +147 -0
  559. package/dist/style-presets.js.map +1 -0
  560. package/dist/supervisor.d.ts +227 -0
  561. package/dist/supervisor.d.ts.map +1 -0
  562. package/dist/supervisor.js +116 -0
  563. package/dist/supervisor.js.map +1 -0
  564. package/dist/token-providers.d.ts +31 -0
  565. package/dist/token-providers.d.ts.map +1 -0
  566. package/dist/token-providers.js +52 -0
  567. package/dist/token-providers.js.map +1 -0
  568. package/dist/toolSchemas.d.ts +18 -14
  569. package/dist/toolSchemas.d.ts.map +1 -1
  570. package/dist/toolSchemas.js +30 -31
  571. package/dist/toolSchemas.js.map +1 -1
  572. package/dist/triggers.d.ts +41 -0
  573. package/dist/triggers.d.ts.map +1 -0
  574. package/dist/triggers.js +50 -0
  575. package/dist/triggers.js.map +1 -0
  576. package/dist/trpc-policy.d.ts +3 -0
  577. package/dist/trpc-policy.d.ts.map +1 -0
  578. package/dist/trpc-policy.js +3 -0
  579. package/dist/trpc-policy.js.map +1 -0
  580. package/dist/type-metadata.d.ts +5 -0
  581. package/dist/type-metadata.d.ts.map +1 -1
  582. package/dist/type-metadata.js +17 -8
  583. package/dist/type-metadata.js.map +1 -1
  584. package/dist/typecheck.d.ts.map +1 -1
  585. package/dist/typecheck.js +5 -4
  586. package/dist/typecheck.js.map +1 -1
  587. package/dist/wasm-binary.d.ts +61 -0
  588. package/dist/wasm-binary.d.ts.map +1 -0
  589. package/dist/wasm-binary.js +215 -0
  590. package/dist/wasm-binary.js.map +1 -0
  591. package/dist/workflow-document-revision.d.ts +4 -0
  592. package/dist/workflow-document-revision.d.ts.map +1 -0
  593. package/dist/workflow-document-revision.js +111 -0
  594. package/dist/workflow-document-revision.js.map +1 -0
  595. package/dist/workflow-plan.d.ts +274 -0
  596. package/dist/workflow-plan.d.ts.map +1 -0
  597. package/dist/workflow-plan.js +667 -0
  598. package/dist/workflow-plan.js.map +1 -0
  599. package/dist/wrap-primitives.d.ts +0 -11
  600. package/dist/wrap-primitives.d.ts.map +1 -1
  601. package/dist/wrap-primitives.js +3 -9
  602. package/dist/wrap-primitives.js.map +1 -1
  603. package/dist/ws-commands.d.ts +770 -0
  604. package/dist/ws-commands.d.ts.map +1 -0
  605. package/dist/ws-commands.js +624 -0
  606. package/dist/ws-commands.js.map +1 -0
  607. package/dist/zod-schema.d.ts +20 -0
  608. package/dist/zod-schema.d.ts.map +1 -0
  609. package/dist/zod-schema.js +298 -0
  610. package/dist/zod-schema.js.map +1 -0
  611. package/package.json +96 -7
  612. package/schema/sdk-v1.asyncapi.implemented.json +65 -0
  613. package/schema/sdk-v1.asyncapi.json +65 -0
  614. package/schema/sdk-v1.discovery.schema.json +1218 -0
  615. package/schema/sdk-v1.execution.schema.json +2792 -0
  616. package/schema/sdk-v1.lifecycle.schema.json +1031 -0
  617. package/schema/sdk-v1.manifest.json +71 -0
  618. package/schema/sdk-v1.openapi.implemented.json +730 -0
  619. package/schema/sdk-v1.openapi.json +730 -0
  620. package/schema/sdk-v1.operations.json +732 -0
  621. package/dist/agent-protocol.d.ts +0 -217
  622. package/dist/agent-protocol.d.ts.map +0 -1
  623. package/dist/agent-protocol.js +0 -85
  624. package/dist/agent-protocol.js.map +0 -1
@@ -9,7 +9,24 @@
9
9
  *
10
10
  * Every message is discriminated by a literal `type` field so that
11
11
  * consumers can switch on `msg.type` for exhaustive handling.
12
+ *
13
+ * Zod is the source of truth: every `ProcessingMessage` variant (and the
14
+ * types it embeds) is defined as a Zod schema first, with its TypeScript
15
+ * type derived via `z.infer`. Where Zod's inference can't reproduce a
16
+ * shape exactly — index signatures, `unknown` fields whose optionality
17
+ * must stay exact — the TypeScript interface is still hand-written and
18
+ * exported as before, and the schema is annotated `z.ZodType<ThatType>`
19
+ * so the two never drift silently.
20
+ *
21
+ * `processingMessageSchema` (a `z.discriminatedUnion` on `type`) is the
22
+ * single runtime validator for the whole union; `packages/protocol`'s
23
+ * build emits it as JSON Schema to `dist/processing-messages.schema.json`
24
+ * (see `scripts/generate-processing-messages-schema.ts`) for non-TS
25
+ * consumers (the Python worker, external SDKs) to validate against.
12
26
  */
27
+ import { z } from "zod";
28
+ import { clientToolManifestMessageInSchema, pingMessageInSchema, pongMessageOutSchema, rendererRegisteredMessageOutSchema, rendererToolCallMessageOutSchema, rendererToolResultMessageInSchema, resourceChangeMessageOutSchema, rpcErrorPayloadOutSchema, rpcResponseMessageOutSchema, systemStatsMessageOutSchema, toolResultMessageInSchema, type GenerateMediaRequest, type UnifiedCommandType } from "./ws-commands.js";
29
+ export type { GenerateMediaRequest, UnifiedCommandType };
13
30
  export declare enum TaskUpdateEvent {
14
31
  TaskPlanned = "task_planned",
15
32
  TaskRemoved = "task_removed",
@@ -18,23 +35,31 @@ export declare enum TaskUpdateEvent {
18
35
  EnteredConclusionStage = "entered_conclusion_stage",
19
36
  StepCompleted = "step_completed",
20
37
  StepFailed = "step_failed",
21
- TaskCompleted = "task_completed"
38
+ TaskCompleted = "task_completed",
39
+ TaskFailed = "task_failed"
22
40
  }
23
- export type Severity = "info" | "warning" | "error";
24
- export type ContentType = "text" | "audio" | "image" | "video" | "document" | "tool_call";
41
+ /** Zod schema for {@link TaskUpdateEvent}. */
42
+ export declare const taskUpdateEventSchema: z.ZodEnum<typeof TaskUpdateEvent>;
43
+ export declare const severitySchema: z.ZodEnum<{
44
+ error: "error";
45
+ info: "info";
46
+ warning: "warning";
47
+ }>;
48
+ export type Severity = z.infer<typeof severitySchema>;
49
+ export declare const contentTypeSchema: z.ZodEnum<{
50
+ agent_status: "agent_status";
51
+ audio: "audio";
52
+ document: "document";
53
+ image: "image";
54
+ text: "text";
55
+ tool_call: "tool_call";
56
+ video: "video";
57
+ }>;
58
+ export type ContentType = z.infer<typeof contentTypeSchema>;
25
59
  export type EdgeType = "data" | "control";
26
60
  export type JobStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "error";
27
61
  export type NodeStatus = "pending" | "running" | "completed" | "failed" | "error";
28
62
  export type EdgeStatus = "active" | "completed";
29
- /** Mirrors RunStateInfo from src/nodetool/types/job.py */
30
- export interface RunStateInfo {
31
- status: string;
32
- suspended_node_id?: string | null;
33
- suspension_reason?: string | null;
34
- error_message?: string | null;
35
- execution_strategy?: string | null;
36
- is_resumable: boolean;
37
- }
38
63
  /**
39
64
  * Minimal Task / Step references used by TaskUpdate and StepResult.
40
65
  * Full definitions live in the agent layer; here we keep only the
@@ -66,245 +91,1114 @@ export interface StepRef {
66
91
  start_time?: number;
67
92
  [key: string]: unknown;
68
93
  }
69
- export interface JobUpdate {
70
- type: "job_update";
71
- status: string;
72
- job_id?: string | null;
73
- workflow_id?: string | null;
74
- message?: string | null;
75
- result?: Record<string, unknown> | null;
76
- error?: string | null;
77
- traceback?: string | null;
78
- run_state?: RunStateInfo | null;
79
- duration?: number | null;
94
+ export declare const stepRefSchema: z.ZodType<StepRef>;
95
+ export declare const taskRefSchema: z.ZodType<TaskRef>;
96
+ export declare const validationIssueSchema: z.ZodObject<{
97
+ node_id: z.ZodString;
98
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ property: z.ZodString;
100
+ message: z.ZodString;
101
+ }, z.core.$strip>;
102
+ export type ValidationIssue = z.infer<typeof validationIssueSchema>;
103
+ export declare const jobUpdateSchema: z.ZodObject<{
104
+ type: z.ZodLiteral<"job_update">;
105
+ status: z.ZodString;
106
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
110
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
113
+ queue_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
114
+ validation_issues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
115
+ node_id: z.ZodString;
116
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
+ property: z.ZodString;
118
+ message: z.ZodString;
119
+ }, z.core.$strip>>>>;
120
+ error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ }, z.core.$strip>;
122
+ export type JobUpdate = z.infer<typeof jobUpdateSchema>;
123
+ /**
124
+ * Media generation tracking (docs/media-generation-tracking-design.md).
125
+ *
126
+ * A generation is one provider call that produces media, tracked as a row
127
+ * from before the call to its terminal state. These schemas travel on the
128
+ * `prediction` message and into the ledger row.
129
+ */
130
+ export declare const generationSurfaceSchema: z.ZodEnum<{
131
+ capability: "capability";
132
+ chat: "chat";
133
+ cli: "cli";
134
+ rpc: "rpc";
135
+ workflow: "workflow";
136
+ }>;
137
+ export type GenerationSurface = z.infer<typeof generationSurfaceSchema>;
138
+ /**
139
+ * Public generation status derived from the durable lifecycle dimensions.
140
+ * `interrupted` remains readable for rows written by the legacy startup sweep.
141
+ */
142
+ export declare const generationStatusSchema: z.ZodEnum<{
143
+ cancelled: "cancelled";
144
+ completed: "completed";
145
+ failed: "failed";
146
+ interrupted: "interrupted";
147
+ needs_attention: "needs_attention";
148
+ pending: "pending";
149
+ recovering: "recovering";
150
+ running: "running";
151
+ }>;
152
+ export type GenerationStatus = z.infer<typeof generationStatusSchema>;
153
+ export declare const generationSubmissionStatusSchema: z.ZodEnum<{
154
+ accepted: "accepted";
155
+ submission_unknown: "submission_unknown";
156
+ submitted: "submitted";
157
+ submitting: "submitting";
158
+ }>;
159
+ export type GenerationSubmissionStatus = z.infer<typeof generationSubmissionStatusSchema>;
160
+ export declare const generationProviderStatusSchema: z.ZodEnum<{
161
+ cancelled: "cancelled";
162
+ failed: "failed";
163
+ queued: "queued";
164
+ running: "running";
165
+ succeeded: "succeeded";
166
+ unknown: "unknown";
167
+ }>;
168
+ export type GenerationProviderStatus = z.infer<typeof generationProviderStatusSchema>;
169
+ export declare const generationOutputStatusSchema: z.ZodEnum<{
170
+ pending: "pending";
171
+ ready: "ready";
172
+ retrying: "retrying";
173
+ saving: "saving";
174
+ unavailable: "unavailable";
175
+ }>;
176
+ export type GenerationOutputStatus = z.infer<typeof generationOutputStatusSchema>;
177
+ export declare const generationAttachmentStatusSchema: z.ZodEnum<{
178
+ attached: "attached";
179
+ pending: "pending";
180
+ retrying: "retrying";
181
+ superseded: "superseded";
182
+ target_deleted: "target_deleted";
183
+ }>;
184
+ export type GenerationAttachmentStatus = z.infer<typeof generationAttachmentStatusSchema>;
185
+ /** Who asked for the generation; every field the row carries back. */
186
+ export declare const generationOriginSchema: z.ZodObject<{
187
+ surface: z.ZodEnum<{
188
+ capability: "capability";
189
+ chat: "chat";
190
+ cli: "cli";
191
+ rpc: "rpc";
192
+ workflow: "workflow";
193
+ }>;
194
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ }, z.core.$strip>;
200
+ export type GenerationOrigin = z.infer<typeof generationOriginSchema>;
201
+ /**
202
+ * What the provider said about the call: its own request id, and its own
203
+ * charge when it states one. A stated charge wins over the catalog estimate.
204
+ */
205
+ export declare const generationReceiptSchema: z.ZodObject<{
206
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
208
+ amount: z.ZodNumber;
209
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
211
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
212
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
213
+ }, z.core.$strip>>>;
214
+ }, z.core.$strip>;
215
+ export type GenerationReceipt = z.infer<typeof generationReceiptSchema>;
216
+ export declare const providerCostSchema: z.ZodObject<{
217
+ provider: z.ZodString;
218
+ amount: z.ZodNumber;
219
+ unit: z.ZodString;
220
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
223
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
224
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
+ input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
226
+ output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
227
+ cached_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
228
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ }, z.core.$strip>;
230
+ export type ProviderCost = z.infer<typeof providerCostSchema>;
231
+ /**
232
+ * Machine-readable companion to `node_update.error`. Lets a surface act on a
233
+ * failure — reopen provider onboarding on the offending key, say — without
234
+ * matching the prose the provider layer wrote.
235
+ */
236
+ export declare const nodeErrorDetailSchema: z.ZodObject<{
237
+ code: z.ZodString;
238
+ runtime_package: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ secret_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
+ }, z.core.$strip>;
242
+ export type NodeErrorDetail = z.infer<typeof nodeErrorDetailSchema>;
243
+ export declare const nodeUpdateSchema: z.ZodObject<{
244
+ type: z.ZodLiteral<"node_update">;
245
+ node_id: z.ZodString;
246
+ node_name: z.ZodString;
247
+ node_type: z.ZodString;
248
+ status: z.ZodString;
249
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
+ error_detail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
251
+ code: z.ZodString;
252
+ runtime_package: z.ZodOptional<z.ZodNullable<z.ZodString>>;
253
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
+ secret_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
+ }, z.core.$strip>>>;
256
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
257
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
258
+ provider_cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
259
+ provider: z.ZodString;
260
+ amount: z.ZodNumber;
261
+ unit: z.ZodString;
262
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
265
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
266
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
267
+ input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
268
+ output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
269
+ cached_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
270
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ }, z.core.$strip>>>;
272
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
+ }, z.core.$strip>;
275
+ export type NodeUpdate = z.infer<typeof nodeUpdateSchema>;
276
+ /**
277
+ * A generator committed one complete artifact (one `process()` result, or one
278
+ * `genProcess` stream-end). Authoritative variant carrier — never suppressed.
279
+ *
280
+ * The kernel actor emits a BARE event: `node_id`, `node_name`, `node_type`,
281
+ * `outputs`. `job_id` and `index` are stamped DOWNSTREAM by the relay (the
282
+ * unified websocket runner / browser runner), so both are optional on the wire
283
+ * — see the generation-events RFC §4.2 / §5 / Decision 8.
284
+ */
285
+ export declare const generationCompleteSchema: z.ZodObject<{
286
+ type: z.ZodLiteral<"generation_complete">;
287
+ node_id: z.ZodString;
288
+ node_name: z.ZodString;
289
+ node_type: z.ZodString;
290
+ index: z.ZodOptional<z.ZodNumber>;
291
+ outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
292
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
293
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
+ }, z.core.$strip>;
296
+ export type GenerationComplete = z.infer<typeof generationCompleteSchema>;
297
+ export declare const nodeProgressSchema: z.ZodObject<{
298
+ type: z.ZodLiteral<"node_progress">;
299
+ node_id: z.ZodString;
300
+ progress: z.ZodNumber;
301
+ total: z.ZodNumber;
302
+ chunk: z.ZodOptional<z.ZodString>;
303
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
304
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
305
+ }, z.core.$strip>;
306
+ export type NodeProgress = z.infer<typeof nodeProgressSchema>;
307
+ export declare const edgeUpdateSchema: z.ZodObject<{
308
+ type: z.ZodLiteral<"edge_update">;
309
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
310
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
+ edge_id: z.ZodString;
312
+ status: z.ZodString;
313
+ counter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
314
+ }, z.core.$strip>;
315
+ export type EdgeUpdate = z.infer<typeof edgeUpdateSchema>;
316
+ export declare const outputUpdateSchema: z.ZodObject<{
317
+ type: z.ZodLiteral<"output_update">;
318
+ node_id: z.ZodString;
319
+ node_name: z.ZodString;
320
+ output_name: z.ZodString;
321
+ value: z.ZodUnknown;
322
+ output_type: z.ZodString;
323
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
324
+ disposition: z.ZodOptional<z.ZodEnum<{
325
+ append: "append";
326
+ replace: "replace";
327
+ }>>;
328
+ done: z.ZodOptional<z.ZodBoolean>;
329
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
331
+ }, z.core.$strip>;
332
+ export type OutputUpdate = z.infer<typeof outputUpdateSchema>;
333
+ export declare const saveUpdateSchema: z.ZodObject<{
334
+ type: z.ZodLiteral<"save_update">;
335
+ node_id: z.ZodString;
336
+ name: z.ZodString;
337
+ value: z.ZodUnknown;
338
+ output_type: z.ZodString;
339
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
340
+ }, z.core.$strip>;
341
+ export type SaveUpdate = z.infer<typeof saveUpdateSchema>;
342
+ export declare const binaryUpdateSchema: z.ZodObject<{
343
+ type: z.ZodLiteral<"binary_update">;
344
+ node_id: z.ZodString;
345
+ output_name: z.ZodString;
346
+ binary: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
347
+ }, z.core.$strip>;
348
+ export type BinaryUpdate = z.infer<typeof binaryUpdateSchema>;
349
+ export declare const logUpdateSchema: z.ZodObject<{
350
+ type: z.ZodLiteral<"log_update">;
351
+ node_id: z.ZodString;
352
+ node_name: z.ZodString;
353
+ content: z.ZodString;
354
+ severity: z.ZodEnum<{
355
+ error: "error";
356
+ info: "info";
357
+ warning: "warning";
358
+ }>;
359
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
+ }, z.core.$strip>;
361
+ export type LogUpdate = z.infer<typeof logUpdateSchema>;
362
+ export declare const notificationSchema: z.ZodObject<{
363
+ type: z.ZodLiteral<"notification">;
364
+ node_id: z.ZodString;
365
+ content: z.ZodString;
366
+ severity: z.ZodEnum<{
367
+ error: "error";
368
+ info: "info";
369
+ warning: "warning";
370
+ }>;
371
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
+ }, z.core.$strip>;
373
+ export type Notification = z.infer<typeof notificationSchema>;
374
+ export declare const errorMessageSchema: z.ZodObject<{
375
+ type: z.ZodLiteral<"error">;
376
+ message: z.ZodString;
377
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
378
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
+ }, z.core.$strip>;
380
+ export type ErrorMessage = z.infer<typeof errorMessageSchema>;
381
+ export declare const toolCallUpdateSchema: z.ZodObject<{
382
+ type: z.ZodLiteral<"tool_call_update">;
383
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
384
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
387
+ name: z.ZodString;
388
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
389
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
390
+ step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
391
+ agent_execution_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
392
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
393
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
394
+ }, z.core.$strip>;
395
+ export type ToolCallUpdate = z.infer<typeof toolCallUpdateSchema>;
396
+ export declare const toolResultUpdateSchema: z.ZodObject<{
397
+ type: z.ZodLiteral<"tool_result_update">;
398
+ node_id: z.ZodString;
399
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
401
+ result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
402
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
403
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
404
+ is_error: z.ZodOptional<z.ZodBoolean>;
405
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
406
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
407
+ }, z.core.$strip>;
408
+ export type ToolResultUpdate = z.infer<typeof toolResultUpdateSchema>;
409
+ export declare const taskUpdateSchema: z.ZodObject<{
410
+ type: z.ZodLiteral<"task_update">;
411
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
414
+ task: z.ZodType<TaskRef, unknown, z.core.$ZodTypeInternals<TaskRef, unknown>>;
415
+ step: z.ZodOptional<z.ZodNullable<z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>>>;
416
+ event: z.ZodEnum<typeof TaskUpdateEvent>;
417
+ }, z.core.$strip>;
418
+ export type TaskUpdate = z.infer<typeof taskUpdateSchema>;
419
+ export declare const stepResultSchema: z.ZodObject<{
420
+ type: z.ZodLiteral<"step_result">;
421
+ step: z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>;
422
+ result: z.ZodUnknown;
423
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
424
+ is_task_result: z.ZodOptional<z.ZodBoolean>;
425
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
426
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
+ }, z.core.$strip>;
428
+ export type StepResult = z.infer<typeof stepResultSchema>;
429
+ export declare const planningUpdateSchema: z.ZodObject<{
430
+ type: z.ZodLiteral<"planning_update">;
431
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
432
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
433
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
+ phase: z.ZodString;
435
+ status: z.ZodString;
436
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
+ }, z.core.$strip>;
438
+ export type PlanningUpdate = z.infer<typeof planningUpdateSchema>;
439
+ export declare const chunkSchema: z.ZodObject<{
440
+ type: z.ZodLiteral<"chunk">;
441
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
442
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ content_type: z.ZodOptional<z.ZodEnum<{
446
+ agent_status: "agent_status";
447
+ audio: "audio";
448
+ document: "document";
449
+ image: "image";
450
+ text: "text";
451
+ tool_call: "tool_call";
452
+ video: "video";
453
+ }>>;
454
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>]>;
455
+ content_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
456
+ done: z.ZodOptional<z.ZodBoolean>;
457
+ thinking: z.ZodOptional<z.ZodBoolean>;
458
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
459
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
460
+ }, z.core.$strip>;
461
+ export type Chunk = z.infer<typeof chunkSchema>;
462
+ /**
463
+ * Opaque, provider-agnostic continuation token for resuming an upstream
464
+ * conversation session across turns. Persisted on the ASSISTANT message that
465
+ * concluded the turn (it records the state *after* this turn). On the next turn
466
+ * a provider that supports server/SDK-side sessions resumes from this token and
467
+ * sends only the new user delta instead of replaying the whole transcript;
468
+ * stateless providers ignore it.
469
+ *
470
+ * Provider-agnostic by design. For the Claude Agent SDK, `token` is the SDK
471
+ * `session_id`. An OpenAI Responses provider reuses this exact shape: store the
472
+ * Responses `previous_response_id` as `token`, send the request with
473
+ * `store: true`, then on each subsequent turn pass `previous_response_id =
474
+ * token` and submit only the delta — reading and writing the token on the same
475
+ * `provider_session` message column. The semantics are identical and
476
+ * best-effort: a token may have expired or been pruned (Responses state lapses
477
+ * after ~30 days; the Agent SDK's session JSONL can be deleted), so a failed
478
+ * resume must fall back to a fresh session rather than erroring.
479
+ */
480
+ export declare const providerSessionSchema: z.ZodObject<{
481
+ providerId: z.ZodString;
482
+ model: z.ZodString;
483
+ token: z.ZodString;
484
+ checkpoint: z.ZodNumber;
485
+ systemHash: z.ZodOptional<z.ZodString>;
486
+ traceContentSuppressed: z.ZodOptional<z.ZodBoolean>;
487
+ }, z.core.$strip>;
488
+ export type ProviderSession = z.infer<typeof providerSessionSchema>;
489
+ export declare const todoStatusSchema: z.ZodEnum<{
490
+ completed: "completed";
491
+ in_progress: "in_progress";
492
+ pending: "pending";
493
+ }>;
494
+ export type TodoStatus = z.infer<typeof todoStatusSchema>;
495
+ export declare const todoItemSchema: z.ZodObject<{
496
+ content: z.ZodString;
497
+ status: z.ZodEnum<{
498
+ completed: "completed";
499
+ in_progress: "in_progress";
500
+ pending: "pending";
501
+ }>;
502
+ }, z.core.$strip>;
503
+ export type TodoItem = z.infer<typeof todoItemSchema>;
504
+ export declare const todoUpdateSchema: z.ZodObject<{
505
+ type: z.ZodLiteral<"todo_update">;
506
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
507
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
508
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
509
+ todos: z.ZodArray<z.ZodObject<{
510
+ content: z.ZodString;
511
+ status: z.ZodEnum<{
512
+ completed: "completed";
513
+ in_progress: "in_progress";
514
+ pending: "pending";
515
+ }>;
516
+ }, z.core.$strip>>;
517
+ }, z.core.$strip>;
518
+ export type TodoUpdate = z.infer<typeof todoUpdateSchema>;
519
+ /**
520
+ * `Prediction` mixes fully-typed known fields with an index signature for
521
+ * provider-specific extras. `.catchall(z.unknown())` matches that shape.
522
+ */
523
+ export declare const predictionSchema: z.ZodObject<{
524
+ type: z.ZodLiteral<"prediction">;
525
+ id: z.ZodString;
526
+ user_id: z.ZodString;
527
+ node_id: z.ZodString;
528
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
530
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
531
+ capability: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
+ version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
+ status: z.ZodEnum<{
535
+ cancelled: "cancelled";
536
+ completed: "completed";
537
+ failed: "failed";
538
+ interrupted: "interrupted";
539
+ needs_attention: "needs_attention";
540
+ pending: "pending";
541
+ recovering: "recovering";
542
+ running: "running";
543
+ }>;
544
+ submission_status: z.ZodOptional<z.ZodEnum<{
545
+ accepted: "accepted";
546
+ submission_unknown: "submission_unknown";
547
+ submitted: "submitted";
548
+ submitting: "submitting";
549
+ }>>;
550
+ provider_status: z.ZodOptional<z.ZodEnum<{
551
+ cancelled: "cancelled";
552
+ failed: "failed";
553
+ queued: "queued";
554
+ running: "running";
555
+ succeeded: "succeeded";
556
+ unknown: "unknown";
557
+ }>>;
558
+ output_status: z.ZodOptional<z.ZodEnum<{
559
+ pending: "pending";
560
+ ready: "ready";
561
+ retrying: "retrying";
562
+ saving: "saving";
563
+ unavailable: "unavailable";
564
+ }>>;
565
+ attachment_status: z.ZodOptional<z.ZodEnum<{
566
+ attached: "attached";
567
+ pending: "pending";
568
+ retrying: "retrying";
569
+ superseded: "superseded";
570
+ target_deleted: "target_deleted";
571
+ }>>;
572
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
573
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
574
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
575
+ logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
576
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
577
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
578
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
579
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
581
+ origin: z.ZodOptional<z.ZodObject<{
582
+ surface: z.ZodEnum<{
583
+ capability: "capability";
584
+ chat: "chat";
585
+ cli: "cli";
586
+ rpc: "rpc";
587
+ workflow: "workflow";
588
+ }>;
589
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
590
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
591
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
592
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
594
+ }, z.core.$strip>>;
595
+ asset_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
596
+ receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
597
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
598
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
599
+ amount: z.ZodNumber;
600
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
601
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
602
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
603
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
604
+ }, z.core.$strip>>>;
605
+ }, z.core.$strip>>>;
606
+ }, z.core.$catchall<z.ZodUnknown>>;
607
+ export type Prediction = z.infer<typeof predictionSchema>;
608
+ export declare const llmCallUpdateSchema: z.ZodObject<{
609
+ type: z.ZodLiteral<"llm_call">;
610
+ node_id: z.ZodString;
611
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
612
+ provider: z.ZodString;
613
+ model: z.ZodString;
614
+ operation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
615
+ messages: z.ZodArray<z.ZodObject<{
616
+ role: z.ZodString;
617
+ content: z.ZodUnknown;
618
+ }, z.core.$strip>>;
619
+ response: z.ZodUnknown;
620
+ tool_calls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
621
+ id: z.ZodString;
622
+ name: z.ZodString;
623
+ args: z.ZodUnknown;
624
+ }, z.core.$strip>>>>;
625
+ tokens_input: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
626
+ tokens_output: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
627
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
628
+ duration_ms: z.ZodNumber;
629
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
630
+ timestamp: z.ZodString;
631
+ }, z.core.$strip>;
632
+ export type LLMCallUpdate = z.infer<typeof llmCallUpdateSchema>;
633
+ /**
634
+ * One provider call that failed, with everything a maintainer needs to
635
+ * reproduce it. Emitted once per failure from `BaseProvider`'s central failure
636
+ * paths, so chat, workflow nodes and the media surfaces all report the same
637
+ * record instead of each re-deriving it from the error prose.
638
+ */
639
+ export declare const providerCallFailedSchema: z.ZodObject<{
640
+ type: z.ZodLiteral<"provider_call_failed">;
641
+ provider: z.ZodString;
642
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
643
+ operation: z.ZodString;
644
+ kind: z.ZodString;
645
+ status: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
646
+ message: z.ZodString;
647
+ error_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
648
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
649
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
650
+ request_source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
651
+ request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
652
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
653
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
654
+ timestamp: z.ZodString;
655
+ }, z.core.$strip>;
656
+ export type ProviderCallFailed = z.infer<typeof providerCallFailedSchema>;
657
+ export type WebSocketMode = "binary" | "text";
658
+ /**
659
+ * Read-only RPC commands that require a `request_id` and return a single
660
+ * `rpc_response` frame. Distinguished from streaming commands (run_job,
661
+ * chat_message, etc.) which fire-and-forget and stream results back.
662
+ *
663
+ * `generate_media` is included here because the sketch editor and other
664
+ * non-chat callers want a single asset id back, not a streamed Message row.
665
+ * `generate_text` is its text twin: one answer, or one object matching a
666
+ * JSON schema, with no thread and no workflow behind it.
667
+ * `transcribe_audio` likewise returns word-level caption timing in one shot.
668
+ */
669
+ export type RpcCommandType = "list_workflows" | "get_workflow" | "list_assets" | "get_asset" | "list_nodes" | "get_node" | "generate_media" | "generate_text" | "transcribe_audio";
670
+ export interface WebSocketCommandEnvelope<C extends UnifiedCommandType = UnifiedCommandType, D extends Record<string, unknown> = Record<string, unknown>> {
671
+ command: C;
672
+ data: D;
80
673
  /**
81
- * Per-property issues from pre-flight graph validation. Present when
82
- * `status === "failed"` and the failure was caused by a validation error
83
- * (not a runtime exception). Frontend uses this to highlight specific
84
- * fields on the offending nodes instead of showing a node-level banner.
674
+ * Opaque client-generated id, echoed back in the `rpc_response` frame.
675
+ * REQUIRED for RPC commands (list_*, get_*); ignored for streaming
676
+ * commands (run_job, chat_message, …).
85
677
  */
86
- validation_issues?: ValidationIssue[] | null;
87
- }
88
- export interface ValidationIssue {
89
- node_id: string;
90
- node_type?: string | null;
91
- property: string;
92
- message: string;
678
+ request_id?: string;
93
679
  }
94
- export interface NodeUpdate {
95
- type: "node_update";
96
- node_id: string;
97
- node_name: string;
98
- node_type: string;
99
- status: string;
100
- error?: string | null;
101
- result?: Record<string, unknown> | null;
102
- properties?: Record<string, unknown> | null;
103
- workflow_id?: string | null;
680
+ export interface ListWorkflowsRequest {
681
+ limit?: number;
682
+ run_mode?: string;
683
+ tag?: string;
684
+ cursor?: string;
104
685
  }
105
- export interface NodeProgress {
106
- type: "node_progress";
107
- node_id: string;
108
- progress: number;
109
- total: number;
110
- chunk?: string;
111
- workflow_id?: string | null;
112
- }
113
- export interface EdgeUpdate {
114
- type: "edge_update";
115
- workflow_id: string;
116
- edge_id: string;
117
- status: string;
118
- counter?: number | null;
119
- }
120
- export interface OutputUpdate {
121
- type: "output_update";
122
- node_id: string;
123
- node_name: string;
124
- output_name: string;
125
- value: unknown;
126
- output_type: string;
127
- metadata: Record<string, unknown>;
128
- workflow_id?: string | null;
129
- }
130
- export interface PreviewUpdate {
131
- type: "preview_update";
132
- node_id: string;
133
- value: unknown;
134
- }
135
- export interface SaveUpdate {
136
- type: "save_update";
137
- node_id: string;
138
- name: string;
139
- value: unknown;
140
- output_type: string;
141
- metadata: Record<string, unknown>;
142
- }
143
- export interface BinaryUpdate {
144
- type: "binary_update";
145
- node_id: string;
146
- output_name: string;
147
- binary: Uint8Array;
148
- }
149
- export interface LogUpdate {
150
- type: "log_update";
151
- node_id: string;
152
- node_name: string;
153
- content: string;
154
- severity: Severity;
155
- workflow_id?: string | null;
156
- }
157
- export interface Notification {
158
- type: "notification";
159
- node_id: string;
160
- content: string;
161
- severity: Severity;
162
- workflow_id?: string | null;
163
- }
164
- export interface ErrorMessage {
165
- type: "error";
166
- message: string;
167
- thread_id?: string | null;
168
- workflow_id?: string | null;
169
- }
170
- export interface ToolCallUpdate {
171
- type: "tool_call_update";
172
- node_id?: string | null;
173
- thread_id?: string | null;
174
- workflow_id?: string | null;
175
- tool_call_id?: string | null;
176
- name: string;
177
- args: Record<string, unknown>;
178
- message?: string | null;
179
- step_id?: string | null;
180
- agent_execution_id?: string | null;
181
- }
182
- export interface ToolResultUpdate {
183
- type: "tool_result_update";
184
- node_id: string;
185
- thread_id?: string | null;
186
- workflow_id?: string | null;
187
- result: Record<string, unknown>;
188
- }
189
- export interface TaskUpdate {
190
- type: "task_update";
191
- node_id?: string | null;
192
- thread_id?: string | null;
193
- workflow_id?: string | null;
194
- task: TaskRef;
195
- step?: StepRef | null;
196
- event: TaskUpdateEvent;
197
- }
198
- export interface StepResult {
199
- type: "step_result";
200
- step: StepRef;
201
- result: unknown;
202
- error?: string | null;
203
- is_task_result?: boolean;
204
- thread_id?: string | null;
205
- workflow_id?: string | null;
206
- }
207
- export interface PlanningUpdate {
208
- type: "planning_update";
209
- node_id?: string | null;
210
- thread_id?: string | null;
211
- workflow_id?: string | null;
212
- phase: string;
213
- status: string;
214
- content?: string | null;
686
+ export interface GetWorkflowRequest {
687
+ id: string;
215
688
  }
216
- export interface Chunk {
217
- type: "chunk";
218
- node_id?: string | null;
219
- thread_id?: string | null;
220
- workflow_id?: string | null;
221
- content_type?: ContentType;
222
- content: string;
223
- content_metadata?: Record<string, unknown>;
224
- done?: boolean;
225
- thinking?: boolean;
689
+ export interface ListWorkflowSummariesRequest {
690
+ limit?: number;
691
+ cursor?: string;
226
692
  }
227
- export interface Prediction {
228
- type: "prediction";
693
+ export interface GetWorkflowInterfaceRequest {
229
694
  id: string;
230
- user_id: string;
231
- node_id: string;
232
- workflow_id?: string | null;
233
- provider?: string | null;
234
- model?: string | null;
235
- version?: string | null;
236
- node_type?: string | null;
237
- status: string;
238
- params?: Record<string, unknown>;
239
- data?: unknown | null;
240
- cost?: number | null;
241
- logs?: string | null;
242
- error?: string | null;
243
- duration?: number | null;
244
- created_at?: string | null;
245
- started_at?: string | null;
246
- completed_at?: string | null;
247
- [key: string]: unknown;
695
+ version: 1;
248
696
  }
249
- export interface LLMCallUpdate {
250
- type: "llm_call";
251
- node_id: string;
252
- node_name?: string | null;
253
- provider: string;
254
- model: string;
255
- messages: Array<{
256
- role: string;
257
- content: unknown;
258
- }>;
259
- response: unknown;
260
- tool_calls?: Array<{
261
- id: string;
262
- name: string;
263
- args: unknown;
264
- }> | null;
265
- tokens_input?: number | null;
266
- tokens_output?: number | null;
267
- cost?: number | null;
268
- duration_ms: number;
269
- error?: string | null;
270
- timestamp: string;
271
- }
272
- export type WebSocketMode = "binary" | "text";
273
- export type UnifiedCommandType = "run_job" | "reconnect_job" | "resume_job" | "cancel_job" | "get_status" | "set_mode" | "clear_models" | "stream_input" | "end_input_stream" | "chat_message" | "inference" | "stop";
274
- export interface WebSocketCommandEnvelope<C extends UnifiedCommandType = UnifiedCommandType, D extends Record<string, unknown> = Record<string, unknown>> {
275
- command: C;
276
- data: D;
697
+ export interface GetWorkflowInterfacesRequest {
698
+ ids: string[];
699
+ version: 1;
277
700
  }
278
- export interface PingMessage {
279
- type: "ping";
280
- ts?: number;
701
+ export interface ListAssetsRequest {
702
+ parent_id?: string;
703
+ content_type?: string;
704
+ workflow_id?: string;
705
+ node_id?: string;
706
+ job_id?: string;
707
+ page_size?: number;
281
708
  }
282
- export interface PongMessage {
283
- type: "pong";
284
- ts: number;
709
+ export interface GetAssetRequest {
710
+ id: string;
285
711
  }
286
- export interface ClientToolManifestMessage {
287
- type: "client_tools_manifest";
288
- tools: Array<Record<string, unknown>>;
712
+ export interface ListNodesRequest {
713
+ namespace?: string;
714
+ query?: string;
715
+ fields?: "summary" | "full";
716
+ limit?: number;
289
717
  }
290
- export interface ToolResultMessage {
291
- type: "tool_result";
292
- tool_call_id?: string;
293
- [key: string]: unknown;
718
+ export interface GetNodeRequest {
719
+ node_type: string;
294
720
  }
295
- export interface SystemStatsMessage {
296
- type: "system_stats";
297
- stats: Record<string, unknown>;
721
+ export interface GenerateMediaResponse {
722
+ asset_ids: string[];
723
+ existing_generation_id?: string;
298
724
  }
299
- export interface ResourceChangeMessage {
300
- type: "resource_change";
301
- event: "created" | "updated" | "deleted";
302
- resource_type: string;
303
- resource: Record<string, unknown>;
725
+ /**
726
+ * Answer to a `generate_text` request. The request payload itself is
727
+ * `GenerateTextRequest` in `ws-commands.ts`, derived from the Zod schema that
728
+ * validates the frame.
729
+ */
730
+ export interface GenerateTextResponse {
731
+ /** The model's text answer. Empty on a structured call answered by tool. */
732
+ text: string;
733
+ /**
734
+ * The parsed object, on a request that carried a `schema`. Null when the
735
+ * model produced neither a tool call nor JSON the fallback could read —
736
+ * the caller decides whether that is an error or a reason to fall back.
737
+ */
738
+ data: Record<string, unknown> | null;
304
739
  }
305
- export type WebSocketControlMessage = PingMessage | ClientToolManifestMessage | ToolResultMessage;
306
- export type WebSocketServerMessage = ProcessingMessage | PongMessage | SystemStatsMessage | ResourceChangeMessage | Record<string, unknown>;
307
- export type ProcessingMessage = JobUpdate | NodeUpdate | NodeProgress | EdgeUpdate | OutputUpdate | PreviewUpdate | SaveUpdate | BinaryUpdate | LogUpdate | Notification | ErrorMessage | ToolCallUpdate | ToolResultUpdate | TaskUpdate | StepResult | PlanningUpdate | Chunk | Prediction | LLMCallUpdate;
740
+ /**
741
+ * The frames below are declared once, as Zod schemas in `ws-commands.ts`, and
742
+ * derived here. The schemas are what the server actually validates on the
743
+ * wire; a type restated by hand beside them drifted twice before (see
744
+ * `RpcResponseMessage.command` and `ClientToolManifestMessage.tools`).
745
+ */
746
+ export type RpcErrorPayload = z.infer<typeof rpcErrorPayloadOutSchema>;
747
+ /**
748
+ * Single response frame for RPC commands. Either `result` or `error` is
749
+ * set; both are absent only for malformed requests where the server
750
+ * couldn't route the response (those use the legacy `{ error }` shape).
751
+ *
752
+ * `command` is a plain string, not `UnifiedCommandType`: `runRpc` in
753
+ * `packages/websocket/src/session/commands.ts` takes the command name as a
754
+ * string and echoes whatever it was called with.
755
+ */
756
+ export type RpcResponseMessage = z.infer<typeof rpcResponseMessageOutSchema>;
757
+ export type PingMessage = z.infer<typeof pingMessageInSchema>;
758
+ export type PongMessage = z.infer<typeof pongMessageOutSchema>;
759
+ /**
760
+ * `tools` is optional and its elements are `unknown`: the receiver
761
+ * (`websocket-client-session.ts`) does `Array.isArray(data.tools) ? … : []`
762
+ * and validates each entry itself.
763
+ */
764
+ export type ClientToolManifestMessage = z.infer<typeof clientToolManifestMessageInSchema>;
765
+ /** Server-assigned identity for the browser/editor on this /ws connection. */
766
+ export type RendererRegisteredMessage = z.infer<typeof rendererRegisteredMessageOutSchema>;
767
+ /** A frontend-tool request that is independent of a chat thread. */
768
+ export type RendererToolCallMessage = z.infer<typeof rendererToolCallMessageOutSchema>;
769
+ /** Result for a connection-level frontend-tool request. */
770
+ export type RendererToolResultMessage = z.infer<typeof rendererToolResultMessageInSchema>;
771
+ export type ToolResultMessage = z.infer<typeof toolResultMessageInSchema>;
772
+ export type SystemStatsMessage = z.infer<typeof systemStatsMessageOutSchema>;
773
+ export type ResourceChangeMessage = z.infer<typeof resourceChangeMessageOutSchema>;
774
+ export type RunTraceMessage = import("./run-trace.js").StoredRunTraceUpdate & {
775
+ type: "run_trace";
776
+ resnapshot_required?: boolean;
777
+ };
778
+ export type WebSocketControlMessage = PingMessage | ClientToolManifestMessage | RendererToolResultMessage | ToolResultMessage;
779
+ export type WebSocketServerMessage = ProcessingMessage | PongMessage | RendererRegisteredMessage | RendererToolCallMessage | SystemStatsMessage | ResourceChangeMessage | RunTraceMessage | RpcResponseMessage | Record<string, unknown>;
780
+ /**
781
+ * Single runtime validator for the whole `ProcessingMessage` union,
782
+ * discriminated on `type`. `packages/protocol`'s build converts this to
783
+ * JSON Schema (see `scripts/generate-processing-messages-schema.ts`) so
784
+ * non-TypeScript consumers can validate the same shapes.
785
+ */
786
+ export declare const processingMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
787
+ type: z.ZodLiteral<"job_update">;
788
+ status: z.ZodString;
789
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
792
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
793
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
795
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
796
+ queue_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
797
+ validation_issues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
798
+ node_id: z.ZodString;
799
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
800
+ property: z.ZodString;
801
+ message: z.ZodString;
802
+ }, z.core.$strip>>>>;
803
+ error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
804
+ }, z.core.$strip>, z.ZodObject<{
805
+ type: z.ZodLiteral<"node_update">;
806
+ node_id: z.ZodString;
807
+ node_name: z.ZodString;
808
+ node_type: z.ZodString;
809
+ status: z.ZodString;
810
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
811
+ error_detail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
812
+ code: z.ZodString;
813
+ runtime_package: z.ZodOptional<z.ZodNullable<z.ZodString>>;
814
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
+ secret_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
+ }, z.core.$strip>>>;
817
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
818
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
819
+ provider_cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
820
+ provider: z.ZodString;
821
+ amount: z.ZodNumber;
822
+ unit: z.ZodString;
823
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
824
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
825
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
826
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
827
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
828
+ input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
829
+ output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
830
+ cached_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
831
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
832
+ }, z.core.$strip>>>;
833
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
834
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
835
+ }, z.core.$strip>, z.ZodObject<{
836
+ type: z.ZodLiteral<"generation_complete">;
837
+ node_id: z.ZodString;
838
+ node_name: z.ZodString;
839
+ node_type: z.ZodString;
840
+ index: z.ZodOptional<z.ZodNumber>;
841
+ outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
842
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
843
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
844
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
845
+ }, z.core.$strip>, z.ZodObject<{
846
+ type: z.ZodLiteral<"node_progress">;
847
+ node_id: z.ZodString;
848
+ progress: z.ZodNumber;
849
+ total: z.ZodNumber;
850
+ chunk: z.ZodOptional<z.ZodString>;
851
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
852
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
853
+ }, z.core.$strip>, z.ZodObject<{
854
+ type: z.ZodLiteral<"edge_update">;
855
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
856
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
857
+ edge_id: z.ZodString;
858
+ status: z.ZodString;
859
+ counter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
860
+ }, z.core.$strip>, z.ZodObject<{
861
+ type: z.ZodLiteral<"output_update">;
862
+ node_id: z.ZodString;
863
+ node_name: z.ZodString;
864
+ output_name: z.ZodString;
865
+ value: z.ZodUnknown;
866
+ output_type: z.ZodString;
867
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
868
+ disposition: z.ZodOptional<z.ZodEnum<{
869
+ append: "append";
870
+ replace: "replace";
871
+ }>>;
872
+ done: z.ZodOptional<z.ZodBoolean>;
873
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
874
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
875
+ }, z.core.$strip>, z.ZodObject<{
876
+ type: z.ZodLiteral<"save_update">;
877
+ node_id: z.ZodString;
878
+ name: z.ZodString;
879
+ value: z.ZodUnknown;
880
+ output_type: z.ZodString;
881
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
882
+ }, z.core.$strip>, z.ZodObject<{
883
+ type: z.ZodLiteral<"binary_update">;
884
+ node_id: z.ZodString;
885
+ output_name: z.ZodString;
886
+ binary: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
887
+ }, z.core.$strip>, z.ZodObject<{
888
+ type: z.ZodLiteral<"log_update">;
889
+ node_id: z.ZodString;
890
+ node_name: z.ZodString;
891
+ content: z.ZodString;
892
+ severity: z.ZodEnum<{
893
+ error: "error";
894
+ info: "info";
895
+ warning: "warning";
896
+ }>;
897
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
898
+ }, z.core.$strip>, z.ZodObject<{
899
+ type: z.ZodLiteral<"notification">;
900
+ node_id: z.ZodString;
901
+ content: z.ZodString;
902
+ severity: z.ZodEnum<{
903
+ error: "error";
904
+ info: "info";
905
+ warning: "warning";
906
+ }>;
907
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
908
+ }, z.core.$strip>, z.ZodObject<{
909
+ type: z.ZodLiteral<"error">;
910
+ message: z.ZodString;
911
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
912
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
913
+ }, z.core.$strip>, z.ZodObject<{
914
+ type: z.ZodLiteral<"tool_call_update">;
915
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
916
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
918
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
919
+ name: z.ZodString;
920
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
921
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
922
+ step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
923
+ agent_execution_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
924
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
925
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
926
+ }, z.core.$strip>, z.ZodObject<{
927
+ type: z.ZodLiteral<"tool_result_update">;
928
+ node_id: z.ZodString;
929
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
930
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
931
+ result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
932
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
933
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
934
+ is_error: z.ZodOptional<z.ZodBoolean>;
935
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
936
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
937
+ }, z.core.$strip>, z.ZodObject<{
938
+ type: z.ZodLiteral<"task_update">;
939
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
941
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
942
+ task: z.ZodType<TaskRef, unknown, z.core.$ZodTypeInternals<TaskRef, unknown>>;
943
+ step: z.ZodOptional<z.ZodNullable<z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>>>;
944
+ event: z.ZodEnum<typeof TaskUpdateEvent>;
945
+ }, z.core.$strip>, z.ZodObject<{
946
+ type: z.ZodLiteral<"step_result">;
947
+ step: z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>;
948
+ result: z.ZodUnknown;
949
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
950
+ is_task_result: z.ZodOptional<z.ZodBoolean>;
951
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
952
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
953
+ }, z.core.$strip>, z.ZodObject<{
954
+ type: z.ZodLiteral<"planning_update">;
955
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
956
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
957
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
958
+ phase: z.ZodString;
959
+ status: z.ZodString;
960
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
961
+ }, z.core.$strip>, z.ZodObject<{
962
+ type: z.ZodLiteral<"chunk">;
963
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
965
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ content_type: z.ZodOptional<z.ZodEnum<{
968
+ agent_status: "agent_status";
969
+ audio: "audio";
970
+ document: "document";
971
+ image: "image";
972
+ text: "text";
973
+ tool_call: "tool_call";
974
+ video: "video";
975
+ }>>;
976
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>]>;
977
+ content_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
978
+ done: z.ZodOptional<z.ZodBoolean>;
979
+ thinking: z.ZodOptional<z.ZodBoolean>;
980
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
981
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
982
+ }, z.core.$strip>, z.ZodObject<{
983
+ type: z.ZodLiteral<"prediction">;
984
+ id: z.ZodString;
985
+ user_id: z.ZodString;
986
+ node_id: z.ZodString;
987
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
988
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
989
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
990
+ capability: z.ZodOptional<z.ZodNullable<z.ZodString>>;
991
+ version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
992
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
993
+ status: z.ZodEnum<{
994
+ cancelled: "cancelled";
995
+ completed: "completed";
996
+ failed: "failed";
997
+ interrupted: "interrupted";
998
+ needs_attention: "needs_attention";
999
+ pending: "pending";
1000
+ recovering: "recovering";
1001
+ running: "running";
1002
+ }>;
1003
+ submission_status: z.ZodOptional<z.ZodEnum<{
1004
+ accepted: "accepted";
1005
+ submission_unknown: "submission_unknown";
1006
+ submitted: "submitted";
1007
+ submitting: "submitting";
1008
+ }>>;
1009
+ provider_status: z.ZodOptional<z.ZodEnum<{
1010
+ cancelled: "cancelled";
1011
+ failed: "failed";
1012
+ queued: "queued";
1013
+ running: "running";
1014
+ succeeded: "succeeded";
1015
+ unknown: "unknown";
1016
+ }>>;
1017
+ output_status: z.ZodOptional<z.ZodEnum<{
1018
+ pending: "pending";
1019
+ ready: "ready";
1020
+ retrying: "retrying";
1021
+ saving: "saving";
1022
+ unavailable: "unavailable";
1023
+ }>>;
1024
+ attachment_status: z.ZodOptional<z.ZodEnum<{
1025
+ attached: "attached";
1026
+ pending: "pending";
1027
+ retrying: "retrying";
1028
+ superseded: "superseded";
1029
+ target_deleted: "target_deleted";
1030
+ }>>;
1031
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1032
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1033
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1034
+ logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1035
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1036
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1037
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1038
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1039
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1040
+ origin: z.ZodOptional<z.ZodObject<{
1041
+ surface: z.ZodEnum<{
1042
+ capability: "capability";
1043
+ chat: "chat";
1044
+ cli: "cli";
1045
+ rpc: "rpc";
1046
+ workflow: "workflow";
1047
+ }>;
1048
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1049
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1050
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1051
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1052
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1053
+ }, z.core.$strip>>;
1054
+ asset_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
1055
+ receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1056
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1057
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1058
+ amount: z.ZodNumber;
1059
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1060
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1061
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1062
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1063
+ }, z.core.$strip>>>;
1064
+ }, z.core.$strip>>>;
1065
+ }, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
1066
+ type: z.ZodLiteral<"llm_call">;
1067
+ node_id: z.ZodString;
1068
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1069
+ provider: z.ZodString;
1070
+ model: z.ZodString;
1071
+ operation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1072
+ messages: z.ZodArray<z.ZodObject<{
1073
+ role: z.ZodString;
1074
+ content: z.ZodUnknown;
1075
+ }, z.core.$strip>>;
1076
+ response: z.ZodUnknown;
1077
+ tool_calls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1078
+ id: z.ZodString;
1079
+ name: z.ZodString;
1080
+ args: z.ZodUnknown;
1081
+ }, z.core.$strip>>>>;
1082
+ tokens_input: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1083
+ tokens_output: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1084
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1085
+ duration_ms: z.ZodNumber;
1086
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1087
+ timestamp: z.ZodString;
1088
+ }, z.core.$strip>, z.ZodObject<{
1089
+ type: z.ZodLiteral<"provider_call_failed">;
1090
+ provider: z.ZodString;
1091
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1092
+ operation: z.ZodString;
1093
+ kind: z.ZodString;
1094
+ status: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1095
+ message: z.ZodString;
1096
+ error_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1097
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1098
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1099
+ request_source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1100
+ request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1101
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1102
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1103
+ timestamp: z.ZodString;
1104
+ }, z.core.$strip>, z.ZodObject<{
1105
+ type: z.ZodLiteral<"todo_update">;
1106
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1107
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1108
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1109
+ todos: z.ZodArray<z.ZodObject<{
1110
+ content: z.ZodString;
1111
+ status: z.ZodEnum<{
1112
+ completed: "completed";
1113
+ in_progress: "in_progress";
1114
+ pending: "pending";
1115
+ }>;
1116
+ }, z.core.$strip>>;
1117
+ }, z.core.$strip>, z.ZodObject<{
1118
+ type: z.ZodLiteral<"supervisor_escalation">;
1119
+ node_id: z.ZodString;
1120
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1121
+ escalation: z.ZodObject<{
1122
+ nodeId: z.ZodString;
1123
+ nodeType: z.ZodString;
1124
+ correlationLineage: z.ZodArray<z.ZodString>;
1125
+ invocationKey: z.ZodString;
1126
+ allowedActions: z.ZodArray<z.ZodEnum<{
1127
+ end_stream: "end_stream";
1128
+ fail: "fail";
1129
+ retry: "retry";
1130
+ skip: "skip";
1131
+ substitute: "substitute";
1132
+ }>>;
1133
+ detail: z.ZodString;
1134
+ failureSignature: z.ZodOptional<z.ZodString>;
1135
+ candidateOutput: z.ZodOptional<z.ZodUnknown>;
1136
+ inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1137
+ declaredOutputs: z.ZodRecord<z.ZodString, z.ZodString>;
1138
+ attempt: z.ZodNumber;
1139
+ spentCostUsd: z.ZodNumber;
1140
+ createdAssets: z.ZodBoolean;
1141
+ retrySafe: z.ZodBoolean;
1142
+ emitted: z.ZodBoolean;
1143
+ }, z.core.$strip>;
1144
+ }, z.core.$strip>, z.ZodObject<{
1145
+ type: z.ZodLiteral<"supervisor_decision">;
1146
+ node_id: z.ZodString;
1147
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1148
+ escalation: z.ZodObject<{
1149
+ nodeId: z.ZodString;
1150
+ nodeType: z.ZodString;
1151
+ correlationLineage: z.ZodArray<z.ZodString>;
1152
+ invocationKey: z.ZodString;
1153
+ allowedActions: z.ZodArray<z.ZodEnum<{
1154
+ end_stream: "end_stream";
1155
+ fail: "fail";
1156
+ retry: "retry";
1157
+ skip: "skip";
1158
+ substitute: "substitute";
1159
+ }>>;
1160
+ detail: z.ZodString;
1161
+ failureSignature: z.ZodOptional<z.ZodString>;
1162
+ candidateOutput: z.ZodOptional<z.ZodUnknown>;
1163
+ inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1164
+ declaredOutputs: z.ZodRecord<z.ZodString, z.ZodString>;
1165
+ attempt: z.ZodNumber;
1166
+ spentCostUsd: z.ZodNumber;
1167
+ createdAssets: z.ZodBoolean;
1168
+ retrySafe: z.ZodBoolean;
1169
+ emitted: z.ZodBoolean;
1170
+ }, z.core.$strip>;
1171
+ verdict: z.ZodDiscriminatedUnion<[z.ZodObject<{
1172
+ action: z.ZodLiteral<"retry">;
1173
+ }, z.core.$strip>, z.ZodObject<{
1174
+ action: z.ZodLiteral<"substitute">;
1175
+ outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1176
+ }, z.core.$strip>, z.ZodObject<{
1177
+ action: z.ZodLiteral<"skip">;
1178
+ applyTo: z.ZodOptional<z.ZodEnum<{
1179
+ invocation: "invocation";
1180
+ signature: "signature";
1181
+ }>>;
1182
+ }, z.core.$strip>, z.ZodObject<{
1183
+ action: z.ZodLiteral<"end_stream">;
1184
+ }, z.core.$strip>, z.ZodObject<{
1185
+ action: z.ZodLiteral<"fail">;
1186
+ reason: z.ZodOptional<z.ZodString>;
1187
+ applyTo: z.ZodOptional<z.ZodEnum<{
1188
+ invocation: "invocation";
1189
+ signature: "signature";
1190
+ }>>;
1191
+ }, z.core.$strip>], "action">;
1192
+ decided_by: z.ZodEnum<{
1193
+ agent: "agent";
1194
+ bounds: "bounds";
1195
+ default: "default";
1196
+ kernel: "kernel";
1197
+ sticky: "sticky";
1198
+ }>;
1199
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1200
+ }, z.core.$strip>], "type">;
1201
+ export type ProcessingMessage = z.infer<typeof processingMessageSchema>;
308
1202
  /**
309
1203
  * Literal union of every `type` discriminator value.
310
1204
  */
@@ -318,17 +1212,457 @@ export type MessageType = ProcessingMessage["type"];
318
1212
  export type MessageOfType<T extends MessageType> = Extract<ProcessingMessage, {
319
1213
  type: T;
320
1214
  }>;
1215
+ /** Every per-type schema, keyed by its `type` discriminator. */
1216
+ export declare const processingMessageSchemas: {
1217
+ readonly job_update: z.ZodObject<{
1218
+ type: z.ZodLiteral<"job_update">;
1219
+ status: z.ZodString;
1220
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1221
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1222
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1223
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1224
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1225
+ traceback: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1226
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1227
+ queue_position: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1228
+ validation_issues: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1229
+ node_id: z.ZodString;
1230
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1231
+ property: z.ZodString;
1232
+ message: z.ZodString;
1233
+ }, z.core.$strip>>>>;
1234
+ error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1235
+ }, z.core.$strip>;
1236
+ readonly node_update: z.ZodObject<{
1237
+ type: z.ZodLiteral<"node_update">;
1238
+ node_id: z.ZodString;
1239
+ node_name: z.ZodString;
1240
+ node_type: z.ZodString;
1241
+ status: z.ZodString;
1242
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1243
+ error_detail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1244
+ code: z.ZodString;
1245
+ runtime_package: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1246
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1247
+ secret_key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1248
+ }, z.core.$strip>>>;
1249
+ result: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1250
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1251
+ provider_cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1252
+ provider: z.ZodString;
1253
+ amount: z.ZodNumber;
1254
+ unit: z.ZodString;
1255
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1256
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1257
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1258
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1259
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1260
+ input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1261
+ output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1262
+ cached_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1263
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1264
+ }, z.core.$strip>>>;
1265
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1266
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1267
+ }, z.core.$strip>;
1268
+ readonly generation_complete: z.ZodObject<{
1269
+ type: z.ZodLiteral<"generation_complete">;
1270
+ node_id: z.ZodString;
1271
+ node_name: z.ZodString;
1272
+ node_type: z.ZodString;
1273
+ index: z.ZodOptional<z.ZodNumber>;
1274
+ outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1275
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1276
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1277
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1278
+ }, z.core.$strip>;
1279
+ readonly node_progress: z.ZodObject<{
1280
+ type: z.ZodLiteral<"node_progress">;
1281
+ node_id: z.ZodString;
1282
+ progress: z.ZodNumber;
1283
+ total: z.ZodNumber;
1284
+ chunk: z.ZodOptional<z.ZodString>;
1285
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1286
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1287
+ }, z.core.$strip>;
1288
+ readonly edge_update: z.ZodObject<{
1289
+ type: z.ZodLiteral<"edge_update">;
1290
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1291
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1292
+ edge_id: z.ZodString;
1293
+ status: z.ZodString;
1294
+ counter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1295
+ }, z.core.$strip>;
1296
+ readonly output_update: z.ZodObject<{
1297
+ type: z.ZodLiteral<"output_update">;
1298
+ node_id: z.ZodString;
1299
+ node_name: z.ZodString;
1300
+ output_name: z.ZodString;
1301
+ value: z.ZodUnknown;
1302
+ output_type: z.ZodString;
1303
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1304
+ disposition: z.ZodOptional<z.ZodEnum<{
1305
+ append: "append";
1306
+ replace: "replace";
1307
+ }>>;
1308
+ done: z.ZodOptional<z.ZodBoolean>;
1309
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1310
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1311
+ }, z.core.$strip>;
1312
+ readonly save_update: z.ZodObject<{
1313
+ type: z.ZodLiteral<"save_update">;
1314
+ node_id: z.ZodString;
1315
+ name: z.ZodString;
1316
+ value: z.ZodUnknown;
1317
+ output_type: z.ZodString;
1318
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1319
+ }, z.core.$strip>;
1320
+ readonly binary_update: z.ZodObject<{
1321
+ type: z.ZodLiteral<"binary_update">;
1322
+ node_id: z.ZodString;
1323
+ output_name: z.ZodString;
1324
+ binary: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
1325
+ }, z.core.$strip>;
1326
+ readonly log_update: z.ZodObject<{
1327
+ type: z.ZodLiteral<"log_update">;
1328
+ node_id: z.ZodString;
1329
+ node_name: z.ZodString;
1330
+ content: z.ZodString;
1331
+ severity: z.ZodEnum<{
1332
+ error: "error";
1333
+ info: "info";
1334
+ warning: "warning";
1335
+ }>;
1336
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1337
+ }, z.core.$strip>;
1338
+ readonly notification: z.ZodObject<{
1339
+ type: z.ZodLiteral<"notification">;
1340
+ node_id: z.ZodString;
1341
+ content: z.ZodString;
1342
+ severity: z.ZodEnum<{
1343
+ error: "error";
1344
+ info: "info";
1345
+ warning: "warning";
1346
+ }>;
1347
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1348
+ }, z.core.$strip>;
1349
+ readonly error: z.ZodObject<{
1350
+ type: z.ZodLiteral<"error">;
1351
+ message: z.ZodString;
1352
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1353
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1354
+ }, z.core.$strip>;
1355
+ readonly tool_call_update: z.ZodObject<{
1356
+ type: z.ZodLiteral<"tool_call_update">;
1357
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1358
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1359
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1360
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1361
+ name: z.ZodString;
1362
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1363
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1364
+ step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1365
+ agent_execution_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1366
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1367
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1368
+ }, z.core.$strip>;
1369
+ readonly tool_result_update: z.ZodObject<{
1370
+ type: z.ZodLiteral<"tool_result_update">;
1371
+ node_id: z.ZodString;
1372
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1373
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1374
+ result: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1375
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1376
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1377
+ is_error: z.ZodOptional<z.ZodBoolean>;
1378
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1379
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1380
+ }, z.core.$strip>;
1381
+ readonly task_update: z.ZodObject<{
1382
+ type: z.ZodLiteral<"task_update">;
1383
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1384
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1385
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1386
+ task: z.ZodType<TaskRef, unknown, z.core.$ZodTypeInternals<TaskRef, unknown>>;
1387
+ step: z.ZodOptional<z.ZodNullable<z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>>>;
1388
+ event: z.ZodEnum<typeof TaskUpdateEvent>;
1389
+ }, z.core.$strip>;
1390
+ readonly step_result: z.ZodObject<{
1391
+ type: z.ZodLiteral<"step_result">;
1392
+ step: z.ZodType<StepRef, unknown, z.core.$ZodTypeInternals<StepRef, unknown>>;
1393
+ result: z.ZodUnknown;
1394
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1395
+ is_task_result: z.ZodOptional<z.ZodBoolean>;
1396
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1397
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1398
+ }, z.core.$strip>;
1399
+ readonly planning_update: z.ZodObject<{
1400
+ type: z.ZodLiteral<"planning_update">;
1401
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1402
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1403
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1404
+ phase: z.ZodString;
1405
+ status: z.ZodString;
1406
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1407
+ }, z.core.$strip>;
1408
+ readonly chunk: z.ZodObject<{
1409
+ type: z.ZodLiteral<"chunk">;
1410
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1411
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1412
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1413
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1414
+ content_type: z.ZodOptional<z.ZodEnum<{
1415
+ agent_status: "agent_status";
1416
+ audio: "audio";
1417
+ document: "document";
1418
+ image: "image";
1419
+ text: "text";
1420
+ tool_call: "tool_call";
1421
+ video: "video";
1422
+ }>>;
1423
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Float32Array<ArrayBuffer>, Float32Array<ArrayBuffer>>]>;
1424
+ content_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1425
+ done: z.ZodOptional<z.ZodBoolean>;
1426
+ thinking: z.ZodOptional<z.ZodBoolean>;
1427
+ parent_tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1428
+ subtask_depth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1429
+ }, z.core.$strip>;
1430
+ readonly prediction: z.ZodObject<{
1431
+ type: z.ZodLiteral<"prediction">;
1432
+ id: z.ZodString;
1433
+ user_id: z.ZodString;
1434
+ node_id: z.ZodString;
1435
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1436
+ provider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1437
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1438
+ capability: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1439
+ version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1440
+ node_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1441
+ status: z.ZodEnum<{
1442
+ cancelled: "cancelled";
1443
+ completed: "completed";
1444
+ failed: "failed";
1445
+ interrupted: "interrupted";
1446
+ needs_attention: "needs_attention";
1447
+ pending: "pending";
1448
+ recovering: "recovering";
1449
+ running: "running";
1450
+ }>;
1451
+ submission_status: z.ZodOptional<z.ZodEnum<{
1452
+ accepted: "accepted";
1453
+ submission_unknown: "submission_unknown";
1454
+ submitted: "submitted";
1455
+ submitting: "submitting";
1456
+ }>>;
1457
+ provider_status: z.ZodOptional<z.ZodEnum<{
1458
+ cancelled: "cancelled";
1459
+ failed: "failed";
1460
+ queued: "queued";
1461
+ running: "running";
1462
+ succeeded: "succeeded";
1463
+ unknown: "unknown";
1464
+ }>>;
1465
+ output_status: z.ZodOptional<z.ZodEnum<{
1466
+ pending: "pending";
1467
+ ready: "ready";
1468
+ retrying: "retrying";
1469
+ saving: "saving";
1470
+ unavailable: "unavailable";
1471
+ }>>;
1472
+ attachment_status: z.ZodOptional<z.ZodEnum<{
1473
+ attached: "attached";
1474
+ pending: "pending";
1475
+ retrying: "retrying";
1476
+ superseded: "superseded";
1477
+ target_deleted: "target_deleted";
1478
+ }>>;
1479
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1480
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1481
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1482
+ logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1483
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1484
+ duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1485
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1486
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1487
+ completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1488
+ origin: z.ZodOptional<z.ZodObject<{
1489
+ surface: z.ZodEnum<{
1490
+ capability: "capability";
1491
+ chat: "chat";
1492
+ cli: "cli";
1493
+ rpc: "rpc";
1494
+ workflow: "workflow";
1495
+ }>;
1496
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1497
+ tool_call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1498
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1499
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1500
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1501
+ }, z.core.$strip>>;
1502
+ asset_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
1503
+ receipt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1504
+ provider_request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1505
+ cost: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1506
+ amount: z.ZodNumber;
1507
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1508
+ billing_unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1509
+ quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1510
+ unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1511
+ }, z.core.$strip>>>;
1512
+ }, z.core.$strip>>>;
1513
+ }, z.core.$catchall<z.ZodUnknown>>;
1514
+ readonly llm_call: z.ZodObject<{
1515
+ type: z.ZodLiteral<"llm_call">;
1516
+ node_id: z.ZodString;
1517
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1518
+ provider: z.ZodString;
1519
+ model: z.ZodString;
1520
+ operation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1521
+ messages: z.ZodArray<z.ZodObject<{
1522
+ role: z.ZodString;
1523
+ content: z.ZodUnknown;
1524
+ }, z.core.$strip>>;
1525
+ response: z.ZodUnknown;
1526
+ tool_calls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1527
+ id: z.ZodString;
1528
+ name: z.ZodString;
1529
+ args: z.ZodUnknown;
1530
+ }, z.core.$strip>>>>;
1531
+ tokens_input: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1532
+ tokens_output: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1533
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1534
+ duration_ms: z.ZodNumber;
1535
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1536
+ timestamp: z.ZodString;
1537
+ }, z.core.$strip>;
1538
+ readonly provider_call_failed: z.ZodObject<{
1539
+ type: z.ZodLiteral<"provider_call_failed">;
1540
+ provider: z.ZodString;
1541
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1542
+ operation: z.ZodString;
1543
+ kind: z.ZodString;
1544
+ status: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1545
+ message: z.ZodString;
1546
+ error_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1547
+ request_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1548
+ duration_ms: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1549
+ request_source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1550
+ request: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1551
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1552
+ job_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1553
+ timestamp: z.ZodString;
1554
+ }, z.core.$strip>;
1555
+ readonly todo_update: z.ZodObject<{
1556
+ type: z.ZodLiteral<"todo_update">;
1557
+ thread_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1558
+ workflow_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1559
+ node_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1560
+ todos: z.ZodArray<z.ZodObject<{
1561
+ content: z.ZodString;
1562
+ status: z.ZodEnum<{
1563
+ completed: "completed";
1564
+ in_progress: "in_progress";
1565
+ pending: "pending";
1566
+ }>;
1567
+ }, z.core.$strip>>;
1568
+ }, z.core.$strip>;
1569
+ readonly supervisor_escalation: z.ZodObject<{
1570
+ type: z.ZodLiteral<"supervisor_escalation">;
1571
+ node_id: z.ZodString;
1572
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1573
+ escalation: z.ZodObject<{
1574
+ nodeId: z.ZodString;
1575
+ nodeType: z.ZodString;
1576
+ correlationLineage: z.ZodArray<z.ZodString>;
1577
+ invocationKey: z.ZodString;
1578
+ allowedActions: z.ZodArray<z.ZodEnum<{
1579
+ end_stream: "end_stream";
1580
+ fail: "fail";
1581
+ retry: "retry";
1582
+ skip: "skip";
1583
+ substitute: "substitute";
1584
+ }>>;
1585
+ detail: z.ZodString;
1586
+ failureSignature: z.ZodOptional<z.ZodString>;
1587
+ candidateOutput: z.ZodOptional<z.ZodUnknown>;
1588
+ inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1589
+ declaredOutputs: z.ZodRecord<z.ZodString, z.ZodString>;
1590
+ attempt: z.ZodNumber;
1591
+ spentCostUsd: z.ZodNumber;
1592
+ createdAssets: z.ZodBoolean;
1593
+ retrySafe: z.ZodBoolean;
1594
+ emitted: z.ZodBoolean;
1595
+ }, z.core.$strip>;
1596
+ }, z.core.$strip>;
1597
+ readonly supervisor_decision: z.ZodObject<{
1598
+ type: z.ZodLiteral<"supervisor_decision">;
1599
+ node_id: z.ZodString;
1600
+ node_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1601
+ escalation: z.ZodObject<{
1602
+ nodeId: z.ZodString;
1603
+ nodeType: z.ZodString;
1604
+ correlationLineage: z.ZodArray<z.ZodString>;
1605
+ invocationKey: z.ZodString;
1606
+ allowedActions: z.ZodArray<z.ZodEnum<{
1607
+ end_stream: "end_stream";
1608
+ fail: "fail";
1609
+ retry: "retry";
1610
+ skip: "skip";
1611
+ substitute: "substitute";
1612
+ }>>;
1613
+ detail: z.ZodString;
1614
+ failureSignature: z.ZodOptional<z.ZodString>;
1615
+ candidateOutput: z.ZodOptional<z.ZodUnknown>;
1616
+ inputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1617
+ declaredOutputs: z.ZodRecord<z.ZodString, z.ZodString>;
1618
+ attempt: z.ZodNumber;
1619
+ spentCostUsd: z.ZodNumber;
1620
+ createdAssets: z.ZodBoolean;
1621
+ retrySafe: z.ZodBoolean;
1622
+ emitted: z.ZodBoolean;
1623
+ }, z.core.$strip>;
1624
+ verdict: z.ZodDiscriminatedUnion<[z.ZodObject<{
1625
+ action: z.ZodLiteral<"retry">;
1626
+ }, z.core.$strip>, z.ZodObject<{
1627
+ action: z.ZodLiteral<"substitute">;
1628
+ outputs: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1629
+ }, z.core.$strip>, z.ZodObject<{
1630
+ action: z.ZodLiteral<"skip">;
1631
+ applyTo: z.ZodOptional<z.ZodEnum<{
1632
+ invocation: "invocation";
1633
+ signature: "signature";
1634
+ }>>;
1635
+ }, z.core.$strip>, z.ZodObject<{
1636
+ action: z.ZodLiteral<"end_stream">;
1637
+ }, z.core.$strip>, z.ZodObject<{
1638
+ action: z.ZodLiteral<"fail">;
1639
+ reason: z.ZodOptional<z.ZodString>;
1640
+ applyTo: z.ZodOptional<z.ZodEnum<{
1641
+ invocation: "invocation";
1642
+ signature: "signature";
1643
+ }>>;
1644
+ }, z.core.$strip>], "action">;
1645
+ decided_by: z.ZodEnum<{
1646
+ agent: "agent";
1647
+ bounds: "bounds";
1648
+ default: "default";
1649
+ kernel: "kernel";
1650
+ sticky: "sticky";
1651
+ }>;
1652
+ cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1653
+ }, z.core.$strip>;
1654
+ };
1655
+ export declare function isJobUpdate(value: unknown): value is JobUpdate;
1656
+ export declare function isNodeUpdate(value: unknown): value is NodeUpdate;
1657
+ export declare function isOutputUpdate(value: unknown): value is OutputUpdate;
1658
+ export declare function isChunk(value: unknown): value is Chunk;
1659
+ export declare function isProviderCallFailed(value: unknown): value is ProviderCallFailed;
1660
+ /** True when `value` is a structurally valid `ProcessingMessage`. */
1661
+ export declare function isProcessingMessage(value: unknown): value is ProcessingMessage;
321
1662
  /**
322
1663
  * Recursively sanitize memory:// URIs from a message payload.
323
1664
  * Replaces any string starting with "memory://" with an empty string.
324
1665
  * Mirrors Python's sanitize_memory_uris_for_client().
325
1666
  */
326
1667
  export declare function sanitizeMemoryUris<T>(value: T): T;
327
- /**
328
- * Encode a BinaryUpdate into a single Buffer/Uint8Array suitable for
329
- * binary WebSocket transmission.
330
- * Format: JSON header (node_id + output_name) + null byte + raw binary.
331
- * Mirrors Python's BinaryUpdate.encode().
332
- */
333
- export declare function encodeBinaryUpdate(update: BinaryUpdate): Uint8Array;
334
1668
  //# sourceMappingURL=messages.d.ts.map