windmill-cli 1.728.1 → 1.729.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 +301 -56
- package/package.json +1 -1
package/esm/main.js
CHANGED
|
@@ -16772,7 +16772,7 @@ var init_OpenAPI = __esm(() => {
|
|
|
16772
16772
|
PASSWORD: undefined,
|
|
16773
16773
|
TOKEN: getEnv3("WM_TOKEN"),
|
|
16774
16774
|
USERNAME: undefined,
|
|
16775
|
-
VERSION: "1.
|
|
16775
|
+
VERSION: "1.729.0",
|
|
16776
16776
|
WITH_CREDENTIALS: true,
|
|
16777
16777
|
interceptors: {
|
|
16778
16778
|
request: new Interceptors,
|
|
@@ -17227,6 +17227,7 @@ __export(exports_services_gen, {
|
|
|
17227
17227
|
migrateSecretsToAwsSm: () => migrateSecretsToAwsSm,
|
|
17228
17228
|
migrateSecretsFromAzureKv: () => migrateSecretsFromAzureKv,
|
|
17229
17229
|
migrateSecretsFromAwsSm: () => migrateSecretsFromAwsSm,
|
|
17230
|
+
migrateLegacyDraft: () => migrateLegacyDraft,
|
|
17230
17231
|
mcpOauthCallback: () => mcpOauthCallback,
|
|
17231
17232
|
logout: () => logout,
|
|
17232
17233
|
loginWithOauth: () => loginWithOauth,
|
|
@@ -19831,8 +19832,9 @@ var backendVersion = () => {
|
|
|
19831
19832
|
}, connectClientCredentials = (data3) => {
|
|
19832
19833
|
return request(OpenAPI, {
|
|
19833
19834
|
method: "POST",
|
|
19834
|
-
url: "/oauth/connect_client_credentials/{client}",
|
|
19835
|
+
url: "/w/{workspace}/oauth/connect_client_credentials/{client}",
|
|
19835
19836
|
path: {
|
|
19837
|
+
workspace: data3.workspace,
|
|
19836
19838
|
client: data3.client
|
|
19837
19839
|
},
|
|
19838
19840
|
body: data3.requestBody,
|
|
@@ -20328,6 +20330,9 @@ var backendVersion = () => {
|
|
|
20328
20330
|
url: "/w/{workspace}/drafts/list",
|
|
20329
20331
|
path: {
|
|
20330
20332
|
workspace: data3.workspace
|
|
20333
|
+
},
|
|
20334
|
+
query: {
|
|
20335
|
+
all_users: data3.allUsers
|
|
20331
20336
|
}
|
|
20332
20337
|
});
|
|
20333
20338
|
}, getDraftForUser = (data3) => {
|
|
@@ -20358,6 +20363,18 @@ var backendVersion = () => {
|
|
|
20358
20363
|
body: data3.requestBody,
|
|
20359
20364
|
mediaType: "application/json"
|
|
20360
20365
|
});
|
|
20366
|
+
}, migrateLegacyDraft = (data3) => {
|
|
20367
|
+
return request(OpenAPI, {
|
|
20368
|
+
method: "POST",
|
|
20369
|
+
url: "/w/{workspace}/drafts/migrate_legacy/{kind}/{path}",
|
|
20370
|
+
path: {
|
|
20371
|
+
workspace: data3.workspace,
|
|
20372
|
+
kind: data3.kind,
|
|
20373
|
+
path: data3.path
|
|
20374
|
+
},
|
|
20375
|
+
body: data3.requestBody,
|
|
20376
|
+
mediaType: "application/json"
|
|
20377
|
+
});
|
|
20361
20378
|
}, createScript = (data3) => {
|
|
20362
20379
|
return request(OpenAPI, {
|
|
20363
20380
|
method: "POST",
|
|
@@ -25347,7 +25364,7 @@ var init_auth = __esm(async () => {
|
|
|
25347
25364
|
});
|
|
25348
25365
|
|
|
25349
25366
|
// src/core/constants.ts
|
|
25350
|
-
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.
|
|
25367
|
+
var WM_FORK_PREFIX = "wm-fork", VERSION = "1.729.0";
|
|
25351
25368
|
|
|
25352
25369
|
// src/utils/git.ts
|
|
25353
25370
|
var exports_git = {};
|
|
@@ -64059,7 +64076,7 @@ var init_generate_metadata = __esm(async () => {
|
|
|
64059
64076
|
init_codebase(),
|
|
64060
64077
|
init_dependency_tree()
|
|
64061
64078
|
]);
|
|
64062
|
-
command4 = new Command().description("
|
|
64079
|
+
command4 = new Command().description("Regenerate stale local locks and script schemas and refresh wmill-lock.yaml content hashes (scripts, flows, apps). Writes local files only, not a deploy. Run it after edits that add or remove imports or change a script's arguments, so the lock, the auto-generated UI schema, and wmill-lock.yaml stay in sync.").arguments("[folder:string]").option("--yes", "Skip confirmation prompt").option("--dry-run", "Show what would be updated without making changes").option("--lock-only", "Re-generate only the lock files").option("--schema-only", "Re-generate only script schemas (skips flows and apps)").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("--strict-folder-boundaries", "Only update items inside the specified folder (requires folder argument)").option("--parallel <n:number>", "Number of items to process in parallel").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(generateMetadata).command("rehash", new Command().description("Refresh wmill-lock.yaml content hashes from the on-disk .lock and .script.yaml without re-resolving dependencies or hitting the backend. Use when those files are already correct and only the hashes need updating: bootstrapping missing entries or recovering from hash drift.").arguments("[folder:string]").option("--skip-scripts", "Skip processing scripts").option("--skip-flows", "Skip processing flows").option("--skip-apps", "Skip processing apps").option("--parallel <n:number>", "Number of items to process in parallel").option("-i --includes <patterns:file[]>", "Comma separated patterns to specify which files to include").option("-e --excludes <patterns:file[]>", "Comma separated patterns to specify which files to exclude").action(rehashCommand));
|
|
64063
64080
|
generate_metadata_default = command4;
|
|
64064
64081
|
});
|
|
64065
64082
|
|
|
@@ -78567,6 +78584,20 @@ Local previews exist for every entity type and don't deploy:
|
|
|
78567
78584
|
|
|
78568
78585
|
Argument shapes and per-language details live in the \`write-script-<lang>\`, \`write-flow\`, and \`raw-app\` skills.
|
|
78569
78586
|
|
|
78587
|
+
## Keeping metadata in sync
|
|
78588
|
+
|
|
78589
|
+
After editing a script, flow inline script, or app runnable, its generated metadata can go stale. \`wmill-lock.yaml\` stores a content hash per item, so a change that **adds or removes an import** or **changes a script's arguments** invalidates that hash and leaves the \`.lock\` (resolved dependencies) and \`.script.yaml\` (the input schema that drives the auto-generated args UI) out of date. \`wmill generate-metadata\` regenerates them and refreshes the hashes. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
78590
|
+
|
|
78591
|
+
This only writes local files — it is **not** a deploy — but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default **offer it and run it once the user agrees**, rather than running it silently after every edit. YOU run the command (never tell the user to run it); the choice is only whether to confirm first.
|
|
78592
|
+
|
|
78593
|
+
After running it, diff the regenerated lockfiles (e.g. \`git diff\` the \`.lock\` / \`.script.lock\` files): if any dependency versions changed, tell the user what bumped (e.g. \`requests 2.31.0 → 2.32.0\`) so they can catch an unwanted change before deploying. Do this even under \`Metadata: auto\` — it is information, not a confirmation gate. Pin a version in code to keep it fixed.
|
|
78594
|
+
|
|
78595
|
+
With no path argument it regenerates only the items whose metadata is actually stale (content hash drifted), workspace-wide — not everything. The set can be larger than the file you edited for two reasons: imports propagate (editing a script that others import marks every importer stale too, so their locks regenerate against the new code — by design, since a lock must reflect the imported code), and any pre-existing drift is swept in. If it touches items you didn't expect, run \`wmill generate-metadata --dry-run\` first — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) and changes nothing, so you can see why each is in scope. To narrow it, pass a folder or file path (\`wmill generate-metadata f/foo\`); add \`--strict-folder-boundaries\` to touch only items literally inside that folder (it warns about stale importers outside the folder that it skipped — they resurface as stale on the next unscoped run).
|
|
78596
|
+
|
|
78597
|
+
**Save the preference so you don't ask every session.** If the user wants metadata regenerated automatically after edits (or always confirmed first), record it in the **project-specific instructions** section of \`AGENTS.md\` (user-owned — never overwritten by \`wmill refresh prompts\`), e.g. a line like \`Metadata: auto (run wmill generate-metadata after edits)\` or \`Metadata: ask first\`. Read that line first on later sessions and follow it.
|
|
78598
|
+
|
|
78599
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
78600
|
+
|
|
78570
78601
|
## Deploying
|
|
78571
78602
|
|
|
78572
78603
|
There are two ways local changes reach the workspace. Pick based on how the repo is wired, not habit.
|
|
@@ -78693,7 +78724,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
78693
78724
|
|
|
78694
78725
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
78695
78726
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
78696
|
-
- \`wmill generate-metadata\` —
|
|
78727
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
78697
78728
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
78698
78729
|
|
|
78699
78730
|
### Preview vs run — choose by intent, not habit
|
|
@@ -78708,13 +78739,23 @@ Only use \`sync push\` when:
|
|
|
78708
78739
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
78709
78740
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
78710
78741
|
|
|
78742
|
+
### Keep metadata in sync after editing
|
|
78743
|
+
|
|
78744
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
78745
|
+
|
|
78746
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
78747
|
+
|
|
78748
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
78749
|
+
|
|
78750
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
78751
|
+
|
|
78711
78752
|
### After writing — offer to test, don't wait passively
|
|
78712
78753
|
|
|
78713
78754
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
78714
78755
|
|
|
78715
78756
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
78716
78757
|
|
|
78717
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
78758
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
78718
78759
|
|
|
78719
78760
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
78720
78761
|
|
|
@@ -78783,7 +78824,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
78783
78824
|
|
|
78784
78825
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
78785
78826
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
78786
|
-
- \`wmill generate-metadata\` —
|
|
78827
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
78787
78828
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
78788
78829
|
|
|
78789
78830
|
### Preview vs run — choose by intent, not habit
|
|
@@ -78798,13 +78839,23 @@ Only use \`sync push\` when:
|
|
|
78798
78839
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
78799
78840
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
78800
78841
|
|
|
78842
|
+
### Keep metadata in sync after editing
|
|
78843
|
+
|
|
78844
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
78845
|
+
|
|
78846
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
78847
|
+
|
|
78848
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
78849
|
+
|
|
78850
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
78851
|
+
|
|
78801
78852
|
### After writing — offer to test, don't wait passively
|
|
78802
78853
|
|
|
78803
78854
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
78804
78855
|
|
|
78805
78856
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
78806
78857
|
|
|
78807
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
78858
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
78808
78859
|
|
|
78809
78860
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
78810
78861
|
|
|
@@ -78866,7 +78917,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
78866
78917
|
|
|
78867
78918
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
78868
78919
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
78869
|
-
- \`wmill generate-metadata\` —
|
|
78920
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
78870
78921
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
78871
78922
|
|
|
78872
78923
|
### Preview vs run — choose by intent, not habit
|
|
@@ -78881,13 +78932,23 @@ Only use \`sync push\` when:
|
|
|
78881
78932
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
78882
78933
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
78883
78934
|
|
|
78935
|
+
### Keep metadata in sync after editing
|
|
78936
|
+
|
|
78937
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
78938
|
+
|
|
78939
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
78940
|
+
|
|
78941
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
78942
|
+
|
|
78943
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
78944
|
+
|
|
78884
78945
|
### After writing — offer to test, don't wait passively
|
|
78885
78946
|
|
|
78886
78947
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
78887
78948
|
|
|
78888
78949
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
78889
78950
|
|
|
78890
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
78951
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
78891
78952
|
|
|
78892
78953
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
78893
78954
|
|
|
@@ -79558,7 +79619,7 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
79558
79619
|
|
|
79559
79620
|
/**
|
|
79560
79621
|
* Create a SQL template function for DuckDB/ducklake queries
|
|
79561
|
-
* @param name - DuckDB database name (default: "main")
|
|
79622
|
+
* @param name - DuckDB database name, optionally with a schema as \`name:schema\` (default: "main")
|
|
79562
79623
|
* @returns SQL template function for building parameterized queries
|
|
79563
79624
|
* @example
|
|
79564
79625
|
* let sql = wmill.ducklake()
|
|
@@ -79568,6 +79629,9 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
79568
79629
|
* SELECT * FROM friends
|
|
79569
79630
|
* WHERE name = \${name} AND age = \${age}
|
|
79570
79631
|
* \`.fetch()
|
|
79632
|
+
* @example
|
|
79633
|
+
* // Target a specific schema within the ducklake
|
|
79634
|
+
* let sql = wmill.ducklake("my_lake:analytics")
|
|
79571
79635
|
*/
|
|
79572
79636
|
ducklake(name: string = "main"): SqlTemplateFunction
|
|
79573
79637
|
`,
|
|
@@ -79584,7 +79648,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
79584
79648
|
|
|
79585
79649
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
79586
79650
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
79587
|
-
- \`wmill generate-metadata\` —
|
|
79651
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
79588
79652
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
79589
79653
|
|
|
79590
79654
|
### Preview vs run — choose by intent, not habit
|
|
@@ -79599,13 +79663,23 @@ Only use \`sync push\` when:
|
|
|
79599
79663
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
79600
79664
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
79601
79665
|
|
|
79666
|
+
### Keep metadata in sync after editing
|
|
79667
|
+
|
|
79668
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
79669
|
+
|
|
79670
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
79671
|
+
|
|
79672
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
79673
|
+
|
|
79674
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
79675
|
+
|
|
79602
79676
|
### After writing — offer to test, don't wait passively
|
|
79603
79677
|
|
|
79604
79678
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
79605
79679
|
|
|
79606
79680
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
79607
79681
|
|
|
79608
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
79682
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
79609
79683
|
|
|
79610
79684
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
79611
79685
|
|
|
@@ -80276,7 +80350,7 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
80276
80350
|
|
|
80277
80351
|
/**
|
|
80278
80352
|
* Create a SQL template function for DuckDB/ducklake queries
|
|
80279
|
-
* @param name - DuckDB database name (default: "main")
|
|
80353
|
+
* @param name - DuckDB database name, optionally with a schema as \`name:schema\` (default: "main")
|
|
80280
80354
|
* @returns SQL template function for building parameterized queries
|
|
80281
80355
|
* @example
|
|
80282
80356
|
* let sql = wmill.ducklake()
|
|
@@ -80286,6 +80360,9 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
80286
80360
|
* SELECT * FROM friends
|
|
80287
80361
|
* WHERE name = \${name} AND age = \${age}
|
|
80288
80362
|
* \`.fetch()
|
|
80363
|
+
* @example
|
|
80364
|
+
* // Target a specific schema within the ducklake
|
|
80365
|
+
* let sql = wmill.ducklake("my_lake:analytics")
|
|
80289
80366
|
*/
|
|
80290
80367
|
ducklake(name: string = "main"): SqlTemplateFunction
|
|
80291
80368
|
`,
|
|
@@ -80302,7 +80379,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
80302
80379
|
|
|
80303
80380
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
80304
80381
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
80305
|
-
- \`wmill generate-metadata\` —
|
|
80382
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
80306
80383
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
80307
80384
|
|
|
80308
80385
|
### Preview vs run — choose by intent, not habit
|
|
@@ -80317,13 +80394,23 @@ Only use \`sync push\` when:
|
|
|
80317
80394
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
80318
80395
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
80319
80396
|
|
|
80397
|
+
### Keep metadata in sync after editing
|
|
80398
|
+
|
|
80399
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
80400
|
+
|
|
80401
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
80402
|
+
|
|
80403
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
80404
|
+
|
|
80405
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
80406
|
+
|
|
80320
80407
|
### After writing — offer to test, don't wait passively
|
|
80321
80408
|
|
|
80322
80409
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
80323
80410
|
|
|
80324
80411
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
80325
80412
|
|
|
80326
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
80413
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
80327
80414
|
|
|
80328
80415
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
80329
80416
|
|
|
@@ -80384,7 +80471,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
80384
80471
|
|
|
80385
80472
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
80386
80473
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
80387
|
-
- \`wmill generate-metadata\` —
|
|
80474
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
80388
80475
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
80389
80476
|
|
|
80390
80477
|
### Preview vs run — choose by intent, not habit
|
|
@@ -80399,13 +80486,23 @@ Only use \`sync push\` when:
|
|
|
80399
80486
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
80400
80487
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
80401
80488
|
|
|
80489
|
+
### Keep metadata in sync after editing
|
|
80490
|
+
|
|
80491
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
80492
|
+
|
|
80493
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
80494
|
+
|
|
80495
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
80496
|
+
|
|
80497
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
80498
|
+
|
|
80402
80499
|
### After writing — offer to test, don't wait passively
|
|
80403
80500
|
|
|
80404
80501
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
80405
80502
|
|
|
80406
80503
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
80407
80504
|
|
|
80408
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
80505
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
80409
80506
|
|
|
80410
80507
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
80411
80508
|
|
|
@@ -81076,7 +81173,7 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
81076
81173
|
|
|
81077
81174
|
/**
|
|
81078
81175
|
* Create a SQL template function for DuckDB/ducklake queries
|
|
81079
|
-
* @param name - DuckDB database name (default: "main")
|
|
81176
|
+
* @param name - DuckDB database name, optionally with a schema as \`name:schema\` (default: "main")
|
|
81080
81177
|
* @returns SQL template function for building parameterized queries
|
|
81081
81178
|
* @example
|
|
81082
81179
|
* let sql = wmill.ducklake()
|
|
@@ -81086,6 +81183,9 @@ datatable(name: string = "main"): DatatableSqlTemplateFunction
|
|
|
81086
81183
|
* SELECT * FROM friends
|
|
81087
81184
|
* WHERE name = \${name} AND age = \${age}
|
|
81088
81185
|
* \`.fetch()
|
|
81186
|
+
* @example
|
|
81187
|
+
* // Target a specific schema within the ducklake
|
|
81188
|
+
* let sql = wmill.ducklake("my_lake:analytics")
|
|
81089
81189
|
*/
|
|
81090
81190
|
ducklake(name: string = "main"): SqlTemplateFunction
|
|
81091
81191
|
`,
|
|
@@ -81102,7 +81202,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81102
81202
|
|
|
81103
81203
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81104
81204
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81105
|
-
- \`wmill generate-metadata\` —
|
|
81205
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81106
81206
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81107
81207
|
|
|
81108
81208
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81117,13 +81217,23 @@ Only use \`sync push\` when:
|
|
|
81117
81217
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81118
81218
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81119
81219
|
|
|
81220
|
+
### Keep metadata in sync after editing
|
|
81221
|
+
|
|
81222
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81223
|
+
|
|
81224
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81225
|
+
|
|
81226
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81227
|
+
|
|
81228
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81229
|
+
|
|
81120
81230
|
### After writing — offer to test, don't wait passively
|
|
81121
81231
|
|
|
81122
81232
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81123
81233
|
|
|
81124
81234
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81125
81235
|
|
|
81126
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81236
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81127
81237
|
|
|
81128
81238
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81129
81239
|
|
|
@@ -81218,7 +81328,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81218
81328
|
|
|
81219
81329
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81220
81330
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81221
|
-
- \`wmill generate-metadata\` —
|
|
81331
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81222
81332
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81223
81333
|
|
|
81224
81334
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81233,13 +81343,23 @@ Only use \`sync push\` when:
|
|
|
81233
81343
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81234
81344
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81235
81345
|
|
|
81346
|
+
### Keep metadata in sync after editing
|
|
81347
|
+
|
|
81348
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81349
|
+
|
|
81350
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81351
|
+
|
|
81352
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81353
|
+
|
|
81354
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81355
|
+
|
|
81236
81356
|
### After writing — offer to test, don't wait passively
|
|
81237
81357
|
|
|
81238
81358
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81239
81359
|
|
|
81240
81360
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81241
81361
|
|
|
81242
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81362
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81243
81363
|
|
|
81244
81364
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81245
81365
|
|
|
@@ -81317,7 +81437,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81317
81437
|
|
|
81318
81438
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81319
81439
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81320
|
-
- \`wmill generate-metadata\` —
|
|
81440
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81321
81441
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81322
81442
|
|
|
81323
81443
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81332,13 +81452,23 @@ Only use \`sync push\` when:
|
|
|
81332
81452
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81333
81453
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81334
81454
|
|
|
81455
|
+
### Keep metadata in sync after editing
|
|
81456
|
+
|
|
81457
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81458
|
+
|
|
81459
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81460
|
+
|
|
81461
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81462
|
+
|
|
81463
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81464
|
+
|
|
81335
81465
|
### After writing — offer to test, don't wait passively
|
|
81336
81466
|
|
|
81337
81467
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81338
81468
|
|
|
81339
81469
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81340
81470
|
|
|
81341
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81471
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81342
81472
|
|
|
81343
81473
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81344
81474
|
|
|
@@ -81403,7 +81533,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81403
81533
|
|
|
81404
81534
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81405
81535
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81406
|
-
- \`wmill generate-metadata\` —
|
|
81536
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81407
81537
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81408
81538
|
|
|
81409
81539
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81418,13 +81548,23 @@ Only use \`sync push\` when:
|
|
|
81418
81548
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81419
81549
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81420
81550
|
|
|
81551
|
+
### Keep metadata in sync after editing
|
|
81552
|
+
|
|
81553
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81554
|
+
|
|
81555
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81556
|
+
|
|
81557
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81558
|
+
|
|
81559
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81560
|
+
|
|
81421
81561
|
### After writing — offer to test, don't wait passively
|
|
81422
81562
|
|
|
81423
81563
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81424
81564
|
|
|
81425
81565
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81426
81566
|
|
|
81427
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81567
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81428
81568
|
|
|
81429
81569
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81430
81570
|
|
|
@@ -81482,7 +81622,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81482
81622
|
|
|
81483
81623
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81484
81624
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81485
|
-
- \`wmill generate-metadata\` —
|
|
81625
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81486
81626
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81487
81627
|
|
|
81488
81628
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81497,13 +81637,23 @@ Only use \`sync push\` when:
|
|
|
81497
81637
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81498
81638
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81499
81639
|
|
|
81640
|
+
### Keep metadata in sync after editing
|
|
81641
|
+
|
|
81642
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81643
|
+
|
|
81644
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81645
|
+
|
|
81646
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81647
|
+
|
|
81648
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81649
|
+
|
|
81500
81650
|
### After writing — offer to test, don't wait passively
|
|
81501
81651
|
|
|
81502
81652
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81503
81653
|
|
|
81504
81654
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81505
81655
|
|
|
81506
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81656
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81507
81657
|
|
|
81508
81658
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81509
81659
|
|
|
@@ -81564,7 +81714,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81564
81714
|
|
|
81565
81715
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81566
81716
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81567
|
-
- \`wmill generate-metadata\` —
|
|
81717
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81568
81718
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81569
81719
|
|
|
81570
81720
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81579,13 +81729,23 @@ Only use \`sync push\` when:
|
|
|
81579
81729
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81580
81730
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81581
81731
|
|
|
81732
|
+
### Keep metadata in sync after editing
|
|
81733
|
+
|
|
81734
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81735
|
+
|
|
81736
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81737
|
+
|
|
81738
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81739
|
+
|
|
81740
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81741
|
+
|
|
81582
81742
|
### After writing — offer to test, don't wait passively
|
|
81583
81743
|
|
|
81584
81744
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81585
81745
|
|
|
81586
81746
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81587
81747
|
|
|
81588
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81748
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81589
81749
|
|
|
81590
81750
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81591
81751
|
|
|
@@ -81647,7 +81807,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81647
81807
|
|
|
81648
81808
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81649
81809
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81650
|
-
- \`wmill generate-metadata\` —
|
|
81810
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81651
81811
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81652
81812
|
|
|
81653
81813
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81662,13 +81822,23 @@ Only use \`sync push\` when:
|
|
|
81662
81822
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81663
81823
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81664
81824
|
|
|
81825
|
+
### Keep metadata in sync after editing
|
|
81826
|
+
|
|
81827
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81828
|
+
|
|
81829
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81830
|
+
|
|
81831
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81832
|
+
|
|
81833
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81834
|
+
|
|
81665
81835
|
### After writing — offer to test, don't wait passively
|
|
81666
81836
|
|
|
81667
81837
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81668
81838
|
|
|
81669
81839
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81670
81840
|
|
|
81671
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81841
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81672
81842
|
|
|
81673
81843
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81674
81844
|
|
|
@@ -81745,7 +81915,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81745
81915
|
|
|
81746
81916
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81747
81917
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81748
|
-
- \`wmill generate-metadata\` —
|
|
81918
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81749
81919
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81750
81920
|
|
|
81751
81921
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81760,13 +81930,23 @@ Only use \`sync push\` when:
|
|
|
81760
81930
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81761
81931
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81762
81932
|
|
|
81933
|
+
### Keep metadata in sync after editing
|
|
81934
|
+
|
|
81935
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
81936
|
+
|
|
81937
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
81938
|
+
|
|
81939
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
81940
|
+
|
|
81941
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
81942
|
+
|
|
81763
81943
|
### After writing — offer to test, don't wait passively
|
|
81764
81944
|
|
|
81765
81945
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81766
81946
|
|
|
81767
81947
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81768
81948
|
|
|
81769
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
81949
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81770
81950
|
|
|
81771
81951
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81772
81952
|
|
|
@@ -81826,7 +82006,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81826
82006
|
|
|
81827
82007
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81828
82008
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81829
|
-
- \`wmill generate-metadata\` —
|
|
82009
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81830
82010
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81831
82011
|
|
|
81832
82012
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81841,13 +82021,23 @@ Only use \`sync push\` when:
|
|
|
81841
82021
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81842
82022
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81843
82023
|
|
|
82024
|
+
### Keep metadata in sync after editing
|
|
82025
|
+
|
|
82026
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
82027
|
+
|
|
82028
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
82029
|
+
|
|
82030
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
82031
|
+
|
|
82032
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
82033
|
+
|
|
81844
82034
|
### After writing — offer to test, don't wait passively
|
|
81845
82035
|
|
|
81846
82036
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81847
82037
|
|
|
81848
82038
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81849
82039
|
|
|
81850
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
82040
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81851
82041
|
|
|
81852
82042
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81853
82043
|
|
|
@@ -81922,7 +82112,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
81922
82112
|
|
|
81923
82113
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
81924
82114
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
81925
|
-
- \`wmill generate-metadata\` —
|
|
82115
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
81926
82116
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
81927
82117
|
|
|
81928
82118
|
### Preview vs run — choose by intent, not habit
|
|
@@ -81937,13 +82127,23 @@ Only use \`sync push\` when:
|
|
|
81937
82127
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
81938
82128
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
81939
82129
|
|
|
82130
|
+
### Keep metadata in sync after editing
|
|
82131
|
+
|
|
82132
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
82133
|
+
|
|
82134
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
82135
|
+
|
|
82136
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
82137
|
+
|
|
82138
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
82139
|
+
|
|
81940
82140
|
### After writing — offer to test, don't wait passively
|
|
81941
82141
|
|
|
81942
82142
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
81943
82143
|
|
|
81944
82144
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
81945
82145
|
|
|
81946
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
82146
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
81947
82147
|
|
|
81948
82148
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
81949
82149
|
|
|
@@ -82788,7 +82988,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
82788
82988
|
|
|
82789
82989
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
82790
82990
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
82791
|
-
- \`wmill generate-metadata\` —
|
|
82991
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
82792
82992
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
82793
82993
|
|
|
82794
82994
|
### Preview vs run — choose by intent, not habit
|
|
@@ -82803,13 +83003,23 @@ Only use \`sync push\` when:
|
|
|
82803
83003
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
82804
83004
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
82805
83005
|
|
|
83006
|
+
### Keep metadata in sync after editing
|
|
83007
|
+
|
|
83008
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
83009
|
+
|
|
83010
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
83011
|
+
|
|
83012
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
83013
|
+
|
|
83014
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
83015
|
+
|
|
82806
83016
|
### After writing — offer to test, don't wait passively
|
|
82807
83017
|
|
|
82808
83018
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
82809
83019
|
|
|
82810
83020
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
82811
83021
|
|
|
82812
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
83022
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
82813
83023
|
|
|
82814
83024
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
82815
83025
|
|
|
@@ -82914,7 +83124,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
82914
83124
|
|
|
82915
83125
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
82916
83126
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
82917
|
-
- \`wmill generate-metadata\` —
|
|
83127
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
82918
83128
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
82919
83129
|
|
|
82920
83130
|
### Preview vs run — choose by intent, not habit
|
|
@@ -82929,13 +83139,23 @@ Only use \`sync push\` when:
|
|
|
82929
83139
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
82930
83140
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
82931
83141
|
|
|
83142
|
+
### Keep metadata in sync after editing
|
|
83143
|
+
|
|
83144
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
83145
|
+
|
|
83146
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
83147
|
+
|
|
83148
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
83149
|
+
|
|
83150
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
83151
|
+
|
|
82932
83152
|
### After writing — offer to test, don't wait passively
|
|
82933
83153
|
|
|
82934
83154
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
82935
83155
|
|
|
82936
83156
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
82937
83157
|
|
|
82938
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
83158
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
82939
83159
|
|
|
82940
83160
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
82941
83161
|
|
|
@@ -83030,7 +83250,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
83030
83250
|
|
|
83031
83251
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
83032
83252
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
83033
|
-
- \`wmill generate-metadata\` —
|
|
83253
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
83034
83254
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
83035
83255
|
|
|
83036
83256
|
### Preview vs run — choose by intent, not habit
|
|
@@ -83045,13 +83265,23 @@ Only use \`sync push\` when:
|
|
|
83045
83265
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
83046
83266
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
83047
83267
|
|
|
83268
|
+
### Keep metadata in sync after editing
|
|
83269
|
+
|
|
83270
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
83271
|
+
|
|
83272
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
83273
|
+
|
|
83274
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
83275
|
+
|
|
83276
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
83277
|
+
|
|
83048
83278
|
### After writing — offer to test, don't wait passively
|
|
83049
83279
|
|
|
83050
83280
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
83051
83281
|
|
|
83052
83282
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
83053
83283
|
|
|
83054
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
83284
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
83055
83285
|
|
|
83056
83286
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
83057
83287
|
|
|
@@ -83146,11 +83376,11 @@ Once the flow has real content, **offer** to open the visual preview as a one-se
|
|
|
83146
83376
|
|
|
83147
83377
|
## CLI Commands — running, previewing, deploying
|
|
83148
83378
|
|
|
83149
|
-
After writing, act on the user's intent instead of just listing commands. Run
|
|
83379
|
+
After writing, act on the user's intent instead of just listing commands. Run \`wmill flow preview\` yourself when it fits (see "After writing — offer to run, don't wait passively" below). \`wmill generate-metadata\` regenerates local lock/hash files (not a deploy) but re-resolves deps — offer it and run on agreement, unless the project's \`AGENTS.md\` opts into running metadata automatically. Only *name* \`wmill sync push\` (the deploy) so the user can approve it. The options:
|
|
83150
83380
|
|
|
83151
83381
|
- \`wmill flow preview <flow_path>\` — **default when iterating on a local flow.** Runs the local \`flow.yaml\` against local inline scripts without deploying. Add \`--remote\` to use deployed workspace scripts for PathScript steps instead of local files. Add \`--step <step_id>\` to run only one module in isolation (see "Single-step vs whole-flow preview" below).
|
|
83152
83382
|
- \`wmill flow run <path>\` — runs the flow **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
83153
|
-
- \`wmill generate-metadata\` — regenerate stale \`.lock\` and \`.
|
|
83383
|
+
- \`wmill generate-metadata\` — regenerate stale local \`.lock\` files for the flow and its inline scripts and refresh their content hashes in \`wmill-lock.yaml\`. Writes local files only (not a deploy). Run it after editing inline scripts whose imports or arguments changed, so \`wmill-lock.yaml\` doesn't drift and add noise to git-sync/CI. By default it scans **scripts, flows, and apps** across the workspace but only regenerates stale ones; pass the flow's folder as an argument (or run from that subdirectory) to limit the scope to the flow you edited. Note a flow (or script) that imports a changed shared script is pulled in too — run \`wmill generate-metadata --dry-run\` to see exactly what is stale and why (\`content changed\` vs \`depends on <path>\`) before applying.
|
|
83154
83384
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
83155
83385
|
|
|
83156
83386
|
### Preview vs run — choose by intent, not habit
|
|
@@ -83179,7 +83409,7 @@ If the user hasn't already told you to run/test the flow, offer it as a one-sent
|
|
|
83179
83409
|
|
|
83180
83410
|
If the user already asked to test/run/try the flow in their original request, skip the offer and just execute \`wmill flow preview <path> -d '<args>'\` directly — pick plausible args from the flow's input schema.
|
|
83181
83411
|
|
|
83182
|
-
\`wmill flow preview\` is safe to run yourself (it does not deploy). \`wmill
|
|
83412
|
+
\`wmill flow preview\` is safe to run yourself (it does not deploy). \`wmill generate-metadata\` does not deploy either (it only writes local lock/hash files) but re-resolves deps — offer it and run on agreement, unless the project's \`AGENTS.md\` opts into automatic metadata. After running it, check the regenerated \`.lock\` diff and tell the user which inline-script dependency versions changed, so they can catch an unwanted bump before deploying. Only \`wmill sync push\` deploys; run it only when the user explicitly asks.
|
|
83183
83413
|
|
|
83184
83414
|
### Visual preview
|
|
83185
83415
|
|
|
@@ -83612,10 +83842,11 @@ The runnable ID is the filename without extension. For example, \`get_user.ts\`
|
|
|
83612
83842
|
| C# | \`.cs\` | \`myFunc.cs\` |
|
|
83613
83843
|
| Java | \`.java\` | \`myFunc.java\` |
|
|
83614
83844
|
|
|
83615
|
-
After creating a runnable
|
|
83845
|
+
After creating or editing a backend runnable — especially when its imports or arguments changed — its local lock and \`wmill-lock.yaml\` go stale. Offer to run \`wmill generate-metadata\` and run it once the user agrees (or automatically if the project's \`AGENTS.md\` opts into that) — YOU run it, don't just name it and wait. It writes local files only (not a deploy), and keeping the lock current avoids noise in git-sync/CI:
|
|
83616
83846
|
\`\`\`bash
|
|
83617
83847
|
wmill generate-metadata
|
|
83618
83848
|
\`\`\`
|
|
83849
|
+
After it runs, check the regenerated \`.lock\` diff and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying.
|
|
83619
83850
|
|
|
83620
83851
|
### Optional YAML configuration
|
|
83621
83852
|
|
|
@@ -83705,7 +83936,7 @@ data:
|
|
|
83705
83936
|
|
|
83706
83937
|
Two commands you run yourself, not the user:
|
|
83707
83938
|
- \`wmill app new\` — run it with flags, per the "Creating a Raw App" section above.
|
|
83708
|
-
- \`wmill generate-metadata\` — generates local lock files; offer it and run it on
|
|
83939
|
+
- \`wmill generate-metadata\` — (re)generates local lock files and refreshes \`wmill-lock.yaml\` content hashes; writes local files only (not a deploy). After adding or editing a runnable, offer it and run it on agreement — or automatically if the project's \`AGENTS.md\` opts into that (see "After creating a runnable" above).
|
|
83709
83940
|
|
|
83710
83941
|
For the rest, tell the user which command fits their intent and let them run it — these deploy to the workspace, overwrite local files, or launch a long-running server, so the user should consent each time:
|
|
83711
83942
|
|
|
@@ -84245,7 +84476,7 @@ After writing, tell the user which command fits what they want to do:
|
|
|
84245
84476
|
|
|
84246
84477
|
- \`wmill script preview <script_path>\` — **default when iterating on a local script.** Runs the local file without deploying.
|
|
84247
84478
|
- \`wmill script run <path>\` — runs the script **already deployed** in the workspace. Use only when the user explicitly wants to test the deployed version, not local edits.
|
|
84248
|
-
- \`wmill generate-metadata\` —
|
|
84479
|
+
- \`wmill generate-metadata\` — regenerate the local \`.script.yaml\` (input schema) and \`.lock\` (resolved dependencies) for scripts you changed, and refresh their content hashes in \`wmill-lock.yaml\`. Local files only — **not** a deploy. See "Keep metadata in sync" below.
|
|
84249
84480
|
- \`wmill sync push\` — deploy local changes to the workspace. Only suggest/run this when the user explicitly asks to deploy/publish/push — not when they say "run", "try", or "test".
|
|
84250
84481
|
|
|
84251
84482
|
### Preview vs run — choose by intent, not habit
|
|
@@ -84260,13 +84491,23 @@ Only use \`sync push\` when:
|
|
|
84260
84491
|
- The user explicitly asks to deploy, publish, push, or ship.
|
|
84261
84492
|
- The preview has already validated the change and the user wants it in the workspace.
|
|
84262
84493
|
|
|
84494
|
+
### Keep metadata in sync after editing
|
|
84495
|
+
|
|
84496
|
+
\`wmill-lock.yaml\` tracks a content hash for each item. Editing a script's content — most importantly **adding or removing an import** or **changing \`main\`'s arguments** — invalidates that hash and leaves the \`.lock\`, the \`.script.yaml\` input schema, and the hash row out of date. Run \`wmill generate-metadata\` (scoped to what you touched) after such edits so the resolved lock, the auto-generated args UI (driven by \`.script.yaml\`), and \`wmill-lock.yaml\` all match the code. Leaving them stale produces spurious diffs in git-sync and CI.
|
|
84497
|
+
|
|
84498
|
+
This only writes local files (it is **not** a deploy), but it re-resolves dependencies, so it can bump unpinned versions (the same as deploying from the UI; expected, not a bug). So by default offer it and run it once the user agrees, rather than running it silently after every edit — unless the project's \`AGENTS.md\` opts into running metadata automatically (see the "Keeping metadata in sync" preference there). Either way YOU run the command, not the user. After running it, diff the regenerated \`.lock\` / \`.script.lock\` files and tell the user which dependency versions changed (e.g. \`requests 2.31.0 → 2.32.0\`), so they can catch an unwanted bump before deploying — even under \`Metadata: auto\`, since it's information, not a confirmation gate. Pin versions in code to keep them fixed.
|
|
84499
|
+
|
|
84500
|
+
With no path argument, \`generate-metadata\` regenerates only the items whose content hash drifted — not everything. Imports propagate: editing a script that others import marks every importer stale too, so a one-line change to a shared module can regenerate many locks (by design — their locks must reflect the imported code). If it touches more than you expect, run \`wmill generate-metadata --dry-run\` — it lists each stale item with a reason (\`content changed\` or \`depends on <path>\`) without changing anything — then narrow with a path argument (\`wmill generate-metadata f/foo\`) or \`--strict-folder-boundaries\`.
|
|
84501
|
+
|
|
84502
|
+
If the on-disk \`.lock\` and \`.script.yaml\` are already correct and only \`wmill-lock.yaml\` needs its hashes refreshed (hash drift, or bootstrapping missing entries), use \`wmill generate-metadata rehash\` — it re-records hashes from disk with no backend round-trip and no dependency changes.
|
|
84503
|
+
|
|
84263
84504
|
### After writing — offer to test, don't wait passively
|
|
84264
84505
|
|
|
84265
84506
|
If the user hasn't already told you to run/test/preview the script, offer it as a one-sentence next step (e.g. "Want me to run \`wmill script preview\` with sample args?"). Do not present a multi-option menu.
|
|
84266
84507
|
|
|
84267
84508
|
If the user already asked to test/run/try the script in their original request, skip the offer and just execute \`wmill script preview <path> -d '<args>'\` directly — pick plausible args from the script's declared parameters. The shape varies by language: \`main(...)\` for code languages, the SQL dialect's own placeholder syntax (\`$1\` for PostgreSQL, \`?\` for MySQL/Snowflake, \`@P1\` for MSSQL, \`@name\` for BigQuery, etc.), positional \`$1\`, \`$2\`, … for Bash, \`param(...)\` for PowerShell.
|
|
84268
84509
|
|
|
84269
|
-
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill
|
|
84510
|
+
\`wmill script preview\` does not deploy, but it still executes script code and may cause side effects; run it yourself when the user asked to test/preview (or after confirming that execution is intended). \`wmill generate-metadata\` does not deploy either — it only writes local files (locks, schemas, hashes) — but offer it before running (or run automatically if the project's \`AGENTS.md\` opts in), per "Keep metadata in sync" above. Only \`wmill sync push\` deploys to the workspace — run it only when the user explicitly asks to deploy/publish/push.
|
|
84270
84511
|
|
|
84271
84512
|
For a **visual** open-the-script-in-the-dev-page preview (rather than \`script preview\`'s run-and-print-result), use the \`preview\` skill.
|
|
84272
84513
|
|
|
@@ -84868,7 +85109,7 @@ folder related commands
|
|
|
84868
85109
|
|
|
84869
85110
|
### generate-metadata
|
|
84870
85111
|
|
|
84871
|
-
|
|
85112
|
+
Regenerate stale local locks and script schemas and refresh wmill-lock.yaml content hashes (scripts, flows, apps). Writes local files only, not a deploy. Run it after edits that add or remove imports or change a script's arguments, so the lock, the auto-generated UI schema, and wmill-lock.yaml stay in sync.
|
|
84872
85113
|
|
|
84873
85114
|
**Arguments:** \`[folder:string]\`
|
|
84874
85115
|
|
|
@@ -84887,7 +85128,7 @@ Generate metadata (locks, schemas) for all scripts, flows, and apps
|
|
|
84887
85128
|
|
|
84888
85129
|
**Subcommands:**
|
|
84889
85130
|
|
|
84890
|
-
- \`generate-metadata rehash [folder:string]\`
|
|
85131
|
+
- \`generate-metadata rehash [folder:string]\` - Refresh wmill-lock.yaml content hashes from the on-disk .lock and .script.yaml without re-resolving dependencies or hitting the backend. Use when those files are already correct and only the hashes need updating: bootstrapping missing entries or recovering from hash drift.
|
|
84891
85132
|
- \`--skip-scripts\` - Skip processing scripts
|
|
84892
85133
|
- \`--skip-flows\` - Skip processing flows
|
|
84893
85134
|
- \`--skip-apps\` - Skip processing apps
|
|
@@ -84995,7 +85236,7 @@ sync local with a remote instance or the opposite (push or pull)
|
|
|
84995
85236
|
- \`-o, --output-file <file:string>\` - Write YAML to a file instead of stdout
|
|
84996
85237
|
- \`--show-secrets\` - Include sensitive fields (license key, JWT secret) without prompting
|
|
84997
85238
|
- \`--instance <instance:string>\` - Name of the instance, override the active instance
|
|
84998
|
-
- \`instance connect-slack\`
|
|
85239
|
+
- \`instance connect-slack\` - Non-interactively connect Slack at the instance level using a pre-minted bot token (xoxb-...). Produces the same artifacts as the UI OAuth flow: global_settings 'slack' row + encrypted f/slack_bot/global_bot_token variable and resource in the admins workspace.
|
|
84999
85240
|
- \`--bot-token <bot_token:string>\` - Slack bot token (xoxb-...)
|
|
85000
85241
|
- \`--team-id <team_id:string>\` - Slack team id
|
|
85001
85242
|
- \`--team-name <team_name:string>\` - Slack team name
|
|
@@ -85049,6 +85290,8 @@ Validate Windmill flow, schedule, and trigger YAML files in a directory
|
|
|
85049
85290
|
|
|
85050
85291
|
### object-storage
|
|
85051
85292
|
|
|
85293
|
+
Object storage (S3) related commands. Operates on the workspace's default object storage; use --storage to target a configured secondary storage.
|
|
85294
|
+
|
|
85052
85295
|
**Alias:** \`s3\`
|
|
85053
85296
|
|
|
85054
85297
|
**Subcommands:**
|
|
@@ -85085,6 +85328,8 @@ Validate Windmill flow, schedule, and trigger YAML files in a directory
|
|
|
85085
85328
|
|
|
85086
85329
|
### protection-rules
|
|
85087
85330
|
|
|
85331
|
+
Sync workspace protection rules between protection-rules.yaml and Windmill. The file is keyed by workspace name; keys must match wmill.yaml 'workspaces'.
|
|
85332
|
+
|
|
85088
85333
|
**Subcommands:**
|
|
85089
85334
|
|
|
85090
85335
|
- \`protection-rules pull [workspace:string]\` - Pull protection rules from Windmill into protection-rules.yaml for a workspace
|
|
@@ -85425,7 +85670,7 @@ workspace related commands
|
|
|
85425
85670
|
- \`--bot-token <bot_token:string>\` - Slack bot token (xoxb-...)
|
|
85426
85671
|
- \`--team-id <team_id:string>\` - Slack team id
|
|
85427
85672
|
- \`--team-name <team_name:string>\` - Slack team name
|
|
85428
|
-
- \`workspace disconnect-slack\`
|
|
85673
|
+
- \`workspace disconnect-slack\` - Clear slack_team_id / slack_name on the active workspace (marks the workspace as disconnected). Does NOT remove the bot token variable/resource/folder/group — delete those from the local sync folder and run 'wmill sync push' to tear them down. Does NOT remove the workspace-level OAuth override — set slack_oauth_client_id/_secret to '' in settings.yaml and push.
|
|
85429
85674
|
|
|
85430
85675
|
|
|
85431
85676
|
|