windmill-components 1.623.1 → 1.642.0

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 (903) hide show
  1. package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +2 -0
  2. package/dist/sharedUtils/base.d.ts +1 -0
  3. package/dist/sharedUtils/cloud.d.ts +1 -0
  4. package/dist/sharedUtils/common.d.ts +111 -0
  5. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +5 -0
  6. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +5 -0
  7. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +5 -0
  8. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +13 -0
  9. package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +11 -0
  10. package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +95 -0
  11. package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +6 -0
  12. package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +7 -0
  13. package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +33 -0
  14. package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +10 -0
  15. package/dist/sharedUtils/components/apps/editor/component/components.d.ts +5371 -0
  16. package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +3 -0
  17. package/dist/sharedUtils/components/apps/editor/component/index.d.ts +3 -0
  18. package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +7 -0
  19. package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +3 -0
  20. package/dist/sharedUtils/components/apps/gridUtils.d.ts +14 -0
  21. package/dist/sharedUtils/components/apps/inputType.d.ts +178 -0
  22. package/dist/sharedUtils/components/apps/rx.d.ts +29 -0
  23. package/dist/sharedUtils/components/apps/sharedTypes.d.ts +21 -0
  24. package/dist/sharedUtils/components/apps/types.d.ts +274 -0
  25. package/dist/sharedUtils/components/assets/lib.d.ts +25 -0
  26. package/dist/sharedUtils/components/common/alert/model.d.ts +2 -0
  27. package/dist/sharedUtils/components/common/badge/model.d.ts +8 -0
  28. package/dist/sharedUtils/components/common/button/model.d.ts +45 -0
  29. package/dist/sharedUtils/components/common/fileInput/model.d.ts +1 -0
  30. package/dist/sharedUtils/components/common/index.d.ts +24 -0
  31. package/dist/sharedUtils/components/common/skeleton/model.d.ts +21 -0
  32. package/dist/sharedUtils/components/dbTypes.d.ts +14 -0
  33. package/dist/sharedUtils/components/diff_drawer.d.ts +26 -0
  34. package/dist/sharedUtils/components/ducklake.d.ts +1 -0
  35. package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +7 -0
  36. package/dist/sharedUtils/components/icons/index.d.ts +101 -0
  37. package/dist/sharedUtils/components/random_positive_adjetive.d.ts +1 -0
  38. package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +10 -0
  39. package/dist/sharedUtils/components/raw_apps/utils.d.ts +15 -0
  40. package/dist/sharedUtils/components/triggers/email/utils.d.ts +4 -0
  41. package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +2 -0
  42. package/dist/sharedUtils/components/triggers/http/utils.d.ts +11 -0
  43. package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +2 -0
  44. package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +2 -0
  45. package/dist/sharedUtils/components/triggers/nats/utils.d.ts +2 -0
  46. package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +8 -0
  47. package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +2 -0
  48. package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +32 -0
  49. package/dist/sharedUtils/components/triggers/utils.d.ts +80 -0
  50. package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +2 -0
  51. package/dist/sharedUtils/components/triggers.d.ts +20 -0
  52. package/dist/sharedUtils/gen/core/ApiError.d.ts +10 -0
  53. package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +13 -0
  54. package/dist/sharedUtils/gen/core/ApiResult.d.ts +7 -0
  55. package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +26 -0
  56. package/dist/sharedUtils/gen/core/OpenAPI.d.ts +27 -0
  57. package/dist/sharedUtils/gen/core/request.d.ts +29 -0
  58. package/dist/sharedUtils/gen/index.d.ts +6 -0
  59. package/dist/sharedUtils/gen/schemas.gen.d.ts +7036 -0
  60. package/dist/sharedUtils/gen/services.gen.d.ts +6047 -0
  61. package/dist/sharedUtils/gen/types.gen.d.ts +21881 -0
  62. package/dist/sharedUtils/history.svelte.d.ts +9 -0
  63. package/dist/sharedUtils/hub.d.ts +49 -0
  64. package/dist/sharedUtils/jsr.json +6 -0
  65. package/dist/sharedUtils/lib.d.ts +5 -0
  66. package/dist/sharedUtils/lib.es.js +1588 -0
  67. package/dist/sharedUtils/package.json +12 -0
  68. package/dist/sharedUtils/schema.d.ts +3 -0
  69. package/dist/sharedUtils/stores.d.ts +97 -0
  70. package/dist/sharedUtils/svelte5Utils.svelte.d.ts +80 -0
  71. package/dist/sharedUtils/toast.d.ts +8 -0
  72. package/dist/sharedUtils/utils.d.ts +265 -0
  73. package/package/assets/app.css +32 -13
  74. package/package/assets/tokens/tokens.json +11 -1
  75. package/package/ata/apis.js +78 -5
  76. package/package/cancelable-promise-utils.js +4 -2
  77. package/package/components/AIAgentLogViewer.svelte +2 -2
  78. package/package/components/AIAgentLogViewer.svelte.d.ts +1 -0
  79. package/package/components/AIProviderPicker.svelte +20 -80
  80. package/package/components/AIProviderPicker.svelte.d.ts +2 -7
  81. package/package/components/AddUser.svelte +3 -3
  82. package/package/components/ApiConnectForm.svelte +13 -1
  83. package/package/components/AppConnectDrawer.svelte +1 -0
  84. package/package/components/AppConnectInner.svelte +1 -0
  85. package/package/components/AppConnectInner.svelte.d.ts +1 -1
  86. package/package/components/ArgInput.svelte +15 -5
  87. package/package/components/ArgInput.svelte.d.ts +3 -4
  88. package/package/components/Auth0Setting.svelte +6 -2
  89. package/package/components/AuthSettings.svelte +71 -40
  90. package/package/components/AuthSettings.svelte.d.ts +3 -1
  91. package/package/components/AutheliaSetting.svelte +3 -2
  92. package/package/components/AuthentikSetting.svelte +3 -2
  93. package/package/components/AutoscalingConfigEditor.svelte +2 -1
  94. package/package/components/AutoscalingConfigEditor.svelte.d.ts +1 -0
  95. package/package/components/BedrockCredentialsCheck.svelte +241 -0
  96. package/package/components/BedrockCredentialsCheck.svelte.d.ts +3 -0
  97. package/package/components/CenteredModal.svelte +42 -24
  98. package/package/components/CenteredModal.svelte.d.ts +8 -27
  99. package/package/components/CenteredPage.svelte +6 -2
  100. package/package/components/CenteredPage.svelte.d.ts +3 -0
  101. package/package/components/ChangeInstanceUsernameInner.svelte +1 -1
  102. package/package/components/CompareWorkspaces.svelte +103 -73
  103. package/package/components/ConcurrentJobsChart.svelte +4 -3
  104. package/package/components/ConcurrentJobsChart.svelte.d.ts +2 -2
  105. package/package/components/ConnectionSection.svelte +69 -73
  106. package/package/components/CustomPopover.svelte +20 -23
  107. package/package/components/CustomPopover.svelte.d.ts +14 -39
  108. package/package/components/CustomSso.svelte +7 -7
  109. package/package/components/DBManager.svelte +147 -44
  110. package/package/components/DBManager.svelte.d.ts +15 -2
  111. package/package/components/DBManagerContent.svelte +30 -63
  112. package/package/components/DBManagerContent.svelte.d.ts +39 -4
  113. package/package/components/DBManagerDrawer.svelte +9 -9
  114. package/package/components/DBTable.svelte +1 -1
  115. package/package/components/DBTable.svelte.d.ts +3 -1
  116. package/package/components/DBTableEditor.svelte +234 -178
  117. package/package/components/DBTableEditor.svelte.d.ts +22 -3
  118. package/package/components/DatatablePicker.svelte +29 -0
  119. package/package/components/DatatablePicker.svelte.d.ts +13 -0
  120. package/package/components/DateInput.svelte +29 -35
  121. package/package/components/DateInput.svelte.d.ts +10 -11
  122. package/package/components/DateTimeInput.svelte +3 -3
  123. package/package/components/DedicatedWorkersSelector.svelte +566 -0
  124. package/package/components/DedicatedWorkersSelector.svelte.d.ts +8 -0
  125. package/package/components/DeployToSetting.svelte +183 -123
  126. package/package/components/DeployToSetting.svelte.d.ts +19 -28
  127. package/package/components/DeployWorkspace.svelte +111 -72
  128. package/package/components/DeployWorkspace.svelte.d.ts +2 -1
  129. package/package/components/DeployWorkspaceDrawer.svelte +18 -7
  130. package/package/components/DeployWorkspaceDrawer.svelte.d.ts +3 -20
  131. package/package/components/Description.svelte +5 -2
  132. package/package/components/Dev.svelte +37 -2
  133. package/package/components/DiffDrawer.svelte +8 -29
  134. package/package/components/DiffEditor.svelte +39 -8
  135. package/package/components/DiffEditor.svelte.d.ts +2 -6
  136. package/package/components/DisplayResult.svelte +34 -26
  137. package/package/components/DropdownMenu.svelte +39 -0
  138. package/package/components/DropdownMenu.svelte.d.ts +14 -0
  139. package/package/components/DropdownSubmenuItem.svelte +68 -0
  140. package/package/components/DropdownSubmenuItem.svelte.d.ts +10 -0
  141. package/package/components/DropdownV2.svelte +5 -4
  142. package/package/components/DropdownV2.svelte.d.ts +1 -0
  143. package/package/components/DropdownV2Inner.svelte +42 -34
  144. package/package/components/DropdownV2Inner.svelte.d.ts +2 -1
  145. package/package/components/DucklakePicker.svelte +2 -5
  146. package/package/components/EEOnly.svelte +4 -14
  147. package/package/components/EEOnly.svelte.d.ts +0 -1
  148. package/package/components/Editor.svelte +72 -27
  149. package/package/components/Editor.svelte.d.ts +4 -0
  150. package/package/components/EditorBar.svelte +3 -5
  151. package/package/components/ErrorOrRecoveryHandler.svelte +62 -53
  152. package/package/components/ErrorOrRecoveryHandler.svelte.d.ts +1 -0
  153. package/package/components/ExploreAssetButton.svelte +1 -2
  154. package/package/components/FakeMonacoPlaceHolder.svelte +1 -1
  155. package/package/components/FileExplorer.svelte +249 -0
  156. package/package/components/FileExplorer.svelte.d.ts +21 -0
  157. package/package/components/FilesetEditor.svelte +103 -0
  158. package/package/components/FilesetEditor.svelte.d.ts +6 -0
  159. package/package/components/FilterSearchbar.svelte +628 -0
  160. package/package/components/FilterSearchbar.svelte.d.ts +86 -0
  161. package/package/components/FlowBuilder.svelte +140 -90
  162. package/package/components/FlowDiffViewer.svelte +37 -0
  163. package/package/components/FlowDiffViewer.svelte.d.ts +7 -0
  164. package/package/components/FlowGraphViewer.svelte +5 -2
  165. package/package/components/FlowGraphViewer.svelte.d.ts +2 -0
  166. package/package/components/FlowGraphViewerStep.svelte +49 -33
  167. package/package/components/FlowHistoryJobPicker.svelte +2 -1
  168. package/package/components/FlowJobResult.svelte +31 -23
  169. package/package/components/FlowJobResult.svelte.d.ts +0 -1
  170. package/package/components/FlowLogRow.svelte +1 -1
  171. package/package/components/FlowLogViewer.svelte +8 -3
  172. package/package/components/FlowLoopIterationPreview.svelte.d.ts +1 -1
  173. package/package/components/FlowPreviewContent.svelte +67 -50
  174. package/package/components/FlowPreviewContent.svelte.d.ts +5 -1
  175. package/package/components/FlowRestartButton.svelte +48 -49
  176. package/package/components/FlowRestartButton.svelte.d.ts +5 -0
  177. package/package/components/FlowStatusViewer.svelte +2 -3
  178. package/package/components/FlowStatusViewer.svelte.d.ts +1 -0
  179. package/package/components/FlowStatusViewerInner.svelte +411 -308
  180. package/package/components/FlowStatusViewerInner.svelte.d.ts +3 -3
  181. package/package/components/FlowStatusWaitingForEvents.svelte +34 -29
  182. package/package/components/FlowStatusWaitingForEvents.svelte.d.ts +4 -18
  183. package/package/components/FlowViewer.svelte +103 -2
  184. package/package/components/FlowViewer.svelte.d.ts +9 -3
  185. package/package/components/FolderPicker.svelte +195 -65
  186. package/package/components/FolderPicker.svelte.d.ts +2 -0
  187. package/package/components/ForkWorkspaceBanner.svelte +32 -13
  188. package/package/components/GraphqlSchemaViewer.svelte +8 -1
  189. package/package/components/HistoricInputs.svelte +24 -27
  190. package/package/components/HistoricInputs.svelte.d.ts +2 -2
  191. package/package/components/IconedResourceType.svelte +8 -2
  192. package/package/components/IconedResourceType.svelte.d.ts +2 -0
  193. package/package/components/InfiniteList.svelte +27 -20
  194. package/package/components/InfiniteList.svelte.d.ts +2 -0
  195. package/package/components/InputError.svelte +9 -0
  196. package/package/components/InputError.svelte.d.ts +6 -0
  197. package/package/components/InputTransformForm.svelte +46 -39
  198. package/package/components/InputTransformForm.svelte.d.ts +1 -0
  199. package/package/components/InputTransformSchemaForm.svelte +2 -1
  200. package/package/components/InputTransformSchemaForm.svelte.d.ts +1 -0
  201. package/package/components/InputTransformsViewer.svelte +37 -20
  202. package/package/components/InstanceNameEditor.svelte +3 -1
  203. package/package/components/InstanceSetting.svelte +187 -373
  204. package/package/components/InstanceSetting.svelte.d.ts +1 -0
  205. package/package/components/InstanceSettings.svelte +804 -193
  206. package/package/components/InstanceSettings.svelte.d.ts +17 -2
  207. package/package/components/IntegerInput.svelte +58 -0
  208. package/package/components/IntegerInput.svelte.d.ts +14 -0
  209. package/package/components/InviteGlobalUser.svelte +25 -25
  210. package/package/components/InviteGlobalUser.svelte.d.ts +4 -2
  211. package/package/components/InviteUser.svelte +16 -42
  212. package/package/components/InviteUser.svelte.d.ts +4 -18
  213. package/package/components/JobArgs.svelte +14 -10
  214. package/package/components/JobLoader.svelte +6 -4
  215. package/package/components/JobLoader.svelte.d.ts +3 -3
  216. package/package/components/JobOtelTraces.svelte +287 -0
  217. package/package/components/JobOtelTraces.svelte.d.ts +6 -0
  218. package/package/components/JobStatus.svelte +29 -26
  219. package/package/components/JobStatus.svelte.d.ts +1 -0
  220. package/package/components/JsonInputs.svelte +6 -8
  221. package/package/components/JsonInputs.svelte.d.ts +7 -8
  222. package/package/components/KanidmSetting.svelte +3 -2
  223. package/package/components/KeycloakSetting.svelte +3 -2
  224. package/package/components/LogViewer.svelte +91 -33
  225. package/package/components/Login.svelte +36 -3
  226. package/package/components/ManualPopover.svelte +5 -6
  227. package/package/components/ManualPopover.svelte.d.ts +9 -35
  228. package/package/components/MemoryFootprintViewer.svelte +2 -6
  229. package/package/components/ModulePreview.svelte +23 -21
  230. package/package/components/ModulePreview.svelte.d.ts +1 -0
  231. package/package/components/ModuleStatus.svelte +5 -5
  232. package/package/components/ModuleTest.svelte +3 -3
  233. package/package/components/MoveDrawer.svelte +47 -76
  234. package/package/components/MoveDrawer.svelte.d.ts +4 -6
  235. package/package/components/NextcloudSetting.svelte +4 -3
  236. package/package/components/NoDirectDeployAlert.svelte +31 -0
  237. package/package/components/NoDirectDeployAlert.svelte.d.ts +6 -0
  238. package/package/components/NumberTypeNarrowing.svelte +65 -67
  239. package/package/components/NumberTypeNarrowing.svelte.d.ts +2 -1
  240. package/package/components/OAuthSetting.svelte +7 -14
  241. package/package/components/ObjectStoreConfigSettings.svelte +150 -55
  242. package/package/components/ObjectStoreConfigSettings.svelte.d.ts +34 -44
  243. package/package/components/OktaSetting.svelte +3 -2
  244. package/package/components/PageHeader.svelte +1 -1
  245. package/package/components/ParentWorkspaceProtectionAlert.svelte +48 -0
  246. package/package/components/ParentWorkspaceProtectionAlert.svelte.d.ts +7 -0
  247. package/package/components/Path.svelte +41 -29
  248. package/package/components/Path.svelte.d.ts +4 -1
  249. package/package/components/PocketIdSetting.svelte +83 -0
  250. package/package/components/PocketIdSetting.svelte.d.ts +6 -0
  251. package/package/components/ResourceEditor.svelte +13 -7
  252. package/package/components/ResourcePicker.svelte +6 -5
  253. package/package/components/ResourcePicker.svelte.d.ts +1 -0
  254. package/package/components/RightClickPopover.svelte +37 -0
  255. package/package/components/RightClickPopover.svelte.d.ts +11 -0
  256. package/package/components/RunButton.svelte +5 -15
  257. package/package/components/RunButton.svelte.d.ts +7 -19
  258. package/package/components/RunChart.svelte +9 -24
  259. package/package/components/RunChart.svelte.d.ts +2 -5
  260. package/package/components/RunForm.svelte +9 -17
  261. package/package/components/RunForm.svelte.d.ts +0 -1
  262. package/package/components/RunFormAdvancedPopup.svelte +1 -1
  263. package/package/components/RunsPage.svelte +489 -926
  264. package/package/components/RunsPage.svelte.d.ts +5 -5
  265. package/package/components/S3FilePicker.svelte +7 -11
  266. package/package/components/S3FilePickerInner.svelte +2 -3
  267. package/package/components/S3FilePickerInner.svelte.d.ts +2 -2
  268. package/package/components/SaveButton.svelte +78 -0
  269. package/package/components/SaveButton.svelte.d.ts +12 -0
  270. package/package/components/SaveInputsButton.svelte +1 -1
  271. package/package/components/SavedInputsPicker.svelte +1 -1
  272. package/package/components/SavedInputsV2.svelte +36 -39
  273. package/package/components/SchemaForm.svelte +26 -19
  274. package/package/components/SchemaFormWithArgPicker.svelte +34 -29
  275. package/package/components/SchemaFormWithArgPicker.svelte.d.ts +12 -21
  276. package/package/components/SchemaViewer.svelte +56 -53
  277. package/package/components/ScriptBuilder.svelte +13 -13
  278. package/package/components/ScriptEditor.svelte +574 -98
  279. package/package/components/Section.svelte +5 -3
  280. package/package/components/ServiceLogsInner.svelte +21 -82
  281. package/package/components/ShareModal.svelte.d.ts +1 -1
  282. package/package/components/SimpleEditor.svelte +46 -2
  283. package/package/components/Star.svelte +13 -31
  284. package/package/components/Star.svelte.d.ts +8 -21
  285. package/package/components/StringTypeNarrowing.svelte +1 -0
  286. package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
  287. package/package/components/SummaryPathDisplay.svelte +177 -0
  288. package/package/components/SummaryPathDisplay.svelte.d.ts +10 -0
  289. package/package/components/SuperadminSettings.svelte +185 -4
  290. package/package/components/SuperadminSettings.svelte.d.ts +4 -1
  291. package/package/components/SuperadminSettingsInner.svelte +307 -192
  292. package/package/components/SuperadminSettingsInner.svelte.d.ts +12 -1
  293. package/package/components/TaggedTextInput.svelte +449 -0
  294. package/package/components/TaggedTextInput.svelte.d.ts +28 -0
  295. package/package/components/TemplateEditor.svelte +54 -29
  296. package/package/components/TemplateEditor.svelte.d.ts +13 -102
  297. package/package/components/TimeAgo.svelte +49 -7
  298. package/package/components/TimeAgo.svelte.d.ts +1 -0
  299. package/package/components/Toast.svelte +72 -50
  300. package/package/components/Toast.svelte.d.ts +2 -2
  301. package/package/components/Tooltip.svelte +2 -2
  302. package/package/components/Tooltip.svelte.d.ts +2 -0
  303. package/package/components/TooltipInner.svelte +6 -1
  304. package/package/components/TooltipInner.svelte.d.ts +1 -0
  305. package/package/components/Uptodate.svelte +3 -2
  306. package/package/components/UserSettings.svelte +3 -3
  307. package/package/components/UserSettings.svelte.d.ts +1 -0
  308. package/package/components/WorkerGroup.svelte +353 -210
  309. package/package/components/WorkerGroup.svelte.d.ts +3 -0
  310. package/package/components/WorkerTagPicker.svelte +1 -1
  311. package/package/components/WorkerTagSelect.svelte +5 -2
  312. package/package/components/WorkspaceDependenciesEditor.svelte +33 -17
  313. package/package/components/WorkspaceTutorials.svelte +5 -0
  314. package/package/components/ZitadelSetting.svelte +3 -2
  315. package/package/components/aiProviderStorage.d.ts +5 -0
  316. package/package/components/aiProviderStorage.js +50 -0
  317. package/package/components/apps/components/buttons/AppButton.svelte +21 -6
  318. package/package/components/apps/components/buttons/AppForm.svelte +2 -1
  319. package/package/components/apps/components/buttons/AppFormButton.svelte +2 -1
  320. package/package/components/apps/components/display/InsertRowDrawerButton.svelte +1 -1
  321. package/package/components/apps/components/display/dbtable/AppDbExplorer.svelte +24 -16
  322. package/package/components/apps/components/display/dbtable/dbFeatures.d.ts +9 -0
  323. package/package/components/apps/components/display/dbtable/dbFeatures.js +32 -0
  324. package/package/components/apps/components/display/dbtable/metadata.d.ts +4 -3
  325. package/package/components/apps/components/display/dbtable/metadata.js +178 -148
  326. package/package/components/apps/components/display/dbtable/queries/alterTable.d.ts +46 -0
  327. package/package/components/apps/components/display/dbtable/queries/alterTable.js +322 -0
  328. package/package/components/apps/components/display/dbtable/queries/alterTable.test.d.ts +1 -0
  329. package/package/components/apps/components/display/dbtable/queries/alterTable.test.js +867 -0
  330. package/package/components/apps/components/display/dbtable/queries/count.js +3 -1
  331. package/package/components/apps/components/display/dbtable/queries/createTable.d.ts +2 -24
  332. package/package/components/apps/components/display/dbtable/queries/createTable.js +13 -25
  333. package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.d.ts +9 -0
  334. package/package/components/apps/components/display/dbtable/queries/dbQueriesUtils.js +45 -0
  335. package/package/components/apps/components/display/dbtable/queries/delete.js +3 -1
  336. package/package/components/apps/components/display/dbtable/queries/insert.js +3 -1
  337. package/package/components/apps/components/display/dbtable/queries/relationalKeys.d.ts +45 -0
  338. package/package/components/apps/components/display/dbtable/queries/relationalKeys.js +401 -0
  339. package/package/components/apps/components/display/dbtable/queries/select.d.ts +2 -0
  340. package/package/components/apps/components/display/dbtable/queries/select.js +52 -7
  341. package/package/components/apps/components/display/dbtable/queries/update.js +3 -1
  342. package/package/components/apps/components/display/dbtable/tableEditor.d.ts +35 -0
  343. package/package/components/apps/components/display/dbtable/tableEditor.js +67 -0
  344. package/package/components/apps/components/display/dbtable/utils.d.ts +2 -0
  345. package/package/components/apps/components/display/dbtable/utils.js +61 -36
  346. package/package/components/apps/components/display/table/AppAggridExplorerTable.svelte +6 -0
  347. package/package/components/apps/components/display/table/AppAggridInfiniteTable.svelte +1 -0
  348. package/package/components/apps/components/display/table/AppAggridTable.svelte +15 -0
  349. package/package/components/apps/components/display/table/AppAggridTableActions.svelte +16 -10
  350. package/package/components/apps/components/display/table/AppAggridTableActions.svelte.d.ts +2 -1
  351. package/package/components/apps/components/display/table/theme/windmill-theme.css +8 -7
  352. package/package/components/apps/components/helpers/HiddenComponent.svelte +1 -1
  353. package/package/components/apps/components/helpers/InputValue.svelte +1 -1
  354. package/package/components/apps/components/helpers/ResolveConfig.svelte +1 -1
  355. package/package/components/apps/components/helpers/RunnableComponent.svelte +3 -2
  356. package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +1 -1
  357. package/package/components/apps/components/helpers/RunnableWrapper.svelte +2 -2
  358. package/package/components/apps/components/helpers/eval.js +5 -2
  359. package/package/components/apps/components/inputs/AppMultiSelectV2.svelte +2 -4
  360. package/package/components/apps/components/layout/AppModal.svelte +2 -1
  361. package/package/components/apps/components/layout/AppModal.svelte.d.ts +1 -0
  362. package/package/components/apps/editor/AppEditorHeader.svelte +8 -1
  363. package/package/components/apps/editor/AppEditorHeaderDeploy.svelte +32 -29
  364. package/package/components/apps/editor/AppEditorHeaderDeploy.svelte.d.ts +2 -2
  365. package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte +4 -4
  366. package/package/components/apps/editor/AppEditorHeaderDeployInitialDraft.svelte.d.ts +3 -3
  367. package/package/components/apps/editor/PublicApp.svelte +49 -30
  368. package/package/components/apps/editor/PublicApp.svelte.d.ts +1 -0
  369. package/package/components/apps/editor/appPolicy.js +5 -4
  370. package/package/components/apps/editor/appUtils.d.ts +1 -1
  371. package/package/components/apps/editor/component/components.d.ts +11 -0
  372. package/package/components/apps/editor/component/components.js +19 -2
  373. package/package/components/apps/editor/componentsPanel/CssProperty.svelte +3 -1
  374. package/package/components/apps/editor/inlineScriptsPanel/CacheTtlPopup.svelte +1 -1
  375. package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +77 -7
  376. package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +2 -2
  377. package/package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -2
  378. package/package/components/apps/editor/inlineScriptsPanel/utils.js +10 -1
  379. package/package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +1 -1
  380. package/package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte +1 -1
  381. package/package/components/apps/editor/settingsPanel/StylePanel.svelte +66 -29
  382. package/package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +2 -17
  383. package/package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +10 -0
  384. package/package/components/apps/inputType.d.ts +8 -3
  385. package/package/components/assets/AssetButtons.svelte +3 -7
  386. package/package/components/assets/AssetButtons.svelte.d.ts +2 -4
  387. package/package/components/assets/AssetColumnBadges.svelte +35 -0
  388. package/package/components/assets/AssetColumnBadges.svelte.d.ts +10 -0
  389. package/package/components/assets/AssetsDropdownButton.svelte +9 -7
  390. package/package/components/assets/AssetsUsageDrawer.svelte +100 -27
  391. package/package/components/assets/AssetsUsageDrawer.svelte.d.ts +5 -6
  392. package/package/components/assets/JobAssetsViewer.svelte +4 -6
  393. package/package/components/assets/assetsFilter.d.ts +50 -0
  394. package/package/components/assets/assetsFilter.js +43 -0
  395. package/package/components/assets/lib.d.ts +6 -4
  396. package/package/components/assets/lib.js +11 -2
  397. package/package/components/auditLogs/AuditLogsFilters.svelte +39 -18
  398. package/package/components/auditLogs/AuditLogsFilters.svelte.d.ts +1 -1
  399. package/package/components/common/CloseButton.svelte +2 -1
  400. package/package/components/common/CloseButton.svelte.d.ts +1 -0
  401. package/package/components/common/InlineCalendarInput.svelte +580 -0
  402. package/package/components/common/InlineCalendarInput.svelte.d.ts +31 -0
  403. package/package/components/common/alert/Alert.svelte +2 -8
  404. package/package/components/common/alert/model.d.ts +1 -0
  405. package/package/components/common/alert/model.js +7 -0
  406. package/package/components/common/badge/Badge.svelte +7 -3
  407. package/package/components/common/badge/Badge.svelte.d.ts +1 -0
  408. package/package/components/common/badge/CountBadge.svelte +4 -3
  409. package/package/components/common/badge/CountBadge.svelte.d.ts +1 -0
  410. package/package/components/common/breadcrumb/Breadcrumb.svelte +10 -14
  411. package/package/components/common/breadcrumb/Breadcrumb.svelte.d.ts +8 -23
  412. package/package/components/common/button/Button.svelte +1 -1
  413. package/package/components/common/button/model.js +1 -1
  414. package/package/components/common/calendarPicker/CalendarPicker.svelte.d.ts +1 -1
  415. package/package/components/common/confirmationModal/ConfirmationModal.svelte +2 -1
  416. package/package/components/common/confirmationModal/ConfirmationModal.svelte.d.ts +1 -0
  417. package/package/components/common/drawer/Drawer.svelte +4 -1
  418. package/package/components/common/drawer/DrawerContent.svelte +7 -4
  419. package/package/components/common/drawer/DrawerContent.svelte.d.ts +1 -0
  420. package/package/components/common/languageIcons/TypeScript.svelte +5 -3
  421. package/package/components/common/languageIcons/TypeScript.svelte.d.ts +1 -0
  422. package/package/components/common/modal/Modal.svelte +3 -3
  423. package/package/components/common/modal/Modal2.svelte +1 -0
  424. package/package/components/common/seconds/SecondsInput.svelte +158 -67
  425. package/package/components/common/seconds/SecondsInput.svelte.d.ts +9 -21
  426. package/package/components/common/sidebar/SidebarNavigation.svelte +50 -0
  427. package/package/components/common/sidebar/SidebarNavigation.svelte.d.ts +25 -0
  428. package/package/components/common/table/AppRow.svelte +7 -7
  429. package/package/components/common/table/AppRow.svelte.d.ts +2 -2
  430. package/package/components/common/table/FlowRow.svelte +12 -12
  431. package/package/components/common/table/FlowRow.svelte.d.ts +2 -2
  432. package/package/components/common/table/RawAppRow.svelte +5 -79
  433. package/package/components/common/table/RawAppRow.svelte.d.ts +2 -23
  434. package/package/components/common/table/Row.svelte +11 -21
  435. package/package/components/common/table/Row.svelte.d.ts +3 -21
  436. package/package/components/common/table/RowIcon.svelte +6 -2
  437. package/package/components/common/table/RowIcon.svelte.d.ts +1 -1
  438. package/package/components/common/table/ScriptRow.svelte +8 -8
  439. package/package/components/common/table/ScriptRow.svelte.d.ts +2 -2
  440. package/package/components/common/toggleButton-v2/ToggleButtonGroup.svelte +1 -1
  441. package/package/components/common/toggleButton-v2/ToggleButtonGroup.svelte.d.ts +1 -1
  442. package/package/components/copilot/TestAIKey.svelte +1 -1
  443. package/package/components/copilot/autocomplete/Autocompletor.d.ts +1 -1
  444. package/package/components/copilot/autocomplete/Autocompletor.js +7 -6
  445. package/package/components/copilot/autocomplete/request.js +13 -9
  446. package/package/components/copilot/chat/AIButtonStyle.d.ts +1 -1
  447. package/package/components/copilot/chat/AIButtonStyle.js +2 -1
  448. package/package/components/copilot/chat/AIChat.svelte +3 -1
  449. package/package/components/copilot/chat/AIChatDisplay.svelte +89 -4
  450. package/package/components/copilot/chat/AIChatInput.svelte +291 -5
  451. package/package/components/copilot/chat/AIChatManager.svelte.js +122 -18
  452. package/package/components/copilot/chat/AiChatLayout.svelte +15 -30
  453. package/package/components/copilot/chat/AppAvailableContextList.svelte +263 -0
  454. package/package/components/copilot/chat/AppAvailableContextList.svelte.d.ts +13 -0
  455. package/package/components/copilot/chat/AvailableContextList.svelte +215 -12
  456. package/package/components/copilot/chat/AvailableContextList.svelte.d.ts +1 -0
  457. package/package/components/copilot/chat/ContextElementBadge.svelte +44 -0
  458. package/package/components/copilot/chat/ContextTextarea.svelte +15 -2
  459. package/package/components/copilot/chat/DatatableCreationPolicy.svelte +32 -33
  460. package/package/components/copilot/chat/ProviderModelSelector.svelte +1 -1
  461. package/package/components/copilot/chat/__tests__/app/appEvalHelpers.js +3 -0
  462. package/package/components/copilot/chat/__tests__/app/variants/streamlined.js +1 -1
  463. package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.js +4 -0
  464. package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.js +4 -2
  465. package/package/components/copilot/chat/app/core.d.ts +56 -15
  466. package/package/components/copilot/chat/app/core.js +148 -108
  467. package/package/components/copilot/chat/context.js +9 -2
  468. package/package/components/copilot/chat/flow/FlowAIChat.svelte +22 -0
  469. package/package/components/copilot/chat/flow/core.d.ts +3 -1
  470. package/package/components/copilot/chat/flow/core.js +221 -62
  471. package/package/components/copilot/chat/flow/openFlow.json +1 -1
  472. package/package/components/copilot/chat/flow/openFlowZod.d.ts +3 -2
  473. package/package/components/copilot/chat/flow/openFlowZod.js +16 -6
  474. package/package/components/copilot/chat/navigator/core.d.ts +2 -2
  475. package/package/components/copilot/chat/navigator/core.js +11 -2
  476. package/package/components/copilot/chat/script/core.d.ts +4 -1
  477. package/package/components/copilot/chat/script/core.js +46 -6
  478. package/package/components/copilot/chat/shared.d.ts +63 -1
  479. package/package/components/copilot/chat/shared.js +251 -1
  480. package/package/components/copilot/lib.d.ts +1 -1
  481. package/package/components/copilot/lib.js +44 -9
  482. package/package/components/copilot/utils.d.ts +5 -0
  483. package/package/components/copilot/utils.js +8 -0
  484. package/package/components/custom_ui.d.ts +2 -0
  485. package/package/components/dbOps.d.ts +18 -4
  486. package/package/components/dbOps.js +25 -3
  487. package/package/components/debug/DebugConsole.svelte +277 -0
  488. package/package/components/debug/DebugConsole.svelte.d.ts +13 -0
  489. package/package/components/debug/DebugPanel.svelte +97 -0
  490. package/package/components/debug/DebugPanel.svelte.d.ts +11 -0
  491. package/package/components/debug/DebugToolbar.svelte +148 -0
  492. package/package/components/debug/DebugToolbar.svelte.d.ts +17 -0
  493. package/package/components/debug/DebugVariableViewer.svelte +115 -0
  494. package/package/components/debug/DebugVariableViewer.svelte.d.ts +11 -0
  495. package/package/components/debug/MonacoDebugger.svelte +384 -0
  496. package/package/components/debug/MonacoDebugger.svelte.d.ts +15 -0
  497. package/package/components/debug/dapClient.d.ts +192 -0
  498. package/package/components/debug/dapClient.js +426 -0
  499. package/package/components/debug/debugUtils.d.ts +30 -0
  500. package/package/components/debug/debugUtils.js +131 -0
  501. package/package/components/debug/index.d.ts +75 -0
  502. package/package/components/debug/index.js +82 -0
  503. package/package/components/dedicated_worker.d.ts +7 -0
  504. package/package/components/dedicated_worker.js +36 -0
  505. package/package/components/details/DetailPageHeader.svelte +11 -12
  506. package/package/components/details/DetailPageHeader.svelte.d.ts +3 -1
  507. package/package/components/details/DetailPageLayout.svelte +11 -2
  508. package/package/components/details/DetailPageLayout.svelte.d.ts +1 -0
  509. package/package/components/details/createAppFromScript.d.ts +136 -16
  510. package/package/components/details/createAppFromScript.js +13 -12
  511. package/package/components/diffEditorTypes.d.ts +6 -0
  512. package/package/components/diffEditorTypes.js +1 -0
  513. package/package/components/flows/CreateActionsApp.svelte +32 -80
  514. package/package/components/flows/CreateActionsFlow.svelte +28 -28
  515. package/package/components/flows/DebounceLimit.svelte.d.ts +1 -1
  516. package/package/components/flows/FlowAssetsHandler.svelte +1 -4
  517. package/package/components/flows/FlowHistoryInner.svelte +15 -4
  518. package/package/components/flows/FlowProgressBar.svelte +37 -1
  519. package/package/components/flows/FlowProgressBar.svelte.d.ts +3 -0
  520. package/package/components/flows/agentToolUtils.d.ts +18 -0
  521. package/package/components/flows/agentToolUtils.js +47 -0
  522. package/package/components/flows/common/FlowCardHeader.svelte +8 -9
  523. package/package/components/flows/content/AgentToolWrapper.svelte +1 -1
  524. package/package/components/flows/content/FlowEditorDrawer.svelte +124 -0
  525. package/package/components/{schema/SchemaPicker.svelte.d.ts → flows/content/FlowEditorDrawer.svelte.d.ts} +8 -13
  526. package/package/components/flows/content/FlowEnvironmentVariables.svelte +3 -2
  527. package/package/components/flows/content/FlowInput.svelte +211 -37
  528. package/package/components/flows/content/FlowLoop.svelte +3 -4
  529. package/package/components/flows/content/FlowModuleCache.svelte +1 -3
  530. package/package/components/flows/content/FlowModuleComponent.svelte +571 -69
  531. package/package/components/flows/content/FlowModuleEarlyStop.svelte +8 -10
  532. package/package/components/flows/content/FlowModuleHeader.svelte +7 -4
  533. package/package/components/flows/content/FlowModuleSleep.svelte +1 -1
  534. package/package/components/flows/content/FlowModuleWorkerTagSelect.svelte +1 -1
  535. package/package/components/flows/content/FlowResult.svelte +77 -25
  536. package/package/components/flows/content/FlowRetries.svelte +1 -1
  537. package/package/components/flows/content/FlowSettings.svelte +4 -7
  538. package/package/components/flows/content/McpOAuthConnect.svelte +217 -0
  539. package/package/components/flows/content/McpOAuthConnect.svelte.d.ts +7 -0
  540. package/package/components/flows/content/McpToolEditor.svelte +50 -37
  541. package/package/components/flows/content/McpToolEditor.svelte.d.ts +0 -1
  542. package/package/components/flows/conversations/FlowChat.svelte +16 -2
  543. package/package/components/flows/conversations/FlowChat.svelte.d.ts +2 -1
  544. package/package/components/flows/conversations/FlowChatInterface.svelte +103 -6
  545. package/package/components/flows/conversations/FlowChatInterface.svelte.d.ts +2 -0
  546. package/package/components/flows/conversations/FlowChatManager.svelte.js +53 -21
  547. package/package/components/flows/conversations/FlowConversationsSidebar.svelte +79 -77
  548. package/package/components/flows/flowState.js +6 -0
  549. package/package/components/flows/flowStateUtils.svelte.js +4 -1
  550. package/package/components/flows/flowStore.svelte.d.ts +1 -1
  551. package/package/components/flows/flowStore.svelte.js +4 -2
  552. package/package/components/flows/header/FlowImportExportMenu.svelte +1 -1
  553. package/package/components/flows/header/FlowPreviewButtons.svelte +2 -1
  554. package/package/components/flows/header/FlowYamlEditor.svelte +2 -2
  555. package/package/components/flows/map/FlowModuleSchemaMap.svelte +12 -6
  556. package/package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +2 -2
  557. package/package/components/flows/map/InsertModuleInner.svelte +7 -0
  558. package/package/components/flows/map/InsertModuleInner.svelte.d.ts +1 -0
  559. package/package/components/flows/missingInputWarnings.js +7 -0
  560. package/package/components/flows/pickers/PickHubScriptQuick.svelte +4 -4
  561. package/package/components/flows/propPicker/OutputPicker.svelte +1 -1
  562. package/package/components/flows/propPicker/OutputPickerInner.svelte.d.ts +1 -1
  563. package/package/components/flows/propPicker/PropPickerWrapper.svelte +9 -10
  564. package/package/components/flows/propPicker/PropPickerWrapper.svelte.d.ts +3 -3
  565. package/package/components/flows/scheduleUtils.js +2 -2
  566. package/package/components/flows/types.d.ts +3 -3
  567. package/package/components/flows/utils.svelte.js +5 -1
  568. package/package/components/git_sync/GitSyncRepositoryCard.svelte +33 -23
  569. package/package/components/git_sync/GitSyncSection.svelte +24 -27
  570. package/package/components/graph/FlowGraphV2.svelte +8 -2
  571. package/package/components/graph/graphBuilder.svelte.d.ts +3 -1
  572. package/package/components/graph/model.d.ts +1 -1
  573. package/package/components/graph/renderers/nodes/AIToolNode.svelte +3 -1
  574. package/package/components/graph/renderers/nodes/AssetNode.svelte +25 -13
  575. package/package/components/graph/renderers/nodes/AssetsOverflowedNode.svelte +1 -1
  576. package/package/components/graph/renderers/nodes/NewAIToolNode.svelte +8 -0
  577. package/package/components/graph/renderers/triggers/TriggersBadge.svelte +44 -24
  578. package/package/components/home/Item.svelte +9 -15
  579. package/package/components/home/Item.svelte.d.ts +8 -7
  580. package/package/components/home/ItemsList.svelte +11 -16
  581. package/package/components/home/ItemsList.svelte.d.ts +1 -0
  582. package/package/components/home/TutorialBanner.svelte +34 -18
  583. package/package/components/home/treeViewUtils.js +1 -1
  584. package/package/components/icons/CssIcon.svelte +20 -0
  585. package/package/components/icons/CssIcon.svelte.d.ts +7 -25
  586. package/package/components/icons/GoogleCalendarIcon.svelte +41 -0
  587. package/package/components/icons/GoogleCalendarIcon.svelte.d.ts +7 -0
  588. package/package/components/icons/GoogleDriveIcon.svelte +30 -0
  589. package/package/components/icons/GoogleDriveIcon.svelte.d.ts +7 -0
  590. package/package/components/icons/GoogleIcon.svelte +15 -6
  591. package/package/components/icons/GoogleIcon.svelte.d.ts +5 -2
  592. package/package/components/icons/HtmlIcon.svelte +20 -0
  593. package/package/components/icons/HtmlIcon.svelte.d.ts +8 -0
  594. package/package/components/icons/JavaScriptIcon.svelte +10 -2
  595. package/package/components/icons/JavaScriptIcon.svelte.d.ts +1 -0
  596. package/package/components/icons/JsonIcon.svelte +8 -2
  597. package/package/components/icons/JsonIcon.svelte.d.ts +1 -0
  598. package/package/components/icons/LessIcon.svelte +16 -0
  599. package/package/components/icons/LessIcon.svelte.d.ts +8 -0
  600. package/package/components/icons/MSSqlServerIcon.svelte +111 -47
  601. package/package/components/icons/MarkdownIcon.svelte +20 -0
  602. package/package/components/icons/MarkdownIcon.svelte.d.ts +8 -0
  603. package/package/components/icons/NextcloudIcon.svelte +3 -2
  604. package/package/components/icons/NextcloudIcon.svelte.d.ts +2 -0
  605. package/package/components/icons/PocketIdIcon.svelte +9 -0
  606. package/package/components/icons/PocketIdIcon.svelte.d.ts +9 -0
  607. package/package/components/icons/ReactIcon.svelte +10 -2
  608. package/package/components/icons/ReactIcon.svelte.d.ts +1 -0
  609. package/package/components/icons/SassIcon.svelte +28 -0
  610. package/package/components/icons/SassIcon.svelte.d.ts +8 -0
  611. package/package/components/icons/SvelteIcon.svelte +10 -2
  612. package/package/components/icons/SvelteIcon.svelte.d.ts +1 -0
  613. package/package/components/icons/VueIcon.svelte +10 -2
  614. package/package/components/icons/VueIcon.svelte.d.ts +1 -0
  615. package/package/components/icons/YamlIcon.svelte +20 -0
  616. package/package/components/icons/YamlIcon.svelte.d.ts +8 -0
  617. package/package/components/icons/index.js +3 -1
  618. package/package/components/instanceSettings/IndexerJobIndexSettings.svelte +94 -0
  619. package/package/components/instanceSettings/IndexerJobIndexSettings.svelte.d.ts +9 -0
  620. package/package/components/instanceSettings/IndexerLogIndexSettings.svelte +67 -0
  621. package/package/components/instanceSettings/IndexerLogIndexSettings.svelte.d.ts +9 -0
  622. package/package/components/instanceSettings/IndexerMemorySettings.svelte +109 -0
  623. package/package/components/instanceSettings/IndexerMemorySettings.svelte.d.ts +9 -0
  624. package/package/components/instanceSettings/SecretBackendConfig.svelte +513 -0
  625. package/package/components/instanceSettings/SecretBackendConfig.svelte.d.ts +8 -0
  626. package/package/components/instanceSettings/SettingCard.svelte +47 -0
  627. package/package/components/instanceSettings/SettingCard.svelte.d.ts +19 -0
  628. package/package/components/instanceSettings/SettingsSearchInput.svelte +66 -0
  629. package/package/components/instanceSettings/SettingsSearchInput.svelte.d.ts +9 -0
  630. package/package/components/instanceSettings.d.ts +54 -1
  631. package/package/components/instanceSettings.js +444 -68
  632. package/package/components/jobs/JobPreview.svelte +46 -39
  633. package/package/components/jobs/JobPreview.svelte.d.ts +1 -0
  634. package/package/components/meltComponents/MenuItem.svelte +1 -0
  635. package/package/components/meltComponents/Popover.svelte +10 -1
  636. package/package/components/meltComponents/Popover.svelte.d.ts +2 -0
  637. package/package/components/meltComponents/Tooltip.svelte +2 -1
  638. package/package/components/meltComponents/Tooltip.svelte.d.ts +1 -0
  639. package/package/components/monacoLanguagesOptions.js +16 -15
  640. package/package/components/moveRenameManager.d.ts +21 -0
  641. package/package/components/moveRenameManager.js +61 -0
  642. package/package/components/progressBar/ProgressBar.svelte +69 -27
  643. package/package/components/progressBar/ProgressBar.svelte.d.ts +7 -0
  644. package/package/components/prop_picker.d.ts +0 -3
  645. package/package/components/propertyPicker/PropPicker.svelte +47 -48
  646. package/package/components/propertyPicker/PropPicker.svelte.d.ts +12 -9
  647. package/package/components/raw_apps/DefaultDatabaseSelector.svelte +9 -5
  648. package/package/components/raw_apps/FileEditorIcon.svelte +12 -7
  649. package/package/components/raw_apps/FileEditorIcon.svelte.d.ts +2 -0
  650. package/package/components/raw_apps/FileTreeNode.svelte +120 -83
  651. package/package/components/raw_apps/RawAppBackgroundRunner.svelte +91 -10
  652. package/package/components/raw_apps/RawAppDataTableDrawer.svelte +1 -3
  653. package/package/components/raw_apps/RawAppDataTableList.svelte +12 -9
  654. package/package/components/raw_apps/RawAppEditor.svelte +237 -83
  655. package/package/components/raw_apps/RawAppEditor.svelte.d.ts +4 -4
  656. package/package/components/raw_apps/RawAppEditorHeader.svelte +105 -22
  657. package/package/components/raw_apps/RawAppEditorHeader.svelte.d.ts +1 -1
  658. package/package/components/raw_apps/RawAppHistoryList.svelte +264 -80
  659. package/package/components/raw_apps/RawAppHistoryList.svelte.d.ts +1 -0
  660. package/package/components/raw_apps/RawAppHistoryManager.svelte.d.ts +15 -1
  661. package/package/components/raw_apps/RawAppHistoryManager.svelte.js +46 -12
  662. package/package/components/raw_apps/RawAppInlineScriptEditor.svelte +549 -47
  663. package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +32 -7
  664. package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte +66 -19
  665. package/package/components/raw_apps/RawAppInlineScriptPanelList.svelte.d.ts +1 -0
  666. package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +141 -10
  667. package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte.d.ts +8 -0
  668. package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte +2 -1
  669. package/package/components/raw_apps/RawAppInlineScriptsPanel.svelte.d.ts +9 -2
  670. package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +47 -3
  671. package/package/components/raw_apps/RawAppInputsSpecEditor.svelte.d.ts +2 -2
  672. package/package/components/raw_apps/RawAppModules.svelte +13 -7
  673. package/package/components/raw_apps/RawAppPreview.svelte +48 -6
  674. package/package/components/raw_apps/RawAppSidebar.svelte +52 -235
  675. package/package/components/raw_apps/RawAppSidebar.svelte.d.ts +2 -1
  676. package/package/components/raw_apps/RunnableRow.svelte +95 -0
  677. package/package/components/raw_apps/RunnableRow.svelte.d.ts +15 -0
  678. package/package/components/raw_apps/datatableUtils.svelte.js +1 -1
  679. package/package/components/raw_apps/utils.d.ts +1 -1
  680. package/package/components/raw_apps/utils.js +76 -18
  681. package/package/components/resources/resourcesFilter.d.ts +70 -0
  682. package/package/components/resources/resourcesFilter.js +61 -0
  683. package/package/components/runs/BatchReRunOptionsPane.svelte +130 -121
  684. package/package/components/runs/BatchReRunOptionsPane.svelte.d.ts +3 -2
  685. package/package/components/runs/FlowExecutionStatus.svelte +30 -0
  686. package/package/components/runs/FlowExecutionStatus.svelte.d.ts +15 -0
  687. package/package/components/runs/JobDetailFieldConfig.d.ts +47 -0
  688. package/package/components/runs/JobDetailFieldConfig.js +433 -0
  689. package/package/components/runs/JobDetailHeader.svelte +551 -0
  690. package/package/components/runs/JobDetailHeader.svelte.d.ts +17 -0
  691. package/package/components/runs/JobRunsPreview.svelte +174 -218
  692. package/package/components/runs/JobRunsPreview.svelte.d.ts +0 -1
  693. package/package/components/runs/JobStatusIcon.svelte +47 -0
  694. package/package/components/runs/JobStatusIcon.svelte.d.ts +9 -0
  695. package/package/components/runs/NoWorkerWithTagWarning.svelte +5 -1
  696. package/package/components/runs/RunBadges.svelte +39 -34
  697. package/package/components/runs/RunBadges.svelte.d.ts +2 -1
  698. package/package/components/runs/RunRow.svelte +24 -64
  699. package/package/components/runs/RunRow.svelte.d.ts +1 -2
  700. package/package/components/runs/RunsQueue.svelte.d.ts +1 -1
  701. package/package/components/runs/RunsTable.svelte +312 -131
  702. package/package/components/runs/RunsTable.svelte.d.ts +4 -3
  703. package/package/components/runs/TimeframeSelect.svelte +189 -0
  704. package/package/components/runs/TimeframeSelect.svelte.d.ts +44 -0
  705. package/package/components/runs/runsFilter.d.ts +201 -0
  706. package/package/components/runs/runsFilter.js +182 -0
  707. package/package/components/runs/useJobsLoader.svelte.d.ts +32 -0
  708. package/package/components/runs/useJobsLoader.svelte.js +504 -0
  709. package/package/components/schedules/schedulesFilter.d.ts +65 -0
  710. package/package/components/schedules/schedulesFilter.js +60 -0
  711. package/package/components/schema/EditableSchemaWrapper.svelte +45 -24
  712. package/package/components/schema/EditableSchemaWrapper.svelte.d.ts +1 -1
  713. package/package/components/schema/FlowPropertyEditor.svelte.d.ts +1 -1
  714. package/package/components/schema/PropertyEditor.svelte +1 -0
  715. package/package/components/schema/RunningJobSchemaPicker.svelte +1 -1
  716. package/package/components/schema/editable_schema_wrapper.d.ts +1 -0
  717. package/package/components/scriptEditor/LogPanel.svelte +17 -2
  718. package/package/components/scriptEditor/LogPanel.svelte.d.ts +2 -0
  719. package/package/components/scripts/CreateActionsScript.svelte +0 -1
  720. package/package/components/search/GlobalSearchModal.svelte +1 -8
  721. package/package/components/select/GenericDropdown.svelte +113 -0
  722. package/package/components/select/GenericDropdown.svelte.d.ts +37 -0
  723. package/package/components/select/MultiSelect.svelte +1 -1
  724. package/package/components/select/Select.svelte +17 -4
  725. package/package/components/select/Select.svelte.d.ts +2 -1
  726. package/package/components/select/SelectDropdown.svelte +76 -143
  727. package/package/components/select/SelectDropdown.svelte.d.ts +4 -1
  728. package/package/components/settings/AIPromptsModal.svelte +88 -0
  729. package/package/components/settings/AIPromptsModal.svelte.d.ts +11 -0
  730. package/package/components/settings/ChangeWorkspaceColor.svelte +11 -11
  731. package/package/components/settings/ChangeWorkspaceId.svelte +20 -17
  732. package/package/components/settings/ChangeWorkspaceName.svelte +13 -14
  733. package/package/components/settings/CreateToken.svelte +4 -4
  734. package/package/components/settings/PremiumInfo.svelte +268 -128
  735. package/package/components/settings/SettingsPageHeader.svelte +22 -0
  736. package/package/components/settings/SettingsPageHeader.svelte.d.ts +10 -0
  737. package/package/components/settings/UserAIPromptsSettings.svelte +56 -15
  738. package/package/components/settings/WorkspaceOperatorSettings.svelte +68 -85
  739. package/package/components/settings/WorkspaceUserSettings.svelte +543 -427
  740. package/package/components/sidebar/CriticalAlertModalInner.svelte +28 -22
  741. package/package/components/sidebar/CriticalAlertModalInner.svelte.d.ts +5 -20
  742. package/package/components/sidebar/DarkModeToggle.svelte +2 -2
  743. package/package/components/sidebar/FavoriteMenu.svelte +101 -20
  744. package/package/components/sidebar/FavoriteMenu.svelte.d.ts +29 -1
  745. package/package/components/sidebar/MenuButton.svelte +60 -27
  746. package/package/components/sidebar/MenuButton.svelte.d.ts +4 -0
  747. package/package/components/sidebar/MenuLink.svelte +4 -3
  748. package/package/components/sidebar/MultiplayerMenu.svelte +4 -4
  749. package/package/components/sidebar/OperatorMenu.svelte +66 -89
  750. package/package/components/sidebar/OperatorMenu.svelte.d.ts +6 -1
  751. package/package/components/sidebar/SidebarContent.svelte +42 -9
  752. package/package/components/sidebar/UserMenu.svelte +3 -3
  753. package/package/components/sidebar/WorkspaceMenu.svelte +37 -86
  754. package/package/components/sqlTypeService.js +4 -3
  755. package/package/components/table/AutoDataTable.svelte +2 -2
  756. package/package/components/table/DataTable.svelte +8 -3
  757. package/package/components/table/DataTable.svelte.d.ts +2 -0
  758. package/package/components/text_input/TextInput.svelte +3 -0
  759. package/package/components/text_input/TextInput.svelte.d.ts +2 -0
  760. package/package/components/toast.js +1 -2
  761. package/package/components/triggers/AddTriggersButton.svelte +28 -4
  762. package/package/components/triggers/TriggerFilters.svelte +71 -0
  763. package/package/components/triggers/TriggerFilters.svelte.d.ts +10 -0
  764. package/package/components/triggers/TriggersEditor.svelte +34 -10
  765. package/package/components/triggers/TriggersWrapper.svelte +24 -0
  766. package/package/components/triggers/http/RouteEditorInner.svelte +1 -1
  767. package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +7 -0
  768. package/package/components/triggers/kafka/utils.js +1 -0
  769. package/package/components/triggers/native/NativeTriggerEditor.svelte +384 -0
  770. package/package/components/triggers/native/NativeTriggerEditor.svelte.d.ts +26 -0
  771. package/package/components/triggers/native/NativeTriggerTable.svelte +171 -0
  772. package/package/components/triggers/native/NativeTriggerTable.svelte.d.ts +16 -0
  773. package/package/components/triggers/native/NativeTriggersPanel.svelte +40 -0
  774. package/package/components/triggers/native/NativeTriggersPanel.svelte.d.ts +15 -0
  775. package/package/components/triggers/native/services/google/GoogleCalendarPicker.svelte +112 -0
  776. package/package/components/triggers/native/services/google/GoogleCalendarPicker.svelte.d.ts +8 -0
  777. package/package/components/triggers/native/services/google/GoogleDrivePicker.svelte +323 -0
  778. package/package/components/triggers/native/services/google/GoogleDrivePicker.svelte.d.ts +8 -0
  779. package/package/components/triggers/native/services/google/GoogleTriggerForm.svelte +116 -0
  780. package/package/components/triggers/native/services/google/GoogleTriggerForm.svelte.d.ts +12 -0
  781. package/package/components/triggers/native/services/nextcloud/NextcloudTriggerForm.svelte +104 -0
  782. package/package/components/triggers/native/services/nextcloud/NextcloudTriggerForm.svelte.d.ts +18 -0
  783. package/package/components/triggers/native/utils.d.ts +73 -0
  784. package/package/components/triggers/native/utils.js +166 -0
  785. package/package/components/triggers/schedules/ScheduleEditorInner.svelte +3 -3
  786. package/package/components/triggers/triggers.svelte.d.ts +2 -1
  787. package/package/components/triggers/triggers.svelte.js +44 -8
  788. package/package/components/triggers/utils.js +46 -7
  789. package/package/components/triggers/websocket/WebsocketEditorConfigSection.svelte +1 -1
  790. package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +3 -81
  791. package/package/components/triggers.d.ts +1 -1
  792. package/package/components/tutorials/FlowBuilderLiveTutorial.svelte +6 -35
  793. package/package/components/tutorials/RunsTutorial.svelte +399 -0
  794. package/package/components/{flows/propPicker/FlowPropPicker.svelte.d.ts → tutorials/RunsTutorial.svelte.d.ts} +11 -8
  795. package/package/components/tutorials/TroubleshootFlowTutorial.svelte +5 -20
  796. package/package/components/tutorials/utils.d.ts +16 -0
  797. package/package/components/tutorials/utils.js +96 -0
  798. package/package/components/tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte +133 -0
  799. package/package/components/{SavedInputs.svelte.d.ts → tutorials/workspace/WorkspaceOnboardingOperatorTutorial.svelte.d.ts} +8 -11
  800. package/package/components/variables/variablesFilter.d.ts +56 -0
  801. package/package/components/variables/variablesFilter.js +51 -0
  802. package/package/components/vscode.js +6 -6
  803. package/package/components/waitJob.d.ts +1 -1
  804. package/package/components/waitJob.js +3 -2
  805. package/package/components/worker_group.d.ts +2 -0
  806. package/package/components/worker_group.js +15 -0
  807. package/package/components/workspace/WorkspaceCard.svelte +184 -0
  808. package/package/components/workspace/WorkspaceCard.svelte.d.ts +24 -0
  809. package/package/components/workspace/WorkspaceIcon.svelte +21 -0
  810. package/package/components/workspace/WorkspaceIcon.svelte.d.ts +9 -0
  811. package/package/components/workspace/WorkspaceTreeView.svelte +331 -0
  812. package/package/components/workspace/WorkspaceTreeView.svelte.d.ts +15 -0
  813. package/package/components/workspaceSettings/AISettings.svelte +149 -116
  814. package/package/components/workspaceSettings/AISettings.svelte.d.ts +2 -0
  815. package/package/components/workspaceSettings/CreateWorkspace.svelte +30 -16
  816. package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte +1 -0
  817. package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte +3 -1
  818. package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte.d.ts +1 -2
  819. package/package/components/workspaceSettings/DataTableSettings.svelte +29 -17
  820. package/package/components/workspaceSettings/DataTableSettings.svelte.d.ts +1 -0
  821. package/package/components/workspaceSettings/DucklakeSettings.svelte +75 -41
  822. package/package/components/workspaceSettings/DucklakeSettings.svelte.d.ts +3 -1
  823. package/package/components/workspaceSettings/GitSyncFilterSettings.svelte +24 -66
  824. package/package/components/workspaceSettings/ModelTokenLimits.svelte +18 -26
  825. package/package/components/workspaceSettings/OAuthClientConfig.svelte +151 -0
  826. package/package/components/workspaceSettings/OAuthClientConfig.svelte.d.ts +21 -0
  827. package/package/components/workspaceSettings/RulesetEditor.svelte +280 -0
  828. package/package/components/workspaceSettings/RulesetEditor.svelte.d.ts +9 -0
  829. package/package/components/workspaceSettings/SettingsFooter.svelte +35 -0
  830. package/package/components/workspaceSettings/SettingsFooter.svelte.d.ts +12 -0
  831. package/package/components/workspaceSettings/StorageSettings.svelte +322 -264
  832. package/package/components/workspaceSettings/StorageSettings.svelte.d.ts +2 -0
  833. package/package/components/workspaceSettings/WorkspaceDependenciesSettings.svelte +66 -27
  834. package/package/components/workspaceSettings/WorkspaceIntegrations.svelte +466 -0
  835. package/package/components/workspaceSettings/WorkspaceIntegrations.svelte.d.ts +3 -0
  836. package/package/components/workspaceSettings/WorkspaceRulesets.svelte +183 -0
  837. package/package/components/workspaceSettings/WorkspaceRulesets.svelte.d.ts +3 -0
  838. package/package/consts.js +4 -3
  839. package/package/editorLangUtils.d.ts +1 -1
  840. package/package/gen/core/OpenAPI.js +1 -1
  841. package/package/gen/schemas.gen.d.ts +1654 -215
  842. package/package/gen/schemas.gen.js +1987 -494
  843. package/package/gen/services.gen.d.ts +511 -59
  844. package/package/gen/services.gen.js +1064 -170
  845. package/package/gen/types.gen.d.ts +3687 -728
  846. package/package/hub.d.ts +1 -0
  847. package/package/hub.js +9 -2
  848. package/package/hubPaths.json +4 -2
  849. package/package/infer.d.ts +2 -0
  850. package/package/infer.js +2 -0
  851. package/package/logout.d.ts +0 -2
  852. package/package/logout.js +2 -23
  853. package/package/logoutKit.d.ts +2 -0
  854. package/package/logoutKit.js +26 -0
  855. package/package/mcpEndpointTools.d.ts +3 -0
  856. package/package/mcpEndpointTools.js +574 -147
  857. package/package/monaco_workers/graphql.worker.bundle.js +121 -121
  858. package/package/navigation.d.ts +1 -1
  859. package/package/rawAppWmillTs.d.ts +11 -0
  860. package/package/rawAppWmillTs.js +42 -4
  861. package/package/refreshUser.d.ts +5 -1
  862. package/package/refreshUser.js +20 -30
  863. package/package/scripts.d.ts +1 -1
  864. package/package/scripts.js +1 -1
  865. package/package/storeUtils.js +10 -0
  866. package/package/stores.d.ts +1 -1
  867. package/package/stores.js +4 -2
  868. package/package/svelte5Utils.svelte.d.ts +108 -1
  869. package/package/svelte5Utils.svelte.js +351 -2
  870. package/package/svelte5UtilsKit.svelte.d.ts +13 -0
  871. package/package/svelte5UtilsKit.svelte.js +106 -0
  872. package/package/system_prompts/prompts.d.ts +5 -5
  873. package/package/system_prompts/prompts.js +94 -21
  874. package/package/toast.d.ts +5 -1
  875. package/package/toast.js +14 -5
  876. package/package/tutorialUtils.js +0 -4
  877. package/package/tutorials/config.js +31 -3
  878. package/package/tutorials/roleUtils.d.ts +1 -1
  879. package/package/tutorials/roleUtils.js +6 -2
  880. package/package/utils.js +376 -8
  881. package/package/utils_deployable.d.ts +25 -25
  882. package/package/utils_deployable.js +2 -1
  883. package/package/validators/workspaceSettings.d.ts +12 -0
  884. package/package/validators/workspaceSettings.js +72 -0
  885. package/package/workspaceProtectionRules.svelte.d.ts +73 -0
  886. package/package/workspaceProtectionRules.svelte.js +176 -0
  887. package/package.json +8 -5
  888. package/package/components/DropdownSelect.svelte +0 -26
  889. package/package/components/DropdownSelect.svelte.d.ts +0 -11
  890. package/package/components/FlowPreviewResult.svelte +0 -88
  891. package/package/components/FlowPreviewResult.svelte.d.ts +0 -20
  892. package/package/components/SavedInputs.svelte +0 -416
  893. package/package/components/copilot/chat/context.d.ts +0 -62
  894. package/package/components/flows/propPicker/FlowPropPicker.svelte +0 -72
  895. package/package/components/runs/JobsLoader.svelte +0 -468
  896. package/package/components/runs/JobsLoader.svelte.d.ts +0 -49
  897. package/package/components/runs/ManuelDatePicker.svelte +0 -96
  898. package/package/components/runs/ManuelDatePicker.svelte.d.ts +0 -35
  899. package/package/components/runs/RunsBatchActionsDropdown.svelte +0 -82
  900. package/package/components/runs/RunsBatchActionsDropdown.svelte.d.ts +0 -15
  901. package/package/components/runs/RunsFilter.svelte +0 -954
  902. package/package/components/runs/RunsFilter.svelte.d.ts +0 -49
  903. package/package/components/schema/SchemaPicker.svelte +0 -92
@@ -1,19 +1,186 @@
1
1
  import { ScriptService, JobService } from '../../../../gen';
2
2
  import { z } from 'zod';
3
- import uFuzzy from '@leeoniya/ufuzzy';
4
- import { emptyString } from '../../../../utils';
5
3
  import { createDbSchemaTool, getFormattedResourceTypes, getLangContext, SUPPORTED_CHAT_SCRIPT_LANGUAGES } from '../script/core';
6
- import { createSearchHubScriptsTool, createToolDef, executeTestRun, buildSchemaForTool, buildTestRunArgs, buildContextString, applyCodePiecesToFlowModules, findModuleById, SPECIAL_MODULE_IDS } from '../shared';
4
+ import { createSearchHubScriptsTool, createToolDef, executeTestRun, buildSchemaForTool, buildTestRunArgs, buildContextString, applyCodePiecesToFlowModules, findModuleById, SPECIAL_MODULE_IDS, formatScriptLintResult, createSearchWorkspaceTool, createGetRunnableDetailsTool } from '../shared';
7
5
  import { inlineScriptStore, extractAndReplaceInlineScripts } from './inlineScriptsUtils';
8
6
  import { flowModulesSchema } from './openFlowZod';
9
7
  import { collectAllModuleIdsFromArray } from './utils';
10
8
  import { getFlowPrompt } from '../../../../system_prompts';
11
- const searchScriptsSchema = z.object({
12
- query: z
13
- .string()
14
- .describe('The query to search for, e.g. send email, list stripe invoices, etc..')
15
- });
16
- const searchScriptsToolDef = createToolDef(searchScriptsSchema, 'search_scripts', 'Search for scripts in the workspace. Returns array of {path, summary} objects.');
9
+ /**
10
+ * Navigate to a schema at a given path, handling arrays, objects, unions, and wrappers.
11
+ * Uses Zod 4 internal structure.
12
+ * @param schema The Zod schema to navigate
13
+ * @param path The path to navigate
14
+ * @param data Optional actual data to help resolve discriminated unions
15
+ */
16
+ function getSchemaAtPath(schema, path, data) {
17
+ let current = schema;
18
+ let currentData = data;
19
+ for (let i = 0; i < path.length; i++) {
20
+ const segment = path[i];
21
+ if (!current || !current._def)
22
+ return null;
23
+ let type = current._def.type;
24
+ // Unwrap optional/nullable/default/catch
25
+ while (['optional', 'nullable', 'default', 'catch'].includes(type)) {
26
+ current = current._def.innerType;
27
+ if (!current || !current._def)
28
+ return null;
29
+ type = current._def.type;
30
+ }
31
+ // Handle arrays
32
+ if (type === 'array') {
33
+ if (typeof segment === 'number') {
34
+ current = current._def.element;
35
+ if (currentData && Array.isArray(currentData)) {
36
+ currentData = currentData[segment];
37
+ }
38
+ continue;
39
+ }
40
+ // If segment is not a number, continue into element type
41
+ current = current._def.element;
42
+ i--;
43
+ continue;
44
+ }
45
+ // Handle objects
46
+ if (type === 'object') {
47
+ const shape = current._def.shape;
48
+ const key = String(segment);
49
+ if (shape && key in shape) {
50
+ current = shape[key];
51
+ if (currentData && typeof currentData === 'object') {
52
+ currentData = currentData[key];
53
+ }
54
+ continue;
55
+ }
56
+ return null;
57
+ }
58
+ // Handle discriminated unions (shows as 'union' in Zod 4)
59
+ if (type === 'union') {
60
+ const options = current._def.options;
61
+ if (options) {
62
+ // If we have data, try to find the correct union option based on discriminator
63
+ if (currentData && typeof currentData === 'object') {
64
+ // Check for common discriminator fields
65
+ const typeValue = currentData.type;
66
+ if (typeValue) {
67
+ // Find option that matches this type
68
+ for (const option of options) {
69
+ const optionShape = option._def?.shape;
70
+ const optionType = optionShape?.type?._def?.values?.[0];
71
+ if (optionType === typeValue) {
72
+ const remainingPath = path.slice(i);
73
+ const result = getSchemaAtPath(option, remainingPath, currentData);
74
+ if (result)
75
+ return result;
76
+ }
77
+ }
78
+ }
79
+ }
80
+ // Fallback: try to find a matching schema in any of the options
81
+ for (const option of options) {
82
+ const remainingPath = path.slice(i);
83
+ const result = getSchemaAtPath(option, remainingPath, currentData);
84
+ if (result)
85
+ return result;
86
+ }
87
+ }
88
+ return null;
89
+ }
90
+ // Handle record - any string key accesses the value type
91
+ if (type === 'record') {
92
+ current = current._def.valueType;
93
+ if (!current)
94
+ return null;
95
+ if (currentData && typeof currentData === 'object') {
96
+ currentData = currentData[segment];
97
+ }
98
+ continue;
99
+ }
100
+ return null;
101
+ }
102
+ return current;
103
+ }
104
+ /**
105
+ * Format a JSON Schema object into a concise human-readable string for error messages.
106
+ * Prioritizes structural information (object shapes, enums) over descriptions.
107
+ */
108
+ function formatJsonSchemaForError(jsonSchema) {
109
+ // For objects, show structure (more actionable than description)
110
+ if (jsonSchema.type === 'object' && jsonSchema.properties) {
111
+ const props = Object.entries(jsonSchema.properties)
112
+ .slice(0, 5) // Limit to 5 properties
113
+ .map(([k, v]) => {
114
+ // Include enum values for string properties if available
115
+ if (v.enum) {
116
+ return `${k}: ${v.enum.map((e) => JSON.stringify(e)).join('|')}`;
117
+ }
118
+ return `${k}: ${v.type || 'any'}`;
119
+ })
120
+ .join(', ');
121
+ const moreProps = Object.keys(jsonSchema.properties).length > 5
122
+ ? `, ... (${Object.keys(jsonSchema.properties).length - 5} more)`
123
+ : '';
124
+ const required = jsonSchema.required?.length
125
+ ? ` (required: ${jsonSchema.required.join(', ')})`
126
+ : '';
127
+ return `{ ${props}${moreProps} }${required}`;
128
+ }
129
+ if (jsonSchema.const !== undefined) {
130
+ return JSON.stringify(jsonSchema.const);
131
+ }
132
+ if (jsonSchema.enum) {
133
+ return `one of: ${jsonSchema.enum.map((v) => JSON.stringify(v)).join(', ')}`;
134
+ }
135
+ if (jsonSchema.oneOf) {
136
+ return jsonSchema.oneOf.map((s) => formatJsonSchemaForError(s)).join(' | ');
137
+ }
138
+ if (jsonSchema.anyOf) {
139
+ return jsonSchema.anyOf.map((s) => formatJsonSchemaForError(s)).join(' | ');
140
+ }
141
+ // Fall back to description for non-structural types
142
+ if (jsonSchema.description) {
143
+ return jsonSchema.description;
144
+ }
145
+ return jsonSchema.type || JSON.stringify(jsonSchema);
146
+ }
147
+ /**
148
+ * Extract a human-readable description of what a schema expects.
149
+ * For objects, prefers showing the actual structure over descriptions.
150
+ * For simpler types, uses description if available.
151
+ */
152
+ function getExpectedFormat(schema) {
153
+ if (!schema || !schema._def)
154
+ return null;
155
+ let current = schema;
156
+ // Unwrap optional/nullable to get inner type
157
+ while (current._def.type === 'optional' || current._def.type === 'nullable') {
158
+ current = current._def.innerType;
159
+ if (!current || !current._def)
160
+ break;
161
+ }
162
+ // Try JSON Schema representation first for objects (more actionable than descriptions)
163
+ try {
164
+ const jsonSchema = z.toJSONSchema(schema);
165
+ // Skip if it's just a schema with no useful info
166
+ if (Object.keys(jsonSchema).length <= 1 ||
167
+ (Object.keys(jsonSchema).length === 1 && jsonSchema.$schema)) {
168
+ return null;
169
+ }
170
+ const formatted = formatJsonSchemaForError(jsonSchema);
171
+ if (formatted && formatted !== 'unknown' && !formatted.startsWith('{')) {
172
+ return formatted;
173
+ }
174
+ // For objects, only return if it has meaningful properties
175
+ if (formatted && formatted.startsWith('{') && formatted !== '{ }') {
176
+ return formatted;
177
+ }
178
+ }
179
+ catch {
180
+ // Ignore errors from toJSONSchema
181
+ }
182
+ return null;
183
+ }
17
184
  const langSchema = z.enum(SUPPORTED_CHAT_SCRIPT_LANGUAGES);
18
185
  const resourceTypeToolSchema = z.object({
19
186
  query: z.string().describe('The query to search for, e.g. stripe, google, etc..'),
@@ -30,35 +197,6 @@ const setFlowJsonToolSchema = z.object({
30
197
  schema: z.string().optional().nullable().describe('JSON string containing the flow input schema')
31
198
  });
32
199
  const setFlowJsonToolDef = createToolDef(setFlowJsonToolSchema, 'set_flow_json', 'Set the entire flow by providing the complete flow object. This replaces all existing modules and schema.', { strict: false });
33
- class WorkspaceScriptsSearch {
34
- uf;
35
- workspace = undefined;
36
- scripts = undefined;
37
- constructor() {
38
- this.uf = new uFuzzy();
39
- }
40
- async init(workspace) {
41
- this.scripts = await ScriptService.listScripts({
42
- workspace
43
- });
44
- this.workspace = workspace;
45
- }
46
- async search(query, workspace) {
47
- if (this.scripts === undefined || this.workspace !== workspace) {
48
- await this.init(workspace);
49
- }
50
- const scripts = this.scripts;
51
- if (!scripts) {
52
- throw new Error('Failed to load scripts');
53
- }
54
- const results = this.uf.search(scripts.map((s) => (emptyString(s.summary) ? s.path : s.summary + ' (' + s.path + ')')), query.trim());
55
- const scriptResults = results[2]?.map((id) => ({
56
- path: scripts[id].path,
57
- summary: scripts[id].summary
58
- })) ?? [];
59
- return scriptResults;
60
- }
61
- }
62
200
  // Will be overridden by setSchema
63
201
  const testRunFlowSchema = z.object({
64
202
  args: z
@@ -86,28 +224,15 @@ const setModuleCodeSchema = z.object({
86
224
  code: z.string().describe('The full script code content')
87
225
  });
88
226
  const setModuleCodeToolDef = createToolDef(setModuleCodeSchema, 'set_module_code', 'Set or modify the code for an existing inline script module. Use this for quick code-only changes. The module must already exist in the flow.');
89
- const workspaceScriptsSearch = new WorkspaceScriptsSearch();
227
+ const getLintErrorsSchema = z.object({
228
+ module_id: z.string().describe('The ID of the module to get lint errors for.')
229
+ });
230
+ const getLintErrorsToolDef = createToolDef(getLintErrorsSchema, 'get_lint_errors', 'Get lint errors and warnings from a rawscript module. Pass module_id to focus a specific module and check its errors. ALWAYS call this for EACH module where you modified inline script code.');
90
231
  export const flowTools = [
91
232
  createSearchHubScriptsTool(false),
92
233
  createDbSchemaTool(),
93
- {
94
- def: searchScriptsToolDef,
95
- fn: async ({ args, workspace, toolId, toolCallbacks }) => {
96
- toolCallbacks.setToolStatus(toolId, {
97
- content: 'Searching for workspace scripts related to "' + args.query + '"...'
98
- });
99
- const parsedArgs = searchScriptsSchema.parse(args);
100
- const scriptResults = await workspaceScriptsSearch.search(parsedArgs.query, workspace);
101
- toolCallbacks.setToolStatus(toolId, {
102
- content: 'Found ' +
103
- scriptResults.length +
104
- ' scripts in the workspace related to "' +
105
- args.query +
106
- '"'
107
- });
108
- return JSON.stringify(scriptResults);
109
- }
110
- },
234
+ createSearchWorkspaceTool(),
235
+ createGetRunnableDetailsTool(),
111
236
  {
112
237
  def: resourceTypeToolDef,
113
238
  fn: async ({ args, toolId, workspace, toolCallbacks }) => {
@@ -351,7 +476,7 @@ export const flowTools = [
351
476
  if (parsedModules) {
352
477
  const result = flowModulesSchema.safeParse(parsedModules);
353
478
  if (!result.success) {
354
- const errors = result.error.errors.slice(0, 5).map((e) => {
479
+ const errors = result.error.issues.slice(0, 5).map((e) => {
355
480
  const path = e.path;
356
481
  // Try to find module id for better context
357
482
  const moduleIndex = typeof path[0] === 'number' ? path[0] : undefined;
@@ -359,7 +484,16 @@ export const flowTools = [
359
484
  const fieldPath = path.slice(1).join('.');
360
485
  let message = e.message;
361
486
  if (e.code === 'invalid_type') {
362
- message = `expected ${e.expected}, got ${e.received}`;
487
+ // Zod 4 message already contains "expected X, received Y"
488
+ // Try to extract expected format from schema, passing actual data
489
+ // to help resolve discriminated unions correctly
490
+ const targetSchema = getSchemaAtPath(flowModulesSchema, path, parsedModules);
491
+ if (targetSchema) {
492
+ const expectedFormat = getExpectedFormat(targetSchema);
493
+ if (expectedFormat) {
494
+ message += `\n Expected format: ${expectedFormat}`;
495
+ }
496
+ }
363
497
  }
364
498
  if (moduleId) {
365
499
  return `Module "${moduleId}" -> ${fieldPath}: ${message}`;
@@ -396,6 +530,23 @@ export const flowTools = [
396
530
  });
397
531
  return `Flow updated`;
398
532
  }
533
+ },
534
+ {
535
+ def: getLintErrorsToolDef,
536
+ fn: async ({ args, helpers, toolCallbacks, toolId }) => {
537
+ const parsedArgs = getLintErrorsSchema.parse(args);
538
+ toolCallbacks.setToolStatus(toolId, {
539
+ content: `Getting lint errors for module "${parsedArgs.module_id}"...`
540
+ });
541
+ const lintResult = await helpers.getLintErrors(parsedArgs.module_id);
542
+ const status = lintResult.errorCount > 0
543
+ ? `Found ${lintResult.errorCount} error(s)`
544
+ : lintResult.warningCount > 0
545
+ ? `Found ${lintResult.warningCount} warning(s)`
546
+ : 'No issues found';
547
+ toolCallbacks.setToolStatus(toolId, { content: status });
548
+ return formatScriptLintResult(lintResult);
549
+ }
399
550
  }
400
551
  ];
401
552
  export function prepareFlowSystemMessage(customPrompt) {
@@ -413,10 +564,15 @@ export function prepareFlowSystemMessage(customPrompt) {
413
564
  - **View existing inline script code** → \`inspect_inline_script\`
414
565
  - **Change module code only** → \`set_module_code\`
415
566
  - **Get language-specific coding instructions** → \`get_instructions_for_code_generation\` (call BEFORE writing code)
416
- - **Find workspace scripts** → \`search_scripts\`
567
+ - **Find workspace scripts and flows** → \`search_workspace\`
568
+ - **Get details of a specific script or flow** → \`get_runnable_details\`
417
569
  - **Find Windmill Hub scripts** → \`search_hub_scripts\`
418
570
 
419
- **Testing:**
571
+ **Testing & Linting:**
572
+ - **Check for lint errors after writing new code or modifying existing code** → \`get_lint_errors({ module_id: "..." })\`
573
+ - ALWAYS call this for EACH rawscript module that you added or modified
574
+ - Pass the module_id to get the lint errors for that module
575
+ - Example: After modifying modules "a" and "b", call \`get_lint_errors({ module_id: "a" })\` and \`get_lint_errors({ module_id: "b" })\`
420
576
  - **Test entire flow** → \`test_run_flow\`
421
577
  - **Test single step** → \`test_run_step\`
422
578
 
@@ -616,7 +772,8 @@ Example: Before writing TypeScript/Bun code, call \`get_instructions_for_code_ge
616
772
  ### Creating Flows
617
773
 
618
774
  1. **Search for existing scripts first** (unless user explicitly asks to write from scratch):
619
- - First: \`search_scripts\` to find workspace scripts
775
+ - First: \`search_workspace\` to find workspace scripts and flows
776
+ - Use \`get_runnable_details\` to inspect a specific script or flow (inputs, description, code)
620
777
  - Then: \`search_hub_scripts\` (only consider highly relevant results)
621
778
  - Only create raw scripts if no suitable script is found
622
779
 
@@ -626,6 +783,8 @@ Example: Before writing TypeScript/Bun code, call \`get_instructions_for_code_ge
626
783
  - **First call \`get_instructions_for_code_generation\` to get the correct code format**
627
784
  - Always define \`input_transforms\` to connect parameters to flow inputs or previous step results
628
785
 
786
+ 3. **After making code changes, ALWAYS use \`get_lint_errors\` to check for issues.** Fix any errors before proceeding with testing.
787
+
629
788
  ### AI Agent Modules
630
789
 
631
790
  AI agents can use tools to accomplish tasks. When creating an AI agent module:
@@ -1 +1 @@
1
- {"openapi":"3.0.3","info":{"version":"1.590.0","title":"OpenFlow Spec","contact":{"name":"Ruben Fiszel","email":"ruben@windmill.dev","url":"https://windmill.dev"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}},"paths":{},"externalDocs":{"description":"documentation portal","url":"https://windmill.dev"},"components":{"schemas":{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"number","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps","additionalProperties":{"type":"string"}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \"yellow\", \"#ffff00\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","description":"Custom error message shown when stopping"}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"}],"discriminator":{"propertyName":"type"}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type"}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable"]},"access_type":{"type":"string","description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"}]},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/InputTransform"},"output_type":{"$ref":"#/components/schemas/InputTransform"},"user_message":{"$ref":"#/components/schemas/InputTransform"},"system_prompt":{"$ref":"#/components/schemas/InputTransform"},"streaming":{"$ref":"#/components/schemas/InputTransform"},"messages_context_length":{"$ref":"#/components/schemas/InputTransform"},"output_schema":{"$ref":"#/components/schemas/InputTransform"},"user_images":{"$ref":"#/components/schemas/InputTransform"},"max_completion_tokens":{"$ref":"#/components/schemas/InputTransform"},"temperature":{"$ref":"#/components/schemas/InputTransform"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}}}
1
+ {"openapi":"3.0.3","info":{"version":"1.624.0","title":"OpenFlow Spec","contact":{"name":"Ruben Fiszel","email":"ruben@windmill.dev","url":"https://windmill.dev"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}},"paths":{},"externalDocs":{"description":"documentation portal","url":"https://windmill.dev"},"components":{"schemas":{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"number","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"debounce_args_to_accumulate":{"type":"array","description":"Arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"number","description":"Maximum total time in seconds that a job can be debounced"},"max_total_debounces_amount":{"type":"number","description":"Maximum number of times a job can be debounced"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps","additionalProperties":{"type":"string"}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \"yellow\", \"#ffff00\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","description":"Custom error message shown when stopping"}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type"}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"AiTransform":{"type":"object","description":"Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter.","properties":{"type":{"type":"string","enum":["ai"]}},"required":["type"]},"AIProviderKind":{"type":"string","description":"Supported AI provider types","enum":["openai","azure_openai","anthropic","mistral","deepseek","googleai","groq","openrouter","togetherai","customai","aws_bedrock"]},"ProviderConfig":{"type":"object","description":"Complete AI provider configuration with resource reference and model selection","properties":{"kind":{"$ref":"#/components/schemas/AIProviderKind"},"resource":{"type":"string","description":"Resource reference in format '$res:{resource_path}' pointing to provider credentials"},"model":{"type":"string","description":"Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro')"}},"required":["kind","resource","model"]},"StaticProviderTransform":{"type":"object","description":"Static provider configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/ProviderConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"ProviderTransform":{"description":"Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticProviderTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type"}},"MemoryOff":{"type":"object","description":"No conversation memory/context","properties":{"kind":{"type":"string","enum":["off"]}},"required":["kind"]},"MemoryAuto":{"type":"object","description":"Automatic context management","properties":{"kind":{"type":"string","enum":["auto"]},"context_length":{"type":"integer","description":"Maximum number of messages to retain in context"},"memory_id":{"type":"string","description":"Identifier for persistent memory across agent invocations"}},"required":["kind"]},"MemoryMessage":{"type":"object","description":"A single message in conversation history","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]},"MemoryManual":{"type":"object","description":"Explicit message history","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Conversation memory configuration","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind"}},"StaticMemoryTransform":{"type":"object","description":"Static memory configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/MemoryConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"MemoryTransform":{"description":"Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticMemoryTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type"}},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type"}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable"]},"access_type":{"type":"string","description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"},{"$ref":"#/components/schemas/WebsearchToolValue"}]},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"WebsearchToolValue":{"type":"object","description":"A tool implemented as a websearch tool. The AI can call this like any other websearch tool","properties":{"tool_type":{"type":"string","enum":["websearch"]}},"required":["tool_type"]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/ProviderTransform"},"output_type":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Output format type.\nValid values: 'text' (default) - plain text response, 'image' - image generation\n"},"user_message":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax."},"system_prompt":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"System instructions that guide the AI's behavior, persona, and response style. Optional."},"streaming":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Boolean. If true, stream the AI response incrementally.\nStreaming events include: token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"output_schema":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape.\nSupports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc.\nExample: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] }\n"},"user_images":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of image references for vision-capable models.\nFormat: Array<{ bucket: string, key: string }> - S3 object references\nExample: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }]\n"},"max_completion_tokens":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Integer. Maximum number of tokens the AI will generate in its response.\nRange: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases.\n"},"temperature":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Float. Controls randomness/creativity of responses.\nRange: 0.0 to 2.0 (provider-dependent)\n- 0.0 = deterministic, focused responses\n- 0.7 = balanced (common default)\n- 1.0+ = more creative/random\n"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"itered_len":{"type":"integer"},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}}}
@@ -1,3 +1,4 @@
1
- import { z } from "zod/v3";
1
+ import { z } from "zod";
2
+ export declare const flowModuleValueSchema: any;
2
3
  export declare const flowModuleSchema: any;
3
- export declare const flowModulesSchema: z.ZodArray<any, "many">;
4
+ export declare const flowModulesSchema: z.ZodArray<any>;