* feat(settings): add unsaved changes warning on windmill ai tab
Add dialog to warn users when leaving the Windmill AI settings tab with
unsaved changes, allowing them to save or cancel their changes.
Changes:
- Track initial AI config state in workspace settings
- Compare current vs initial state to detect unsaved changes
- Integrate UnsavedConfirmationModal with beforeNavigate guard
- Update initial state after successful save via onSave callback
Implements request from issue #6812🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* also confirm on tab changes
* fix
* fix
* fix
* clean tabs usage
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* chore(mcp): display API endpoint tools in MCP URL generation
- Add list of 24 API endpoint tools that are always available via MCP
- Display API endpoints as green badges below scripts/flows list
- Update tooltip to mention 'scripts, flows, and API endpoints'
- Show count of available API endpoints in the UI
API endpoints include operations for variables, resources, scripts, flows,
jobs, schedules, and workers.
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* better
* nit
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat: Add back apply code button in CodeDisplay for non-diff-based providers
- Added apply button that shows only in script mode for non-diff-based providers
- Button allows applying code directly to the current editor
- Only shows for providers that don't support diff-based editing (excludes openai, anthropic, googleai, azure_openai)
Fixes#6799
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* better
* not only for non diff providers
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
* feat: allow setting custom cors header on http trigger
* preflight
* headers one by one
* perf: optimize conditional_cors_middleware by checking existing headers first
Improves performance by iterating through existing headers once and using
flags to track which CORS headers need to be inserted, avoiding unnecessary
header lookups for the common case where headers are not present
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: use not_insert flags in conditional_cors_middleware for clarity
Changed the conditional_cors_middleware logic to use not_insert_* flags
instead of needs_* flags as suggested, which better represents the intent
when iterating through existing headers first.
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* use own folder for memory
* fixes
* better chat interface
* fix export tab
* move in folder
* dont show flow graph if chat mode
* fix
* fix too long title
* fix user message
* fix
* fix
* remove from server
* cleaner
* cleaning
* cleaning
* cleaning
* fix: show that user is disabled in workspacelist
* Update SQLx metadata
---------
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* add toggle option + chat interface
* backend impl
* draft
* put info in schema
* Revert "backend impl"
This reverts commit c534eeb49986424e2c12e2c5642be4e17ba380d1.
* chat interface in flow input
* cleaning
* add logic for running flow + styling
* handle historic args
* fix frontend changes
* add tables
* add conv list
* add endpoints
* adapt frontend
* list message logic
* save message in db
* save response in db
* cleaning
* better migrations
* refresh on new conv
* better logic for messages
* nit
* genere conversation uuid from frontend
* store chat mode info in flow status
* better ui for chat
* collapse chat
* ui
* infinite scroll on convs
* infinite scroll on messages
* fix ui
* new chat entry on new
* cleaning
* change setting logic
* fix test logic from flow input
* move toggle to input
* add warning modal when enabling chat mode
* add summary and explanation on inline script
* add hint for chat mode on user_message desc
* show chat message instead of input in graph
* add warning for triggers
* one logo when not expanded
* use infinitelist for conversations
* add warning when deployment in progress
* full width button
* better icon for menu
* better input + nits
* put toggle in action
* use waitjob
* cleaning
* cleaning
* scroll on new + cleaning
* use enum
* fix logic
* full screen
* cleaning
* exit on updatesqlx error
* Update SQLx metadata
* fix
* cleaning
* add for wait result endpoint
* add missing drop
* delete cascade
* fix: use macro version of query_as in flow_conversations.rs
Use sqlx::query_as! macro instead of query_as function for compile-time
SQL validation and better type safety
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: update comment to clarify conversation message update condition
The comment now accurately reflects that the update happens when
it's a flow and it's done (flow_is_done)
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: only parse chat_input_enabled if conditions are met
Move the parse_chat_input_enabled() call inside the condition check
to avoid unnecessary parsing when the flow is not done or unsuccessful
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: use the same transaction for conversation creation
Pass transaction to get_or_create_conversation_with_id instead of
creating a new one, ensuring all operations are atomic
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: remove update trigger and handle updated_at in application code
Remove the database trigger that automatically updates conversation
timestamp and instead update it explicitly when creating messages.
This gives better control and consistency.
Co-authored-by: centdix <centdix@users.noreply.github.com>
* Update SQLx metadata
* cleaning
* feat(aiagent): handle memory (#6719)
* implement memory
* s3 logic for memory
* fix typo
* much cleaner
* cleaning
* cleaning
* only if chat
* display nit
* nit
* fix stack overflow
* cleaning
* use len arg from input
* cleaning
* change order
* delete memory when conv deleted
* cleaning
* nit
* show description in expr mode
* opti
* opti
* updatee ref
* store string as simple string
* use markdown
* do not wait for deletion
* add delete loading
* fix logic
* fix markdown
* Update ee-repo-ref.txt
* Update SQLx metadata
* fix in test interface
* nit
* nit
* fix layout
* use memory_id to store memory
* shorter description
* rls + grant
* fix text overflow
* extract output from res
* cleaning
* handle streaming
* cleaning
* fix tool error
* nit
* update ref
* fix
* Update SQLx metadata
* nit
---------
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* NULL toggle in InsertRow
* fix long type parsing in postgres
* nits
* graphite catch
* lazy_static
* support for time/timestamp/tz long forms in pg parser
* graphite suggestion
* Fix tutorial basic
* fix other tutorials
* nit fix bug with button shrinking
* tutorial works backwards
* nit delete field on prev
* remove empty app duplication and magic code
* fix norefreshbar auto binding to false, making app dirty
* fix and improve app tutorial
* fix background runnable tutorial scroll
* fix connection tutorial
* mistake
* isCurrentlyInTutorial global state
* disable component navigation when in tutorial
* ci
* filter out tools with too long names
* do not advertise tool change ability
* add comment
* use id for names
* Revert "use id for names"
This reverts commit 40958cd861.
* use trunc suffix
* cleaning
* feat(backend): job result stream optimization
* get offset locally instead of from db
* fix: agent worker result stream
* update ref
* nit
* remove foreign key on job
* fix build
* Revert "use diffs based edits"
This reverts commit 4ef6bce562.
* feat(aichat): use diff-based edits for OpenAI/Anthropic providers, whole code for others
- Check the current model provider at runtime
- Use diff-based approach (with diffs array) for OpenAI and Anthropic
- Use whole code replacement for all other providers
- Update tool definition to support both parameters
- Update system prompt with conditional instructions based on provider
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix
* cleaning
* cleaning
* cleaning
* cleaning
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
* Implement array expression helper for number arrays in JS mode
- Add showArrayExprPicker state to manage helper UI
- Add shouldShowArrayHelper() to check conditions (JS mode + number array)
- Add 'Add item' button that shows picker UI when clicked
- Implement picker row with disabled input, FlowPlugConnect, and Cancel button
- Connect callback sets array expression [property] and updates Monaco editor
- Include helpful text and proper cleanup on cancel/connect
* Enhance array expression helper to append items to existing arrays
- Check if current expr is already an array expression [...]
- If it is, append new item to existing content: [existing, newItem]
- If not or empty, create new array with single item: [newItem]
- Update helper text to reflect append behavior
- Maintains backward compatibility with non-array expressions
* Add S3 resource array helper for JavaScript mode
- Add shouldShowS3ArrayHelper() function to detect S3 resource arrays
- Show direct FlowPlugConnect for S3 arrays instead of Add item button
- Apply same append logic: add to existing array or create new one
- Include helpful text explaining S3 resource connection
- Support both s3_object and s3object resourceType variants
* Add S3 resource catalog helper for static mode arrays
- Add shouldShowS3ArrayStaticHelper() to detect S3 arrays in static mode
- Show 'Add an object from the catalog' button below static S3 array inputs
- Button switches to JavaScript mode and immediately activates connect mode
- Sets initial empty array [] then replaces with [selectedPath] when connected
- Includes helpful text explaining the mode switch and connection
* Fix reactivity issue when switching from static to JS mode
- Make button click handler async and await tick() before activating connect mode
- Add Monaco editor update after setting expression in connect callback
- Use tick().then() to ensure Monaco is available before calling setCode()
- This ensures the SimpleEditor displays the new array expression immediately
* Add plug icon to 'Add object from an expression' button
- Import Plug icon from lucide-svelte
- Add startIcon with Plug to the S3 array static helper button
- Makes the button visually consistent with other connection-related UI elements
* Unify S3 resource button style across static and JS modes
- Replace 'Add S3 resource:' text + FlowPlugConnect with consistent Button style
- Use same variant, color, size, and plug icon as static mode button
- Maintain same functionality but with unified visual appearance
- Both S3 helpers now use identical button styling
* Consolidate and clean up array expression helpers
- Extract appendPathToArrayExpr() to eliminate duplicate array building logic
- Add switchToJsAndConnect() helper for consistent mode switching flow
- Add emitChange() and updateEditor() utilities for consistent updates
- Add safety reset of showArrayExprPicker when switching away from JS mode
- Reduce code duplication across number and S3 array helpers
- Improve maintainability and consistency
* Remove number array helper functionality
- Remove shouldShowArrayHelper() function for number arrays
- Remove showArrayExprPicker state variable and related UI
- Remove number array 'Add item' button and picker interface
- Keep only S3 resource array helpers (static and JS modes)
- Clean up unused safety reset logic for array picker
* Create reusable S3ArrayHelperButton component
- Extract S3 array helper button into dedicated component
- Add consistent styling with Plug icon and configurable label
- Replace both static and JavaScript mode button implementations
- Reduce code duplication and improve maintainability
- Component dispatches click event for parent handling
* cleaning
* Hide S3ArrayHelperButton when in connect mode
- Add connecting prop to S3ArrayHelperButton component
- Hide button when connecting is true to avoid UI clutter
- Pass connecting state from InputTransformForm to both button instances
- Improves UX by removing unnecessary button when plug is already active
* cleaning
* cleaning
* add in frontend
* draft openai handling
* upload to s3
* simpler output
* return s3 directly if any
* low quality
* implement for gemini
* handle imagen model
* handle image input
* cleaning
* remove base64 from output
* cleaning
* fix timeout
* handle openrouter
* remove log
* allow image input when creating image
* cleaning
* increase stack size
* inline everything
* revert stack size
* refactor: move AI executor types to separate module
- Created ai module structure with types.rs
- Moved all type definitions from ai_executor.rs to ai/types.rs
- No functional changes, just code organization
* refactor: add QueryBuilder trait and provider detection utilities
- Created QueryBuilder trait for abstracting provider-specific logic
- Added helper functions for provider detection (is_anthropic_provider)
- Implemented placeholder QueryBuilder for all providers
- Updated OpenAIRequest to use slices instead of Vec references
- All providers now have QueryBuilder implementations (using default for now)
* feat: implement OpenAI query builder with image support foundation
- Created proper OpenAI query builder implementation
- Added image_handler module for S3 upload/download utilities
- Separated text and image request building logic
- Added prepare_messages_for_api to handle S3Object conversion
- Foundation laid for supporting tools with image output
* refactor(ai): complete AI executor refactoring with query builder pattern
- Created modular structure under ai/ module
- Moved all types to ai/types.rs
- Created QueryBuilder trait for provider abstraction
- Implemented OpenAI query builder with image+tools support
- Added unified agent runner supporting both text and image outputs with tools
- Refactored run_agent to delegate to new unified implementation
- Added image handler utilities for S3 operations
- Improved code organization and maintainability
* cleaning
* feat(ai): implement remaining provider query builders
- Added Anthropic query builder with proper message conversion
- Added Google AI query builder with Gemini API support
- Added OpenRouter query builder delegating to OpenAI for compatibility
- Added missing Anthropic and Gemini types to types.rs
- Fixed type references and compilation errors
- All providers now support the unified query builder interface
* fixes
* fixes
* mime type + cleaning
* image to images
* handle mutlitple images
* fix
* remove agent_runner file
* clean query builder logic
* cleaning
* cleaning
* hide structured_output based on output type
* fix
* user images and not nested
* better descriptions
* Fix flow time display
* Make compute timeline a separate component
* Add timeline to log viewer
* Add timeline for subflows
* remove debug log
* fix progresion display while running
* Handle loop iteration
* nit
* Display all iteration for loops
* Show total execution time for loop steps
* Show subflow timeline
* Do not hightlight selected iteration
* Add subflow duration and starting time
* Allow zoom on subflow timeline
* Show execution time
* Improve timeline layout
* nit
* hover effect
* add show timeline toggle
* reset log viewer state when job id changes
* Display history loader in flow preview
* handle branch one
* reset timeline on jobId change
* nit
* fix branch chosen default
* improve time display
* improve look v1
* improve look v2
* Allow loading of more iterations when limit is reached
* fix display
* Add tooltip
* Use popover to display durations
* allow select iteration from timeline
* remove debug log
* fix iteration to index for long loops
* select iteration based on id
* Use localModuleState to get current display job ids
* clean subflow job creation
* improve subflow fetching
* fix load more position
* improve parallele display
* clean
* Add color status
* remove unwanted change
* prevent toggle expand on click timeline
* fix expand running module
* make timeline optional
* prevent running flow be marked as error
* Fix width jump during execution
* fix typo
* nit
* Use a class for timeline computation
* nit
* fix: use same hashes as original workspace when forking
* Remove overwrite of created_by
* Update SQLx metadata
---------
Co-authored-by: GitHub Action <action@github.com>
* feat: show position of job in queue when waiting for executor
- Added new API endpoint /queue/position/:id to get job's position in queue
- Modified DisplayResult.svelte to fetch and display queue position
- Shows 'Waiting for executor (position X in queue)' when job is queued
- Refreshes position every 2 seconds while waiting
Fixes#6553
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* iterate
* iterate
* all
* all
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* Add create_ephemeral workspace endpoint
* Add cli devShell
* List ephemeral workspaces + improve endpoint
* Add postgres function to clone a workspace (to be revisited)
* Clone workspace using the postgres function
* Add first iteration of ephemeral workspaces command
* Update display of forked workspaces
* Remove SQLX_OFFLINE
* Add UI to create ephemeral workspace
* Add option to exclude repository from being inherited to forks
* WIP: reworking cloning logic
* Fix cloning
* Fix redirect after creating fork
* Clean up cloning behaviour
* Rename ephemeral to fork
* emove ephemeral_workspaces table in favour of columns in workspaces
* Fix display of forked workspaces
* Fix skip inherit git sync repo setting
* Fix fork invite display + creating fork as user
* Fix SideMenu bug
* Fix alignment
* Simplify migrations
* Update deletion of workspaces
* Delete forked workspace from cli
* Deleting fork workspaces from the UI as non-admin
* Update cli sync and fork creation to adapt to branches and forks
* Update fork prefix
* Remove skip tracking toggle
* Fix npm check warnings
* Fix last npm check
* fix: force stdin to Stdio::null for all user code execution (#6575)
Set stdin to Stdio::null for all Commands that execute user code across all supported languages to prevent unwanted input consumption. This affects Python, Deno, Bash, PowerShell, Go, Rust, PHP, Ruby, Java, C#, Ansible, Nu, and Bun executors.
The dedicated worker handler was intentionally left unchanged as it requires stdin for inter-process communication.
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* Update ee-repo ref
* Update SQLx metadata
* Fix typos
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Set stdin to Stdio::null for all Commands that execute user code across all supported languages to prevent unwanted input consumption. This affects Python, Deno, Bash, PowerShell, Go, Rust, PHP, Ruby, Java, C#, Ansible, Nu, and Bun executors.
The dedicated worker handler was intentionally left unchanged as it requires stdin for inter-process communication.
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat: add worker_group_job_stats table for job metrics aggregation
- Add new table with hour timestamp, worker group, script lang, workspace_id, job count and total duration
- Workers accumulate stats in memory and update hourly via sum aggregation
- Monitor.rs cleans up rows older than 60 days periodically
- Stats are flushed on worker shutdown to prevent data loss
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* all
* all
* ee-repo-ref
* nits
* nits
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* feat(flow): Add archived badge to flow details page header
- Display 'Archived' badge in the top bar when a flow is archived
- Remove the redundant archived alert from the content area
- Badge uses red color with outlined variant to indicate archived status
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* fix(flow): Replace archived badge with alert at top of page
- Removed the 'Archived' badge from the flow details header
- Added an Alert component at the top of the page content area
- Matches the pattern used in script details pages for consistency
Co-authored-by: centdix <centdix@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
* prevent navigation in the flow when the preview is open
* keyboardNav with registration link
* Improve keyboard nav UI
* Focus log with keyboard nav
* Add native focus
* initialize focused on key down
* fix log expand not sticking
* Improve tree structure
* nit
* nit
* Update active section on click
* add tooltip for keyboard navigation
* add ui for structured output
* implement backend logic for openai models
* simulate having non required props
* cleaning
* implement logic for anthropic
* cleaning
* cleaning
* cleaning
* avoid name clash
* return object
* focus new field when adding
* fix condition
* small opti
* use box raw value
* avoid unnecessary parsing + return error if parsing fails
* s3 proxy works with get (no auth yet)
* nit
* support s3:// syntax
* Support s3:// syntax and fix vite api proxy normalizing double slashes in URI
* s3 checks authed
* nit
* PUT works
* delete file works
* Derive the JWT signature from the backend
* Authorize s3 correctly (JWT signature is never sent in cleartext)
* convert object store error to wmill error for correct status code
* stash
* fix
* POST first request proxy works
* s3 put for duckdb
* factor out direct proxy code
* Fix Issue with backend proxy and wrong signature due to Host header mismatch
* Add _default_ syntax to solve URI normalization issues with signing
* restricted to user paths toggle
* user path restriction works !
* change restriction to allow
* fix
* factor out code
* better permissions UX in object storage settings
* Revert to restrict_to_user_paths
* check permissions in old s3 api
* DuckDB now uses S3 Proxy and no longer needs LFS query
* implement todo
* fix hardcoded w_id
* s3 proxy size limit
* s3_proxy is ee
* nit
* add Google Cloud Storage as option to secondary storage
* GCS secret in duckdb
* fix toolchain compile
* Remove user permissions for v0
* fix ci 2
* fix CI OSS
* fix missing feature flag
* fix unused warning
* integration test fails bc rustc 1.85.0
* ee ref
* fix ci ...
* update ee ref
Extended the error message when SQL queries return more than 10k rows
to inform users about S3 streaming capability with a link to docs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat(backend): retrieve root_job for MiniPulledJob + fix root job for flow jobs
* nit
* nits
* set root_job only if additional information meaning if not equal to innermost or parent
* nit
* feat: add root job env var
* nits
* fix build
* nit
* fix build
* nit
* sqlx
* feat: add 60-second cache for variables and resources with PostgreSQL invalidation
- Add new var_resource_cache module with 60-second TTL
- Implement PostgreSQL NOTIFY/LISTEN for immediate cache invalidation
- Cache get_variable() for non-secret, non-encrypted reads
- Cache get_resource_value() for all read operations
- Add database triggers on variable/resource table changes
- Initialize cache system in main.rs after database connection
- Add Clone derive to ListableVariable for cache compatibility
Performance benefits:
- Avoids database queries on cache hits
- Immediate invalidation ensures data consistency
- Selective caching respects security constraints
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: move cache to API layer with allow_cache query param
- Move variable/resource cache from windmill-common to windmill-api
- Add allow_cache query parameter to variables and resources endpoints
- Follow raw script cache pattern with timestamp + value structure
- Create proper database migration for notification triggers
- Include encrypted values in cache when appropriate
- Only activate caching when explicitly requested
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: move cache to API layer with allow_cache query param
Move PostgreSQL LISTEN logic to main.rs following established pattern
- Remove custom listener initialization from cache module
- Add cache invalidation channels to centralized notification handler
- Simplified cache module to only handle cache operations
- Follow raw script cache pattern for notification handling
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* improve arg layout
* improve runs row (wip)
* Add job badges
* group filters in dropdown
* improve runs row layout
* Improve filter layout
* use select for graph display
* handle width modification
* Remove useless headers
* fix bad display when result is null
* Display all jobs tags
* Improve display for 'step of flow' jobs
* Add empty message for JobAssetsViewer
* Move job preview assets tab to flow result for flows
* Only show tag in the tag column
* Add job kind to rows
* Add padding to the run preview
* nit
* move refresh on top of table
* Move filters into header bar
* move runs table topbar outside table
* Simplify layout
* Use toggle for kind for large screen
* move sync job and add batch actions breakpoint
* revert dropdown to toggle for conurrency/duration
* handle run labels overflow
* improve time display
* fix flow preview with no path display
* Add titles
* Prevent tab shift for script and flow result
* nit
* Allow job deselect
* Make job link more visible
* Fix filtering for queued job
* Fix filter not reseting after select from toggleMore
* Allways show assets for flow status viewer
* Update run chart to svelte 5 and fix reactivity issue
* migrate concurrency chart to svelte 5
* Improve admmin workspace display and fix missing in add filter popover
* nit
* fix run table resize
* Add breakpoint to hide tag in small screens
* use a css file for gathering RunRow and RunTable classes
* nit
* nit
* remove debug log
* nit
* fix typo
* Have too icons for queued workers and suspended
* add gap before auto-refresh
* Replace min max to from to calendar picker
* Add loading state for job preview
* Move duration
* Display kind full width when calendar not set
* Only show 2 digits for jobs duration
* Replace Scheduled for by a clock un the run row
* Fix typpo in dropown select to dropdown select
* Hide sync and previews in toggle more
* Fix runs row padding
* Change notification colors for queued jobs
* use utils debounce function
* fix typo
* nit
* use class instead of classNames
* clean select filter side effects
* feat: add 60-second cache for workspace key retrieval
This implements a cache with 60-second staleness for the get_workspace_key
function to reduce database queries for workspace encryption keys. The cache
follows the same pattern as the existing CUSTOM_ENVS_CACHE but with a
shorter expiration time.
Requested by @rubenfiszel
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* Extend cache staleness from 60 to 300 seconds
* feat: add cache invalidation notifications for workspace keys
Add PostgreSQL LISTEN/NOTIFY mechanism to invalidate workspace key cache
across all servers and workers when workspace keys change.
- Add database migration with trigger function for workspace_key changes
- Add notification handler in main.rs to remove from WORKSPACE_KEY_CACHE
- Follow same pattern as existing workspace environment cache invalidation
- Ensures distributed cache consistency for workspace encryption keys
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* finish
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* cli file resource specific items
* improvement
* resource command + correct order of context
* no dynamic imports
* support trigger types for branch specific items
* also update trigger cli function to be branch aware
* hubscript path
* add read only to diff editor
* save changes to editor instead
* only add listener if oncodechange is specified
* pass existing editor as modified model
* remove effect
* cleaning
* fix flowStateStore val
* handle run preview multiple keyboard actions
* Synchronise input args and prview args
* Fix arg update one step load
* fix input ste manually not reseted after preview
* rename test steps to stepsInputArgs
* simplify job result update
* fix job preview logic
* fix import
* nit
* clean
* fix test job not displaying when data is pinned
* remove job history loader display delay
* nit
* nit
* add error handler to steps input args comparison function
* prevent result node to display connection
* feat: ai agent steps base
* better backend and graph
* feat: anthropic, log viewer
* nit
* fix(frontend): hide tool nodes from timeline
* move ai agent actions from flow status to flow status module
* nits and workspace/hub scripts support
* tmp ref
* fix merge
* feat: display agent tools status in the graph
* fix reactivity
* fix flow status
* nit
* feat: add prometheus metric queue_running_count
Adds a new Prometheus metric queue_running_count that tracks the number
of currently running jobs per tag, similar to the existing queue_count
metric but filtered for running=true instead of running=false.
Changes:
- Added get_queue_running_counts() function in windmill-common/src/queue.rs
- Added QUEUE_RUNNING_COUNT Prometheus metric in monitor.rs
- Added /workers/queue_running_counts API endpoint
- Updated OpenAPI specification
- Added SQLx query cache entry
Requested by @rubenfiszel
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* Remove database insertion for queue_running_count metrics
Keep Prometheus metrics and API endpoint functionality while removing
the database INSERT statements as requested.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* sqlx
* improve logic
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
- Import getHeaders function in metadata.ts
- Update updateScriptLock() to include extra headers from HEADERS env var
- Update updateFlow() to include extra headers in both fetch branches
- Fixes issue where wmill flow generate-locks ignored custom headers
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* fix(frontend): fix bad log tree build
* remove entry structure to use modules as input for log tree
* clean
* fix typo
---------
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* Remove inline type restriction from TypeScript AI script generation
Remove the requirement to inline object types in TypeScript AI chat prompts. The AI will now only receive guidance about using RT.ResourceType for resource types, without being forced to inline other parameter types.
Fixes#6099
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Rename TS_INLINE_TYPE_INSTRUCTION to TS_RESOURCE_TYPE_INSTRUCTION
Co-authored-by: centdix <centdix@users.noreply.github.com>
* remove
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
* feat(aichat): add mode-specific placeholders for better user guidance
- Replace generic "Ask anything" placeholder with mode-specific suggestions
- Script mode: "Modify this script, fix errors, or generate new code..."
- Flow mode: "Edit this flow, add steps, or modify workflow logic..."
- Navigator mode: "Help me navigate Windmill or find features..."
- API mode: "Make API calls to fetch data or manage resources..."
- Ask mode: "Ask questions about Windmill features and documentation..."
- Maintains backward compatibility for custom placeholders
- Uses Svelte 5 reactive $derived.by for dynamic updates
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat(aichat): make placeholder prop optional and simplify logic
- Make placeholder prop optional instead of defaulting to 'Ask anything'
- Remove !== 'ask anything' logic check, now simply checks if placeholder is provided
- When placeholder is provided, use it directly; otherwise fall back to mode-specific placeholders
- Maintains backward compatibility while simplifying the conditional logic
Co-authored-by: centdix <centdix@users.noreply.github.com>
* feat(aichat): use AIMode enum instead of hardcoded strings
- Import AIMode enum in AIChatInput.svelte
- Replace hardcoded mode strings with enum values in switch statement
- Update focusInput function and template condition to use enum
- Maintains consistency with type-safe enum usage throughout codebase
Co-authored-by: centdix <centdix@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
* feat(flowEditor): add diff mode action buttons to inline script editor
- Add showHistoryDrawer state to FlowModuleComponent
- Bind showHistoryDrawer to EditorBar for history functionality
- Add showButtons={diffMode} prop to DiffEditor in flow editor
- Add on:hideDiffMode and on:seeHistory event handlers to DiffEditor
- Ensures inline script editor in flows has same diff mode buttons as main script editor
Fixes#6377
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* fix
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
* feat: instancd groups mapping to workspace
* npm run check
* nits
* improve apis
* sqlx prepare and ee-repo ref
* adding workspace assignment in groups page
* nits
* correct rollback
* sqlx
* ee repo ref
* revert accidental ee-repo-ref commit to main
* ee repo ref
* revert accidental ee-repo-ref commit to main
* componentize detail module
* Add logs tab
* add flow log viewer
* fetch logs
* handle subflows
* add forloop iteration picker
* polish
* expand steps log by default
* move logic handling to wrapper component
* improve iteration picker
* clean code
* polishing
* Add flow start and flow end rows
* fix infinite loop
* nit
* use list instead of table
* use custom id for collapsing subflow
* remove debug logs
* Use status dot instead of text
* fetch log from moduleState
* wip
* only fetch subflow jobs from cache if job is completed
* Add job polling for expanded steps
* handle subflows
* Init logs for steps
* update localModuleState logs
* use selected iteration from local module state
* handle branchone
* Add branch one and branch all label
* remove redondant innerModule prop
* Improve UX
* Add expand/collapse
* Add filter to hide result and inputs
* Steps are now flow children
* improve UX
* Open flow and steps sction when executing
* Handle empty subflows
* remove unnecessary sequence viewer component
* nit
* use iteration picker in log view
* Replace dot with step type icon
* indicate subflows
* add step number and progression
* Incorporate inputs and results in the list of steps
* Add error indicator when subflow has error
* improve topbar
* improve log polling
* Improve log polling
* Add root flow log fetching and polling
* Add debounce for loading subflow jobs
* write a function to build the tree view from the graph
* remove unnecessary log polling
* fix flow result display
* flag errors
* preprocessor
* remove all flow logs drawer
* grenerate graph from component
* wip
* Check module change before building graph
* nit
* fix log overflow
* fix log viewer borders
* mini jobs run preview fix
* elegent job logs loading
* nit
* nit
* nit
* all
* all
* all
* all
---------
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* add test script tool
* modify system prompt
* cleaning
* same for flows
* cleaning
* apply code when confirm test + fix circular dep
* cleaning
* factorize
* display error
* cleaning
* fix
* update comment
* prompts
* cleaner code
* show logs in separate container
* format
* fix flow result overflow
* fix resource type misalignment and icon sizes
* Do not display resource type description if empty
* Display flow yaml editor full height
* fix detail page overflow
* nit
* feat(cli): add better error handling with path logging for JSON parsing failures
- Add try-catch blocks with path logging for all JSON.parse operations in ZipFSElement
- Log specific file paths for flow.yaml, app.yaml, script.yaml, and resource.yaml parsing failures
- Improve debugging experience by showing which file caused parse errors before re-throwing
- Addresses feedback in issue #6369 for better error handling in CLI sync command
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat(cli): extend error handling to cover extractInlineScripts and additional parsing operations
- Add try-catch blocks around extractInlineScriptsForFlows and extractInlineScriptsForApps calls
- Add error handling for yamlStringify operations in flow, app, script, and resource processing
- Add error handling for yamlParseContent operations in multiple locations
- Add error handling for JSON.parse operations in comparison logic
- All error handlers log the specific file path that caused the failure for better debugging
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor(cli): remove unnecessary try-catch blocks around yamlStringify calls
yamlStringify operations cannot fail so the try-catch blocks were
unnecessary. Kept the essential error handling for operations that
can actually fail like extractInlineScripts, JSON.parse, and yamlParseContent.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
The usage example in the load_s3_file_reader docstring incorrectly showed `wmill.load_s3_file(...)`. Updated it to `wmill.load_s3_file_reader(...)` to match the actual method being documented.
* upgrade duckdb
* basic ducklake works
* ducklake works with custom db catalogs
* fix: pwsh skip already installed modules outside of cache (#6037)
* improve query performance of user stats
* separate ducklake_catalog db
* ducklake settings
* DucklakeSettings frontend
* Ducklake ws settings saved in backend
* fetch ducklake catalog resource
* Ducklake works with configured s3 storage
* Ducklake as asset
* ducklake asset icon
* Fix duckdb array and object args not working properly (#6254)
* Fix bug with comments in duckdb
* Avoid multiple queries when doing ATTACH ducklake
* trunc sig no longer needed now that comments are trimmed
* cache DuckdbConnectionSettingsResponse
* duplicated code
* transform_attach_ducklake contributes to duckdb_connection_settings_cache
* eliminate the need for used_storages
* nit
* cleaner management of the bigquery credentials file
* DBManagerDrawer refactor to prepare for Ducklake
* get ducklake schema
* implement delete for ducklake
* load column metadata for ducklake
* Select query works for ducklake, basic db explorer works !
* duckdb count query
* Support all db ops for ducklake
* clean migrations
* SQL repl for Ducklake
* fix broken database studio
* nit
* assert function
* Ducklake in Editor Bar
* default ducklake syntax + allow extra args
* DucklakeCatalogWizard UI
* nit + remove extra $
* modal when databases do not exist
* cannot be windmill
* Ducklake works safely with instance database
* Avoid sending instance db credentials on network
* resource leak security
* remove fetch_attach_db_conn_str
* prevent instance pg password leak
* hide asset usage count when not available
* case unsensitivity duckdb
* warnings
* disable instance catalog
* use shorthand syntax when inserting with EditorBar
* Instance ducklake catalog is now safe to use
* use safer argon2 pwd
* update package json parsers
* update package json
* better msgs
* tooltips
* disable explore button until saved
* nit
* fix warnings
* better ducklake_user password management
* nit
* Sanitize passwords from errors in ducklake
* DisplayResult broken in job result
* remove superadmin requirement to check databases_exist
* duckdb_connection_settings_v2_inner
* Ducklake works on agent worker (finally)
* ci
* #[allow(dead_code)]
* fix openapi missing response
* Separate +Database button for DuckDB in EditorBar
* Fix dropdown in ducklake settings
* Attempt to fix migration race condition in CI
* update sqlx failing for some offline queries
* avoid temp password for ducklake_user
* nits
* ducklake settings nits
* update duckdb default script
* fix sql repl resetting text on refresh
* avoid pgcrypto extension
---------
Co-authored-by: HugoCasa <hugo@casademont.ch>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
In > 7.10.0 regression was introduced breaking our build process.
This commit reverts the change and fixes tests
Signed-off-by: pyranota <pyra@duck.com>
* add utils package
* naming
* cleaning
* simplify assignPath
* rename old files
* same for locks
* create on confirm
* default true
* use replaceinlinescripts from utils
* use extractscriptfromflows
* make it compile
* cleaning
* use argsigtojson
* fix
* fix missing await
* cleaner
* cleaning
* cleaning
* use in frontend
* add docs
* testing
* remove log
* use autogenerated types
* remove old
* fix
* cleaning
* adapt usage
* draft
* better build script
* fix build
* revert to default creation
* add docs
* remove and rename
* make everything work
* add await
* only if not installed
* add vs code setting
* add to publish action
* fix bc
* safer use of sep
* fix
* do not rename on push
* no publish on release
* use published package on frontend
* nit
* feat: add CA certificate update at startup via environment variable
Add support for running 'update-ca-certificates' at binary startup
when RUN_UPDATE_CA_CERTIFICATE_AT_START environment variable is set to "true".
- Check for RUN_UPDATE_CA_CERTIFICATE_AT_START env var on startup
- Execute update-ca-certificates command if env var is set to "true"
- Log success/failure appropriately with tracing
- Continue startup even if CA certificate update fails
- Non-blocking implementation with proper error handling
Fixes#6279
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: extract CA certificate update logic into separate function
Extract the CA certificate update logic from windmill_main() into a
dedicated update_ca_certificates_if_requested() function for better
code organization and maintainability.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* improvements
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
Co-authored-by: Alexander Petric <alex@windmill.dev>
* fix step history not refreshing with staticInputs
* fix array of obj not showing up in json editor in test this step
* datatable scales correctly in DisplayResult and scrolling is much more usable
* avoid next button disapearing and changing layout / hurting ux
* nits
* fix bug when renaming module A to B then module C to A, C takes the schema of A
* fix bug with comments in sql repl
* fix aggrid theme randomly not loading
* bindable script
* better delete button in db manager
* property select doesnt exist
* fix all warnings
* delete $flowStateStore[id] on delete
* feat(aichat): add recommendation alert for Claude latest model in Anthropic provider settings
Add info alert in AI workspace settings recommending Claude latest model for better reliability of AI chat when using Anthropic provider.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* fix
* nit
* nit
* use badge
* use blue
* add tooltip
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
* add base struct
* feat resolve interface and type declarion in entrypoint param's function
* nits
* fix reset dependencies
* update package
* fix handle infinite recursion
* add depth level and handle enum for referenced type
* nits
* nits
* nits
* perf
* fix
* done
* fix schema form cache inconsistency
* fix default type and nits
* remove
* update Object typ for parser
* one level ref from from parent when resolving types and use format for resource
* update cli and use resource type
* nits
* update parsers
* fix: use specific parser versions
---------
Co-authored-by: HugoCasa <hugo@casademont.ch>
* feat: Add runScriptByPath and runScriptByHash methods to SDK clients
- Add runScriptByPath and runScriptByHash methods to TypeScript client
- Add run_script_by_path and run_script_by_hash methods to Python client
- Split functionality from existing methods that took both path and hash parameters
- Add deprecation warnings to existing run_script methods
- Maintain backward compatibility while encouraging use of focused methods
Closes#6251
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Refactor SDK methods to eliminate code duplication
- Extract common logic into internal helper methods
- Python client: _run_script_async_internal() and _run_script_internal()
- TypeScript client: _runScriptAsyncInternal() and _runScriptInternal()
- Eliminate duplicated parameter processing and HTTP setup
- Maintain exact same public API surface and functionality
- Reduce lines of code while preserving all existing behaviors
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* fix ts and dev.nu for python
* trade warnings.warn for logging.warning
Signed-off-by: pyranota <pyra@duck.com>
---------
Signed-off-by: pyranota <pyra@duck.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: pyranota <pyra@duck.com>
* fix: update parsers to prevent assets var bug
* fix wrong parse function in cli for duckdb
---------
Co-authored-by: Diego Imbert <diego@windmill.dev>
* Moved logic to FlowAssetsProvider
* Remove assetsMap in flow
* do not parse everything on mount + only check for missing assets fields
* add assets field in backend
* remove fallbackAccessTypes
* better structure and less queries / parsing
* Fix assets not showing when pulling raw_flow from jobs
* flow assets ctx for job run
* Fix transitive assets fetching
* Fix input args asset node
* enablePathScriptAndFlowAssets flag
* edit btn for variable
* untrack refresh
* move parseInputArgsAssets
* Assets tab in runs
* Update FlowStatusViewerInner to svelte 5 + fix asset sync bug
* avoid toast error on bad resource
* fetch res metadata for input arg asset
* Job assets viewer in run page
* r/w selector
* remove indigo badge
* store alt_access_type state in ScriptEditor
* Don't parse assets in flow script editor
* Add alt_access_type in backend
* show Read as selected by default to avoid giving the feeling of having made a decision
* keep alt_access_type when reparsing in flow raw scripts
* Remove variable asset kind, and save assets for scripts
* remove all backend asset parsing
* R/W/RW selector button nits
* fix insert into assets not saving alt access type
* support named arguments in python asset parser
* improve asset usage drawer R/W indicator
* update legacy $res: syntax
* reactivity issue
* remove last variable asset stuff
* sqlx prepare
* tooltip explainer
* deprecated variable asset nit
* log when override is applied vs default taken in git sync
* simplify cli merging options + add explicit override test
* gitsync-settings pull/push ask for confirmation or --yes if tty
* cli legacy backend repo setting detected + interactive migration
* add logs
* add logs search + better load tools logic
* use json
* nit
* only add for ee
* nit
* filter out search after first fail
* Revert "filter out search after first fail"
This reverts commit 2abf0db6e5a1be84e67d1a153281b74d448cb5cd.
* call endpoint to know if it is available
* cleaning
* Apply suggestion from @graphite-app[bot]
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* fix
* draft
* call enabled endpoint
* not workspaced
* remove from system prompt if not enterprise
* fix eeref command
* update ee ref
---------
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
* assets migration
* parse assets (duckdb)
* iterate on assets
* S3 object Preview
* remove pagination
* filterText
* better occurence list
* tweak
* assets in JobPreview
* clone impl
* AssetsDetectedBadge
* improve DbManagerButton + asset dropdown button
* edit resource btn
* warning when incorrect resource
* +Resource in DuckDB
* +S3 Object editor bar
* nit fix rename
* flow asset badge
* More Generic OnChange
* Highlight assets used in modules
* Show occurence count in flow
* Better UX, avoid moving parts
* nit
* Asset nodes
* move to dedicated Asset ctx
* fix layoutNodes not handling first assetsMap
* explore asset btn in flow asset node
* correct offset
* single computeAssetNodes function
* Fix y positioning of nodes with assets
* resource editor
* write mode node (ui)
* accessType in ctx + fix insert button positioning
* right positioning when mixing read and write nodes
* right positioning when mixing R and W assets
* Better layout fix algorithm
* listAssetsByUsage and asset nodes on transitive usages
* refactor + remove linkAssets
* Refactor to allow for custom R/W modes
* AssetsDropdownButton in flow script editor
* R/W/RW selection and changes node pos in flow
* layoutNodes doesnt need recompute now
* fix wrong assumption that nodes recompute when assets change
* r/w/rw multi toggle
* MultiToggle cool animation + clearable
* rename + 1px nit
* remove mini toggle button group, use ToggleButtonGroup
* Combinator parser that detects R / W asset context
* nit fix missing flex-1
* missing order by
* better ui indication for access type
* special x offset case when only one asset node for clarity
* parse getResource in TS with swc ecma parser
* support load and write s3 detection in TS
* Python asset parser
* support wmill api calls without special $res: or s3:// syntax
* detect out of context asset uris python
* do not use access type override when not ambiguous in flow graph
* parse_assets match case in rust
* AsRef<str> refactor
* From impl
* Save flow assets
* Save script asset usages + fixes + save fallback access types
* asset sub icon
* max total asset node width to avoid overlap
* small refactor
* don't parse comments in duckdb assets
* fix assets clearing on parse error
* fix script asset save in wrong place
* load initial asset fallback access types
* support variables
* ui fixes
* Support S3Object as URI in TS client
* support new syntax in python client
* Support +S3Object in EditorBar for TS and python
* Reduce resource requests in assets page
* import windmill client when necessary
* update s3Types.d.ts
* nit fix
* Show input resources and s3 objects as assets
* improve asset icons
* DarkModeObserver refactor
* asset page tabs
* Moved resource variables and s3object pages to assets tabs
* fetch resource usages
* Get variables usages
* move assets usage dropdown to component
* Revert "move assets usage dropdown to component"
This reverts commit 622ea4ab12.
* Revert "Get variables usages"
This reverts commit b11ced4e29.
* Revert "fetch resource usages"
This reverts commit aa5187ad4b.
* Revert "Moved resource variables and s3object pages to assets tabs"
This reverts commit 4430487be4.
* Revert "asset page tabs"
This reverts commit dacc2f0da5.
* move assets usage dropdown to component
* asset icon in asset pages
* tooltip
* details
* Storage selector in S3 File Picker
* make edge less opaque
* Refactor computeAssetNodes to separate in and out nodes
* AssetsOverflowedNode
* nits
* fix assets not being parsed in flows sometimes
* show asset kind and resource_type
* ui nits
* support res:// in duckdb
* add banner for old deployments
* Fix permissionning
* fix broken disable /enable all
* assets page view permission for operators
* Disable ExploreAssetButton for operators
* asset kind as subtitle
* do not spam getResource in assets page. prob. revert fail
* update assets page on workspace change
* reload storage names on ws change
* delete assets on archive / deletion
* sqlx prepare
* missing update when updating user
* add indexes on asset
* better message
* missing loadInit: false
* dead code
* use transaction
* typo
* update package.json
* update package.json
---------
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* migrate FlowPreviewContent to svelte 5
* run background preview from input panel
* share local run test
* Show approval in graph is testing in graph
* use component and props instead of portal for approval in graph
* Add a toggle to show module status in graph
* open module result after each run
* Fix module reactivity issue
* Add test flow button
* Extract preview run logic from flowPreviewContent
* Revert "Extract preview run logic from flowPreviewContent"
This reverts commit a39c70a920.
* nit
* lazy load preview content
* create component for flow preview button
* open preview v0
* open preview v1
* connect open preview button
* improve graph run display
* enable cancel preview
* Run test flow from input panel
* nit
* wip
* Use global context instead of module context for moduleTestState
* nit
* fix flow preview rendering
* Add testJob to modulesTest context
* update module status based on individual test data
* fix: clear job status on run preview
* detatch run buttons from input node
* move preview job in FlowEditorContext
* move outputPickerOpenFns to FlowEditorContext
* add result panel
* Add result output picker
* add status to loops and branch
* add open detail button to result panel
* fix test up to
* clean unnecessary binding
* clean
* Make iteration annotation smaller in editmode
* detatch test button to and aproval from node
* prevent flow edition during execution
* Prevent step test run during flow run
* Show approval in graph edges
* prevent opening output popover if node is outside the graph
* fix pointerdownOutside action
* fix test up to dropdown not closing
* fix test up to
* nit
* change job status badge display
* fix running status
* Enable test flow in Dev
* fix darkmode
* fix node panel display in Dev
* fix test flow button positionning
* fix suspend in subflows
* improve lazy load of preview
* prevent preview data unmount on close drawer
* clean code
* move flowjob into flow context
* Revert "move flowjob into flow context"
This reverts commit 939e9dbaaf.
* clean context
* nit
* fix dark mode status view
* fix test button alignment
* clean job status on deleted step
* fix retry bad status display
* Detect flow change
* Update frontend/src/lib/components/flows/header/FlowPreviewButtons.svelte
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* fix: correct paths and no symlink for windows (go)
* fix: improve Windows Go executor compatibility
- Fix path handling inconsistency - use consistent double backslashes
- Replace hardcoded Windows paths with dynamic system path detection
- Add missing env_clear() call for mod init command
- Create helper functions to reduce Windows environment setup duplication
- Use SYSTEMDRIVE and TMP/TEMP environment variables for better compatibility
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* Fix missing navigation after migration to svelte 5 of ctrl k search
.includes doesn't work anymore because the items inside the array are
treated as state, and thus svelte wraps them with a Proxy thing
* Change ask ai to be a menu item
* Remove comment
* move settings and static inputs into top node
* Move test button in the top nodes
* Revert "Move test button in the top nodes"
This reverts commit 1c8648a538.
* Add error handler to top toolbar
* nit
* polishing
* add flow settings to topbar dropdown
* remove unused files
* progress
* progress
* fixes
* fix
* fix
* fix
* fix
---------
Co-authored-by: Ruben Fiszel <ruben@rubenfiszel.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* feat: allow change_workspace_id on CLOUD_HOSTED for superadmins
- Import is_super_admin_email function from windmill_common::auth
- Modify CLOUD_HOSTED restriction to bypass for superadmin users
- Resolves request to allow workspace ID changes for superadmins only
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* feat: allow superadmins to change workspace ID on cloud hosted environments
Update frontend conditional logic to show workspace ID change button for superadmins on cloud hosted environments. This complements the backend changes that already allow superadmins to perform the workspace ID change operation.
Changes:
- Add superadmin import from $lib/stores
- Update condition from `!isCloudHosted()` to `!isCloudHosted() || $superadmin`
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Add GitHub App functionality to ResourceEditor and extract reusable component
- Extract GitHub App logic from ApiConnectForm into reusable GitHubAppIntegration component
- Add GitHub App functionality to ResourceEditor for consistent experience across workflows
- Create githubApp.ts service layer with comprehensive error handling and state management
- Maintain all existing functionality while improving code reusability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix code formatting for GitHub App integration files
Apply Prettier formatting to newly created and modified components to ensure
consistent code style across the GitHub App integration implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* linter
* Update frontend/src/lib/githubApp.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update frontend/src/lib/components/GitHubAppIntegration.svelte
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* feat: add optional CSP headers when ENABLE_CSP_HEADERS is set
- Add middleware to conditionally set Content-Security-Policy headers
- Check for ENABLE_CSP_HEADERS environment variable
- Apply secure default CSP policy suitable for web applications
- Follows existing middleware patterns in codebase
Resolves#6031🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* perf: optimize CSP headers with lazy_static and add configurability
- Cache CSP_ENABLED and CSP_POLICY using lazy_static to avoid env var lookups on every request
- Add comprehensive documentation to add_csp_headers middleware function
- Make CSP policy configurable via CSP_POLICY environment variable
- Maintain backward compatibility with secure default policy
- Implement proper error handling for custom CSP policy values
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
* refactor: conditionally add CSP middleware layer instead of NO-OP
- Use .option_layer() to only add CSP middleware when ENABLE_CSP_HEADERS is set
- Remove runtime conditional check from add_csp_headers function
- Improve performance by avoiding unnecessary middleware execution when disabled
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: conditionally add CSP middleware layer instead of NO-OP
Remove CSP_ENABLED variable and instead check if CSP_POLICY is not empty.
This eliminates the need for a separate enable flag and simplifies the logic
to just check if a meaningful CSP policy is configured.
- Remove CSP_ENABLED lazy_static variable
- Simplify CSP_POLICY to use unwrap_or_default()
- Update conditional middleware logic to check !CSP_POLICY.is_empty()
- Update documentation to reflect new behavior
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: conditionally add CSP middleware layer instead of NO-OP
Move CSP headers from general middleware stack to static assets only.
CSP headers are only relevant for browsers consuming static content,
not for API endpoints.
Changes:
- Add CSP headers directly to static asset responses in serve_path()
- Remove CSP middleware from general middleware stack
- Remove unused add_csp_headers middleware function
- Maintain same CSP_POLICY environment variable configuration
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
* fix: conditionally compile CSP header imports with static_frontend feature
Fixes unused import errors by wrapping HeaderValue and CSP_POLICY imports
with #[cfg(feature = "static_frontend")] to match their usage context.
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
* refactor: move CSP lazy static block to static_assets.rs
- Move CSP_POLICY lazy static from lib.rs to static_assets.rs for better encapsulation
- Remove crate-level import since CSP_POLICY is now local to static_assets module
- Maintain same functionality with proper feature gating for static_frontend
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: Alexander Petric <alpetric@users.noreply.github.com>
Removes the BETA designation from Ansible language in the script builder
while keeping it for Nu language as requested.
Closes#6052
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Add initial loading status for flow steps
* Add loading state
* reset module initial if test flow initial is reset
* ensure all jobs are loaded before unmouning the preview
* only use loadIndividualStepsStates when no history
* Revert "only use loadIndividualStepsStates when no history"
This reverts commit bfc37b7e7f.
* wait for all flow child to be loaded befor loading flowSteps
* Revert "wait for all flow child to be loaded befor loading flowSteps"
This reverts commit 7da81756b0.
* Load individual steps on flow load
* Add loading status in graph
* Use a context to manage initial state and save to local storage
* Handle new flow
* nit
* nit
* nit
* Prevent loading step when mock is enabled
* Load jobs based on last flow run
* Revert "Load jobs based on last flow run"
This reverts commit 212cb7f785.
* Change step initial display status
* nit
* Add parallelisation limit on step job loading
* Use regex to split input to python import parser
* gitignore Cargo.toml
* gitignore cargo.toml
* Restore cargo.lock
* fix(rust): make wmill reference correct windmill-api
`wmill` crate of version `x` should reference `windmill-api` of the same version `x`
* nit(mcp): filter out scripts without main function from tools list
- Add no_main_func field to ScriptInfo struct
- Update SQL query to select no_main_func from database
- Filter scripts where no_main_func is true in list_tools function
- Hub scripts remain unaffected as requested
Resolves#6021
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* perf(mcp): optimize script filtering with SQL WHERE clause
Move the no_main_func filtering from Rust code to SQL WHERE clause for better performance:
- Add conditional WHERE clause in inner_get_items for scripts only
- Remove Rust-level filtering loop in list_tools function
- Reduces data transfer and improves query performance by filtering at database level
- Handles NULL values properly with (o.no_main_func IS NOT TRUE OR o.no_main_func IS NULL)
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix
* refactor(mcp): optimize filtering by removing no_main_func field selection
Remove no_main_func field from ScriptInfo struct and SQL selection while keeping WHERE clause filtering. This improves performance by filtering at the database level without transferring unnecessary data to the application layer.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
doesn't work well in edge cases:
```
@schedule(
bla=True
)
def main(x: str):
return x
```
```
error_message = """
Please ensure you have defined main(username, password) correctly.
The function def main( should be at the end.
"""
def main(x: str):
return x
```
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* feat: add typescript client context to ai chat system prompt
Add windmill client function signatures and descriptions to the TypeScript
language context in the AI chat system. This provides users with inline
documentation for key windmill client functions including resource operations,
state management, variables, script execution, S3 operations, and flow utilities.
The context is kept concise to avoid making the system prompt too large while
still providing the most useful function signatures for TypeScript scripts.
Resolves#6002
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* fix import
* feat: add python client context to ai chat system prompt
Add PYTHON_WINDMILL_CLIENT_CONTEXT with function signatures and descriptions for key windmill client functions in Python, including:
- Resource operations (get_resource, set_resource)
- State management (get_state, set_state, get_flow_user_state, set_flow_user_state)
- Variables (get_variable, set_variable)
- Script execution (run_script, run_script_async, wait_job)
- S3 file operations (load_s3_file, write_s3_file)
- Flow operations (run_flow_async, get_resume_urls)
- Utilities (whoami, get_job_status, set_progress)
The context is now included for Python language (python3) in the AI chat system prompt, providing users with helpful function signatures and descriptions when asking for coding assistance.
Co-authored-by: centdix <centdix@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: centdix <farhadg110@gmail.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: ai button in inline script editor to open AI chat in flow builder
- Add openAiChat prop to ScriptGen component to control AI button behavior
- When openAiChat=true, AI button opens AI chat manager in script mode
- When openAiChat=false (default), AI button shows direct generation popover
- Update flow builder (FlowModuleComponent) to use openAiChat=true for inline scripts
- App builder continues using direct generation (openAiChat defaults to false)
- Import AIMode enum properly to fix TypeScript error
Resolves request from @HugoCasa to make flow AI button open chat instead of direct generation while keeping app builder unchanged.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* refactor: extract repeated logic into reusable functions in ScriptGen.svelte
- Created determineModeFromEditor() to centralize mode setting logic
- Added callCopilot() to unify copilot function calls with proper typing
- Added handleAiButtonClick() as single handler for button click scenarios
- Created safeLocalStorageOperation() for generic localStorage error handling
- Added getPromptStorageKey() for centralized storage key generation
Reduces code duplication and improves maintainability.
Co-authored-by: HugoCasa <HugoCasa@users.noreply.github.com>
* refactor: extract duplicate determineModeFromEditor call in handleAiButtonClick
Remove code duplication by calling determineModeFromEditor() once at the
beginning of handleAiButtonClick() instead of in both conditional branches.
Co-authored-by: HugoCasa <HugoCasa@users.noreply.github.com>
* nits
* better color
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: HugoCasa <HugoCasa@users.noreply.github.com>
Co-authored-by: HugoCasa <hugo@casademont.ch>
Fixes#5991
- Add keydown event handlers with stopPropagation() to prevent SvelteFlow
from receiving keypress events from text inputs in decision tree config
- Applied at individual input level (summary field) and container level
(configuration panel) to catch all input types
- Prevents accidental node deletion when typing in configuration inputs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* feat: allow devOps role to edit worker groups config
- Updated backend permission checks in configs.rs to use require_devops_role() instead of require_super_admin()
- Updated frontend UI in workers page to show worker group management for devOps users
- Updated WorkerGroup component to allow devOps role access to all configuration features
- Updated AssignableTagsInner component to allow devOps users to manage tags
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Update configs.rs
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* fix: correct $props generic syntax in Svelte 5 components
Replace incorrect `$props<T>()` syntax with correct `let x: T = $props()` syntax
to ensure proper TypeScript typing instead of falling back to `any` types.
This affects 11 Svelte 5 components throughout the frontend codebase.
Fixes#5974
Co-authored-by: Diego Imbert <diegoimbert@users.noreply.github.com>
* fix claude pr
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Diego Imbert <diegoimbert@users.noreply.github.com>
Co-authored-by: Diego Imbert <diego@windmill.dev>
Co-authored-by: Diego Imbert <70353967+diegoimbert@users.noreply.github.com>
- Your branch name should be a short description of the requested changes.
- Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a draft PR from that branch to main.
## Available Tools
- mcp__github__create_pull_request: Create PRs from branches
allowed_tools:"mcp__github__create_pull_request,Bash(npm run check),Bash(npm install),Bash(cargo check),Bash(curl https://sh.rustup.rs -sSf | sh -s -- -y)"
custom_instructions:"IMPORTANT INSTRUCTIONS:
- Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a draft PR from that branch to main, with the title starting with [Claude PR].
- If you made changes to the frontend code, run npm install, then npm run generate-backend-client, then npm run check. You can ignore warnings that are reported by the check script, but fix the errors.
- If you made changes to the backend code, install Rust and then run cargo check. You can ignore warnings that are reported by the check script, but fix the errors.
- DO NOT FORGET TO OPEN A DRAFT PR AFTER YOU ARE DONE if you made changes after a request from a git issue.
AVAILABLE TOOLS:
- mcp__github__create_pull_request: Create a PR from a branch to main
- Bash(npm run check): Run the check script. You should run this tool after making changes to the frontend code.
- Bash(npm install): Install dependencies. You need this to run npm run check.
- Bash(npm run generate-backend-client): Generate the backend client. You need this to run npm run check.
- Bash(cargo check): Run the cargo check script. You should run this tool after making changes to the backend code.
- Bash(curl https://sh.rustup.rs -sSf | sh -s -- -y): Install Rust. You need this to run cargo check."
- Your branch name should be a short description of the requested changes.
- Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a draft PR from that branch to main.
## Code Quality Requirements
After making any code changes, you MUST run the appropriate validation commands:
**Frontend Changes:**
- Run: \`npm run check\` in the frontend directory
- Fix all warnings and errors before proceeding
**Backend Changes:**
- Run: \`cargo check --features $(./all_features_oss.sh)\` in the backend directory
- Fix all warnings and errors before proceeding
**Pull Request Creation:**
- DO NOT FORGET TO OPEN A DRAFT PR AFTER YOU ARE DONE if you made changes after a request from a git issue.
## Available Tools
- Bash: Full access to run validation commands and git operations"
1. Extract the Cloudflare preview URL from the cloudflare-workers-and-pages bot comment in this PR
2. Analyze the PR changes to understand what feature was added/modified
3. Create detailed instructions to give to an AI agent that will click and interact with buttons and inputs to showcase the new feature. Only include the instructions, nothing else.
4. Create a demo.json file with a valid JSON object containing:
- instructions: the demo instructions
- url: the preview URL
5. VALIDATE the JSON file using `jq` before finishing
DO NOT COMMIT THIS FILE TO THE PR.
Example demo.json:
{
"instructions": "Click on settings, then account settings, then 'generate new token'",
"url": "https://example.pages.dev"
}
CRITICAL: After creating demo.json, you MUST:
1. Run `jq empty demo.json` to validate the JSON is properly formatted
2. If validation fails, fix the JSON and validate again
3. Only proceed once the JSON passes validation
4. Use proper JSON escaping for newlines, quotes, and special characters
Make sure to:
- Create a valid JSON object that passes `jq empty demo.json`
- Extract the correct preview URL (should be a .pages.dev domain)
- Create specific, actionable demo steps based on the actual changes in the PR
- Properly escape all strings in the JSON (use jq to create the file if needed)
Please review this pull request and provide comprehensive feedback.
Focus on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security implications
Provide detailed feedback using inline comments for specific issues.
Use top-level comments for general observations or praise.
At the end of your review, add complete instructions to reproduce the added changes through the app interface. These instructions will be given to a tester so he can verify the changes. It should be a short descriptive text (not a step by step or a list) on how to navigate the app (what page, what action, what input, etc) to see the changes.
To have an overview of what this app does, see @.cursor/rules/windmill-overview.mdc
For backend modifications, follow the rules mentioned here @.cursor/rules/rust-best-practices.mdc. You also have access to a summarized version of the database schema here @backend/summarized_schema.txt
For frontend modifications, follow the rules mentioned here @.cursor/rules/svelte5-best-practices.mdc
# Windmill Development Guide
## Overview
Windmill is an open-source developer platform for building internal tools, workflows, API integrations, background jobs, workflows, and user interfaces. See @windmill-overview.mdc for full platform details.
## New Feature Implementation Guidelines
When implementing new features in Windmill, follow these best practices:
- **Clean Code First**: Write clean, readable, and maintainable code. Prioritize clarity over cleverness.
- **Avoid Duplication at All Costs**: Before writing new code, thoroughly search for existing implementations that can be reused or extended.
- **Adapt Existing Code**: Refactor and generalize existing code when necessary to avoid logic duplication. Extract common patterns into reusable utilities.
- **Follow Established Patterns**: Study existing code patterns in the codebase and maintain consistency with established conventions.
- **Single Responsibility**: Each function, component, and module should have a single, well-defined responsibility.
- **Incremental Implementation**: Break large features into smaller, reviewable chunks that can be implemented and tested incrementally.
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
## Run a local dev setup
@@ -372,7 +374,6 @@ Using [Nix](./frontend/README_DEV.md#nix) (Recommended).
See the [./frontend/README_DEV.md](./frontend/README_DEV.md) file for all
running options.
### only Frontend
This will use the backend of <https://app.windmill.dev> but your own frontend
@@ -398,29 +399,27 @@ npm run generate-backend-client-mac
See the [./frontend/README_DEV.md](./frontend/README_DEV.md) file for all
running options.
1.Create a Postgres Database for Windmill and create an admin role inside your
Postgres setup. The easiest way to get a working db is to run
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. Install [nsjail](https://github.com/google/nsjail) and have it accessible in
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 deno and python3, have the bins at `/usr/bin/deno` and
`/usr/local/bin/python3`
4. Install [caddy](https://caddyserver.com)
5. Install the [lld linker](https://lld.llvm.org/)
6. Go to `frontend/`:
1. `npm install`, `npm run generate-backend-client` then `npm run dev`
3. Install bun, deno and python3 (+ any languages you want to use), have the bins at `/usr/bin/bun`,`/usr/bin/deno`, 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. In another shell `npm run build` otherwise the backend will not find the
`frontend/build` folder and will not compile.
4. In another shell `sudo caddy run --config Caddyfile`
"query":"SELECT f.path\n FROM workspace_runnable_dependencies wru \n JOIN flow f\n ON wru.flow_path = f.path AND wru.workspace_id = f.workspace_id\n WHERE wru.runnable_path = $1 AND wru.runnable_is_flow = $2 AND wru.workspace_id = $3",
"query":"SELECT\n id As \"id!\",\n flow_status->'restarted_from'->'flow_job_id' AS \"restarted_from: Json<Uuid>\"\n FROM v2_as_queue\n WHERE COALESCE((SELECT flow_innermost_root_job FROM v2_job WHERE id = $1), $1) = id AND workspace_id = $2",
"query":"SELECT\n id As \"id!\",\n flow_status->'restarted_from'->'flow_job_id' AS \"restarted_from: Json<Uuid>\"\n FROM v2_job_status\n WHERE COALESCE((SELECT flow_innermost_root_job FROM v2_job WHERE id = $1), $1) = id",
"query":"SELECT\n v2_job.permissioned_as_email,\n v2_job.created_by,\n v2_job.parent_job,\n v2_job.permissioned_as,\n v2_job.runnable_path,\n CASE WHEN v2_job.trigger_kind = 'schedule'::job_trigger_kind THEN v2_job.trigger END AS schedule_path,\n v2_job.flow_step_id,\n v2_job.flow_innermost_root_job,\n v2_job.root_job,\n v2_job_queue.scheduled_for AS \"scheduled_for: chrono::DateTime<chrono::Utc>\"\n FROM v2_job INNER JOIN v2_job_queue ON v2_job.id = v2_job_queue.id\n WHERE v2_job.id = $1 AND v2_job.workspace_id = $2",
"query":"SELECT\n workspace.id AS \"id!\",\n workspace.name AS \"name!\",\n workspace.owner AS \"owner!\",\n workspace.deleted AS \"deleted!\",\n workspace.premium AS \"premium!\",\n workspace_settings.color AS \"color\"\n FROM workspace\n LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id\n LIMIT $1 OFFSET $2",
"query":"SELECT\n workspace.id AS \"id!\",\n workspace.name AS \"name!\",\n workspace.owner AS \"owner!\",\n workspace.deleted AS \"deleted!\",\n workspace.premium AS \"premium!\",\n workspace_settings.color AS \"color\",\n workspace.parent_workspace_id AS \"parent_workspace_id\"\n FROM workspace\n LEFT JOIN workspace_settings ON workspace.id = workspace_settings.workspace_id\n LIMIT $1 OFFSET $2",
"query":"\nWITH lockable_counters AS (\n SELECT concurrency_id, job_uuids\n FROM concurrency_counter\n WHERE job_uuids != '{}'::jsonb\n FOR UPDATE SKIP LOCKED\n),\nall_job_uuids AS (\n SELECT DISTINCT jsonb_object_keys(job_uuids) AS job_uuid\n FROM lockable_counters\n),\norphaned_job_uuids AS (\n SELECT job_uuid\n FROM all_job_uuids\n WHERE job_uuid NOT IN (\n SELECT id::text \n FROM v2_job_queue \n FOR SHARE SKIP LOCKED\n )\n),\norphaned_array AS (\n SELECT ARRAY(SELECT job_uuid FROM orphaned_job_uuids) AS orphaned_keys\n),\nbefore_update AS (\n SELECT lc.concurrency_id, lc.job_uuids, oa.orphaned_keys\n FROM lockable_counters lc, orphaned_array oa\n WHERE lc.job_uuids ?| oa.orphaned_keys\n),\naffected_rows AS (\n UPDATE concurrency_counter \n SET job_uuids = job_uuids - orphaned_array.orphaned_keys\n FROM orphaned_array\n WHERE concurrency_counter.concurrency_id IN (\n SELECT concurrency_id FROM before_update\n )\n RETURNING concurrency_id, job_uuids AS updated_job_uuids\n),\nexpanded_orphaned AS (\n SELECT bu.concurrency_id, \n bu.job_uuids AS original_job_uuids,\n unnest(bu.orphaned_keys) AS orphaned_key\n FROM before_update bu\n)\nSELECT \n eo.concurrency_id,\n eo.orphaned_key,\n eo.original_job_uuids,\n ar.updated_job_uuids\nFROM expanded_orphaned eo\nJOIN affected_rows ar ON eo.concurrency_id = ar.concurrency_id\nWHERE eo.original_job_uuids ? eo.orphaned_key\nORDER BY eo.concurrency_id, eo.orphaned_key\n",
"query":"SELECT name, summary, array_remove(array_agg(email_to_igroup.email), null) as emails FROM email_to_igroup RIGHT JOIN instance_group ON instance_group.name = email_to_igroup.igroup GROUP BY name, summary",
"query":"\n SELECT\n path,\n custom_path\n FROM \n app\n WHERE \n custom_path IN (\n SELECT \n custom_path\n FROM \n app\n GROUP \n BY custom_path\n HAVING COUNT(*) > 1\n )\n ORDER BY custom_path\n ",
"query":"WITH to_update AS (\n SELECT q.id, q.workspace_id, r.ping, COALESCE(zjc.counter, 0) as counter\n FROM v2_job_queue q\n JOIN v2_job j ON j.id = q.id\n JOIN v2_job_runtime r ON r.id = j.id\n LEFT JOIN zombie_job_counter zjc ON zjc.job_id = q.id\n WHERE ping < now() - ($1 || ' seconds')::interval\n AND running = true\n AND kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlestepflow')\n AND same_worker = false\n AND (zjc.counter IS NULL OR zjc.counter <= $2)\n FOR UPDATE of q SKIP LOCKED\n ),\n zombie_jobs AS (\n UPDATE v2_job_queue q\n SET running = false, started_at = null\n FROM to_update tu\n WHERE q.id = tu.id AND (tu.counter IS NULL OR tu.counter < $2)\n RETURNING q.id, q.workspace_id, ping, tu.counter\n ),\n update_ping AS (\n UPDATE v2_job_runtime r\n SET ping = null\n FROM zombie_jobs zj\n WHERE r.id = zj.id\n ),\n increment_counter AS (\n INSERT INTO zombie_job_counter (job_id, counter)\n SELECT id, 1 FROM to_update WHERE counter < $2\n ON CONFLICT (job_id) DO UPDATE\n SET counter = zombie_job_counter.counter + 1\n ),\n update_concurrency AS (\n UPDATE concurrency_counter cc\n SET job_uuids = job_uuids - zj.id::text\n FROM zombie_jobs zj\n INNER JOIN concurrency_key ck ON ck.job_id = zj.id\n WHERE cc.concurrency_id = ck.key\n )\n SELECT id AS \"id!\", workspace_id AS \"workspace_id!\", ping, counter + 1 AS counter FROM to_update",
"query":"SELECT flow_status->'modules'->$2::int->'flow_jobs_success' as \"flow_jobs_success: Json<Vec<Option<bool>>>\", flow_status->'modules'->$2::int->'flow_jobs_duration' as \"flow_jobs_duration: Json<FlowJobsDuration>\"\n FROM v2_job_status WHERE id = $1",
"query":"SELECT tag::text, EXISTS(SELECT 1 FROM worker_ping WHERE custom_tags @> ARRAY[tag] AND ping_at > now() - interval '1 minute') as exists\n FROM unnest($1::text[]) as tag",
"query":"\n SELECT\n ig.name as group_name,\n ws.workspace_id,\n w.name as workspace_name,\n ws.auto_add_instance_groups_roles->ig.name as role\n FROM instance_group ig\n INNER JOIN workspace_settings ws ON ws.auto_add_instance_groups IS NOT NULL\n AND ig.name = ANY(ws.auto_add_instance_groups)\n INNER JOIN workspace w ON w.id = ws.workspace_id AND w.deleted = false\n ORDER BY ig.name, ws.workspace_id\n ",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.