Merge remote-tracking branch 'origin/main' into show-flow-step-runs-in-run-history

This commit is contained in:
Guilhem Lemouel
2026-10-26 10:30:59 -07:00
805 changed files with 50852 additions and 10194 deletions
+34 -15
View File
@@ -84,7 +84,7 @@ pub trait External: Send + Sync + 'static {
async fn prepare_webhook(&self, db, w_id, headers, body, script_path, is_flow) -> Result<PushArgsOwned>;
fn service_config_from_create_response(&self, data, resp) -> Option<serde_json::Value>;
fn additional_routes(&self) -> axum::Router;
async fn http_client_request<T, B>(&self, url, method, workspace_id, tx, db, headers, body) -> Result<T>;
async fn http_client_request<T, B>(&self, url, method, workspace_id, connection_path, db, headers, body) -> Result<T>;
}
```
@@ -115,28 +115,47 @@ Use this when the external_id is known before the create call (e.g., Google gene
Use this when the external_id is assigned by the remote service and the webhook URL needs to be corrected after creation.
### OAuth Token Storage (Three-Table Pattern)
### OAuth App and Connections
OAuth tokens are stored across three tables, NOT in `workspace_integrations.oauth_data` directly:
The OAuth **app** (client) is configured per workspace and service; **connections** (connected
accounts) are many per service. Each trigger acts through one connection, named by
`native_trigger.connection_path`:
| Table | What's Stored |
|-------|---------------|
| `workspace_integrations` | `oauth_data` JSON with `base_url`, `client_id`, `client_secret`, `instance_shared` flag; `resource_path` pointing to the variable |
| `variable` | Encrypted `access_token` (at the path stored in `resource_path`), linked to `account` via `account` column |
| `account` | `refresh_token`, keyed by `workspace_id` + `client` (service name) + `is_workspace_integration = true` |
| `workspace_integrations` | `oauth_data` JSON with `base_url`, `client_id`, `client_secret`, `instance_shared` flag. One row per (workspace, service); it must exist for every connection, since token refresh reads the client from it |
| `variable` | Encrypted `access_token` at the connection path, linked to `account` via its `account` column |
| `account` | `refresh_token`, with `client` = service name and `is_workspace_integration = true` |
| `resource` | The connection's resource at the same path, `{ "token": "$var:<path>" }` |
The `decrypt_oauth_data()` function in `lib.rs` assembles these into a unified struct:
A user may use a connection when they can read its variable (checked with a user transaction,
so the variable's row-level security decides): `resolve_usable_connection` /
`list_usable_connections` in `lib.rs`. The exception is the **workspace connection**: an admin
may share one connection per service (`workspace_integrations.resource_path`, set by
`POST .../workspace_connection`), and every member may then use it without reading its token.
Renames carry the marker along; disconnecting clears it. Background work (sync, renewal, rename re-registration,
webhook handling) uses the stored `connection_path` directly.
`decrypt_oauth_data(db, w_id, service, connection_path)` assembles these into one struct, and
every service's `OAuthData` carries `connection_path` so `http_client_request` can refresh and
write back the right connection:
```rust
pub struct OAuthConfig {
pub base_url: String,
pub access_token: String, // decrypted from variable
pub refresh_token: Option<String>, // from account table
pub access_token: String, // decrypted from the connection's variable
pub refresh_token: Option<String>, // from its account
pub client_id: String, // from oauth_data or instance settings
pub client_secret: String, // from oauth_data or instance settings
pub connection_path: String,
}
```
Instance-level sharing: when `oauth_data.instance_shared == true`, `client_id` and `client_secret` are read from global settings instead of workspace_integrations.
A refreshed token is written back by connection path and account id, never by service: providers
like Nextcloud rotate refresh tokens, so writing one onto another account breaks its next refresh.
Instance-level sharing: when the workspace has no OAuth app of its own and the instance admin
shares one (`share_with_workspaces` in the `oauths` setting; not available for Nextcloud), the
connect flow uses it and records `{"instance_shared": true}` in `workspace_integrations`.
### URL Resolution
@@ -311,7 +330,7 @@ impl External for NewService {
});
let response: CreateTriggerResponse = self
.http_client_request(&url, Method::POST, w_id, tx, db, None, Some(&payload))
.http_client_request(&url, Method::POST, w_id, &oauth_data.connection_path, db, None, Some(&payload))
.await?;
Ok(response)
@@ -343,7 +362,7 @@ impl External for NewService {
});
let _: serde_json::Value = self
.http_client_request(&url, Method::PUT, w_id, tx, db, None, Some(&payload))
.http_client_request(&url, Method::PUT, w_id, &oauth_data.connection_path, db, None, Some(&payload))
.await?;
// Fetch back the updated state to get the resolved config
@@ -361,7 +380,7 @@ impl External for NewService {
tx: &mut PgConnection,
) -> Result<Self::TriggerData> {
let url = format!("{}/api/webhooks/{}", oauth_data.base_url, external_id);
self.http_client_request::<_, ()>(&url, Method::GET, w_id, tx, db, None, None).await
self.http_client_request::<_, ()>(&url, Method::GET, w_id, &oauth_data.connection_path, db, None, None).await
}
async fn delete(
@@ -374,7 +393,7 @@ impl External for NewService {
) -> Result<()> {
let url = format!("{}/api/webhooks/{}", oauth_data.base_url, external_id);
let _: serde_json::Value = self
.http_client_request::<_, ()>(&url, Method::DELETE, w_id, tx, db, None, None)
.http_client_request::<_, ()>(&url, Method::DELETE, w_id, &oauth_data.connection_path, db, None, None)
.await
.or_else(|e| match &e {
Error::InternalErr(msg) if msg.contains("404") => Ok(serde_json::Value::Null),
@@ -749,7 +768,7 @@ pub async fn prepare_native_trigger_args(service_name, db, w_id, headers, body)
When `workspace_integrations.oauth_data.instance_shared == true`, `decrypt_oauth_data()` reads `client_id` and `client_secret` from instance-level global settings instead of workspace-level. This allows admins to share OAuth app credentials across workspaces.
The frontend handles this via the `generate_instance_connect_url` endpoint in `workspace_integrations.rs`.
`generate_connect_url` picks the client (`resolve_oauth_client`): the workspace's own app when configured, the instance's otherwise. A GitHub OAuth app only redirects below its single registered callback, so connections made with the instance GitHub app land on `/oauth/callback/github/native_trigger` instead of the workspace settings page.
---
+2 -2
View File
@@ -28,7 +28,7 @@ ENV PATH="${PATH}:/usr/local/go/bin"
ENV GO_PATH=/usr/local/go/bin/go
# UV
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.0/uv-installer.sh | sh && mv /usr/local/cargo/bin/uv /usr/local/bin/uv
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.4/uv-installer.sh | sh && mv /usr/local/cargo/bin/uv /usr/local/bin/uv
ENV TZ=Etc/UTC
@@ -42,7 +42,7 @@ RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VER
RUN /usr/local/bin/python3 -m pip install pip-tools
# Bun
COPY --from=oven/bun:1.4.0 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.4.4 /usr/local/bin/bun /usr/bin/bun
# Install windmill CLI
RUN bun install -g windmill-cli \
+9 -1
View File
@@ -46,7 +46,15 @@ runs:
env:
IMAGE: ${{ inputs.image }}
DIGEST: ${{ inputs.digest }}
run: cosign sign --yes --recursive "${IMAGE}@${DIGEST}"
# Fulcio and Rekor return transient 5xx often enough to fail a release;
# re-signing the same digest only adds a signature, so retrying is safe.
run: |
for attempt in 1 2 3 4 5; do
cosign sign --yes --recursive "${IMAGE}@${DIGEST}" && exit 0
echo "::warning::cosign sign failed (attempt $attempt/5)"
[ "$attempt" -lt 5 ] && sleep $((attempt * 30))
done
exit 1
- name: SLSA provenance (GitHub artifact attestation)
uses: actions/attest-build-provenance@v4
+1 -1
View File
@@ -61,7 +61,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: actions/setup-node@v7
with:
+2 -2
View File
@@ -46,7 +46,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- id: matrix
env:
@@ -93,7 +93,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: actions/setup-node@v7
with:
+1 -1
View File
@@ -75,7 +75,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: actions/setup-node@v7
with:
+2 -2
View File
@@ -73,7 +73,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: actions/setup-node@v7
with:
@@ -81,7 +81,7 @@ jobs:
- uses: astral-sh/setup-uv@v7
with:
version: "0.13.0"
version: "0.13.4"
- uses: shivammathur/setup-php@v2
with:
+2 -2
View File
@@ -58,13 +58,13 @@ jobs:
go-version: 1.21.5
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: actions/setup-node@v7
with:
node-version: "24"
- uses: astral-sh/setup-uv@v7
with:
version: "0.13.0"
version: "0.13.4"
- uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
+3 -1
View File
@@ -42,12 +42,14 @@ jobs:
# skips auto-review for every private member.
# Dependabot-triggered runs get a separate secret scope, so this job has no API
# key and cannot review. workflow_call stays open for an explicit request.
# `[skip-ai-review]` in the PR body opts out of the automatic run only.
if: |
github.event_name == 'workflow_call' ||
(
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
github.event.pull_request.user.login != 'dependabot[bot]' &&
!contains(github.event.pull_request.body, '[skip-ai-review]')
)
permissions:
contents: read
+29 -35
View File
@@ -197,47 +197,41 @@ jobs:
ARCH: amd64
steps:
- uses: actions/checkout@v4
- run: |
# pulling docker image with desired arch so that actions-docker-extract doesn't do it
docker pull --platform "linux/$ARCH" ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}
docker pull --platform "linux/$ARCH" ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee@${{ needs.build_ee.outputs.digest }}
- run: |
# Checks the image is in docker prior to running actions-docker-extract. It fails if not
# Also useful to visually check that the arch is the right opencontainers
docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}
docker image inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee@${{ needs.build_ee.outputs.digest }}
- uses: shrink/actions-docker-extract@v3
id: extract
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}
path: "/usr/src/app/windmill"
- uses: shrink/actions-docker-extract@v3
id: extract-duckdb-ffi-internal
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}
path: "/usr/src/app/windmill_duckdb_runner"
- uses: shrink/actions-docker-extract@v3
id: extract-ee
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee@${{ needs.build_ee.outputs.digest }}
path: "/usr/src/app/windmill"
- name: Rename binary with corresponding architecture
# The runner disk cannot hold the CE and EE images at once, so each image
# is pulled, extracted from and removed before the next one is pulled.
- name: Extract binaries
env:
CE_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ needs.build.outputs.digest }}
EE_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee@${{ needs.build_ee.outputs.digest }}
run: |
mv "${{ steps.extract.outputs.destination }}/windmill" "${{ steps.extract.outputs.destination }}/windmill-${ARCH}"
mv "${{ steps.extract-ee.outputs.destination }}/windmill" "${{ steps.extract-ee.outputs.destination }}/windmill-ee-${ARCH}"
set -euo pipefail
mkdir -p release
# extract <image> (<path in image> <release file name>)...
extract() {
local image=$1 cid
shift
docker pull --platform "linux/$ARCH" "$image"
docker image inspect --format '{{.Os}}/{{.Architecture}}' "$image"
cid=$(docker create --platform "linux/$ARCH" "$image")
while [ $# -gt 0 ]; do
docker cp "$cid:$1" "release/$2"
shift 2
done
docker rm "$cid"
docker rmi "$image"
df -h /
}
extract "$CE_IMAGE" \
/usr/src/app/windmill "windmill-$ARCH" \
/usr/src/app/windmill_duckdb_runner windmill_duckdb_runner
extract "$EE_IMAGE" /usr/src/app/windmill "windmill-ee-$ARCH"
ls -la release
- name: Attach binary to release
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.extract.outputs.destination }}/*
${{ steps.extract-ee.outputs.destination }}/*
${{ steps.extract-duckdb-ffi-internal.outputs.destination }}/*
files: release/*
upload_ee_debug_to_s3:
needs: [build_ee]
+1 -1
View File
@@ -135,7 +135,7 @@ jobs:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.0
bun-version: 1.4.4
- uses: denoland/setup-deno@v2
with:
+3 -1
View File
@@ -40,12 +40,14 @@ jobs:
# skips auto-review for every private member.
# Dependabot-triggered runs get a separate secret scope, so this job has no API
# key and cannot review. workflow_call stays open for an explicit request.
# `[skip-ai-review]` in the PR body opts out of the automatic run only.
if: |
github.event_name == 'workflow_call' ||
(
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
github.event.pull_request.user.login != 'dependabot[bot]' &&
!contains(github.event.pull_request.body, '[skip-ai-review]')
)
permissions:
contents: read
+3 -1
View File
@@ -39,12 +39,14 @@ jobs:
# skips auto-review for every private member.
# Dependabot-triggered runs get a separate secret scope, so this job has no API
# key and cannot review. workflow_call stays open for an explicit request.
# `[skip-ai-review]` in the PR body opts out of the automatic run only.
if: |
github.event_name == 'workflow_call' ||
(
(github.event.pull_request.draft == false || github.event.pull_request.ready_for_review == true) &&
github.event.pull_request.head.repo.fork == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
github.event.pull_request.user.login != 'dependabot[bot]' &&
!contains(github.event.pull_request.body, '[skip-ai-review]')
)
permissions:
contents: read
+2 -1
View File
@@ -39,9 +39,10 @@ jobs:
- This gives you the exact 7-day window (store these in variables for use in commands)
2. **Fetch ONLY Merged PRs from Past Week**:
- Command: `gh pr list --repo ${{ github.repository }} --state merged --search "merged:>=$CUTOFF_DATE" --limit 100 --json number,title,author,mergedAt,url`
- Command: `gh pr list --repo ${{ github.repository }} --state merged --search "merged:>=$CUTOFF_DATE" --limit 100 --json number,title,author,mergedAt,url,body --jq '[.[] | select((.body // "") | contains("[skip-ai-review]") | not) | del(.body)]'`
- This returns ONLY PRs that were merged in the last 7 days
- The --search flag filters by merge date using GitHub's search syntax
- The --jq filter drops PRs whose body contains `[skip-ai-review]`; never fetch or mention those PRs
- **FILTER OUT** any PRs with titles starting with "chore: release" or "chore(release)"
3. **Categorize PRs**: Group PRs into three categories by analyzing titles and labels:
+1 -1
View File
@@ -1,3 +1,3 @@
{
".": "1.841.0"
".": "1.849.0"
}
+5 -1
View File
@@ -41,11 +41,14 @@ Open-source platform for internal tools, workflows, API integrations, background
for an inline app runnable that opts in), why an admin's roles are not added, the per-role-set
logins and the order their rows and logins are written in
- **Enterprise**: `docs/enterprise.md` — EE file conventions and PR workflow
- **Workspace roles**: `docs/workspace-roles.md` — instance-defined roles with per-workspace
overrides, the capabilities a role holds, why `ApiAuthed::is_operator` must be derived from the
role, and the `role_seat` table billing reads
- **Operator write rights**: `docs/operator-write-rights.md` — which `operator_settings` flags are
enforced rather than cosmetic, and why a right that is granted-unless-withdrawn needs `Option`
fields and a jsonb merge rather than a serde default
- **Operator builder rights**: `docs/operator-builder-rights.md` — the workspace settings that let
operators compose flows and full-code apps, what the composition check must cover, which
operators compose flows, AI agents and full-code apps, what the composition check must cover, which
raw-app endpoint stays closed on purpose, and why either right costs a full seat
- **Auth surface**: `docs/auth-surface.md` — credential precedence, session/cache invalidation
scope, which token labels email their owner at expiry, how OAuth login matches `login_type`, and
@@ -63,6 +66,7 @@ Open-source platform for internal tools, workflows, API integrations, background
- **Domain vocabulary**: `CONTEXT.md` — the words this codebase uses for its own concepts (step, step setting, trigger step, …). Name things the way it does.
- **CLI commands**: when adding/modifying/removing a command, subcommand, option, or description in `cli/src/commands/`, run `python system_prompts/generate.py` to refresh `system_prompts/auto-generated/` and `cli/src/guidance/skills.gen.ts`. The CLI docs the agents use to operate `wmill` are derived from the source — stale generated files give agents the wrong flags.
- **AI guidance** (chat prompts and CLI skills): what the AI knows about Windmill itself — how flows, scripts, apps, pipelines and resources work — is written once, in `system_prompts/base/` and `system_prompts/languages/`, and `system_prompts/generate.py` builds both the chat's `$system_prompts` exports and the CLI's skills from it. Add or change such guidance there, never inline in one consumer: a sentence only one side should see goes in a `<!-- cli-only -->` / `<!-- chat-only -->` block, and a new file reaches both through the `TOPICS` table. The chat prompt builders under `frontend/src/lib/components/copilot/chat/` add only tool plumbing and runtime values, and shared markdown names no chat tool, since it reaches every chat mode. Rerun `generate.py` after editing; `system_prompts/README.md` has the details.
- **Windmill MCP server**: `/api/mcp` gives a token with `mcp:all` the AI session's GLOBAL toolset (`backend/windmill-api/src/mcp/session/`), and a token scoped to a selection of scripts and flows the tools server's per-runnable tools, without endpoint tools. The tools server's own URLs, `/api/mcp/w/{workspace}/mcp` and `/api/mcp/gateway`, keep serving existing tokens, endpoint scopes included, except that they give the session toolset to an `mcp:all` token carrying `mcp:session` (added by the OAuth approve, kept across scope edits) or `mcp:read_only`/`mcp:read_run`. Every tool takes a `workspace_id`; the token bounds which (its bound workspace, the `mcp:workspaces:` list, or all of its owner's). What a model reads there (tool names, descriptions, input schemas, instructions, `get_instructions` texts) is generated from the session's TypeScript into `session/gen/`: after changing a GLOBAL tool definition, the global system prompt or `system_prompts/`, run `npm run gen:mcp-session` from `frontend/` (`mcpSessionGen.test.ts` fails otherwise). What a tool *does* is written twice, in `chat/global/core.ts` and in a Rust handler: a behaviour change on one side must be mirrored on the other, and a new session tool is either implemented in Rust or added to `EDITOR_ONLY` (a `cargo test` in `session/mod.rs` fails otherwise).
- **Session recorder**: `frontend/src/lib/components/recording/` is also the recorder `wmill app dev --recording` serves, vendored into the CLI as `cli/src/commands/app/devRecorderBundle.gen.ts`. After changing `rawAppSnapshot.ts` or `rawAppRecording.svelte.ts`, run `bun run gen:dev-recorder` from `cli/` (`cli/test/dev_recorder_bundle_unit.test.ts` fails otherwise).
- **Raw-app policy**: `frontend/src/lib/components/raw_apps/rawAppPolicy.ts` also derives the policy the server's raw-app deploy stores, vendored into the bundle job as `backend/windmill-api/src/apps_raw_policy.gen.js`. After changing it or anything it imports, run `bun run gen:app-policy` from `cli/` (`cli/test/app_policy_bundle_unit.test.ts` fails otherwise). It rides in the job rather than being read from the CLI the job runs because the images install `windmill-cli` unpinned, so an image can carry one older than its server.
+158
View File
@@ -1,5 +1,163 @@
# Changelog
## [1.849.0](https://github.com/windmill-labs/windmill/compare/v1.848.3...v1.849.0) (2026-10-25)
### Features
* per-user Anthropic Workload Identity Federation for Windmill AI ([#11998](https://github.com/windmill-labs/windmill/issues/11998)) ([6c8fd6c](https://github.com/windmill-labs/windmill/commit/6c8fd6cfe2057f2822230bdf9ad2058f537df996))
## [1.848.3](https://github.com/windmill-labs/windmill/compare/v1.848.2...v1.848.3) (2026-10-25)
### Bug Fixes
* pin node to 24.22.1 in the worker image for CVE-2026-111497 ([#11995](https://github.com/windmill-labs/windmill/issues/11995)) ([0e79e93](https://github.com/windmill-labs/windmill/commit/0e79e934b6342150ee31de08a19400de482b1969))
## [1.848.2](https://github.com/windmill-labs/windmill/compare/v1.848.1...v1.848.2) (2026-10-24)
### Bug Fixes
* tighten file handling in deno/bun, stricter codebase tarball,executor isolation ([#11990](https://github.com/windmill-labs/windmill/issues/11990)) ([ccf8892](https://github.com/windmill-labs/windmill/commit/ccf889269b8897be707cde639b2531d522c286c9))
## [1.848.1](https://github.com/windmill-labs/windmill/compare/v1.848.0...v1.848.1) (2026-10-23)
### Bug Fixes
* restore workspace pg_dump changes reverted by 812ff6ea5e ([#11988](https://github.com/windmill-labs/windmill/issues/11988)) ([45d3c95](https://github.com/windmill-labs/windmill/commit/45d3c951bb8827c67daaaf75ed52f3c3e1215911))
* use linkedin openid connect default scopes ([#11953](https://github.com/windmill-labs/windmill/issues/11953)) ([001313a](https://github.com/windmill-labs/windmill/commit/001313aa242c6de053a9deb0c6cdb64580ce1cee))
## [1.848.0](https://github.com/windmill-labs/windmill/compare/v1.847.0...v1.848.0) (2026-10-23)
### Features
* add a use/plan/build mode picker and read-only prod sessions ([#11940](https://github.com/windmill-labs/windmill/issues/11940)) ([d6c2b2c](https://github.com/windmill-labs/windmill/commit/d6c2b2c68344bb95939701c418116b2e7d4715a3))
* composer pills that teach Windmill from the workspace ([#11889](https://github.com/windmill-labs/windmill/issues/11889)) ([ebeea51](https://github.com/windmill-labs/windmill/commit/ebeea514926f60295f3f11f516f4ccda3448f829))
* fill docusign, salesforce and quickbooks fields on connect ([#11960](https://github.com/windmill-labs/windmill/issues/11960)) ([11f2a4c](https://github.com/windmill-labs/windmill/commit/11f2a4c7ffac980036f839759ae93da6ff3f22e4))
* group home row menus and open them at their final height ([#11949](https://github.com/windmill-labs/windmill/issues/11949)) ([91bf9b6](https://github.com/windmill-labs/windmill/commit/91bf9b67a74afb419659719949484f1cfd5338c0))
* let flow builder operators build AI agents ([#11898](https://github.com/windmill-labs/windmill/issues/11898)) ([e5dedd1](https://github.com/windmill-labs/windmill/commit/e5dedd147e1db0c4f36796ba292188bcdb0efc5a))
* manage and create folders from the home tree view ([#11943](https://github.com/windmill-labs/windmill/issues/11943)) ([da443d2](https://github.com/windmill-labs/windmill/commit/da443d2fb263ecaf90320809b1bb2fc8a4f65b20))
* run a workspace handler when a variable's value expires ([#10837](https://github.com/windmill-labs/windmill/issues/10837)) ([7a29abc](https://github.com/windmill-labs/windmill/commit/7a29abc7eec491c35217445c1c08486ff030a22c))
### Bug Fixes
* change an app's access mode under the deploy row lock ([#11965](https://github.com/windmill-labs/windmill/issues/11965)) ([725b15f](https://github.com/windmill-labs/windmill/commit/725b15f546cf20c2e5908acffb105d73fe907558))
* fork a raw app into the raw app builder, in its session when there ([#11978](https://github.com/windmill-labs/windmill/issues/11978)) ([3d6a2bc](https://github.com/windmill-labs/windmill/commit/3d6a2bcef2e284d64690db04db32a2326a4b0670))
* home's acting-on follows the workspace home switches to ([#11946](https://github.com/windmill-labs/windmill/issues/11946)) ([18c6936](https://github.com/windmill-labs/windmill/commit/18c69360c9a8e9a9fe4c7c1d9e825a2b7be403a9))
* keep a staged flow path across reloads and follow moves in session tabs ([#11967](https://github.com/windmill-labs/windmill/issues/11967)) ([6b56656](https://github.com/windmill-labs/windmill/commit/6b56656bd650f2db5fbd74e23b55b926c6f69dd7))
* keep the log indexer starting when a stored day chunk is broken ([#11979](https://github.com/windmill-labs/windmill/issues/11979)) ([79fe8ab](https://github.com/windmill-labs/windmill/commit/79fe8ab03f6f052bf7fe763b6f8a0a23fe922611))
* list usr columns explicitly in whoami's user lookup ([#11970](https://github.com/windmill-labs/windmill/issues/11970)) ([fb193d7](https://github.com/windmill-labs/windmill/commit/fb193d7a816ae97fa8fc60608270296e159dfd3c))
* make the autoscaling Test scaling button run the integration ([#11972](https://github.com/windmill-labs/windmill/issues/11972)) ([72c6b10](https://github.com/windmill-labs/windmill/commit/72c6b10821cfa35ff3deb3a3ecc729ed75a9dbc6))
* return variable.value as text so widening it changes no result type ([#11976](https://github.com/windmill-labs/windmill/issues/11976)) ([f6f3a0a](https://github.com/windmill-labs/windmill/commit/f6f3a0a1f24cd9ea0d78207d6848147ebd73bea0))
* run unstamped git auto-pulls as a superadmin when no admin ([#11973](https://github.com/windmill-labs/windmill/issues/11973)) ([c89a827](https://github.com/windmill-labs/windmill/commit/c89a82750ed0a461d8d4f1502f019bc0da4ed58c))
* send app editor inspector picks to a new AI session as a chip ([#11966](https://github.com/windmill-labs/windmill/issues/11966)) ([28d2556](https://github.com/windmill-labs/windmill/commit/28d2556c941f66cad353eca3809f43e8d8cf3c05))
* share settings.yaml's git sync block between a fork and its parent ([#11974](https://github.com/windmill-labs/windmill/issues/11974)) ([fe38a1d](https://github.com/windmill-labs/windmill/commit/fe38a1d3763a11f8b0bc4b07d61824d3a7b51850))
## [1.847.0](https://github.com/windmill-labs/windmill/compare/v1.846.1...v1.847.0) (2026-10-22)
### Features
* add job_id and flow_path to flow step error objects ([#11941](https://github.com/windmill-labs/windmill/issues/11941)) ([eeb48f0](https://github.com/windmill-labs/windmill/commit/eeb48f0c26ccc5162430eddec24adc2601eb5f99))
* chat with a saved agent from a raw app through an agent runnable ([#11921](https://github.com/windmill-labs/windmill/issues/11921)) ([c6a93a9](https://github.com/windmill-labs/windmill/commit/c6a93a9b565752da6c8b55d383e5bee88f00f229))
* let native triggers act through per-user or shared connections ([#11352](https://github.com/windmill-labs/windmill/issues/11352)) ([dc1fb50](https://github.com/windmill-labs/windmill/commit/dc1fb5087be7169045aad57e955dabe3e29de82e))
* slack agents through a workspace's own slack app ([#11912](https://github.com/windmill-labs/windmill/issues/11912)) ([34de8bc](https://github.com/windmill-labs/windmill/commit/34de8bc06d2b04f7929bb8cf35f9a34d0e0071fa))
* worker group toggle to keep the worker's proxy out of jobs ([#11958](https://github.com/windmill-labs/windmill/issues/11958)) ([8a0318a](https://github.com/windmill-labs/windmill/commit/8a0318a28f5cfda7557b0f94db20ef17b0664ee4))
### Bug Fixes
* compare a null resource description as empty ([#11947](https://github.com/windmill-labs/windmill/issues/11947)) ([8a7b148](https://github.com/windmill-labs/windmill/commit/8a7b1481bd270df3a98c9db5e7824d13b8cd37b6))
* compare fork secret variables by decrypted value ([#11952](https://github.com/windmill-labs/windmill/issues/11952)) ([0dd131b](https://github.com/windmill-labs/windmill/commit/0dd131b38074423de5c769cae478c6ea0ae365c2))
* hold home's ai composer space with a matching placeholder ([#11936](https://github.com/windmill-labs/windmill/issues/11936)) ([9202a74](https://github.com/windmill-labs/windmill/commit/9202a74071ba424ad6cfc1cfded518ee7db002dc))
* link a variable to its OAuth account only in the connect flow ([#11361](https://github.com/windmill-labs/windmill/issues/11361)) ([d6adac8](https://github.com/windmill-labs/windmill/commit/d6adac8b7579ad6c3df5caab9a735451c1ddd896))
* stop audit inserts from silently rolling back saves ([#11938](https://github.com/windmill-labs/windmill/issues/11938)) ([5ef19a8](https://github.com/windmill-labs/windmill/commit/5ef19a88a90b3a4fe05a78547416082dc51763f5))
## [1.846.1](https://github.com/windmill-labs/windmill/compare/v1.846.0...v1.846.1) (2026-10-21)
### Bug Fixes
* home recent cards include items opened on their own page ([#11934](https://github.com/windmill-labs/windmill/issues/11934)) ([5019fab](https://github.com/windmill-labs/windmill/commit/5019fab5a5f996796a07524c770f86309a7a3500))
* home search suggests filters whose name matches the typed text ([#11933](https://github.com/windmill-labs/windmill/issues/11933)) ([bf1eb85](https://github.com/windmill-labs/windmill/commit/bf1eb85577419cc08482158c1835d5262ebb87d2))
## [1.846.0](https://github.com/windmill-labs/windmill/compare/v1.845.0...v1.846.0) (2026-10-21)
### Features
* home list settings menu with sort, library and user-folder toggles ([#11928](https://github.com/windmill-labs/windmill/issues/11928)) ([73f655d](https://github.com/windmill-labs/windmill/commit/73f655db98dd0f0fd03881c36e6c9310fb2687a2))
### Bug Fixes
* home's acting-on pick switches the current workspace ([#11929](https://github.com/windmill-labs/windmill/issues/11929)) ([cdaddcc](https://github.com/windmill-labs/windmill/commit/cdaddcce594378bf502f80e8f225f16b5def5eb4))
## [1.845.0](https://github.com/windmill-labs/windmill/compare/v1.844.0...v1.845.0) (2026-10-21)
### Features
* home and empty ai sessions share one session composer ([#11635](https://github.com/windmill-labs/windmill/issues/11635)) ([56b2e10](https://github.com/windmill-labs/windmill/commit/56b2e106daedb5ae381052d3116346a88ba3f206))
## [1.844.0](https://github.com/windmill-labs/windmill/compare/v1.843.0...v1.844.0) (2026-10-21)
### Features
* serve the ai session toolset over mcp at /api/mcp ([#11738](https://github.com/windmill-labs/windmill/issues/11738)) ([892334f](https://github.com/windmill-labs/windmill/commit/892334f008d5b6b73de38fdf2831b1a63eeb0a51))
## [1.843.0](https://github.com/windmill-labs/windmill/compare/v1.842.0...v1.843.0) (2026-10-21)
### Features
* configurable workspace roles with per-workspace overrides ([#11821](https://github.com/windmill-labs/windmill/issues/11821)) ([21d2a49](https://github.com/windmill-labs/windmill/commit/21d2a49971b858ff8aef2776a36989b57ba49415))
* move the open in AI session button to the page header ([#11888](https://github.com/windmill-labs/windmill/issues/11888)) ([34db239](https://github.com/windmill-labs/windmill/commit/34db23952a765bbb9c912d74d2a37092703f50f7))
* ship php only on the full images ([#11922](https://github.com/windmill-labs/windmill/issues/11922)) ([b874861](https://github.com/windmill-labs/windmill/commit/b87486141df5b4f9b93900c0ee3264cf4b4610ec))
* workspace roles settings UI and capability-based gating ([#11824](https://github.com/windmill-labs/windmill/issues/11824)) ([8dbdfa1](https://github.com/windmill-labs/windmill/commit/8dbdfa194912bf36a705392899b9f84b5a54fd55))
### Bug Fixes
* compact the AI chat history between tool iterations ([#11911](https://github.com/windmill-labs/windmill/issues/11911)) ([17de2ba](https://github.com/windmill-labs/windmill/commit/17de2ba983bee5cb7df700476ec8a0169c97ecbd))
* refuse restarting a flow past an approval that was never granted ([#11920](https://github.com/windmill-labs/windmill/issues/11920)) ([2c6bcc0](https://github.com/windmill-labs/windmill/commit/2c6bcc09c9b6f768592b31ec540d727263a807cc))
* remove horizontal scroll in the new workspace form ([#11909](https://github.com/windmill-labs/windmill/issues/11909)) ([d35c868](https://github.com/windmill-labs/windmill/commit/d35c86896fa4f5f9936a9f61735553e2ff42b218))
* revoke mcp oauth grants on password change and reset ([#11908](https://github.com/windmill-labs/windmill/issues/11908)) ([c044777](https://github.com/windmill-labs/windmill/commit/c04477723c9d7544ea9c595e33fdcff5cce0c79d))
* **worker:** render TEMP_SCRIPT_REFS placeholder in Python runner-group loader.py ([#11915](https://github.com/windmill-labs/windmill/issues/11915)) ([78fb800](https://github.com/windmill-labs/windmill/commit/78fb800904351f6b549b8b2227cb9c0d5dafd55d))
## [1.842.0](https://github.com/windmill-labs/windmill/compare/v1.841.0...v1.842.0) (2026-10-20)
### Features
* let AI agents answer in Slack ([#11630](https://github.com/windmill-labs/windmill/issues/11630)) ([35b250e](https://github.com/windmill-labs/windmill/commit/35b250e76739a1e6f543971b099d5796a44d0c89))
* name the action on chat tool confirmation buttons ([#11795](https://github.com/windmill-labs/windmill/issues/11795)) ([7d01d25](https://github.com/windmill-labs/windmill/commit/7d01d252b526987f8f0b86695de2f9c90de64519))
### Bug Fixes
* align collapsed conversations sidebar chat icon with the buttons above ([#11873](https://github.com/windmill-labs/windmill/issues/11873)) ([24238d4](https://github.com/windmill-labs/windmill/commit/24238d4062801558f90728b17e3d70e980c733dd))
* align sidebar home with the header when ai sessions is off ([#11882](https://github.com/windmill-labs/windmill/issues/11882)) ([1874808](https://github.com/windmill-labs/windmill/commit/18748084705dc48994b7378217e0df1e8bfbfe3f))
* give the agent page's API and Slack sections tabs on small screens ([#11901](https://github.com/windmill-labs/windmill/issues/11901)) ([394d345](https://github.com/windmill-labs/windmill/commit/394d345e0c8d9d7da87371e8da090d3becc77ce7))
* keep schedule push, flow advance, wac approval and scim on one pool connection ([#11904](https://github.com/windmill-labs/windmill/issues/11904)) ([8afe060](https://github.com/windmill-labs/windmill/commit/8afe0607abd6bb689a0644916fcdc39fb7df2fe3))
* keep the flow chat mounted when leaving the chat tab ([#11872](https://github.com/windmill-labs/windmill/issues/11872)) ([ed58996](https://github.com/windmill-labs/windmill/commit/ed589963f4d7b7d50a69cacdede443f2bb7efd18))
* let devops users reach instance pages without a workspace ([#11876](https://github.com/windmill-labs/windmill/issues/11876)) ([a3a4fa5](https://github.com/windmill-labs/windmill/commit/a3a4fa503804eb9f031699b60e00a196d223cbe6))
* **mcp:** escape JSON inlined in the MCP OAuth callback page ([#11880](https://github.com/windmill-labs/windmill/issues/11880)) ([5d0a8a9](https://github.com/windmill-labs/windmill/commit/5d0a8a9c15cd54032f930f8a21a0c2c3b517d60d))
* refresh oauth tokens without holding a pool connection ([#11905](https://github.com/windmill-labs/windmill/issues/11905)) ([8ddb358](https://github.com/windmill-labs/windmill/commit/8ddb358198e834642f259197aa5f6d96bd7740d3))
* spell the schedule pause time the way the picker writes it ([#11875](https://github.com/windmill-labs/windmill/issues/11875)) ([4186fff](https://github.com/windmill-labs/windmill/commit/4186ffff841d5905d308aa6bae8159aba3794c1c))
* stop holding a pool connection while waiting for another ([#11902](https://github.com/windmill-labs/windmill/issues/11902)) ([2c559b4](https://github.com/windmill-labs/windmill/commit/2c559b452f38cc86fe45bcdb98574245fd2cf187))
* write a push's runnable settings before it opens its transaction ([#11897](https://github.com/windmill-labs/windmill/issues/11897)) ([e6c8ef1](https://github.com/windmill-labs/windmill/commit/e6c8ef18a11f079083138a991543f7e273d4e511))
### Performance Improvements
* show the AI sessions composer before the chat code loads ([#11886](https://github.com/windmill-labs/windmill/issues/11886)) ([613adb5](https://github.com/windmill-labs/windmill/commit/613adb5287812cf428a74b10e1ef9362d78751b8))
## [1.841.0](https://github.com/windmill-labs/windmill/compare/v1.840.0...v1.841.0) (2026-10-18)
+13 -9
View File
@@ -144,6 +144,9 @@ ARG KUBECTL_VERSION=1.37.1
ARG HELM_VERSION=3.21.4
# NOTE: If changing, also change go version in workspace dependencies template at WorkspaceDependenciesEditor.svelte
ARG GO_VERSION=1.27.1
# Pinned to the patch: an unpinned install is cached by the image build and stops picking up
# security releases.
ARG NODE_VERSION=24.22.1
ARG APP=/usr/src/app
ARG WITH_POWERSHELL=true
ARG WITH_KUBECTL=true
@@ -166,8 +169,12 @@ ENV UV_TOOL_DIR=/usr/local/uv
ENV PATH /usr/local/bin:/root/.local/bin:/tmp/.local/bin:$PATH
RUN apt-get update \
# The build cache keeps the apt layer while the base image digest and this line are unchanged, so
# Debian security updates are not picked up by later builds. Bump to force a fresh apt-get upgrade;
# bump it in docker/DockerfileSlim and docker/DockerfileSlimEe too.
ARG APT_REFRESH=1
RUN echo "apt refresh ${APT_REFRESH}" \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends netbase tzdata ca-certificates wget curl jq unzip build-essential unixodbc xmlsec1 tini gnupg libargon2-1 \
&& if echo "$features" | grep -q "ee"; then apt-get install -y --no-install-recommends libsasl2-modules-gssapi-mit krb5-user; fi \
@@ -241,7 +248,7 @@ ENV PATH="${PATH}:/usr/local/go/bin"
ENV GO_PATH=/usr/local/go/bin/go
# Install UV
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.0/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.4/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
# Preinstall python runtimes to temp build location (will copy with world-writable perms later)
# --compile-bytecode precompiles the stdlib to .pyc so jobs don't recompile it on every run
@@ -252,8 +259,8 @@ RUN UV_CACHE_DIR=/tmp/build_cache/uv UV_PYTHON_INSTALL_DIR=/tmp/build_cache/py_r
RUN UV_CACHE_DIR=/tmp/build_cache/uv UV_PYTHON_INSTALL_DIR=/tmp/build_cache/py_runtime uv python install $NEW_INSTANCE_PY --compile-bytecode
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
RUN apt-get -y update && apt-get install -y --no-install-recommends curl procps nodejs awscli && apt-get clean \
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION%%.*}.x | bash -
RUN apt-get -y update && apt-get install -y --no-install-recommends curl procps nodejs=${NODE_VERSION}-1nodesource1 awscli && apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# The npm bundled with nodejs is replaced by a pinned one: it is what `//npm` scripts install with
@@ -293,7 +300,7 @@ COPY --from=builder /windmill/target/release/windmill ${APP}/windmill
# DuckDB jobs run in this binary, which the worker looks for next to its own.
COPY --from=windmill_duckdb_ffi_internal_builder /windmill-duckdb-ffi-internal/target/release/windmill_duckdb_runner ${APP}/windmill_duckdb_runner
COPY --from=oven/bun:1.4.0 /usr/local/bin/bun /usr/bin/bun
COPY --from=oven/bun:1.4.4 /usr/local/bin/bun /usr/bin/bun
# Install windmill CLI
RUN bun install -g windmill-cli \
@@ -305,9 +312,6 @@ RUN bun install -g windmill-cli \
RUN curl -fsSL https://claude.ai/install.sh | bash \
&& cp /root/.local/share/claude/versions/* /usr/bin/claude
COPY --from=php:8.3.33-cli-trixie /usr/local/bin/php /usr/bin/php
COPY --from=composer:2.9.5 /usr/bin/composer /usr/bin/composer
# add the docker client to call docker from a worker if enabled
COPY --from=docker:29-dind /usr/local/bin/docker /usr/local/bin/
+13
View File
@@ -30,5 +30,18 @@ quotas set in the software and a right to distribute the community edition as is
but not to sell, resell, serve as a managed service, modify or wrap under any
form without an explicit agreement.
To re-expose directly any Windmill parts to your users (see
https://www.windmill.dev/docs/misc/white_labelling) as a feature of your
product, with the exception of iframed public Windmill "apps", or to build a
feature on top of "Windmill Community Edition" that you sell commercially or
embed in a distributable product or binary, you must get a commercial license.
Contact us at sales@windmill.dev if you have any questions. To do the same from
the binary compiled from the source code in this repository without the
"enterprise" feature flag, you must comply with the AGPLv3 license terms and
conditions or get a commercial license from Windmill Labs, Inc.
To use Windmill "Community Edition" as is internally in your organization, or to
use its APIs as is, you do NOT need a commercial license.
All third party components incorporated into the Windmill Software are licensed
under the original license provided by the owner of the applicable component.
+114 -142
View File
@@ -3,10 +3,10 @@
</p>
<p align=center>
Open-source developer platform for internal code: APIs, background jobs, workflows and UIs. Self-hostable alternative to Retool, Pipedream, Superblocks and a simplified Temporal with autogenerated UIs and custom UIs to trigger workflows and scripts as internal apps.
Open-source, self-hostable code-first platform for workflows, apps and AI agents, running on the fastest self-hostable orchestrator. Engineers write code in 20+ languages and sync it with Git. Business teams build on the same platform with AI, while review, promotion between environments and isolated workers keep engineers in control of what ships. Self-hostable alternative to Lovable, Retool, n8n and a simplified Temporal.
<p align=center>
Scripts are turned into sharable UIs automatically, and can be composed together into flows or used into richer apps built with low-code. Supported languages: Python, TypeScript, Go, Bash, SQL, GraphQL, PowerShell, Rust, and more.
Scripts are turned into sharable UIs, APIs and cron jobs automatically, and can be composed together into flows, data pipelines, AI agents or full-code React and Svelte apps. Supported languages: Python, TypeScript, Go, Bash, SQL, GraphQL, PowerShell, Rust, and more.
</p>
<p align="center">
@@ -34,7 +34,7 @@ Scripts are turned into sharable UIs automatically, and can be composed together
<a href="https://app.windmill.dev">Try it</a> - <a href="https://www.windmill.dev/">Website</a> - <a href="https://www.windmill.dev/docs/intro/">Docs</a> - <a href="https://discord.gg/V7PM2YHsPB">Discord</a> - <a href="https://hub.windmill.dev">Hub</a> - <a href="./CONTRIBUTING.md">Contributing</a>
</p>
# Windmill - Developer platform for APIs, background jobs, workflows and UIs
# Windmill - Code-first platform for workflows, apps and AI agents
Windmill is fully open-sourced (AGPLv3) and Windmill Labs offers dedicated instances and commercial support and licenses.
@@ -42,10 +42,12 @@ Windmill is fully open-sourced (AGPLv3) and Windmill Labs offers dedicated insta
https://github.com/user-attachments/assets/d80de1d9-64de-4d89-aacd-6df23fa81fc4
- [Windmill - Developer platform for APIs, background jobs, workflows and UIs](#windmill---developer-platform-for-apis-background-jobs-workflows-and-uis)
- [Windmill - Code-first platform for workflows, apps and AI agents](#windmill---code-first-platform-for-workflows-apps-and-ai-agents)
- [Build with AI, ship with review](#build-with-ai-ship-with-review)
- [Main Concepts](#main-concepts)
- [Show me some actual script code](#show-me-some-actual-script-code)
- [Local Development](#local-development)
- [What the code looks like](#what-the-code-looks-like)
- [Data: data tables, DuckDB and DuckLake](#data-data-tables-duckdb-and-ducklake)
- [Develop locally or in the browser](#develop-locally-or-in-the-browser)
- [Stack](#stack)
- [Fastest Self-Hostable Workflow Engine](#fastest-self-hostable-workflow-engine)
- [Security](#security)
@@ -59,13 +61,21 @@ https://github.com/user-attachments/assets/d80de1d9-64de-4d89-aacd-6df23fa81fc4
- [License](#license)
- [Integrations](#integrations)
- [Environment Variables](#environment-variables)
- [Run a local dev setup](#run-a-local-dev-setup)
- [Frontend only](#frontend-only)
- [Backend + Frontend](#backend--frontend)
- [Contributing](#contributing)
- [Contributors](#contributors)
- [Copyright](#copyright)
## Build with AI, ship with review
Business teams and engineers build on the same Windmill instance. What the AI builds is an ordinary script, flow or app, and goes through the same review as code written by engineers:
- [AI sessions](https://www.windmill.dev/docs/core_concepts/ai_sessions) build scripts, flows and apps with AI in a workspace fork, with a live preview and a diff to review before deploying.
- [Workspace roles](https://www.windmill.dev/docs/core_concepts/roles_and_permissions#workspace-roles) decide what each team can author, and [folders](https://www.windmill.dev/docs/core_concepts/groups_and_folders) scope the resources, skills and MCP servers its AI can reach.
- [Protection rulesets](https://www.windmill.dev/docs/core_concepts/protection_rulesets) block direct deployment, so changes reach production only after an engineer reviews and deploys them.
- [Dev workspaces](https://www.windmill.dev/docs/advanced/dev_workspaces) keep their own credentials, and promote to prod through Compare & Deploy or a Git pull request.
- [Worker groups](https://www.windmill.dev/docs/core_concepts/worker_groups) run AI-built code on its own workers, or on a [separate instance](https://www.windmill.dev/docs/core_concepts/staging_prod#deploy-to-a-workspace-on-another-instance).
See [let business teams build with AI safely](https://www.windmill.dev/docs/advanced/ai_guardrails) for the full setup. Engineers keep writing code locally with the [CLI](https://www.windmill.dev/docs/advanced/cli), the [VS Code extension](https://www.windmill.dev/docs/cli_local_dev/vscode-extension) and their coding agent, synced with [Git](https://www.windmill.dev/docs/advanced/git_sync).
## Main Concepts
1. Define a minimal and generic script in Python, TypeScript, Go or Bash that solves a specific task. The code can be defined in the provided Web IDE or synchronized with your own GitHub repo (e.g. through VS Code extension): [provided Web IDE](https://www.windmill.dev/docs/code_editor) or [synchronized with your own GitHub repo](https://www.windmill.dev/docs/advanced/cli/sync) (e.g. through [VS Code](https://www.windmill.dev/docs/cli_local_dev/vscode-extension) extension):
@@ -90,54 +100,93 @@ Scripts and flows can be triggered by [schedules](https://www.windmill.dev/docs/
Build your entire infra on top of Windmill!
## Show me some actual script code
## What the code looks like
A script is a plain function. Its typed arguments become a generated form, an HTTP endpoint and a CLI command:
```typescript
//import any dependency from npm
import * as wmill from "windmill-client";
import * as cowsay from "cowsay@1.5.0";
// fill the type, or use the +Resource type to get a type-safe reference to a resource
type Postgresql = {
host: string;
port: number;
user: string;
dbname: string;
sslmode: string;
password: string;
};
import dayjs from "dayjs"; // any npm package, resolved and pinned automatically
export async function main(
a: number,
b: "my" | "enum",
c: Postgresql,
d = "inferred type string from default arg",
e = { nested: "object" }
//f: wmill.Base64
customerId: string,
plan: "starter" | "pro", // a union of strings becomes a dropdown
trialDays = 14 // defaults infer the type
) {
const email = process.env["WM_EMAIL"];
// variables are permissioned and by path
let variable = await wmill.getVariable("f/company-folder/my_secret");
const lastTimeRun = await wmill.getState();
// logs are printed and always inspectable
console.log(cowsay.say({ text: "hello " + email + " " + lastTimeRun }));
await wmill.setState(Date.now());
const trialEnd = dayjs().add(trialDays, "day").toISOString();
// return is serialized as JSON
return { foo: d, variable };
// a data table: the workspace's Postgres, queried without a connection string
const sql = wmill.datatable();
await sql`INSERT INTO trials (customer_id, plan, trial_end) VALUES (${customerId}, ${plan}, ${trialEnd})`.fetch();
// secrets are permissioned by path
const slackToken = await wmill.getVariable("f/sales/slack_token");
await fetch("https://slack.com/api/chat.postMessage", {
method: "POST",
headers: { Authorization: `Bearer ${slackToken}`, "Content-Type": "application/json" },
body: JSON.stringify({ channel: "#sales", text: `New ${plan} trial: ${customerId}` }),
});
console.log(`Trial started for ${customerId}`); // logs stream live in the UI
return { customerId, plan, trialEnd }; // returned as JSON
}
```
## Local Development
Workflows are code too. Each task runs as its own job with its own logs, and waiting for an approval releases the worker:
Windmill supports multiple ways to develop locally and sync with your instance:
```typescript
import { task, waitForApproval, workflow } from "windmill-client";
async function plan(env: string) {
return { env, changes: 3 };
}
async function apply(plan: { env: string; changes: number }) {
return `applied ${plan.changes} changes to ${plan.env}`;
}
export const main = workflow(async (env: string) => {
const changes = await task(plan)(env);
const approval = await waitForApproval({ timeout: 3600 });
if (!approval.approved) {
return `rejected by ${approval.approver}`;
}
return await task(apply)(changes);
});
```
Flows can also be built in the visual [flow editor](https://www.windmill.dev/docs/flows/flow_editor) or as YAML, with scripts like the first one as steps. See [workflows as code](https://www.windmill.dev/docs/core_concepts/workflows_as_code).
## Data: data tables, DuckDB and DuckLake
- [Data tables](https://www.windmill.dev/docs/core_concepts/persistent_storage/data_tables) give each workspace managed Postgres tables, queried with type-checked SQL from TypeScript, Python and DuckDB scripts without exposing a connection string.
- [DuckDB](https://www.windmill.dev/docs/integrations/duckdb) scripts query S3 and Azure Blob files (CSV, Parquet, JSON), data tables, Postgres, MySQL and BigQuery in SQL, on your workers.
- [DuckLake](https://www.windmill.dev/docs/core_concepts/persistent_storage/ducklake) stores large datasets as lakehouse tables in your workspace object storage, queried in plain SQL.
- [Pipelines](https://www.windmill.dev/docs/core_concepts/pipelines) (alpha) wire scripts by the data they read and write instead of a hand-drawn DAG. This script runs whenever `events` is materialized, and materializes its own table:
```sql
-- pipeline
-- on ducklake://main/events
-- materialize ducklake://main/events_by_kind
ATTACH 'ducklake://main' AS dl;
SELECT kind, count(*) AS n
FROM dl.events
GROUP BY kind;
```
Existing [dbt projects](https://www.windmill.dev/docs/getting_started/scripts_quickstart/dbt) run unmodified as scripts. See the [pipelines quickstart](https://www.windmill.dev/docs/getting_started/pipeline_quickstart).
## Develop locally or in the browser
Engineers work from their editor and coding agent, business teams build with AI in the browser, and both land in the same workspace:
| Tool | Description |
|------|-------------|
| **[CLI](https://www.windmill.dev/docs/advanced/cli)** | Sync scripts from local files or GitHub, run scripts/flows from the command line |
| **[VS Code Extension](https://www.windmill.dev/docs/cli_local_dev/vscode-extension)** | Edit and test scripts & flows directly from VS Code / Cursor with full IDE support |
| **[Git Sync](https://www.windmill.dev/docs/advanced/git_sync)** | Two-way sync between Windmill and your Git repository |
| **[Claude Code](https://www.windmill.dev/docs/core_concepts/ai_generation)** | AI-assisted development with Claude for scripts, flows, and apps |
| **[CLI](https://www.windmill.dev/docs/advanced/cli)** | Sync a workspace with local files and Git, run scripts and flows from the command line. `wmill init` generates `AGENTS.md` and [skill files](https://www.windmill.dev/docs/misc/guides/local_dev_with_ai) for Claude Code, Cursor and other AI tools |
| **[VS Code extension](https://www.windmill.dev/docs/cli_local_dev/vscode-extension)** | Edit and test scripts and flows from VS Code or Cursor with full IDE support |
| **[Git sync](https://www.windmill.dev/docs/advanced/git_sync)** | Two-way sync between a workspace and your Git repository |
| **[MCP server](https://www.windmill.dev/docs/core_concepts/mcp)** | Let coding agents and AI clients run scripts, manage resources and monitor jobs in a workspace |
| **[AI sessions](https://www.windmill.dev/docs/core_concepts/ai_sessions)** | The same agent loop in the browser, with nothing to install: plan mode, skills and MCP servers, a live preview, and a diff to review before deploying, in a fork of the workspace |
https://github.com/user-attachments/assets/c541c326-e9ae-4602-a09a-1989aaded1e9
@@ -152,7 +201,8 @@ You can run scripts locally by passing the right environment variables for the `
- **Runtimes**:
- TypeScript/JavaScript: Bun (default); Deno only on the `windmill-full` images
- Python: python3 with uv for dependency management
- Go, Bash, PowerShell, PHP, Rust, C#, Java, Ansible
- PHP: only on the `windmill-full` images
- Go, Bash, PowerShell, Rust, C#, Java, Ansible
## Fastest Self-Hostable Workflow Engine
@@ -184,11 +234,12 @@ back to the database is ~50ms. A typical lightweight deno job will take around
## Architecture
<p align="center">
Stateless API servers and workers share a PostgreSQL database that holds the job queue and all workspace state (remote agent workers go through the API servers instead). Workers pull jobs by tag, so each worker group can run in its own network, for example dev workers that only reach dev systems and prod workers that only run reviewed code.
<img src="./imgs/diagram.svg">
</p>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./imgs/architecture-dark.svg">
<img alt="Windmill architecture: business teams and engineers build through stateless API servers into workspaces, where changes move from dev and forks to prod after review. PostgreSQL holds the job queue and state. Worker groups for dev and prod, native workers and remote agent workers pull jobs by tag and reach your databases, APIs and AI model providers." src="./imgs/architecture-light.svg">
</picture>
## How to self-host
@@ -229,15 +280,11 @@ Configure OAuth and SSO (Google Workspace, Microsoft/Azure, Okta) directly from
### License
The Community Edition is free to use internally. For commercial redistribution or managed services, contact <sales@windmill.dev>. See [LICENSE](./LICENSE) and [Pricing](https://www.windmill.dev/pricing) for details.
- Using the Community Edition as is, internally or through its APIs, is free and needs no commercial license, within the limits and quotas set in the software.
- Selling, reselling or serving the Community Edition as a managed service, modifying or wrapping it, or re-exposing it to your users as a feature of your product (iframed public apps excepted) requires a commercial license: contact <sales@windmill.dev>.
- The binary built from this repository without the `enterprise` feature flag is open source under [AGPLv3](./LICENSE-AGPL): the same uses are then allowed under the AGPLv3 terms, or with a commercial license. The API clients and the OpenAPI spec are [Apache 2.0](./LICENSE-APACHE).
The "Community Edition" of Windmill available in the docker images hosted under ghcr.io/windmill-labs/windmill and the github binary releases contains the files under the AGPLv3 and Apache 2 sources but also includes proprietary and non-public code and features which are not open source and under the following terms: Windmill Labs, Inc. grants a right to use all the features of the "Community Edition" for free without restrictions other than the limits and quotas set in the software and a right to distribute the community edition as is but not to sell, resell, serve Windmill as a managed service, modify or wrap under any form without an explicit agreement.
The binary compilable from source code in this repository without the "enterprise" feature flag is open-source under the [LICENSE-AGPLv3](https://github.com/windmill-labs/windmill/blob/main/LICENSE-AGPL) License terms and conditions.
To [re-expose directly any Windmill parts to your users](https://www.windmill.dev/docs/misc/white_labelling) as a feature of your product, with the exception of iframed public Windmill "apps", or to build a feature on top of "Windmill Community Edition" that you sell commercially or embed in a distributable product or binary, you must get a commercial license. Contact us at <sales@windmill.dev> if you have any questions. To do the same from the binary compiled from the source code in this repository without the "enterprise" feature flag, you must comply with the AGPLv3 license terms and conditions or get a commercial license from Windmill Labs, Inc.
To use Windmill "Community Edition" as is internally in your organization, or to use its APIs as is, you do NOT need a commercial license.
See [LICENSE](./LICENSE) for the full terms and [Pricing](https://www.windmill.dev/pricing) for plans.
### Integrations
@@ -248,88 +295,17 @@ On self-hosted instances, you might want to import all the approved resource typ
## Environment Variables
| Environment Variable name | Default | Description | Api Server/Worker/All |
| ----------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| DATABASE_URL | | The Postgres database url. | All |
| WORKER_GROUP | default | The worker group the worker belongs to and get its configuration pulled from | Worker |
| MODE | standalone | The mode if the binary. Possible values: standalone, worker, server, agent | All |
| METRICS_ADDR | None | (ee only) The socket addr at which to expose Prometheus metrics at the /metrics path. Set to "true" to expose it on port 8001 | All |
| JSON_FMT | false | Output the logs in json format instead of logfmt | All |
| BASE_URL | http://localhost:8000 | The base url that is exposed publicly to access your instance. Is overriden by the instance settings if any. | Server |
| ZOMBIE_JOB_TIMEOUT | 30 | The timeout after which a job is considered to be zombie if the worker did not send pings about processing the job (every server check for zombie jobs every 30s) | Server |
| RESTART_ZOMBIE_JOBS | true | If true then a zombie job is restarted (in-place with the same uuid and some logs), if false the zombie job is failed | Server |
| NATIVE_MODE | false | Enable native mode: sets NUM_WORKERS=8, rejects non-native jobs (nativets, postgresql, mysql, etc.) | Worker |
| SLEEP_QUEUE | 50 | The number of ms to sleep in between the last check for new jobs in the DB. It is multiplied by NUM_WORKERS such that in average, for one worker instance, there is one pull every SLEEP_QUEUE ms. | Worker |
| KEEP_JOB_DIR | false | Keep the job directory after the job is done. Useful for debugging. | Worker |
| EXIT_AFTER_N_JOBS | None | Exit the worker process after it has executed that many jobs, so that a supervisor restarts it and no process runs more than that many, bar the steps of a same-worker flow it has started, which it always finishes (set it to 1 for a process per job; jobs handed to a dedicated worker, and the worker's own init and periodic scripts, do not count). Not counting the init and periodic scripts means they run again on every restart: an init script's runtime is added to the latency of every batch of that many jobs, and a periodic script fires once per process start whatever its interval says. The worker's shell in the workers page also starts backed off rather than after the two minutes it otherwise takes, since a process due to be recycled cannot count on living that long: the first command of a session can wait up to 15s, later ones are immediate. For deployments that isolate executions by process lifetime rather than with nsjail; note that a container restart resets the process, not the container filesystem, so caches and `/tmp` survive it. The worker name is then derived from the hostname instead of being random, so the restarted worker keeps its row in the workers list (an agent worker keeps the row but restarts its job count). Use one worker per process: workers of one process share its environment, so the first to reach the limit shuts the others down too. | Worker |
| WORKER_SUFFIX | None | Pins the last part of the worker name, which is otherwise random, so that a restarted worker keeps its row in the workers list. Only needed when several worker processes of the same worker group run on one host, since the name is derived from the hostname: give each of them a distinct value, as two processes sharing one must never happen. At most 64 letters, digits and underscores; anything else is refused at startup. | Worker |
| LICENSE_KEY (EE only) | None | License key checked at startup for the Enterprise Edition of Windmill | Worker |
| SLACK_SIGNING_SECRET | None | The signing secret of your Slack app. See [Slack documentation](https://api.slack.com/authentication/verifying-requests-from-slack) | Server |
| COOKIE_DOMAIN | None | The domain of the cookie. If not set, the cookie will be set by the browser based on the full origin | Server |
| DENO_PATH | /usr/bin/deno | The path to the deno binary. | Worker |
| PYTHON_PATH | | The path to the python binary if wanting to not have it managed by uv. | Worker |
| GO_PATH | /usr/bin/go | The path to the go binary. | Worker |
| GOPRIVATE | | The GOPRIVATE env variable to use private go modules | Worker |
| GOPROXY | | The GOPROXY env variable to use | Worker |
| NETRC | | The netrc content to use a private go registry | Worker |
| PY_CONCURRENT_DOWNLOADS | 20 | Sets the maximum number of in-flight concurrent python downloads that windmill will perform at any given time. | Worker |
| PATH | None | The path environment variable, usually inherited | Worker |
| HOME | None | The home directory to use for Go and Bash , usually inherited | Worker |
| DATABASE_CONNECTIONS | 50 (Server)/3 (Worker) | The max number of connections in the database connection pool | All |
| SUPERADMIN_SECRET | None | A token that would let the caller act as a virtual superadmin superadmin@windmill.dev | Server |
| TIMEOUT_WAIT_RESULT | 20 | The number of seconds to wait before timeout on the 'run_wait_result' endpoint | Worker |
| QUEUE_LIMIT_WAIT_RESULT | None | The number of max jobs in the queue before rejecting immediately the request in 'run_wait_result' endpoint. Takes precedence on the query arg. If none is specified, there are no limit. | Worker |
| DENO_AUTH_TOKENS | None | Custom DENO_AUTH_TOKENS to pass to worker to allow the use of private modules | Worker |
| DISABLE_RESPONSE_LOGS | false | Disable response logs | Server |
| CREATE_WORKSPACE_REQUIRE_SUPERADMIN | true | If true, only superadmins can create new workspaces | Server |
| MIN_FREE_DISK_SPACE_MB | 15000 | Minimum amount of free space on worker. Sends critical alert if worker has less free space. | Worker |
| RUN_UPDATE_CA_CERTIFICATE_AT_START | false | If true, runs CA certificate update command at startup before other initialization | All |
| RUN_UPDATE_CA_CERTIFICATE_PATH | /usr/sbin/update-ca-certificates | Path to the CA certificate update command/script to run when RUN_UPDATE_CA_CERTIFICATE_AT_START is true | All |
| GOOGLE_APPLICATION_CREDENTIALS | None | (ee only) Credentials file for GCP Pub/Sub triggers that authenticate as the instance rather than through a `gcloud` resource (workspace admins only). Application default credentials also resolve the gcloud well-known file and the GCE metadata server. Workload Identity Federation files work with the `file`, `url` and `aws` credential sources; the `executable` source is not supported. | Server |
The variables most deployments set:
## Run a local dev setup
| Environment Variable name | Default | Description | Api Server/Worker/All |
| ------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------- |
| DATABASE_URL | | The Postgres database url. | All |
| MODE | standalone | The mode of the binary: standalone, server, worker, agent (EE), indexer (EE image, full-text search), mcp | All |
| WORKER_GROUP | default | The worker group the worker belongs to and gets its configuration pulled from | Worker |
| BASE_URL | http://localhost:8000 | The base url that is exposed publicly to access your instance. Is overriden by the instance settings if any. | Server |
| LICENSE_KEY (EE only) | None | License key checked at startup for the Enterprise Edition of Windmill | Worker |
We recommend using [Nix](./frontend/README_DEV.md#nix). See [./frontend/README_DEV.md](./frontend/README_DEV.md) for all options.
### Frontend only
Uses the backend of <https://app.windmill.dev> with local frontend (hot-reload):
```bash
cd frontend
npm install
npm run generate-backend-client # or generate-backend-client-mac on Mac
npm run dev
```
Windmill available at `http://localhost/`
### Backend + Frontend
See the [./frontend/README_DEV.md](./frontend/README_DEV.md) file for all
running options.
1. Start a local Postgres database using for instance the `start-dev-db.sh` script which will make a database available at `postgres://postgres:changeme@localhost:5432/windmill`
Then run the migrations using the following command:
```
cargo install sqlx-cli
env DATABASE_URL=<YOUR_DATABASE_URL> sqlx migrate run
```
This will also avoid compile time issue with sqlx's `query!` macro.
2. (optional, linux only) Install [nsjail](https://github.com/google/nsjail) and have it accessible in
your PATH
3. Install bun and python3 (+ any languages you want to use), have the bins at `/usr/bin/bun` and
`/usr/local/bin/python3` or set the corresponding environment variables.
4. (optional) Install the [lld linker](https://lld.llvm.org/)
5. Go to `frontend/`:
1. `npm install`, `npm run generate-backend-client` then `REMOTE=http://localhost:8000 npm run dev`
2. You might need to set some extra heap space for the node runtime
`export NODE_OPTIONS="--max-old-space-size=4096"`
3. Create an empty `frontend/build` folder using `mkdir frontend/build`
6. Go to `backend/`:
1. `env DATABASE_URL=<YOUR_DATABASE_URL> RUST_LOG=info cargo run`
2. You can specify any feature flag you want to enable, for example `cargo run --features python` to enable the python executor.
7. Windmill should be available at `http://localhost:3000`
All other variables (database pool, queue, runtimes, private registries, certificates, zombie jobs and more) are documented in the [environment variables reference](https://www.windmill.dev/docs/core_concepts/environment_variables).
## Contributing
@@ -337,11 +313,7 @@ At this time, we are not seeking outside contribution. Bug reports and feature r
welcome, and small, trivially-verified PRs that fix a problem are still accepted. See
[CONTRIBUTING.md](./CONTRIBUTING.md) for the full policy.
## Contributors
<a href="https://github.com/windmill-labs/windmill/graphs/contributors">
<img src="https://contrib.rocks/image?repo=windmill-labs/windmill" />
</a>
To run Windmill from source, see [frontend/README_DEV.md](./frontend/README_DEV.md).
## Copyright
+9
View File
@@ -195,6 +195,15 @@ profile:
operatorSettings: { builder_apps: true } # also builder_flows, manage_schedules, manage_triggers
```
A role that builds nothing (no builder rights, `manage_schedules` and `manage_triggers` both
`false`) holds the session in Use, as the chat does in production: the toolset is the
read-only one and the prompt carries the session section that names the role as the reason.
`judgeAssistantText: true` hands the judge what the assistant said alongside the mode's
output. Use it when the deliverable is the answer itself, such as a refusal and where to go
instead: the `global` judge otherwise reads only the drafts, and a substring check cannot tell
"you can't create it yourself" from "create it yourself".
`toolExpect.toolCallArgs` entries support `sharedByAtLeast: <n>`: at least `n` recorded
calls to that tool must carry the same non-blank string in the field. Use it for calls that
have to share an identifier, like two test runs of one chat conversation.
@@ -5,9 +5,17 @@ import type { ChatCompletionMessageParam } from "openai/resources/chat/completio
import type { AIProvider, OperatorSettings } from "$lib/gen/types.gen";
import {
globalToolsFor,
prepareGlobalSystemMessage,
prepareGlobalUserMessage,
} from "../../../../../frontend/src/lib/components/copilot/chat/global/core";
import { assembleGlobalSystemMessage } from "../../../../../frontend/src/lib/components/copilot/chat/global/globalAssembly";
import {
canBuild,
USE_MODE_ACCESS,
} from "../../../../../frontend/src/lib/components/copilot/chat/sessionCapabilities";
import {
FULL_CAPABILITIES,
legacyOperatorCapabilities,
} from "../../../../../frontend/src/lib/roleCapabilities";
import {
clearGlobalDrafts,
getGlobalDraft,
@@ -155,15 +163,24 @@ export async function runGlobalEval(
options.workspaceFixtures ?? {},
);
seedLiveEditorDrafts(workspaceRoot, options.liveEditorDrafts ?? []);
// No deploy rules in the mock workspace, so they always pass.
const access =
// No deploy rules in the mock workspace, so they always pass. The role is read as a server
// that predates workspace roles describes it, from `operator_settings`.
const roleAccess =
options.profile &&
capabilitiesForRole({
isAdmin: false,
operator: options.profile.operator,
deployRulesPass: true,
operatorSettings: options.profile.operatorSettings as OperatorSettings,
capabilities: options.profile.operator
? legacyOperatorCapabilities(
options.profile.operatorSettings as OperatorSettings,
)
: FULL_CAPABILITIES,
});
// A session whose role builds nothing is held in Use, as the chat manager holds it: the
// read-only toolset, and the session section that names the role as the reason.
const heldInUse =
!!options.sessionChat && !!roleAccess && !canBuild(roleAccess);
const access = heldInUse ? USE_MODE_ACCESS : roleAccess;
seedOperatorSettings(workspaceRoot, options.profile);
// Declared out here only so `finally` can reach it; a malformed fixture throws while
// building it, and everything seeded above still has to be torn down.
@@ -179,7 +196,7 @@ export async function runGlobalEval(
);
}
// Production resolves a profile for session chats only; elsewhere every tool ships.
if (!options.sessionChat && access) {
if (!options.sessionChat && roleAccess) {
throw new Error(
"This case sets runtime.profile, which only a session chat applies — set runtime.sessionChat: true on the case.",
);
@@ -203,10 +220,13 @@ export async function runGlobalEval(
: undefined;
// Pass the seeded identity straight to the prompt builder rather than mutating
// the process-global `userStore`, so concurrent cases never race on it.
const baseSystemMessage = prepareGlobalSystemMessage(undefined, {
const baseSystemMessage = assembleGlobalSystemMessage(undefined, {
user: options.user,
previewTools: options.sessionChat ?? false,
access,
...(heldInUse && {
sessionContext: { workspaceId: workspaceRoot, useMode: "role" as const },
}),
});
const helpers = {
...evalArtifacts.helpers,
+310 -16
View File
@@ -11,8 +11,13 @@ import type {
ListableApp,
ListableResource,
ListableVariable,
Folder,
Group,
QueuedJob,
Resource,
Script
Schedule,
Script,
WorkerPing
} from '../../../frontend/src/lib/gen'
import type {
DataMetric,
@@ -97,6 +102,14 @@ export interface BenchmarkWorkspaceResource {
resource_type: string
value?: Record<string, unknown>
description?: string
/** A database's tables, as `get_db_schema` reads them: schema, table, then column. */
dbSchema?: Record<string, Record<string, Record<string, BenchmarkDbColumn>>>
}
export interface BenchmarkDbColumn {
type: string
required: boolean
default?: string
}
/** A resource type the instance holds. */
@@ -117,6 +130,48 @@ export interface BenchmarkWorkspaceJob {
logs?: string
args?: Record<string, unknown>
result?: unknown
/** Defaults to `completed`. `suspended` is a running flow parked on an approval step. */
state?: 'completed' | 'queued' | 'running' | 'suspended'
tag?: string
schedulePath?: string
/** When the run was created, relative to the case start. Unset = now. */
createdMinutesAgo?: number
/** Completed runs only: how long the run took. */
durationMs?: number
}
/** A worker of the instance, as `list_workers` reports it. */
export interface BenchmarkWorkspaceWorker {
worker: string
worker_group: string
custom_tags?: string[]
lastPingSecondsAgo?: number
jobs_executed?: number
}
/** A folder of the benchmark workspace, as `read_workspace_item` reads it. */
export interface BenchmarkWorkspaceFolder {
name: string
summary?: string
owners?: string[]
/** Who else may use the folder, as `u/<user>` or `g/<group>`: `true` grants write. */
extra_perms?: Record<string, boolean>
}
export interface BenchmarkWorkspaceGroup {
name: string
summary?: string
members?: string[]
}
export interface BenchmarkWorkspaceSchedule {
path: string
/** Six-field cron. */
schedule: string
script_path: string
is_flow?: boolean
enabled?: boolean
summary?: string
}
export interface BenchmarkWorkspaceRunnables {
@@ -133,15 +188,28 @@ export interface BenchmarkWorkspaceRunnables {
ducklakes?: string[]
dataMetrics?: DataMetric[]
jobs?: BenchmarkWorkspaceJob[]
/** The instance's workers. Unset falls through to the real backend's; `[]` is none. */
workers?: BenchmarkWorkspaceWorker[]
schedules?: BenchmarkWorkspaceSchedule[]
folders?: BenchmarkWorkspaceFolder[]
groups?: BenchmarkWorkspaceGroup[]
/** The workspace settings document (`get_workspace_settings` reads it). */
workspaceSettings?: Record<string, unknown>
}
type BenchmarkCompletedJob = CompletedJob & { type: 'CompletedJob' }
type BenchmarkQueuedJob = QueuedJob & { type: 'QueuedJob' }
const benchmarkWorkspaces = new Set<string>()
const benchmarkWorkspaceRunnables = new Map<string, BenchmarkWorkspaceRunnables>()
// Keyed by `${workspace}::${jobId}` so concurrent attempts (or distinct cases)
// can seed the same fixed job id without clobbering each other's entry.
const benchmarkJobs = new Map<string, { workspace: string; job: BenchmarkCompletedJob }>()
const benchmarkJobs = new Map<
string,
{ workspace: string; job: BenchmarkCompletedJob | BenchmarkQueuedJob }
>()
// What set_workspace_settings applied, per workspace, so get_workspace_settings reads it back.
const benchmarkWorkspaceSettings = new Map<string, Record<string, unknown>>()
function benchmarkJobKey(workspace: string, jobId: string): string {
return `${workspace}::${jobId}`
@@ -152,11 +220,12 @@ export function resetBenchmarkMockBackend(): void {
benchmarkWorkspaceRunnables.clear()
benchmarkJobs.clear()
benchmarkDrafts.clear()
benchmarkWorkspaceSettings.clear()
}
// Stand-in for FolderService.createFolder so the global create_folder tool runs in
// memory instead of mutating the real backend. Folders aren't otherwise modelled
// (no folder-listing in evals), so this just echoes the created name.
// memory instead of mutating the real backend. It echoes the name without adding the
// folder to the fixture folders that `listBenchmarkFolders` reads.
export function createBenchmarkFolder(_workspace: string, name: string): string {
return name
}
@@ -180,6 +249,14 @@ export function registerBenchmarkWorkspaceRunnables(
})
// Seed any fixture jobs so list_runs / get_run have data to return.
for (const seed of runnables.jobs ?? []) {
const createdAt =
seed.createdMinutesAgo === undefined
? undefined
: new Date(Date.now() - seed.createdMinutesAgo * 60_000).toISOString()
if (seed.state && seed.state !== 'completed') {
createBenchmarkQueuedJob(workspace, seed, createdAt)
continue
}
createBenchmarkCompletedJob({
workspace,
id: seed.id,
@@ -190,14 +267,24 @@ export function registerBenchmarkWorkspaceRunnables(
label: seed.label,
logs: seed.logs,
args: seed.args,
result: seed.result
result: seed.result,
tag: seed.tag,
schedulePath: seed.schedulePath,
createdAt,
durationMs: seed.durationMs
})
}
if (runnables.workspaceSettings) {
benchmarkWorkspaceSettings.set(workspace, structuredClone(runnables.workspaceSettings))
} else {
benchmarkWorkspaceSettings.delete(workspace)
}
}
export function unregisterBenchmarkWorkspace(workspace: string): void {
benchmarkWorkspaces.delete(workspace)
benchmarkWorkspaceRunnables.delete(workspace)
benchmarkWorkspaceSettings.delete(workspace)
clearBenchmarkDrafts(workspace)
for (const [jobId, entry] of benchmarkJobs.entries()) {
if (entry.workspace === workspace) {
@@ -389,6 +476,15 @@ export function queryBenchmarkResourceTypes(
.slice(0, limit)
}
/** The tables a fixture seeds for a database resource; `null` when it seeds none. */
export function getBenchmarkDbSchemaSeed(
workspace: string,
path: string
): { resourceType: string; schema: NonNullable<BenchmarkWorkspaceResource['dbSchema']> } | null {
const seed = benchmarkWorkspaceRunnables.get(workspace)?.resources?.find((r) => r.path === path)
return seed?.dbSchema ? { resourceType: seed.resource_type, schema: seed.dbSchema } : null
}
/** A seeded resource with its value, as `ResourceService.getResource` returns it. Covers both
* seed kinds, so it agrees with `existsResource` and `listResource` — both of those report AI
* providers too, and a case that lists resources and then reads one by path would otherwise get
@@ -481,18 +577,24 @@ export function createBenchmarkCompletedJob(input: {
id?: string
createdBy?: string
label?: string
tag?: string
schedulePath?: string
createdAt?: string
durationMs?: number
}): string {
const jobId = input.id ?? `benchmark-job-${randomUUID()}`
const now = new Date().toISOString()
const createdAt = input.createdAt ?? new Date().toISOString()
const durationMs = input.durationMs ?? 0
const job: BenchmarkCompletedJob = {
type: 'CompletedJob',
id: jobId,
workspace_id: input.workspace,
created_by: input.createdBy ?? 'ai-evals',
created_at: now,
started_at: now,
completed_at: now,
duration_ms: 0,
created_at: createdAt,
started_at: createdAt,
completed_at: new Date(Date.parse(createdAt) + durationMs).toISOString(),
duration_ms: durationMs,
schedule_path: input.schedulePath,
success: input.success ?? true,
script_path: input.scriptPath,
script_hash: input.scriptHash,
@@ -506,7 +608,7 @@ export function createBenchmarkCompletedJob(input: {
is_skipped: false,
email: 'ai-evals@local',
visible_to_owner: true,
tag: 'benchmark',
tag: input.tag ?? 'benchmark',
labels: input.label ? [input.label] : undefined
}
@@ -517,17 +619,58 @@ export function createBenchmarkCompletedJob(input: {
return jobId
}
/** A run still in the queue: waiting for a worker, running, or a flow parked on an
* approval step (running with a suspend outstanding, as the backend reports it). */
function createBenchmarkQueuedJob(
workspace: string,
seed: BenchmarkWorkspaceJob,
createdAt = new Date().toISOString()
): string {
const jobId = seed.id ?? `benchmark-job-${randomUUID()}`
const started = seed.state === 'running' || seed.state === 'suspended'
const job: BenchmarkQueuedJob = {
type: 'QueuedJob',
id: jobId,
workspace_id: workspace,
created_by: seed.createdBy ?? 'ai-evals',
created_at: createdAt,
scheduled_for: createdAt,
started_at: started ? createdAt : undefined,
running: started,
suspend: seed.state === 'suspended' ? 1 : undefined,
script_path: seed.scriptPath,
schedule_path: seed.schedulePath,
args: seed.args,
logs: seed.logs,
canceled: false,
job_kind: seed.jobKind ?? 'script',
permissioned_as: 'u/ai-evals',
is_flow_step: false,
email: 'ai-evals@local',
visible_to_owner: true,
tag: seed.tag ?? 'benchmark'
}
benchmarkJobs.set(benchmarkJobKey(workspace, jobId), { workspace, job })
return jobId
}
export function getBenchmarkCompletedJob(
workspace: string,
jobId: string
): BenchmarkCompletedJob | null {
const entry = benchmarkJobs.get(benchmarkJobKey(workspace, jobId))
if (!entry) {
if (!entry || entry.job.type !== 'CompletedJob') {
return null
}
return structuredClone(entry.job)
}
/** Any seeded run, finished or not, as `JobService.getJob` returns it. */
export function getBenchmarkJob(workspace: string, jobId: string): Job | null {
const entry = benchmarkJobs.get(benchmarkJobKey(workspace, jobId))
return entry ? (structuredClone(entry.job) as Job) : null
}
/**
* List seeded/recorded jobs for a benchmark workspace, most recent first —
* the shape `JobService.listJobs` returns. Returns `null` for a non-benchmark
@@ -550,7 +693,7 @@ export function listBenchmarkJobs(workspace: string): Job[] | null {
* "not found" error for an unknown id, matching the backend 404.
*/
export function getBenchmarkJobLogs(workspace: string, jobId: string): string {
const job = getBenchmarkCompletedJob(workspace, jobId)
const job = getBenchmarkJob(workspace, jobId)
if (!job) {
throw new Error(`Job Logs not found for "${jobId}"`)
}
@@ -562,7 +705,7 @@ export function getBenchmarkJobLogs(workspace: string, jobId: string): string {
* tree. Fixture jobs are single runs with no steps, so only the root entry.
*/
export function getBenchmarkFlowAllResults(workspace: string, jobId: string) {
const job = getBenchmarkCompletedJob(workspace, jobId)
const job = getBenchmarkJob(workspace, jobId)
if (!job) {
throw new Error(`Job "${jobId}" not found in benchmark workspace`)
}
@@ -575,8 +718,9 @@ export function getBenchmarkFlowAllResults(workspace: string, jobId: string) {
depth: 0,
sibling_index: 1,
sibling_count: 1,
status: job.success ? 'success' : 'failure',
success: job.success
...('success' in job
? { status: job.success ? 'success' : 'failure', success: job.success }
: { status: job.suspend ? 'suspended' : job.running ? 'running' : 'queued' })
}
],
truncated: false,
@@ -584,6 +728,156 @@ export function getBenchmarkFlowAllResults(workspace: string, jobId: string) {
}
}
// ============= Workers, schedules =============
/** Mirror `WorkerService.listWorkers`; `null` when no case seeded workers. Workers name no
* workspace, so this answers from whichever case seeded them: run cases whose worker seeds
* differ one at a time. */
export function listBenchmarkWorkers(): WorkerPing[] | null {
let workers: BenchmarkWorkspaceWorker[] | undefined
for (const workspace of benchmarkWorkspaces) {
workers ??= benchmarkWorkspaceRunnables.get(workspace)?.workers
}
if (!workers) return null
return workers.map((w) => ({
worker: w.worker,
worker_instance: `${w.worker}-instance`,
worker_group: w.worker_group,
custom_tags: w.custom_tags,
last_ping: w.lastPingSecondsAgo ?? 2,
started_at: BENCHMARK_TIMESTAMP,
ip: '10.0.0.1',
jobs_executed: w.jobs_executed ?? 0,
wm_version: 'benchmark'
}))
}
function buildBenchmarkSchedule(workspace: string, s: BenchmarkWorkspaceSchedule): Schedule {
return {
path: s.path,
edited_by: 'benchmark',
edited_at: BENCHMARK_TIMESTAMP,
schedule: s.schedule,
timezone: 'Etc/UTC',
enabled: s.enabled ?? true,
script_path: s.script_path,
is_flow: s.is_flow ?? false,
extra_perms: {},
email: 'ai-evals@local',
summary: s.summary,
workspace_id: workspace
} as unknown as Schedule
}
export function listBenchmarkSchedules(workspace: string): Schedule[] {
return (benchmarkWorkspaceRunnables.get(workspace)?.schedules ?? []).map((s) =>
buildBenchmarkSchedule(workspace, s)
)
}
export function getBenchmarkSchedule(workspace: string, path: string): Schedule | null {
const s = benchmarkWorkspaceRunnables.get(workspace)?.schedules?.find((e) => e.path === path)
return s ? buildBenchmarkSchedule(workspace, s) : null
}
// ============= Folders, groups, workspace settings =============
function buildBenchmarkFolder(workspace: string, f: BenchmarkWorkspaceFolder): Folder {
return {
workspace_id: workspace,
name: f.name,
summary: f.summary,
owners: f.owners ?? [],
extra_perms: f.extra_perms ?? {}
} as Folder
}
export function listBenchmarkFolders(workspace: string): Folder[] {
return (benchmarkWorkspaceRunnables.get(workspace)?.folders ?? []).map((f) =>
buildBenchmarkFolder(workspace, f)
)
}
export function getBenchmarkFolder(workspace: string, name: string): Folder | null {
const f = benchmarkWorkspaceRunnables.get(workspace)?.folders?.find((e) => e.name === name)
return f ? buildBenchmarkFolder(workspace, f) : null
}
export function listBenchmarkGroups(workspace: string): Group[] {
return (benchmarkWorkspaceRunnables.get(workspace)?.groups ?? []).flatMap((g) => {
const group = getBenchmarkGroup(workspace, g.name)
return group ? [group] : []
})
}
export function getBenchmarkGroup(workspace: string, name: string): Group | null {
const g = benchmarkWorkspaceRunnables.get(workspace)?.groups?.find((e) => e.name === name)
return g
? ({
workspace_id: workspace,
name: g.name,
summary: g.summary,
members: g.members ?? [],
extra_perms: {}
} as Group)
: null
}
const DATA_TABLE_DATABASE_TYPES = ['postgresql', 'instance', 'external_instance']
/** Refuse a data table entry the backend's `DataTableDatabase` would not deserialize. */
function assertBenchmarkDataTables(value: unknown): void {
if (value === undefined || value === null) return
const datatables = (value as { datatables?: Record<string, unknown> }).datatables ?? {}
for (const [name, entry] of Object.entries(datatables)) {
const { database, reference } = (entry ?? {}) as {
database?: { resource_type?: unknown; resource_path?: unknown }
reference?: unknown
}
// A fork's pointer at its parent's entry owns no database.
if (reference && !database) continue
if (!DATA_TABLE_DATABASE_TYPES.includes(String(database?.resource_type))) {
throw new Error(
`datatable.datatables.${name}.database.resource_type must be one of ${DATA_TABLE_DATABASE_TYPES.join(', ')}`
)
}
if (typeof database?.resource_path !== 'string' || database.resource_path === '') {
throw new Error(`datatable.datatables.${name}.database.resource_path is required`)
}
}
}
/** Mirror `WorkspaceService.getWorkspaceSettingsDocument`; an unseeded workspace has an
* empty document. */
export function getBenchmarkWorkspaceSettingsDocument(workspace: string): Record<string, unknown> {
return structuredClone(benchmarkWorkspaceSettings.get(workspace) ?? {})
}
/** Mirror `WorkspaceService.applyWorkspaceSettingsDocument` for a partial document: each
* top-level key replaces the stored one, `null` clears it. */
export function applyBenchmarkWorkspaceSettingsDocument(input: {
workspace: string
requestBody: { document: Record<string, unknown>; dry_run?: boolean }
}): {
changes: Array<{ key: string; before: unknown; after: unknown }>
applied: boolean
} {
assertBenchmarkDataTables(input.requestBody.document.datatable)
const current = benchmarkWorkspaceSettings.get(input.workspace) ?? {}
const changes = Object.entries(input.requestBody.document)
.filter(([key, after]) => JSON.stringify(current[key] ?? null) !== JSON.stringify(after ?? null))
.map(([key, after]) => ({ key, before: current[key] ?? null, after: after ?? null }))
if (!input.requestBody.dry_run) {
const next = { ...current }
for (const { key, after } of changes) {
if (after === null) delete next[key]
else next[key] = structuredClone(after)
}
benchmarkWorkspaceSettings.set(input.workspace, next)
}
return { changes, applied: !input.requestBody.dry_run }
}
// ============= Drafts (per-user, DB-backed in production) =============
/**
@@ -85,12 +85,52 @@ vi.mock('@codingame/monaco-vscode-languages-service-override', () => ({
vi.mock('$lib/components/vscode', () => ({}))
// get_db_schema reads a database's tables by running a query job; a benchmark database
// answers with the tables its fixture seeds instead.
vi.mock('$lib/components/apps/components/display/dbtable/metadata', async () => {
const actual = await vi.importActual<any>(
'$lib/components/apps/components/display/dbtable/metadata'
)
const { getBenchmarkDbSchemaSeed } = await import('./mockBackend')
const { stringifySchema } = await import('$lib/components/copilot/lib')
const { resourceTypeToLang } = await import(
'$lib/components/apps/components/display/dbtable/utils'
)
return {
...actual,
getDbSchemas: async (
resourceType: string,
resourcePath: string,
workspace: string | undefined,
...rest: unknown[]
) => {
const seed = workspace ? getBenchmarkDbSchemaSeed(workspace, resourcePath) : null
if (!seed) return actual.getDbSchemas(resourceType, resourcePath, workspace, ...rest)
const dbSchema = {
lang: resourceTypeToLang(seed.resourceType),
schema: seed.schema,
publicOnly: !!seed.schema.public
}
return { ...dbSchema, stringified: stringifySchema(dbSchema) }
}
}
})
vi.mock('$lib/gen', async () => {
const actual = await vi.importActual<any>('$lib/gen')
const {
getBenchmarkAppByPath,
getBenchmarkCompletedJob,
getBenchmarkJob,
getBenchmarkCompletedJobResultMaybe,
listBenchmarkWorkers,
listBenchmarkSchedules,
getBenchmarkSchedule,
listBenchmarkFolders,
getBenchmarkFolder,
getBenchmarkGroup,
listBenchmarkGroups,
getBenchmarkWorkspaceSettingsDocument,
applyBenchmarkWorkspaceSettingsDocument,
getBenchmarkDatatableSchema,
getBenchmarkDatatableMigrationsStatus,
createBenchmarkDatatableMigration,
@@ -175,7 +215,29 @@ vi.mock('$lib/gen', async () => {
createFolder: async (data: { workspace: string; requestBody: { name: string } }) =>
hasBenchmarkWorkspace(data.workspace)
? createBenchmarkFolder(data.workspace, data.requestBody.name)
: actual.FolderService.createFolder(data)
: actual.FolderService.createFolder(data),
listFolders: async (data: { workspace: string }) =>
hasBenchmarkWorkspace(data.workspace)
? listBenchmarkFolders(data.workspace)
: actual.FolderService.listFolders(data),
getFolder: async (data: { workspace: string; name: string }) => {
if (!hasBenchmarkWorkspace(data.workspace)) return actual.FolderService.getFolder(data)
const folder = getBenchmarkFolder(data.workspace, data.name)
if (!folder) throw new Error(`Folder "${data.name}" not found in benchmark workspace`)
return folder
}
}),
GroupService: wrapService(actual.GroupService, {
listGroups: async (data: { workspace: string }) =>
hasBenchmarkWorkspace(data.workspace)
? listBenchmarkGroups(data.workspace)
: actual.GroupService.listGroups(data),
getGroup: async (data: { workspace: string; name: string }) => {
if (!hasBenchmarkWorkspace(data.workspace)) return actual.GroupService.getGroup(data)
const group = getBenchmarkGroup(data.workspace, data.name)
if (!group) throw new Error(`Group "${data.name}" not found in benchmark workspace`)
return group
}
}),
ScriptService: wrapService(actual.ScriptService, {
listScripts: async (data: { workspace: string }) =>
@@ -357,7 +419,7 @@ vi.mock('$lib/gen', async () => {
: actual.JobService.runFlowByPath(data),
getJob: async (data: { workspace: string; id: string }) => {
if (hasBenchmarkWorkspace(data.workspace)) {
const job = getBenchmarkCompletedJob(data.workspace, data.id)
const job = getBenchmarkJob(data.workspace, data.id)
if (!job) {
throw new Error(`Job "${data.id}" not found in benchmark workspace`)
}
@@ -383,6 +445,14 @@ vi.mock('$lib/gen', async () => {
: actual.JobService.getFlowAllResults(data)
}),
WorkspaceService: wrapService(actual.WorkspaceService, {
getWorkspaceSettingsDocument: async (data: { workspace: string }) =>
hasBenchmarkWorkspace(data.workspace)
? getBenchmarkWorkspaceSettingsDocument(data.workspace)
: actual.WorkspaceService.getWorkspaceSettingsDocument(data),
applyWorkspaceSettingsDocument: async (data: any) =>
hasBenchmarkWorkspace(data.workspace)
? applyBenchmarkWorkspaceSettingsDocument(data)
: actual.WorkspaceService.applyWorkspaceSettingsDocument(data),
getCopilotInfo: async (data: { workspace: string }) =>
hasBenchmarkWorkspace(data.workspace)
? (getBenchmarkAiConfig(data.workspace) ?? {})
@@ -436,13 +506,21 @@ vi.mock('$lib/gen', async () => {
? { metrics: listBenchmarkDataMetrics(data.workspace) ?? [] }
: actual.DataMetricService.listDataMetrics(data)
}),
WorkerService: wrapService(actual.WorkerService, {
listWorkers: async (data: Record<string, unknown>) =>
listBenchmarkWorkers() ?? actual.WorkerService.listWorkers(data)
}),
ScheduleService: wrapService(actual.ScheduleService, {
existsSchedule: async (data: { workspace: string; path: string }) =>
hasBenchmarkWorkspace(data.workspace) ? false : actual.ScheduleService.existsSchedule(data),
listSchedules: async (data: { workspace: string }) =>
hasBenchmarkWorkspace(data.workspace) ? [] : actual.ScheduleService.listSchedules(data),
hasBenchmarkWorkspace(data.workspace)
? listBenchmarkSchedules(data.workspace)
: actual.ScheduleService.listSchedules(data),
getSchedule: async (data: { workspace: string; path: string }) => {
if (hasBenchmarkWorkspace(data.workspace)) {
const schedule = getBenchmarkSchedule(data.workspace, data.path)
if (schedule) return schedule
throw new Error(`Schedule "${data.path}" not found in benchmark workspace`)
}
return actual.ScheduleService.getSchedule(data)
+650
View File
@@ -3231,6 +3231,33 @@
- - admin
skipJudge: true
# A role with schedules and triggers withdrawn builds nothing, which holds the session in Use.
# Its user cannot create a script by hand either, so the way forward is an admin, not steps.
- id: global-use-role-script-goes-to-admin
prompt: |-
Write a Python script that checks whether https://status.example.com is up and returns
true or false.
initial: ai_evals/fixtures/frontend/global/initial/operator_ops_scripts.json
runtime:
maxTurns: 6
sessionChat: true
profile:
operator: true
operatorSettings:
manage_schedules: false
manage_triggers: false
validate:
draftCountExactly: 0
assistantExpect:
requiredMentionsAnyOf:
- - admin
judgeAssistantText: true
judgeChecklist:
- the reply puts the refusal on the user's role in this workspace, not only on this session or its mode
- the reply suggests asking a workspace admin, who can create the script or give the role more rights
- the reply does not tell or invite the user to create the script themselves with the role they have now, with steps or with code offered for them to paste in; code offered for an admin to add, or saying they could once an admin grants their role more, is fine
- the reply does not suggest switching this session to Use & build or Plan; saying a role with more rights could build is fine
# An agent from the Agents page is an `ai_agent` resource. Asked about one by name, the model
# has to read it as a resource rather than look for a flow or script of that name.
- id: global-agent-read-as-resource
@@ -3283,3 +3310,626 @@
- Agents page
- agent editor
skipJudge: true
# --- Composer suggestions ---
# The prompts the pills under Home's composer put in the box
# (frontend/src/lib/components/copilot/chat/starter/composerSuggestions.ts), word for word.
# A pill is only worth offering if the session chat can act on its prompt, so each one is
# pinned here against a workspace where the prompt has something to find.
- id: global-composer-run-queue
prompt: |-
Is anything stuck in this workspace's queue? Which jobs are waiting or suspended, and why?
initial: ai_evals/fixtures/frontend/global/initial/composer_incidents.json
runtime:
maxTurns: 10
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- list_runs
- list_workers
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - gpu-renderer
- - refund_approval
- approval
- approve
skipJudge: true
judgeChecklist:
- finds the 12 gpu_render runs queued on the gpu-renderer tag that no connected worker serves
- finds the refund_approval flow suspended on its approval step, and says approving it unblocks it
- id: global-composer-worker-health
prompt: |-
Are the workers healthy and keeping up with the queue? Compare how long jobs wait before they start with how busy each worker group is.
initial: ai_evals/fixtures/frontend/global/initial/composer_incidents.json
runtime:
maxTurns: 10
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- list_workers
- list_runs
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - gpu-renderer
skipJudge: true
judgeChecklist:
- reads the connected workers and the queued runs instead of guessing
- points out that the gpu-renderer runs wait because no worker serves that tag
- id: global-composer-schedules
prompt: |-
Do any schedules in this workspace keep failing? If so, which ones and why?
initial: ai_evals/fixtures/frontend/global/initial/composer_incidents.json
runtime:
maxTurns: 10
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- list_runs
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - charge_cards_every_minute
- - insufficient funds
- declined
skipJudge: true
judgeChecklist:
- names f/billing/charge_cards_every_minute as the failing schedule, not import_orders_hourly
- gives the cause from its runs' logs (card declined, insufficient funds)
- id: global-composer-recent-runs
prompt: |-
Look at the recent runs in this workspace: did any fail, and why? Is anything getting slower?
initial: ai_evals/fixtures/frontend/global/initial/composer_incidents.json
runtime:
maxTurns: 8
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- list_runs
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - charge_cards
- - insufficient funds
- declined
skipJudge: true
judgeChecklist:
- names charge_cards as the failing script and gives the cause from its logs
- does not invent a slowdown the run durations do not show
# The empty-workspace examples, sent as the composer sends them. The workspace holds nothing,
# so the model has to stage what it needs; one answer covers a question about the Slack setup.
- id: global-composer-example-daily-metrics
prompt: |-
Every weekday at 9am, query postgres for yesterday's signups and revenue and post a summary to the #metrics Slack channel
initial: ai_evals/fixtures/frontend/global/initial/user_admin_empty.json
runtime:
maxTurns: 16
sessionChat: true
userAnswers:
- Use placeholders for the postgres and Slack connections, I'll fill them in later
validate:
draftCountAtLeast: 1
toolExpect:
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
judgeChecklist:
- stages a script or flow that queries postgres for the previous day's signups and revenue
- posts the summary to the #metrics Slack channel
- runs it on a schedule at 9am on weekdays only
- id: global-composer-example-refund-approval
prompt: |-
Build a flow that asks for approval in Slack before issuing a refund in Stripe, and only refunds if someone approves
initial: ai_evals/fixtures/frontend/global/initial/user_admin_empty.json
runtime:
maxTurns: 16
sessionChat: true
userAnswers:
- Use placeholders for the Stripe and Slack connections, I'll fill them in later
validate:
requiredDrafts:
- type: flow
valueIncludes:
- suspend
toolExpect:
requiredToolsUsed:
- write_flow
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
judgeChecklist:
- posts an approval request to Slack before any refund is issued
- suspends the flow on an approval step and continues only once someone approves
- issues the refund through Stripe only on approval, never when it is rejected
- id: global-composer-example-ticket-triage
prompt: |-
When a support ticket arrives by webhook, classify its urgency with an LLM and post the urgent ones to the #support Slack channel
initial: ai_evals/fixtures/frontend/global/initial/user_admin_empty.json
runtime:
maxTurns: 16
sessionChat: true
userAnswers:
- Use placeholders for the LLM and Slack connections, I'll fill them in later
validate:
draftCountAtLeast: 1
toolExpect:
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
judgeChecklist:
- stages a script or flow that takes the ticket as the input a webhook delivers
- classifies the ticket's urgency with an LLM call; an `aidecision` step (Windmill's built-in LLM decision, with `choice` or `noul` questions) counts
- posts only the urgent tickets to the #support Slack channel
# The pills that name what an established workspace holds: a teammate's flow, a starred
# script, a connected database and channel.
- id: global-composer-walk-through-flow
prompt: |-
Walk me through what the flow f/billing/charge_customers does, step by step.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 6
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- read_workspace_item
forbiddenToolsUsed:
- write_flow
- patch_flow_json
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - due today
- invoices due
- fetch_due
- - receipt
skipJudge: true
judgeChecklist:
- reads the flow and describes its three steps in order
- id: global-composer-run-favorite
prompt: |-
Run the script f/ops/check_ssl_expiry for me.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
userAnswers:
- windmill.dev
validate:
draftCountExactly: 0
# The script needs a domain the prompt does not give. Opening the run form for the user to
# fill and asking for the domain in chat are both right, so neither is pinned; what is pinned
# is that the deployed script is read and nothing is previewed or written.
toolExpect:
requiredToolsUsed:
- read_workspace_item
forbiddenToolsUsed:
- test_run_script
- write_script
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - domain
# Running produces no draft, and the judge cannot observe runs; validate via tool use.
skipJudge: true
judgeChecklist:
- reads the deployed script and either opens its run form or asks for the domain it needs
- id: global-composer-daily-summary
prompt: |-
Every weekday at 9am, summarize yesterday's activity in the Postgres database f/data/warehouse and post it to Slack with the resource f/team/slack
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 16
sessionChat: true
userAnswers:
- Post it in #metrics, with new signups, new invoices and what they add up to
validate:
draftCountAtLeast: 1
toolExpect:
# "Yesterday's activity" means whatever the tables hold, so they are read first.
requiredToolsUsed:
- get_db_schema
forbiddenToolsUsed:
- deploy_workspace_item
- delete_workspace_item
judgeChecklist:
- queries the warehouse's real tables (signups, invoices) for the previous day through f/data/warehouse
- posts the summary to Slack through the resource f/team/slack; a channel parameter with a default is fine, since the prompt names none
- runs on a schedule at 9am on weekdays only
# Pills that teach the piece a workspace is missing.
- id: global-composer-setup-datatable
prompt: |-
This workspace has no data table yet. Walk me through setting one up in the workspace settings, then show me how a script writes to it.
initial: ai_evals/fixtures/frontend/global/initial/composer_fresh_workspace.json
runtime:
maxTurns: 20
sessionChat: true
userAnswers:
- Back it with the Postgres resource f/data/warehouse and call it main
# Opening the data table settings for the admin and writing them after a confirmation are
# both a way through; either way the script example is what teaches the concept.
toolExpect:
requiredToolsAnyOf:
- - open_page
- set_workspace_settings
forbiddenToolsUsed:
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - datatable(
- datatable()
skipJudge: true
judgeChecklist:
- shows where data tables are set up and a script writing to one with wmill.datatable()
- id: global-composer-store-data
prompt: |-
How should my scripts store data in Windmill? Explain data tables and show me how a script reads and writes one.
initial: ai_evals/fixtures/frontend/global/initial/composer_fresh_workspace.json
runtime:
maxTurns: 8
sessionChat: true
# The pill is for developers: an admin is offered "Set up a data table" instead.
profile:
operator: false
toolExpect:
forbiddenToolsUsed:
- set_workspace_settings
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - datatable(
- datatable()
skipJudge: true
judgeChecklist:
- explains data tables and shows a script reading and writing one with wmill.datatable()
- id: global-composer-connect-slack
prompt: |-
Help me connect Slack to this workspace so my scripts can post messages.
initial: ai_evals/fixtures/frontend/global/initial/composer_fresh_workspace.json
runtime:
maxTurns: 12
sessionChat: true
userAnswers:
- Use a bot token, I will paste it myself
# A Slack resource whose token is a secret variable, or the workspace's own Slack connection
# in settings: both connect Slack, so either path is accepted.
toolExpect:
requiredToolsAnyOf:
- - write_resource
- open_page
forbiddenToolsUsed:
- deploy_workspace_item
skipJudge: true
judgeChecklist:
- stages a Slack resource with its token in a secret variable, or opens the workspace's Slack settings
- id: global-composer-store-secret
prompt: |-
I have an API key my scripts need. Store it as a secret and show me how a script reads it with wmill.getVariable.
initial: ai_evals/fixtures/frontend/global/initial/composer_fresh_workspace.json
runtime:
maxTurns: 10
sessionChat: true
userAnswers:
- It is for the Stripe API; I will paste the value myself
validate:
requiredDrafts:
- type: variable
valueIncludes:
- '"is_secret": true'
toolExpect:
forbiddenToolsUsed:
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - getVariable
- get_variable
- "$var:"
judgeChecklist:
- stages a secret variable with a placeholder value instead of inventing the key
- any example script reads the variable rather than embedding the key; an example given only in the chat is checked separately, so do not score its absence here
# Pills that name what an established workspace holds, read from composer_connected_workspace.
- id: global-composer-explore-datatable
prompt: |-
List the tables in the data table main and tell me what each one holds.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 6
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsAnyOf:
- - list_datatables
- get_datatable_table_schema
assistantExpect:
requiredMentionsAnyOf:
- - feedback
- - onboarding_tasks
skipJudge: true
judgeChecklist:
- names the feedback and onboarding_tasks tables and what each holds
- id: global-composer-app-on-datatable
prompt: |-
Build a full-code app to browse and edit the rows of a table in the data table main.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 30
sessionChat: true
userAnswers:
- The feedback table
validate:
requiredDrafts:
- type: app
toolExpect:
requiredToolsUsed:
- init_app
forbiddenToolsUsed:
- deploy_workspace_item
judgeChecklist:
- builds a full-code app whose backend reads the rows of a table in the main data table through wmill.datatable(); `sql.raw` is the documented way to inline a table or column name
- lets the user edit a row and saves the change back to the table
- id: global-composer-add-app-page
prompt: |-
Add a page to the app f/ops/console, and ask me what it should show.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 24
sessionChat: true
userAnswers:
- A page listing the latest feedback from the main data table
# The pill asks the chat to ask: in chat or through askUserQuestion. A question in chat ends
# the run before the page is written, so the page itself is not pinned.
toolExpect:
requiredToolsAnyOf:
- - read_app_file
- read_workspace_item
forbiddenToolsUsed:
- init_app
- deploy_workspace_item
skipJudge: true
judgeChecklist:
- reads the app, then asks what the new page should show before writing it
- id: global-composer-walk-through-agent
prompt: |-
Walk me through what the AI agent f/support/triage_agent does and which tools it can use.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 6
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- read_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - billing
- - no tools
- any tools
- no tool
skipJudge: true
judgeChecklist:
- explains that the agent labels tickets as billing, bug or question and has no tools
- id: global-composer-channel-in-script
prompt: |-
Show me how a script uses the resource f/team/slack to post a Slack message, with a short example.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
toolExpect:
forbiddenToolsUsed:
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - chat.postMessage
skipJudge: true
judgeChecklist:
- shows a script that takes the f/team/slack resource and posts a message with chat.postMessage
- id: global-composer-postgres-trigger
prompt: |-
Run a script whenever a row is inserted into a table of the Postgres database f/data/warehouse, and explain how Postgres triggers work.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 20
sessionChat: true
userAnswers:
- The signups table
validate:
requiredDrafts:
- type: trigger
triggerKind: postgres
toolExpect:
forbiddenToolsUsed:
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - publication
- replication
judgeChecklist:
- stages a Postgres trigger on f/data/warehouse that fires on inserts, limited to one table rather than every table
- the triggered script takes the inserted row as its input
- id: global-composer-http-endpoint
prompt: |-
Expose the script f/ops/check_ssl_expiry as an HTTP API endpoint that requires a Windmill token, and show me how to call it.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 12
sessionChat: true
# "Expose" asks for a live route, so deploying it, behind the user's confirmation, is right.
validate:
requiredDrafts:
- type: trigger
triggerKind: http
valueIncludes:
- f/ops/check_ssl_expiry
assistantExpect:
requiredMentionsAnyOf:
- - curl
- fetch(
judgeChecklist:
- stages an HTTP route that runs f/ops/check_ssl_expiry and passes it the domain
- the route requires a Windmill token (authentication_method windmill), so it is not public
- how to call it is explained in the chat, which is checked separately; do not score it
- id: global-composer-schedule-script
prompt: |-
Run the script f/ops/check_ssl_expiry every weekday at 9am. Ask me for any input it needs, and explain how schedules work.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 12
sessionChat: true
userAnswers:
- windmill.dev
# The script needs a domain the prompt does not give, so the chat reads the script and asks
# for it: in chat, which ends the run, or with askUserQuestion, which goes on to the schedule.
toolExpect:
requiredToolsUsed:
- read_workspace_item
forbiddenToolsUsed:
- deploy_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - domain
- - cron
- schedule
skipJudge: true
judgeChecklist:
- reads the script, asks for the domain it needs, and explains how schedules work
- id: global-composer-webhook
prompt: |-
How do I start the flow f/billing/charge_customers from another app with its webhook? Show me the URL and an example request.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
validate:
draftCountExactly: 0
assistantExpect:
requiredMentionsAnyOf:
- - jobs/run
- - token
- Authorization
skipJudge: true
judgeChecklist:
- gives the flow's webhook URL and an example request with a token
- id: global-composer-who-can-see
prompt: |-
Who can see and edit the flow f/billing/charge_customers, and why?
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- read_workspace_item
assistantExpect:
requiredMentionsAnyOf:
- - finance
- - bob
skipJudge: true
judgeChecklist:
- explains that access comes from the billing folder - its owner ada, bob with write, the finance group with read
- id: global-composer-operator-what-can-i-run
prompt: |-
Which scripts and flows can I run in this workspace, and what does each one do?
initial: ai_evals/fixtures/frontend/global/initial/operator_ops_scripts.json
runtime:
maxTurns: 6
sessionChat: true
profile:
operator: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsUsed:
- list_workspace_items
assistantExpect:
requiredMentionsAnyOf:
- - list_open_orders
- List open orders
skipJudge: true
judgeChecklist:
- lists the runnable scripts and flows with what each does
- id: global-composer-hub-scripts
prompt: |-
Find scripts on the Windmill Hub for Slack that I could use with the resource f/team/slack.
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsAnyOf:
- - search_hub_scripts
- get_hub_integration
skipJudge: true
judgeChecklist:
- lists Slack scripts from the Hub that take a Slack resource
- id: global-composer-mcp
prompt: |-
How do I connect Claude to this workspace with MCP so it can run my scripts and flows?
initial: ai_evals/fixtures/frontend/global/initial/composer_connected_workspace.json
runtime:
maxTurns: 8
sessionChat: true
validate:
draftCountExactly: 0
toolExpect:
requiredToolsAnyOf:
- - search_docs
- read_docs_page
assistantExpect:
requiredMentionsAnyOf:
- - token
- MCP URL
skipJudge: true
judgeChecklist:
- explains the MCP setup from the docs: the MCP URL with a token, added to Claude
+2
View File
@@ -24,6 +24,7 @@ interface RawEvalCase {
assistantExpect?: EvalCase["assistantExpect"];
judgeChecklist?: string[];
skipJudge?: boolean;
judgeAssistantText?: boolean;
runtime?: EvalCaseRuntimeSpec;
}
export function getRepoRoot(): string {
@@ -54,6 +55,7 @@ export async function loadCases(mode: EvalMode): Promise<EvalCase[]> {
assistantExpect: entry.assistantExpect,
judgeChecklist: entry.judgeChecklist,
skipJudge: entry.skipJudge,
judgeAssistantText: entry.judgeAssistantText,
runtime: entry.runtime,
}));
}
+13
View File
@@ -82,6 +82,19 @@ export const EVAL_MODELS: EvalModelSpec[] = [
model: "opus",
},
},
{
id: "sonnet-5",
label: "Claude Sonnet 5",
aliases: ["sonnet-5", "claude-sonnet-5"],
frontend: {
provider: "anthropic",
model: "claude-sonnet-5",
},
cli: {
runtime: "claude-code",
model: "claude-sonnet-5",
},
},
{
id: "sonnet-5.5",
label: "Claude Sonnet 5.5",
+6 -3
View File
@@ -245,15 +245,18 @@ async function runCaseAttempts<TInitial, TExpected, TActual>(input: {
input.judgeModel !== null &&
!input.evalCase.skipJudge
) {
const output = input.modeRunner.prepareJudgeActual
? input.modeRunner.prepareJudgeActual(run.actual)
: run.actual;
const judge = await judgeOutput({
mode: input.modeRunner.mode,
prompt: input.evalCase.prompt,
checklist: input.evalCase.judgeChecklist,
initial,
expected: input.modeRunner.mode === "cli" ? undefined : expected,
actual: input.modeRunner.prepareJudgeActual
? input.modeRunner.prepareJudgeActual(run.actual)
: run.actual,
actual: input.evalCase.judgeAssistantText
? { assistantReply: run.assistantText, output }
: output,
model: input.judgeModel,
});
+8 -1
View File
@@ -41,7 +41,8 @@ export interface EvalCaseRuntimeSpec {
// refused until the model hands over a plan with exit_plan_mode.
planMode?: boolean;
// Global session chats: the user's rights in the workspace, as production resolves them for
// a session from a non-admin role. Unset means full access.
// a session from a non-admin role. Unset means full access. A role that builds nothing holds
// the session in Use, with the read-only toolset and the session section that says why.
profile?: EvalCaseProfile;
}
@@ -273,6 +274,12 @@ export interface EvalCase {
assistantExpect?: AssistantValidationSpec;
judgeChecklist?: string[];
skipJudge?: boolean;
/**
* The judge also reads what the assistant said, for a case whose deliverable is the answer
* itself: the `global` judge otherwise sees only the drafts. Needs a mode whose runner
* reports `assistantText`.
*/
judgeAssistantText?: boolean;
runtime?: EvalCaseRuntimeSpec;
}
@@ -0,0 +1,313 @@
{
"user": {
"username": "admin",
"is_admin": true
},
"workspace": {
"flows": [
{
"path": "f/billing/charge_customers",
"summary": "Charge customers with due invoices",
"description": "Every night, charges each customer whose invoice is due and emails a receipt.",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"dry_run": {
"type": "boolean",
"default": false
}
},
"required": []
},
"value": {
"modules": [
{
"id": "fetch_due",
"summary": "Fetch invoices due today from the warehouse",
"value": {
"type": "rawscript",
"language": "postgresql",
"content": "-- database f/data/warehouse\nSELECT id, customer_id, amount_cents FROM invoices WHERE due_date = current_date AND paid = false;",
"input_transforms": {
"database": {
"type": "static",
"value": "$res:f/data/warehouse"
}
}
}
},
{
"id": "charge",
"summary": "Charge each invoice",
"value": {
"type": "forloopflow",
"iterator": {
"type": "javascript",
"expr": "results.fetch_due"
},
"skip_failures": false,
"modules": [
{
"id": "charge_one",
"summary": "Charge one invoice through the payment API",
"value": {
"type": "rawscript",
"language": "bun",
"content": "export async function main(invoice: { id: number; amount_cents: number }) {\n const res = await fetch('https://payments.example.com/charge', { method: 'POST', body: JSON.stringify(invoice) })\n if (!res.ok) throw new Error(`charge failed for invoice ${invoice.id}`)\n return await res.json()\n}\n",
"input_transforms": {
"invoice": {
"type": "javascript",
"expr": "flow_input.iter.value"
}
}
}
}
]
}
},
{
"id": "email_receipts",
"summary": "Email a receipt to each charged customer",
"value": {
"type": "rawscript",
"language": "bun",
"content": "// Each charge is what the payment API answered, which carries the customer to email.\nexport async function main(charges: { id: string; customer_id: number }[]) {\n for (const charge of charges) {\n const res = await fetch('https://mail.example.com/receipts', { method: 'POST', body: JSON.stringify(charge) })\n if (!res.ok) throw new Error(`receipt failed for charge ${charge.id}`)\n }\n return { sent: charges.length }\n}\n",
"input_transforms": {
"charges": {
"type": "javascript",
"expr": "results.charge"
}
}
}
}
]
}
}
],
"scripts": [
{
"path": "f/ops/check_ssl_expiry",
"summary": "Check SSL certificate expiry",
"language": "bun",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"domain": {
"type": "string",
"description": "The domain whose certificate to check"
}
},
"required": [
"domain"
]
},
"content": "export async function main(domain: string) {\n const res = await fetch(`https://ssl-check.example.com/${domain}`)\n return await res.json()\n}\n"
}
],
"resources": [
{
"path": "f/data/warehouse",
"resource_type": "postgresql",
"description": "Production warehouse",
"value": {
"host": "db.internal",
"port": 5432,
"dbname": "warehouse",
"user": "windmill",
"password": "$var:f/data/warehouse_password"
},
"dbSchema": {
"public": {
"customers": {
"id": {
"type": "integer",
"required": true
},
"email": {
"type": "text",
"required": true
},
"plan": {
"type": "text",
"required": false
},
"created_at": {
"type": "timestamp",
"required": true,
"default": "now()"
}
},
"invoices": {
"id": {
"type": "integer",
"required": true
},
"customer_id": {
"type": "integer",
"required": true
},
"amount_cents": {
"type": "integer",
"required": true
},
"due_date": {
"type": "date",
"required": true
},
"paid": {
"type": "boolean",
"required": true,
"default": "false"
},
"created_at": {
"type": "timestamp",
"required": true,
"default": "now()"
}
},
"signups": {
"id": {
"type": "integer",
"required": true
},
"email": {
"type": "text",
"required": true
},
"source": {
"type": "text",
"required": false
},
"created_at": {
"type": "timestamp",
"required": true,
"default": "now()"
}
}
}
}
},
{
"path": "f/team/slack",
"resource_type": "slack",
"description": "Team Slack bot",
"value": {
"token": "$var:f/team/slack_token"
}
},
{
"path": "f/support/triage_agent",
"resource_type": "ai_agent",
"description": "Labels incoming support tickets",
"value": {
"provider": {
"kind": "anthropic",
"model": "claude-sonnet-5",
"resource": ""
},
"output_type": "text",
"system_prompt": "Read the support ticket and answer with one label: billing, bug or question.",
"memory": {
"kind": "off"
},
"tools": []
}
}
],
"apps": [
{
"path": "f/ops/console",
"summary": "Ops console",
"value": {
"files": {
"/App.tsx": "import { useState } from 'react'\nimport { backend } from './wmill'\n\nexport default function App() {\n\tconst [domain, setDomain] = useState('')\n\tconst [result, setResult] = useState<unknown>()\n\treturn (\n\t\t<div>\n\t\t\t<h1>Ops console</h1>\n\t\t\t<input value={domain} onChange={(e) => setDomain(e.target.value)} />\n\t\t\t<button onClick={async () => setResult(await backend.check_ssl({ domain }))}>Check SSL</button>\n\t\t\t<pre>{JSON.stringify(result, null, 2)}</pre>\n\t\t</div>\n\t)\n}\n"
},
"runnables": {
"check_ssl": {
"type": "path",
"runType": "script",
"path": "f/ops/check_ssl_expiry",
"fields": {}
}
}
}
}
],
"datatables": [
{
"datatable_name": "main",
"schemas": {
"public": {
"feedback": {
"columns": {
"id": "int4",
"customer_email": "text",
"rating": "int4",
"comment": "text",
"created_at": "timestamptz"
},
"rows": [
{
"id": 1,
"customer_email": "ada@example.com",
"rating": 5,
"comment": "Fast support",
"created_at": "2026-10-01T09:00:00Z"
}
]
},
"onboarding_tasks": {
"columns": {
"id": "int4",
"customer_email": "text",
"task": "text",
"done": "bool"
},
"rows": [
{
"id": 1,
"customer_email": "ada@example.com",
"task": "Connect billing",
"done": false
}
]
}
}
}
}
],
"folders": [
{
"name": "billing",
"summary": "Billing jobs",
"owners": [
"u/ada"
],
"extra_perms": {
"g/finance": false,
"u/bob": true
}
},
{
"name": "ops",
"summary": "Operations",
"owners": [
"u/admin"
],
"extra_perms": {}
}
],
"groups": [
{
"name": "finance",
"summary": "Finance team",
"members": [
"carol",
"dan"
]
}
]
}
}
@@ -0,0 +1,22 @@
{
"user": {
"username": "admin",
"is_admin": true
},
"workspace": {
"resources": [
{
"path": "f/data/warehouse",
"resource_type": "postgresql",
"description": "Production warehouse",
"value": {
"host": "db.internal",
"port": 5432,
"dbname": "warehouse",
"user": "windmill",
"password": "$var:f/data/warehouse_password"
}
}
]
}
}
@@ -0,0 +1,83 @@
{
"workspace": {
"scripts": [
{
"path": "f/billing/charge_cards",
"summary": "Charge cards",
"language": "bash",
"content": "echo \"charging card for customer $1\"\ncurl -sf https://payments.example.com/charge || { echo \"card declined: insufficient funds\" >&2; exit 1; }\n"
},
{
"path": "f/sales/import_orders",
"summary": "Import orders",
"language": "bash",
"content": "echo \"imported $(date +%s) orders\"\n"
},
{
"path": "f/media/gpu_render",
"summary": "GPU render",
"language": "bash",
"content": "echo \"rendering frame\"\n"
}
],
"flows": [
{
"path": "f/billing/refund_approval",
"summary": "Refund approval",
"value": {
"modules": [
{
"id": "a",
"summary": "Ask a manager to approve the refund",
"value": { "type": "rawscript", "language": "bash", "content": "echo \"refund requested\"", "input_transforms": {} },
"suspend": { "required_events": 1, "timeout": 86400 }
},
{
"id": "b",
"summary": "Issue the refund",
"value": { "type": "rawscript", "language": "bash", "content": "echo \"refunded\"", "input_transforms": {} }
}
]
}
}
],
"schedules": [
{ "path": "f/billing/charge_cards_every_minute", "schedule": "0 * * * * *", "script_path": "f/billing/charge_cards", "summary": "Charge pending cards every minute" },
{ "path": "f/sales/import_orders_hourly", "schedule": "0 0 * * * *", "script_path": "f/sales/import_orders", "summary": "Import orders every hour" }
],
"workers": [
{
"worker": "wk-default-7f3a2",
"worker_group": "default",
"custom_tags": ["bash", "python3", "bun", "deno", "go", "flow", "dependency"],
"lastPingSecondsAgo": 3,
"jobs_executed": 214
}
],
"jobs": [
{ "id": "01930000-0000-7000-8000-00000000c001", "scriptPath": "f/billing/charge_cards", "schedulePath": "f/billing/charge_cards_every_minute", "createdBy": "schedule", "success": false, "createdMinutesAgo": 1, "durationMs": 41, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000c002", "scriptPath": "f/billing/charge_cards", "schedulePath": "f/billing/charge_cards_every_minute", "createdBy": "schedule", "success": false, "createdMinutesAgo": 2, "durationMs": 38, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000c003", "scriptPath": "f/billing/charge_cards", "schedulePath": "f/billing/charge_cards_every_minute", "createdBy": "schedule", "success": false, "createdMinutesAgo": 3, "durationMs": 44, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000c004", "scriptPath": "f/billing/charge_cards", "schedulePath": "f/billing/charge_cards_every_minute", "createdBy": "schedule", "success": false, "createdMinutesAgo": 4, "durationMs": 40, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000c005", "scriptPath": "f/billing/charge_cards", "createdBy": "alice", "success": false, "createdMinutesAgo": 30, "durationMs": 52, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000c006", "scriptPath": "f/billing/charge_cards", "createdBy": "alice", "success": false, "createdMinutesAgo": 31, "durationMs": 47, "tag": "bash", "logs": "charging card for customer 4412\ncard declined: insufficient funds\nexit code 1" },
{ "id": "01930000-0000-7000-8000-00000000d001", "scriptPath": "f/sales/import_orders", "schedulePath": "f/sales/import_orders_hourly", "createdBy": "schedule", "success": true, "createdMinutesAgo": 10, "durationMs": 820, "tag": "bash", "logs": "imported 112 orders" },
{ "id": "01930000-0000-7000-8000-00000000d002", "scriptPath": "f/sales/import_orders", "schedulePath": "f/sales/import_orders_hourly", "createdBy": "schedule", "success": true, "createdMinutesAgo": 70, "durationMs": 790, "tag": "bash", "logs": "imported 98 orders" },
{ "id": "01930000-0000-7000-8000-00000000d003", "scriptPath": "f/sales/import_orders", "schedulePath": "f/sales/import_orders_hourly", "createdBy": "schedule", "success": true, "createdMinutesAgo": 130, "durationMs": 805, "tag": "bash", "logs": "imported 104 orders" },
{ "id": "01930000-0000-7000-8000-00000000d004", "scriptPath": "f/sales/import_orders", "createdBy": "bob", "success": true, "createdMinutesAgo": 45, "durationMs": 811, "tag": "bash", "logs": "imported 3 orders" },
{ "id": "01930000-0000-7000-8000-00000000e001", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 22, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e002", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 22, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e003", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 22, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e004", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 21, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e005", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 21, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e006", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 21, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e007", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 20, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e008", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 20, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e009", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 20, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e010", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 19, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e011", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 19, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000e012", "scriptPath": "f/media/gpu_render", "createdBy": "alice", "state": "queued", "createdMinutesAgo": 19, "tag": "gpu-renderer" },
{ "id": "01930000-0000-7000-8000-00000000f001", "scriptPath": "f/billing/refund_approval", "jobKind": "flow", "createdBy": "bob", "state": "suspended", "createdMinutesAgo": 40, "tag": "flow", "logs": "refund requested" }
]
}
}
@@ -0,0 +1,16 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE native_trigger SET connection_path = $1 WHERE workspace_id = $2 AND connection_path = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text",
"Text"
]
},
"nullable": []
},
"hash": "00ac2ddf7c3f6b2c4e9a47c6a237ef9e7e6b6b793147b1752ff07e800415bfa9"
}
@@ -1,23 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value FROM variable WHERE path = $1 AND workspace_id = $2 AND is_secret = true",
"query": "DELETE FROM variable WHERE workspace_id = $1 AND account = ANY($2) RETURNING path",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"name": "path",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text",
"Text"
"Int4Array"
]
},
"nullable": [
false
]
},
"hash": "020c031c3de6c85577e30421ada9d39a5a47ca1b6cf3dbfd6988aa0694d7364c"
"hash": "00b32f6cd59154d9e529c8577072f000ae6cf37928508a82f51d3b3a325f3d1a"
}
@@ -0,0 +1,24 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM variable WHERE workspace_id = $1 AND path = $2 AND account = $3)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text",
"Int4"
]
},
"nullable": [
null
]
},
"hash": "086866581c8f253a611d85cc9464e63767da94af0fcb6d660cd6fb0479b9a99d"
}
@@ -1,12 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value, account, (now() > account.expires_at) as is_expired, is_secret, path from variable\n LEFT JOIN account ON variable.account = account.id WHERE variable.path = $1 AND variable.workspace_id = $2",
"query": "SELECT value::text AS \"value!\", account, (now() > account.expires_at) as is_expired, is_secret, path from variable\n LEFT JOIN account ON variable.account = account.id WHERE variable.path = $1 AND variable.workspace_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"type_info": "Varchar"
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
@@ -36,12 +36,12 @@
]
},
"nullable": [
false,
null,
true,
null,
false,
false
]
},
"hash": "7a92837ad2a1181580c1e0d059fd6bc0ece84d3c315635de52bd2b364c238a71"
"hash": "08af141e847f9bb6a4c26ccad3bd84d2a06b9e55557757d407787078af1ecad7"
}
@@ -1,16 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE account SET refresh_error = $1 WHERE workspace_id = $2 AND id = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Int4"
]
},
"nullable": []
},
"hash": "09e2a19435068f9e9bfd5bcb44b4e283c71729f81550f6f7156ce4970345cc07"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) FROM workspace_settings WHERE ($1::text IS NULL OR workspace_id = $1) AND (\n jsonb_typeof(auto_invite) = 'object' AND COALESCE(auto_invite->>'role',\n CASE WHEN (auto_invite->>'operator')::boolean THEN 'operator' ELSE 'developer' END) = $2\n OR EXISTS (SELECT 1 FROM jsonb_each_text(\n CASE WHEN jsonb_typeof(auto_invite->'instance_groups_roles') = 'object'\n THEN auto_invite->'instance_groups_roles' ELSE '{}'::jsonb END) g\n WHERE g.value = $2))",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "0d419f09cce9f33fecfabc62b17e8848ac8184d61d3f7cde126a56080aef643c"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) FROM workspace_settings WHERE ($1::text IS NOT NULL AND workspace_id = $1\n OR $1::text IS NULL AND NOT COALESCE(role_overrides ? $2, false)) AND (\n auto_invite->>'role' = $2\n OR EXISTS (SELECT 1 FROM jsonb_each_text(\n CASE WHEN jsonb_typeof(auto_invite->'instance_groups_roles') = 'object'\n THEN auto_invite->'instance_groups_roles' ELSE '{}'::jsonb END) g\n WHERE g.value = $2))",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "0d69f5f6d2e3a4b7b801c6feea92a383e841fa7c3f1c5e2849481c6057ab1e84"
}
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_settings SET role_overrides =\n (SELECT role_overrides FROM workspace_settings WHERE workspace_id = $2)\n WHERE workspace_id = $1",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": []
},
"hash": "0d73210f3ce58d0dd8fd850c1df8d16414daad90ad8b0ea35a769d78626039aa"
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT role_overrides FROM workspace_settings WHERE workspace_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "role_overrides",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
true
]
},
"hash": "104b8d267f8f904122973d20629473ac77fad069e7c805cf3c2352bd72f8ffb6"
}
@@ -0,0 +1,24 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM variable v\n JOIN account a ON a.workspace_id = v.workspace_id AND a.id = v.account\n WHERE v.workspace_id = $1 AND v.path = $2 AND a.client = $3\n AND a.is_workspace_integration = true)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "1966a1c4776492599de66d6d189d399c37957f832485156f703f59bd39cdc2bb"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT c.workspace_id, c.agent_path, c.is_default FROM slack_agent_channel c\n JOIN workspace_settings ws ON ws.workspace_id = c.workspace_id\n AND ws.slack_team_id = c.slack_team_id\n WHERE c.slack_team_id = $1 AND c.channel_id = $2 ORDER BY c.agent_path",
"query": "SELECT c.workspace_id, c.agent_path, c.is_default FROM slack_agent_channel c\n JOIN workspace_settings ws ON ws.workspace_id = c.workspace_id\n AND ws.slack_team_id = c.slack_team_id\n WHERE c.slack_team_id = $1 AND c.channel_id = $2\n AND ws.workspace_id = ANY($3)\n ORDER BY c.agent_path",
"describe": {
"columns": [
{
@@ -22,7 +22,8 @@
"parameters": {
"Left": [
"Text",
"Text"
"Text",
"TextArray"
]
},
"nullable": [
@@ -31,5 +32,5 @@
false
]
},
"hash": "44866e040f382b5e12aa21595bd1452aae8ca746348a6ac6b5bba26f5249166f"
"hash": "19b9173fad68c2bde71a70d1ce947c20773dd4c44f19b47e73e24438f5c78ab3"
}
@@ -0,0 +1,17 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE usr SET workspace_role = $1, operator = $2 WHERE username = $3 AND workspace_id = $4",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Bool",
"Text",
"Text"
]
},
"nullable": []
},
"hash": "1c97bf1af258b43fb8dedd3417d0e086996d5fcc3c270e5c1cc9824c30d82726"
}
@@ -1,12 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value, is_secret\n FROM variable\n WHERE path = $1 AND workspace_id = $2",
"query": "SELECT value::text AS \"value!\", is_secret FROM variable WHERE path = $1 AND workspace_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"type_info": "Varchar"
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
@@ -21,9 +21,9 @@
]
},
"nullable": [
false,
null,
false
]
},
"hash": "61f3627cbd2a50b745c4e491ed8ee71e58db22b7f53202c5360a01c92091fc08"
"hash": "1cf81ee935e6e820463820519e3a402d5290b494dac690c9a11f121eeefeab8e"
}
@@ -0,0 +1,47 @@
{
"db_name": "PostgreSQL",
"query": "SELECT v.path, r.created_by AS \"owner?\", true AS \"workspace!\"\n FROM workspace_integrations wi\n JOIN variable v ON v.workspace_id = wi.workspace_id AND v.path = wi.resource_path\n JOIN account a ON a.workspace_id = v.workspace_id AND a.id = v.account\n LEFT JOIN resource r ON r.workspace_id = v.workspace_id AND r.path = v.path\n WHERE wi.workspace_id = $1 AND wi.service_name = $2\n AND a.client = $3 AND a.is_workspace_integration = true",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "path",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "owner?",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "workspace!",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
{
"Custom": {
"name": "native_trigger_service",
"kind": {
"Enum": [
"nextcloud",
"google",
"github"
]
}
}
},
"Text"
]
},
"nullable": [
false,
true,
null
]
},
"hash": "1e0751bef92b5628b8d54448da171d56af87b5b263f8484c886e7f51e0198409"
}
@@ -0,0 +1,52 @@
{
"db_name": "PostgreSQL",
"query": "SELECT\n workspace_invite.workspace_id,\n workspace_invite.email,\n workspace_invite.is_admin,\n workspace_invite.operator,\n COALESCE(workspace_invite.workspace_role, CASE WHEN workspace_invite.operator THEN 'operator' ELSE 'developer' END) AS \"role!\",\n workspace.parent_workspace_id\n FROM workspace_invite JOIN workspace ON workspace_invite.workspace_id = workspace.id\n WHERE workspace_id = $1\n ORDER BY workspace_invite.email",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "workspace_id",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "email",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "is_admin",
"type_info": "Bool"
},
{
"ordinal": 3,
"name": "operator",
"type_info": "Bool"
},
{
"ordinal": 4,
"name": "role!",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "parent_workspace_id",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
false,
false,
false,
null,
true
]
},
"hash": "1fbb8493d20eacea2ac78c4473a85f96bd91de548185238f9fd66ac2b4a1e0a0"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) FROM usr t WHERE ($1::text IS NULL OR t.workspace_id = $1) AND\n COALESCE(t.workspace_role, CASE WHEN t.operator THEN 'operator' ELSE 'developer' END) = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "205f2fb7629382294e53869aa5d2f722f631882929086c453b5825ab4b9c1cb8"
}
@@ -17,7 +17,8 @@
"script",
"flow",
"raw_app",
"asset"
"asset",
"agent"
]
}
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT expires_at FROM account WHERE workspace_id = $1 AND id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "expires_at",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Int4"
]
},
"nullable": [
false
]
},
"hash": "23b2a39e37e93ca9367e954eba94b1a6f432edb76320c50e0d07088937c17a01"
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT user_email FROM mcp_oauth_refresh_token WHERE refresh_token = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_email",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "257b3bc19f738fe36e3c995c5ba239e1f2855cf39f9fe7a92d722732653fd98b"
}
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usr (workspace_id, username, email, is_admin, created_at, operator, disabled, role, workspace_role) SELECT $1, username, email, is_admin, created_at, operator, disabled, role, workspace_role FROM usr WHERE workspace_id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text"
]
},
"nullable": []
},
"hash": "25b09b592b6917214fd7cfabfece48d266b2d5dc11236c2bb41b1a927ede63d8"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n INSERT INTO workspace_integrations (\n workspace_id,\n service_name,\n oauth_data,\n resource_path,\n created_by,\n created_at,\n updated_at\n ) VALUES (\n $1, $2, $3, $4, $5, now(), now()\n )\n ON CONFLICT (workspace_id, service_name)\n DO UPDATE SET\n oauth_data = $3,\n resource_path = $4,\n updated_at = now()\n ",
"query": "\n INSERT INTO workspace_integrations (\n workspace_id,\n service_name,\n oauth_data,\n created_by,\n created_at,\n updated_at\n ) VALUES (\n $1, $2, $3, $4, now(), now()\n )\n ON CONFLICT (workspace_id, service_name)\n DO UPDATE SET\n oauth_data = $3,\n updated_at = now()\n ",
"describe": {
"columns": [],
"parameters": {
@@ -19,11 +19,10 @@
}
},
"Jsonb",
"Text",
"Varchar"
]
},
"nullable": []
},
"hash": "a588f4caa014008b50eccd09122b09f8a098e58791893bacaaf2ff67a30c031c"
"hash": "2602402bedcdbc45cdc0d64a76ce075c6ae51404037b0a7d4d33faf6a7d6a6d8"
}
@@ -0,0 +1,94 @@
{
"db_name": "PostgreSQL",
"query": "SELECT workspace.id, workspace.name, usr.username, workspace_settings.color, workspace.parent_workspace_id,\n workspace.is_dev_workspace, workspace.dev_workspace_label,\n workspace.owner AS \"created_by?\",\n usr.is_admin, usr.operator, usr.workspace_role,\n usr.disabled, usr.is_service_account\n FROM workspace\n JOIN usr ON usr.workspace_id = workspace.id\n JOIN workspace_settings ON workspace_settings.workspace_id = workspace.id\n WHERE usr.email = $1 AND workspace.deleted = false",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "name",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "username",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "color",
"type_info": "Varchar"
},
{
"ordinal": 4,
"name": "parent_workspace_id",
"type_info": "Varchar"
},
{
"ordinal": 5,
"name": "is_dev_workspace",
"type_info": "Bool"
},
{
"ordinal": 6,
"name": "dev_workspace_label",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "created_by?",
"type_info": "Varchar"
},
{
"ordinal": 8,
"name": "is_admin",
"type_info": "Bool"
},
{
"ordinal": 9,
"name": "operator",
"type_info": "Bool"
},
{
"ordinal": 10,
"name": "workspace_role",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "disabled",
"type_info": "Bool"
},
{
"ordinal": 12,
"name": "is_service_account",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
false,
false,
true,
true,
false,
true,
false,
false,
false,
true,
false,
false
]
},
"hash": "2e8a53e73c3b5c2662efd0e2876f168c2f79258fb900199e8575973d5b3d32bb"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n oauth_data as \"oauth_data: sqlx::types::Json<WorkspaceOAuthConfig>\",\n service_name as \"service_name!: ServiceName\",\n resource_path\n FROM\n workspace_integrations\n WHERE\n workspace_id = $1\n ",
"query": "\n SELECT\n oauth_data as \"oauth_data: sqlx::types::Json<WorkspaceOAuthConfig>\",\n service_name as \"service_name!: ServiceName\"\n FROM\n workspace_integrations\n WHERE\n workspace_id = $1\n ",
"describe": {
"columns": [
{
@@ -23,11 +23,6 @@
}
}
}
},
{
"ordinal": 2,
"name": "resource_path",
"type_info": "Text"
}
],
"parameters": {
@@ -37,9 +32,8 @@
},
"nullable": [
true,
false,
true
false
]
},
"hash": "0010ef26da16facd1c2c832601ac687c4c27de46a90f45496b8446af1a9d0578"
"hash": "30b1021260b5ec83a04be1f3dbea08cc81ee85cf98696d9e29a34557587eaf86"
}
@@ -0,0 +1,41 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value::text AS \"value!\", is_secret, description, value_valid_until\n FROM variable\n WHERE workspace_id = $1 AND path = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "is_secret",
"type_info": "Bool"
},
{
"ordinal": 2,
"name": "description",
"type_info": "Varchar"
},
{
"ordinal": 3,
"name": "value_valid_until",
"type_info": "Timestamptz"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null,
false,
false,
true
]
},
"hash": "30f69fd4baef17716d26cc59bf6369d6768972478def50010f680103d7c4281b"
}
@@ -0,0 +1,24 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO variable\n (workspace_id, path, value, is_secret, description, account, is_oauth, expires_at, value_valid_until, labels, edited_by)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Bool",
"Varchar",
"Int4",
"Bool",
"Timestamptz",
"Timestamptz",
"TextArray",
"Varchar"
]
},
"nullable": []
},
"hash": "32c7dba63931c9bd35f82f145d095bcfb8f9400809ade1b173bac05d61bfe77a"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT path, value, is_secret FROM variable WHERE workspace_id = $1",
"query": "SELECT path, value::text AS \"value!\", is_secret FROM variable WHERE workspace_id = $1",
"describe": {
"columns": [
{
@@ -10,8 +10,8 @@
},
{
"ordinal": 1,
"name": "value",
"type_info": "Varchar"
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 2,
@@ -26,9 +26,9 @@
},
"nullable": [
false,
false,
null,
false
]
},
"hash": "b656f38e5f1d6a0799767a775b8550027cf7a3bb202269e8dda92d31bc8789dd"
"hash": "3420c007c141c5d9e3748c18de03d4b51216ba05e2951ce045ff58112c1db361"
}
@@ -0,0 +1,34 @@
{
"db_name": "PostgreSQL",
"query": "SELECT workspace_id, slack_oauth_client_id IS NOT NULL AS \"own_app!\",\n slack_signing_secret\n FROM workspace_settings WHERE slack_team_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "workspace_id",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "own_app!",
"type_info": "Bool"
},
{
"ordinal": 2,
"name": "slack_signing_secret",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
null,
true
]
},
"hash": "35238a186adbe0583010dbe8e298a907f16d9e88f648705f2372dfe7c0523879"
}
@@ -0,0 +1,36 @@
{
"db_name": "PostgreSQL",
"query": "SELECT v.value::text AS \"value!\", a.id AS account_id, a.refresh_token\n FROM variable v\n JOIN account a ON a.workspace_id = v.workspace_id AND a.id = v.account\n WHERE v.workspace_id = $1 AND v.path = $2\n AND a.client = $3 AND a.is_workspace_integration = true",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "account_id",
"type_info": "Int4"
},
{
"ordinal": 2,
"name": "refresh_token",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text",
"Text",
"Text"
]
},
"nullable": [
null,
false,
false
]
},
"hash": "36121d10cb03d45fc14aacd08750fb944a54c1172ffa2b990ba157e676f66f51"
}
@@ -53,7 +53,7 @@
false,
false,
false,
false,
true,
false,
false,
true,
@@ -1,42 +1,62 @@
{
"db_name": "PostgreSQL",
"query": "SELECT client, refresh_token, grant_type, cc_client_id, cc_client_secret, cc_token_url, scopes FROM account WHERE workspace_id = $1 AND id = $2",
"query": "SELECT mcp_server_url, is_workspace_integration, client, refresh_token, grant_type,\n cc_client_id, cc_client_secret, cc_token_url, scopes, expires_at,\n now() > expires_at AS \"expired!\"\n FROM account WHERE workspace_id = $1 AND id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "mcp_server_url",
"type_info": "Text"
},
{
"ordinal": 1,
"name": "is_workspace_integration",
"type_info": "Bool"
},
{
"ordinal": 2,
"name": "client",
"type_info": "Varchar"
},
{
"ordinal": 1,
"ordinal": 3,
"name": "refresh_token",
"type_info": "Varchar"
},
{
"ordinal": 2,
"ordinal": 4,
"name": "grant_type",
"type_info": "Varchar"
},
{
"ordinal": 3,
"ordinal": 5,
"name": "cc_client_id",
"type_info": "Varchar"
},
{
"ordinal": 4,
"ordinal": 6,
"name": "cc_client_secret",
"type_info": "Varchar"
},
{
"ordinal": 5,
"ordinal": 7,
"name": "cc_token_url",
"type_info": "Varchar"
},
{
"ordinal": 6,
"ordinal": 8,
"name": "scopes",
"type_info": "TextArray"
},
{
"ordinal": 9,
"name": "expires_at",
"type_info": "Timestamptz"
},
{
"ordinal": 10,
"name": "expired!",
"type_info": "Bool"
}
],
"parameters": {
@@ -46,14 +66,18 @@
]
},
"nullable": [
true,
false,
false,
false,
false,
true,
true,
true,
true
true,
false,
null
]
},
"hash": "63c48fde8c0c0fff9abffc3be27e9948556b636b70b818cc31c2d50921a27366"
"hash": "3829559733fa087201f935ee10a5cecf2cec4f1646015ed7cf476efaba67707f"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM resource WHERE workspace_id = $1 AND path = $2 AND resource_type = 'ai_agent')",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "392b256dd7f36ec3736fc2f9d564dc198a6b69d62fb244691af0601e542b6ac3"
}
@@ -0,0 +1,19 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usr (workspace_id, username, email, is_admin, operator, added_via, workspace_role) VALUES ($1, $2, $3, false, $4, $5, $6) ON CONFLICT DO NOTHING",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Bool",
"Jsonb",
"Varchar"
]
},
"nullable": []
},
"hash": "3b01c43a828ec5d61ed92a27bdb16b526db8e60887d6279b0e66197da686fbf8"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM script WHERE workspace_id = $1 AND path = $2 AND archived = false AND deleted = false)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "3c951e76bd0d86a488372e54fdfe4f5a2923cff642905c6410267be2eab24853"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n workspace_id,\n service_name AS \"service_name!: ServiceName\",\n oauth_data,\n resource_path,\n created_at,\n updated_at,\n created_by\n FROM\n workspace_integrations\n WHERE\n workspace_id = $1\n AND service_name = $2\n ",
"query": "\n SELECT\n workspace_id,\n service_name AS \"service_name!: ServiceName\",\n oauth_data,\n created_at,\n updated_at,\n created_by\n FROM\n workspace_integrations\n WHERE\n workspace_id = $1\n AND service_name = $2\n ",
"describe": {
"columns": [
{
@@ -31,21 +31,16 @@
},
{
"ordinal": 3,
"name": "resource_path",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "created_at",
"type_info": "Timestamptz"
},
{
"ordinal": 5,
"ordinal": 4,
"name": "updated_at",
"type_info": "Timestamptz"
},
{
"ordinal": 6,
"ordinal": 5,
"name": "created_by",
"type_info": "Varchar"
}
@@ -71,11 +66,10 @@
false,
false,
true,
true,
false,
false,
false
]
},
"hash": "7443ba1f922e190bb9a0ca313847f8d27c35a6ee3aff20157d6285e73aa923ef"
"hash": "3e5bdc2e071fc2f1e3c7971736272f20bb5a0aa921a614bd02898d3f162660c2"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value::text AS \"value!\" FROM variable WHERE workspace_id = $1 AND path = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value!",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "40790b7f44b40b0c64bbabd3bc6c984000e12f33bc1cea460e8f5dd55ea59eec"
}
@@ -0,0 +1,20 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS (SELECT 1 FROM workspace_diff\n WHERE fork_workspace_id = 'wm-fork-renamed' AND kind = 'script'\n AND path = 'u/admin/inline' AND fork_last_event_kind = 'write')",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": []
},
"nullable": [
null
]
},
"hash": "420707b82c44c7a30719c4419bdd3b4382f863d7c84f18af64e1d3930890a210"
}
@@ -0,0 +1,16 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usr (workspace_id, username, email, is_admin, created_at, operator, disabled, role, is_service_account, added_via, workspace_role)\n SELECT $1, username, email, is_admin, created_at, operator, disabled, role, is_service_account,\n CASE WHEN $3 THEN NULL ELSE added_via END, workspace_role\n FROM usr WHERE workspace_id = $2\n AND (NOT $3 OR (NOT operator AND NOT disabled AND NOT is_service_account))\n ON CONFLICT DO NOTHING",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text",
"Bool"
]
},
"nullable": []
},
"hash": "464286216add454cb64dba810d964c4b6a41d96df223b6d3d1d1bc972ab10d42"
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_settings SET variable_expiration_failed_at = NULL\n WHERE workspace_id = $1 AND variable_expiration_failed_at IS NOT NULL\n RETURNING 1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "?column?",
"type_info": "Int4"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
null
]
},
"hash": "4ba98c3b07a3bd2fa51e4ddf93c182b3ac165cb6a343ad616409fa80b4b93484"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT external_id, webhook_token_hash FROM native_trigger WHERE workspace_id = $1 AND service_name = $2",
"query": "SELECT external_id, script_path FROM native_trigger\n WHERE workspace_id = $1 AND service_name = $2 AND connection_path = $3",
"describe": {
"columns": [
{
@@ -10,7 +10,7 @@
},
{
"ordinal": 1,
"name": "webhook_token_hash",
"name": "script_path",
"type_info": "Varchar"
}
],
@@ -28,7 +28,8 @@
]
}
}
}
},
"Text"
]
},
"nullable": [
@@ -36,5 +37,5 @@
false
]
},
"hash": "6c75c89fb215c646f54f2036c40a86a4f4ea8880cc5d0b511aa70b6fd50072c5"
"hash": "4c12e63ddcf4e8cfe2227421db8869c4fb77e2fa3b98d6b054995875f3fd5a10"
}
@@ -0,0 +1,19 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO usr\n (workspace_id, email, username, is_admin, operator, workspace_role)\n VALUES ($1, $2, $3, $4, $5, $6)",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Varchar",
"Varchar",
"Bool",
"Bool",
"Varchar"
]
},
"nullable": []
},
"hash": "4c74a75d99f8d6689470da1d57d3db8bf47f11969a0c026a35a6673574e074d8"
}
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM resource WHERE workspace_id = $1 AND path = ANY($2)",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"TextArray"
]
},
"nullable": []
},
"hash": "4d48a34016cc642fe3b3b24220615a59165009048a7c93942ee2ecd78524fb5a"
}
@@ -0,0 +1,15 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM account WHERE workspace_id = $1 AND id = $2 AND is_workspace_integration = true\n AND NOT EXISTS (SELECT 1 FROM variable WHERE workspace_id = $1 AND account = $2)",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Int4"
]
},
"nullable": []
},
"hash": "51a30b84aedb4852ea78a4bf6a9f7c5090f6ed3b4d9d03fa5b5a827ffa39c635"
}
@@ -0,0 +1,28 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace_integrations (workspace_id, service_name, oauth_data, created_by)\n VALUES ($1, $2, $3, $4)\n ON CONFLICT (workspace_id, service_name) DO NOTHING",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
{
"Custom": {
"name": "native_trigger_service",
"kind": {
"Enum": [
"nextcloud",
"google",
"github"
]
}
}
},
"Jsonb",
"Varchar"
]
},
"nullable": []
},
"hash": "5294237a0bb6b23aed6915f430ac595c6f0d6f215725132fb7ef33bb1847831d"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value AS \"value: sqlx::types::Json<serde_json::Value>\"\n FROM resource WHERE workspace_id = $1 AND path = $2 AND resource_type = 'ai_agent'",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value: sqlx::types::Json<serde_json::Value>",
"type_info": "Jsonb"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
true
]
},
"hash": "56bb398d53c1c54b27fe3b61b866c752ea54871db71a8859311e18bf6b6da82c"
}
@@ -0,0 +1,36 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM native_trigger\n WHERE workspace_id = $1 AND service_name = $2 AND ($3::text[] IS NULL\n OR (external_id, script_path) IN (SELECT * FROM unnest($3::text[], $4::text[])))\n RETURNING webhook_token_hash",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "webhook_token_hash",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text",
{
"Custom": {
"name": "native_trigger_service",
"kind": {
"Enum": [
"nextcloud",
"google",
"github"
]
}
}
},
"TextArray",
"TextArray"
]
},
"nullable": [
false
]
},
"hash": "59e359ec5307da46b7fb75d0a2ada7abd1836ec53fdc8086aa160735843f62b9"
}
@@ -15,7 +15,7 @@
]
},
"nullable": [
null
true
]
},
"hash": "5a219a2532517869578c4504ff3153c43903f929ae5d62fbba12610f89c36d55"
@@ -0,0 +1,29 @@
{
"db_name": "PostgreSQL",
"query": "SELECT\n (SELECT created_by FROM resource WHERE workspace_id = $1 AND path = $2) AS \"owner?\",\n EXISTS(SELECT 1 FROM resource WHERE workspace_id = $1 AND path = $2)\n OR EXISTS(SELECT 1 FROM variable WHERE workspace_id = $1 AND path = $2) AS \"taken!\"",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "owner?",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "taken!",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null,
null
]
},
"hash": "5af4e97b30d968e2b55f9560c6bb1c3f543964d2c05d2f44f0a7716f890a3fce"
}
@@ -1,12 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value, is_secret, path from variable WHERE variable.path = $1 AND variable.workspace_id = $2",
"query": "SELECT value::text AS \"value!\", is_secret, path from variable WHERE variable.path = $1 AND variable.workspace_id = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"type_info": "Varchar"
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
@@ -26,10 +26,10 @@
]
},
"nullable": [
false,
null,
false,
false
]
},
"hash": "1587639f13a1a3ad97bd324df38661f3e846f1992704c86ddad74dea151b0ec4"
"hash": "5d344853a65a2438c87f12124428609933e4363c11455709e1785228abd3366f"
}
@@ -0,0 +1,16 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE account SET\n refresh_token = COALESCE($1, refresh_token),\n expires_at = now() + interval '1 hour',\n refresh_error = NULL\n WHERE workspace_id = $2 AND id = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text",
"Int4"
]
},
"nullable": []
},
"hash": "61c4b826e90badc1307eadfe0c117efc6c8c87ba5542bce9c5f85b1da07e9a4b"
}
@@ -0,0 +1,27 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE workspace_integrations SET resource_path = NULL\n WHERE workspace_id = $1 AND service_name = $2 AND resource_path = $3",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
{
"Custom": {
"name": "native_trigger_service",
"kind": {
"Enum": [
"nextcloud",
"google",
"github"
]
}
}
},
"Text"
]
},
"nullable": []
},
"hash": "649ef6b8facee43bb9ba5e6413099322f13a7db686176c4a717651c1671b1bae"
}
@@ -17,7 +17,8 @@
"script",
"flow",
"raw_app",
"asset"
"asset",
"agent"
]
}
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) FROM workspace_settings WHERE ($1::text IS NULL OR workspace_id = $1) AND (\n auto_invite->>'role' = $2\n OR EXISTS (SELECT 1 FROM jsonb_each_text(\n CASE WHEN jsonb_typeof(auto_invite->'instance_groups_roles') = 'object'\n THEN auto_invite->'instance_groups_roles' ELSE '{}'::jsonb END) g\n WHERE g.value = $2))",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "65acc5b9322f03266079ea6051535168e2cd0e627e3bbff413e38f8a3c616aa0"
}
@@ -0,0 +1,28 @@
{
"db_name": "PostgreSQL",
"query": "SELECT slack_oauth_client_id IS NOT NULL AS \"own_app!\",\n slack_signing_secret IS NOT NULL AS \"own_secret!\"\n FROM workspace_settings WHERE workspace_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "own_app!",
"type_info": "Bool"
},
{
"ordinal": 1,
"name": "own_secret!",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
null,
null
]
},
"hash": "68d95ce32653dece237bbf21459b571b8b67d26ffb60dd21e558dfa10612a0ed"
}
@@ -1,12 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value, is_secret FROM variable WHERE path = $1",
"query": "SELECT value::text AS \"value!\", is_secret FROM variable WHERE path = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"type_info": "Varchar"
"name": "value!",
"type_info": "Text"
},
{
"ordinal": 1,
@@ -20,9 +20,9 @@
]
},
"nullable": [
false,
null,
false
]
},
"hash": "0c2e53960dc7786c848079b155e62994d4a861f1dbb9752c0a27428d83040e13"
"hash": "698758d7ef61b3f1de00088a36fe9f2e94c1c25b02bf324a730e4f734eb61c16"
}
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM variable WHERE account = $1 AND workspace_id = $2)",
"query": "SELECT EXISTS(SELECT 1 FROM variable WHERE workspace_id = $1 AND path = $2)",
"describe": {
"columns": [
{
@@ -11,7 +11,7 @@
],
"parameters": {
"Left": [
"Int4",
"Text",
"Text"
]
},
@@ -19,5 +19,5 @@
null
]
},
"hash": "7aa589db3199d7f727cc69e63e1281b7ed329ff0c9d1617747f4ccd6014720cf"
"hash": "6be4bf59c404d2f557d1106c48c320bb3eff65255a44bd66799ae14288312ba4"
}
@@ -0,0 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace_diff\n (source_workspace_id, fork_workspace_id, path, kind, ahead, behind, has_changes)\n VALUES\n ('test-workspace', 'wm-fork-secrets', 'u/test-user/same', 'variable', 1, 1, NULL),\n ('test-workspace', 'wm-fork-secrets', 'u/test-user/different', 'variable', 1, 1, NULL)\n ON CONFLICT (source_workspace_id, fork_workspace_id, path, kind)\n DO UPDATE SET ahead = 1, behind = 1, has_changes = NULL",
"describe": {
"columns": [],
"parameters": {
"Left": []
},
"nullable": []
},
"hash": "6d856cdf841aa6fb95d82841da3b28d5c5aac9608e8f60e5b76be177e4e105b1"
}
@@ -1,16 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "UPDATE account SET\n refresh_token = $1,\n expires_at = now() + interval '1 hour',\n refresh_error = NULL\n WHERE workspace_id = $2 AND client = $3 AND is_workspace_integration = true",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text",
"Text"
]
},
"nullable": []
},
"hash": "6e83478011a8f65bf294ad7886139369e386f6a552c6626be48ecaa0e5ab78a7"
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "SELECT user_email FROM mcp_oauth_server_code WHERE code = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "user_email",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "706872f05247a7d26fcd1b40b129f2defef86f8139dc4e38ae3bf63db039c48b"
}
@@ -0,0 +1,18 @@
{
"db_name": "PostgreSQL",
"query": "DELETE FROM workspace_invite WHERE\n workspace_id = $1 AND email = $2 AND is_admin = $3\n AND ($5::text IS NOT NULL OR operator = $4)\n AND ($5::text IS NULL OR $5 = COALESCE(workspace_role, CASE WHEN operator THEN 'operator' ELSE 'developer' END))",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Text",
"Text",
"Bool",
"Bool",
"Text"
]
},
"nullable": []
},
"hash": "729852e65e4cf22c474850d46a2065a203ca86b40e8388db963c183ac8fb4fd6"
}
@@ -1,21 +1,21 @@
{
"db_name": "PostgreSQL",
"query": "SELECT value, is_secret, description\n FROM variable\n WHERE workspace_id = $1 AND path = $2",
"query": "DELETE FROM workspace_invite WHERE workspace_id = $1 AND email = $2 RETURNING is_admin, operator, workspace_role",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "value",
"type_info": "Varchar"
"name": "is_admin",
"type_info": "Bool"
},
{
"ordinal": 1,
"name": "is_secret",
"name": "operator",
"type_info": "Bool"
},
{
"ordinal": 2,
"name": "description",
"name": "workspace_role",
"type_info": "Varchar"
}
],
@@ -28,8 +28,8 @@
"nullable": [
false,
false,
false
true
]
},
"hash": "2d5ff8fc102ae0c452c1f9cd5cd30fd0a3b4e6e746c659da1767edafd139d45e"
"hash": "72bc3795182333d203b4731defb400a6fa59e8a88bebd6e63437e9cb4c491333"
}
@@ -0,0 +1,41 @@
{
"db_name": "PostgreSQL",
"query": "SELECT username, is_admin, operator, workspace_role FROM usr WHERE\n email = $1 AND workspace_id = $2 AND disabled = false",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "username",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "is_admin",
"type_info": "Bool"
},
{
"ordinal": 2,
"name": "operator",
"type_info": "Bool"
},
{
"ordinal": 3,
"name": "workspace_role",
"type_info": "Varchar"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
false,
false,
false,
true
]
},
"hash": "7341d832643627cdc33a6eefbca5844a0fbb10fb79e25a604eeb0d83d2122d96"
}
@@ -0,0 +1,23 @@
{
"db_name": "PostgreSQL",
"query": "SELECT COUNT(*) FROM workspace_invite t WHERE ($1::text IS NOT NULL AND t.workspace_id = $1\n OR $1::text IS NULL AND NOT EXISTS (SELECT 1 FROM workspace_settings ws\n WHERE ws.workspace_id = t.workspace_id AND ws.role_overrides ? $2)) AND\n COALESCE(t.workspace_role, CASE WHEN t.operator THEN 'operator' ELSE 'developer' END) = $2",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "count",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
null
]
},
"hash": "74190dc8f1049b61adfcefe19df069204bfc974a55da927658947f3e335da3f5"
}
@@ -0,0 +1,214 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n workspace_id,\n slack_team_id,\n teams_team_id,\n teams_team_name,\n teams_team_guid,\n slack_name,\n slack_command_script,\n teams_command_script,\n slack_email,\n slack_oauth_client_id,\n slack_oauth_client_secret,\n customer_id,\n plan,\n webhook,\n ai_config,\n dbt_warehouses,\n large_file_storage,\n datatable,\n ducklake,\n git_sync,\n deploy_ui,\n default_app,\n default_scripts,\n mute_critical_alerts,\n color,\n operator_settings,\n git_app_installations,\n auto_invite,\n error_handler,\n success_handler,\n variable_expiration_handler,\n public_app_execution_limit_per_minute,\n error_handler_fallback_to_instance_alerts\n FROM\n workspace_settings\n WHERE\n workspace_id = $1\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "workspace_id",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "slack_team_id",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "teams_team_id",
"type_info": "Text"
},
{
"ordinal": 3,
"name": "teams_team_name",
"type_info": "Text"
},
{
"ordinal": 4,
"name": "teams_team_guid",
"type_info": "Text"
},
{
"ordinal": 5,
"name": "slack_name",
"type_info": "Varchar"
},
{
"ordinal": 6,
"name": "slack_command_script",
"type_info": "Varchar"
},
{
"ordinal": 7,
"name": "teams_command_script",
"type_info": "Text"
},
{
"ordinal": 8,
"name": "slack_email",
"type_info": "Varchar"
},
{
"ordinal": 9,
"name": "slack_oauth_client_id",
"type_info": "Varchar"
},
{
"ordinal": 10,
"name": "slack_oauth_client_secret",
"type_info": "Varchar"
},
{
"ordinal": 11,
"name": "customer_id",
"type_info": "Varchar"
},
{
"ordinal": 12,
"name": "plan",
"type_info": "Varchar"
},
{
"ordinal": 13,
"name": "webhook",
"type_info": "Text"
},
{
"ordinal": 14,
"name": "ai_config",
"type_info": "Jsonb"
},
{
"ordinal": 15,
"name": "dbt_warehouses",
"type_info": "Jsonb"
},
{
"ordinal": 16,
"name": "large_file_storage",
"type_info": "Jsonb"
},
{
"ordinal": 17,
"name": "datatable",
"type_info": "Jsonb"
},
{
"ordinal": 18,
"name": "ducklake",
"type_info": "Jsonb"
},
{
"ordinal": 19,
"name": "git_sync",
"type_info": "Jsonb"
},
{
"ordinal": 20,
"name": "deploy_ui",
"type_info": "Jsonb"
},
{
"ordinal": 21,
"name": "default_app",
"type_info": "Varchar"
},
{
"ordinal": 22,
"name": "default_scripts",
"type_info": "Jsonb"
},
{
"ordinal": 23,
"name": "mute_critical_alerts",
"type_info": "Bool"
},
{
"ordinal": 24,
"name": "color",
"type_info": "Varchar"
},
{
"ordinal": 25,
"name": "operator_settings",
"type_info": "Jsonb"
},
{
"ordinal": 26,
"name": "git_app_installations",
"type_info": "Jsonb"
},
{
"ordinal": 27,
"name": "auto_invite",
"type_info": "Jsonb"
},
{
"ordinal": 28,
"name": "error_handler",
"type_info": "Jsonb"
},
{
"ordinal": 29,
"name": "success_handler",
"type_info": "Jsonb"
},
{
"ordinal": 30,
"name": "variable_expiration_handler",
"type_info": "Jsonb"
},
{
"ordinal": 31,
"name": "public_app_execution_limit_per_minute",
"type_info": "Int4"
},
{
"ordinal": 32,
"name": "error_handler_fallback_to_instance_alerts",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false,
true,
true,
true,
true,
true,
true,
true,
false,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
true,
false,
true,
true,
true,
true,
true,
false
]
},
"hash": "74742f785888f280bf1d7e28793150c3ddc2fd4be3b8c682f6faa7b917387593"
}
@@ -0,0 +1,28 @@
{
"db_name": "PostgreSQL",
"query": "SELECT slack_oauth_client_id IS NOT NULL AS \"own_app!\", slack_signing_secret\n FROM workspace_settings WHERE workspace_id = $1",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "own_app!",
"type_info": "Bool"
},
{
"ordinal": 1,
"name": "slack_signing_secret",
"type_info": "Text"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
null,
true
]
},
"hash": "74e6d61f31897d8102fe75bbe44781a71aeba34da94b9b1aa9893c2837d5cb05"
}
@@ -0,0 +1,35 @@
{
"db_name": "PostgreSQL",
"query": "SELECT EXISTS(SELECT 1 FROM native_trigger\n WHERE workspace_id = $1 AND service_name = $2 AND connection_path = $3)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
{
"Custom": {
"name": "native_trigger_service",
"kind": {
"Enum": [
"nextcloud",
"google",
"github"
]
}
}
},
"Text"
]
},
"nullable": [
null
]
},
"hash": "74f9031593b6c55819508fa32310e465c202fa3784fd179bcd8963217327a03b"
}
@@ -1,15 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "INSERT INTO workspace_settings (workspace_id, slack_team_id, slack_name, slack_command_script, slack_email, customer_id, plan, webhook, ai_config, large_file_storage, git_sync, default_app, default_scripts, deploy_ui, mute_critical_alerts, color, operator_settings, teams_command_script, teams_team_id, teams_team_name, git_app_installations, ducklake, dbt_warehouses, slack_oauth_client_id, slack_oauth_client_secret, datatable, teams_team_guid, auto_invite, error_handler, success_handler, public_app_execution_limit_per_minute, error_handler_fallback_to_instance_alerts, guest_access_enabled, guest_jwt_public_key, guest_jwt_jwks_url) SELECT $1, slack_team_id, slack_name, slack_command_script, slack_email, customer_id, plan, webhook, ai_config, large_file_storage, git_sync, default_app, default_scripts, deploy_ui, mute_critical_alerts, color, operator_settings, teams_command_script, teams_team_id, teams_team_name, git_app_installations, ducklake, dbt_warehouses, slack_oauth_client_id, slack_oauth_client_secret, datatable, teams_team_guid, auto_invite, error_handler, success_handler, public_app_execution_limit_per_minute, error_handler_fallback_to_instance_alerts, guest_access_enabled, guest_jwt_public_key, guest_jwt_jwks_url FROM workspace_settings WHERE workspace_id = $2",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Varchar",
"Text"
]
},
"nullable": []
},
"hash": "77d599e4f7c574dffac4824f37127c7ae2ef5f27d665ad9018f5cdea0f6f2cb1"
}
@@ -1,12 +1,12 @@
{
"db_name": "PostgreSQL",
"query": "SELECT resource_path FROM workspace_integrations WHERE workspace_id = $1 AND service_name = $2",
"query": "SELECT EXISTS(SELECT 1 FROM native_trigger WHERE workspace_id = $1 AND service_name = $2)",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "resource_path",
"type_info": "Text"
"name": "exists",
"type_info": "Bool"
}
],
"parameters": {
@@ -27,8 +27,8 @@
]
},
"nullable": [
true
null
]
},
"hash": "993e514229a1d508a44ef07b4399f9697cdefaa1f45ca665f72bc6fcf2797c7e"
"hash": "78954c7a6d38ae9d094f77bb255ae235c9b3083b4c179f819c927342bc58651f"
}
@@ -0,0 +1,35 @@
{
"db_name": "PostgreSQL",
"query": "SELECT v.path, r.created_by AS \"owner?\", false AS \"workspace!\"\n FROM variable v\n JOIN account a ON a.workspace_id = v.workspace_id AND a.id = v.account\n LEFT JOIN resource r ON r.workspace_id = v.workspace_id AND r.path = v.path\n WHERE v.workspace_id = $1 AND a.client = $2 AND a.is_workspace_integration = true\n ORDER BY v.path",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "path",
"type_info": "Varchar"
},
{
"ordinal": 1,
"name": "owner?",
"type_info": "Varchar"
},
{
"ordinal": 2,
"name": "workspace!",
"type_info": "Bool"
}
],
"parameters": {
"Left": [
"Text",
"Text"
]
},
"nullable": [
false,
true,
null
]
},
"hash": "79ac4fcf66d90ad793ecdc0906203654e796f71a876ea6d6ebf08c4f65b2156e"
}

Some files were not shown because too many files have changed in this diff Show More