windmill-cli 1.875.0 → 1.876.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 +37 -3
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16806,7 +16806,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16806
16806
|
PASSWORD: undefined,
|
|
16807
16807
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16808
16808
|
USERNAME: undefined,
|
|
16809
|
-
VERSION: "1.
|
|
16809
|
+
VERSION: "1.876.0",
|
|
16810
16810
|
WITH_CREDENTIALS: true,
|
|
16811
16811
|
interceptors: {
|
|
16812
16812
|
request: new Interceptors,
|
|
@@ -20159,7 +20159,7 @@ var init_auth = __esm(async () => {
|
|
|
20159
20159
|
});
|
|
20160
20160
|
|
|
20161
20161
|
// src/core/constants.ts
|
|
20162
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
20162
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.876.0";
|
|
20163
20163
|
|
|
20164
20164
|
// src/utils/resource_folders.ts
|
|
20165
20165
|
import { existsSync } from "node:fs";
|
|
@@ -59313,7 +59313,7 @@ var init_openflow = __esm(() => {
|
|
|
59313
59313
|
openflow_default = {
|
|
59314
59314
|
openapi: "3.0.3",
|
|
59315
59315
|
info: {
|
|
59316
|
-
version: "1.
|
|
59316
|
+
version: "1.876.0",
|
|
59317
59317
|
title: "OpenFlow Spec",
|
|
59318
59318
|
contact: {
|
|
59319
59319
|
name: "Ruben Fiszel",
|
|
@@ -82527,6 +82527,7 @@ var init_skills_gen = __esm(() => {
|
|
|
82527
82527
|
{ name: "write-pipeline", description: "MUST use when creating or modifying a data pipeline, a set of scripts marked `pipeline` and wired together by `on` / `materialize` annotations." },
|
|
82528
82528
|
{ name: "datatables", description: "MUST use when changing a data table's schema, writing or running its migrations, or working with its roles and permissions." },
|
|
82529
82529
|
{ name: "workspace-settings", description: "MUST use when reading or changing workspace settings, or the settings.yaml file `wmill sync` keeps." },
|
|
82530
|
+
{ name: "code-mode", description: "MUST use when the user asks for something done against the systems the workspace connects to (an API lookup, moving data, checking a status) rather than for building a script, flow or app." },
|
|
82530
82531
|
{ name: "rich-results", description: "MUST use when a script or flow should return a table, chart, markdown, image, file or map instead of plain JSON." },
|
|
82531
82532
|
{ name: "cli-commands", description: "MUST use when using the CLI, including debugging job failures and inspecting run history via `wmill job`." },
|
|
82532
82533
|
{ name: "preview", description: "MUST use when opening the Windmill dev page / visual preview of a flow, script, or app. Triggers on words like preview, open, navigate to, visualize, see the flow/app/script, and after writing a flow/script/app for visual verification." }
|
|
@@ -91049,6 +91050,39 @@ instance groups, and the keys \`ducklake\`, \`dbt_warehouses\`, \`deploy_ui\`, \
|
|
|
91049
91050
|
\`datatable_permissions\` is pushed only with \`includeDatatablePermissions: true\` (or
|
|
91050
91051
|
\`--include-datatable-permissions\`). A push ignores \`protection_rules\`: \`protection-rules.yaml\` and
|
|
91051
91052
|
\`wmill protection-rules push\` sync them.
|
|
91053
|
+
`,
|
|
91054
|
+
"code-mode": `---
|
|
91055
|
+
name: code-mode
|
|
91056
|
+
description: MUST use when the user asks for something done against the systems the workspace connects to (an API lookup, moving data, checking a status) rather than for building a script, flow or app.
|
|
91057
|
+
---
|
|
91058
|
+
|
|
91059
|
+
# Solving a task with code
|
|
91060
|
+
|
|
91061
|
+
When the user asks for something done against the systems their workspace connects to (look
|
|
91062
|
+
something up in an API, move data, check a status), answer it with a Windmill script run as a
|
|
91063
|
+
preview: it executes on the workspace's workers, with its resources. A script that worked can be
|
|
91064
|
+
saved and run as is the next time.
|
|
91065
|
+
|
|
91066
|
+
1. **Look for a saved script first**, by the user's words and by the system the task touches. If
|
|
91067
|
+
one fits, run it rather than writing new code; if one nearly fits, offer to change it rather
|
|
91068
|
+
than writing a near-duplicate.
|
|
91069
|
+
2. **Otherwise write one script and run it as a preview.** Do the fetching, filtering and
|
|
91070
|
+
combining in the code, and return only what answers the task, not raw API payloads. Take
|
|
91071
|
+
credentials as a resource-typed \`main\` parameter, passed as \`$res:<path>\` when running, never
|
|
91072
|
+
as a token in the code. Give \`main\` typed parameters for whatever would change between runs,
|
|
91073
|
+
so the script is reusable.
|
|
91074
|
+
3. **Offer to save it** when the task is likely to come back, without saving it unasked. Saving
|
|
91075
|
+
makes a draft, deployed only when the user asks; from then on it is an ordinary script.
|
|
91076
|
+
|
|
91077
|
+
Load the \`write-script-<language>\` skill before writing the script; the resource's fields are in
|
|
91078
|
+
\`rt.d.ts\` (\`wmill resource-type generate-namespace\`). A preview refuses a file that
|
|
91079
|
+
is not at a workspace path inside the project: write it at \`u/<username>/<name>.ts\` (\`wmill
|
|
91080
|
+
workspace whoami\` gives the username) without asking, never under \`f/\`, which a push deploys,
|
|
91081
|
+
even next to the resource it uses; run it with \`wmill script preview
|
|
91082
|
+
<file> -d '<args>'\`. Search with \`wmill script list\` and \`wmill flow list\`; run a deployed one
|
|
91083
|
+
with \`wmill script run <path>\`. Never push the file on your own. Delete it if the user does not
|
|
91084
|
+
keep it; if they do, move it where the project syncs (the \`includes\` of \`wmill.yaml\`, \`f/**\` by
|
|
91085
|
+
default) and push only on their go.
|
|
91052
91086
|
`,
|
|
91053
91087
|
"rich-results": `---
|
|
91054
91088
|
name: rich-results
|