Commit Graph
89 Commits
Author SHA1 Message Date
ce7a811b71 feat: implement scheduling functionality for AgentflowV2 (#5971)
* feat: implement scheduling functionality for AgentflowV2

- Added ScheduleQueue class for managing scheduled jobs using BullMQ.
- Introduced scheduleService for creating, updating, and disabling schedules.
- Integrated schedule validation and cron expression handling.
- Enhanced chatflow service to manage schedules for agentflows.
- Added UI components for time and day selection (TimePicker, WeekDaysPicker, MonthDaysPicker).
- Updated NodeInputHandler to support new input types for scheduling.
- Improved validation for schedule configurations in agentflows.

* feat: implement schedule management for agentflows

- Refactor ScheduleQueue to utilize executeScheduleJob for job execution.
- Add new endpoints for schedule status retrieval and enabling/disabling schedules in chatflows.
- Update chatflow service to handle schedule creation, updates, and deletions more effectively.
- Introduce DatePicker component for date input in UI.
- Enhance CanvasHeader to manage schedule state and toggle functionality.
- Integrate schedule validation logic to ensure proper configuration before enabling schedules.
- Update dependencies to include node-cron for improved scheduling capabilities.

* feat(schedule): refactor schedule services and tests for schedule job

- Seperate the utils function from schedule service.
- Created comprehensive unit tests for all utility functions in `utils.test.ts`, covering various scenarios for cron expression validation, visual picker validation, and schedule resolution.
- Ensured proper handling of edge cases and error messages for invalid inputs.

* feat(schedule): remove timestamp in schedule tabes to support sqlite

- Change the way to update the existing schedule to avoid typescript issue when building.
- Add merge function in mockRepo in schedule service test.

* fix(schedule): add nullable to optional entity columns and entity interfaces

- Add nullable: true to lastRunAt, nextRunAt, endDate on ScheduleRecord
  entity to match migration DDL and prevent runtime errors
- Add IScheduleRecord and IScheduleTriggerLog interfaces to Interface.ts
- Have entities implement their respective interfaces per codebase convention

* fixed tests and hide schedule input from package/agentflow

* feat: integrate IdentityManager into worker and queue management

- Remove supporting cron express with 6 fields (second)
- Calculate the prediction usage in cron job

* feat: add support for MIN_SCHEDULE_INTERVAL_SECONDS in cron job configuration and validation

* fixed broken tests

* UI UX fixes for scheduler in dark mode

* fix(schedule): remove unnecessary UUID generation in createOrUpdateSchedule

* adds required scheduleInputMode column with text/form/none variants, ChatType.SCHEDULED, trigger-logs endpoint + drawer UI, IANA timezone dropdown, and dark-mode UX polish.

* add deleteScheduleTriggerLogs endpoint and UI integration for log deletion

* feat: enhance cron job handling for last day of month (L) in ScheduleBeat and related utilities

Co-authored-by: Copilot <[email protected]>

* - fix(start-node): persist declared defaults of newly-visible fields so saves don't drop required values
- update ui for last day to include hints and next run datetime

---------

Co-authored-by: Jackie Chui <[email protected]>
Co-authored-by: Henry <[email protected]>
Co-authored-by: Copilot <[email protected]>
2026-05-01 22:39:20 +01:00
yau-wd da8b251a9a Fix FLOWISE 566 OAuth2 (#6276)
* fix: flowise 556 oauth2

* fix(flowise-566): code review suggestions from Gemini

* feat(oauth2Security.test.ts): add test script

* feat(constants.ts): add Pipedream to default OAuth2 allowed domains
2026-04-28 21:22:48 +08:00
Hoang DoanandHenry 3d7597717a feat: implement the custom MCP Server in tool (#6205)
* feat: implement the custom MCP Server in tool

- Implemented MCPServersTable for displaying MCP server data with status badges and tools count.
- Created CustomMcpServerDialog for adding and editing custom MCP servers with validation and authorization features.
- Integrated MCP server management into the Tools view with tabbed navigation for Custom Tools and Custom MCP Servers.
- Added pagination and loading states for MCP servers.

* tfix nodes.test.ts ESM load crash

* feat(custom-mcp): harden security, scalability, and UI polish

* enhance custom mcp server creation flow and UI updates

* feat(mcp): add MCP server handshake timeout, enhance UI UX for editing custom mcp server

---------

Co-authored-by: Henry <[email protected]>
2026-04-23 16:52:07 +01:00
Hoang DoanandHenry 62a5d1d59c feat: turn chatflow into MCP server (#5930)
* feat: turn chatflow into MCP server

- Added '@modelcontextprotocol/sdk' version 1.12.0
- Added 'zod' version 3.25.32
- Added migrations for MCP server config
- Added MCP endpoints (Streamable HTTP and SSE)
- Added MCP server configuration tab
- Added unit tests for MCP endpoints and services

* feat: Implement MCP endpoint service with SSE support

- Added a new MCP endpoint service to handle requests for chatflows, including support for SSE (Server-Sent Events) and stateless transport.
- Introduced functions for handling MCP requests, SSE connections, and message routing.
- Implemented error handling for service errors and session management for SSE.
- Created unit tests for the MCP server service, covering configuration CRUD operations and token management.
- Updated the MCP server configuration logic to ensure proper validation and error handling.
- Refactored the UI component to utilize a new API hook for fetching MCP server configuration.

* chore: handle error when get mcp server config

* - Introduced a new chat type 'MCP' in the ChatType enum, including UI filters and backend processing.
- Updated the zod dependency version specification to support both ^3.25.76 and ^4.
- Fix setHasExistingConfig

* fix: update chatflowCallback to enable chatflow building with active state for MCP

* refactor: remove deprecated SSE transport endpoints and related logic

- Removed handleGet and handleSseMessage methods from MCP endpoint controller.
- Updated MCP endpoint routes to eliminate SSE-related routes.
- Refactored service layer to remove SSE session management and related methods.
- Updated tests to remove references to deprecated SSE functionality.
- Adjusted UI component to remove SSE endpoint URL handling.

* chore: update MCP endpoint routes and references to align with new API structure

* chore: remove abortChatMessage when mcp request closed

* optimize mcpserver dialog for dark mode

* feat: implement form input schema generation for agentflow chatflows

---------

Co-authored-by: Henry <[email protected]>
2026-04-15 20:36:28 +01:00
Justin Head 6f325b0c0f Support CORS credentials (cookies) via env var (#6029) 2026-03-24 16:48:53 -07:00
christopherholland-workdayandchristopherholland-workday aff06479aa Control Path Traversal Protections via Env Var (#5962)
* Fix isPathTraversal method to be less strict

* Fix isPathTraversal method to be less strict

* Control isPathTraversal via an Env Var

* Path traversal check env var

---------

Co-authored-by: christopherholland-workday <[email protected]>
2026-03-16 08:40:26 -07:00
chiragjaggaandHenry 07ef4bbec8 Add support for azure blob storage and storage refactor (#5604)
* storageUtils functions azure storage

* interface, base and local storage provider

* s3 storage provider

* gcs, azure storage provider

* refactor final changes

* fix gcs path bug

* gemini and lint fixes

* documentation changes

* update pnpm lock

* update azure winston to ESM imports

---------

Co-authored-by: Henry <[email protected]>
2026-03-04 21:58:08 +08:00
christopherholland-workday 219b040065 fix: Control default deny list via an env var (#5862)
* Control default deny list via an env var

* fix: Control default deny list via an env var

---------
2026-03-02 14:44:34 -08:00
75ce181a68 Updates to environment and initialization logic (#5683)
* fix: make TOKEN_HASH_SECRET required and add check on server start

* fix: make EXPRESS_SESSION_SECRET required and add check on server start

* fix: make jwt variables required and validate on server start

* fix: formatting

* fix: cypress tests

* fix: remove env file for cypress and refactor

* revert: changes to workflow and env examples

* update: how missing/weak default secrets are handled

* update: how auth secrets are setup and read

* fix: update env examples for docker

* fix: weak defaults list

* fix: weak defaults list

---------

Co-authored-by: yau-wd <[email protected]>
Co-authored-by: yau-wd <[email protected]>
2026-02-25 21:40:12 +08:00
e135b29433 Feature/Add Permissions To API Keys (#5590)
* feat(database.util.ts): add function to check if column exists in table

* feat(migrations): add permission column to apikey table

* chore(services/apikey): remove auto-create default API key

* chore: remove auto-create default API key

* fix(migrations): rename permission to permissions in apikey table

* feat(services/apikey): add permissions to create and update

* feat(views/apikey): add permissions to create and update

* feat(api): use API key permissions instead of role permissions

* feat(permissions): filter by user.permissions except for ROLE type

* feat(services/apikey): filter keys by user permissions in getAllApiKeys

* feat(services/apikey): limit API key permissions to user permissions during creation/update

* fix(database.util.ts): replace non-null assertion with explicit error handling

* feat(services/apikey): log errors for malformed API key permissions

* refactor(services/apikey): extract permission validation

* feat(permission): enhance permission filtering based on user features and platform type

* chore(migrations): lower API key permission value

* Update packages/ui/src/views/apikey/APIKeyDialog.jsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update packages/ui/src/views/apikey/APIKeyDialog.jsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: remove deprecated APIKEY_PATH and APIKEY migration

* refactor(apikey): remove functionality related to import apikey

* feat(permission): filter out workspace and admin categories for non-ROLE

* feat(services/apikey): validate API key permissions during create and update

* chore(migrations): clean up role permissions values

* fix(migrations): handle corrupted permissions gracefully

* fix(server/src/index.ts): add error handling for API key permissions parsing

* fix(APIKeyDialog.jsx): handle corrupted permissions when editing API key

* fix(views/apikey/index.jsx): handle corrupted permissions in API key list

* fix(services/apikey): validate permissions JSON in API key operations

* Potential fix for code scanning alert no. 83: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat(migrations): change ApiKey.permissions column from TEXT to JSON

* Update packages/server/src/services/apikey/index.ts

Co-authored-by: Jocelyn Lin <[email protected]>

* feat(PricingDialog.jsx): handle downgrade with excessive apikey permissions

* feat(controllers\apikey): enforce permissions validation

* chore(services/apikey): remove redundant null checks

* fix(services/dataset): throw error when dataset not found before fetching rows

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Jocelyn Lin <[email protected]>
2026-01-16 12:21:48 +08:00
Lê Nam Khánh 4624e15c2e chore: fix typos in docker/worker/Dockerfile (#5435)
Fix typos in docker/worker/Dockerfile
2025-11-07 11:29:14 +00:00
Ilango 37ef6ffa50 fix: add missing log filter env variables to examples (#5376)
* Sanitize sensitive fields in request header and body in logger

* fix: log request headers, body, and query only when debug logs are enabled

* fix: add missing env to examples

* fix: crash due to missing env vars
2025-10-28 16:14:49 +05:30
Henry Heng a86f618186 Chore/Secure Cookies Env Variable (#5281)
Enhanced cookie security handling in the passport middleware to allow explicit configuration of secure cookie settings.
2025-10-01 11:54:07 +01:00
YauandHenry Heng b5da234ce7 Add environment variable control for trust proxy setting (#5226)
* feat: allow trust proxy setting to be configured via environment variable

* fix: restore HTTP_DENY_LIST in .env.example after merge conflict

* feat: add conditional handling for trust proxy

* feat: add trust proxy environment variable documentation

* feat: add trust proxy environment variable sample value

* fix: handle empty trust proxy string in docker environment

---------

Co-authored-by: Henry Heng <[email protected]>
2025-09-27 14:08:55 +01:00
Ilango e48f28d13d Update SSL-related env for database connections (#5242) 2025-09-26 10:05:35 +01:00
Henry Heng 41131dfac3 Feat/Enhance security validation for MCP configurations (#5232)
feat: enhance security validation for MCP configurations

- Added environment variable checks for CUSTOM_MCP_SECURITY_CHECK, CUSTOM_MCP_PROTOCOL, and HTTP_DENY_LIST across various Docker and application files.
- Implemented validation functions in MCP core to prevent command injection and ensure safe environment variable usage
2025-09-18 14:37:31 +01:00
Henry Heng 42152dd036 Chore/Disable Available Dep By Default (#5231)
disable available dependencies by default, only allow when ALLOW_BUILTIN_DEP is set to true
2025-09-18 12:03:08 +01:00
Jake A. Smith 141c49013a Update README.md (#5033)
Fixed documentation link
2025-08-07 00:54:04 +01:00
Henry Heng 8ba1a09077 Bugfix/Update worker docker (#4643)
update worker docker
2025-06-12 17:25:43 +01:00
Sai Shreya Kumar f644c47251 fix(docker): uncomment required env variables (#4606)
* fix(docker): uncomment required env variables

* fix(env): uncomment required JWT variables in Server .env.example
2025-06-09 13:19:02 +01:00
Henry 82e21d1fed update docker compose files 2025-05-29 20:15:23 +01:00
Henry Hengandchungyau97 5a37227d14 Chore/refractor (#4454)
* markdown files and env examples cleanup

* components update

* update jsonlines description

* server refractor

* update telemetry

* add execute custom node

* add ui refractor

* add username and password authenticate

* correctly retrieve past images in agentflowv2

* disable e2e temporarily

* add existing username and password authenticate

* update migration to default workspace

* update todo

* blob storage migrating

* throw error on agent tool call error

* add missing execution import

* add referral

* chore: add error message when importData is undefined

* migrate api keys to db

* fix: data too long for column executionData

* migrate api keys from json to db at init

* add info on account setup

* update docstore missing fields

---------

Co-authored-by: chungyau97 <[email protected]>
2025-05-27 07:29:42 +01:00
Henry Heng 624143ad15 Chore/disable telemetry by default (#4427)
disable telemetry by default
2025-05-15 00:19:05 +08:00
eadf1b11b3 Fix: Add keep-alive options to Redis clients to prevent idle timeouts and socket closing. (#4377)
* redis keepalive mechanism for all redis

* removed offline queue commands

* Simplified changes for consistency. Added REDIS_KEEP_ALIVE env variable.

* update redis socket alive env variable

* lint fix

---------

Co-authored-by: Henry <[email protected]>
Co-authored-by: Henry Heng <[email protected]>
2025-05-14 10:29:32 +08:00
Henry Heng b55fe07511 Feature/add enable bull dashboard env var (#4373)
add enable bull dashboard env var
2025-05-04 21:55:16 +08:00
c318fc57e9 Feat: Support Google Cloud Storage (#4061)
* support google cloud storage

* update example and docs for supporting google cloud storage

* recover the indent of pnpm-lock-yaml

* populate the logs to google logging

* normalize gcs storage paths

---------

Co-authored-by: Ilango <[email protected]>
Co-authored-by: Henry <[email protected]>
2025-04-14 22:52:54 +08:00
Henry Heng 8e63b999b8 Feature/Add remove on age and count to bullmq (#4249)
add remove on age and count to bullmq
2025-04-03 16:07:10 +08:00
Saqib Ahmed 7867489727 Add curl in docker image for native healthchecks (#4170)
* Add curl in docker image for native healthchecks

Fixes this issue: https://github.com/FlowiseAI/Flowise/issues/4126

* fix: add container-native healthcheck

- Added curl utility in dockerfile
- Added healthcheck configuration in docker compose

* fix: exclude ping endpoint from logging
2025-03-14 15:24:17 +00:00
Henry Heng a2a475ba7a Feature/Add bullmq redis for message queue processing (#3568)
* add bullmq redis for message queue processing

* Update pnpm-lock.yaml

* update queue manager

* remove singleton patterns, add redis to cache pool

* add bull board ui

* update rate limit handler

* update redis configuration

* Merge add rate limit redis prefix

* update rate limit queue events

* update preview loader to queue

* refractor namings to constants

* update env variable for queue

* update worker shutdown gracefully
2025-01-23 14:08:02 +00:00
Lucas Mohallem FerrazandHenry 1ae78c2739 [Feat] Allow AWS SECRETS MANAGER instead of storing AES Encrypted in db (#3616)
* AWS Secrets

* AWS Secrets support

* add examples

* remove test compose

* fix lint

* update aws secret manager implementation

* update secret manager client

* update comments

---------

Co-authored-by: Henry <[email protected]>
2025-01-08 20:24:57 +00:00
Henry Heng 50475f1fe5 Feature/add disabled nodes env variable (#3797)
* add disabled nodes env variable

* add bugfix to speech to text
2025-01-02 16:49:41 +00:00
Vinod KiranandHenry fe03683f0c FEATURE:: Support for metrics collection - Prometheus and Open Telemetry (#3420)
* adding support for prometheus and grafana

* open telemetry

* lint fixes

* missing counter and telemetry standardization

---------

Co-authored-by: Henry <[email protected]>
2024-11-08 00:00:43 +00:00
Henry Heng 39380a4bc7 Bugfix/add proxy env vars to docker compose (#3438)
add proxy env vars to docker compose
2024-11-01 18:13:21 +00:00
akoo24andHenry d9bf612448 Support global-agent for central proxy configuration (#3423)
* * Added global-agent as central Global HTTP/HTTPS proxy configurable using environment variable
**  https://www.npmjs.com/package/global-agent
* Server-Bootstrap on index.js
** import 'global-agent/bootstrap'
* added dep in package.json
** global-agent: "^3.0.0

* * Added global-agent as central Global HTTP/HTTPS proxy configurable using environment variable
**  Added env variables

* update env example

* update env and lock file

* update env and lock file

---------

Co-authored-by: Henry <[email protected]>
2024-11-01 18:05:04 +00:00
thiagolealassisandThiago Assis 7868c8c3a1 Added S3_FORCE_PATH_STYLE environment variable support for AWS S3 client configuration to ensure compatibility with custom S3 endpoints and path-style URLs. This change sets the forcePathStyle option based on the environment variable, defaulting to false if not provided. (#3315)
Co-authored-by: Thiago Assis <[email protected]>
2024-10-07 16:00:48 +01:00
CrossandHenry Heng 57420826ed Correct "as" casing (#3216)
* Correct "as" casing

* Remove "version" line from docker compose file

* Update docker-compose.yml

---------

Co-authored-by: Henry Heng <[email protected]>
2024-09-19 18:38:43 +01:00
Henry Heng 27cb143fef Feature/Community Node (#2902)
add feature to enable community node
2024-07-29 16:52:47 +01:00
Vinod KiranandHenry 2dd1791ec2 Feature: Option to add apikeys to the DB instead of api.json. (#2783)
* Feature: Option to add apikeys to the DB instead of api.json.

* add api storage type env variable

* code cleanup and simplification.

* md table fixes

---------

Co-authored-by: Henry <[email protected]>
2024-07-26 17:52:12 +01:00
Henry Heng 1c730323e2 Feat/add s3 custom url (#2891)
add s3 custom url
2024-07-26 15:39:24 +01:00
Henry Heng 363d1bfc44 Chore/update deprecating nodes (#2540)
* update deprecating nodes

* add filters use cases to marketplace

* update log level
2024-07-12 18:37:57 +01:00
William Espegren 7166317482 Fix docker command (#2743)
* fix docker compose

* correct docker compose command
2024-07-12 17:57:58 +01:00
Daniel D'Abate be3a887e68 Improvement - Reduce size of final docker image with multistage build (#2598)
* Reduce size of final docker image with multistage build

* Dockerfile - Move PUPPETEER_SKIP_DOWNLOAD flag to build stage
2024-06-07 15:35:57 +01:00
Erasmo PinheiroandErasmo De Souza Pinheiro 5a73eaa588 fix: Change the CMD flowise command in Dockerfile to be the same as in the document (#2563)
* fix: Change the CMD flowise command to be the same as in the documentation.

* Remove unnecessary npx command from dockerfile

* Command was changed by the entrypoint in Docker Composer

---------

Co-authored-by: Erasmo De Souza Pinheiro <[email protected]>
2024-06-04 16:23:30 +01:00
Daniel D'Abate 5ba9493b30 Feature - Env variable to disable ChatFlow reuse (#2559) 2024-06-04 10:11:57 +01:00
Hariharan1828 b952350a7b fix CORS issue in .env.example (#2370)
* fix CORS issue in .env.example

* Fixed the IFRAME_ORIGINS
2024-05-10 18:05:03 +01:00
Henry Heng 38ce851200 remove cmake from dockerfile 2024-05-09 16:52:19 +01:00
Henry ef532866fd add docker image CI workflow 2024-05-07 00:13:27 +01:00
Henry Heng fa3d21bc30 Chore/update docker node version 20 (#2271)
update docker node version 20
2024-04-26 14:52:08 +01:00
Vinod KiranandHenry 7006d64de0 Feature/s3 storage (#2226)
* centralizing file writing....

* allowing s3 as storage option

* allowing s3 as storage option

* update s3 storage

---------

Co-authored-by: Henry <[email protected]>
2024-04-23 11:35:38 +01:00
Vinod KiranandHenry 788d40f26b Feature/externalize model list (#2113)
* fixes

* test json

* test json

* externalize model list

* externalize model list

* correcting awsChatBedRock Name

* lint fixes

* externalize models

* externalize chat models

* externalize chat models

* externalize llm models

* externalize llm models

* lint fixes

* addition of models for ChatMistral

* updating version numbers for all imapacted nodes.

* marketplace template updates

* update embeddings, marketplaces, add chatCohere

* config changes for new env variable

* removal of local models.json

* update models json file

---------

Co-authored-by: Henry <[email protected]>
2024-04-12 12:46:10 +01:00