* Add note component
* save note size and position
* move add note button up
* nit
* Add markdown support
* wip
* fix add sticky note button
* fix text update
* Add sticky note to saved flow data
* add note color picker
* Introduce node multiselect
* Add group notes
* Adapt layout to group node
* create a note manager class
* clean reactivity
* clean
* improve adaptive layout to group note
* modify layout based on cached text height
* fined grained graph rendering for notes
* separate noteManager into editor and render
* separate noteManager into editor and render
* create a note change observer
* render note node from context
* simplify note state managment
* show note in flow viewer
* clean dirty changes
* clean selection manager
* fix layout check
* improve bg surface select
* Handle z-index for stacked group notes
* clean selection manager
* exclude notes from rect select
* Allow switch between selection modes with keyboard keys
* improve selection box styling
* prevent dragging note when editing
* nit
* Simplify selection using svelte flow built in feature
* handle note selection separately
* Add min size for notes
* improve selection toggle
* improve mode switch
* make size and position optional for group notes
* Improve initial viewport position
* Add context menu for the canevas
* nit
* Add node context menu
* improve note select
* use clickoutside for note deselect
* use pointerdown outside to close context menu
* nit
* fix selection issues
* make edges non selectable
* improve color palette
* fix backend
* fix backend check
* cargo lock restore
* Add toggle to display notes
* fix note selection
* nit
* account for css offset in for loop
* fix multiple selection pannel styling
* clear flow selection when creating note
* Improve placeholder and note default text
* Escape note edit mode when pressing Esc
* Allow note edition in local dev
* clean
* Handle subflow selection
* prevent group note resizing
* nit
* allow notes in flow expand
* Improve multi select panel
* Allow context menu in note mode
* Add event listenner to fix pane click deselect
* prevent zoom in text area in notes
* improve bounding box styling
* Use control for box selection for non mac users
* nit
* clean notes groups
* nit
* use portal for note actions
* handle assets node when computing note layout
* Simplify layout compute for notes
* use smart color choice for notes
* Switch display note when adding a new note
* clean code
* improve group note bound size calculation
* simplify AI tool nodes and asset handling
* nit
* nit
* improve flow centering
* create group note button
* Improve selection of nodes
* Revert "Improve selection of nodes"
This reverts commit d2c40d82b1.
* refert backend changes
* nit
* improve graph selection
* clean
* make backend work except job runs
* fix notSelectable
---------
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* feat(mcp): add granular scope parsing and filtering
- Add scope_matcher.rs with McpScopeConfig and parsing logic
- Support new scope format: mcp:scripts:{paths}, mcp:flows:{paths}, mcp:endpoints:{names}
- Update check_scopes() to accept any mcp:* scope
- Implement resource matching with wildcard support (f/folder/*)
- Full backward compatibility with legacy scopes (mcp:all, mcp:favorites, mcp:hub:{app})
- Add comprehensive unit tests for scope parsing and matching
Co-authored-by: centdix <centdix@users.noreply.github.com>
* feat(mcp): add badge-based UI for granular scope selection
- Add 'Custom' toggle option to MCP token creation UI
- Implement clickable badge interface for selecting scripts/flows/endpoints
- Selected badges show in blue, unselected in gray with opacity
- Automatically load all workspace scripts/flows/endpoints in custom mode
- Generate granular scopes: mcp:scripts:{paths}, mcp:flows:{paths}, mcp:endpoints:{names}
- Validate at least one resource is selected before token creation
- Display selection count for user feedback
Co-authored-by: centdix <centdix@users.noreply.github.com>
* docs(openapi): document granular MCP scope format
- Add comprehensive documentation for MCP scopes in NewToken schema
- Document new granular format: mcp:scripts:{paths}, mcp:flows:{paths}, mcp:endpoints:{names}
- Provide usage examples for common scenarios
- Mark legacy scopes (mcp:all, mcp:favorites) as deprecated but supported
- Include wildcard pattern examples (f/folder/*)
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: add type annotation for None in scope_path tuple
Fix compilation error where type parameter T could not be inferred for Option.
Changed None to None::<&str> to explicitly specify the type.
Co-authored-by: centdix <centdix@users.noreply.github.com>
* better ui
* cleaning
* fix back comp
* fix
* fix
* cleaning
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
* backend draft
* fix for tool and streaming
* do frontend side
* working
* working tools
* rm
* handle list endpoint
* handle for ai agents
* fix for models requiring inference id
* cleaning
* fix desc issue
* fix tool usage
* fix structured output
* cleaning
* fix for api
* rm
* fix input images
* cleaning
* chore: use aws sdk (#7156)
* feat(ai): Add AWS SDK dependencies for Bedrock integration
- Add aws-sdk-bedrockruntime v1.113.0
- Add aws-credential-types for bearer token authentication
- Update rustls to v0.23.35 for compatibility
- Dependencies added to windmill-common for AI features
* feat(ai): Add bearer token provider for Bedrock authentication
- Implement BearerTokenProvider using aws_credential_types
- Simple token-based auth using API keys from Windmill resources
- Add basic unit tests for provider creation
- Export bedrock_auth module in lib.rs
* feat(ai): Add Bedrock client wrapper with region extraction
- Implement BedrockClient wrapper around AWS SDK client
- Bearer token authentication integration
- Extract AWS region from Bedrock base URL automatically
- Comprehensive unit tests for region extraction
- Make aws-config non-optional dependency for AI features
- Update feature flags to reflect new dependency structure
* cargo
* feat(ai): Implement non-streaming Bedrock via AWS SDK
Use official AWS SDK instead of manual HTTP requests for better type safety and maintainability. Implements the Bedrock converse() API for non-streaming requests with proper bearer token authentication and message format conversion between OpenAI and Bedrock formats.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor(ai): Eliminate Simple* conversion types for Bedrock SDK
- Move AI types to windmill-common/src/ai_types.rs for shared access
- Update bedrock_converters to work directly with OpenAI types
- Remove ~200 lines of conversion boilerplate from ai_executor.rs and bedrock.rs
- Remove unused imports to clean compilation warnings
- Benefits: 50% fewer conversion steps, no information loss, easier maintenance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(ai): Add streaming support for AWS Bedrock SDK
- Implement converse_stream() for Bedrock streaming responses
- Use EventReceiver.recv() to process stream events
- Extract text deltas using bedrock_stream_event_to_text()
- Send TokenDelta events to StreamEventProcessor for real-time updates
- Refactor request building to eliminate duplication between streaming and non-streaming
- Clean, minimal implementation following AWS SDK patterns
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* revert flake change
* fix
* feat(ai): Add tool calls and image support for Bedrock streaming
**Phase 1: Streaming Tool Call Support**
- Add stream event processing functions in bedrock_converters.rs:
- bedrock_stream_event_to_tool_start() - Extract tool use start from ContentBlockStart
- bedrock_stream_event_to_tool_delta() - Extract tool input deltas from ContentBlockDelta
- bedrock_stream_event_is_block_stop() - Detect ContentBlockStop events
- streaming_tool_calls_to_openai() - Convert accumulated tool calls to OpenAI format
- Update ai_executor.rs streaming loop with tool call accumulator (HashMap)
- Track current tool use ID during streaming
- Send ToolCallArguments events to StreamEventProcessor
- Return accumulated tool calls instead of empty vector
**Phase 2: Image Input Support**
- Add parse_image_data_url() to extract format and base64 data from data URLs
- Add content_part_to_block() to convert ContentPart to Bedrock ContentBlock
- Refactor convert_message() to handle multi-part content with images
- Support ImageUrl conversion to Bedrock ImageBlock with proper format (png/jpeg/gif/webp)
- Import AWS SDK image types: ImageBlock, ImageSource, ImageFormat
- Keep content_to_text() helper for system message text extraction
**Benefits**:
- ✅ Tool calling now works in both streaming and non-streaming modes
- ✅ Images are properly converted instead of being silently dropped
- ✅ Structured output works in streaming (uses tool calling)
- ✅ Full feature parity with manual HTTP implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* cleaning
* fix(ai): Add S3 image support and structured output for Bedrock
**Fixes:**
1. **S3 Image Support**: Call prepare_messages_for_api() before Bedrock SDK path to convert S3Objects to ImageUrls
- Downloads images from S3 and encodes as base64 data URLs
- Ensures images are properly handled in both streaming and non-streaming modes
2. **Structured Output**: Add ToolChoice::Any when structured output tool is present
- Forces Bedrock to call the structured_output tool
- Ensures JSON schema compliance for structured output
- Works in both streaming and non-streaming modes
**Changes:**
- ai_executor.rs: Call prepare_messages_for_api() for Bedrock SDK path
- ai_executor.rs: Set tool_choice to Any when structured_output_tool_name is present
- aws_bedrock.rs: Remove unused ToolChoice imports (used via full path in worker)
**Testing:**
- ✅ S3 images are now downloaded and converted before API call
- ✅ Structured output now forces tool usage with ToolChoice::Any
- ✅ Both work in streaming and non-streaming modes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* cleaning
* cleaning
* cleaning
* better error
* cleaning
* cleaning
* rm
* rename
* apply region
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix default
* no panic
* no print
* use utils file
* cleaning
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: support to run windows binary as service
* ee ref
* ee ref
* flags
* Update backend/src/main.rs
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
* fix ai commit
* fix
* ee ref
---------
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* backend draft
* fix for tool and streaming
* do frontend side
* working
* working tools
* rm
* handle list endpoint
* handle for ai agents
* fix for models requiring inference id
* cleaning
* fix desc issue
* fix tool usage
* fix structured output
* cleaning
* fix for api
* rm
* fix input images
* cookelogin
* cookelogin
* all
* all
* fix
* all
* all
* update back
* all
* all
* cookelogin
* cookelogin
* Update frontend/src/lib/components/apps/editor/PublicApp.svelte
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update frontend/src/lib/components/apps/editor/PublicApp.svelte
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* all
* all
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* handle conversation for preview endpoints
* rm
* way better chat logic
* remove old logic
* no streaming in flow input
* pass conv id to preview func
* max width on input
* add info
* cleaning
* nits
* nits
* use streaming in preview
* fix(backend): replace regex with one-pass algorithm for PowerShell param parsing
The previous regex-based approach used which would
fail when encountering nested parentheses inside the param block, such as
or .
This commit replaces the regex with a proper one-pass parser that:
- Tracks parenthesis depth to correctly handle nesting
- Respects string quotes (both single and double quotes)
- Handles PowerShell's backtick escape character
- Works correctly with complex default values and function calls
Changes:
- Removed RE_POWERSHELL_PARAM regex constant
- Added extract_powershell_param_block() function for extracting param contents
- Added extract_powershell_param_block_full() function for extracting full param block
- Updated parse_powershell_file() in windmill-parser-bash
- Updated pwsh_executor.rs to use the new extractor
- Added comprehensive test cases for nested parens and quoted strings
Fixes#7079
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* refactor(backend): combine PowerShell param extraction functions
Merged extract_powershell_param_block() and extract_powershell_param_block_full()
into a single function with a boolean parameter to control output format:
- include_keyword=false returns just contents between parentheses
- include_keyword=true returns full param(...) block
This eliminates code duplication while maintaining all existing functionality.
Co-authored-by: hugocasa <hugocasa@users.noreply.github.com>
* fix(backend): improve pwsh param block parsing
* chore: publish parser
---------
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>
Co-authored-by: hugocasa <hugocasa@users.noreply.github.com>
- Add onBlur prop support to Password component
- Trim license key on blur in InstanceSetting component
- Trim license key before saving in InstanceSettings component
This ensures leading and trailing whitespace is always removed
from the license key input field, both when the user leaves the
field and when settings are saved.
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>
* Create onboarding pages
* add the users/onboarding route
* make the onboarding not available in oss
* Front end for onboarding form for cloud users
* WIP: Save current progress on first-timers onboarding feature
* Put back the cloud.ts file like before
* Add the onboading form when cloud users connect for the first time
* Add check to show onboarding only for first time users on cloud
* Add submit_onboarding_data route in the backend
* Remove useless cookie code
* Remove useless function
* Remove the unused onMount import
* Add SQLx query cache for first_time_user field
* Allow dead_code for OnboardingData in OSS version
* Point to the latest ee hash
* Add maxlength on use_case text input
* Collect from the frontend only inputted data from the users - touche_point and use_case
* write latest ee ref
* Remove checkFirstTimeSetup() call if cloud instance
* Remove silent error
* Remove magical number from onboarding screen navigation
* remove unused databse field for login query
* Add first_time_user check in loadUser()
* Add input for the Other answer
* Update ee hash
* Remove autofocus
* Improve the submit onboarding data function checks
* Fix feature flags
* Add latest ee hash
* Update to latest hash
* Update to last ee hash
* nits
* simplify feature flag logic
* nit
* Update ee-repo-ref.txt
* nits
* update ref
---------
Co-authored-by: wendrul <dethomassin.etienne@gmail.com>
Co-authored-by: Diego Imbert <70353967+diegoimbert@users.noreply.github.com>
Co-authored-by: HugoCasa <hugo@casademont.ch>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit adds support for setting custom HTTP headers for all AI API requests
via the AI_HTTP_HEADERS environment variable.
Usage:
AI_HTTP_HEADERS="customheader1: hello, customheader2: world"
The environment variable accepts a comma-separated list of header:value pairs.
These headers will be applied to all AI requests made through both the worker
(AI agent jobs) and the API (AI proxy requests).
Changes:
- backend/windmill-worker/src/ai_executor.rs: Parse and apply custom headers
- backend/windmill-api/src/ai.rs: Parse and apply custom headers
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
* fix(aiagent): use tool-based structured output for all claude models
Extended is_anthropic_provider to check if model starts with 'claude'
regardless of provider. This ensures the tool-based structured output
logic is used for all Claude models, not just when using Anthropic
or OpenRouter providers.
Closes#6977
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* fix
---------
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>
* fix: also auto add/del igroup members to workspaces where configured
* Update SQLx metadata
* feature flags
---------
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat(copilot): display tool calls immediately in loading state during streaming
Display tool calls in loading state as soon as they are parsed during
OpenAI streaming, rather than waiting until processToolCall is invoked.
Changes:
- parseOpenAICompletion: Track initialized tool calls and display them
immediately when we have complete tool info (id + function.name)
- processToolCall: Updated comment to clarify it merges with existing
loading state set during parsing
This provides better UX by showing tool execution progress progressively
as the stream is parsed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(copilot): display Anthropic tool calls immediately in loading state
Apply the same immediate tool call display pattern to Anthropic streaming
that was implemented for OpenAI.
Changes:
- parseAnthropicCompletion: Display tool calls immediately in loading state
when tool_use blocks are received in the message event
This ensures consistent UX across both OpenAI and Anthropic providers,
showing tool execution progress as soon as tool calls are detected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(copilot): show Anthropic tool calls even earlier with temp displays
Display temporary loading states for Anthropic tool calls as soon as
inputJson events are received (when tool input starts streaming), then
replace them with real tool displays when complete tool_use blocks
arrive in the message event.
Changes:
- ToolCallbacks: Added removeToolStatus method to clean up temp displays
- AIChatManager: Implemented removeToolStatus to remove tool messages
from displayMessages array
- anthropic.ts:
* Display temp tool on first inputJson event (earliest indicator)
* Flush pending text message before showing temp tool (proper ordering)
* Remove temp display when complete tool_use block arrives
* Replace with real tool display via preAction
This provides the earliest possible feedback for Anthropic tool calls,
showing loading states as soon as the model starts generating tool
inputs rather than waiting for complete blocks.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* cleaning
* cleaning
* cleaning
* fix icon
* nit
* handle error
* nit
---------
Co-authored-by: Claude <noreply@anthropic.com>
Never use SELECT * in queries that workers might execute to ensure
backwards compatibility when workers are running behind API server
version. New database columns would break outdated workers.
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(aichat): create reusable CustomAIPrompts component
Extract custom AI prompts UI into a reusable component that can be
used in both workspace settings and user settings. Component includes:
- AI mode selector with visual indicators for set prompts
- Textarea with character limit
- Customizable title, description, and hint messages
Co-authored-by: centdix <centdix@users.noreply.github.com>
* refactor(aichat): update workspace AISettings to use reusable component
Replace inline custom prompts UI with the reusable CustomAIPrompts
component. Add hint about user-level custom prompts being available
in account settings and how they combine with workspace prompts.
Co-authored-by: centdix <centdix@users.noreply.github.com>
* feat(aichat): add user-level custom AI prompts in account settings
Add collapsible section in user settings for custom AI prompts:
- Stored in localStorage (key: userCustomAIPrompts)
- Collapsible UI to save space
- Visual indicator when prompts are configured
- Hint about prompt combination with workspace settings
- Prompts apply across all workspaces for the user
Co-authored-by: centdix <centdix@users.noreply.github.com>
* feat(aichat): combine workspace and user custom prompts
Update AIChatManager to combine workspace-level and user-level custom
prompts. Prompts are combined in order: workspace first, then user.
Add helper functions in aiStore.ts:
- getUserCustomPrompts(): retrieves user prompts from localStorage
- getCombinedCustomPrompt(mode): combines workspace + user prompts
All AI modes (script, flow, navigator, ask, API) now use combined
prompts, allowing users to append their own instructions to workspace
settings across all workspaces.
Co-authored-by: centdix <centdix@users.noreply.github.com>
* fix: remove unused imports
Remove unused imports to fix svelte-check errors:
- Remove unused 'get' from svelte/store in AIChatManager
- Remove unused 'copilotInfo' from aiStore in AIChatManager
- Remove unused 'AIMode' from AISettings
Co-authored-by: centdix <centdix@users.noreply.github.com>
* simplify
* nit
* fix
* fix
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: centdix <centdix@users.noreply.github.com>
Fixes#6894
The TypeScript parser now correctly detects preprocessor functions
that are re-exported from other modules using named exports like:
export { preprocessor } from "./other_module";
Previously, only function declarations were detected. Now the parser
also checks ExportNamed AST nodes for any specifier named 'preprocessor'.
This allows developers to easily reuse preprocessor functions across
multiple scripts without the workaround of wrapping them in a new function.
Added comprehensive tests covering:
- Simple re-export: export { preprocessor } from "./other"
- Re-export with renaming: export { preprocessor as preprocessor }
- Mixed exports: export { foo, preprocessor, bar }
- Negative case: exports without preprocessor
Fixes#6867
The bash and PowerShell parsers were not properly handling CRLF (Windows-style)
line endings when parsing script arguments. The regex patterns were only
matching LF line endings, causing scripts with CRLF to fail metadata generation.
Changes:
- Updated RE_BASH regex to optionally match \r before line end (\r?$)
- Updated RE_POWERSHELL_ARGS regex to optionally match \r (\r?)
- Added test case test_parse_bash_sig_with_crlf() to verify CRLF handling
This fix ensures that bash scripts created on Windows (or with editors
using CRLF) will correctly parse arguments and generate proper metadata
via 'wmill script generate-metadata' command.
Python parser was verified to work correctly as it uses an AST parser
that inherently handles line endings properly.
* feat(flow chat): add cancel button
Add cancel button to flow chat interface that appears when a flow is executing.
- Replace send button with red stop button when processing
- Wire up cancel functionality to stop flow execution
- Support both polling and streaming modes
- Fixes#6868🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* fix
---------
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>
* draft mcp client
* testing
* fix
* cleaning
* mcp resource in inputtransforms
* cleaning
* big cleaning
* cleaning
* no arc
* add utils file
* refactor tools
* add mcp actions
* draft frontend
* send arguments from backend
* better frontend
* cleaning
* use token for auth
* add logo
* rm
* fix
* fix
* chore: refactor mcp for ai agents (#6829)
* Add Tool enum for AIAgent with backward compatibility
- Created Tool enum that can be either Windmill (FlowModule) or Mcp (resource reference)
- Created McpToolRef struct to hold MCP resource path
- Implemented custom Deserialize for Tool with backward compatibility:
- New format: {type: 'windmill'|'mcp', ...}
- Old format: FlowModule objects (automatically wrapped in Tool::Windmill)
- Updated AIAgent to use Vec<Tool> instead of Vec<FlowModule>
- Updated FlowValue::traverse_leafs to handle Tool enum
- Backward compatible: old flows with Vec<FlowModule> will deserialize correctly
* Refactor AI executor to process Tool enum instead of extracting MCP from input_transforms
- Separate Windmill tools and MCP resource paths from tools list
- Process Windmill FlowModules into Tool definitions
- Load MCP tools from resource paths in Tool::Mcp variants
- Remove old logic that extracted mcp_resources from input_transforms
- Import FlowModule, remove unused InputTransform
- Fix type issues: use .as_str() for path and handle Option<bool> properly
* handle in args
* mcp as flowmodule
* frontend
* config for mcp
* simplify logic
* fix ai executor logic
* cleaning
* clean frontend
* fix
* better resource picker
* fix and styling
* add endpoint to fetch tools
* apply tool filtering
* fix name validation
* better ui
* use cache
* fix
* fix merge
* refactor: Separate MCP tools from FlowModule in AIAgent
- Add new AgentTool, ToolValue, and McpToolValue types
- Update AIAgent to use Vec<AgentTool> instead of Vec<FlowModule>
- Implement From traits for clean conversion between AgentTool and FlowModule
- Add backward compatibility via custom deserializer for AgentTool
- Simplify resolve_module logic by reusing existing resolve_modules function
- Update traverse_leafs to handle AgentTool structure
This refactoring separates MCP tools from FlowModule tools, making the
type system clearer and eliminating the need to treat MCP servers as
a special case of FlowModule.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: Update ai_executor and worker_lockfiles for AgentTool
- Update ai_executor.rs to handle new AgentTool structure
- Separate MCP tools from FlowModule tools using ToolValue enum
- Convert AgentTool to FlowModule for backward compatibility
- Add imports for AgentTool and ToolValue types
- Update worker_lockfiles.rs for lazy loading optimization
- Convert AgentTool <-> FlowModule in insert_flow_modules
- Preserve lazy loading for FlowModule tools via modules_node
- Keep MCP tools inline (lightweight, no need for lazy loading)
- Maintain backward compatibility with existing flows
This enables the lazy loading optimization for FlowModule tools while
keeping MCP tools inline, balancing performance and simplicity.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* cleaning
* adapt frontend
* cleaning
* cleaning
* type fix
* cleaning
* fix back comp
* move mcp button position
* nit
* cleaning
* fix nested removal
* cleaning
* opti
* fix chat markdown display
* fix chat messages layout
* fix back comp frontend
* fix deserializer
* nit
* simpler serializer
* use if else
---------
Co-authored-by: Claude <noreply@anthropic.com>
* refactor: improve usage table behavior to eliminate synchronous row locks
Replace synchronous INSERT...RETURNING with SELECT + async UPDATE pattern:
- Add check_usage_limits() to read current usage without row locks
- Add increment_usage_async() to update usage in background task
- Refactor job push logic to use optimistic validation
- Simplify job completion tracking with better error handling
This eliminates blocking row locks on the usage table during job creation,
significantly improving throughput and reducing contention.
Note: Requires running 'cargo sqlx prepare' with database access to update
the query cache in .sqlx/ directory.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
* Update SQLx metadata
* refactor: optimize cloud usage checks with caching and conditional queries
- Add 60s cache for superadmin status checks to reduce DB load
- Skip unnecessary user usage query for premium workspaces
- Use existing team plan status cache (already implemented in windmill-common)
- Update check_usage_limits to accept check_user_usage parameter
- Add sqlx query cache for conditional user usage query
This optimization eliminates redundant database queries during job creation,
particularly for premium workspaces where user usage tracking is not needed.
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Ruben Fiszel <rubenfiszel@users.noreply.github.com>
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* feat(aiagent): Store AI provider config in localStorage
- Added localStorage persistence for AI provider, resource, and model selections
- Configuration is loaded as default values on component initialization
- Automatically saves whenever selections change
- Validates stored provider is still available before loading
- Uses storage key: windmill_ai_provider_config
Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com>
* better
* fix logic
* Update toggle option text for default setting
---------
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>
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* Revert "feat(backend): use flow nodes opti for ai agent steps (#6808)"
This reverts commit 8d5acda340.
* fix(backend): revert flow node opti for ai agents
* keep standard base64
* Improve minio on flake.nix
* Add first asset parsing logic for ansible
* Correct html gt sign
* Decouple s3 file picker from drawer
* Factor duplicate code into snippet
* Update S3FilePickerInner to be compatible
* Fix pane shrinking issue
* Git repo viewer
* Change GitRepoViewer
* Endpoints for git repo visualizer
* Move git repo viewer to its own component
* Add button to populate git repo viewer
* Update parser yaml for new ansisble features (repo viewer)
* Reflect parser changes for ansible
* Add button to add the git repo mode of declaration for ansible
* Factor function
* Playbook + inventories into the drawer
* Add button to add inventories from s3
* Move tests to lib.rs
* Inventory loading from s3
* Move get github app token logic to be reused by ansible
* Update parser and ansible executor
* Use the correct path for inventories
* Add nushell to flake for wasm builds
* Add published parser
* Update hubPaths with clone and upload to s3
* Update ee-repo to the branch ref
* Fix npm run check
* Update cargo.lock
* Change labels on buttons
* Remove debug log
* Update ee-repo-ref
* Fix ee issues
* Update ee-repo ref
* Fix typo
* Fix ee
* Update ee-repo-ref
* Fix missing imports
* Unused var
* Fix typo
* Layout improvents
* Fix typos
* Remove unused function and log
---------
Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
* 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
- 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
- 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.
@@ -109,17 +114,15 @@ jobs:
After making any code changes, you MUST run the appropriate validation commands:
**Frontend Changes:**
- Run: `npm run check` in the frontend directory
- 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
**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.
- 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 PRs from branches
- Bash: Full access to run validation commands and git operations
trigger_phrase:"/ai"
- 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:
@@ -36,8 +39,9 @@ jobs:
- Performance considerations
- Security implications
Provide constructive feedback with specific suggestions for improvement.
Use inline comments to highlight specific areas of concern.
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.
- This returns ONLY PRs that were merged in the last 7 days
- The --search flag filters by merge date using GitHub's search syntax
- **FILTER OUT** any PRs with titles starting with "chore: release" or "chore(release)"
3. **Categorize PRs**: Group PRs into three categories by analyzing titles and labels:
- **Features**: PRs with titles starting with "feat:", "feature:", or containing "add", "implement", "new"
- **Bug Fixes**: PRs with titles starting with "fix:", "bug:", or containing "fix", "resolve", "patch"
- **Other**: All remaining PRs (improvements, refactors, docs, chores, etc.)
4. **Gather Details**: For each feature and bug fix merged PR, include:
- Full PR title (NO truncation, NO links)
- Author (extract login from author.login in JSON)
- Brief summary: Use `gh pr view <number> --json body` to get PR description, then extract first paragraph or key points (1-2 sentences max)
5. **Character Limit Enforcement**:
- The final summary MUST be under 5000 characters
- If the summary exceeds 5000 characters, truncate PR descriptions (NOT titles) and add at the end: "_and X more PRs_" where X is the count of omitted PRs
6. **Save Summary to Markdown File**: Write the summary to a file for webhook delivery:
- Save the complete formatted markdown to: `summary.md`
- Do not commit the file to the repository
## Output Format:
```markdown
### 📈 Weekly overview
- **Total merged**: X
- **Features**: Y
- **Bug Fixes**: Z
- **Other**: W
### ✨ Features (Y)
- **[Full PR Title]** by @username - [brief impact description]
- **[Full PR Title]** by @username - [brief impact description]
### 🐛 Bug Fixes (Z)
- **[Full PR Title]** by @username - [brief impact description]
- **[Full PR Title]** by @username - [brief impact description]
_and X more PRs_
```
## Important Notes:
- **CRITICAL**: ONLY include PRs with state "merged" from the last 7 days
- **CRITICAL**: EXCLUDE all PRs with titles starting with "chore: release" or "chore(release)"
- **CRITICAL**: Total character count MUST be under 5000 characters
- Count the number of "Other" PRs but do not include a section for them in the output
- Only use ### markdown headers for major sections and emoji indicators
- NO links to PRs
- NO merged date in output
- NEVER truncate PR titles - show full titles
- Use GitHub CLI (`gh`) for all operations
- Sort PRs within each category by merge date (most recent first)
- If a PR has no description, write "(No description provided)"
- Extract meaningful summary from PR body - look for the first paragraph or key bullet points
- Parse JSON responses carefully using `jq` or similar tools
- If summary exceeds 5000 chars, shorten PR descriptions and add "_and X more PRs_" at the end
- Count PRs in each category and display in both overview and section headers
## Saving the Markdown Output:
After generating the markdown summary, save it to a file, BUT DO NOT COMMIT IT TO THE REPOSITORY.
## Write Tool Fallback:
- First, attempt to use the Write tool to create `summary.md` with the markdown content
- If the Write tool returns ANY error or fails:
1. Use the Bash tool with the `echo` command instead
2. Use a heredoc to write the content: `cat > summary.md << 'EOF'` followed by your markdown content and `EOF` on a new line
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 |
| 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 |
| Environment Variable name | Default | Description | Api Server/Worker/All |
| DATABASE_URL | | The Postgres database url. | All |
| WORKER_GROUP | default | The worker group the worker belongs to and get its configuration pulled from | Worker |
| MODE | standalone | The mode if the binary. Possible values: standalone, worker, server, agent | All |
| METRICS_ADDR | None | (ee only) The socket addr at which to expose Prometheus metrics at the /metrics path. Set to "true" to expose it on port 8001 | All |
| JSON_FMT | false | Output the logs in json format instead of logfmt | All |
| BASE_URL | http://localhost:8000 | The base url that is exposed publicly to access your instance. Is overriden by the instance settings if any. | Server |
| ZOMBIE_JOB_TIMEOUT | 30 | The timeout after which a job is considered to be zombie if the worker did not send pings about processing the job (every server check for zombie jobs every 30s) | Server |
| RESTART_ZOMBIE_JOBS | true | If true then a zombie job is restarted (in-place with the same uuid and some logs), if false the zombie job is failed | Server |
| 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
@@ -374,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
@@ -400,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 j.id\n FROM v2_job_queue q JOIN v2_job j USING (id) LEFT JOIN v2_job_runtime r USING (id) LEFT JOIN v2_job_status s USING (id)\n WHERE r.ping < now() - ($1 || ' seconds')::interval\n AND q.running = true AND j.kind NOT IN ('flow', 'flowpreview', 'flownode', 'singlestepflow') AND j.same_worker = false",
"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":"INSERT INTO deployment_metadata (workspace_id, path, script_hash, deployment_msg) VALUES ($1, $2, $3, $4) ON CONFLICT (workspace_id, script_hash) WHERE script_hash IS NOT NULL DO UPDATE SET deployment_msg = $4",
"query":"INSERT INTO deployment_metadata (workspace_id, path, script_hash, deployment_msg) VALUES ($1, $2, $3, $4) ON CONFLICT (workspace_id, script_hash) WHERE script_hash IS NOT NULL\n DO UPDATE SET deployment_msg = EXCLUDED.deployment_msg",
"query":"SELECT usage FROM usage\n WHERE id = $1\n AND is_workspace = FALSE\n AND month_ = EXTRACT(YEAR FROM current_date) * 12 + EXTRACT(MONTH FROM current_date)",
"query":"\n SELECT \n CASE \n WHEN flow_version.id IS NOT NULL THEN\n (flow_version.value -> 'flow_env' -> $3) #> $4\n ELSE\n (root_job.raw_flow -> 'flow_env' -> $3) #> $4\n END AS \"flow_env: sqlx::types::Json<Box<RawValue>>\"\n FROM \n v2_job current_job\n JOIN \n v2_job root_job ON root_job.id = COALESCE(current_job.root_job, current_job.flow_innermost_root_job, current_job.parent_job, current_job.id)\n AND root_job.workspace_id = current_job.workspace_id\n LEFT JOIN\n flow_version ON flow_version.id = root_job.runnable_id\n AND flow_version.path = root_job.runnable_path\n AND flow_version.workspace_id = root_job.workspace_id\n WHERE \n current_job.id = $1 AND \n current_job.workspace_id = $2",
"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":"\n SELECT COALESCE(s.flow_status, s.workflow_as_code_status)->'user_states'->$1\n FROM v2_job_queue q LEFT JOIN v2_job_status s USING (id)\n WHERE q.id = $2 AND q.workspace_id = $3\n ",
"query":"SELECT COUNT(*) FROM v2_job_queue q WHERE q.canceled_by IS NULL AND (q.scheduled_for <= now()\n OR (q.suspend_until IS NOT NULL\n AND (q.suspend <= 0 OR q.suspend_until <= now())))",
"query":"select hash, tag, concurrency_key, concurrent_limit, concurrency_time_window_s, cache_ttl, language as \"language: ScriptLang\", dedicated_worker, priority, timeout, on_behalf_of_email, created_by FROM script where path = $1 AND workspace_id = $2 AND\n created_at = (SELECT max(created_at) FROM script WHERE path = $1 AND workspace_id = $2 AND\n deleted = false AND archived = false)",
"query":"select hash, tag, concurrency_key, concurrent_limit, concurrency_time_window_s, debounce_key, debounce_delay_s, cache_ttl, language as \"language: ScriptLang\", dedicated_worker, priority, timeout, on_behalf_of_email, created_by FROM script\n WHERE path = $1 AND workspace_id = $2 AND archived = false AND (lock IS NOT NULL OR $3 = false)\n ORDER BY created_at DESC LIMIT 1",
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.