windmill-components 1.677.1 → 1.695.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.
- package/package/components/AppConnectInner.svelte +6 -0
- package/package/components/ArgInput.svelte +2 -0
- package/package/components/AutoscalingConfigEditor.svelte +18 -4
- package/package/components/CiTestResults.svelte +64 -0
- package/package/components/CiTestResults.svelte.d.ts +7 -0
- package/package/components/CompareWorkspaces.svelte +741 -484
- package/package/components/DBManager.svelte +35 -4
- package/package/components/DBManager.svelte.d.ts +2 -0
- package/package/components/DBManagerContent.svelte +3 -1
- package/package/components/DBManagerContent.svelte.d.ts +3 -0
- package/package/components/DBManagerDrawer.svelte +145 -3
- package/package/components/DBTableEditor.svelte +14 -4
- package/package/components/DatatablePicker.svelte +2 -5
- package/package/components/DatatableSchemaDiff.svelte +531 -0
- package/package/components/DatatableSchemaDiff.svelte.d.ts +29 -0
- package/package/components/DedicatedWorkersSelector.svelte +4 -2
- package/package/components/DefaultTagsInner.svelte +42 -2
- package/package/components/DeployWorkspaceDrawer.svelte +1 -1
- package/package/components/Dev.svelte +407 -74
- package/package/components/EditableSchemaForm.svelte +4 -0
- package/package/components/Editor.svelte +1 -1
- package/package/components/EditorBar.svelte +1 -1
- package/package/components/EditorBar.svelte.d.ts +1 -1
- package/package/components/ErrorOrRecoveryHandler.svelte +2 -2
- package/package/components/FlowPreviewContent.svelte +32 -30
- package/package/components/FlowRestartButton.svelte +143 -61
- package/package/components/FlowRestartButton.svelte.d.ts +37 -0
- package/package/components/FlowStatusViewer.svelte +15 -1
- package/package/components/FlowStatusViewer.svelte.d.ts +10 -2
- package/package/components/FlowStatusViewerInner.svelte +270 -222
- package/package/components/FlowStatusViewerInner.svelte.d.ts +6 -2
- package/package/components/FlowTimeline.svelte +1 -1
- package/package/components/FolderEditor.svelte +189 -4
- package/package/components/ForkConflictModal.svelte +57 -0
- package/package/components/ForkConflictModal.svelte.d.ts +3 -0
- package/package/components/ForkWorkspaceBanner.svelte +82 -11
- package/package/components/GitRepoViewer.svelte +251 -97
- package/package/components/GlobalUserOffboardingModal.svelte +293 -0
- package/package/components/GlobalUserOffboardingModal.svelte.d.ts +10 -0
- package/package/components/InputTransformSchemaForm.svelte +1 -1
- package/package/components/InstanceSettings.svelte +58 -19
- package/package/components/Login.svelte +133 -36
- package/package/components/Login.svelte.d.ts +1 -0
- package/package/components/ModuleTest.svelte +2 -1
- package/package/components/NoMainFuncBadge.svelte +1 -1
- package/package/components/OffboardItemsBox.svelte +56 -0
- package/package/components/OffboardItemsBox.svelte.d.ts +12 -0
- package/package/components/OffboardReassignControls.svelte +47 -0
- package/package/components/OffboardReassignControls.svelte.d.ts +20 -0
- package/package/components/OffboardWorkspaceSection.svelte +110 -0
- package/package/components/OffboardWorkspaceSection.svelte.d.ts +24 -0
- package/package/components/OnBehalfOfSelector.svelte +21 -3
- package/package/components/OnBehalfOfSelector.svelte.d.ts +7 -0
- package/package/components/Path.svelte +7 -1
- package/package/components/Path.svelte.d.ts +1 -1
- package/package/components/QueueAlerts.svelte +10 -10
- package/package/components/ResourcePicker.svelte +2 -2
- package/package/components/RunsPage.svelte +2 -1
- package/package/components/S3FilePickerInner.svelte +89 -89
- package/package/components/ScriptBuilder.svelte +52 -11
- package/package/components/ScriptEditor.svelte +19 -8
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/ShareModal.svelte +236 -98
- package/package/components/ShareModal.svelte.d.ts +1 -1
- package/package/components/SuperadminSettingsInner.svelte +362 -315
- package/package/components/UserOffboardingModal.svelte +238 -0
- package/package/components/UserOffboardingModal.svelte.d.ts +10 -0
- package/package/components/WorkspaceDeployLayout.svelte +3 -3
- package/package/components/WorkspaceDeployLayout.svelte.d.ts +1 -0
- package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +3 -0
- package/package/components/apps/components/helpers/executeRunnable.js +2 -1
- package/package/components/apps/editor/AppReportsDrawerInner.svelte +1 -1
- package/package/components/apps/editor/appPolicy.js +2 -1
- package/package/components/apps/editor/commonAppUtils.d.ts +3 -0
- package/package/components/apps/editor/inlineScriptsPanel/CacheTtlPopup.svelte +1 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +7 -0
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +4 -2
- package/package/components/apps/editor/inlineScriptsPanel/TagPopup.svelte +49 -0
- package/package/components/apps/editor/inlineScriptsPanel/TagPopup.svelte.d.ts +9 -0
- package/package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +12 -0
- package/package/components/apps/inputType.d.ts +1 -0
- package/package/components/apps/sharedTypes.d.ts +1 -0
- package/package/components/assets/AssetsDropdownButton.svelte +1 -1
- package/package/components/auditLogs/AuditLogsFilters.svelte +8 -3
- package/package/components/common/confirmationModal/ConfirmationModal.svelte +1 -1
- package/package/components/common/fileUpload/S3ArgInput.svelte +12 -10
- package/package/components/common/fileUpload/S3ArgInput.svelte.d.ts +2 -0
- package/package/components/common/table/AppRow.svelte +3 -3
- package/package/components/common/table/FlowRow.svelte +3 -3
- package/package/components/common/table/RawAppRow.svelte +4 -4
- package/package/components/common/table/Row.svelte +6 -2
- package/package/components/common/table/ScriptRow.svelte +11 -3
- package/package/components/copilot/chat/AIChatDisplay.svelte +5 -36
- package/package/components/copilot/chat/AIChatInput.svelte +56 -47
- package/package/components/copilot/chat/AIChatManager.svelte.js +50 -48
- package/package/components/copilot/chat/ContextElementBadge.svelte +6 -4
- package/package/components/copilot/chat/anthropic.d.ts +7 -1
- package/package/components/copilot/chat/anthropic.js +5 -2
- package/package/components/copilot/chat/app/core.d.ts +12 -20
- package/package/components/copilot/chat/app/core.js +230 -159
- package/package/components/copilot/chat/app/core.test.js +417 -0
- package/package/components/copilot/chat/chatLoop.d.ts +3 -0
- package/package/components/copilot/chat/chatLoop.js +13 -5
- package/package/components/copilot/chat/context.js +44 -0
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +57 -76
- package/package/components/copilot/chat/flow/core.d.ts +14 -3
- package/package/components/copilot/chat/flow/core.js +494 -116
- package/package/components/copilot/chat/flow/helperUtils.d.ts +22 -0
- package/package/components/copilot/chat/flow/helperUtils.js +100 -0
- package/package/components/copilot/chat/flow/helperUtils.test.js +231 -0
- package/package/components/copilot/chat/flow/inlineScriptsUtils.d.ts +5 -24
- package/package/components/copilot/chat/flow/inlineScriptsUtils.js +30 -55
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.gen.js +24 -0
- package/package/components/copilot/chat/flow/utils.test.js +59 -0
- package/package/components/copilot/chat/openai-responses.d.ts +7 -1
- package/package/components/copilot/chat/openai-responses.js +5 -2
- package/package/components/copilot/chat/script/core.js +3 -0
- package/package/components/copilot/chat/shared.d.ts +7 -2
- package/package/components/copilot/chat/shared.js +116 -53
- package/package/components/copilot/chat/shared.test.d.ts +1 -0
- package/package/components/copilot/chat/shared.test.js +412 -0
- package/package/components/copilot/chat/tokenUsage.d.ts +23 -0
- package/package/components/copilot/chat/tokenUsage.js +42 -0
- package/package/components/copilot/chat/workspaceTools.d.ts +7 -0
- package/package/components/copilot/chat/workspaceTools.js +239 -0
- package/package/components/copilot/chat/workspaceToolsZod.gen.d.ts +1295 -0
- package/package/components/copilot/chat/workspaceToolsZod.gen.js +424 -0
- package/package/components/copilot/lib.d.ts +5 -1
- package/package/components/copilot/lib.js +24 -6
- package/package/components/copilot/lib.test.d.ts +1 -0
- package/package/components/copilot/lib.test.js +19 -0
- package/package/components/copilot/modelConfig.d.ts +3 -0
- package/package/components/copilot/modelConfig.js +10 -0
- package/package/components/deploymentRequest/DeploymentRequestPanel.svelte +337 -0
- package/package/components/deploymentRequest/DeploymentRequestPanel.svelte.d.ts +15 -0
- package/package/components/details/CopyableCodeBlock.svelte +18 -8
- package/package/components/details/CopyableCodeBlock.svelte.d.ts +1 -0
- package/package/components/flows/FlowAssetsHandler.svelte +19 -21
- package/package/components/flows/FlowProgressBar.svelte +5 -2
- package/package/components/flows/agentToolTree.d.ts +17 -0
- package/package/components/flows/agentToolTree.js +114 -0
- package/package/components/flows/agentToolTree.test.d.ts +1 -0
- package/package/components/flows/agentToolTree.test.js +86 -0
- package/package/components/flows/agentToolUtils.d.ts +0 -5
- package/package/components/flows/agentToolUtils.js +0 -49
- package/package/components/flows/content/FlowLoop.svelte +7 -4
- package/package/components/flows/content/FlowModuleComponent.svelte +636 -599
- package/package/components/flows/content/FlowModuleDeleteAfterUse.svelte +15 -7
- package/package/components/flows/content/FlowSettings.svelte +29 -0
- package/package/components/flows/conversations/FlowChatManager.svelte.js +21 -10
- package/package/components/flows/dfs.d.ts +6 -2
- package/package/components/flows/dfs.js +19 -11
- package/package/components/flows/flowDeleteController.d.ts +32 -0
- package/package/components/flows/flowDeleteController.js +54 -0
- package/package/components/flows/flowDeleteController.test.d.ts +1 -0
- package/package/components/flows/flowDeleteController.test.js +121 -0
- package/package/components/flows/flowDeleteUtils.d.ts +48 -0
- package/package/components/flows/flowDeleteUtils.js +150 -0
- package/package/components/flows/flowDeleteUtils.test.d.ts +1 -0
- package/package/components/flows/flowDeleteUtils.test.js +131 -0
- package/package/components/flows/flowDiff.d.ts +2 -47
- package/package/components/flows/flowDiff.js +16 -293
- package/package/components/flows/flowDiff.testUtils.d.ts +8 -0
- package/package/components/flows/flowDiff.testUtils.js +26 -0
- package/package/components/flows/flowDiffManager.svelte.js +20 -75
- package/package/components/flows/flowDiffManager.svelte.test.js +103 -2
- package/package/components/flows/flowExplorer.d.ts +4 -0
- package/package/components/flows/flowExplorer.js +7 -30
- package/package/components/flows/flowState.d.ts +1 -0
- package/package/components/flows/flowStateUtils.svelte.js +11 -2
- package/package/components/flows/flowTree.d.ts +91 -0
- package/package/components/flows/flowTree.js +326 -0
- package/package/components/flows/flowTree.test.d.ts +1 -0
- package/package/components/flows/flowTree.test.js +236 -0
- package/package/components/flows/map/FlowJobsMenu.svelte +36 -30
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +1 -1
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +73 -229
- package/package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -2
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +2 -2
- package/package/components/flows/previousResults.js +13 -41
- package/package/components/flows/previousResults.test.d.ts +1 -0
- package/package/components/flows/previousResults.test.js +65 -0
- package/package/components/flows/propPicker/OutputPicker.svelte +2 -1
- package/package/components/flows/propPicker/OutputPickerInner.svelte +41 -4
- package/package/components/flows/propPicker/StepHistory.svelte +9 -1
- package/package/components/git_sync/GitSyncContext.svelte.js +11 -7
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +2 -29
- package/package/components/git_sync/PullWorkspaceModal.svelte +6 -7
- package/package/components/graph/FlowGraphV2.svelte +8 -4
- package/package/components/graph/FlowGraphV2.svelte.d.ts +2 -0
- package/package/components/graph/groupedModulesProxy.svelte.d.ts +10 -0
- package/package/components/graph/groupedModulesProxy.svelte.js +17 -1
- package/package/components/graph/renderers/triggers/TriggersBadge.svelte +8 -2
- package/package/components/home/HomeConnectDrawer.svelte +125 -0
- package/package/components/home/HomeConnectDrawer.svelte.d.ts +5 -0
- package/package/components/home/deploy_ui.js +1 -1
- package/package/components/icons/AzureIcon.svelte +12 -25
- package/package/components/icons/AzureIcon.svelte.d.ts +3 -2
- package/package/components/icons/GithubIcon.svelte +4 -4
- package/package/components/icons/GithubIcon.svelte.d.ts +5 -2
- package/package/components/instanceSettings/ExternalJwtTokens.svelte +85 -0
- package/package/components/instanceSettings/ExternalJwtTokens.svelte.d.ts +12 -0
- package/package/components/instanceSettings/GhesAppSettings.svelte +17 -0
- package/package/components/instanceSettings/IndexerMemorySettings.svelte +56 -29
- package/package/components/instanceSettings/SecretBackendConfig.svelte +9 -2
- package/package/components/instanceSettings.d.ts +1 -0
- package/package/components/instanceSettings.js +66 -8
- package/package/components/mcp/McpScopeSelector.svelte +119 -9
- package/package/components/mcp/McpScopeSelector.svelte.d.ts +1 -0
- package/package/components/offboarding-utils.d.ts +11 -0
- package/package/components/offboarding-utils.js +102 -0
- package/package/components/progressBar/ProgressBar.svelte +9 -5
- package/package/components/progressBar/ProgressBar.svelte.d.ts +1 -0
- package/package/components/raw_apps/DeleteAfterUsePopup.svelte +52 -0
- package/package/components/raw_apps/DeleteAfterUsePopup.svelte.d.ts +9 -0
- package/package/components/raw_apps/RawAppBackgroundRunner.svelte +5 -1
- package/package/components/raw_apps/RawAppDataTableDrawer.svelte +1 -1
- package/package/components/raw_apps/RawAppEditor.svelte +186 -102
- package/package/components/raw_apps/RawAppEditorHeader.svelte +6 -1
- package/package/components/raw_apps/RawAppEditorHeader.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte +9 -3
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +2 -1
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +1 -0
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +48 -5
- package/package/components/raw_apps/RawAppSharedUiDrawer.svelte +129 -0
- package/package/components/raw_apps/RawAppSharedUiDrawer.svelte.d.ts +5 -0
- package/package/components/raw_apps/RawAppSidebar.svelte +12 -0
- package/package/components/raw_apps/RawAppYamlEditor.svelte +81 -0
- package/package/components/raw_apps/RawAppYamlEditor.svelte.d.ts +20 -0
- package/package/components/raw_apps/dataTableRefUtils.d.ts +7 -0
- package/package/components/raw_apps/dataTableRefUtils.js +34 -0
- package/package/components/raw_apps/dataTableRefUtils.test.d.ts +1 -0
- package/package/components/raw_apps/dataTableRefUtils.test.js +29 -0
- package/package/components/raw_apps/datatableUtils.svelte.js +1 -1
- package/package/components/raw_apps/rawAppPolicy.d.ts +1 -0
- package/package/components/raw_apps/rawAppPolicy.js +17 -2
- package/package/components/resources/resourceTypesFilter.d.ts +19 -0
- package/package/components/resources/resourceTypesFilter.js +21 -0
- package/package/components/restartFromStepPath.d.ts +39 -0
- package/package/components/restartFromStepPath.js +89 -0
- package/package/components/runs/JobDetailFieldConfig.d.ts +1 -0
- package/package/components/runs/JobDetailFieldConfig.js +57 -10
- package/package/components/runs/JobDetailHeader.svelte +24 -3
- package/package/components/runs/runsFilter.d.ts +1 -1
- package/package/components/schema/FlowPropertyEditor.svelte +30 -1
- package/package/components/schema/FlowPropertyEditor.svelte.d.ts +5 -2
- package/package/components/script_builder.d.ts +1 -1
- package/package/components/search/GlobalSearchModal.svelte +8 -1
- package/package/components/select/Select.svelte +3 -2
- package/package/components/select/Select.svelte.d.ts +1 -0
- package/package/components/settings/CreateToken.svelte +91 -71
- package/package/components/settings/CreateToken.svelte.d.ts +3 -0
- package/package/components/settings/EditTokenScopesModal.svelte +57 -0
- package/package/components/settings/EditTokenScopesModal.svelte.d.ts +10 -0
- package/package/components/settings/ScopesPicker.svelte +43 -0
- package/package/components/settings/ScopesPicker.svelte.d.ts +11 -0
- package/package/components/settings/TokensTable.svelte +51 -15
- package/package/components/settings/WorkspaceUserSettings.svelte +34 -28
- package/package/components/sidebar/OperatorMenu.svelte +6 -0
- package/package/components/sidebar/SidebarContent.svelte +68 -2
- package/package/components/sidebar/WorkspaceMenu.svelte +8 -4
- package/package/components/triggers/AddTriggersButton.svelte +17 -0
- package/package/components/triggers/CaptureWrapper.svelte +19 -1
- package/package/components/triggers/PermissionedAsLine.svelte +37 -3
- package/package/components/triggers/PermissionedAsLine.svelte.d.ts +6 -0
- package/package/components/triggers/TriggerEditorToolbar.svelte.d.ts +1 -1
- package/package/components/triggers/TriggerModeToggle.svelte +36 -7
- package/package/components/triggers/TriggerModeToggle.svelte.d.ts +1 -1
- package/package/components/triggers/TriggerSuspendedJobsModal.svelte.d.ts +1 -1
- package/package/components/triggers/TriggersEditor.svelte +10 -2
- package/package/components/triggers/TriggersWrapper.svelte +20 -0
- package/package/components/triggers/azure/AzureCapture.svelte +41 -0
- package/package/components/triggers/azure/AzureCapture.svelte.d.ts +44 -0
- package/package/components/triggers/azure/AzureTriggerEditor.svelte +20 -0
- package/package/components/triggers/azure/AzureTriggerEditor.svelte.d.ts +9 -0
- package/package/components/triggers/azure/AzureTriggerEditorConfigSection.svelte +301 -0
- package/package/components/triggers/azure/AzureTriggerEditorConfigSection.svelte.d.ts +16 -0
- package/package/components/triggers/azure/AzureTriggerEditorInner.svelte +422 -0
- package/package/components/triggers/azure/AzureTriggerEditorInner.svelte.d.ts +25 -0
- package/package/components/triggers/azure/AzureTriggerPanel.svelte +55 -0
- package/package/components/triggers/azure/AzureTriggerPanel.svelte.d.ts +10 -0
- package/{dist/sharedUtils/components/triggers/kafka → package/components/triggers/azure}/utils.d.ts +1 -1
- package/package/components/triggers/azure/utils.js +56 -0
- package/package/components/triggers/email/EmailTriggerEditorInner.svelte +15 -11
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/http/RouteEditorConfigSection.svelte +15 -7
- package/package/components/triggers/http/RouteEditorInner.svelte +16 -14
- package/package/components/triggers/http/RoutesGenerator.svelte +6 -1
- package/package/components/triggers/http/RoutesPanel.svelte +1 -1
- package/package/components/triggers/http/utils.d.ts +1 -1
- package/package/components/triggers/http/utils.js +2 -2
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/mqtt/MqttTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/native/NativeTriggerEditor.svelte +3 -0
- package/package/components/triggers/native/services/github/GitHubTriggerForm.svelte +118 -0
- package/package/components/triggers/native/services/github/GitHubTriggerForm.svelte.d.ts +17 -0
- package/package/components/triggers/native/utils.js +14 -0
- package/package/components/triggers/nats/NatsTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/nats/NatsTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/postgres/PostgresTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/postgres/PostgresTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +22 -14
- package/package/components/triggers/sqs/SqsTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/sqs/SqsTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/triggers.svelte.d.ts +1 -0
- package/package/components/triggers/triggers.svelte.js +24 -1
- package/package/components/triggers/utils.js +47 -6
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +22 -14
- package/package/components/triggers.d.ts +1 -1
- package/package/components/useFolderDefaultPermissionedAs.svelte.d.ts +13 -0
- package/package/components/useFolderDefaultPermissionedAs.svelte.js +63 -0
- package/package/components/useNestedRestartState.svelte.d.ts +56 -0
- package/package/components/useNestedRestartState.svelte.js +320 -0
- package/package/components/workspaceSettings/CreateWorkspace.svelte +16 -677
- package/package/components/workspaceSettings/CreateWorkspaceInner.svelte +604 -0
- package/package/components/workspaceSettings/CreateWorkspaceInner.svelte.d.ts +7 -0
- package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte +27 -25
- package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte +46 -8
- package/package/components/workspaceSettings/DataTableSettings.svelte +27 -22
- package/package/components/workspaceSettings/DucklakeSettings.svelte +1 -1
- package/package/components/workspaceSettings/ForkDatatableSection.svelte +228 -0
- package/package/components/workspaceSettings/ForkDatatableSection.svelte.d.ts +28 -0
- package/package/components/workspaceSettings/GitSyncFilterSettings.svelte +8 -2
- package/package/components/workspaceSettings/RulesetEditor.svelte +27 -2
- package/package/components/workspaceSettings/SharedUiSettings.svelte +175 -0
- package/package/components/workspaceSettings/SharedUiSettings.svelte.d.ts +3 -0
- package/package/components/workspaceSettings/VolumeStorageSettings.svelte +1 -1
- package/package/components/workspaceSettings/WorkspaceIntegrations.svelte +17 -1
- package/package/consts.d.ts +3 -0
- package/package/consts.js +10 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +795 -59
- package/package/gen/schemas.gen.js +801 -60
- package/package/gen/services.gen.d.ts +475 -5
- package/package/gen/services.gen.js +976 -23
- package/package/gen/types.gen.d.ts +1865 -75
- package/package/githubApp.js +5 -1
- package/package/hubPaths.json +2 -8
- package/package/infer.d.ts +1 -1
- package/package/infer.js +50 -52
- package/package/infer.svelte.js +10 -1
- package/package/mcpEndpointTools.js +60 -4
- package/package/monaco_workers/sqlTypePlugin.worker.d.ts +10 -0
- package/package/monaco_workers/sqlTypePlugin.worker.js +39 -0
- package/package/script_helpers.d.ts +8 -2
- package/package/script_helpers.js +31 -0
- package/package/stores.d.ts +11 -0
- package/package/stores.js +6 -0
- package/package/system_prompts/index.d.ts +1 -0
- package/package/system_prompts/index.js +8 -0
- package/package/system_prompts/prompts.d.ts +17 -13
- package/package/system_prompts/prompts.js +921 -61
- package/package/templates/ci_test_bun.ts.template +27 -0
- package/package/templates/ci_test_python.py.template +26 -0
- package/package/utils/forkConflict.d.ts +26 -0
- package/package/utils/forkConflict.js +56 -0
- package/package/utils_deployable.d.ts +164 -121
- package/package/utils_deployable.js +61 -11
- package/package/utils_workspace_deploy.d.ts +8 -8
- package/package/utils_workspace_deploy.js +89 -421
- package/package.json +30 -6
- package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +0 -2
- package/dist/sharedUtils/base.d.ts +0 -1
- package/dist/sharedUtils/cloud.d.ts +0 -1
- package/dist/sharedUtils/common.d.ts +0 -111
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +0 -13
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +0 -11
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +0 -95
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +0 -6
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +0 -33
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +0 -10
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +0 -5371
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +0 -3
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +0 -14
- package/dist/sharedUtils/components/apps/inputType.d.ts +0 -178
- package/dist/sharedUtils/components/apps/rx.d.ts +0 -29
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +0 -21
- package/dist/sharedUtils/components/apps/types.d.ts +0 -274
- package/dist/sharedUtils/components/assets/lib.d.ts +0 -25
- package/dist/sharedUtils/components/common/alert/model.d.ts +0 -2
- package/dist/sharedUtils/components/common/badge/model.d.ts +0 -8
- package/dist/sharedUtils/components/common/button/model.d.ts +0 -45
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +0 -1
- package/dist/sharedUtils/components/common/index.d.ts +0 -24
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +0 -21
- package/dist/sharedUtils/components/dbTypes.d.ts +0 -14
- package/dist/sharedUtils/components/diff_drawer.d.ts +0 -26
- package/dist/sharedUtils/components/ducklake.d.ts +0 -1
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +0 -7
- package/dist/sharedUtils/components/icons/index.d.ts +0 -101
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +0 -1
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +0 -10
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +0 -15
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +0 -4
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +0 -11
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +0 -8
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +0 -32
- package/dist/sharedUtils/components/triggers/utils.d.ts +0 -80
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers.d.ts +0 -20
- package/dist/sharedUtils/gen/core/ApiError.d.ts +0 -10
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +0 -13
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +0 -7
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +0 -26
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +0 -27
- package/dist/sharedUtils/gen/core/request.d.ts +0 -29
- package/dist/sharedUtils/gen/index.d.ts +0 -6
- package/dist/sharedUtils/gen/schemas.gen.d.ts +0 -7036
- package/dist/sharedUtils/gen/services.gen.d.ts +0 -6047
- package/dist/sharedUtils/gen/types.gen.d.ts +0 -21881
- package/dist/sharedUtils/history.svelte.d.ts +0 -9
- package/dist/sharedUtils/hub.d.ts +0 -49
- package/dist/sharedUtils/jsr.json +0 -6
- package/dist/sharedUtils/lib.d.ts +0 -5
- package/dist/sharedUtils/lib.es.js +0 -1588
- package/dist/sharedUtils/package.json +0 -12
- package/dist/sharedUtils/schema.d.ts +0 -3
- package/dist/sharedUtils/stores.d.ts +0 -97
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +0 -80
- package/dist/sharedUtils/toast.d.ts +0 -8
- package/dist/sharedUtils/utils.d.ts +0 -265
- package/package/components/copilot/chat/__tests__/app/appChat.eval.test.js +0 -153
- package/package/components/copilot/chat/__tests__/app/appEvalComparison.d.ts +0 -21
- package/package/components/copilot/chat/__tests__/app/appEvalComparison.js +0 -136
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.js +0 -107
- package/package/components/copilot/chat/__tests__/app/appEvalRunner.d.ts +0 -50
- package/package/components/copilot/chat/__tests__/app/appEvalRunner.js +0 -93
- package/package/components/copilot/chat/__tests__/app/appFixtureLoader.d.ts +0 -29
- package/package/components/copilot/chat/__tests__/app/appFixtureLoader.js +0 -134
- package/package/components/copilot/chat/__tests__/app/appResultsWriter.d.ts +0 -30
- package/package/components/copilot/chat/__tests__/app/appResultsWriter.js +0 -197
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/main.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/main.js +0 -9
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/main.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/main.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/main.js +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/main.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/main.js +0 -25
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/main.d.ts +0 -7
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/main.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Breadcrumb.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Breadcrumb.tsx +0 -26
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileItem.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileItem.tsx +0 -79
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileList.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileList.tsx +0 -46
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FolderTree.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FolderTree.tsx +0 -56
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Toolbar.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Toolbar.tsx +0 -59
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/index.d.ts +0 -16
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/index.tsx +0 -119
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/main.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/main.js +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/main.d.ts +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/main.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/main.js +0 -41
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/main.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/Cart.d.ts +0 -9
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/Cart.tsx +0 -51
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductCard.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductCard.tsx +0 -27
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductList.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductList.tsx +0 -18
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/index.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/index.tsx +0 -81
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/main.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/main.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/frontend/index.d.ts +0 -2
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/frontend/index.tsx +0 -38
- package/package/components/copilot/chat/__tests__/app/variants/baseline.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/variants/baseline.js +0 -10
- package/package/components/copilot/chat/__tests__/app/variants/index.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/variants/index.js +0 -3
- package/package/components/copilot/chat/__tests__/app/variants/streamlined.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/variants/streamlined.js +0 -137
- package/package/components/copilot/chat/__tests__/flow/expected/test1.json +0 -134
- package/package/components/copilot/chat/__tests__/flow/expected/test2.json +0 -183
- package/package/components/copilot/chat/__tests__/flow/expected/test3.json +0 -204
- package/package/components/copilot/chat/__tests__/flow/expected/test4.json +0 -175
- package/package/components/copilot/chat/__tests__/flow/expected/test5_modify_simple.json +0 -68
- package/package/components/copilot/chat/__tests__/flow/expected/test6_modify_medium.json +0 -142
- package/package/components/copilot/chat/__tests__/flow/expected/test7_modify_complex.json +0 -136
- package/package/components/copilot/chat/__tests__/flow/flowChat.eval.test.js +0 -294
- package/package/components/copilot/chat/__tests__/flow/flowEvalComparison.d.ts +0 -17
- package/package/components/copilot/chat/__tests__/flow/flowEvalComparison.js +0 -49
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.js +0 -79
- package/package/components/copilot/chat/__tests__/flow/flowEvalRunner.d.ts +0 -50
- package/package/components/copilot/chat/__tests__/flow/flowEvalRunner.js +0 -102
- package/package/components/copilot/chat/__tests__/flow/initial/test5_initial.json +0 -53
- package/package/components/copilot/chat/__tests__/flow/initial/test6_initial.json +0 -68
- package/package/components/copilot/chat/__tests__/flow/initial/test7_initial.json +0 -120
- package/package/components/copilot/chat/__tests__/flow/variants/baseline.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/flow/variants/baseline.js +0 -10
- package/package/components/copilot/chat/__tests__/flow/variants/index.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/flow/variants/index.js +0 -3
- package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.js +0 -388
- package/package/components/copilot/chat/__tests__/shared/baseEvalRunner.d.ts +0 -45
- package/package/components/copilot/chat/__tests__/shared/baseEvalRunner.js +0 -121
- package/package/components/copilot/chat/__tests__/shared/baseLLMEvaluator.d.ts +0 -28
- package/package/components/copilot/chat/__tests__/shared/baseLLMEvaluator.js +0 -96
- package/package/components/copilot/chat/__tests__/shared/baseResultsWriter.d.ts +0 -32
- package/package/components/copilot/chat/__tests__/shared/baseResultsWriter.js +0 -130
- package/package/components/copilot/chat/__tests__/shared/baseVariants.d.ts +0 -45
- package/package/components/copilot/chat/__tests__/shared/baseVariants.js +0 -57
- package/package/components/copilot/chat/__tests__/shared/index.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/shared/index.js +0 -5
- package/package/components/copilot/chat/__tests__/shared/types.d.ts +0 -105
- package/package/components/copilot/chat/__tests__/shared/types.js +0 -9
- package/package/components/copilot/chat/flow/openFlowZod.js +0 -24
- package/package/components/copilot/chat/flow/utils.d.ts +0 -14
- package/package/components/copilot/chat/flow/utils.js +0 -108
- package/package/components/flows/agentToolUtils.test.js +0 -55
- /package/package/components/copilot/chat/{__tests__/app/appChat.eval.test.d.ts → app/core.test.d.ts} +0 -0
- /package/package/components/copilot/chat/{__tests__/flow/flowChat.eval.test.d.ts → flow/helperUtils.test.d.ts} +0 -0
- /package/package/components/copilot/chat/flow/{openFlowZod.d.ts → openFlowZod.gen.d.ts} +0 -0
- /package/package/components/{flows/agentToolUtils.test.d.ts → copilot/chat/flow/utils.test.d.ts} +0 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
// Auto-generated by generate.py - DO NOT EDIT
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export const scheduleRequestSchema = z.object({
|
|
4
|
+
"path": z.string().describe("The unique Windmill path for this schedule. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`."),
|
|
5
|
+
"schedule": z.string().describe("Cron expression with 6 fields (seconds, minutes, hours, day of month, month, day of week). Example '0 0 12 * * *' for daily at noon"),
|
|
6
|
+
"timezone": z.string().describe("IANA timezone for the schedule (e.g., 'UTC', 'Europe/Paris', 'America/New_York')"),
|
|
7
|
+
"script_path": z.string().describe("Path to the script or flow to execute when triggered"),
|
|
8
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
9
|
+
"args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow").nullable(),
|
|
10
|
+
"enabled": z.boolean().describe("Whether the schedule is currently active and will trigger jobs").optional(),
|
|
11
|
+
"on_failure": z.string().describe("Path to a script or flow to run when the scheduled job fails").nullable().optional(),
|
|
12
|
+
"on_failure_times": z.number().describe("Number of consecutive failures before the on_failure handler is triggered (default 1)").nullable().optional(),
|
|
13
|
+
"on_failure_exact": z.boolean().describe("If true, trigger on_failure handler only on exactly N failures, not on every failure after N").nullable().optional(),
|
|
14
|
+
"on_failure_extra_args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow").nullable().optional(),
|
|
15
|
+
"on_recovery": z.string().describe("Path to a script or flow to run when the schedule recovers after failures").nullable().optional(),
|
|
16
|
+
"on_recovery_times": z.number().describe("Number of consecutive successes before the on_recovery handler is triggered (default 1)").nullable().optional(),
|
|
17
|
+
"on_recovery_extra_args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow").nullable().optional(),
|
|
18
|
+
"on_success": z.string().describe("Path to a script or flow to run after each successful execution").nullable().optional(),
|
|
19
|
+
"on_success_extra_args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow").nullable().optional(),
|
|
20
|
+
"ws_error_handler_muted": z.boolean().describe("If true, the workspace-level error handler will not be triggered for this schedule's failures").optional(),
|
|
21
|
+
"retry": z.object({
|
|
22
|
+
"constant": z.object({
|
|
23
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
24
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
25
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
26
|
+
"exponential": z.object({
|
|
27
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
28
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
29
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
30
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
31
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
32
|
+
"retry_if": z.object({
|
|
33
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
34
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
35
|
+
}).describe("Retry configuration for failed module executions").nullable().optional(),
|
|
36
|
+
"no_flow_overlap": z.boolean().describe("If true, skip this schedule's execution if the previous run is still in progress (prevents concurrent runs)").optional(),
|
|
37
|
+
"summary": z.string().describe("Short summary describing the purpose of this schedule").nullable().optional(),
|
|
38
|
+
"description": z.string().describe("Detailed description of what this schedule does").nullable().optional(),
|
|
39
|
+
"tag": z.string().describe("Worker tag to route jobs to specific worker groups").nullable().optional(),
|
|
40
|
+
"paused_until": z.string().datetime({ offset: true }).describe("ISO 8601 datetime until which the schedule is paused. Schedule resumes automatically after this time").nullable().optional(),
|
|
41
|
+
"cron_version": z.string().describe("Cron parser version. Use 'v2' for extended syntax with additional features").nullable().optional(),
|
|
42
|
+
"dynamic_skip": z.string().describe("Path to a script that validates scheduled datetimes. Receives scheduled_for datetime and returns boolean to skip (true) or run (false)").nullable().optional(),
|
|
43
|
+
"permissioned_as": z.string().describe("The user or group this schedule runs as. Used during deployment to preserve the original schedule owner.").optional(),
|
|
44
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
45
|
+
"labels": z.array(z.string()).optional()
|
|
46
|
+
});
|
|
47
|
+
export const httpTriggerRequestSchema = z.object({
|
|
48
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
49
|
+
"script_path": z.string().describe("Path to the script or flow to execute when triggered"),
|
|
50
|
+
"route_path": z.string().describe("The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /."),
|
|
51
|
+
"workspaced_route": z.boolean().describe("If true, the route includes the workspace ID in the path").optional(),
|
|
52
|
+
"summary": z.string().describe("Short summary describing the purpose of this trigger").nullable().optional(),
|
|
53
|
+
"description": z.string().describe("Detailed description of what this trigger does").nullable().optional(),
|
|
54
|
+
"static_asset_config": z.object({
|
|
55
|
+
"s3": z.string().describe("S3 bucket path for static assets"),
|
|
56
|
+
"storage": z.string().describe("Storage path for static assets").optional(),
|
|
57
|
+
"filename": z.string().describe("Filename for the static asset").optional()
|
|
58
|
+
}).describe("Configuration for serving static assets (s3 bucket, storage path, filename)").nullable().optional(),
|
|
59
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
60
|
+
"http_method": z.enum(["get", "post", "put", "delete", "patch"]).describe("HTTP method (get, post, put, delete, patch) that triggers this endpoint"),
|
|
61
|
+
"authentication_resource_path": z.string().describe("Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods)").nullable().optional(),
|
|
62
|
+
"is_async": z.boolean().describe("Deprecated, use request_type instead").optional(),
|
|
63
|
+
"request_type": z.enum(["sync", "async", "sync_sse"]).describe("How the request is handled - 'sync' waits for result, 'async' returns job ID immediately, 'sync_sse' streams results via Server-Sent Events").optional(),
|
|
64
|
+
"authentication_method": z.enum(["none", "windmill", "api_key", "basic_http", "custom_script", "signature"]).describe("How requests are authenticated - 'none' (public), 'windmill' (Windmill token), 'api_key', 'basic_http', 'custom_script', 'signature'"),
|
|
65
|
+
"is_static_website": z.boolean().describe("If true, serves static files from S3/storage instead of running a script"),
|
|
66
|
+
"wrap_body": z.boolean().describe("If true, wraps the request body in a 'body' parameter").optional(),
|
|
67
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
68
|
+
"raw_string": z.boolean().describe("If true, passes the request body as a raw string instead of parsing as JSON").optional(),
|
|
69
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
70
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
71
|
+
"retry": z.object({
|
|
72
|
+
"constant": z.object({
|
|
73
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
74
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
75
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
76
|
+
"exponential": z.object({
|
|
77
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
78
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
79
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
80
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
81
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
82
|
+
"retry_if": z.object({
|
|
83
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
84
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
85
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
86
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
87
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
88
|
+
"labels": z.array(z.string()).optional()
|
|
89
|
+
});
|
|
90
|
+
export const websocketTriggerRequestSchema = z.object({
|
|
91
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
92
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
|
|
93
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
94
|
+
"url": z.string().describe("The WebSocket URL to connect to (can be a static URL or computed by a runnable)"),
|
|
95
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
96
|
+
"filters": z.array(z.object({
|
|
97
|
+
"key": z.string(),
|
|
98
|
+
"value": z.any()
|
|
99
|
+
})).describe("Array of key-value filters to match incoming messages (only matching messages trigger the script)"),
|
|
100
|
+
"filter_logic": z.enum(["and", "or"]).describe("Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match.").default("and").optional(),
|
|
101
|
+
"initial_messages": z.array(z.union([z.object({
|
|
102
|
+
"raw_message": z.string()
|
|
103
|
+
}), z.object({
|
|
104
|
+
"runnable_result": z.object({
|
|
105
|
+
"path": z.string(),
|
|
106
|
+
"args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow"),
|
|
107
|
+
"is_flow": z.boolean()
|
|
108
|
+
})
|
|
109
|
+
})])).describe("Messages to send immediately after connecting (can be raw strings or computed by runnables)").nullable().optional(),
|
|
110
|
+
"url_runnable_args": z.record(z.string(), z.any()).describe("Arguments to pass to the script/flow that computes the WebSocket URL").nullable().optional(),
|
|
111
|
+
"can_return_message": z.boolean().describe("If true, the script can return a message to send back through the WebSocket"),
|
|
112
|
+
"can_return_error_result": z.boolean().describe("If true, error results are sent back through the WebSocket"),
|
|
113
|
+
"heartbeat": z.object({
|
|
114
|
+
"interval_secs": z.number().int().gte(1).describe("Interval in seconds between heartbeat messages"),
|
|
115
|
+
"message": z.string().describe("Message to send as heartbeat. Use {{state}} as a placeholder for a value extracted from incoming messages (see state_field)."),
|
|
116
|
+
"state_field": z.string().describe("Optional. Top-level JSON field to extract from incoming messages. The extracted value replaces {{state}} in the heartbeat message.").optional()
|
|
117
|
+
}).describe("Optional periodic heartbeat message configuration").nullable().optional(),
|
|
118
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
119
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
120
|
+
"retry": z.object({
|
|
121
|
+
"constant": z.object({
|
|
122
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
123
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
124
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
125
|
+
"exponential": z.object({
|
|
126
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
127
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
128
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
129
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
130
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
131
|
+
"retry_if": z.object({
|
|
132
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
133
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
134
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
135
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
136
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
137
|
+
"labels": z.array(z.string()).optional()
|
|
138
|
+
});
|
|
139
|
+
export const kafkaTriggerRequestSchema = z.object({
|
|
140
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
141
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
|
|
142
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
143
|
+
"kafka_resource_path": z.string().describe("Path to the Kafka resource containing connection configuration"),
|
|
144
|
+
"group_id": z.string().describe("Kafka consumer group ID for this trigger"),
|
|
145
|
+
"topics": z.array(z.string()).describe("Array of Kafka topic names to subscribe to"),
|
|
146
|
+
"filters": z.array(z.object({
|
|
147
|
+
"key": z.string(),
|
|
148
|
+
"value": z.any()
|
|
149
|
+
})),
|
|
150
|
+
"filter_logic": z.enum(["and", "or"]).describe("Logic to apply when evaluating filters. 'and' requires all filters to match, 'or' requires any filter to match.").default("and").optional(),
|
|
151
|
+
"auto_offset_reset": z.enum(["latest", "earliest"]).describe("Initial offset behavior when consumer group has no committed offset.").default("latest").optional(),
|
|
152
|
+
"auto_commit": z.boolean().describe("When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint.").default(true).optional(),
|
|
153
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
154
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
155
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
156
|
+
"retry": z.object({
|
|
157
|
+
"constant": z.object({
|
|
158
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
159
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
160
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
161
|
+
"exponential": z.object({
|
|
162
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
163
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
164
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
165
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
166
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
167
|
+
"retry_if": z.object({
|
|
168
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
169
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
170
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
171
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
172
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
173
|
+
"labels": z.array(z.string()).optional()
|
|
174
|
+
});
|
|
175
|
+
export const natsTriggerRequestSchema = z.object({
|
|
176
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
177
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
|
|
178
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
179
|
+
"nats_resource_path": z.string().describe("Path to the NATS resource containing connection configuration"),
|
|
180
|
+
"use_jetstream": z.boolean().describe("If true, uses NATS JetStream for durable message delivery"),
|
|
181
|
+
"stream_name": z.string().describe("JetStream stream name (required when use_jetstream is true)").nullable().optional(),
|
|
182
|
+
"consumer_name": z.string().describe("JetStream consumer name (required when use_jetstream is true)").nullable().optional(),
|
|
183
|
+
"subjects": z.array(z.string()).describe("Array of NATS subjects to subscribe to"),
|
|
184
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
185
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
186
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
187
|
+
"retry": z.object({
|
|
188
|
+
"constant": z.object({
|
|
189
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
190
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
191
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
192
|
+
"exponential": z.object({
|
|
193
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
194
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
195
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
196
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
197
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
198
|
+
"retry_if": z.object({
|
|
199
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
200
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
201
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
202
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
203
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
204
|
+
"labels": z.array(z.string()).optional()
|
|
205
|
+
});
|
|
206
|
+
export const postgresTriggerRequestSchema = z.object({
|
|
207
|
+
"replication_slot_name": z.string().describe("Name of the PostgreSQL logical replication slot to use").optional(),
|
|
208
|
+
"publication_name": z.string().describe("Name of the PostgreSQL publication to subscribe to for change data capture").optional(),
|
|
209
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
210
|
+
"script_path": z.string().describe("Path to the script or flow to execute when database changes are detected"),
|
|
211
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
212
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
213
|
+
"postgres_resource_path": z.string().describe("Path to the PostgreSQL resource containing connection configuration"),
|
|
214
|
+
"publication": z.object({
|
|
215
|
+
"table_to_track": z.array(z.object({
|
|
216
|
+
"schema_name": z.string(),
|
|
217
|
+
"table_to_track": z.array(z.object({
|
|
218
|
+
"table_name": z.string(),
|
|
219
|
+
"columns_name": z.array(z.string()).optional(),
|
|
220
|
+
"where_clause": z.string().optional()
|
|
221
|
+
}))
|
|
222
|
+
})).optional(),
|
|
223
|
+
"transaction_to_track": z.array(z.string())
|
|
224
|
+
}).describe("Configuration for creating/managing the publication (tables, operations)").optional(),
|
|
225
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
226
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
227
|
+
"retry": z.object({
|
|
228
|
+
"constant": z.object({
|
|
229
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
230
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
231
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
232
|
+
"exponential": z.object({
|
|
233
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
234
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
235
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
236
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
237
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
238
|
+
"retry_if": z.object({
|
|
239
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
240
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
241
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
242
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
243
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
244
|
+
"labels": z.array(z.string()).optional()
|
|
245
|
+
});
|
|
246
|
+
export const mqttTriggerRequestSchema = z.object({
|
|
247
|
+
"mqtt_resource_path": z.string().describe("Path to the MQTT resource containing broker connection configuration"),
|
|
248
|
+
"subscribe_topics": z.array(z.object({
|
|
249
|
+
"qos": z.enum(["qos0", "qos1", "qos2"]),
|
|
250
|
+
"topic": z.string()
|
|
251
|
+
})).describe("Array of MQTT topics to subscribe to, each with topic name and QoS level"),
|
|
252
|
+
"client_id": z.string().describe("MQTT client ID for this connection").nullable().optional(),
|
|
253
|
+
"v3_config": z.object({
|
|
254
|
+
"clean_session": z.boolean().optional()
|
|
255
|
+
}).describe("MQTT v3 specific configuration (clean_session)").nullable().optional(),
|
|
256
|
+
"v5_config": z.object({
|
|
257
|
+
"clean_start": z.boolean().optional(),
|
|
258
|
+
"topic_alias_maximum": z.number().optional(),
|
|
259
|
+
"session_expiry_interval": z.number().optional()
|
|
260
|
+
}).describe("MQTT v5 specific configuration (clean_start, topic_alias_maximum, session_expiry_interval)").nullable().optional(),
|
|
261
|
+
"client_version": z.enum(["v3", "v5"]).describe("MQTT protocol version ('v3' or 'v5')").nullable().optional(),
|
|
262
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
263
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
|
|
264
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
265
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
266
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
267
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
268
|
+
"retry": z.object({
|
|
269
|
+
"constant": z.object({
|
|
270
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
271
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
272
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
273
|
+
"exponential": z.object({
|
|
274
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
275
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
276
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
277
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
278
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
279
|
+
"retry_if": z.object({
|
|
280
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
281
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
282
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
283
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
284
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
285
|
+
"labels": z.array(z.string()).optional()
|
|
286
|
+
});
|
|
287
|
+
export const sqsTriggerRequestSchema = z.object({
|
|
288
|
+
"queue_url": z.string().describe("The full URL of the AWS SQS queue to poll for messages"),
|
|
289
|
+
"aws_auth_resource_type": z.enum(["oidc", "credentials"]).describe("Authentication type - 'credentials' for access key/secret, 'oidc' for OpenID Connect"),
|
|
290
|
+
"aws_resource_path": z.string().describe("Path to the AWS resource containing credentials or OIDC configuration"),
|
|
291
|
+
"message_attributes": z.array(z.string()).describe("Array of SQS message attribute names to include with each message").nullable().optional(),
|
|
292
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
293
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
|
|
294
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
|
|
295
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
296
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
|
|
297
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
|
|
298
|
+
"retry": z.object({
|
|
299
|
+
"constant": z.object({
|
|
300
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
301
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
302
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
303
|
+
"exponential": z.object({
|
|
304
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
305
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
306
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
307
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
308
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
309
|
+
"retry_if": z.object({
|
|
310
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
311
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
312
|
+
}).describe("Retry configuration for failed executions").optional(),
|
|
313
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
314
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
315
|
+
"labels": z.array(z.string()).optional()
|
|
316
|
+
});
|
|
317
|
+
export const gcpTriggerRequestSchema = z.object({
|
|
318
|
+
"gcp_resource_path": z.string().describe("Path to the GCP resource containing service account credentials for authentication."),
|
|
319
|
+
"subscription_mode": z.enum(["existing", "create_update"]).describe("The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription."),
|
|
320
|
+
"topic_id": z.string().describe("Google Cloud Pub/Sub topic ID to subscribe to."),
|
|
321
|
+
"subscription_id": z.string().describe("Google Cloud Pub/Sub subscription ID.").optional(),
|
|
322
|
+
"base_endpoint": z.string().describe("Base URL for push delivery endpoint.").optional(),
|
|
323
|
+
"delivery_type": z.enum(["push", "pull"]).describe("Delivery mode for messages. 'push' for HTTP push delivery where messages are sent to a webhook endpoint, 'pull' for polling where the trigger actively fetches messages.").optional(),
|
|
324
|
+
"delivery_config": z.object({
|
|
325
|
+
"audience": z.string().describe("The audience claim for OIDC tokens used in push authentication.").optional(),
|
|
326
|
+
"authenticate": z.boolean().describe("If true, push messages will include OIDC authentication tokens.")
|
|
327
|
+
}).describe("Configuration for push delivery mode.").nullable().optional(),
|
|
328
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
329
|
+
"script_path": z.string().describe("Path to the script or flow to execute when a message is received."),
|
|
330
|
+
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script."),
|
|
331
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
332
|
+
"auto_acknowledge_msg": z.boolean().describe("If true, automatically acknowledge messages after processing.").optional(),
|
|
333
|
+
"ack_deadline": z.number().int().gte(10).lte(600).describe("Time in seconds within which the message must be acknowledged. If not provided, defaults to the subscription's acknowledgment deadline (600 seconds).").optional(),
|
|
334
|
+
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails.").optional(),
|
|
335
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler.").optional(),
|
|
336
|
+
"retry": z.object({
|
|
337
|
+
"constant": z.object({
|
|
338
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
339
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
340
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
341
|
+
"exponential": z.object({
|
|
342
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
343
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
344
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
345
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
346
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
347
|
+
"retry_if": z.object({
|
|
348
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
349
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
350
|
+
}).describe("Retry configuration for failed executions.").optional(),
|
|
351
|
+
"permissioned_as": z.string().describe("The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.").optional(),
|
|
352
|
+
"preserve_permissioned_as": z.boolean().describe("When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.").optional(),
|
|
353
|
+
"labels": z.array(z.string()).optional()
|
|
354
|
+
}).describe("Data for creating or updating a Google Cloud Pub/Sub trigger.");
|
|
355
|
+
export const azureTriggerRequestSchema = z.object({
|
|
356
|
+
"azure_resource_path": z.string(),
|
|
357
|
+
"azure_mode": z.enum(["basic_push", "namespace_push", "namespace_pull"]).describe("Azure Event Grid trigger mode."),
|
|
358
|
+
"scope_resource_id": z.string(),
|
|
359
|
+
"topic_name": z.string().nullable().optional(),
|
|
360
|
+
"subscription_name": z.string(),
|
|
361
|
+
"base_endpoint": z.string().describe("Base URL for push delivery endpoints (push modes only).").optional(),
|
|
362
|
+
"event_type_filters": z.array(z.string()).optional(),
|
|
363
|
+
"path": z.string().describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path."),
|
|
364
|
+
"script_path": z.string(),
|
|
365
|
+
"is_flow": z.boolean(),
|
|
366
|
+
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
|
|
367
|
+
"error_handler_path": z.string().optional(),
|
|
368
|
+
"error_handler_args": z.record(z.string(), z.any()).describe("The arguments to pass to the script or flow").optional(),
|
|
369
|
+
"retry": z.object({
|
|
370
|
+
"constant": z.object({
|
|
371
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
372
|
+
"seconds": z.number().int().describe("Seconds to wait between retries").optional()
|
|
373
|
+
}).describe("Retry with constant delay between attempts").optional(),
|
|
374
|
+
"exponential": z.object({
|
|
375
|
+
"attempts": z.number().int().describe("Number of retry attempts").optional(),
|
|
376
|
+
"multiplier": z.number().int().describe("Multiplier for exponential backoff").optional(),
|
|
377
|
+
"seconds": z.number().int().gte(1).describe("Initial delay in seconds").optional(),
|
|
378
|
+
"random_factor": z.number().int().gte(0).lte(100).describe("Random jitter percentage (0-100) to avoid thundering herd").optional()
|
|
379
|
+
}).describe("Retry with exponential backoff (delay doubles each time)").optional(),
|
|
380
|
+
"retry_if": z.object({
|
|
381
|
+
"expr": z.string().describe("JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables")
|
|
382
|
+
}).describe("Conditional retry based on error or result").optional()
|
|
383
|
+
}).describe("Retry configuration for failed module executions").optional(),
|
|
384
|
+
"permissioned_as": z.string().optional(),
|
|
385
|
+
"preserve_permissioned_as": z.boolean().optional(),
|
|
386
|
+
"labels": z.array(z.string()).optional()
|
|
387
|
+
}).describe("Data for creating or updating an Azure Event Grid trigger.");
|
|
388
|
+
export const triggerRequestSchemas = {
|
|
389
|
+
http: httpTriggerRequestSchema,
|
|
390
|
+
websocket: websocketTriggerRequestSchema,
|
|
391
|
+
kafka: kafkaTriggerRequestSchema,
|
|
392
|
+
nats: natsTriggerRequestSchema,
|
|
393
|
+
postgres: postgresTriggerRequestSchema,
|
|
394
|
+
mqtt: mqttTriggerRequestSchema,
|
|
395
|
+
sqs: sqsTriggerRequestSchema,
|
|
396
|
+
gcp: gcpTriggerRequestSchema,
|
|
397
|
+
azure: azureTriggerRequestSchema,
|
|
398
|
+
};
|
|
399
|
+
const triggerPathSchema = z.string().min(1).describe("The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.");
|
|
400
|
+
export const createTriggerToolSchema = z.object({
|
|
401
|
+
kind: z.enum([
|
|
402
|
+
"http",
|
|
403
|
+
"websocket",
|
|
404
|
+
"kafka",
|
|
405
|
+
"nats",
|
|
406
|
+
"postgres",
|
|
407
|
+
"mqtt",
|
|
408
|
+
"sqs",
|
|
409
|
+
"gcp",
|
|
410
|
+
"azure",
|
|
411
|
+
]),
|
|
412
|
+
path: triggerPathSchema,
|
|
413
|
+
config: z.union([
|
|
414
|
+
httpTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
415
|
+
websocketTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
416
|
+
kafkaTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
417
|
+
natsTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
418
|
+
postgresTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
419
|
+
mqttTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
420
|
+
sqsTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
421
|
+
gcpTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
422
|
+
azureTriggerRequestSchema.omit({ path: true, script_path: true, is_flow: true }),
|
|
423
|
+
])
|
|
424
|
+
});
|
|
@@ -7,6 +7,7 @@ import { type Writable } from 'svelte/store';
|
|
|
7
7
|
import { type Script } from '../../gen';
|
|
8
8
|
import { type Tool, type ToolCallbacks } from './chat/shared';
|
|
9
9
|
import type { Stream } from 'openai/core/streaming.mjs';
|
|
10
|
+
import { type ChatTokenUsage } from './chat/tokenUsage';
|
|
10
11
|
export declare const SUPPORTED_LANGUAGES: Set<string>;
|
|
11
12
|
interface AIProviderDetails {
|
|
12
13
|
label: string;
|
|
@@ -103,7 +104,10 @@ export declare function parseOpenAICompletion(completion: Stream<ChatCompletionC
|
|
|
103
104
|
}, messages: ChatCompletionMessageParam[], addedMessages: ChatCompletionMessageParam[], tools: Tool<any>[], helpers: any, _abortController?: AbortController, // unused, for signature compatibility with parseAnthropicCompletion
|
|
104
105
|
options?: {
|
|
105
106
|
workspace?: string;
|
|
106
|
-
}): Promise<
|
|
107
|
+
}): Promise<{
|
|
108
|
+
shouldContinue: boolean;
|
|
109
|
+
tokenUsage: ChatTokenUsage;
|
|
110
|
+
}>;
|
|
107
111
|
export declare function getResponseFromEvent(part: OpenAI.Chat.Completions.ChatCompletionChunk): string;
|
|
108
112
|
export declare function copilot(scriptOptions: CopilotOptions, generatedCode: Writable<string>, abortController: AbortController, generatedExplanation?: Writable<string>): Promise<string>;
|
|
109
113
|
export {};
|
|
@@ -4,6 +4,7 @@ import Anthropic from '@anthropic-ai/sdk';
|
|
|
4
4
|
import { get } from 'svelte/store';
|
|
5
5
|
import { OpenAPI, ResourceService } from '../../gen';
|
|
6
6
|
import { EDIT_CONFIG, FIX_CONFIG, GEN_CONFIG } from './prompts';
|
|
7
|
+
import { getDefaultChatTemperature } from './modelConfig';
|
|
7
8
|
import { formatResourceTypes } from './utils';
|
|
8
9
|
import { z } from 'zod';
|
|
9
10
|
import { processToolCall } from './chat/shared';
|
|
@@ -11,6 +12,7 @@ import { getNonStreamingOpenAIResponsesCompletion, getOpenAIResponsesCompletionS
|
|
|
11
12
|
import { convertOpenAIToAnthropicMessages } from './chat/anthropic';
|
|
12
13
|
import { generateRandomString } from '../../utils';
|
|
13
14
|
import { copilotInfo, getCurrentModel } from '../../aiStore';
|
|
15
|
+
import { emptyChatTokenUsage, openAICompletionsUsageToChatTokenUsage } from './chat/tokenUsage';
|
|
14
16
|
export const SUPPORTED_LANGUAGES = new Set(Object.keys(GEN_CONFIG.prompts));
|
|
15
17
|
const OPENAI_MODELS = [
|
|
16
18
|
'gpt-5',
|
|
@@ -231,6 +233,7 @@ function getModelSpecificConfig(modelProvider, tools) {
|
|
|
231
233
|
// copilotInfo store may not be initialized in vitest
|
|
232
234
|
}
|
|
233
235
|
const maxTokens = customMaxTokensStore?.[modelKey] ?? defaultMaxTokens;
|
|
236
|
+
const defaultTemperature = getDefaultChatTemperature(modelProvider);
|
|
234
237
|
if ((modelProvider.provider === 'openai' || modelProvider.provider === 'azure_openai') &&
|
|
235
238
|
(modelProvider.model.startsWith('o') || modelProvider.model.startsWith('gpt-5'))) {
|
|
236
239
|
return {
|
|
@@ -251,7 +254,7 @@ function getModelSpecificConfig(modelProvider, tools) {
|
|
|
251
254
|
}
|
|
252
255
|
: {
|
|
253
256
|
model: modelProvider.model,
|
|
254
|
-
temperature:
|
|
257
|
+
...(defaultTemperature !== undefined ? { temperature: defaultTemperature } : {})
|
|
255
258
|
}),
|
|
256
259
|
...(tools && tools.length > 0 ? { tools } : {}),
|
|
257
260
|
max_tokens: maxTokens
|
|
@@ -309,7 +312,7 @@ export function createOpenAIProxyClient(baseURL) {
|
|
|
309
312
|
baseURL,
|
|
310
313
|
apiKey: 'fake-key',
|
|
311
314
|
defaultHeaders: {
|
|
312
|
-
Authorization:
|
|
315
|
+
Authorization: OpenAPI.TOKEN ? `Bearer ${OpenAPI.TOKEN}` : ''
|
|
313
316
|
},
|
|
314
317
|
dangerouslyAllowBrowser: true
|
|
315
318
|
});
|
|
@@ -318,7 +321,8 @@ export function createAnthropicProxyClient(baseURL) {
|
|
|
318
321
|
return new Anthropic({
|
|
319
322
|
baseURL,
|
|
320
323
|
apiKey: 'fake-key',
|
|
321
|
-
dangerouslyAllowBrowser: true
|
|
324
|
+
dangerouslyAllowBrowser: true,
|
|
325
|
+
defaultHeaders: OpenAPI.TOKEN ? { Authorization: `Bearer ${OpenAPI.TOKEN}` } : undefined
|
|
322
326
|
});
|
|
323
327
|
}
|
|
324
328
|
class WorkspacedAIClients {
|
|
@@ -653,7 +657,17 @@ export async function getCompletion(messages, abortController, tools, options) {
|
|
|
653
657
|
}
|
|
654
658
|
// Use Completions API for other providers
|
|
655
659
|
const client = options?.openaiClient ?? workspaceAIClients.getOpenaiClient();
|
|
656
|
-
const
|
|
660
|
+
const completionConfig = (provider === 'openai' || provider === 'azure_openai' || provider === 'googleai') &&
|
|
661
|
+
config.stream
|
|
662
|
+
? {
|
|
663
|
+
...config,
|
|
664
|
+
stream_options: {
|
|
665
|
+
...(config.stream_options ?? {}),
|
|
666
|
+
include_usage: true
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
: config;
|
|
670
|
+
const completion = client.chat.completions.create(completionConfig, {
|
|
657
671
|
signal: abortController.signal,
|
|
658
672
|
headers: {
|
|
659
673
|
'X-Provider': provider
|
|
@@ -675,8 +689,12 @@ export async function parseOpenAICompletion(completion, callbacks, messages, add
|
|
|
675
689
|
options) {
|
|
676
690
|
const finalToolCalls = {};
|
|
677
691
|
let malformedFunctionCallError = false;
|
|
692
|
+
let tokenUsage = emptyChatTokenUsage();
|
|
678
693
|
let answer = '';
|
|
679
694
|
for await (const chunk of completion) {
|
|
695
|
+
if ('usage' in chunk && chunk.usage) {
|
|
696
|
+
tokenUsage = openAICompletionsUsageToChatTokenUsage(chunk.usage);
|
|
697
|
+
}
|
|
680
698
|
if (!('choices' in chunk && chunk.choices.length > 0 && 'delta' in chunk.choices[0])) {
|
|
681
699
|
continue;
|
|
682
700
|
}
|
|
@@ -835,9 +853,9 @@ options) {
|
|
|
835
853
|
addedMessages.push(toolResponse);
|
|
836
854
|
}
|
|
837
855
|
else {
|
|
838
|
-
return false;
|
|
856
|
+
return { shouldContinue: false, tokenUsage };
|
|
839
857
|
}
|
|
840
|
-
return true;
|
|
858
|
+
return { shouldContinue: true, tokenUsage };
|
|
841
859
|
}
|
|
842
860
|
export function getResponseFromEvent(part) {
|
|
843
861
|
return part.choices?.[0]?.delta?.content || '';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { getDefaultChatTemperature, modelDisallowsSamplingParams } from './modelConfig';
|
|
3
|
+
describe('modelConfig', () => {
|
|
4
|
+
it('flags Opus 4.7 model IDs via includes matching', () => {
|
|
5
|
+
expect(modelDisallowsSamplingParams('claude-opus-4-7')).toBe(true);
|
|
6
|
+
expect(modelDisallowsSamplingParams('claude-opus-4-7@20260416')).toBe(true);
|
|
7
|
+
expect(modelDisallowsSamplingParams('claude-opus-4-7/thinking')).toBe(true);
|
|
8
|
+
expect(modelDisallowsSamplingParams('anthropic/claude-opus-4-7')).toBe(true);
|
|
9
|
+
});
|
|
10
|
+
it('omits deterministic temperature for Anthropic Opus 4.7 chat requests', () => {
|
|
11
|
+
expect(getDefaultChatTemperature({ provider: 'anthropic', model: 'claude-opus-4-7' })).toBeUndefined();
|
|
12
|
+
});
|
|
13
|
+
it('omits deterministic temperature for non-anthropic providers carrying Opus 4.7 models', () => {
|
|
14
|
+
expect(getDefaultChatTemperature({ provider: 'openrouter', model: 'anthropic/claude-opus-4-7' })).toBeUndefined();
|
|
15
|
+
});
|
|
16
|
+
it('keeps deterministic temperature for older Anthropic models', () => {
|
|
17
|
+
expect(getDefaultChatTemperature({ provider: 'anthropic', model: 'claude-sonnet-4-6' })).toBe(0);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function modelDisallowsSamplingParams(model) {
|
|
2
|
+
const normalizedModel = model.toLowerCase();
|
|
3
|
+
return normalizedModel.includes('claude-opus-4-7');
|
|
4
|
+
}
|
|
5
|
+
export function getDefaultChatTemperature(modelProvider) {
|
|
6
|
+
if (modelDisallowsSamplingParams(modelProvider.model)) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
return 0;
|
|
10
|
+
}
|