Commit Graph

320 Commits

Author SHA1 Message Date
Yeuoly b97cce7167 enhance(cli/icon): add multiple categories default plugin icons (#388)
* feat: add support for dark icon

- Introduced IconDark field in PluginDeclaration and related structures to support dark mode icons.
- Updated the installation process to handle dark icons.
- Enhanced asset validation to check for the presence of dark icons.

This change improves the visual consistency of plugins in dark mode environments.

* enhance(cli/icon): add plugin icon support with multiple categories

- Added support for light and dark icons for various plugin categories including agent, datasource, extension, model, tool, and trigger.
- Replaced the previous single icon implementation with a structured map for better organization and retrieval of icons based on category and theme.
- Removed the old Python icon file to streamline asset management.

This update improves the visual representation of plugins across different themes, enhancing user experience.

* change icons

* fix

* fix

* comments
2025-07-08 12:48:48 +08:00
Tsonglew 166609f3f6 fix: launch error when using redis sentinel (#352) 2025-06-23 16:51:22 +08:00
Yeuoly dfc9622e91 feat(db): enhance database configuration with charset and extras support (#347)
- Updated .env.example to include DB_EXTRAS and DB_CHARSET variables.
- Refactored InitPluginDB functions for PostgreSQL and MySQL to accept a configuration struct, allowing for more flexible database connection settings.
- Adjusted connection pool settings to utilize new configuration options for charset and extras.

This change improves the configurability of database connections and prepares the codebase for future enhancements.
2025-06-18 12:08:56 +08:00
Byron.wang 18e91bbb37 fix s3 client path style not used (#344)
* bump cloud-kit version to fix #343

* change env name USE_AWS_S3 to S3_USE_AWS

* update s3_use_aws default value to true

* update readme about the upgrade notice
2025-06-13 15:10:21 +08:00
Byron.wang debb3744c0 add USE_AWS_S3 args avoid ambiguity. (#340) 2025-06-11 14:32:53 +08:00
湛露先生 5573e1fbd1 Fix env read bug for GCS_CREDENTIALS. (#324) 2025-06-02 09:03:30 +08:00
Byron.wang 1c9e28bc75 Feat: Replace the internal/oss module with dify-cloud-kit (#317)
* replace internal oss with dify-cloud-kit

* remove validate

* fix tests

* fix tests
2025-05-30 16:44:59 +08:00
Yeuoly c799d90e88 chore: coding style (#291)
- Renamed parameters for consistency and clarity, changing `tenant_id`, `plugin_unique_identifier`, and `install_type` to `tenantId`, `pluginUniqueIdentifier`, and `installType` respectively across multiple functions.
- Updated corresponding database queries to reflect the new parameter names, enhancing code readability and maintainability.
2025-05-20 17:14:44 +08:00
Zhi 6b112bc8b5 feat(redis): Add support for Redis Sentinel mode (#276)
* feat(redis): Add support for Redis Sentinel mode

Added support for Redis Sentinel mode to the Redis client, enabling automatic discovery and connection to the primary node through Sentinel. Updated relevant configuration files and initialization logic to support Sentinel mode configuration and connection.

* add lost RedisUser.
2025-05-20 14:23:01 +08:00
Yeuoly d884cab8ae feat: add plugin reinstallation functionality and admin API support (#285)
* feat: add plugin reinstallation functionality and admin API support

- Implemented ReinstallToAWSFromPkg method to allow reinstallation of plugins on AWS Lambda, updating function URL and name.
- Added clearServerlessRuntimeCache method to manage serverless runtime cache.
- Enhanced LaunchPlugin to support an ignoreIdempotent flag for forced reinstallation.
- Introduced admin API endpoints for plugin reinstallation, secured with an API key validation middleware.
- Updated configuration to include AdminApiEnabled and AdminApiKey settings.

* refactor: update plugin reinstallation endpoint and improve unauthorized response

- Changed the plugin reinstallation endpoint from "/plugins/reinstall" to "/plugin/serverless/reinstall" for better clarity.
- Modified the unauthorized response in the AdminAPIKey middleware to return a more descriptive JSON message.
2025-05-15 15:22:25 +08:00
Bowen Liang 5193a3ff4d update (#266) 2025-05-09 12:41:39 +08:00
bravomark 7492a3d8cd feat: Support Alibaba Cloud OSS (#261)
* feat: support aliyun OSS

* feat: support aliyun OSS
2025-05-07 16:46:18 +08:00
Good Wood 977665e73b feat: add read & write timeout config (#259)
* feat: add read & write timeout config

* refactor: update Dify invocation configuration to use structured payload

- Changed the Dify invocation daemon to accept a structured payload for initialization, improving clarity and maintainability.
- Updated related configuration variables in the .env.example file to reflect the new naming convention for backwards invocation timeouts.
- Adjusted tests and plugin manager to accommodate the new payload structure.

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-05-06 13:08:02 +08:00
quicksand 2858ac210c optimize (db): add db pool config (#251) 2025-04-30 15:36:35 +08:00
Yeuoly 61bd7d9c8a feat: add configurable stdio buffer sizes for plugins (#256)
- Introduced new configuration options for plugin stdio buffer sizes in the .env.example file.
- Updated the PluginManager and LocalPluginRuntime to utilize these new buffer size settings.
- Enhanced the stdioHolder to accept buffer size configurations, improving plugin output handling.
- Modified related tests to accommodate the new stdioHolder configuration structure.
2025-04-30 15:28:34 +08:00
Taeyoung Park 5d83258371 Add optional Redis username authentication (#218)
* You can include username for Redis Auth

* Redis auth with username - test code update

* fix: tests

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-04-25 20:42:14 +08:00
Hironori Yamamoto 2406e0a09f feat: implement gcs storage (#237)
Co-authored-by: Hironori Yamamoto <hironori-yamamoto@m3.com>
2025-04-25 13:29:08 +08:00
Yeuoly 9730b7dc63 tests: enhance integration testing for specific plugins (#242)
* feat: enhance integration testing for specific plugins

- Added integration tests for the official agent, including test data for agent strategy invocation.
- Introduced JSON schema generation and validation utilities to ensure proper request formatting.
- Enhanced mock invocation handling in the plugin manager to support tool parameters.
- Added new test utilities for simulating OpenAI server responses and managing plugin runtime.

* fix: update RunOnce function to return response stream and enhance integration test

- Modified the RunOnce function to return a response stream instead of an error, allowing for better handling of streamed responses.
- Updated the integration test for the official agent to read from the response stream, ensuring proper validation of the agent strategy invocation.
2025-04-24 16:33:50 +08:00
kurokobo ced2ef3842 feat: support NO_PROXY for initialization process (#199) 2025-04-14 20:03:15 +08:00
Yeuoly 984456b96e feat(plugin_manager): add serverless connector launch timeout configuration and update related functions (#197) 2025-04-11 17:53:39 +08:00
非法操作 25e013618a fix self.session.delete alway success (#12)
* fix self.session.delete alway success

* fix save data always failed

* redis delete response deleted item num

* add deleted num to invocate response
2025-04-11 13:32:52 +08:00
非法操作 618609af3a add uv path config (#187)
* add uv path config

* write uv_path to env during docker build process

* Revert "write uv_path to env during docker build process"

This reverts commit c9501411aa.

* add UVPATH
2025-04-10 15:16:22 +08:00
Yeuoly 0a556dfd54 Merge pull request #172 from te-chan/feat/azure-blob-storage
feat(storage): add azure blob storage support
2025-04-08 14:41:48 +09:00
Yeuoly 398762558e Merge pull request #128 from zxfishhack/cache-endpoint-and-plugin-install
add cache for endpoint by hook_id and pluginInstallation by plugin_id&tenant_id
2025-04-07 12:22:47 +09:00
zxfishhack 9996714f2d Merge branch 'main' into cache-endpoint-and-plugin-install 2025-04-07 10:15:23 +08:00
te-chan 2f84673539 feat: Add Azure blob storage connectivity 2025-04-03 21:17:47 +09:00
kurokobo 6f75bcca43 feat: verify plugin with public keys specified in environment variable in addition to official one 2025-04-02 13:48:04 +00:00
Yeuoly b5fefd1a99 Merge pull request #152 from quicksandznzn/add-redis-db-config
optimize: add redis db config
2025-03-30 21:10:27 +09:00
Yeuoly 900af90e0b Merge pull request #135 from AkisAya/feat/enhance-s3-compatible
make pathStyle param configurable when using s3 compatible storage
2025-03-28 23:48:27 +09:00
quicksandzn b50a0c4403 optimize: add redis db config 2025-03-27 14:48:59 +08:00
He Wang 19c1009fb4 test plugin server with mysql 2025-03-27 11:54:27 +08:00
zxfishhack 3aa0490294 use AutoTypeWithGetter 2025-03-24 16:56:40 +08:00
He Wang d4aefed92c support to use mysql as plugin db 2025-03-23 14:41:45 +08:00
akisaya 038f152769 make pathStyle param configurable when using s3 compatible storage 2025-03-22 16:59:15 +08:00
zxfishhack 1e5e03eaf0 add cache for endpoint by hook_id and plugin by plugin_id&tenant_id 2025-03-20 17:20:07 +08:00
Yeuoly ef41d22df4 Merge pull request #97 from quicksandznzn/main
feat: oss support tencent cos
2025-03-20 15:56:48 +08:00
Yeuoly a0e595c3b2 Merge pull request #116 from dawnwords/feat/python-compileall-extra-args
feat(plugin-manager): add support for additional Python compileall arguments
2025-03-19 12:46:15 +08:00
yuhang2.zhang 261886167b update: Add Support for Custom S3 Endpoints to Enhance Compatibility with S3-Compatible Services. 2025-03-18 17:20:47 +08:00
Jingxiao Gu b16991eb0d feat(plugin-manager): add support for additional Python compileall arguments
Introduce `pythonCompileAllExtraArgs` to allow users to pass extra arguments to the Python `compileall` command. This enhancement enables more flexible compilation options for plugins by extending the configuration in the plugin manager and local runtime components.

- Updated `launcher.go` to include `PythonCompileAllExtraArgs` in the runtime configuration.
- Modified `environment_python.go` to handle the additional compile arguments.
- Added new configuration fields in `type.go` and `config.go`.
- Adjusted initialization in `manager.go` to accept the new configuration parameter.
2025-03-18 17:04:41 +08:00
quicksandzn d3db63ea68 feat: oss support tencent cos 2025-03-12 11:25:38 +08:00
mr-chenguang lcgash 0cd7591aea change log health api by env switch 2025-03-11 07:58:16 +00:00
Yeuoly cf7649a0b2 feat: add pip configuration options for plugin environment setup (#63)
* feat: add pip configuration options for plugin environment setup

Enhance Python plugin environment initialization with new configuration options:
- Add support for pip prefer binary flag
- Add pip verbose mode
- Add extra pip arguments configuration
- Set default values for new pip-related configuration options

* fix

* fix
2025-03-06 14:53:40 +08:00
Yeuoly 964549d31f feat: enhance database initialization with fallback connection strategy (#58)
- Add support for connecting to a default database when target database connection fails
- Introduce new configuration parameter `DBDefaultDatabase` with default value "postgres"
- Modify `initDifyPluginDB` to attempt connection to default database and create target database if needed
- Update test case to include default database parameter
2025-03-06 13:20:17 +08:00
Yeuoly 942d694206 feat: increase default plugin max execution timeout to 10 minutes (#56) 2025-03-05 13:37:28 +08:00
Yeuoly 8e59ac8b9a feat: add Python plugin pre-compilation and update plugin upgrade logic (#54)
* feat: add Python plugin pre-compilation and update plugin upgrade logic

This commit introduces two main changes:
1. Pre-compilation of Python plugins during environment initialization to improve initial runtime performance
2. Updated plugin upgrade logic to use PluginID instead of string identifier for agent strategy installation

* refactor: update plugin installation deletion to use PluginID consistently

Remove PluginUniqueIdentifier from deletion conditions in UninstallPlugin and UpgradePlugin methods, standardizing the use of PluginID across different installation types
2025-03-05 12:50:00 +08:00
Yeuoly 171a56c7f9 feat: add plugin local launching concurrency configuration (#40) 2025-02-28 12:26:32 +08:00
Yeuoly 10e3d5d51e feat: add remote declaration support for plugin installation 2025-02-26 11:02:47 +08:00
Yeuoly c7279019b8 feat: enhance plugin upgrade with installation type management 2025-02-25 21:58:56 +08:00
Yeuoly b19140ca23 refactor: optimize plugin declaration caching and encoding (#34) 2025-02-25 20:52:51 +08:00
Yeuoly 6a54d44142 refactor: rename aws_lambda to serverless 2025-02-10 15:04:24 +08:00