windmill-cli 1.821.0 → 1.822.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/esm/main.js +317 -97
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16766,7 +16766,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16766
16766
|
PASSWORD: undefined,
|
|
16767
16767
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16768
16768
|
USERNAME: undefined,
|
|
16769
|
-
VERSION: "1.
|
|
16769
|
+
VERSION: "1.822.0",
|
|
16770
16770
|
WITH_CREDENTIALS: true,
|
|
16771
16771
|
interceptors: {
|
|
16772
16772
|
request: new Interceptors,
|
|
@@ -20050,7 +20050,7 @@ var init_auth = __esm(async () => {
|
|
|
20050
20050
|
});
|
|
20051
20051
|
|
|
20052
20052
|
// src/core/constants.ts
|
|
20053
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
20053
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.822.0";
|
|
20054
20054
|
|
|
20055
20055
|
// src/utils/resource_folders.ts
|
|
20056
20056
|
import { existsSync } from "node:fs";
|
|
@@ -21964,6 +21964,7 @@ async function deployItem(provider, kind, path, workspaceFrom, workspaceTo, onBe
|
|
|
21964
21964
|
path,
|
|
21965
21965
|
requestBody: {
|
|
21966
21966
|
...flow,
|
|
21967
|
+
job_token_scopes: flow.job_token_scopes ?? null,
|
|
21967
21968
|
preserve_on_behalf_of: preserveOnBehalfOf,
|
|
21968
21969
|
on_behalf_of_email: onBehalfOf,
|
|
21969
21970
|
on_behalf_of: undefined
|
|
@@ -21974,6 +21975,7 @@ async function deployItem(provider, kind, path, workspaceFrom, workspaceTo, onBe
|
|
|
21974
21975
|
workspace: workspaceTo,
|
|
21975
21976
|
requestBody: {
|
|
21976
21977
|
...flow,
|
|
21978
|
+
job_token_scopes: flow.job_token_scopes ?? null,
|
|
21977
21979
|
preserve_on_behalf_of: preserveOnBehalfOf,
|
|
21978
21980
|
on_behalf_of_email: onBehalfOf,
|
|
21979
21981
|
on_behalf_of: undefined
|
|
@@ -21998,6 +22000,7 @@ async function deployItem(provider, kind, path, workspaceFrom, workspaceTo, onBe
|
|
|
21998
22000
|
requestBody: {
|
|
21999
22001
|
...script,
|
|
22000
22002
|
lock: script.lock,
|
|
22003
|
+
job_token_scopes: script.job_token_scopes ?? null,
|
|
22001
22004
|
parent_hash: parentHash,
|
|
22002
22005
|
preserve_on_behalf_of: preserveOnBehalfOf,
|
|
22003
22006
|
on_behalf_of_email: onBehalfOf,
|
|
@@ -57057,7 +57060,7 @@ var init_openflow = __esm(() => {
|
|
|
57057
57060
|
openflow_default = {
|
|
57058
57061
|
openapi: "3.0.3",
|
|
57059
57062
|
info: {
|
|
57060
|
-
version: "1.
|
|
57063
|
+
version: "1.822.0",
|
|
57061
57064
|
title: "OpenFlow Spec",
|
|
57062
57065
|
contact: {
|
|
57063
57066
|
name: "Ruben Fiszel",
|
|
@@ -57552,6 +57555,14 @@ var init_openflow = __esm(() => {
|
|
|
57552
57555
|
type: "boolean",
|
|
57553
57556
|
description: "If true, flow continues even if this step fails"
|
|
57554
57557
|
},
|
|
57558
|
+
job_token_scopes: {
|
|
57559
|
+
type: "array",
|
|
57560
|
+
nullable: true,
|
|
57561
|
+
items: {
|
|
57562
|
+
type: "string"
|
|
57563
|
+
},
|
|
57564
|
+
description: "Scopes the token of this step's jobs is restricted to (domain:action[:resource], e.g. oidc:write), on top of the flow's own restriction: a step can only narrow it. Applies to everything the step runs (loop and branch bodies, AI agent tools)."
|
|
57565
|
+
},
|
|
57555
57566
|
retry: {
|
|
57556
57567
|
description: "Retry configuration if this step fails",
|
|
57557
57568
|
$ref: "#/components/schemas/Retry"
|
|
@@ -58366,6 +58377,14 @@ Windmill does not know needs one; those fall back to 128000.
|
|
|
58366
58377
|
type: "string",
|
|
58367
58378
|
description: "Free-text description of the tool given to the AI to decide when and how to call it. Overrides the description auto-derived from the underlying script."
|
|
58368
58379
|
},
|
|
58380
|
+
job_token_scopes: {
|
|
58381
|
+
type: "array",
|
|
58382
|
+
nullable: true,
|
|
58383
|
+
items: {
|
|
58384
|
+
type: "string"
|
|
58385
|
+
},
|
|
58386
|
+
description: "Scopes the token of this tool's jobs is restricted to, on top of the agent step's own restriction: a tool can only narrow it."
|
|
58387
|
+
},
|
|
58369
58388
|
value: {
|
|
58370
58389
|
$ref: "#/components/schemas/ToolValue"
|
|
58371
58390
|
}
|
|
@@ -63561,7 +63580,8 @@ async function handleFile(path, workspace, alreadySynced, message, opts, rawWork
|
|
|
63561
63580
|
on_behalf_of_email: typed?.on_behalf_of_email,
|
|
63562
63581
|
envs: typed?.envs,
|
|
63563
63582
|
modules,
|
|
63564
|
-
labels: typed?.labels
|
|
63583
|
+
labels: typed?.labels,
|
|
63584
|
+
job_token_scopes: typed?.job_token_scopes ?? null
|
|
63565
63585
|
};
|
|
63566
63586
|
const hasOnBehalfOf = typed?.has_on_behalf_of ?? !!typed?.on_behalf_of_email;
|
|
63567
63587
|
delete typed?.has_on_behalf_of;
|
|
@@ -63577,7 +63597,7 @@ async function handleFile(path, workspace, alreadySynced, message, opts, rawWork
|
|
|
63577
63597
|
if (remote) {
|
|
63578
63598
|
if (content === remote.content) {
|
|
63579
63599
|
if (typed == undefined || typed.description === remote.description && typed.summary === remote.summary && typed.kind == remote.kind && language == (remote.language === "bunnative" ? "bun" : remote.language) && !remote.archived && (Array.isArray(remote?.lock) ? remote?.lock?.join(`
|
|
63580
|
-
`) : remote?.lock ?? "").trim() == (typed?.lock ?? "").trim() && deepEqual(typed.schema, remote.schema) && typed.tag == remote.tag && (typed.ws_error_handler_muted ?? false) == remote.ws_error_handler_muted && typed.dedicated_worker == remote.dedicated_worker && typed.cache_ttl == remote.cache_ttl && Boolean(typed.cache_ignore_s3_path) == Boolean(remote.cache_ignore_s3_path) && normConcurrencyTimeWindowS == normalizeConcurrency(remote.concurrent_limit, remote.concurrency_time_window_s)[1] && normConcurrentLimit == normalizeConcurrency(remote.concurrent_limit)[0] && Boolean(typed.restart_unless_cancelled) == Boolean(remote.restart_unless_cancelled) && Boolean(typed.visible_to_runner_only) == Boolean(remote.visible_to_runner_only) && Boolean(typed.has_preprocessor) == Boolean(remote.has_preprocessor) && typed.priority == remote.priority && nonePositiveInt(typed.timeout) == nonePositiveInt(remote.timeout) && typed.delete_after_secs == remote.delete_after_secs && typed.concurrency_key == remote["concurrency_key"] && typed.debounce_key == remote["debounce_key"] && typed.debounce_delay_s == remote["debounce_delay_s"] && deepEqual(typed.debounce_args_to_accumulate ?? null, remote.debounce_args_to_accumulate ?? null) && typed.max_total_debouncing_time == remote.max_total_debouncing_time && typed.max_total_debounces_amount == remote.max_total_debounces_amount && typed.codebase == remote.codebase && (hasOnBehalfOf ? true : typed.on_behalf_of_email == remote.on_behalf_of_email) && deepEqual(typed.envs, remote.envs) && deepEqual(typed.labels ?? null, remote.labels ?? null) && deepEqual(modules ?? null, remote.modules ?? null)) {
|
|
63600
|
+
`) : remote?.lock ?? "").trim() == (typed?.lock ?? "").trim() && deepEqual(typed.schema, remote.schema) && typed.tag == remote.tag && (typed.ws_error_handler_muted ?? false) == remote.ws_error_handler_muted && typed.dedicated_worker == remote.dedicated_worker && typed.cache_ttl == remote.cache_ttl && Boolean(typed.cache_ignore_s3_path) == Boolean(remote.cache_ignore_s3_path) && normConcurrencyTimeWindowS == normalizeConcurrency(remote.concurrent_limit, remote.concurrency_time_window_s)[1] && normConcurrentLimit == normalizeConcurrency(remote.concurrent_limit)[0] && Boolean(typed.restart_unless_cancelled) == Boolean(remote.restart_unless_cancelled) && Boolean(typed.visible_to_runner_only) == Boolean(remote.visible_to_runner_only) && Boolean(typed.has_preprocessor) == Boolean(remote.has_preprocessor) && typed.priority == remote.priority && nonePositiveInt(typed.timeout) == nonePositiveInt(remote.timeout) && typed.delete_after_secs == remote.delete_after_secs && typed.concurrency_key == remote["concurrency_key"] && typed.debounce_key == remote["debounce_key"] && typed.debounce_delay_s == remote["debounce_delay_s"] && deepEqual(typed.debounce_args_to_accumulate ?? null, remote.debounce_args_to_accumulate ?? null) && typed.max_total_debouncing_time == remote.max_total_debouncing_time && typed.max_total_debounces_amount == remote.max_total_debounces_amount && typed.codebase == remote.codebase && (hasOnBehalfOf ? true : typed.on_behalf_of_email == remote.on_behalf_of_email) && deepEqual(typed.envs, remote.envs) && deepEqual(typed.labels ?? null, remote.labels ?? null) && deepEqual(typed.job_token_scopes ?? null, remote.job_token_scopes ?? null) && deepEqual(modules ?? null, remote.modules ?? null)) {
|
|
63581
63601
|
info(colors.green(`Script ${remotePath} is up to date`));
|
|
63582
63602
|
await applyExtraPermsDiff(workspaceId, "script", remotePath.replaceAll(SEP6, "/"), typed?.extra_perms, remote?.extra_perms);
|
|
63583
63603
|
return true;
|
|
@@ -70280,7 +70300,12 @@ async function inferSchema(language, content, currentSchema, path) {
|
|
|
70280
70300
|
if (arg.otyp && arg.otyp.includes("[") && arg.otyp.includes("|")) {
|
|
70281
70301
|
currentSchema.properties[arg.name].originalType = arg.otyp;
|
|
70282
70302
|
}
|
|
70283
|
-
|
|
70303
|
+
const old = oldProperties[arg.name];
|
|
70304
|
+
const format = currentSchema.properties[arg.name].format;
|
|
70305
|
+
const keepResourceDefault = arg.default == null && typeof old?.default == "string" && old.default.startsWith("$res:") && currentSchema.properties[arg.name].type == "object" && format?.startsWith("resource-") && format == old.format;
|
|
70306
|
+
if (!keepResourceDefault) {
|
|
70307
|
+
currentSchema.properties[arg.name].default = arg.default;
|
|
70308
|
+
}
|
|
70284
70309
|
if (!arg.has_default && !currentSchema.required.includes(arg.name)) {
|
|
70285
70310
|
currentSchema.required.push(arg.name);
|
|
70286
70311
|
}
|
|
@@ -76178,6 +76203,9 @@ async function getConfig(opts) {
|
|
|
76178
76203
|
if (config.global_settings.jwt_secret)
|
|
76179
76204
|
config.global_settings.jwt_secret = "***";
|
|
76180
76205
|
}
|
|
76206
|
+
if (config?.global_settings && !config.global_settings.jwt_secret) {
|
|
76207
|
+
infoStderr("jwt_secret, rsa_keys and the instance database secrets are not part of the export: the server withholds them (EXPORT_SERVER_SECRETS=false). This export cannot fully restore or migrate the instance.");
|
|
76208
|
+
}
|
|
76181
76209
|
const yaml = import_yaml32.stringify(config);
|
|
76182
76210
|
if (opts.outputFile) {
|
|
76183
76211
|
await writeFile16(opts.outputFile, yaml, "utf-8");
|
|
@@ -77713,19 +77741,7 @@ function collectStepPaths(flowValue) {
|
|
|
77713
77741
|
walk([flowValue.preprocessor_module]);
|
|
77714
77742
|
return paths;
|
|
77715
77743
|
}
|
|
77716
|
-
async function
|
|
77717
|
-
if (alreadySynced3.includes(localPath)) {
|
|
77718
|
-
return;
|
|
77719
|
-
}
|
|
77720
|
-
alreadySynced3.push(localPath);
|
|
77721
|
-
remotePath = remotePath.replaceAll(SEP20, "/");
|
|
77722
|
-
let flow = undefined;
|
|
77723
|
-
try {
|
|
77724
|
-
flow = await getFlowByPath({
|
|
77725
|
-
workspace,
|
|
77726
|
-
path: remotePath
|
|
77727
|
-
});
|
|
77728
|
-
} catch {}
|
|
77744
|
+
async function readLocalFlow(localPath) {
|
|
77729
77745
|
if (!localPath.endsWith(SEP20)) {
|
|
77730
77746
|
localPath += SEP20;
|
|
77731
77747
|
}
|
|
@@ -77739,6 +77755,22 @@ async function pushFlow(workspace, remotePath, localPath, message, permissionedA
|
|
|
77739
77755
|
if (localFlow.value.preprocessor_module) {
|
|
77740
77756
|
await replaceInlineScripts([localFlow.value.preprocessor_module], fileReader, exports_log, localPath, SEP20, undefined, missingFiles);
|
|
77741
77757
|
}
|
|
77758
|
+
return { flow: localFlow, missingFiles };
|
|
77759
|
+
}
|
|
77760
|
+
async function pushFlow(workspace, remotePath, localPath, message, permissionedAsContext) {
|
|
77761
|
+
if (alreadySynced3.includes(localPath)) {
|
|
77762
|
+
return;
|
|
77763
|
+
}
|
|
77764
|
+
alreadySynced3.push(localPath);
|
|
77765
|
+
remotePath = remotePath.replaceAll(SEP20, "/");
|
|
77766
|
+
let flow = undefined;
|
|
77767
|
+
try {
|
|
77768
|
+
flow = await getFlowByPath({
|
|
77769
|
+
workspace,
|
|
77770
|
+
path: remotePath
|
|
77771
|
+
});
|
|
77772
|
+
} catch {}
|
|
77773
|
+
const { flow: localFlow, missingFiles } = await readLocalFlow(localPath);
|
|
77742
77774
|
if (missingFiles.length > 0) {
|
|
77743
77775
|
throw new Error(`Cannot push flow ${remotePath}: missing inline script file(s): ${missingFiles.join(", ")}. ` + `Either restore the file(s) or remove the !inline reference(s) from flow.yaml before pushing.`);
|
|
77744
77776
|
}
|
|
@@ -77758,9 +77790,14 @@ async function pushFlow(workspace, remotePath, localPath, message, permissionedA
|
|
|
77758
77790
|
info(`Preserving ${flow.on_behalf_of_email} as on_behalf_of for flow ${remotePath}`);
|
|
77759
77791
|
}
|
|
77760
77792
|
}
|
|
77761
|
-
const {
|
|
77793
|
+
const {
|
|
77794
|
+
extra_perms: localPerms,
|
|
77795
|
+
job_token_scopes: localJobTokenScopes,
|
|
77796
|
+
...localFlowBody
|
|
77797
|
+
} = localFlow;
|
|
77798
|
+
const jobTokenScopes = localJobTokenScopes ?? null;
|
|
77762
77799
|
if (flow) {
|
|
77763
|
-
if (isSuperset(localFlowBody, flow)) {
|
|
77800
|
+
if (isSuperset(localFlowBody, flow) && JSON.stringify(jobTokenScopes) === JSON.stringify(flow.job_token_scopes ?? null)) {
|
|
77764
77801
|
info(colors.green(`Flow ${remotePath} is up to date`));
|
|
77765
77802
|
} else {
|
|
77766
77803
|
info(colors.bold.yellow(`Updating flow ${remotePath}...`));
|
|
@@ -77771,6 +77808,7 @@ async function pushFlow(workspace, remotePath, localPath, message, permissionedA
|
|
|
77771
77808
|
path: remotePath.replaceAll(SEP20, "/"),
|
|
77772
77809
|
deployment_message: message,
|
|
77773
77810
|
...localFlowBody,
|
|
77811
|
+
job_token_scopes: jobTokenScopes,
|
|
77774
77812
|
...preserveFields,
|
|
77775
77813
|
skip_draft_deletion: true
|
|
77776
77814
|
}
|
|
@@ -77785,6 +77823,7 @@ async function pushFlow(workspace, remotePath, localPath, message, permissionedA
|
|
|
77785
77823
|
path: remotePath.replaceAll(SEP20, "/"),
|
|
77786
77824
|
deployment_message: message,
|
|
77787
77825
|
...localFlowBody,
|
|
77826
|
+
job_token_scopes: jobTokenScopes,
|
|
77788
77827
|
...preserveFields,
|
|
77789
77828
|
skip_draft_deletion: true
|
|
77790
77829
|
}
|
|
@@ -79696,6 +79735,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
79696
79735
|
- Libraries are installed automatically - do not show installation instructions
|
|
79697
79736
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
79698
79737
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
79738
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
79699
79739
|
|
|
79700
79740
|
## Return Values
|
|
79701
79741
|
|
|
@@ -79859,6 +79899,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
79859
79899
|
- Libraries are installed automatically - do not show installation instructions
|
|
79860
79900
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
79861
79901
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
79902
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
79862
79903
|
|
|
79863
79904
|
## Return Values
|
|
79864
79905
|
|
|
@@ -79982,6 +80023,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
79982
80023
|
- Libraries are installed automatically - do not show installation instructions
|
|
79983
80024
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
79984
80025
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
80026
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
79985
80027
|
|
|
79986
80028
|
## Return Values
|
|
79987
80029
|
|
|
@@ -80098,6 +80140,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
80098
80140
|
- Libraries are installed automatically - do not show installation instructions
|
|
80099
80141
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
80100
80142
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
80143
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
80101
80144
|
|
|
80102
80145
|
## Return Values
|
|
80103
80146
|
|
|
@@ -80918,6 +80961,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
80918
80961
|
- Libraries are installed automatically - do not show installation instructions
|
|
80919
80962
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
80920
80963
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
80964
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
80921
80965
|
|
|
80922
80966
|
## Return Values
|
|
80923
80967
|
|
|
@@ -81750,6 +81794,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
81750
81794
|
- Libraries are installed automatically - do not show installation instructions
|
|
81751
81795
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
81752
81796
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
81797
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
81753
81798
|
|
|
81754
81799
|
## Return Values
|
|
81755
81800
|
|
|
@@ -81865,6 +81910,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
81865
81910
|
- Libraries are installed automatically - do not show installation instructions
|
|
81866
81911
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
81867
81912
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
81913
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
81868
81914
|
|
|
81869
81915
|
## Return Values
|
|
81870
81916
|
|
|
@@ -82687,6 +82733,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
82687
82733
|
- Libraries are installed automatically - do not show installation instructions
|
|
82688
82734
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
82689
82735
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
82736
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
82690
82737
|
|
|
82691
82738
|
## Return Values
|
|
82692
82739
|
|
|
@@ -82836,6 +82883,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
82836
82883
|
- Libraries are installed automatically - do not show installation instructions
|
|
82837
82884
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
82838
82885
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
82886
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
82839
82887
|
|
|
82840
82888
|
## Return Values
|
|
82841
82889
|
|
|
@@ -82968,6 +83016,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
82968
83016
|
- Libraries are installed automatically - do not show installation instructions
|
|
82969
83017
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
82970
83018
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83019
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
82971
83020
|
|
|
82972
83021
|
## Return Values
|
|
82973
83022
|
|
|
@@ -83087,6 +83136,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83087
83136
|
- Libraries are installed automatically - do not show installation instructions
|
|
83088
83137
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83089
83138
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83139
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83090
83140
|
|
|
83091
83141
|
## Return Values
|
|
83092
83142
|
|
|
@@ -83199,6 +83249,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83199
83249
|
- Libraries are installed automatically - do not show installation instructions
|
|
83200
83250
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83201
83251
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83252
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83202
83253
|
|
|
83203
83254
|
## Return Values
|
|
83204
83255
|
|
|
@@ -83314,6 +83365,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83314
83365
|
- Libraries are installed automatically - do not show installation instructions
|
|
83315
83366
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83316
83367
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83368
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83317
83369
|
|
|
83318
83370
|
## Return Values
|
|
83319
83371
|
|
|
@@ -83430,6 +83482,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83430
83482
|
- Libraries are installed automatically - do not show installation instructions
|
|
83431
83483
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83432
83484
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83485
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83433
83486
|
|
|
83434
83487
|
## Return Values
|
|
83435
83488
|
|
|
@@ -83561,6 +83614,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83561
83614
|
- Libraries are installed automatically - do not show installation instructions
|
|
83562
83615
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83563
83616
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83617
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83564
83618
|
|
|
83565
83619
|
## Return Values
|
|
83566
83620
|
|
|
@@ -83675,6 +83729,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83675
83729
|
- Libraries are installed automatically - do not show installation instructions
|
|
83676
83730
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83677
83731
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83732
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83678
83733
|
|
|
83679
83734
|
## Return Values
|
|
83680
83735
|
|
|
@@ -83804,6 +83859,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
83804
83859
|
- Libraries are installed automatically - do not show installation instructions
|
|
83805
83860
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
83806
83861
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
83862
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
83807
83863
|
|
|
83808
83864
|
## Return Values
|
|
83809
83865
|
|
|
@@ -84808,6 +84864,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
84808
84864
|
- Libraries are installed automatically - do not show installation instructions
|
|
84809
84865
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
84810
84866
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
84867
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
84811
84868
|
|
|
84812
84869
|
## Return Values
|
|
84813
84870
|
|
|
@@ -84967,6 +85024,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
84967
85024
|
- Libraries are installed automatically - do not show installation instructions
|
|
84968
85025
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
84969
85026
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
85027
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
84970
85028
|
|
|
84971
85029
|
## Return Values
|
|
84972
85030
|
|
|
@@ -85116,6 +85174,7 @@ Use \`wmill resource-type list --schema\` to discover available resource types.
|
|
|
85116
85174
|
- Libraries are installed automatically - do not show installation instructions
|
|
85117
85175
|
- In a language with an entrypoint function (TypeScript, Python, Go, Rust, PHP, R, …), name it \`main\` (\`Main\` in C#) and do not call it; in TypeScript it must be async. SQL, GraphQL, Bash, PowerShell and Ansible scripts have no \`main\`: their language section shows how they take arguments
|
|
85118
85176
|
- Where the language has a Windmill client (\`wmill\`), use it to interact with the platform
|
|
85177
|
+
- A script's input schema may carry a top-level \`prompt_for_ai\` string: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that script, and keep it when you rewrite the schema
|
|
85119
85178
|
|
|
85120
85179
|
## Return Values
|
|
85121
85180
|
|
|
@@ -85670,6 +85729,10 @@ Unless the user asked for new code, look for a workspace script or flow that alr
|
|
|
85670
85729
|
The step's \`input_transforms\` must cover the reused item's inputs, so read its input schema first.
|
|
85671
85730
|
Find candidates in the local tree (a \`.script.yaml\` sits next to each script and holds its input schema, a \`flow.yaml\` in each flow folder) and on the workspace with \`wmill script list\` / \`wmill flow list\`; \`wmill script get <path>\` and \`wmill flow get <path>\` show an item's details.
|
|
85672
85731
|
|
|
85732
|
+
## Additional Prompt for AI
|
|
85733
|
+
|
|
85734
|
+
A flow's input schema may carry a top-level \`prompt_for_ai\` string, as a script's can: its author's instructions to an AI choosing the inputs. Follow it when you pick arguments to run that flow, and keep it when you rewrite the schema.
|
|
85735
|
+
|
|
85673
85736
|
## Organizing Flows: Groups and Notes
|
|
85674
85737
|
|
|
85675
85738
|
Groups and notes shape how a flow reads in the editor; neither changes what it does.
|
|
@@ -85761,7 +85824,7 @@ Reference a specific resource using \`$res:\` prefix:
|
|
|
85761
85824
|
|
|
85762
85825
|
## OpenFlow Schema
|
|
85763
85826
|
|
|
85764
|
-
{"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":"Address of the account the flow runs on behalf of. Derived from on_behalf_of on read; accepted on write, where it is resolved to the account it names."},"on_behalf_of":{"type":"string","description":"The flow runs with the permissions of this identity: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. Omit it when writing and it is resolved from that address instead."}},"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"},"preserve_step_tags":{"type":"boolean","description":"If true and the flow runs on a custom worker tag, steps that declare their own non-empty tag run on it instead of inheriting the flow tag. Steps without their own tag still inherit the flow tag."},"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"},"delete_after_secs":{"type":"integer","description":"If set, delete the flow job's args, result and logs after this many seconds following job completion"},"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, one of: yellow, blue, green, purple, pink, orange, red, cyan, lime, gray. Any other value renders unstyled."},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes. 'group' notes are deprecated; segment a flow with FlowValue.groups instead."},"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, one of: yellow, blue, green, purple, pink, orange, red, cyan, lime, gray. Omit it to let the editor pick one."}},"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."},"error_include_result":{"type":"boolean","description":"When stopping with an error (error_message set), embed the stopping step's own result inside the raised error object (as error.result) instead of discarding it. The top-level result stays { error }. Defaults to false."}},"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_secs":{"type":"integer","description":"If set, delete the step's args, result and logs after this many seconds following job completion"},"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"},"skin":{"type":"string","enum":["detailed","minimal"],"description":"How the approval request is presented, on the approval page and in Slack/Teams approval messages. 'detailed' (used when unset) shows the flow details (arguments, graph, approvers); 'minimal' shows only the request: the step description, form and approve/reject actions"}}},"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 for loops, use 'flow_input.iter.value' for the current iteration value (in while loops it equals 'flow_input.iter.index')","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","azure_foundry","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')"},"reasoning_effort":{"type":"string","description":"Provider-native reasoning effort token (e.g. 'low', 'high', 'none') for models that support extended thinking. Optional; unset leaves the provider default."}},"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"]},"MemoryWindow":{"type":"object","description":"Keeps the most recent messages of the memory named by the run's memory id (or the step's\\n\`memory_id\`). Without a memory id the agent runs without memory.\\n","properties":{"kind":{"type":"string","enum":["window"]},"context_length":{"type":"integer","description":"Number of most recent messages to load and store. 0 turns memory off."}},"required":["kind","context_length"]},"MemoryAuto":{"type":"object","deprecated":true,"description":"Deprecated, still read as it was written: the run's memory id, else the \`memory_id\` here.\\nThe step's own \`memory_id\` is not read while this kind is set; switch the kind to \`window\`\\nto use it. Without a \`context_length\`, or with 0, it is \`off\` and reads \`previous_messages\`.\\n","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"]},"MemoryCompaction":{"type":"object","description":"Keeps the whole memory named by the run's memory id (or the step's \`memory_id\`), replacing\\nits older part with a summary as the conversation approaches the model's context window.\\nWithout a memory id the agent runs without memory, and compaction bounds the run's own loop.\\n","properties":{"kind":{"type":"string","enum":["compaction"]},"context_window":{"type":"integer","description":"Overrides the context window looked up from the model, in tokens. Only a model\\nWindmill does not know needs one; those fall back to 128000.\\n"}},"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","deprecated":true,"description":"Deprecated, still read as it was written. Move the step to \`off\` with \`previous_messages\` instead.","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Managed memory, stored by Windmill and replayed with each request. The memory is named by a memory id, see \`memory_id\`. While it is off, a step can supply its history in \`previous_messages\`.","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryWindow"},{"$ref":"#/components/schemas/MemoryCompaction"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind","mapping":{"off":"#/components/schemas/MemoryOff","window":"#/components/schemas/MemoryWindow","compaction":"#/components/schemas/MemoryCompaction","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","bunnative","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","dbt"]},"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 until stopped. The implicit iterator is the iteration counter, so 'flow_input.iter.value' equals 'flow_input.iter.index' (0, 1, 2, ...) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via 'results.<its_own_id>' with a first-iteration fallback - the loop's stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve 'results' across iterations and never terminates); plain counters can instead be derived from 'flow_input.iter.index', which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module 'result' is the last iteration's result","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration","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":"The name the AI agent calls this tool by, not a human label. On a flowmodule tool it must match ^[a-zA-Z0-9_]+$ - letters, numbers and underscores only (e.g. 'search_documentation', not 'Search documentation') - and always be set; on an mcp or websearch tool it is a plain label. Put the human-readable explanation in 'description'."},"description":{"type":"string","description":"Free-text description of the tool given to the AI to decide when and how to call it. Overrides the description auto-derived from the underlying script."},"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\\nflow.input syntax. Required unless memory is off and \`previous_messages\` supplies\\nthe prompt; image output always needs it.\\n"},"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, reasoning_token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"memory_id":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"String. Names the memory this step reads and writes, overriding the memory id the run\\nwas started with (the chat conversation, an app chat session or the \`memory_id\` run\\nparameter). Leave unset to use the run's memory id. A fixed value shares one memory\\nacross every run; an expression such as \`flow_input.customer_id\` keeps one memory per\\nkey. When it evaluates to an empty value the agent runs without memory. Read only\\nwhile \`memory\` is \`window\` or \`compaction\`: it is ignored when memory is off, and an\\nolder \`auto\` or \`manual\` memory reads neither history input.\\n"},"previous_messages":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of MemoryMessage. History supplied by the flow, sent between the system prompt\\nand the user message. Read only while \`memory\` is off or absent: managed memory\\nignores it, and an older \`auto\` or \`manual\` memory reads neither history input.\\n"},"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"},"enabled_tools":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of strings naming which of the tools configured in \`tools\` the agent may call\\nthis run. Leaving it unset carries every one of them; an empty array carries none.\\nA tool is named as the model is shown it. An entry the model is shown nothing of is\\nnamed by what identifies it instead: an MCP server by its resource path, carrying\\nevery tool it exposes (which of them stays that entry's include_tools/exclude_tools),\\nand a websearch entry by the reserved name '__wm_web_search', whatever summary it carries\\n(no tool may take that name).\\nExample: ['get_user', 'u/admin/github_mcp', '__wm_web_search']\\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"},"max_iterations":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Number. Limits how many times the agent can loop through reasoning and tool use.\\nRange: 1-1000.\\n"}}},"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"]},"tag":{"type":"string","description":"Worker group tag for execution routing. If not set, the AI agent step runs on the flow's tag (default \`flow\`)"},"omit_output_from_conversation":{"type":"boolean","default":false,"description":"If true, this AI agent step does not persist its assistant or tool messages to the flow conversation when chat mode is enabled."},"agent":{"type":"string","description":"Path of a reusable \`ai_agent\` resource (hybrid linking). When set, the agent brain\\nconfig (provider/model/system prompt/etc.) and tool set are resolved at runtime from\\nthat resource; the module's input_transforms then only carry the flow-local inputs\\n(user_message, user_attachments, enabled_tools and the history inputs memory_id and previous_messages).\\n"},"tool_inputs":{"type":"object","description":"Host-local wiring for an agent's tool inputs, keyed by tool id then input key. Binds the\\nreferenced agent's tools to this flow's context (flow_input/results) without mutating the\\nshared resource; overlaid onto the tools' input_transforms at runtime \\u2014 including when\\n\`agent\` is unset, since a step forked for editing keeps these overrides until it is saved\\nback or unlinked.\\n","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}}},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["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"]}}
|
|
85827
|
+
{"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":"Address of the account the flow runs on behalf of. Derived from on_behalf_of on read; accepted on write, where it is resolved to the account it names."},"on_behalf_of":{"type":"string","description":"The flow runs with the permissions of this identity: u/{username}, g/{group}, or a bare email when the username is itself email-shaped. The only stored half of the identity; on_behalf_of_email is derived from it. Omit it when writing and it is resolved from that address instead."}},"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"},"preserve_step_tags":{"type":"boolean","description":"If true and the flow runs on a custom worker tag, steps that declare their own non-empty tag run on it instead of inheriting the flow tag. Steps without their own tag still inherit the flow tag."},"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"},"delete_after_secs":{"type":"integer","description":"If set, delete the flow job's args, result and logs after this many seconds following job completion"},"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, one of: yellow, blue, green, purple, pink, orange, red, cyan, lime, gray. Any other value renders unstyled."},"type":{"type":"string","enum":["free","group"],"description":"Type of note - 'free' for standalone notes. 'group' notes are deprecated; segment a flow with FlowValue.groups instead."},"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, one of: yellow, blue, green, purple, pink, orange, red, cyan, lime, gray. Omit it to let the editor pick one."}},"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."},"error_include_result":{"type":"boolean","description":"When stopping with an error (error_message set), embed the stopping step's own result inside the raised error object (as error.result) instead of discarding it. The top-level result stays { error }. Defaults to false."}},"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_secs":{"type":"integer","description":"If set, delete the step's args, result and logs after this many seconds following job completion"},"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"},"skin":{"type":"string","enum":["detailed","minimal"],"description":"How the approval request is presented, on the approval page and in Slack/Teams approval messages. 'detailed' (used when unset) shows the flow details (arguments, graph, approvers); 'minimal' shows only the request: the step description, form and approve/reject actions"}}},"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"},"job_token_scopes":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Scopes the token of this step's jobs is restricted to (domain:action[:resource], e.g. oidc:write), on top of the flow's own restriction: a step can only narrow it. Applies to everything the step runs (loop and branch bodies, AI agent tools)."},"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 for loops, use 'flow_input.iter.value' for the current iteration value (in while loops it equals 'flow_input.iter.index')","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","azure_foundry","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')"},"reasoning_effort":{"type":"string","description":"Provider-native reasoning effort token (e.g. 'low', 'high', 'none') for models that support extended thinking. Optional; unset leaves the provider default."}},"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"]},"MemoryWindow":{"type":"object","description":"Keeps the most recent messages of the memory named by the run's memory id (or the step's\\n\`memory_id\`). Without a memory id the agent runs without memory.\\n","properties":{"kind":{"type":"string","enum":["window"]},"context_length":{"type":"integer","description":"Number of most recent messages to load and store. 0 turns memory off."}},"required":["kind","context_length"]},"MemoryAuto":{"type":"object","deprecated":true,"description":"Deprecated, still read as it was written: the run's memory id, else the \`memory_id\` here.\\nThe step's own \`memory_id\` is not read while this kind is set; switch the kind to \`window\`\\nto use it. Without a \`context_length\`, or with 0, it is \`off\` and reads \`previous_messages\`.\\n","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"]},"MemoryCompaction":{"type":"object","description":"Keeps the whole memory named by the run's memory id (or the step's \`memory_id\`), replacing\\nits older part with a summary as the conversation approaches the model's context window.\\nWithout a memory id the agent runs without memory, and compaction bounds the run's own loop.\\n","properties":{"kind":{"type":"string","enum":["compaction"]},"context_window":{"type":"integer","description":"Overrides the context window looked up from the model, in tokens. Only a model\\nWindmill does not know needs one; those fall back to 128000.\\n"}},"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","deprecated":true,"description":"Deprecated, still read as it was written. Move the step to \`off\` with \`previous_messages\` instead.","properties":{"kind":{"type":"string","enum":["manual"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MemoryMessage"}}},"required":["kind","messages"]},"MemoryConfig":{"description":"Managed memory, stored by Windmill and replayed with each request. The memory is named by a memory id, see \`memory_id\`. While it is off, a step can supply its history in \`previous_messages\`.","oneOf":[{"$ref":"#/components/schemas/MemoryOff"},{"$ref":"#/components/schemas/MemoryWindow"},{"$ref":"#/components/schemas/MemoryCompaction"},{"$ref":"#/components/schemas/MemoryAuto"},{"$ref":"#/components/schemas/MemoryManual"}],"discriminator":{"propertyName":"kind","mapping":{"off":"#/components/schemas/MemoryOff","window":"#/components/schemas/MemoryWindow","compaction":"#/components/schemas/MemoryCompaction","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","bunnative","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","dbt"]},"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 until stopped. The implicit iterator is the iteration counter, so 'flow_input.iter.value' equals 'flow_input.iter.index' (0, 1, 2, ...) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via 'results.<its_own_id>' with a first-iteration fallback - the loop's stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve 'results' across iterations and never terminates); plain counters can instead be derived from 'flow_input.iter.index', which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module 'result' is the last iteration's result","properties":{"modules":{"type":"array","description":"Steps to execute in each iteration","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":"The name the AI agent calls this tool by, not a human label. On a flowmodule tool it must match ^[a-zA-Z0-9_]+$ - letters, numbers and underscores only (e.g. 'search_documentation', not 'Search documentation') - and always be set; on an mcp or websearch tool it is a plain label. Put the human-readable explanation in 'description'."},"description":{"type":"string","description":"Free-text description of the tool given to the AI to decide when and how to call it. Overrides the description auto-derived from the underlying script."},"job_token_scopes":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Scopes the token of this tool's jobs is restricted to, on top of the agent step's own restriction: a tool can only narrow it."},"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\\nflow.input syntax. Required unless memory is off and \`previous_messages\` supplies\\nthe prompt; image output always needs it.\\n"},"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, reasoning_token_delta, tool_call, tool_call_arguments, tool_execution, tool_result\\n"},"memory":{"$ref":"#/components/schemas/MemoryTransform"},"memory_id":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"String. Names the memory this step reads and writes, overriding the memory id the run\\nwas started with (the chat conversation, an app chat session or the \`memory_id\` run\\nparameter). Leave unset to use the run's memory id. A fixed value shares one memory\\nacross every run; an expression such as \`flow_input.customer_id\` keeps one memory per\\nkey. When it evaluates to an empty value the agent runs without memory. Read only\\nwhile \`memory\` is \`window\` or \`compaction\`: it is ignored when memory is off, and an\\nolder \`auto\` or \`manual\` memory reads neither history input.\\n"},"previous_messages":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of MemoryMessage. History supplied by the flow, sent between the system prompt\\nand the user message. Read only while \`memory\` is off or absent: managed memory\\nignores it, and an older \`auto\` or \`manual\` memory reads neither history input.\\n"},"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"},"enabled_tools":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Array of strings naming which of the tools configured in \`tools\` the agent may call\\nthis run. Leaving it unset carries every one of them; an empty array carries none.\\nA tool is named as the model is shown it. An entry the model is shown nothing of is\\nnamed by what identifies it instead: an MCP server by its resource path, carrying\\nevery tool it exposes (which of them stays that entry's include_tools/exclude_tools),\\nand a websearch entry by the reserved name '__wm_web_search', whatever summary it carries\\n(no tool may take that name).\\nExample: ['get_user', 'u/admin/github_mcp', '__wm_web_search']\\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"},"max_iterations":{"allOf":[{"$ref":"#/components/schemas/InputTransform"}],"description":"Number. Limits how many times the agent can loop through reasoning and tool use.\\nRange: 1-1000.\\n"}}},"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"]},"tag":{"type":"string","description":"Worker group tag for execution routing. If not set, the AI agent step runs on the flow's tag (default \`flow\`)"},"omit_output_from_conversation":{"type":"boolean","default":false,"description":"If true, this AI agent step does not persist its assistant or tool messages to the flow conversation when chat mode is enabled."},"agent":{"type":"string","description":"Path of a reusable \`ai_agent\` resource (hybrid linking). When set, the agent brain\\nconfig (provider/model/system prompt/etc.) and tool set are resolved at runtime from\\nthat resource; the module's input_transforms then only carry the flow-local inputs\\n(user_message, user_attachments, enabled_tools and the history inputs memory_id and previous_messages).\\n"},"tool_inputs":{"type":"object","description":"Host-local wiring for an agent's tool inputs, keyed by tool id then input key. Binds the\\nreferenced agent's tools to this flow's context (flow_input/results) without mutating the\\nshared resource; overlaid onto the tools' input_transforms at runtime \\u2014 including when\\n\`agent\` is unset, since a step forked for editing keeps these overrides until it is saved\\nback or unlinked.\\n","additionalProperties":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InputTransform"}}},"parallel":{"type":"boolean","description":"If true, the agent can execute multiple tool calls in parallel"}},"required":["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"]}}
|
|
85765
85828
|
`,
|
|
85766
85829
|
"raw-app": `---
|
|
85767
85830
|
name: raw-app
|
|
@@ -87550,6 +87613,15 @@ Watch local file changes and live-reload the dev page for preview. Does NOT depl
|
|
|
87550
87613
|
- \`--path <path:string>\` - Watch a specific windmill path (e.g., u/admin/my_script or f/my_flow)
|
|
87551
87614
|
- \`--no-open\` - Do not open the browser automatically
|
|
87552
87615
|
|
|
87616
|
+
### digest
|
|
87617
|
+
|
|
87618
|
+
Compute the content digest of local scripts and flows, as the \`digest\` and \`root_digest\` claims of job OIDC tokens carry it. Run from the root of a sync checkout, pulled after the deployment's dependency jobs completed: they write the lockfiles the digest covers. A flow also lists the digest of each inline step, as \`<flow path>/<step id>\`.
|
|
87619
|
+
|
|
87620
|
+
**Arguments:** \`<paths...:string>\`
|
|
87621
|
+
|
|
87622
|
+
**Options:**
|
|
87623
|
+
- \`--json\` - Output the digests as JSON
|
|
87624
|
+
|
|
87553
87625
|
### docs
|
|
87554
87626
|
|
|
87555
87627
|
Search Windmill documentation.
|
|
@@ -89984,8 +90056,8 @@ var init_freshness_gate = __esm(() => {
|
|
|
89984
90056
|
});
|
|
89985
90057
|
|
|
89986
90058
|
// src/guidance/freshness.ts
|
|
89987
|
-
import { createHash } from "node:crypto";
|
|
89988
|
-
import { stat as
|
|
90059
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
90060
|
+
import { stat as stat20 } from "node:fs/promises";
|
|
89989
90061
|
function buildPromptsHashMarker(hash) {
|
|
89990
90062
|
return `${PROMPTS_HASH_MARKER_PREFIX}${hash} -->`;
|
|
89991
90063
|
}
|
|
@@ -90003,7 +90075,7 @@ function injectPromptsHashMarker(content, hash) {
|
|
|
90003
90075
|
`);
|
|
90004
90076
|
}
|
|
90005
90077
|
function currentPromptsHash(nonDottedPaths) {
|
|
90006
|
-
const hasher =
|
|
90078
|
+
const hasher = createHash2("sha256");
|
|
90007
90079
|
hasher.update("template:");
|
|
90008
90080
|
hasher.update(generateAgentsCliMdContent("__PLACEHOLDER__"));
|
|
90009
90081
|
hasher.update(`
|
|
@@ -90036,10 +90108,10 @@ async function warnIfPromptsStale(opts) {
|
|
|
90036
90108
|
const cwd = opts?.cwd ?? process.cwd();
|
|
90037
90109
|
let fileName = AGENTS_WMILL_FILENAME;
|
|
90038
90110
|
let path = `${cwd}/${fileName}`;
|
|
90039
|
-
if (!await
|
|
90111
|
+
if (!await stat20(path).catch(() => null)) {
|
|
90040
90112
|
fileName = LEGACY_AGENTS_CLI_FILENAME;
|
|
90041
90113
|
path = `${cwd}/${fileName}`;
|
|
90042
|
-
if (!await
|
|
90114
|
+
if (!await stat20(path).catch(() => null)) {
|
|
90043
90115
|
return;
|
|
90044
90116
|
}
|
|
90045
90117
|
}
|
|
@@ -90084,7 +90156,7 @@ var init_freshness = __esm(async () => {
|
|
|
90084
90156
|
|
|
90085
90157
|
// src/commands/refresh/tsconfig.ts
|
|
90086
90158
|
import { execSync as execSync6 } from "node:child_process";
|
|
90087
|
-
import { createHash as
|
|
90159
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
90088
90160
|
import { existsSync as existsSync20, readFileSync as readFileSync5, writeFileSync as writeFileSync9 } from "node:fs";
|
|
90089
90161
|
import path26 from "node:path";
|
|
90090
90162
|
import process25 from "node:process";
|
|
@@ -90107,7 +90179,7 @@ function buildManagedTsconfig() {
|
|
|
90107
90179
|
};
|
|
90108
90180
|
}
|
|
90109
90181
|
function currentTsconfigHash() {
|
|
90110
|
-
return
|
|
90182
|
+
return createHash3("sha256").update(JSON.stringify(buildManagedTsconfig())).digest("hex").slice(0, 12);
|
|
90111
90183
|
}
|
|
90112
90184
|
function deepEqual2(a, b) {
|
|
90113
90185
|
if (a === b)
|
|
@@ -90308,7 +90380,7 @@ function emitTsconfigWarning(message) {
|
|
|
90308
90380
|
process25.stderr.write(`${colors.yellow(message)}
|
|
90309
90381
|
`);
|
|
90310
90382
|
}
|
|
90311
|
-
var WORKSPACE_IMPORT_DIRS, MANAGED_TSCONFIG = "tsconfig.wmill.json", MANAGED_IMPORT_MAP = "import_map.wmill.json", MANAGED_NOTICE, TSCONFIG_HASH_PREFIX = "// wmill-tsconfig-hash: ", TSCONFIG_HASH_REGEX, LEGACY_GENERATED_TSCONFIGS,
|
|
90383
|
+
var WORKSPACE_IMPORT_DIRS, MANAGED_TSCONFIG = "tsconfig.wmill.json", MANAGED_IMPORT_MAP = "import_map.wmill.json", MANAGED_NOTICE, TSCONFIG_HASH_PREFIX = "// wmill-tsconfig-hash: ", TSCONFIG_HASH_REGEX, LEGACY_GENERATED_TSCONFIGS, command32, tsconfig_default;
|
|
90312
90384
|
var init_tsconfig = __esm(async () => {
|
|
90313
90385
|
init_colors2();
|
|
90314
90386
|
init_mod3();
|
|
@@ -90344,10 +90416,10 @@ var init_tsconfig = __esm(async () => {
|
|
|
90344
90416
|
include: ["**/*.ts", "rt.d.ts"]
|
|
90345
90417
|
}
|
|
90346
90418
|
];
|
|
90347
|
-
|
|
90419
|
+
command32 = new Command().description("Refresh the wmill-managed tsconfig.wmill.json (and Deno import map for Deno projects)").option("--yes", "Non-interactive: wire an existing custom tsconfig.json/deno.json to the managed file without prompting (a previously-generated config is always migrated automatically).").action(async (opts) => {
|
|
90348
90420
|
await refreshTsconfig({ yes: opts.yes === true });
|
|
90349
90421
|
});
|
|
90350
|
-
tsconfig_default =
|
|
90422
|
+
tsconfig_default = command32;
|
|
90351
90423
|
});
|
|
90352
90424
|
|
|
90353
90425
|
// src/main.ts
|
|
@@ -92121,6 +92193,154 @@ var worker_groups_default = command26;
|
|
|
92121
92193
|
// src/main.ts
|
|
92122
92194
|
await init_lint();
|
|
92123
92195
|
|
|
92196
|
+
// src/commands/digest/digest.ts
|
|
92197
|
+
init_mod3();
|
|
92198
|
+
init_log();
|
|
92199
|
+
await __promiseAll([
|
|
92200
|
+
init_conf(),
|
|
92201
|
+
init_flow(),
|
|
92202
|
+
init_script(),
|
|
92203
|
+
init_metadata(),
|
|
92204
|
+
init_codebase(),
|
|
92205
|
+
init_sync(),
|
|
92206
|
+
init_resource_folders(),
|
|
92207
|
+
init_script_common(),
|
|
92208
|
+
init_utils(),
|
|
92209
|
+
init_yaml()
|
|
92210
|
+
]);
|
|
92211
|
+
import { createHash } from "node:crypto";
|
|
92212
|
+
import { stat as stat18 } from "node:fs/promises";
|
|
92213
|
+
import { sep as SEP21 } from "node:path";
|
|
92214
|
+
function canonicalJson(value) {
|
|
92215
|
+
if (value === null || value === undefined)
|
|
92216
|
+
return "null";
|
|
92217
|
+
if (Array.isArray(value)) {
|
|
92218
|
+
return "[" + value.map(canonicalJson).join(",") + "]";
|
|
92219
|
+
}
|
|
92220
|
+
if (typeof value === "object") {
|
|
92221
|
+
const members = Object.entries(value).filter(([, v]) => v !== null && v !== undefined).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
92222
|
+
return "{" + members.map(([k, v]) => JSON.stringify(k) + ":" + canonicalJson(v)).join(",") + "}";
|
|
92223
|
+
}
|
|
92224
|
+
return JSON.stringify(value);
|
|
92225
|
+
}
|
|
92226
|
+
function digestOf(value) {
|
|
92227
|
+
return createHash("sha256").update(canonicalJson(value), "utf8").digest("hex");
|
|
92228
|
+
}
|
|
92229
|
+
function inlineSteps(modules, steps) {
|
|
92230
|
+
for (const m of modules ?? []) {
|
|
92231
|
+
stepValue(m?.id, m?.value, steps);
|
|
92232
|
+
}
|
|
92233
|
+
}
|
|
92234
|
+
function stepValue(id, v, steps) {
|
|
92235
|
+
switch (v?.type) {
|
|
92236
|
+
case "rawscript":
|
|
92237
|
+
if (typeof id === "string") {
|
|
92238
|
+
steps[id] = digestOf({ content: v.content, lock: v.lock });
|
|
92239
|
+
}
|
|
92240
|
+
break;
|
|
92241
|
+
case "forloopflow":
|
|
92242
|
+
case "whileloopflow":
|
|
92243
|
+
inlineSteps(v.modules, steps);
|
|
92244
|
+
break;
|
|
92245
|
+
case "branchone":
|
|
92246
|
+
inlineSteps(v.default, steps);
|
|
92247
|
+
for (const b of v.branches ?? [])
|
|
92248
|
+
inlineSteps(b?.modules, steps);
|
|
92249
|
+
break;
|
|
92250
|
+
case "branchall":
|
|
92251
|
+
for (const b of v.branches ?? [])
|
|
92252
|
+
inlineSteps(b?.modules, steps);
|
|
92253
|
+
break;
|
|
92254
|
+
case "aiagent":
|
|
92255
|
+
for (const t of v.tools ?? []) {
|
|
92256
|
+
if (t?.value?.tool_type === "flowmodule")
|
|
92257
|
+
stepValue(t.id, t.value, steps);
|
|
92258
|
+
}
|
|
92259
|
+
break;
|
|
92260
|
+
}
|
|
92261
|
+
}
|
|
92262
|
+
async function flowDigest(folder) {
|
|
92263
|
+
const { flow, missingFiles } = await readLocalFlow(folder);
|
|
92264
|
+
if (missingFiles.length > 0) {
|
|
92265
|
+
throw new Error(`Missing inline script file(s): ${missingFiles.join(", ")}`);
|
|
92266
|
+
}
|
|
92267
|
+
const steps = {};
|
|
92268
|
+
const value = flow.value;
|
|
92269
|
+
inlineSteps([...value.modules ?? [], value.failure_module, value.preprocessor_module].filter(Boolean), steps);
|
|
92270
|
+
const path = folder.replaceAll(SEP21, "/").replace(/\/$/, "").replace(/(\.flow|__flow)$/, "");
|
|
92271
|
+
return { path, kind: "flow", digest: digestOf(flow.value), steps };
|
|
92272
|
+
}
|
|
92273
|
+
async function scriptDigest(contentFile, defaultTs, codebases = []) {
|
|
92274
|
+
const moduleEntry = isModuleEntryPoint(contentFile);
|
|
92275
|
+
const remotePath = scriptPathToRemotePath(contentFile);
|
|
92276
|
+
const base = remotePath.replaceAll("/", SEP21);
|
|
92277
|
+
const language = inferContentTypeFromFilePath(contentFile, defaultTs);
|
|
92278
|
+
const metaBase = moduleEntry ? base + getModuleFolderSuffix() + SEP21 + "script" : base + ".script";
|
|
92279
|
+
let meta = undefined;
|
|
92280
|
+
for (const ext of [".yaml", ".json"]) {
|
|
92281
|
+
if (await stat18(metaBase + ext).catch(() => {
|
|
92282
|
+
return;
|
|
92283
|
+
})) {
|
|
92284
|
+
meta = await yamlParseFile(metaBase + ext);
|
|
92285
|
+
break;
|
|
92286
|
+
}
|
|
92287
|
+
}
|
|
92288
|
+
replaceLock(meta);
|
|
92289
|
+
let content = "";
|
|
92290
|
+
try {
|
|
92291
|
+
content = await readTextFile(contentFile);
|
|
92292
|
+
} catch (e) {
|
|
92293
|
+
if (!isMissingDbtDescriptor(contentFile, e))
|
|
92294
|
+
throw e;
|
|
92295
|
+
}
|
|
92296
|
+
const codebase = language == "bun" ? findCodebase(contentFile, codebases) : undefined;
|
|
92297
|
+
let codebaseDigest = codebase ? await codebase.getDigest() : undefined;
|
|
92298
|
+
if (codebaseDigest && meta?.codebase === codebaseDigest + ".tar") {
|
|
92299
|
+
codebaseDigest = meta.codebase;
|
|
92300
|
+
}
|
|
92301
|
+
const isDbt = language === "dbt";
|
|
92302
|
+
const modules = await readModulesFromDisk(base + getModuleFolderSuffix(language), defaultTs, moduleEntry, isDbt);
|
|
92303
|
+
const digest = digestOf({
|
|
92304
|
+
content,
|
|
92305
|
+
lock: meta?.lock,
|
|
92306
|
+
codebase: codebaseDigest,
|
|
92307
|
+
modules: modules ? Object.fromEntries(Object.entries(modules).map(([p, m]) => [p, { content: m.content, lock: m.lock }])) : undefined
|
|
92308
|
+
});
|
|
92309
|
+
return { path: remotePath, kind: "script", digest };
|
|
92310
|
+
}
|
|
92311
|
+
async function itemDigest(localPath, defaultTs, codebases = []) {
|
|
92312
|
+
const folderPath = localPath.endsWith(SEP21) ? localPath : localPath + SEP21;
|
|
92313
|
+
if (isFlowPath(folderPath)) {
|
|
92314
|
+
return flowDigest(extractFolderPath(folderPath, "flow"));
|
|
92315
|
+
}
|
|
92316
|
+
if (/\.script\.(yaml|json)$/.test(localPath) || /script\.(yaml|json)$/.test(localPath)) {
|
|
92317
|
+
return scriptDigest(await findContentFile(localPath), defaultTs, codebases);
|
|
92318
|
+
}
|
|
92319
|
+
return scriptDigest(localPath, defaultTs, codebases);
|
|
92320
|
+
}
|
|
92321
|
+
async function digest(opts, ...paths) {
|
|
92322
|
+
if (opts.json)
|
|
92323
|
+
setSilent(true);
|
|
92324
|
+
const merged = await mergeConfigWithConfigFile(opts);
|
|
92325
|
+
const codebases = listSyncCodebases(merged);
|
|
92326
|
+
const results = [];
|
|
92327
|
+
for (const p of paths) {
|
|
92328
|
+
results.push(await itemDigest(p, merged.defaultTs, codebases));
|
|
92329
|
+
}
|
|
92330
|
+
if (opts.json) {
|
|
92331
|
+
console.log(JSON.stringify(results, null, 2));
|
|
92332
|
+
return;
|
|
92333
|
+
}
|
|
92334
|
+
for (const r of results) {
|
|
92335
|
+
console.log(`${r.digest} ${r.path}`);
|
|
92336
|
+
for (const [id, d] of Object.entries(r.steps ?? {})) {
|
|
92337
|
+
console.log(`${d} ${r.path}/${id}`);
|
|
92338
|
+
}
|
|
92339
|
+
}
|
|
92340
|
+
}
|
|
92341
|
+
var command27 = new Command().description("Compute the content digest of local scripts and flows, as the `digest` and `root_digest` claims of job OIDC tokens carry it. Run from the root of a sync checkout, pulled after the deployment's dependency jobs completed: they write the lockfiles the digest covers. A flow also lists the digest of each inline step, as `<flow path>/<step id>`.").arguments("<paths...:string>").option("--json", "Output the digests as JSON").action(digest);
|
|
92342
|
+
var digest_default = command27;
|
|
92343
|
+
|
|
92124
92344
|
// src/commands/dev/dev.ts
|
|
92125
92345
|
init_mod3();
|
|
92126
92346
|
init_log();
|
|
@@ -92145,11 +92365,11 @@ await __promiseAll([
|
|
|
92145
92365
|
init_codebase(),
|
|
92146
92366
|
init_local_path_scripts()
|
|
92147
92367
|
]);
|
|
92148
|
-
var
|
|
92149
|
-
import { sep as
|
|
92368
|
+
var import_yaml46 = __toESM(require_dist(), 1);
|
|
92369
|
+
import { sep as SEP22 } from "node:path";
|
|
92150
92370
|
import * as http3 from "node:http";
|
|
92151
92371
|
import * as https from "node:https";
|
|
92152
|
-
import { access, readdir as readdir10, realpath, stat as
|
|
92372
|
+
import { access, readdir as readdir10, realpath, stat as stat19, unlink, writeFile as writeFile21 } from "node:fs/promises";
|
|
92153
92373
|
import { watch as watch2 } from "node:fs";
|
|
92154
92374
|
import * as path25 from "node:path";
|
|
92155
92375
|
import * as fs17 from "node:fs";
|
|
@@ -92415,7 +92635,7 @@ async function dev2(opts) {
|
|
|
92415
92635
|
const rest = [];
|
|
92416
92636
|
const dbtProjects = new Set;
|
|
92417
92637
|
for (const raw of pathsToLoad) {
|
|
92418
|
-
const rel = (await realpath(raw).catch(() => raw)).replace(base +
|
|
92638
|
+
const rel = (await realpath(raw).catch(() => raw)).replace(base + SEP22, "").replaceAll("\\", "/");
|
|
92419
92639
|
const wmPath = isDbtModulePath(rel) ? getScriptBasePathFromModulePath(rel) : undefined;
|
|
92420
92640
|
if (wmPath)
|
|
92421
92641
|
dbtProjects.add(wmPath);
|
|
@@ -92436,7 +92656,7 @@ async function dev2(opts) {
|
|
|
92436
92656
|
if (paths.length == 0) {
|
|
92437
92657
|
return;
|
|
92438
92658
|
}
|
|
92439
|
-
const nativePath = (await realpath(paths[0])).replace(base +
|
|
92659
|
+
const nativePath = (await realpath(paths[0])).replace(base + SEP22, "");
|
|
92440
92660
|
const cpath = nativePath.replaceAll("\\", "/");
|
|
92441
92661
|
const insideFlow = isInsideFlowFolder(cpath);
|
|
92442
92662
|
if (insideFlow || !ignore(nativePath, false)) {
|
|
@@ -92453,7 +92673,7 @@ async function dev2(opts) {
|
|
|
92453
92673
|
return;
|
|
92454
92674
|
const wmFlowPath = stripFolderSuffix(localPath.replace(/\/$/, ""), FLOW_SUFFIXES);
|
|
92455
92675
|
const localFlow = await yamlParseFile(localPath + "flow.yaml");
|
|
92456
|
-
await replaceInlineScripts(localFlow.value.modules, async (path) => await readTextFile(localPath + path), exports_log, localPath,
|
|
92676
|
+
await replaceInlineScripts(localFlow.value.modules, async (path) => await readTextFile(localPath + path), exports_log, localPath, SEP22, undefined);
|
|
92457
92677
|
snapshotPathScripts(localFlow.value);
|
|
92458
92678
|
const localScriptReader = createPreviewLocalScriptReader({
|
|
92459
92679
|
exts,
|
|
@@ -92508,7 +92728,7 @@ async function dev2(opts) {
|
|
|
92508
92728
|
if (!flowDir || !flowYaml)
|
|
92509
92729
|
throw new Error("not a flow");
|
|
92510
92730
|
const localFlow = await yamlParseFile(flowYaml);
|
|
92511
|
-
await replaceInlineScripts(localFlow.value.modules, async (p) => await readTextFile(flowDir + p), exports_log, flowDir,
|
|
92731
|
+
await replaceInlineScripts(localFlow.value.modules, async (p) => await readTextFile(flowDir + p), exports_log, flowDir, SEP22, undefined);
|
|
92512
92732
|
snapshotPathScripts(localFlow.value);
|
|
92513
92733
|
const localScriptReader = createPreviewLocalScriptReader({
|
|
92514
92734
|
exts,
|
|
@@ -92591,7 +92811,7 @@ async function dev2(opts) {
|
|
|
92591
92811
|
const filePath = flowDir + s.path;
|
|
92592
92812
|
if (s.content.startsWith("!inline ")) {
|
|
92593
92813
|
try {
|
|
92594
|
-
await
|
|
92814
|
+
await stat19(filePath);
|
|
92595
92815
|
} catch {
|
|
92596
92816
|
await writeFile21(filePath, "", "utf-8");
|
|
92597
92817
|
}
|
|
@@ -92608,7 +92828,7 @@ async function dev2(opts) {
|
|
|
92608
92828
|
info(`Wrote inline script: ${filePath}`);
|
|
92609
92829
|
}
|
|
92610
92830
|
}
|
|
92611
|
-
const flowYaml =
|
|
92831
|
+
const flowYaml = import_yaml46.stringify(data.flow);
|
|
92612
92832
|
let currentYaml;
|
|
92613
92833
|
try {
|
|
92614
92834
|
currentYaml = await readTextFile(flowYamlPath);
|
|
@@ -92861,8 +93081,8 @@ async function dev2(opts) {
|
|
|
92861
93081
|
await Promise.all([startServer(), watchChanges()]);
|
|
92862
93082
|
console.log("Stopped dev mode");
|
|
92863
93083
|
}
|
|
92864
|
-
var
|
|
92865
|
-
var dev_default2 =
|
|
93084
|
+
var command28 = new Command().description("Watch local file changes and live-reload the dev page for preview. Does NOT deploy to the remote workspace — use wmill sync push for that.").option("--includes <pattern...:string>", "Filter paths given a glob pattern or path").option("--proxy-port <port:number>", "Port for a localhost reverse proxy to the remote Windmill server").option("--path <path:string>", "Watch a specific windmill path (e.g., u/admin/my_script or f/my_flow)").option("--no-open", "Do not open the browser automatically").action(dev2);
|
|
93085
|
+
var dev_default2 = command28;
|
|
92866
93086
|
|
|
92867
93087
|
// src/main.ts
|
|
92868
93088
|
init_gen();
|
|
@@ -93020,8 +93240,8 @@ Worker Group: ${group.groupName} (${group.workers.length} workers)`);
|
|
|
93020
93240
|
info("Use 'wmill instance add' to add a new instance");
|
|
93021
93241
|
}
|
|
93022
93242
|
}
|
|
93023
|
-
var
|
|
93024
|
-
var workers_default =
|
|
93243
|
+
var command29 = new Command().description("List all workers grouped by worker groups").option("--instance [instance]", "Name of the instance to push to, override the active instance").option("--base-url [baseUrl]", "If used with --token, will be used as the base url for the instance").action(displayWorkers);
|
|
93244
|
+
var workers_default = command29;
|
|
93025
93245
|
|
|
93026
93246
|
// src/commands/queues/queues.ts
|
|
93027
93247
|
init_mod3();
|
|
@@ -93129,8 +93349,8 @@ async function displayQueues(opts, workspace) {
|
|
|
93129
93349
|
info("Use 'wmill instance add' to add a new instance");
|
|
93130
93350
|
}
|
|
93131
93351
|
}
|
|
93132
|
-
var
|
|
93133
|
-
var queues_default =
|
|
93352
|
+
var command30 = new Command().description("List all queues with their metrics").arguments("[workspace:string] the optional workspace to filter by (default to all workspaces)").option("--instance [instance]", "Name of the instance to push to, override the active instance").option("--base-url [baseUrl]", "If used with --token, will be used as the base url for the instance").action(displayQueues);
|
|
93353
|
+
var queues_default = command30;
|
|
93134
93354
|
|
|
93135
93355
|
// src/main.ts
|
|
93136
93356
|
await init_dependencies();
|
|
@@ -93147,7 +93367,7 @@ await __promiseAll([
|
|
|
93147
93367
|
init_workspace(),
|
|
93148
93368
|
init_resource_type()
|
|
93149
93369
|
]);
|
|
93150
|
-
import { stat as
|
|
93370
|
+
import { stat as stat22, writeFile as writeFile23, rm as rm8 } from "node:fs/promises";
|
|
93151
93371
|
|
|
93152
93372
|
// src/commands/init/template.ts
|
|
93153
93373
|
var NON_SCHEMA_KEYS = new Set([
|
|
@@ -93639,7 +93859,7 @@ await __promiseAll([
|
|
|
93639
93859
|
init_utils(),
|
|
93640
93860
|
init_freshness()
|
|
93641
93861
|
]);
|
|
93642
|
-
import { cp, mkdir as mkdir15, readdir as readdir11, rm as rm7, stat as
|
|
93862
|
+
import { cp, mkdir as mkdir15, readdir as readdir11, rm as rm7, stat as stat21, writeFile as writeFile22 } from "node:fs/promises";
|
|
93643
93863
|
import { join as join23 } from "node:path";
|
|
93644
93864
|
var WMILL_INIT_AI_SKILLS_SOURCE_ENV = "WMILL_INIT_AI_SKILLS_SOURCE";
|
|
93645
93865
|
var WMILL_INIT_AI_AGENTS_SOURCE_ENV = "WMILL_INIT_AI_AGENTS_SOURCE";
|
|
@@ -93698,7 +93918,7 @@ async function migrateLegacyManagedFile(targetDir) {
|
|
|
93698
93918
|
}
|
|
93699
93919
|
}
|
|
93700
93920
|
const legacyPath = join23(targetDir, LEGACY_AGENTS_CLI_FILENAME);
|
|
93701
|
-
const legacyExists = await
|
|
93921
|
+
const legacyExists = await stat21(legacyPath).catch(() => null) != null;
|
|
93702
93922
|
if (legacyExists) {
|
|
93703
93923
|
await rm7(legacyPath, { force: true });
|
|
93704
93924
|
}
|
|
@@ -93723,7 +93943,7 @@ function cacheOnce(resolver) {
|
|
|
93723
93943
|
};
|
|
93724
93944
|
}
|
|
93725
93945
|
async function reconcileIncludingFile(options) {
|
|
93726
|
-
const exists = await
|
|
93946
|
+
const exists = await stat21(options.path).catch(() => null) != null;
|
|
93727
93947
|
if (!exists) {
|
|
93728
93948
|
await writeFile22(options.path, options.skeleton, "utf8");
|
|
93729
93949
|
return { created: true, migration: "not-applicable" };
|
|
@@ -93841,7 +94061,7 @@ async function readSkillMetadataFromDirectory(skillsDir) {
|
|
|
93841
94061
|
continue;
|
|
93842
94062
|
}
|
|
93843
94063
|
const skillPath = join23(skillsDir, entry.name, "SKILL.md");
|
|
93844
|
-
if (!await
|
|
94064
|
+
if (!await stat21(skillPath).catch(() => null)) {
|
|
93845
94065
|
continue;
|
|
93846
94066
|
}
|
|
93847
94067
|
const content = await readTextFile(skillPath);
|
|
@@ -93986,15 +94206,15 @@ async function promptMigration() {
|
|
|
93986
94206
|
async function promptsAction(opts) {
|
|
93987
94207
|
await refreshPrompts({ yes: opts.yes === true });
|
|
93988
94208
|
}
|
|
93989
|
-
var
|
|
93990
|
-
var prompts_default =
|
|
94209
|
+
var command31 = new Command().description("Refresh AGENTS.wmill.md and managed skills. User-owned AGENTS.md and CLAUDE.md are never overwritten unless you opt in.").option("--yes", "Non-interactive: append the @AGENTS.wmill.md include to an existing AGENTS.md / CLAUDE.md without prompting. Without it, a non-interactive run leaves an unlinked file untouched.").action(promptsAction);
|
|
94210
|
+
var prompts_default = command31;
|
|
93991
94211
|
|
|
93992
94212
|
// src/commands/init/init.ts
|
|
93993
94213
|
await init_tsconfig();
|
|
93994
94214
|
async function initAction(opts) {
|
|
93995
94215
|
let didBindWorkspace = false;
|
|
93996
94216
|
let boundProfile;
|
|
93997
|
-
if (await
|
|
94217
|
+
if (await stat22("wmill.yaml").catch(() => null)) {
|
|
93998
94218
|
info("wmill.yaml already exists, skipping config generation");
|
|
93999
94219
|
} else {
|
|
94000
94220
|
await init_git();
|
|
@@ -94181,14 +94401,14 @@ async function initAction(opts) {
|
|
|
94181
94401
|
}
|
|
94182
94402
|
}
|
|
94183
94403
|
}
|
|
94184
|
-
var
|
|
94185
|
-
var init_default =
|
|
94404
|
+
var command33 = new Command().description("Bootstrap a windmill project with a wmill.yaml file").option("--use-default", "Use default settings without checking backend").option("--use-backend", "Use backend git-sync settings if available").option("--repository <repo:string>", "Specify repository path (e.g., u/user/repo) when using backend settings").option("--bind-profile", "Automatically bind active workspace profile to current Git branch").option("--no-bind-profile", "Skip workspace profile binding prompt").action(initAction);
|
|
94405
|
+
var init_default = command33;
|
|
94186
94406
|
|
|
94187
94407
|
// src/commands/refresh/refresh.ts
|
|
94188
94408
|
init_mod3();
|
|
94189
94409
|
await init_tsconfig();
|
|
94190
|
-
var
|
|
94191
|
-
var refresh_default =
|
|
94410
|
+
var command34 = new Command().description("Refresh wmill-managed project files (AGENTS.wmill.md, skills, tsconfig.wmill.json)").command("prompts", prompts_default).command("tsconfig", tsconfig_default);
|
|
94411
|
+
var refresh_default = command34;
|
|
94192
94412
|
|
|
94193
94413
|
// src/main.ts
|
|
94194
94414
|
init_freshness_gate();
|
|
@@ -94357,8 +94577,8 @@ Warning: Found ${workers.length} active worker(s) on the instance.`));
|
|
|
94357
94577
|
}
|
|
94358
94578
|
var pull3 = new Command().description("Pull completed and queued jobs from workspace").option("-c, --completed-output <file:string>", "Completed jobs output file (default: completed_jobs.json)").option("-q, --queued-output <file:string>", "Queued jobs output file (default: queued_jobs.json)").option("--skip-worker-check", "Skip checking for active workers before export").arguments("[workspace:string]").action(pullJobs);
|
|
94359
94579
|
var push12 = new Command().description("Push completed and queued jobs to workspace").option("-c, --completed-file <file:string>", "Completed jobs input file (default: completed_jobs.json)").option("-q, --queued-file <file:string>", "Queued jobs input file (default: queued_jobs.json)").option("--skip-worker-check", "Skip checking for active workers before import").arguments("[workspace:string]").action(pushJobs);
|
|
94360
|
-
var
|
|
94361
|
-
var jobs_default =
|
|
94580
|
+
var command35 = new Command().description("Manage jobs (import/export)").command("pull", pull3).command("push", push12);
|
|
94581
|
+
var jobs_default = command35;
|
|
94362
94582
|
|
|
94363
94583
|
// src/commands/job/job.ts
|
|
94364
94584
|
init_mod3();
|
|
@@ -94719,8 +94939,8 @@ async function restart(opts, id) {
|
|
|
94719
94939
|
console.log(newId);
|
|
94720
94940
|
}
|
|
94721
94941
|
var listOptions = (cmd) => cmd.option("--json", "Output as JSON (for piping to jq)").option("--script-path <scriptPath:string>", "Filter by exact script/flow path").option("--created-by <createdBy:string>", "Filter by creator username").option("--running", "Show only running jobs").option("--failed", "Show only failed jobs").option("--success <success:boolean>", "Filter by success status (true/false)").option("--limit <limit:number>", "Number of jobs to return (default 30, max 100)").option("--job-kinds <jobKinds:string>", "Filter by job kinds (default: script,flow,singlestepflow)").option("--label <label:string>", "Filter by job label").option("--all", "Include sub-jobs (flow steps). By default only top-level jobs are shown").option("--parent <parent:string>", "Filter by parent job ID (show sub-jobs of a specific flow)").option("--is-flow-step", "Show only flow step jobs");
|
|
94722
|
-
var
|
|
94723
|
-
var job_default =
|
|
94942
|
+
var command36 = listOptions(new Command().description("Manage jobs (list, inspect, cancel)")).action(list13).command("list", listOptions(new Command().description("List recent jobs"))).action(list13).command("get", "Get job details. For flows: shows step tree with sub-job IDs").arguments("<id:string>").option("--json", "Output as JSON (for piping to jq)").action(get10).command("result", "Get the result of a completed job (machine-friendly)").arguments("<id:string>").action(result).command("logs", "Get job logs. For flows: aggregates all step logs").arguments("<id:string>").action(logs).command("cancel", "Cancel a running or queued job").arguments("<id:string>").option("--reason <reason:string>", "Reason for cancellation").action(cancel).command("rerun", "Re-run a completed job with the same args. Prints the new job UUID on stdout.").arguments("<id:string>").action(rerun).command("restart", "Restart a completed flow at a given top-level step. Prints the new flow job UUID on stdout.").arguments("<id:string>").option("--step <stepId:string>", "Top-level step id to restart the flow from", { required: true }).option("--iteration <n:number>", "For a top-level branchall or for-loop step, the iteration to restart at").action(restart);
|
|
94943
|
+
var job_default = command36;
|
|
94724
94944
|
|
|
94725
94945
|
// src/commands/group/group.ts
|
|
94726
94946
|
init_mod3();
|
|
@@ -94819,8 +95039,8 @@ async function removeUser(opts, name, username) {
|
|
|
94819
95039
|
});
|
|
94820
95040
|
info(colors.green(`User '${username}' removed from group '${name}'.`));
|
|
94821
95041
|
}
|
|
94822
|
-
var
|
|
94823
|
-
var group_default =
|
|
95042
|
+
var command37 = new Command().description("Manage workspace groups").option("--json", "Output as JSON (for piping to jq)").action(list14).command("list", "List all groups in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list14).command("get", "Get group details and members").arguments("<name:string>").option("--json", "Output as JSON (for piping to jq)").action(get11).command("create", "Create a new group").arguments("<name:string>").option("--summary <summary:string>", "Group summary/description").action(create).command("delete", "Delete a group").arguments("<name:string>").action(deleteGroup2).command("add-user", "Add a user to a group").arguments("<name:string> <username:string>").action(addUser2).command("remove-user", "Remove a user from a group").arguments("<name:string> <username:string>").action(removeUser);
|
|
95043
|
+
var group_default = command37;
|
|
94824
95044
|
|
|
94825
95045
|
// src/commands/audit/audit.ts
|
|
94826
95046
|
init_mod3();
|
|
@@ -94897,8 +95117,8 @@ async function get12(opts, id) {
|
|
|
94897
95117
|
}
|
|
94898
95118
|
}
|
|
94899
95119
|
var auditListOptions = (cmd) => cmd.option("--json", "Output as JSON (for piping to jq)").option("--username <username:string>", "Filter by username").option("--operation <operation:string>", "Filter by operation (exact or prefix)").option("--action-kind <actionKind:string>", "Filter by action kind (Create, Update, Delete, Execute)").option("--before <before:string>", "Filter events before this timestamp").option("--after <after:string>", "Filter events after this timestamp").option("--limit <limit:number>", "Number of entries to return (default 30, max 100)");
|
|
94900
|
-
var
|
|
94901
|
-
var audit_default =
|
|
95120
|
+
var command38 = auditListOptions(new Command().description("View audit logs (requires admin)")).action(list15).command("list", auditListOptions(new Command().description("List audit log entries"))).action(list15).command("get", "Get a specific audit log entry").arguments("<id:string>").option("--json", "Output as JSON (for piping to jq)").action(get12);
|
|
95121
|
+
var audit_default = command38;
|
|
94902
95122
|
|
|
94903
95123
|
// src/commands/token/token.ts
|
|
94904
95124
|
init_mod3();
|
|
@@ -94952,8 +95172,8 @@ async function deleteToken2(opts, tokenPrefix) {
|
|
|
94952
95172
|
await deleteToken({ tokenPrefix });
|
|
94953
95173
|
info(colors.green(`Token with prefix '${tokenPrefix}' deleted.`));
|
|
94954
95174
|
}
|
|
94955
|
-
var
|
|
94956
|
-
var token_default =
|
|
95175
|
+
var command39 = new Command().description("Manage API tokens").option("--json", "Output as JSON (for piping to jq)").action(list16).command("list", "List API tokens").option("--json", "Output as JSON (for piping to jq)").action(list16).command("create", "Create a new API token").option("--label <label:string>", "Token label").option("--expiration <expiration:string>", "Token expiration (ISO 8601 timestamp)").action(create2).command("delete", "Delete a token by its prefix").arguments("<token_prefix:string>").action(deleteToken2);
|
|
95176
|
+
var token_default = command39;
|
|
94957
95177
|
|
|
94958
95178
|
// src/commands/trash/trash.ts
|
|
94959
95179
|
init_mod3();
|
|
@@ -95044,8 +95264,8 @@ async function restore(opts, ...ids) {
|
|
|
95044
95264
|
process.exitCode = 1;
|
|
95045
95265
|
}
|
|
95046
95266
|
}
|
|
95047
|
-
var
|
|
95048
|
-
var trash_default =
|
|
95267
|
+
var command40 = new Command().description("List, inspect and restore items deleted in the last three days (requires admin)").option("--json", "Output as JSON (for piping to jq)").option("--kind <kind:string>", "Only items of this kind: script, flow, app, schedule, variable, resource or a trigger kind such as http_trigger").option("--limit <limit:integer>", "Number of items to return (default 100, max 1000)").option("--page <page:integer>", "Page to return, starting at 1").action(list17).command("list", "List trashed items, most recently deleted first").option("--json", "Output as JSON (for piping to jq)").option("--kind <kind:string>", "Only items of this kind: script, flow, app, schedule, variable, resource or a trigger kind such as http_trigger").option("--limit <limit:integer>", "Number of items to return (default 100, max 1000)").option("--page <page:integer>", "Page to return, starting at 1").action(list17).command("get", "Show a trashed item and the data it was deleted with").arguments("<id:integer>").option("--json", "Output as JSON (for piping to jq)").action(get13).command("restore", "Put trashed items back at their paths").arguments("<ids...:integer>").action(restore);
|
|
95268
|
+
var trash_default = command40;
|
|
95049
95269
|
|
|
95050
95270
|
// src/main.ts
|
|
95051
95271
|
await init_generate_metadata();
|
|
@@ -95106,14 +95326,14 @@ ${await res.text()}`);
|
|
|
95106
95326
|
console.log();
|
|
95107
95327
|
}
|
|
95108
95328
|
}
|
|
95109
|
-
var
|
|
95110
|
-
var docs_default =
|
|
95329
|
+
var command41 = new Command().name("docs").description("Search Windmill documentation.").arguments("<query:string>").option("--json", "Output results as JSON.").action(docs);
|
|
95330
|
+
var docs_default = command41;
|
|
95111
95331
|
|
|
95112
95332
|
// src/commands/config/config.ts
|
|
95113
95333
|
init_mod3();
|
|
95114
95334
|
init_log();
|
|
95115
95335
|
init_colors2();
|
|
95116
|
-
var
|
|
95336
|
+
var import_yaml47 = __toESM(require_dist(), 1);
|
|
95117
95337
|
import { writeFile as writeFile25 } from "node:fs/promises";
|
|
95118
95338
|
await __promiseAll([
|
|
95119
95339
|
init_conf(),
|
|
@@ -95168,7 +95388,7 @@ async function migrateAction() {
|
|
|
95168
95388
|
} else {
|
|
95169
95389
|
newConf.workspaces = workspaces;
|
|
95170
95390
|
}
|
|
95171
|
-
await writeFile25(wmillYamlPath,
|
|
95391
|
+
await writeFile25(wmillYamlPath, import_yaml47.stringify(newConf), "utf-8");
|
|
95172
95392
|
info(colors.green(`✅ Migrated '${legacyKey}' to 'workspaces' in ${wmillYamlPath}`));
|
|
95173
95393
|
if (wsNames.length > 0) {
|
|
95174
95394
|
info(` Workspace entries: ${wsNames.join(", ")}`);
|
|
@@ -95177,8 +95397,8 @@ async function migrateAction() {
|
|
|
95177
95397
|
info(` Also removed additional legacy keys: ${legacyKeys.slice(1).join(", ")}`);
|
|
95178
95398
|
}
|
|
95179
95399
|
}
|
|
95180
|
-
var
|
|
95181
|
-
var config_default =
|
|
95400
|
+
var command42 = new Command().name("config").description("Show all available wmill.yaml configuration options").option("--json", "Output as JSON for programmatic consumption").action(configAction).command("migrate").description("Migrate wmill.yaml from gitBranches/environments to workspaces format").action(migrateAction);
|
|
95401
|
+
var config_default = command42;
|
|
95182
95402
|
|
|
95183
95403
|
// src/commands/datatable/datatable.ts
|
|
95184
95404
|
init_mod3();
|
|
@@ -97186,8 +97406,8 @@ async function serve2(opts) {
|
|
|
97186
97406
|
async function psql2(opts) {
|
|
97187
97407
|
await psql(opts);
|
|
97188
97408
|
}
|
|
97189
|
-
var
|
|
97190
|
-
var datatable_default =
|
|
97409
|
+
var command43 = new Command().description("datatable related commands").command("list", "list all datatables in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list18).command("run", "run a SQL query on a datatable").arguments("<sql:string>").option("-n --name <name:string>", "Datatable name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run4).command("migrate", migrateCommand).command("create", "register a datatable database in the workspace (default: instance-backed 'main') so scripts can use datatable://<name>").arguments("[name:string]").option("--resource <resource:string>", "Back the datatable with an existing postgresql resource path instead of the instance database").option("--force", "Allow adding to a workspace that already has datatables (fork metadata on existing ones is not preserved)").action(create3).command("serve", "Serve all datatables as a Postgres-wire endpoint (psql, DBeaver, pgAdmin); the client picks the datatable via the database name in its connection string").option("--port <port:number>", "Port to listen on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address (default: 127.0.0.1)").option("--password <password:string>", "Password for Postgres clients (default: generate a random password at startup)").action(serve2).command("psql", "Start a serve listener and launch psql connected to it").option("-n --name <name:string>", "Datatable to connect psql to (default: main)").option("--port <port:number>", "Port the proxy listens on (default: first free port in 5433-5500)").option("--host <host:string>", "Bind address for the proxy (default: 127.0.0.1)").option("--password <password:string>", "Password for the temporary Postgres proxy (default: generate a random password at startup)").action(psql2);
|
|
97410
|
+
var datatable_default = command43;
|
|
97191
97411
|
|
|
97192
97412
|
// src/commands/pipeline/pipeline.ts
|
|
97193
97413
|
init_mod3();
|
|
@@ -98327,12 +98547,12 @@ await __promiseAll([
|
|
|
98327
98547
|
import * as http4 from "node:http";
|
|
98328
98548
|
import * as fs20 from "node:fs";
|
|
98329
98549
|
import * as path28 from "node:path";
|
|
98330
|
-
import { createHash as
|
|
98550
|
+
import { createHash as createHash4, randomBytes as randomBytes2 } from "node:crypto";
|
|
98331
98551
|
import process27 from "node:process";
|
|
98332
98552
|
var PORT2 = 3201;
|
|
98333
98553
|
var LISTEN_HOST = "127.0.0.1";
|
|
98334
98554
|
async function stableWsToken(remote, workspaceId, root, folder, port) {
|
|
98335
|
-
const key =
|
|
98555
|
+
const key = createHash4("sha256").update(`${remote}\x00${workspaceId}\x00${root}\x00${folder}\x00${port}`).digest("hex").slice(0, 32);
|
|
98336
98556
|
let tokenFile;
|
|
98337
98557
|
try {
|
|
98338
98558
|
tokenFile = path28.join(await getConfigDirPath(), `pipeline-dev-${key}.token`);
|
|
@@ -98477,8 +98697,8 @@ async function dev3(opts, folderArg) {
|
|
|
98477
98697
|
process27.exit(0);
|
|
98478
98698
|
});
|
|
98479
98699
|
}
|
|
98480
|
-
var
|
|
98481
|
-
var dev_default3 =
|
|
98700
|
+
var command44 = new Command().description("Live-preview a data pipeline from local files: watch an `f/<folder>` of `// pipeline` scripts, push the working-tree graph to the dev page, and run the cascade via preview (no deploy).").arguments("[folder:string]").option("--port <port:number>", "Port for the dev WebSocket server.").option("--no-open", "Do not open the browser automatically.").option("--frontend <origin:string>", "Origin serving the /pipeline_dev page (e.g. http://localhost:3000 for a locally-run frontend). Defaults to the workspace remote; use it when the remote's deployed frontend predates the dev page.").action(dev3);
|
|
98701
|
+
var dev_default3 = command44;
|
|
98482
98702
|
|
|
98483
98703
|
// src/commands/pipeline/docs.ts
|
|
98484
98704
|
init_gen();
|
|
@@ -99369,8 +99589,8 @@ Full logs: ${runUrl}`);
|
|
|
99369
99589
|
info(colors.green.bold(`Bounded run complete — ${order.length} script(s) succeeded.`));
|
|
99370
99590
|
}
|
|
99371
99591
|
}
|
|
99372
|
-
var
|
|
99373
|
-
var pipeline_default =
|
|
99592
|
+
var command45 = new Command().description("inspect asset-driven pipelines (scripts marked `// pipeline`, wired by `// on <spec>` annotations)").command("list", "list pipeline folders in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list19).command("show", "render a pipeline folder's DAG (sources, lineage, subscriptions) in the terminal").arguments("<folder:string>").option("--json", "Output the raw asset graph as JSON").option("--local", "Build the graph from local working-tree files (// pipeline scripts) instead of the deployed workspace — no deploy needed.").action(show2).command("run", "run a cascade: from --from (a root OR any mid-DAG model), fan downstream up to the --to end node(s)").arguments("<folder:string>").option("--from <script:string>", "Start script (short name or path). May be any node, including a mid-DAG model — that node plus its transitive downstream runs, upstream is NOT re-run (dbt `--select model+`). Defaults to the folder's sole schedule/manual root.").option("--to <node:string>", "End node(s) to stop at — script names/paths or asset URIs (e.g. datatable://main/staged). Repeatable or comma-separated. Omit to run the full downstream.", { collect: true }).option("--dry-run", "Print the topological run plan without executing.").option("--json", "Output the plan as JSON (for piping to jq).").option("--local", "Run the local working-tree scripts via preview (no deploy) instead of the deployed versions; the graph is built from local files.").option("--upload <binding:string>", "Bind an object to a data_upload/webhook entry point so it runs in the cascade, as SCRIPT[:PARAM]=SOURCE (SOURCE is a local file or an s3://key). Local files are uploaded to the workspace store; the S3Object param is inferred when the script has exactly one. Repeatable.", { collect: true }).option("--arg <binding:string>", "Pass a plain run arg to a script in the cascade, as SCRIPT:PARAM=VALUE (VALUE is parsed as JSON when possible, else taken as a string — e.g. daily_report:partition=2026-07-02). Repeatable.", { collect: true }).option("--partition <value:string>", "Partition value for `// partitioned` scripts in the run (e.g. 2026-06-30) — use it to backfill a past slice. With --local, time kinds (daily/hourly/weekly/monthly) default to the current UTC period when omitted; `dynamic` always needs it. Deployed runs without it defer to backend run-start resolution.").action(run5).command("docs", "generate PIPELINE.md (+ AGENTS.md pointer) describing a folder's pipeline graph and datatable schemas, for an editor / agentic loop").arguments("<folder:string>").option("--local", "Build the graph from local working-tree files instead of the deployed workspace.").action(generatePipelineDocs).command("dev", dev_default3);
|
|
99593
|
+
var pipeline_default = command45;
|
|
99374
99594
|
|
|
99375
99595
|
// src/commands/ducklake/ducklake.ts
|
|
99376
99596
|
init_mod3();
|
|
@@ -99400,8 +99620,8 @@ async function run6(opts, sql) {
|
|
|
99400
99620
|
const name = opts.name ?? DEFAULT_DUCKLAKE_NAME;
|
|
99401
99621
|
await runCatalogQuery(opts, "ducklake", name, sql);
|
|
99402
99622
|
}
|
|
99403
|
-
var
|
|
99404
|
-
var ducklake_default =
|
|
99623
|
+
var command46 = new Command().description("ducklake related commands").command("list", "list all ducklakes in the workspace").option("--json", "Output as JSON (for piping to jq)").action(list20).command("run", "run a SQL query on a ducklake").arguments("<sql:string>").option("-n --name <name:string>", "Ducklake name (default: main)").option("-s --silent", "Output only the final result as JSON. Useful for scripting.").action(run6);
|
|
99624
|
+
var ducklake_default = command46;
|
|
99405
99625
|
|
|
99406
99626
|
// src/commands/object-storage/object-storage.ts
|
|
99407
99627
|
init_mod3();
|
|
@@ -99602,8 +99822,8 @@ async function preview3(opts, fileKey) {
|
|
|
99602
99822
|
`);
|
|
99603
99823
|
}
|
|
99604
99824
|
}
|
|
99605
|
-
var
|
|
99606
|
-
var object_storage_default =
|
|
99825
|
+
var command47 = new Command().alias("s3").description("Object storage (S3) related commands. Operates on the workspace's default object storage; use --storage to target a configured secondary storage.").action(listStorages).command("list", "List configured object storages for the workspace (default + secondary).").option("--json", "Output as JSON (for piping to jq)").action(listStorages).command("files", "List files in an object storage. Optionally filter by prefix.").alias("ls").arguments("[prefix:string]").option("--json", "Output as JSON (for piping to jq)").option("--max-keys <maxKeys:number>", "Page size (default 100)").option("--marker <marker:string>", "Pagination marker from a previous response").option("--storage <storage:string>", "Secondary storage name (omit for the workspace default)").action(listFiles).command("upload", "Upload a local file to object storage at the given file key.").arguments("<local_path:string> <file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--content-type <contentType:string>", "Content-Type header to set on the object").option("--content-disposition <contentDisposition:string>", "Content-Disposition header to set on the object").action(upload).command("download", "Download an object to a local file (or stdout). Default output path is the basename of the file key in the current directory.").arguments("<file_key:string> [output_path:string]").option("--storage <storage:string>", "Secondary storage name").option("--stdout", "Write file contents to stdout instead of a file").action(download).command("delete", "Delete an object from object storage. Prompts for confirmation unless --yes is set.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--yes", "Skip the confirmation prompt").action(del).command("move", "Move an object within the same storage (rename or relocate by key).").arguments("<src_file_key:string> <dest_file_key:string>").option("--storage <storage:string>", "Secondary storage name").action(move).command("info", "Show metadata (size, mime, last-modified) for an object.").arguments("<file_key:string>").option("--json", "Output as JSON (for piping to jq)").option("--storage <storage:string>", "Secondary storage name").action(info2).command("preview", "Preview the contents of an object (text/CSV). Use --bytes-from / --bytes-length to peek at a slice of binary files.").arguments("<file_key:string>").option("--storage <storage:string>", "Secondary storage name").option("--mime <mime:string>", "Override the detected mime type (e.g. text/csv)").option("--bytes-from <bytesFrom:number>", "Start offset in bytes").option("--bytes-length <bytesLength:number>", "Number of bytes to read").option("--csv-separator <csvSeparator:string>", "CSV column separator (default ,)").option("--csv-header", "Treat the first CSV row as a header").action(preview3);
|
|
99826
|
+
var object_storage_default = command47;
|
|
99607
99827
|
|
|
99608
99828
|
// src/main.ts
|
|
99609
99829
|
await init_context();
|
|
@@ -99623,7 +99843,7 @@ async function checkVersionSafe(cmd) {
|
|
|
99623
99843
|
}
|
|
99624
99844
|
mainCommand.version(`${currentVersion} (New version available: ${latestVersion}. Run '${mainCommand.getName()} upgrade' to upgrade to the latest version!)`);
|
|
99625
99845
|
}
|
|
99626
|
-
var
|
|
99846
|
+
var command48 = new Command().name("wmill").action(() => info(`Welcome to Windmill CLI ${VERSION}. Use -h for help.`)).description("Windmill CLI").globalOption("--workspace <workspace:string>", "Specify the target workspace. This overrides the default workspace.").globalOption("--debug --verbose", "Show debug/verbose logs").globalOption("--show-diffs", "Show diff informations when syncing (may show sensitive informations)").globalOption("--token <token:string>", "Specify an API token. This will override any stored token.").globalOption("--base-url <baseUrl:string>", "Specify the base URL of the API. If used, --token and --workspace are required and no local remote/workspace already set will be used.").globalOption("--config-dir <configDir:string>", "Specify a custom config directory. Overrides WMILL_CONFIG_DIR environment variable and default ~/.config location.").env("HEADERS <headers:string>", `Specify headers to use for all requests. e.g: "HEADERS='h1: v1, h2: v2'"`).version(VERSION).versionOption(false).helpOption("-h, --help", "Show this help.", {
|
|
99627
99847
|
action: async function() {
|
|
99628
99848
|
const self2 = this;
|
|
99629
99849
|
const long = self2.getRawArgs().includes(`--${self2.getHelpOption()?.name}`);
|
|
@@ -99635,7 +99855,7 @@ var command47 = new Command().name("wmill").action(() => info(`Welcome to Windmi
|
|
|
99635
99855
|
self2.showHelp({ long });
|
|
99636
99856
|
self2.exit();
|
|
99637
99857
|
}
|
|
99638
|
-
}).command("init", init_default).command("refresh", refresh_default).command("app", app_default).command("flow", flow_default).command("script", script_default).command("workspace", workspace_default).command("resource", resource_default).command("resource-type", resource_type_default).command("user", user_default).command("variable", variable_default).command("hub", hub_default).command("folder", folder_default).command("schedule", schedule_default2).command("trigger", trigger_default).command("dev", dev_default2).command("sync", sync_default).command("lint", lint_default).command("gitsync-settings", gitsync_settings_default).command("protection-rules", protection_rules_default).command("instance", instance_default).command("worker-groups", worker_groups_default).command("workers", workers_default).command("queues", queues_default).command("dependencies", dependencies_default).command("jobs", jobs_default).command("job", job_default).command("group", group_default).command("audit", audit_default).command("token", token_default).command("trash", trash_default).command("generate-metadata", generate_metadata_default).command("docs", docs_default).command("config", config_default).command("datatable", datatable_default).command("pipeline", pipeline_default).command("ducklake", ducklake_default).command("object-storage", object_storage_default).command("version --version", "Show version information").action(async (opts) => {
|
|
99858
|
+
}).command("init", init_default).command("refresh", refresh_default).command("app", app_default).command("flow", flow_default).command("script", script_default).command("workspace", workspace_default).command("resource", resource_default).command("resource-type", resource_type_default).command("user", user_default).command("variable", variable_default).command("hub", hub_default).command("folder", folder_default).command("schedule", schedule_default2).command("trigger", trigger_default).command("dev", dev_default2).command("sync", sync_default).command("lint", lint_default).command("digest", digest_default).command("gitsync-settings", gitsync_settings_default).command("protection-rules", protection_rules_default).command("instance", instance_default).command("worker-groups", worker_groups_default).command("workers", workers_default).command("queues", queues_default).command("dependencies", dependencies_default).command("jobs", jobs_default).command("job", job_default).command("group", group_default).command("audit", audit_default).command("token", token_default).command("trash", trash_default).command("generate-metadata", generate_metadata_default).command("docs", docs_default).command("config", config_default).command("datatable", datatable_default).command("pipeline", pipeline_default).command("ducklake", ducklake_default).command("object-storage", object_storage_default).command("version --version", "Show version information").action(async (opts) => {
|
|
99639
99859
|
console.log("CLI version: " + VERSION);
|
|
99640
99860
|
try {
|
|
99641
99861
|
const provider = new NpmProvider({ package: "windmill-cli" });
|
|
@@ -99665,20 +99885,20 @@ var command47 = new Command().name("wmill").action(() => info(`Welcome to Windmi
|
|
|
99665
99885
|
error(e);
|
|
99666
99886
|
info("Try running with sudo and otherwise check the result of the command: npm uninstall windmill-cli && npm install -g windmill-cli");
|
|
99667
99887
|
})).command("completions", new Command().description("Generate shell completions.").command("bash", new Command().description("Generate bash completions.").action(() => {
|
|
99668
|
-
process.stdout.write(generateShellCompletions(
|
|
99888
|
+
process.stdout.write(generateShellCompletions(command48, "bash") + `
|
|
99669
99889
|
`);
|
|
99670
99890
|
})).command("zsh", new Command().description("Generate zsh completions.").action(() => {
|
|
99671
|
-
process.stdout.write(generateShellCompletions(
|
|
99891
|
+
process.stdout.write(generateShellCompletions(command48, "zsh") + `
|
|
99672
99892
|
`);
|
|
99673
99893
|
})).command("fish", new Command().description("Generate fish completions.").action(() => {
|
|
99674
|
-
process.stdout.write(generateShellCompletions(
|
|
99894
|
+
process.stdout.write(generateShellCompletions(command48, "fish") + `
|
|
99675
99895
|
`);
|
|
99676
99896
|
})));
|
|
99677
99897
|
async function main2() {
|
|
99678
99898
|
try {
|
|
99679
99899
|
const args = process.argv.slice(2);
|
|
99680
99900
|
if (args.length === 0) {
|
|
99681
|
-
|
|
99901
|
+
command48.showHelp();
|
|
99682
99902
|
}
|
|
99683
99903
|
const LOG_LEVEL = args.includes("--verbose") || args.includes("--debug") ? "DEBUG" : "INFO";
|
|
99684
99904
|
setShowDiffs(args.includes("--show-diffs"));
|
|
@@ -99699,7 +99919,7 @@ async function main2() {
|
|
|
99699
99919
|
await init_tsconfig();
|
|
99700
99920
|
await warnIfTsconfigStale().catch(() => {});
|
|
99701
99921
|
}
|
|
99702
|
-
await
|
|
99922
|
+
await command48.parse(args);
|
|
99703
99923
|
} catch (e) {
|
|
99704
99924
|
const apiError = apiErrorMessage(e);
|
|
99705
99925
|
if (apiError !== undefined) {
|
|
@@ -99733,7 +99953,7 @@ if (isMain()) {
|
|
|
99733
99953
|
process.stdin.destroy();
|
|
99734
99954
|
});
|
|
99735
99955
|
}
|
|
99736
|
-
var main_default =
|
|
99956
|
+
var main_default = command48;
|
|
99737
99957
|
export {
|
|
99738
99958
|
VERSION,
|
|
99739
99959
|
WM_FORK_PREFIX,
|