windmill-components 1.665.0 → 1.677.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/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +2 -0
- package/dist/sharedUtils/base.d.ts +1 -0
- package/dist/sharedUtils/cloud.d.ts +1 -0
- package/dist/sharedUtils/common.d.ts +111 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +13 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +11 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +95 -0
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +6 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +33 -0
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +10 -0
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +5371 -0
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +3 -0
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +14 -0
- package/dist/sharedUtils/components/apps/inputType.d.ts +178 -0
- package/dist/sharedUtils/components/apps/rx.d.ts +29 -0
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +21 -0
- package/dist/sharedUtils/components/apps/types.d.ts +274 -0
- package/dist/sharedUtils/components/assets/lib.d.ts +25 -0
- package/dist/sharedUtils/components/common/alert/model.d.ts +2 -0
- package/dist/sharedUtils/components/common/badge/model.d.ts +8 -0
- package/dist/sharedUtils/components/common/button/model.d.ts +45 -0
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +1 -0
- package/dist/sharedUtils/components/common/index.d.ts +24 -0
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +21 -0
- package/dist/sharedUtils/components/dbTypes.d.ts +14 -0
- package/dist/sharedUtils/components/diff_drawer.d.ts +26 -0
- package/dist/sharedUtils/components/ducklake.d.ts +1 -0
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +7 -0
- package/dist/sharedUtils/components/icons/index.d.ts +101 -0
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +1 -0
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +10 -0
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +15 -0
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +4 -0
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +11 -0
- package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +8 -0
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +32 -0
- package/dist/sharedUtils/components/triggers/utils.d.ts +80 -0
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers.d.ts +20 -0
- package/dist/sharedUtils/gen/core/ApiError.d.ts +10 -0
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +13 -0
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +7 -0
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +26 -0
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +27 -0
- package/dist/sharedUtils/gen/core/request.d.ts +29 -0
- package/dist/sharedUtils/gen/index.d.ts +6 -0
- package/dist/sharedUtils/gen/schemas.gen.d.ts +7036 -0
- package/dist/sharedUtils/gen/services.gen.d.ts +6047 -0
- package/dist/sharedUtils/gen/types.gen.d.ts +21881 -0
- package/dist/sharedUtils/history.svelte.d.ts +9 -0
- package/dist/sharedUtils/hub.d.ts +49 -0
- package/dist/sharedUtils/jsr.json +6 -0
- package/dist/sharedUtils/lib.d.ts +5 -0
- package/dist/sharedUtils/lib.es.js +1588 -0
- package/dist/sharedUtils/package.json +12 -0
- package/dist/sharedUtils/schema.d.ts +3 -0
- package/dist/sharedUtils/stores.d.ts +97 -0
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +80 -0
- package/dist/sharedUtils/toast.d.ts +8 -0
- package/dist/sharedUtils/utils.d.ts +265 -0
- package/package/components/AddUser.svelte +67 -34
- package/package/components/AppConnectInner.svelte +9 -1
- package/package/components/ArgInfo.svelte +9 -1
- package/package/components/ArgInput.svelte +21 -1
- package/package/components/CompareWorkspaces.svelte +11 -2
- package/package/components/DedicatedWorkersSelector.svelte +262 -247
- package/package/components/DefaultTagsInner.svelte +40 -2
- package/package/components/DeployWorkspace.svelte +13 -0
- package/package/components/DiffEditor.svelte +44 -1
- package/package/components/EditableSchemaForm.svelte +5 -2
- package/package/components/EditableSchemaForm.svelte.d.ts +1 -0
- package/package/components/Editor.svelte +5 -1
- package/package/components/EditorBar.svelte +12 -3
- package/package/components/FilterSearchbar.svelte +26 -2
- package/package/components/FlowBuilder.svelte +6 -3
- package/package/components/FlowGraphDiffViewer.svelte +16 -17
- package/package/components/FlowGraphViewer.svelte +20 -6
- package/package/components/FlowGraphViewer.svelte.d.ts +2 -0
- package/package/components/FlowGraphViewerStep.svelte +14 -32
- package/package/components/FlowMetadata.svelte +4 -1
- package/package/components/FlowPreviewContent.svelte +2 -0
- package/package/components/FlowStatusWaitingForEvents.svelte +25 -4
- package/package/components/HighlightCode.svelte +3 -0
- package/package/components/InstanceSetting.svelte +9 -25
- package/package/components/InstanceSettings.svelte +16 -0
- package/package/components/LabelsInput.svelte +149 -0
- package/package/components/LabelsInput.svelte.d.ts +8 -0
- package/package/components/Login.svelte +6 -1
- package/package/components/ObjectStoreConfigSettings.svelte +273 -1
- package/package/components/OktaSetting.svelte +6 -5
- package/package/components/Password.svelte +74 -20
- package/package/components/Password.svelte.d.ts +1 -0
- package/package/components/PasswordArgInput.svelte +2 -2
- package/package/components/PasswordArgInput.svelte.d.ts +1 -0
- package/package/components/Path.svelte +8 -10
- package/package/components/PathNameAutocomplete.svelte +308 -0
- package/package/components/PathNameAutocomplete.svelte.d.ts +27 -0
- package/package/components/PowerShellCommonParams.svelte +84 -0
- package/package/components/PowerShellCommonParams.svelte.d.ts +6 -0
- package/package/components/Range.svelte +8 -3
- package/package/components/ResourceEditor.svelte +6 -2
- package/package/components/RunForm.svelte +71 -7
- package/package/components/RunForm.svelte.d.ts +2 -1
- package/package/components/ScriptBuilder.svelte +7 -3
- package/package/components/ScriptEditor.svelte +221 -187
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/ScriptSchema.svelte +1 -1
- package/package/components/StringTypeNarrowing.svelte +1 -1
- package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
- package/package/components/SummaryPathDisplay.svelte +32 -10
- package/package/components/SummaryPathDisplay.svelte.d.ts +2 -1
- package/package/components/VariableEditor.svelte +9 -2
- package/package/components/WorkerGroup.svelte +47 -2
- package/package/components/apps/editor/DeploymentHistory.svelte +112 -13
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +135 -35
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +3 -1
- package/package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +11 -35
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.d.ts +10 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.js +14 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.test.d.ts +1 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.test.js +34 -0
- package/package/components/assets/AssetButtons.svelte +21 -25
- package/package/components/assets/AssetsUsageDrawer.svelte +7 -9
- package/package/components/common/fileUpload/FileUpload.svelte +6 -2
- package/package/components/common/languageIcons/LanguageIcon.svelte +3 -0
- package/package/components/common/table/AppRow.svelte +18 -0
- package/package/components/common/table/FlowRow.svelte +18 -0
- package/package/components/common/table/ScriptRow.svelte +18 -0
- package/package/components/copilot/chat/AIChatManager.svelte.js +3 -3
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.js +3 -3
- package/package/components/custom_ui.d.ts +2 -0
- package/package/components/details/DetailPageHeader.svelte +2 -2
- package/package/components/details/DetailPageHeader.svelte.d.ts +2 -1
- package/package/components/flows/agentToolUtils.d.ts +5 -0
- package/package/components/flows/agentToolUtils.js +49 -0
- package/package/components/flows/agentToolUtils.test.d.ts +1 -0
- package/package/components/flows/agentToolUtils.test.js +55 -0
- package/package/components/flows/content/FlowInput.svelte +2 -0
- package/package/components/flows/content/FlowInputsQuick.svelte +1 -1
- package/package/components/flows/content/FlowLoop.svelte +5 -12
- package/package/components/flows/content/FlowModuleScript.svelte +5 -3
- package/package/components/flows/content/FlowPathViewer.svelte +2 -2
- package/package/components/flows/content/FlowPathViewer.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowSettings.svelte +2 -0
- package/package/components/flows/content/FlowWhileLoop.svelte +5 -12
- package/package/components/flows/flowInfers.js +8 -3
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +49 -9
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +5 -3
- package/package/components/flows/pickers/PickHubScriptQuick.svelte.d.ts +1 -1
- package/package/components/flows/scheduleUtils.js +2 -1
- package/package/components/graph/FlowGraphV2.svelte +13 -1
- package/package/components/graph/WacDiagram.svelte +96 -0
- package/package/components/graph/WacDiagram.svelte.d.ts +7 -0
- package/package/components/graph/noteEditor.svelte.d.ts +1 -1
- package/package/components/graph/noteEditor.svelte.js +12 -1
- package/package/components/graph/noteUtils.svelte.d.ts +1 -1
- package/package/components/graph/noteUtils.svelte.js +9 -2
- package/package/components/graph/renderers/edges/WacEdge.svelte +41 -0
- package/package/components/graph/renderers/edges/WacEdge.svelte.d.ts +4 -0
- package/package/components/graph/renderers/nodes/WacControlNode.svelte +51 -0
- package/package/components/graph/renderers/nodes/WacControlNode.svelte.d.ts +9 -0
- package/package/components/graph/renderers/nodes/WacStepNode.svelte +35 -0
- package/package/components/graph/renderers/nodes/WacStepNode.svelte.d.ts +9 -0
- package/package/components/graph/wacDagLayout.d.ts +10 -0
- package/package/components/graph/wacDagLayout.js +120 -0
- package/package/components/graph/wacToFlow.js +1 -1
- package/package/components/home/ItemsList.svelte +28 -4
- package/package/components/icons/RIcon.svelte +32 -0
- package/package/components/icons/RIcon.svelte.d.ts +7 -0
- package/package/components/instanceSettings/DbHealth.svelte +723 -0
- package/package/components/instanceSettings/DbHealth.svelte.d.ts +3 -0
- package/package/components/instanceSettings/SecretBackendConfig.svelte +343 -304
- package/package/components/instanceSettings/SmtpSettings.svelte +8 -0
- package/package/components/instanceSettings.js +14 -5
- package/package/components/mcp/McpScopeSelector.svelte +82 -16
- package/package/components/moveRenameManager.d.ts +1 -0
- package/package/components/moveRenameManager.js +7 -4
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +14 -1
- package/package/components/raw_apps/rawAppPolicy.js +3 -2
- package/package/components/raw_apps/utils.test.d.ts +1 -0
- package/package/components/raw_apps/utils.test.js +38 -0
- package/package/components/recording/ScriptRecordingReplay.svelte +0 -1
- package/package/components/resources/resourcesFilter.d.ts +15 -2
- package/package/components/resources/resourcesFilter.js +11 -2
- package/package/components/runs/JobDetailFieldConfig.js +5 -3
- package/package/components/runs/JobDetailHeader.svelte +5 -2
- package/package/components/runs/JobRunsPreview.svelte +1 -0
- package/package/components/runs/RunBadges.svelte +7 -4
- package/package/components/runs/RunRow.svelte +7 -7
- package/package/components/schedules/schedulesFilter.d.ts +15 -2
- package/package/components/schedules/schedulesFilter.js +11 -2
- package/package/components/schema/EditableSchemaWrapper.svelte +6 -8
- package/package/components/schema/PropertyEditor.svelte +22 -1
- package/package/components/schema/PropertyEditor.svelte.d.ts +1 -0
- package/package/components/schema/editable_schema_wrapper.d.ts +1 -0
- package/package/components/secretArgUtils.d.ts +7 -0
- package/package/components/secretArgUtils.js +45 -0
- package/package/components/settings/WorkspaceUserSettings.svelte +359 -286
- package/package/components/sidebar/OperatorMenu.svelte +215 -197
- package/package/components/triggers/CaptureWrapper.svelte +1 -1
- package/package/components/triggers/TriggerFilters.svelte +17 -5
- package/package/components/triggers/TriggerFilters.svelte.d.ts +2 -1
- package/package/components/triggers/kafka/KafkaCapture.svelte +6 -2
- package/package/components/triggers/kafka/KafkaCapture.svelte.d.ts +1 -1
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +5 -1
- package/package/components/triggers/kafka/utils.js +1 -0
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +6 -0
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +87 -1
- package/package/components/triggers/websocket/utils.js +2 -0
- package/package/components/variables/variablesFilter.d.ts +15 -2
- package/package/components/variables/variablesFilter.js +11 -2
- package/package/components/worker_group.js +1 -0
- package/package/components/workspaceSettings/DucklakeSettings.svelte +33 -41
- package/package/consts.d.ts +1 -0
- package/package/consts.js +1 -0
- package/package/editorLangUtils.d.ts +1 -1
- package/package/editorLangUtils.js +2 -0
- package/package/forLater.js +4 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +94 -294
- package/package/gen/schemas.gen.js +94 -294
- package/package/gen/services.gen.d.ts +5 -121
- package/package/gen/services.gen.js +5 -237
- package/package/gen/types.gen.d.ts +91 -715
- package/package/hubPaths.json +6 -3
- package/package/infer.d.ts +55 -0
- package/package/infer.js +131 -0
- package/package/infer.svelte.js +2 -0
- package/package/mcpEndpointTools.js +213 -22
- package/package/script_helpers.d.ts +3 -0
- package/package/script_helpers.js +26 -0
- package/package/scripts.d.ts +2 -1
- package/package/scripts.js +15 -3
- package/package/stores.d.ts +2 -0
- package/package/system_prompts/prompts.d.ts +6 -5
- package/package/system_prompts/prompts.js +188 -29
- package/package/user.js +5 -1
- package/package/utils.js +21 -0
- package/package/utils_deployable.d.ts +7 -0
- package/package/utils_workspace_deploy.js +36 -8
- package/package.json +6 -5
|
@@ -34,7 +34,7 @@ export const FLOW_BASE = `# Windmill Flow Building Guide
|
|
|
34
34
|
Create a folder ending with \`__flow\` and add a \`flow.yaml\` file with the flow definition.
|
|
35
35
|
For rawscript modules, use \`!inline path/to/script.ts\` for the content key. Inline script files should NOT include \`.inline_script.\` in their names (e.g. use \`a.ts\`, not \`a.inline_script.ts\`).
|
|
36
36
|
After writing, tell the user they can run:
|
|
37
|
-
- \`wmill
|
|
37
|
+
- \`wmill generate-metadata\` - Generate lock files for the flow you modified
|
|
38
38
|
- \`wmill sync push\` - Deploy to Windmill
|
|
39
39
|
|
|
40
40
|
Do NOT run these commands yourself. Instead, inform the user that they should run them.
|
|
@@ -150,6 +150,8 @@ export const SDK_TYPESCRIPT = `# TypeScript SDK (windmill-client)
|
|
|
150
150
|
|
|
151
151
|
Import: import * as wmill from 'windmill-client'
|
|
152
152
|
|
|
153
|
+
workerHasInternalServer(): boolean
|
|
154
|
+
|
|
153
155
|
/**
|
|
154
156
|
* Initialize the Windmill client with authentication token and base URL
|
|
155
157
|
* @param token - Authentication token (defaults to WM_TOKEN env variable)
|
|
@@ -686,6 +688,8 @@ export const SDK_PYTHON = `# Python SDK (wmill)
|
|
|
686
688
|
|
|
687
689
|
Import: import wmill
|
|
688
690
|
|
|
691
|
+
def worker_has_internal_server() -> bool
|
|
692
|
+
|
|
689
693
|
def get_mocked_api() -> Optional[dict]
|
|
690
694
|
|
|
691
695
|
# Get the HTTP client instance.
|
|
@@ -750,7 +754,10 @@ def run_script_by_path(path: str, args: dict = None, timeout: dt.timedelta | int
|
|
|
750
754
|
# Run script by hash synchronously and return its result.
|
|
751
755
|
def run_script_by_hash(hash_: str, args: dict = None, timeout: dt.timedelta | int | float | None = None, verbose: bool = False, cleanup: bool = True, assert_result_is_not_none: bool = False) -> Any
|
|
752
756
|
|
|
753
|
-
# Run a script on the current worker without creating a job
|
|
757
|
+
# Run a script on the current worker without creating a job.
|
|
758
|
+
#
|
|
759
|
+
# On agent workers (no internal server), falls back to running a normal
|
|
760
|
+
# preview job and waiting for the result.
|
|
754
761
|
def run_inline_script_preview(content: str, language: str, args: dict = None) -> Any
|
|
755
762
|
|
|
756
763
|
# Wait for a job to complete and return its result.
|
|
@@ -1516,7 +1523,7 @@ class SqlQuery:
|
|
|
1516
1523
|
`;
|
|
1517
1524
|
export const OPENFLOW_SCHEMA = `## OpenFlow Schema
|
|
1518
1525
|
|
|
1519
|
-
{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"},"on_behalf_of_email":{"type":"string","description":"The flow will be run with the permissions of the user with this email."}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"integer","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"debounce_args_to_accumulate":{"type":"array","description":"Arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"integer","description":"Maximum total time in seconds that a job can be debounced"},"max_total_debounces_amount":{"type":"integer","description":"Maximum number of times a job can be debounced"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource).","additionalProperties":{}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}},"groups":{"type":"array","description":"Semantic groups of modules for organizational purposes","items":{"$ref":"#/components/schemas/FlowGroup"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \\"yellow\\", \\"#ffff00\\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"FlowGroup":{"type":"object","description":"A semantic group of flow modules for organizational purposes. Does not affect execution \\u2014 modules remain in their original position in the flow. Groups provide naming and collapsibility in the editor. Members are computed dynamically from all nodes on paths between start_id and end_id.","properties":{"summary":{"type":"string","description":"Display name for this group"},"note":{"type":"string","description":"Markdown note shown below the group header"},"autocollapse":{"type":"boolean","default":false,"description":"If true, this group is collapsed by default in the flow editor. UI hint only."},"start_id":{"type":"string","description":"ID of the first flow module in this group (topological entry point)"},"end_id":{"type":"string","description":"ID of the last flow module in this group (topological exit point)"},"color":{"type":"string","description":"Color for the group in the flow editor"}},"required":["start_id","end_id"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","nullable":true,"description":"Custom error message when stopping with an error. Mutually exclusive with skip_if_stopped. If set to a non-empty string, the flow stops with this error. If empty string, a default error message is used. If null or omitted, no error is raised."}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"},"debouncing":{"description":"Debounce configuration for this step (EE only)","type":"object","properties":{"debounce_delay_s":{"type":"integer","description":"Delay in seconds to debounce this step's executions across flow runs"},"debounce_key":{"type":"string","description":"Expression to group debounced executions. Supports $workspace and $args[name]. Default: $workspace/flow/<flow_path>-<step_id>"},"debounce_args_to_accumulate":{"type":"array","description":"Array-type arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"integer","description":"Maximum total time in seconds before forced execution"},"max_total_debounces_amount":{"type":"integer","description":"Maximum number of debounces before forced execution"}}}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"AiTransform":{"type":"object","description":"Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter.","properties":{"type":{"type":"string","enum":["ai"]}},"required":["type"]},"AIProviderKind":{"type":"string","description":"Supported AI provider types","enum":["openai","azure_openai","anthropic","mistral","deepseek","googleai","groq","openrouter","togetherai","customai","aws_bedrock"]},"ProviderConfig":{"type":"object","description":"Complete AI provider configuration with resource reference and model selection","properties":{"kind":{"$ref":"#/components/schemas/AIProviderKind"},"resource":{"type":"string","description":"Resource reference in format '$res:{resource_path}' pointing to provider credentials"},"model":{"type":"string","description":"Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro')"}},"required":["kind","resource","model"]},"StaticProviderTransform":{"type":"object","description":"Static provider configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/ProviderConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"ProviderTransform":{"description":"Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticProviderTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticProviderTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"MemoryOff":{"type":"object","description":"No conversation memory/context","properties":{"kind":{"type":"string","enum":["off"]}},"required":["kind"]},"MemoryAuto":{"type":"object","description":"Automatic context management","properties":{"kind":{"type":"string","enum":["auto"]},"context_length":{"type":"integer","description":"Maximum number of messages to retain in context"},"memory_id":{"type":"string","description":"Identifier for persistent memory across agent invocations"}},"required":["kind"]},"MemoryMessage":{"type":"object","description":"A single message in conversation history","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]},"MemoryManual":{"type":"object","description":"Explicit message history","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Conversation memory configuration","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind","mapping":{"off":"#/components/schemas/MemoryOff","auto":"#/components/schemas/MemoryAuto","manual":"#/components/schemas/MemoryManual"}}},"StaticMemoryTransform":{"type":"object","description":"Static memory configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/MemoryConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"MemoryTransform":{"description":"Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticMemoryTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticMemoryTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type","mapping":{"rawscript":"#/components/schemas/RawScript","script":"#/components/schemas/PathScript","flow":"#/components/schemas/PathFlow","forloopflow":"#/components/schemas/ForloopFlow","whileloopflow":"#/components/schemas/WhileloopFlow","branchone":"#/components/schemas/BranchOne","branchall":"#/components/schemas/BranchAll","identity":"#/components/schemas/Identity","aiagent":"#/components/schemas/AiAgent"}}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php","rust","ansible","csharp","nu","java","ruby","duckdb"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable","volume"]},"access_type":{"type":"string","nullable":true,"description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","nullable":true,"description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"},{"$ref":"#/components/schemas/WebsearchToolValue"}],"discriminator":{"propertyName":"tool_type","mapping":{"flowmodule":"#/components/schemas/FlowModuleTool","mcp":"#/components/schemas/McpToolValue","websearch":"#/components/schemas/WebsearchToolValue"}}},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"WebsearchToolValue":{"type":"object","description":"A tool implemented as a websearch tool. The AI can call this like any other websearch tool","properties":{"tool_type":{"type":"string","enum":["websearch"]}},"required":["tool_type"]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/ProviderTransform"},"output_type":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Output format type.\\nValid values: 'text' (default) - plain text response, 'image' - image generation\\n"},"user_message":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax."},"system_prompt":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"System instructions that guide the AI's behavior, persona, and response style. Optional."},"streaming":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Boolean. If true, stream the AI response incrementally.\\nStreaming events include: token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"output_schema":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape.\\nSupports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc.\\nExample: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] }\\n"},"user_images":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of image references for vision-capable models.\\nFormat: Array<{ bucket: string, key: string }> - S3 object references\\nExample: [{ bucket: 'my-bucket', key: 'images/photo.jpg' }]\\n"},"max_completion_tokens":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Integer. Maximum number of tokens the AI will generate in its response.\\nRange: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases.\\n"},"temperature":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Float. Controls randomness/creativity of responses.\\nRange: 0.0 to 2.0 (provider-dependent)\\n- 0.0 = deterministic, focused responses\\n- 0.7 = balanced (common default)\\n- 1.0+ = more creative/random\\n"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"itered_len":{"type":"integer"},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}`;
|
|
1526
|
+
{"OpenFlow":{"type":"object","description":"Top-level flow definition containing metadata, configuration, and the flow structure","properties":{"summary":{"type":"string","description":"Short description of what this flow does"},"description":{"type":"string","description":"Detailed documentation for this flow"},"value":{"$ref":"#/components/schemas/FlowValue"},"schema":{"type":"object","description":"JSON Schema for flow inputs. Use this to define input parameters, their types, defaults, and validation. For resource inputs, set type to 'object' and format to 'resource-<type>' (e.g., 'resource-stripe')"},"on_behalf_of_email":{"type":"string","description":"The flow will be run with the permissions of the user with this email."}},"required":["summary","value"]},"FlowValue":{"type":"object","description":"The flow structure containing modules and optional preprocessor/failure handlers","properties":{"modules":{"type":"array","description":"Array of steps that execute in sequence. Each step can be a script, subflow, loop, or branch","items":{"$ref":"#/components/schemas/FlowModule"}},"failure_module":{"description":"Special module that executes when the flow fails. Receives error object with message, name, stack, and step_id. Must have id 'failure'. Only supports script/rawscript types","$ref":"#/components/schemas/FlowModule"},"preprocessor_module":{"description":"Special module that runs before the first step on external triggers. Must have id 'preprocessor'. Only supports script/rawscript types. Cannot reference other step results","$ref":"#/components/schemas/FlowModule"},"same_worker":{"type":"boolean","description":"If true, all steps run on the same worker for better performance"},"concurrent_limit":{"type":"number","description":"Maximum number of concurrent executions of this flow"},"concurrency_key":{"type":"string","description":"Expression to group concurrent executions (e.g., by user ID)"},"concurrency_time_window_s":{"type":"number","description":"Time window in seconds for concurrent_limit"},"debounce_delay_s":{"type":"integer","description":"Delay in seconds to debounce flow executions"},"debounce_key":{"type":"string","description":"Expression to group debounced executions"},"debounce_args_to_accumulate":{"type":"array","description":"Arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"integer","description":"Maximum total time in seconds that a job can be debounced"},"max_total_debounces_amount":{"type":"integer","description":"Maximum number of times a job can be debounced"},"skip_expr":{"type":"string","description":"JavaScript expression to conditionally skip the entire flow"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for flow results"},"cache_ignore_s3_path":{"type":"boolean"},"flow_env":{"type":"object","description":"Environment variables available to all steps. Values can be strings, JSON values, or special references: '$var:path' (workspace variable) or '$res:path' (resource).","additionalProperties":{}},"priority":{"type":"number","description":"Execution priority (higher numbers run first)"},"early_return":{"type":"string","description":"JavaScript expression to return early from the flow"},"chat_input_enabled":{"type":"boolean","description":"Whether this flow accepts chat-style input"},"notes":{"type":"array","description":"Sticky notes attached to the flow","items":{"$ref":"#/components/schemas/FlowNote"}},"groups":{"type":"array","description":"Semantic groups of modules for organizational purposes","items":{"$ref":"#/components/schemas/FlowGroup"}}},"required":["modules"]},"Retry":{"type":"object","description":"Retry configuration for failed module executions","properties":{"constant":{"type":"object","description":"Retry with constant delay between attempts","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"seconds":{"type":"integer","description":"Seconds to wait between retries"}}},"exponential":{"type":"object","description":"Retry with exponential backoff (delay doubles each time)","properties":{"attempts":{"type":"integer","description":"Number of retry attempts"},"multiplier":{"type":"integer","description":"Multiplier for exponential backoff"},"seconds":{"type":"integer","minimum":1,"description":"Initial delay in seconds"},"random_factor":{"type":"integer","minimum":0,"maximum":100,"description":"Random jitter percentage (0-100) to avoid thundering herd"}}},"retry_if":{"$ref":"#/components/schemas/RetryIf"}}},"FlowNote":{"type":"object","description":"A sticky note attached to a flow for documentation and annotation","properties":{"id":{"type":"string","description":"Unique identifier for the note"},"text":{"type":"string","description":"Content of the note"},"position":{"type":"object","description":"Position of the note in the flow editor","properties":{"x":{"type":"number","description":"X coordinate"},"y":{"type":"number","description":"Y coordinate"}},"required":["x","y"]},"size":{"type":"object","description":"Size of the note in the flow editor","properties":{"width":{"type":"number","description":"Width in pixels"},"height":{"type":"number","description":"Height in pixels"}},"required":["width","height"]},"color":{"type":"string","description":"Color of the note (e.g., \\"yellow\\", \\"#ffff00\\")"},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes, 'group' for notes that group other nodes"},"locked":{"type":"boolean","default":false,"description":"Whether the note is locked and cannot be edited or moved"},"contained_node_ids":{"type":"array","items":{"type":"string"},"description":"For group notes, the IDs of nodes contained within this group"}},"required":["id","text","color","type"]},"FlowGroup":{"type":"object","description":"A semantic group of flow modules for organizational purposes. Does not affect execution \\u2014 modules remain in their original position in the flow. Groups provide naming and collapsibility in the editor. Members are computed dynamically from all nodes on paths between start_id and end_id.","properties":{"summary":{"type":"string","description":"Display name for this group"},"note":{"type":"string","description":"Markdown note shown below the group header"},"autocollapse":{"type":"boolean","default":false,"description":"If true, this group is collapsed by default in the flow editor. UI hint only."},"start_id":{"type":"string","description":"ID of the first flow module in this group (topological entry point)"},"end_id":{"type":"string","description":"ID of the last flow module in this group (topological exit point)"},"color":{"type":"string","description":"Color for the group in the flow editor"}},"required":["start_id","end_id"]},"RetryIf":{"type":"object","description":"Conditional retry based on error or result","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to retry. Has access to 'result' and 'error' variables"}},"required":["expr"]},"StopAfterIf":{"type":"object","description":"Early termination condition for a module","properties":{"skip_if_stopped":{"type":"boolean","description":"If true, following steps are skipped when this condition triggers"},"expr":{"type":"string","description":"JavaScript expression evaluated after the module runs. Can use 'result' (step's result) or 'flow_input'. Return true to stop"},"error_message":{"type":"string","nullable":true,"description":"Custom error message when stopping with an error. Mutually exclusive with skip_if_stopped. If set to a non-empty string, the flow stops with this error. If empty string, a default error message is used. If null or omitted, no error is raised."}},"required":["expr"]},"FlowModule":{"type":"object","description":"A single step in a flow. Can be a script, subflow, loop, or branch","properties":{"id":{"type":"string","description":"Unique identifier for this step. Used to reference results via 'results.step_id'. Must be a valid identifier (alphanumeric, underscore, hyphen)"},"value":{"$ref":"#/components/schemas/FlowModuleValue"},"stop_after_if":{"description":"Early termination condition evaluated after this step completes","$ref":"#/components/schemas/StopAfterIf"},"stop_after_all_iters_if":{"description":"For loops only - early termination condition evaluated after all iterations complete","$ref":"#/components/schemas/StopAfterIf"},"skip_if":{"type":"object","description":"Conditionally skip this step based on previous results or flow inputs","properties":{"expr":{"type":"string","description":"JavaScript expression that returns true to skip. Can use 'flow_input' or 'results.<step_id>'"}},"required":["expr"]},"sleep":{"description":"Delay before executing this step (in seconds or as expression)","$ref":"#/components/schemas/InputTransform"},"cache_ttl":{"type":"number","description":"Cache duration in seconds for this step's results"},"cache_ignore_s3_path":{"type":"boolean"},"timeout":{"description":"Maximum execution time in seconds (static value or expression)","$ref":"#/components/schemas/InputTransform"},"delete_after_use":{"type":"boolean","description":"If true, this step's result is deleted after use to save memory"},"summary":{"type":"string","description":"Short description of what this step does"},"mock":{"type":"object","description":"Mock configuration for testing without executing the actual step","properties":{"enabled":{"type":"boolean","description":"If true, return mock value instead of executing"},"return_value":{"description":"Value to return when mocked"}}},"suspend":{"type":"object","description":"Configuration for approval/resume steps that wait for user input","properties":{"required_events":{"type":"integer","description":"Number of approvals required before continuing"},"timeout":{"type":"integer","description":"Timeout in seconds before auto-continuing or canceling"},"resume_form":{"type":"object","description":"Form schema for collecting input when resuming","properties":{"schema":{"type":"object","description":"JSON Schema for the resume form"}}},"user_auth_required":{"type":"boolean","description":"If true, only authenticated users can approve"},"user_groups_required":{"description":"Expression or list of groups that can approve","$ref":"#/components/schemas/InputTransform"},"self_approval_disabled":{"type":"boolean","description":"If true, the user who started the flow cannot approve"},"hide_cancel":{"type":"boolean","description":"If true, hide the cancel button on the approval form"},"continue_on_disapprove_timeout":{"type":"boolean","description":"If true, continue flow on timeout instead of canceling"}}},"priority":{"type":"number","description":"Execution priority for this step (higher numbers run first)"},"continue_on_error":{"type":"boolean","description":"If true, flow continues even if this step fails"},"retry":{"description":"Retry configuration if this step fails","$ref":"#/components/schemas/Retry"},"debouncing":{"description":"Debounce configuration for this step (EE only)","type":"object","properties":{"debounce_delay_s":{"type":"integer","description":"Delay in seconds to debounce this step's executions across flow runs"},"debounce_key":{"type":"string","description":"Expression to group debounced executions. Supports $workspace and $args[name]. Default: $workspace/flow/<flow_path>-<step_id>"},"debounce_args_to_accumulate":{"type":"array","description":"Array-type arguments to accumulate across debounced executions","items":{"type":"string"}},"max_total_debouncing_time":{"type":"integer","description":"Maximum total time in seconds before forced execution"},"max_total_debounces_amount":{"type":"integer","description":"Maximum number of debounces before forced execution"}}}},"required":["value","id"]},"InputTransform":{"description":"Maps input parameters for a step. Can be a static value or a JavaScript expression that references previous results or flow inputs","oneOf":[{"$ref":"#/components/schemas/StaticTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"StaticTransform":{"type":"object","description":"Static value passed directly to the step. Use for hardcoded values or resource references like '$res:path/to/resource'","properties":{"value":{"description":"The static value. For resources, use format '$res:path/to/resource'"},"type":{"type":"string","enum":["static"]}},"required":["type"]},"JavascriptTransform":{"type":"object","description":"JavaScript expression evaluated at runtime. Can reference previous step results via 'results.step_id' or flow inputs via 'flow_input.property'. Inside loops, use 'flow_input.iter.value' for the current iteration value","properties":{"expr":{"type":"string","description":"JavaScript expression returning the value. Available variables - results (object with all previous step results), flow_input (flow inputs), flow_input.iter (in loops)"},"type":{"type":"string","enum":["javascript"]}},"required":["expr","type"]},"AiTransform":{"type":"object","description":"Value resolved by the AI runtime for this input. The AI engine decides how to satisfy the parameter.","properties":{"type":{"type":"string","enum":["ai"]}},"required":["type"]},"AIProviderKind":{"type":"string","description":"Supported AI provider types","enum":["openai","azure_openai","anthropic","mistral","deepseek","googleai","groq","openrouter","togetherai","customai","aws_bedrock"]},"ProviderConfig":{"type":"object","description":"Complete AI provider configuration with resource reference and model selection","properties":{"kind":{"$ref":"#/components/schemas/AIProviderKind"},"resource":{"type":"string","description":"Resource reference in format '$res:{resource_path}' pointing to provider credentials"},"model":{"type":"string","description":"Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229', 'gemini-pro')"}},"required":["kind","resource","model"]},"StaticProviderTransform":{"type":"object","description":"Static provider configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/ProviderConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"ProviderTransform":{"description":"Provider configuration - can be static (ProviderConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticProviderTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticProviderTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"MemoryOff":{"type":"object","description":"No conversation memory/context","properties":{"kind":{"type":"string","enum":["off"]}},"required":["kind"]},"MemoryAuto":{"type":"object","description":"Automatic context management","properties":{"kind":{"type":"string","enum":["auto"]},"context_length":{"type":"integer","description":"Maximum number of messages to retain in context"},"memory_id":{"type":"string","description":"Identifier for persistent memory across agent invocations"}},"required":["kind"]},"MemoryMessage":{"type":"object","description":"A single message in conversation history","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"type":"string"}},"required":["role","content"]},"MemoryManual":{"type":"object","description":"Explicit message history","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Conversation memory configuration","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind","mapping":{"off":"#/components/schemas/MemoryOff","auto":"#/components/schemas/MemoryAuto","manual":"#/components/schemas/MemoryManual"}}},"StaticMemoryTransform":{"type":"object","description":"Static memory configuration passed directly to the AI agent","properties":{"value":{"$ref":"#/components/schemas/MemoryConfig"},"type":{"type":"string","enum":["static"]}},"required":["type","value"]},"MemoryTransform":{"description":"Memory configuration - can be static (MemoryConfig), JavaScript expression, or AI-determined","oneOf":[{"$ref":"#/components/schemas/StaticMemoryTransform"},{"$ref":"#/components/schemas/JavascriptTransform"},{"$ref":"#/components/schemas/AiTransform"}],"discriminator":{"propertyName":"type","mapping":{"static":"#/components/schemas/StaticMemoryTransform","javascript":"#/components/schemas/JavascriptTransform","ai":"#/components/schemas/AiTransform"}}},"FlowModuleValue":{"description":"The actual implementation of a flow step. Can be a script (inline or referenced), subflow, loop, branch, or special module type","oneOf":[{"$ref":"#/components/schemas/RawScript"},{"$ref":"#/components/schemas/PathScript"},{"$ref":"#/components/schemas/PathFlow"},{"$ref":"#/components/schemas/ForloopFlow"},{"$ref":"#/components/schemas/WhileloopFlow"},{"$ref":"#/components/schemas/BranchOne"},{"$ref":"#/components/schemas/BranchAll"},{"$ref":"#/components/schemas/Identity"},{"$ref":"#/components/schemas/AiAgent"}],"discriminator":{"propertyName":"type","mapping":{"rawscript":"#/components/schemas/RawScript","script":"#/components/schemas/PathScript","flow":"#/components/schemas/PathFlow","forloopflow":"#/components/schemas/ForloopFlow","whileloopflow":"#/components/schemas/WhileloopFlow","branchone":"#/components/schemas/BranchOne","branchall":"#/components/schemas/BranchAll","identity":"#/components/schemas/Identity","aiagent":"#/components/schemas/AiAgent"}}},"RawScript":{"type":"object","description":"Inline script with code defined directly in the flow. Use 'bun' as default language if unspecified. The script receives arguments from input_transforms","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"content":{"type":"string","description":"The script source code. Should export a 'main' function"},"language":{"type":"string","description":"Programming language for this script","enum":["deno","bun","python3","go","bash","powershell","postgresql","mysql","bigquery","snowflake","mssql","oracledb","graphql","nativets","php","rust","ansible","csharp","nu","java","ruby","rlang","duckdb"]},"path":{"type":"string","description":"Optional path for saving this script"},"lock":{"type":"string","description":"Lock file content for dependencies"},"type":{"type":"string","enum":["rawscript"]},"tag":{"type":"string","description":"Worker group tag for execution routing"},"concurrent_limit":{"type":"number","description":"Maximum concurrent executions of this script"},"concurrency_time_window_s":{"type":"number","description":"Time window for concurrent_limit"},"custom_concurrency_key":{"type":"string","description":"Custom key for grouping concurrent executions"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"},"assets":{"type":"array","description":"External resources this script accesses (S3 objects, resources, etc.)","items":{"type":"object","required":["path","kind"],"properties":{"path":{"type":"string","description":"Path to the asset"},"kind":{"type":"string","description":"Type of asset","enum":["s3object","resource","ducklake","datatable","volume"]},"access_type":{"type":"string","nullable":true,"description":"Access level for this asset","enum":["r","w","rw"]},"alt_access_type":{"type":"string","nullable":true,"description":"Alternative access level","enum":["r","w","rw"]}}}}},"required":["type","content","language","input_transforms"]},"PathScript":{"type":"object","description":"Reference to an existing script by path. Use this when calling a previously saved script instead of writing inline code","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the script's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the script in the workspace (e.g., 'f/scripts/send_email')"},"hash":{"type":"string","description":"Optional specific version hash of the script to use"},"type":{"type":"string","enum":["script"]},"tag_override":{"type":"string","description":"Override the script's default worker group tag"},"is_trigger":{"type":"boolean","description":"If true, this script is a trigger that can start the flow"}},"required":["type","path","input_transforms"]},"PathFlow":{"type":"object","description":"Reference to an existing flow by path. Use this to call another flow as a subflow","properties":{"input_transforms":{"type":"object","description":"Map of parameter names to their values (static or JavaScript expressions). These become the subflow's input arguments","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}},"path":{"type":"string","description":"Path to the flow in the workspace (e.g., 'f/flows/process_user')"},"type":{"type":"string","enum":["flow"]}},"required":["type","path","input_transforms"]},"ForloopFlow":{"type":"object","description":"Executes nested modules in a loop over an iterator. Inside the loop, use 'flow_input.iter.value' to access the current iteration value, and 'flow_input.iter.index' for the index. Supports parallel execution for better performance on I/O-bound operations","properties":{"modules":{"type":"array","description":"Steps to execute for each iteration. These can reference the iteration value via 'flow_input.iter.value'","items":{"$ref":"#/components/schemas/FlowModule"}},"iterator":{"description":"JavaScript expression that returns an array to iterate over. Can reference 'results.step_id' or 'flow_input'","$ref":"#/components/schemas/InputTransform"},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["forloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (faster for I/O-bound operations). Use with parallelism to control concurrency"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true. Limits resource usage. Can be static number or expression","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","iterator","skip_failures","type"]},"WhileloopFlow":{"type":"object","description":"Executes nested modules repeatedly while a condition is true. The loop checks the condition after each iteration. Use stop_after_if on modules to control loop termination","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration. Use stop_after_if to control when the loop ends","items":{"$ref":"#/components/schemas/FlowModule"}},"skip_failures":{"type":"boolean","description":"If true, iteration failures don't stop the loop. Failed iterations return null"},"type":{"type":"string","enum":["whileloopflow"]},"parallel":{"type":"boolean","description":"If true, iterations run concurrently (use with caution in while loops)"},"parallelism":{"description":"Maximum number of concurrent iterations when parallel=true","$ref":"#/components/schemas/InputTransform"},"squash":{"type":"boolean"}},"required":["modules","skip_failures","type"]},"BranchOne":{"type":"object","description":"Conditional branching where only the first matching branch executes. Branches are evaluated in order, and the first one with a true expression runs. If no branches match, the default branch executes","properties":{"branches":{"type":"array","description":"Array of branches to evaluate in order. The first branch with expr evaluating to true executes","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch condition"},"expr":{"type":"string","description":"JavaScript expression that returns boolean. Can use 'results.step_id' or 'flow_input'. First true expr wins"},"modules":{"type":"array","description":"Steps to execute if this branch's expr is true","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules","expr"]}},"default":{"type":"array","description":"Steps to execute if no branch expressions match","items":{"$ref":"#/components/schemas/FlowModule"}},"type":{"type":"string","enum":["branchone"]}},"required":["branches","default","type"]},"BranchAll":{"type":"object","description":"Parallel branching where all branches execute simultaneously. Unlike BranchOne, all branches run regardless of conditions. Useful for executing independent tasks concurrently","properties":{"branches":{"type":"array","description":"Array of branches that all execute (either in parallel or sequentially)","items":{"type":"object","properties":{"summary":{"type":"string","description":"Short description of this branch's purpose"},"skip_failure":{"type":"boolean","description":"If true, failure in this branch doesn't fail the entire flow"},"modules":{"type":"array","description":"Steps to execute in this branch","items":{"$ref":"#/components/schemas/FlowModule"}}},"required":["modules"]}},"type":{"type":"string","enum":["branchall"]},"parallel":{"type":"boolean","description":"If true, all branches execute concurrently. If false, they execute sequentially"}},"required":["branches","type"]},"AgentTool":{"type":"object","description":"A tool available to an AI agent. Can be a flow module or an external MCP (Model Context Protocol) tool","properties":{"id":{"type":"string","description":"Unique identifier for this tool. Cannot contain spaces - use underscores instead (e.g., 'get_user_data' not 'get user data')"},"summary":{"type":"string","description":"Short description of what this tool does (shown to the AI)"},"value":{"$ref":"#/components/schemas/ToolValue"}},"required":["id","value"]},"ToolValue":{"description":"The implementation of a tool. Can be a flow module (script/flow) or an MCP tool reference","oneOf":[{"$ref":"#/components/schemas/FlowModuleTool"},{"$ref":"#/components/schemas/McpToolValue"},{"$ref":"#/components/schemas/WebsearchToolValue"}],"discriminator":{"propertyName":"tool_type","mapping":{"flowmodule":"#/components/schemas/FlowModuleTool","mcp":"#/components/schemas/McpToolValue","websearch":"#/components/schemas/WebsearchToolValue"}}},"FlowModuleTool":{"description":"A tool implemented as a flow module (script, flow, etc.). The AI can call this like any other flow module","allOf":[{"type":"object","properties":{"tool_type":{"type":"string","enum":["flowmodule"]}},"required":["tool_type"]},{"$ref":"#/components/schemas/FlowModuleValue"}]},"WebsearchToolValue":{"type":"object","description":"A tool implemented as a websearch tool. The AI can call this like any other websearch tool","properties":{"tool_type":{"type":"string","enum":["websearch"]}},"required":["tool_type"]},"McpToolValue":{"type":"object","description":"Reference to an external MCP (Model Context Protocol) tool. The AI can call tools from MCP servers","properties":{"tool_type":{"type":"string","enum":["mcp"]},"resource_path":{"type":"string","description":"Path to the MCP resource/server configuration"},"include_tools":{"type":"array","description":"Whitelist of specific tools to include from this MCP server","items":{"type":"string"}},"exclude_tools":{"type":"array","description":"Blacklist of tools to exclude from this MCP server","items":{"type":"string"}}},"required":["tool_type","resource_path"]},"AiAgent":{"type":"object","description":"AI agent step that can use tools to accomplish tasks. The agent receives inputs and can call any of its configured tools to complete the task","properties":{"input_transforms":{"type":"object","description":"Input parameters for the AI agent mapped to their values","properties":{"provider":{"$ref":"#/components/schemas/ProviderTransform"},"output_type":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Output format type.\\nValid values: 'text' (default) - plain text response, 'image' - image generation\\n"},"user_message":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"The user's prompt/message to the AI agent. Supports variable interpolation with flow.input syntax."},"system_prompt":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"System instructions that guide the AI's behavior, persona, and response style. Optional."},"streaming":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Boolean. If true, stream the AI response incrementally.\\nStreaming events include: token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"output_schema":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"JSON Schema object defining structured output format. Used when you need the AI to return data in a specific shape.\\nSupports standard JSON Schema properties: type, properties, required, items, enum, pattern, minLength, maxLength, minimum, maximum, etc.\\nExample: { type: 'object', properties: { name: { type: 'string' }, age: { type: 'integer' } }, required: ['name'] }\\n"},"user_attachments":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of file references (images or PDFs) for the AI agent.\\nFormat: Array<{ bucket: string, key: string }> - S3 object references\\nExample: [{ bucket: 'my-bucket', key: 'documents/report.pdf' }]\\n"},"max_completion_tokens":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Integer. Maximum number of tokens the AI will generate in its response.\\nRange: 1 to 4,294,967,295. Typical values: 256-4096 for most use cases.\\n"},"temperature":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Float. Controls randomness/creativity of responses.\\nRange: 0.0 to 2.0 (provider-dependent)\\n- 0.0 = deterministic, focused responses\\n- 0.7 = balanced (common default)\\n- 1.0+ = more creative/random\\n"}},"required":["provider","user_message","output_type"]},"tools":{"type":"array","description":"Array of tools the agent can use. The agent decides which tools to call based on the task","items":{"$ref":"#/components/schemas/AgentTool"}},"type":{"type":"string","enum":["aiagent"]},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["tools","type","input_transforms"]},"Identity":{"type":"object","description":"Pass-through module that returns its input unchanged. Useful for flow structure or as a placeholder","properties":{"type":{"type":"string","enum":["identity"]},"flow":{"type":"boolean","description":"If true, marks this as a flow identity (special handling)"}},"required":["type"]},"FlowStatus":{"type":"object","properties":{"step":{"type":"integer"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/FlowStatusModule"}},"user_states":{"additionalProperties":true},"preprocessor_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"}]},"failure_module":{"allOf":[{"$ref":"#/components/schemas/FlowStatusModule"},{"type":"object","properties":{"parent_module":{"type":"string"}}}]},"retry":{"type":"object","properties":{"fail_count":{"type":"integer"},"failed_jobs":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"required":["step","modules","failure_module"]},"FlowStatusModule":{"type":"object","properties":{"type":{"type":"string","enum":["WaitingForPriorSteps","WaitingForEvents","WaitingForExecutor","InProgress","Success","Failure"]},"id":{"type":"string"},"job":{"type":"string","format":"uuid"},"count":{"type":"integer"},"progress":{"type":"integer"},"iterator":{"type":"object","properties":{"index":{"type":"integer"},"itered":{"type":"array","items":{}},"itered_len":{"type":"integer"},"args":{}}},"flow_jobs":{"type":"array","items":{"type":"string"}},"flow_jobs_success":{"type":"array","items":{"type":"boolean"}},"flow_jobs_duration":{"type":"object","properties":{"started_at":{"type":"array","items":{"type":"string"}},"duration_ms":{"type":"array","items":{"type":"integer"}}}},"branch_chosen":{"type":"object","properties":{"type":{"type":"string","enum":["branch","default"]},"branch":{"type":"integer"}},"required":["type"]},"branchall":{"type":"object","properties":{"branch":{"type":"integer"},"len":{"type":"integer"}},"required":["branch","len"]},"approvers":{"type":"array","items":{"type":"object","properties":{"resume_id":{"type":"integer"},"approver":{"type":"string"}},"required":["resume_id","approver"]}},"failed_retries":{"type":"array","items":{"type":"string","format":"uuid"}},"skipped":{"type":"boolean"},"agent_actions":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"type":{"type":"string","enum":["tool_call"]},"module_id":{"type":"string"}},"required":["job_id","function_name","type","module_id"]},{"type":"object","properties":{"call_id":{"type":"string","format":"uuid"},"function_name":{"type":"string"},"resource_path":{"type":"string"},"type":{"type":"string","enum":["mcp_tool_call"]},"arguments":{"type":"object"}},"required":["call_id","function_name","resource_path","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]}},"required":["content","type"]}]}},"agent_actions_success":{"type":"array","items":{"type":"boolean"}}},"required":["type"]}}`;
|
|
1520
1527
|
export const CLI_COMMANDS = `# Windmill CLI Commands
|
|
1521
1528
|
|
|
1522
1529
|
The Windmill CLI (\`wmill\`) provides commands for managing scripts, flows, apps, and other resources.
|
|
@@ -1555,10 +1562,23 @@ app related commands
|
|
|
1555
1562
|
- \`--fix\` - Attempt to fix common issues (not implemented yet)
|
|
1556
1563
|
- \`app new\` - create a new raw app from a template
|
|
1557
1564
|
- \`app generate-agents [app_folder:string]\` - regenerate AGENTS.md and DATATABLES.md from remote workspace
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1565
|
+
|
|
1566
|
+
### audit
|
|
1567
|
+
|
|
1568
|
+
View audit logs (requires admin)
|
|
1569
|
+
|
|
1570
|
+
**Subcommands:**
|
|
1571
|
+
|
|
1572
|
+
- \`audit list\` - List audit log entries
|
|
1573
|
+
- \`audit get <id:string>\` - Get a specific audit log entry
|
|
1574
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1575
|
+
|
|
1576
|
+
### config
|
|
1577
|
+
|
|
1578
|
+
Show all available wmill.yaml configuration options
|
|
1579
|
+
|
|
1580
|
+
**Options:**
|
|
1581
|
+
- \`--json\` - Output as JSON for programmatic consumption
|
|
1562
1582
|
|
|
1563
1583
|
### dependencies
|
|
1564
1584
|
|
|
@@ -1572,14 +1592,14 @@ workspace dependencies related commands
|
|
|
1572
1592
|
|
|
1573
1593
|
### dev
|
|
1574
1594
|
|
|
1575
|
-
Launch a dev server that
|
|
1595
|
+
Launch a dev server that watches for local file changes and auto-pushes them to the remote workspace. Provides live reload for scripts and flows during development.
|
|
1576
1596
|
|
|
1577
1597
|
**Options:**
|
|
1578
1598
|
- \`--includes <pattern...:string>\` - Filter paths givena glob pattern or path
|
|
1579
1599
|
|
|
1580
1600
|
### docs
|
|
1581
1601
|
|
|
1582
|
-
Search Windmill documentation.
|
|
1602
|
+
Search Windmill documentation.
|
|
1583
1603
|
|
|
1584
1604
|
**Arguments:** \`<query:string>\`
|
|
1585
1605
|
|
|
@@ -1602,6 +1622,7 @@ flow related commands
|
|
|
1602
1622
|
- \`flow get <path:string>\` - get a flow's details
|
|
1603
1623
|
- \`--json\` - Output as JSON (for piping to jq)
|
|
1604
1624
|
- \`flow push <file_path:string> <remote_path:string>\` - push a local flow spec. This overrides any remote versions.
|
|
1625
|
+
- \`--message <message:string>\` - Deployment message
|
|
1605
1626
|
- \`flow run <path:string>\` - run a flow by path.
|
|
1606
1627
|
- \`-d --data <data:string>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1607
1628
|
- \`-s --silent\` - Do not ouput anything other then the final output. Useful for scripting.
|
|
@@ -1609,17 +1630,16 @@ flow related commands
|
|
|
1609
1630
|
- \`-d --data <data:string>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1610
1631
|
- \`-s --silent\` - Do not output anything other then the final output. Useful for scripting.
|
|
1611
1632
|
- \`--remote\` - Use deployed workspace scripts for PathScript steps instead of local files.
|
|
1612
|
-
- \`flow generate-locks [flow:file]\` - re-generate the lock files of all inline scripts of all updated flows
|
|
1613
|
-
- \`--yes\` - Skip confirmation prompt
|
|
1614
|
-
- \`--dry-run\` - Perform a dry run without making changes
|
|
1615
|
-
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
|
|
1616
|
-
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
|
|
1617
1633
|
- \`flow new <flow_path:string>\` - create a new empty flow
|
|
1618
1634
|
- \`--summary <summary:string>\` - flow summary
|
|
1619
1635
|
- \`--description <description:string>\` - flow description
|
|
1620
|
-
- \`flow bootstrap <flow_path:string>\` - create a new empty flow (alias for new
|
|
1636
|
+
- \`flow bootstrap <flow_path:string>\` - create a new empty flow (alias for new)
|
|
1621
1637
|
- \`--summary <summary:string>\` - flow summary
|
|
1622
1638
|
- \`--description <description:string>\` - flow description
|
|
1639
|
+
- \`flow history <path:string>\` - Show version history for a flow
|
|
1640
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1641
|
+
- \`flow show-version <path:string> <version:string>\` - Show a specific version of a flow
|
|
1642
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1623
1643
|
|
|
1624
1644
|
### folder
|
|
1625
1645
|
|
|
@@ -1682,6 +1702,25 @@ Manage git-sync settings between local wmill.yaml and Windmill backend
|
|
|
1682
1702
|
- \`--yes\` - Skip interactive prompts and use default behavior
|
|
1683
1703
|
- \`--promotion <branch:string>\` - Use promotionOverrides from the specified branch instead of regular overrides
|
|
1684
1704
|
|
|
1705
|
+
### group
|
|
1706
|
+
|
|
1707
|
+
Manage workspace groups
|
|
1708
|
+
|
|
1709
|
+
**Options:**
|
|
1710
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1711
|
+
|
|
1712
|
+
**Subcommands:**
|
|
1713
|
+
|
|
1714
|
+
- \`group list\` - List all groups in the workspace
|
|
1715
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1716
|
+
- \`group get <name:string>\` - Get group details and members
|
|
1717
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1718
|
+
- \`group create <name:string>\` - Create a new group
|
|
1719
|
+
- \`--summary <summary:string>\` - Group summary/description
|
|
1720
|
+
- \`group delete <name:string>\` - Delete a group
|
|
1721
|
+
- \`group add-user <name:string> <username:string>\` - Add a user to a group
|
|
1722
|
+
- \`group remove-user <name:string> <username:string>\` - Remove a user from a group
|
|
1723
|
+
|
|
1685
1724
|
### hub
|
|
1686
1725
|
|
|
1687
1726
|
Hub related commands. EXPERIMENTAL. INTERNAL USE ONLY.
|
|
@@ -1737,8 +1776,23 @@ sync local with a remote instance or the opposite (push or pull)
|
|
|
1737
1776
|
- \`instance whoami\` - Display information about the currently logged-in user
|
|
1738
1777
|
- \`instance get-config\` - Dump the current instance config (global settings + worker configs) as YAML
|
|
1739
1778
|
- \`-o, --output-file <file:string>\` - Write YAML to a file instead of stdout
|
|
1779
|
+
- \`--show-secrets\` - Include sensitive fields (license key, JWT secret) without prompting
|
|
1740
1780
|
- \`--instance <instance:string>\` - Name of the instance, override the active instance
|
|
1741
1781
|
|
|
1782
|
+
### job
|
|
1783
|
+
|
|
1784
|
+
Manage jobs (list, inspect, cancel)
|
|
1785
|
+
|
|
1786
|
+
**Subcommands:**
|
|
1787
|
+
|
|
1788
|
+
- \`job list\` - List recent jobs
|
|
1789
|
+
- \`job get <id:string>\` - Get job details. For flows: shows step tree with sub-job IDs
|
|
1790
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1791
|
+
- \`job result <id:string>\` - Get the result of a completed job (machine-friendly)
|
|
1792
|
+
- \`job logs <id:string>\` - Get job logs. For flows: aggregates all step logs
|
|
1793
|
+
- \`job cancel <id:string>\` - Cancel a running or queued job
|
|
1794
|
+
- \`--reason <reason:string>\` - Reason for cancellation
|
|
1795
|
+
|
|
1742
1796
|
### jobs
|
|
1743
1797
|
|
|
1744
1798
|
Pull completed and queued jobs from workspace
|
|
@@ -1765,6 +1819,7 @@ Validate Windmill flow, schedule, and trigger YAML files in a directory
|
|
|
1765
1819
|
- \`--json\` - Output results in JSON format
|
|
1766
1820
|
- \`--fail-on-warn\` - Exit with code 1 when warnings are emitted
|
|
1767
1821
|
- \`--locks-required\` - Fail if scripts or flow inline scripts that need locks have no locks
|
|
1822
|
+
- \`-w, --watch\` - Watch for file changes and re-lint automatically
|
|
1768
1823
|
|
|
1769
1824
|
### queues
|
|
1770
1825
|
|
|
@@ -1825,24 +1880,27 @@ schedule related commands
|
|
|
1825
1880
|
- \`--json\` - Output as JSON (for piping to jq)
|
|
1826
1881
|
- \`schedule new <path:string>\` - create a new schedule locally
|
|
1827
1882
|
- \`schedule push <file_path:string> <remote_path:string>\` - push a local schedule spec. This overrides any remote versions.
|
|
1883
|
+
- \`schedule enable <path:string>\` - Enable a schedule
|
|
1884
|
+
- \`schedule disable <path:string>\` - Disable a schedule
|
|
1828
1885
|
|
|
1829
1886
|
### script
|
|
1830
1887
|
|
|
1831
1888
|
script related commands
|
|
1832
1889
|
|
|
1833
1890
|
**Options:**
|
|
1834
|
-
- \`--show-archived\` -
|
|
1891
|
+
- \`--show-archived\` - Show archived scripts instead of active ones
|
|
1835
1892
|
- \`--json\` - Output as JSON (for piping to jq)
|
|
1836
1893
|
|
|
1837
1894
|
**Subcommands:**
|
|
1838
1895
|
|
|
1839
1896
|
- \`script list\` - list all scripts
|
|
1840
|
-
- \`--show-archived\` -
|
|
1897
|
+
- \`--show-archived\` - Show archived scripts instead of active ones
|
|
1841
1898
|
- \`--json\` - Output as JSON (for piping to jq)
|
|
1842
|
-
- \`script push <path:file>\` - push a local script spec. This overrides any remote versions. Use the script file (.ts, .js, .py, .sh
|
|
1899
|
+
- \`script push <path:file>\` - push a local script spec. This overrides any remote versions. Use the script file (.ts, .js, .py, .sh)
|
|
1900
|
+
- \`--message <message:string>\` - Deployment message
|
|
1843
1901
|
- \`script get <path:file>\` - get a script's details
|
|
1844
1902
|
- \`--json\` - Output as JSON (for piping to jq)
|
|
1845
|
-
- \`script show <path:file>\` - show a script's content (alias for get
|
|
1903
|
+
- \`script show <path:file>\` - show a script's content (alias for get)
|
|
1846
1904
|
- \`script run <path:file>\` - run a script by path
|
|
1847
1905
|
- \`-d --data <data:file>\` - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
|
|
1848
1906
|
- \`-s --silent\` - Do not output anything other then the final output. Useful for scripting.
|
|
@@ -1852,16 +1910,11 @@ script related commands
|
|
|
1852
1910
|
- \`script new <path:file> <language:string>\` - create a new script
|
|
1853
1911
|
- \`--summary <summary:string>\` - script summary
|
|
1854
1912
|
- \`--description <description:string>\` - script description
|
|
1855
|
-
- \`script bootstrap <path:file> <language:string>\` - create a new script (alias for new
|
|
1913
|
+
- \`script bootstrap <path:file> <language:string>\` - create a new script (alias for new)
|
|
1856
1914
|
- \`--summary <summary:string>\` - script summary
|
|
1857
1915
|
- \`--description <description:string>\` - script description
|
|
1858
|
-
- \`script
|
|
1859
|
-
- \`--
|
|
1860
|
-
- \`--dry-run\` - Perform a dry run without making changes
|
|
1861
|
-
- \`--lock-only\` - re-generate only the lock
|
|
1862
|
-
- \`--schema-only\` - re-generate only script schema
|
|
1863
|
-
- \`-i --includes <patterns:file[]>\` - Comma separated patterns to specify which file to take into account (among files that are compatible with windmill). Patterns can include * (any string until '/') and ** (any string)
|
|
1864
|
-
- \`-e --excludes <patterns:file[]>\` - Comma separated patterns to specify which file to NOT take into account.
|
|
1916
|
+
- \`script history <path:string>\` - show version history for a script
|
|
1917
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1865
1918
|
|
|
1866
1919
|
### sync
|
|
1867
1920
|
|
|
@@ -1876,6 +1929,7 @@ sync local with a remote workspaces or the opposite (push or pull)
|
|
|
1876
1929
|
- \`--json\` - Use JSON instead of YAML
|
|
1877
1930
|
- \`--skip-variables\` - Skip syncing variables (including secrets)
|
|
1878
1931
|
- \`--skip-secrets\` - Skip syncing only secrets variables
|
|
1932
|
+
- \`--include-secrets\` - Include secrets in sync (overrides skipSecrets in wmill.yaml)
|
|
1879
1933
|
- \`--skip-resources\` - Skip syncing resources
|
|
1880
1934
|
- \`--skip-resource-types\` - Skip syncing resource types
|
|
1881
1935
|
- \`--skip-scripts\` - Skip syncing scripts
|
|
@@ -1905,6 +1959,7 @@ sync local with a remote workspaces or the opposite (push or pull)
|
|
|
1905
1959
|
- \`--json\` - Use JSON instead of YAML
|
|
1906
1960
|
- \`--skip-variables\` - Skip syncing variables (including secrets)
|
|
1907
1961
|
- \`--skip-secrets\` - Skip syncing only secrets variables
|
|
1962
|
+
- \`--include-secrets\` - Include secrets in sync (overrides skipSecrets in wmill.yaml)
|
|
1908
1963
|
- \`--skip-resources\` - Skip syncing resources
|
|
1909
1964
|
- \`--skip-resource-types\` - Skip syncing resource types
|
|
1910
1965
|
- \`--skip-scripts\` - Skip syncing scripts
|
|
@@ -1930,6 +1985,23 @@ sync local with a remote workspaces or the opposite (push or pull)
|
|
|
1930
1985
|
- \`--branch, --env <branch:string>\` - Override the current git branch/environment (works even outside a git repository)
|
|
1931
1986
|
- \`--lint\` - Run lint validation before pushing
|
|
1932
1987
|
- \`--locks-required\` - Fail if scripts or flow inline scripts that need locks have no locks
|
|
1988
|
+
- \`--auto-metadata\` - Automatically regenerate stale metadata (locks and schemas) before pushing
|
|
1989
|
+
|
|
1990
|
+
### token
|
|
1991
|
+
|
|
1992
|
+
Manage API tokens
|
|
1993
|
+
|
|
1994
|
+
**Options:**
|
|
1995
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
1996
|
+
|
|
1997
|
+
**Subcommands:**
|
|
1998
|
+
|
|
1999
|
+
- \`token list\` - List API tokens
|
|
2000
|
+
- \`--json\` - Output as JSON (for piping to jq)
|
|
2001
|
+
- \`token create\` - Create a new API token
|
|
2002
|
+
- \`--label <label:string>\` - Token label
|
|
2003
|
+
- \`--expiration <expiration:string>\` - Token expiration (ISO 8601 timestamp)
|
|
2004
|
+
- \`token delete <token_prefix:string>\` - Delete a token by its prefix
|
|
1933
2005
|
|
|
1934
2006
|
### trigger
|
|
1935
2007
|
|
|
@@ -1960,7 +2032,7 @@ user related commands
|
|
|
1960
2032
|
- \`--company <company:string>\` - Specify to set the company of the new user.
|
|
1961
2033
|
- \`--name <name:string>\` - Specify to set the name of the new user.
|
|
1962
2034
|
- \`user remove <email:string>\` - Delete a user
|
|
1963
|
-
- \`user create-token\`
|
|
2035
|
+
- \`user create-token\` - Create a new API token for the authenticated user
|
|
1964
2036
|
- \`--email <email:string>\` - Specify credentials to use for authentication. This will not be stored. It will only be used to exchange for a token with the API server, which will not be stored either.
|
|
1965
2037
|
- \`--password <password:string>\` - Specify credentials to use for authentication. This will not be stored. It will only be used to exchange for a token with the API server, which will not be stored either.
|
|
1966
2038
|
|
|
@@ -2028,7 +2100,8 @@ workspace related commands
|
|
|
2028
2100
|
- \`workspace whoami\` - Show the currently active user
|
|
2029
2101
|
- \`workspace list\` - List local workspace profiles
|
|
2030
2102
|
- \`workspace list-remote\` - List workspaces on the remote server that you have access to
|
|
2031
|
-
- \`workspace
|
|
2103
|
+
- \`workspace list-forks\` - List forked workspaces on the remote server
|
|
2104
|
+
- \`workspace bind\` - Bind the current Git branch to the active workspace. This adds the branch to gitBranches in wmill.yaml so sync operations use the correct workspace for each branch.
|
|
2032
2105
|
- \`--branch, --env <branch:string>\` - Specify branch/environment (defaults to current)
|
|
2033
2106
|
- \`workspace unbind\` - Remove workspace binding from the current Git branch
|
|
2034
2107
|
- \`--branch, --env <branch:string>\` - Specify branch/environment (defaults to current)
|
|
@@ -3026,6 +3099,92 @@ result: S3Object = wmill.write_s3_file(
|
|
|
3026
3099
|
)
|
|
3027
3100
|
\`\`\`
|
|
3028
3101
|
`;
|
|
3102
|
+
export const LANG_RLANG = `# R
|
|
3103
|
+
|
|
3104
|
+
## Structure
|
|
3105
|
+
|
|
3106
|
+
Define a \`main\` function using \`<-\` or \`=\` assignment. Parameters become the script inputs:
|
|
3107
|
+
|
|
3108
|
+
\`\`\`r
|
|
3109
|
+
library(dplyr)
|
|
3110
|
+
library(jsonlite)
|
|
3111
|
+
|
|
3112
|
+
main <- function(x, name = "default", flag = TRUE) {
|
|
3113
|
+
df <- tibble(x = x, name = name)
|
|
3114
|
+
result <- df %>% mutate(greeting = paste("Hello", name))
|
|
3115
|
+
return(toJSON(result, auto_unbox = TRUE))
|
|
3116
|
+
}
|
|
3117
|
+
\`\`\`
|
|
3118
|
+
|
|
3119
|
+
**Important:**
|
|
3120
|
+
- The \`main\` function is required
|
|
3121
|
+
- Use \`library()\` to load packages — they are resolved and installed automatically
|
|
3122
|
+
- \`jsonlite\` is always available (used internally for argument parsing)
|
|
3123
|
+
- Return values must be JSON-serializable
|
|
3124
|
+
|
|
3125
|
+
## Parameters
|
|
3126
|
+
|
|
3127
|
+
R types map to Windmill types:
|
|
3128
|
+
- \`numeric\` → float/int
|
|
3129
|
+
- \`character\` → string
|
|
3130
|
+
- \`logical\` → bool (use \`TRUE\`/\`FALSE\`)
|
|
3131
|
+
- \`list\` → object/dict
|
|
3132
|
+
- \`NULL\` → null
|
|
3133
|
+
|
|
3134
|
+
Default values are inferred from the function signature:
|
|
3135
|
+
|
|
3136
|
+
\`\`\`r
|
|
3137
|
+
main <- function(
|
|
3138
|
+
name, # required string
|
|
3139
|
+
count = 10, # optional int, default 10
|
|
3140
|
+
verbose = FALSE # optional bool, default FALSE
|
|
3141
|
+
) {
|
|
3142
|
+
# ...
|
|
3143
|
+
}
|
|
3144
|
+
\`\`\`
|
|
3145
|
+
|
|
3146
|
+
## Resources and Variables
|
|
3147
|
+
|
|
3148
|
+
Use the built-in Windmill helpers (no import needed):
|
|
3149
|
+
|
|
3150
|
+
\`\`\`r
|
|
3151
|
+
main <- function() {
|
|
3152
|
+
# Get a variable
|
|
3153
|
+
api_key <- get_variable("f/my_folder/api_key")
|
|
3154
|
+
|
|
3155
|
+
# Get a resource (returns a list)
|
|
3156
|
+
db <- get_resource("f/my_folder/postgres_config")
|
|
3157
|
+
host <- db$host
|
|
3158
|
+
port <- db$port
|
|
3159
|
+
|
|
3160
|
+
return(list(host = host, port = port))
|
|
3161
|
+
}
|
|
3162
|
+
\`\`\`
|
|
3163
|
+
|
|
3164
|
+
## Output
|
|
3165
|
+
|
|
3166
|
+
Return any JSON-serializable value from \`main\`. The return value becomes the step result:
|
|
3167
|
+
|
|
3168
|
+
\`\`\`r
|
|
3169
|
+
main <- function(x) {
|
|
3170
|
+
# Return a scalar
|
|
3171
|
+
return(x + 1)
|
|
3172
|
+
|
|
3173
|
+
# Or a list (becomes JSON object)
|
|
3174
|
+
return(list(result = x + 1, status = "ok"))
|
|
3175
|
+
}
|
|
3176
|
+
\`\`\`
|
|
3177
|
+
|
|
3178
|
+
## Annotations
|
|
3179
|
+
|
|
3180
|
+
Control execution behavior with comment annotations:
|
|
3181
|
+
|
|
3182
|
+
\`\`\`r
|
|
3183
|
+
#renv_verbose = true # Show verbose renv output during resolution
|
|
3184
|
+
#renv_install_verbose = true # Show verbose output during package installation
|
|
3185
|
+
#sandbox = true # Run in nsjail sandbox (requires nsjail)
|
|
3186
|
+
\`\`\`
|
|
3187
|
+
`;
|
|
3029
3188
|
export const LANG_RUST = `# Rust
|
|
3030
3189
|
|
|
3031
3190
|
## Structure
|
package/package/user.js
CHANGED
|
@@ -9,9 +9,13 @@ export async function getUserExt(workspace) {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
function mapUserToUserExt(user) {
|
|
12
|
-
|
|
12
|
+
const ext = {
|
|
13
13
|
...user,
|
|
14
14
|
groups: user.groups,
|
|
15
15
|
pgroups: user.groups.map((x) => `g/${x}`)
|
|
16
16
|
};
|
|
17
|
+
if (ext.is_service_account && sessionStorage.getItem('pre_impersonation_token')) {
|
|
18
|
+
ext.impersonating_email = sessionStorage.getItem('pre_impersonation_email') ?? undefined;
|
|
19
|
+
}
|
|
20
|
+
return ext;
|
|
17
21
|
}
|