windmill-components 1.687.0 → 1.695.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/components/ArgInput.svelte +2 -0
- package/package/components/AutoscalingConfigEditor.svelte +18 -4
- package/package/components/CompareWorkspaces.svelte +206 -157
- package/package/components/DatatableSchemaDiff.svelte +2 -2
- package/package/components/Dev.svelte +401 -85
- package/package/components/EditableSchemaForm.svelte +4 -0
- 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 +1 -2
- package/package/components/FlowStatusViewerInner.svelte.d.ts +6 -2
- package/package/components/ForkConflictModal.svelte +57 -0
- package/package/components/ForkConflictModal.svelte.d.ts +3 -0
- package/package/components/GitRepoViewer.svelte +251 -97
- package/package/components/InputTransformSchemaForm.svelte +1 -1
- package/package/components/InstanceSettings.svelte +36 -16
- package/package/components/Login.svelte +113 -28
- package/package/components/Login.svelte.d.ts +1 -0
- package/package/components/Path.svelte +7 -1
- package/package/components/Path.svelte.d.ts +1 -1
- package/package/components/RunsPage.svelte +2 -1
- package/package/components/S3FilePickerInner.svelte +89 -89
- package/package/components/ScriptEditor.svelte +18 -5
- package/package/components/ShareModal.svelte.d.ts +1 -1
- 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/TagPopup.svelte +49 -0
- package/package/components/apps/editor/inlineScriptsPanel/TagPopup.svelte.d.ts +9 -0
- package/package/components/apps/inputType.d.ts +1 -0
- package/package/components/apps/sharedTypes.d.ts +1 -0
- package/package/components/auditLogs/AuditLogsFilters.svelte +8 -3
- package/package/components/common/fileUpload/S3ArgInput.svelte +12 -10
- package/package/components/common/fileUpload/S3ArgInput.svelte.d.ts +2 -0
- 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 +48 -46
- package/package/components/copilot/chat/ContextElementBadge.svelte +6 -4
- package/package/components/copilot/chat/app/core.d.ts +12 -20
- package/package/components/copilot/chat/app/core.js +103 -160
- package/package/components/copilot/chat/app/core.test.js +234 -9
- package/package/components/copilot/chat/context.js +44 -0
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +5 -3
- package/package/components/copilot/chat/flow/core.d.ts +2 -1
- package/package/components/copilot/chat/flow/core.js +48 -21
- package/package/components/copilot/chat/flow/helperUtils.d.ts +5 -2
- package/package/components/copilot/chat/flow/helperUtils.js +33 -1
- package/package/components/copilot/chat/flow/helperUtils.test.js +116 -1
- 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/script/core.js +3 -0
- package/package/components/copilot/chat/shared.d.ts +6 -0
- package/package/components/copilot/chat/shared.js +22 -1
- 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/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.js +3 -1
- 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/flows/FlowProgressBar.svelte +5 -2
- package/package/components/flows/content/FlowModuleComponent.svelte +636 -599
- package/package/components/flows/conversations/FlowChatManager.svelte.js +21 -10
- package/package/components/flows/flowStateUtils.svelte.js +5 -1
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +3 -2
- package/package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -0
- package/package/components/git_sync/GitSyncContext.svelte.js +0 -2
- package/package/components/graph/FlowGraphV2.svelte +7 -3
- package/package/components/graph/FlowGraphV2.svelte.d.ts +1 -0
- package/package/components/graph/renderers/triggers/TriggersBadge.svelte +3 -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/instanceSettings.js +24 -0
- package/package/components/mcp/McpScopeSelector.svelte +119 -9
- package/package/components/mcp/McpScopeSelector.svelte.d.ts +1 -0
- package/package/components/offboarding-utils.js +2 -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/RawAppEditor.svelte +159 -102
- 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/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/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/search/GlobalSearchModal.svelte +8 -1
- package/package/components/select/Select.svelte +1 -1
- package/package/components/settings/CreateToken.svelte +48 -77
- 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/sidebar/OperatorMenu.svelte +6 -0
- package/package/components/sidebar/SidebarContent.svelte +11 -1
- package/package/components/triggers/AddTriggersButton.svelte +6 -0
- package/package/components/triggers/CaptureWrapper.svelte +19 -1
- 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 +5 -1
- package/package/components/triggers/TriggersWrapper.svelte +10 -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 +2 -0
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/http/RouteEditorInner.svelte +2 -0
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/mqtt/MqttTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/nats/NatsTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/postgres/PostgresTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +9 -3
- package/package/components/triggers/sqs/SqsTriggerEditorInner.svelte +9 -3
- package/package/components/triggers/triggers.svelte.d.ts +1 -0
- package/package/components/triggers/triggers.svelte.js +23 -1
- package/package/components/triggers/utils.js +20 -0
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +9 -3
- package/package/components/triggers.d.ts +1 -1
- package/package/components/useNestedRestartState.svelte.d.ts +56 -0
- package/package/components/useNestedRestartState.svelte.js +320 -0
- package/package/components/workspaceSettings/SharedUiSettings.svelte +175 -0
- package/package/components/workspaceSettings/SharedUiSettings.svelte.d.ts +3 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +294 -24
- package/package/gen/schemas.gen.js +297 -25
- package/package/gen/services.gen.d.ts +247 -4
- package/package/gen/services.gen.js +498 -7
- package/package/gen/types.gen.d.ts +990 -37
- package/package/hubPaths.json +2 -5
- package/package/infer.d.ts +1 -1
- package/package/infer.js +37 -51
- package/package/mcpEndpointTools.js +60 -4
- package/package/script_helpers.js +17 -0
- package/package/stores.d.ts +7 -0
- package/package/stores.js +6 -1
- package/package/system_prompts/index.d.ts +1 -0
- package/package/system_prompts/index.js +8 -0
- package/package/system_prompts/prompts.d.ts +16 -13
- package/package/system_prompts/prompts.js +653 -43
- package/package/templates/ci_test_bun.ts.template +8 -0
- package/package/templates/ci_test_python.py.template +8 -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.js +3 -1
- package/package.json +29 -5
- 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/flow/openFlowZod.js +0 -24
- /package/package/components/copilot/chat/flow/{openFlowZod.d.ts → openFlowZod.gen.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
|
+
});
|
|
@@ -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';
|
|
@@ -232,6 +233,7 @@ function getModelSpecificConfig(modelProvider, tools) {
|
|
|
232
233
|
// copilotInfo store may not be initialized in vitest
|
|
233
234
|
}
|
|
234
235
|
const maxTokens = customMaxTokensStore?.[modelKey] ?? defaultMaxTokens;
|
|
236
|
+
const defaultTemperature = getDefaultChatTemperature(modelProvider);
|
|
235
237
|
if ((modelProvider.provider === 'openai' || modelProvider.provider === 'azure_openai') &&
|
|
236
238
|
(modelProvider.model.startsWith('o') || modelProvider.model.startsWith('gpt-5'))) {
|
|
237
239
|
return {
|
|
@@ -252,7 +254,7 @@ function getModelSpecificConfig(modelProvider, tools) {
|
|
|
252
254
|
}
|
|
253
255
|
: {
|
|
254
256
|
model: modelProvider.model,
|
|
255
|
-
temperature:
|
|
257
|
+
...(defaultTemperature !== undefined ? { temperature: defaultTemperature } : {})
|
|
256
258
|
}),
|
|
257
259
|
...(tools && tools.length > 0 ? { tools } : {}),
|
|
258
260
|
max_tokens: maxTokens
|
|
@@ -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
|
+
}
|
|
@@ -13,11 +13,11 @@ let currentStepId = $state(undefined);
|
|
|
13
13
|
let isWaitingForEvents = $state(false);
|
|
14
14
|
let isCanceled = $state(false);
|
|
15
15
|
let isScheduled = $state(false);
|
|
16
|
+
let isSkipped = $state(false);
|
|
16
17
|
let progressBar = $state(undefined);
|
|
17
18
|
function updateJobProgress(job) {
|
|
18
19
|
// Check if job is scheduled for later
|
|
19
|
-
const isJobScheduled = Boolean('running' in job && 'scheduled_for' in job &&
|
|
20
|
-
job.scheduled_for && forLater(job.scheduled_for));
|
|
20
|
+
const isJobScheduled = Boolean('running' in job && 'scheduled_for' in job && job.scheduled_for && forLater(job.scheduled_for));
|
|
21
21
|
isScheduled = isJobScheduled;
|
|
22
22
|
const modules = job?.flow_status?.modules;
|
|
23
23
|
if (!modules?.length) {
|
|
@@ -88,6 +88,7 @@ function updateJobProgress(job) {
|
|
|
88
88
|
currentStepId = newCurrentStepId;
|
|
89
89
|
isWaitingForEvents = newIsWaitingForEvents;
|
|
90
90
|
isCanceled = job?.canceled || false;
|
|
91
|
+
isSkipped = 'is_skipped' in job && Boolean(job.is_skipped);
|
|
91
92
|
}
|
|
92
93
|
export function reset() {
|
|
93
94
|
progressBar?.resetP();
|
|
@@ -100,6 +101,7 @@ export function reset() {
|
|
|
100
101
|
isWaitingForEvents = false;
|
|
101
102
|
isCanceled = false;
|
|
102
103
|
isScheduled = false;
|
|
104
|
+
isSkipped = false;
|
|
103
105
|
}
|
|
104
106
|
$effect(() => {
|
|
105
107
|
job && updateJobProgress(job);
|
|
@@ -123,4 +125,5 @@ $effect(() => {
|
|
|
123
125
|
{isWaitingForEvents}
|
|
124
126
|
{isCanceled}
|
|
125
127
|
{isScheduled}
|
|
128
|
+
{isSkipped}
|
|
126
129
|
/>
|