Commit Graph

99 Commits

Author SHA1 Message Date
Harry 2856d56513 Merge remote-tracking branch 'origin/main' into feat/datasource
# Conflicts:
#	internal/types/models/curd/atomic.go
2025-09-16 15:56:03 +08:00
Yunlu Wen 9e3081bd17 feat: support orphan plugin (#440)
* support orphan plugin in serverless mode

* add validation to UpgradePlugin

* log reinstalls
2025-09-12 20:34:38 +08:00
Novice 71cc259338 feat: add rag tag 2025-09-02 22:12:20 +08:00
Harry 867b61c213 fix(plugin_entities): remove output_schema validation tests 2025-08-26 12:29:41 +08:00
Harry e758592e5a refactor(json_schema): remove json schema definitions and validation 2025-08-25 19:20:03 +08:00
Tianyi Jing 526addc778 fix: add missing types of tool_parameter (#421)
Signed-off-by: jingfelix <jingfelix@outlook.com>
2025-08-23 18:52:32 +08:00
Harry cd091378ce refactor(plugin_entities): update validation for OnlineDriveBrowseFilesRequest prefix field to be optional 2025-08-11 15:24:52 +08:00
Betula-L 21015d4474 fix credential type (#419) 2025-08-08 21:56:34 +08:00
Harry 9ce516a3cd refactor(plugin_entities): enhance schema processing with checks and error handling 2025-08-08 17:13:04 +08:00
Harry 7c40929ddd refactor(plugin_entities): built-in schema & new datasource structure 2025-08-08 15:56:08 +08:00
Harry 7699ab00a9 refactor(plugin_entities): remove unused properties from built-in schema definitions 2025-08-08 11:02:11 +08:00
Harry 50b81c0232 refactor(plugin_entities): centralize built-in schema definitions and processing 2025-08-07 17:19:08 +08:00
Harry 0e9ec24f16 Merge remote-tracking branch 'origin/main' into feat/datasource
# Conflicts:
#	internal/core/plugin_daemon/access_types/access.go
#	internal/server/http_server.gen.go
2025-08-07 12:01:06 +08:00
Harry e6f0bd7973 test(plugin_entities): add unit tests for schema definitions and YAML processing 2025-08-07 00:38:53 +08:00
Harry 99fcbd138d feat(plugin_entities): add built-in schema definitions and processing for datasource YAML 2025-08-07 00:33:00 +08:00
Harry 71edd1a7aa feat: built-in json schema definations 2025-08-01 15:13:32 +08:00
Yeuoly 80389be55b chore(deps): update go-git and golang.org/x/tools dependencies (#410)
- Updated github.com/go-git/go-git from v4.7.0 to v5.16.2.
- Bumped golang.org/x/tools from v0.22.0 to v0.35.0.
- Added indirect dependencies for github.com/go-git/gcfg and github.com/go-git/go-billy.
- Updated various indirect dependencies including golang.org/x/net, golang.org/x/sys, and golang.org/x/text.
2025-07-23 16:22:48 +08:00
Yeuoly bace3bfb58 feat(oauth): implement refresh credentials functionality (#408)
* feat(oauth): implement refresh credentials functionality

- Added RefreshCredentials endpoint to handle OAuth credential refresh requests.
- Introduced RequestOAuthRefreshCredentials structure for request validation.
- Updated access types and actions to include refresh credentials.
- Enhanced server routing and controller logic to support the new functionality.
- Updated OAuth entities to include expiration handling for refreshed credentials.

* feat(oauth): add metadata field to OAuthGetCredentialsResult

---------

Co-authored-by: Harry <xh001x@hotmail.com>
2025-07-23 13:11:36 +08:00
Yeuoly 7f463e32f6 feat(plugin_decoder): add support for internationalized readme files (#393)
* feat(plugin_decoder): add support for internationalized readme files

- Introduced the AvailableI18nReadme method in the PluginDecoder interface to retrieve available readme files in multiple languages.
- Implemented the method in FSPluginDecoder and ZipPluginDecoder to read localized readme files from the filesystem and zip archives.
- Enhanced UnixPluginDecoder to handle readme files in a structured manner, including support for reading from a dedicated "readme" directory.
- Added unit tests to verify the functionality of the AvailableI18nReadme method and ensure correct retrieval of localized readme content.

* feat(plugin): add support for multilingual README generation

- Introduced functionality to create README files in multiple languages (Simplified Chinese, Japanese, Portuguese) based on user selection.
- Enhanced the profile management to include options for enabling internationalized README and selecting languages.
- Added new language choice structure to manage language options and their selection state.
- Implemented rendering and writing of language-specific README files during plugin creation.
- Included new README template files for each supported language.

* feat(plugin): add README command and list functionality

- Introduced a new `readme` command to the plugin CLI for managing README files.
- Added `list` subcommand to display available README languages for a specified plugin path.
- Implemented functionality to read and list supported README languages in a tabular format.
- Enhanced error handling for plugin file reading and decoding processes.
2025-07-21 16:02:26 +08:00
Harry 9eefb38552 feat: add metadata field to OAuthGetCredentialsResult 2025-07-18 18:33:43 +08:00
Harry eb2d0e917c Merge remote-tracking branch 'origin' into feat/datasource 2025-07-18 12:57:01 +08:00
Maries a0414b30e6 0.2.0 (#402)
* feat(oauth): add RedirectURI field to OAuth request structures

* feat(oauth): update OAuthSchema validation

* feat: add Context field to request and session structures

* feat: add CredentialType field to Credentials and InvokeToolRequest structures

* fix: handle unhandled default case in basic_type.go

* feat: add support for build branches in build-push.yml
2025-07-17 16:28:43 +08:00
Yeuoly 7bc3b7565e feat(plugin_manager): enhance asset remapping for icons (#392)
- Refactored the RemapAssets function to streamline the remapping of icon fields for both models and tools, including support for dark mode icons.
- Introduced new fields IconSmallDark and IconLargeDark in the ModelProviderDeclaration and added IconDark in ToolProviderIdentity to accommodate dark mode assets.
- Improved error handling during the remapping process for better clarity and maintainability.
2025-07-09 17:02:57 +08:00
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
Harry d39e38e6cd feat: update request types for online drive browsing and downloading 2025-07-04 11:34:27 +08:00
Harry 57fd5221b7 refactor: rename OnlineDocumentPageChunk to DatasourceGetPagesResponse and update related references 2025-07-02 23:11:39 +08:00
Harry 9321ebdc02 Merge remote-tracking branch 'origin/main' into feat/datasource
# Conflicts:
#	internal/core/plugin_daemon/access_types/access.go
#	internal/server/controllers/definitions/definitions.go
#	internal/server/http_server.gen.go
2025-07-02 22:53:35 +08:00
Yeuoly 6d6fb3892e feat: add InvokeLLMWithStructuredOutput functionality (#369)
* feat: add InvokeLLMWithStructuredOutput functionality

- Introduced a new method InvokeLLMWithStructuredOutput to the BackwardsInvocation interface for handling structured output requests.
- Added corresponding request and response types to support structured output.
- Implemented the method in both RealBackwardsInvocation and MockedDifyInvocation for testing purposes.
- Updated permission handling and task execution for the new structured output invocation type.

This enhancement allows for more flexible and detailed responses from the LLM, improving the overall functionality of the invocation system.

* refactor: enhance LLMResultChunkWithStructuredOutput structure

- Updated the LLMResultChunkWithStructuredOutput type to include additional fields: Model, SystemFingerprint, and Delta.
- Added comments to clarify the reasoning behind the structure and the use of type embedding for JSON marshaling.

This change improves the clarity and functionality of the LLMResultChunkWithStructuredOutput type, ensuring proper JSON serialization.

* refactor: streamline LLMResultChunk construction in InvokeLLMWithStructuredOutput

- Simplified the construction of LLMResultChunk and LLMResultChunkWithStructuredOutput by removing unnecessary type embedding.
- Enhanced readability and maintainability of the code while preserving functionality.

This change contributes to cleaner code and improved clarity in the handling of structured output responses.
2025-06-30 12:07:46 +08:00
Harry c1e5ecd06b feat: rename online driver to online drive and update related classes and methods :) 2025-06-27 20:11:48 +08:00
Yeuoly a70d808dd0 feat(dynamic_select): implement dynamic parameter fetching functionality (#358)
* feat(dynamic_select): implement dynamic parameter fetching functionality

- Added FetchDynamicParameterOptions function to handle dynamic parameter selection.
- Introduced new access type and action for dynamic select in access_types.
- Updated HTTP server routes to include the new endpoint for fetching dynamic parameters.
- Created necessary service and controller files for dynamic select operations.

* refactor(access_types): rename dynamic select access type to dynamic parameter

- Updated access type constants to reflect the change from PLUGIN_ACCESS_TYPE_DYNAMIC_SELECT to PLUGIN_ACCESS_TYPE_DYNAMIC_PARAMETER.
- Adjusted related references in the PluginDispatchers and FetchDynamicParameterOptions function to maintain consistency.
2025-06-27 19:24:59 +08:00
Harry 9e25c0ab87 feat: add online_driver datasource type to validation 2025-06-27 18:10:07 +08:00
Harry 15a1019ab2 feat: add online driver file request and response structures 2025-06-27 16:37:50 +08:00
Harry f6a1a16a60 feat: add online driver file request and response structures 2025-06-27 13:49:50 +08:00
Harry c157da6067 feat: add redirect_uri field to OAuth request structs 2025-06-26 14:40:35 +08:00
Dongyu Li 7a798679df feat:datasource 2025-06-18 15:54:09 +08:00
Dongyu Li f780408293 feat:datasource 2025-06-18 11:24:57 +08:00
Dongyu Li 3c3cc46bf6 feat:datasource 2025-06-18 11:22:53 +08:00
Harry 6fe04adca3 feat: datasource 2025-06-13 17:16:39 +08:00
Harry a7bce8b703 feat: datasource 2025-06-12 22:40:05 +08:00
Harry 7bae6c416c feat: streaming datasource 2025-06-10 22:43:29 +08:00
Yeuoly d5696e0415 refactor(datasource): simplify JSON unmarshalling for CredentialsSchema
- Removed complex handling of CredentialsSchema in the UnmarshalJSON method, focusing on the Datasources field.
- Streamlined the code to improve readability and maintainability by eliminating unnecessary checks and logic related to CredentialsSchema.
2025-06-05 20:48:43 +08:00
Yeuoly d1342ecce5 fix: provider type 2025-06-05 17:24:45 +08:00
Yeuoly e9aff41e51 feat(datasource): add support for decoding datasource provider declaration
- Added custom JSON marshalling and unmarshalling methods to handle CredentialsSchema and Datasources more effectively.
- Improved error handling during YAML unmarshalling to support both object and array formats for CredentialsSchema.
- Ensured proper initialization of DatasourceFiles and Tags to prevent nil references.
2025-06-03 16:16:17 +08:00
Novice 0167554a03 feat: add mcp tool type (#315) 2025-05-30 14:05:20 +08:00
Yeuoly ffcd45d2ef feat(tests): add datasource declaration parsing and output
- Introduced a new main.go file for testing datasource declaration parsing.
- Implemented JSON unmarshalling for RemotePluginRegisterPayload and DatasourceProviderDeclaration.
- Added a sample datasource declaration for testing purposes.
2025-05-28 17:24:47 +08:00
Yeuoly c8cf39294a fix(datasource): update OAuthSchema validation to remove unnecessary 'dive' tag
- Modified the validation tag for OAuthSchema in DatasourceProviderDeclaration to simplify the validation process by removing the 'dive' requirement.
2025-05-28 17:24:17 +08:00
Yeuoly 0c4b3f3437 Merge branch 'main' into feat/datasource 2025-05-28 16:55:03 +08:00
Byron.wang b3c68cbeec add packaged file info when plugin package larger than max size (#312) 2025-05-27 13:02:25 +08:00
Yeuoly a953ca2e35 Merge branch 'main' into feat/datasource 2025-05-26 13:14:55 +08:00
Yeuoly 478c98da5c fix: signature dose not work as expected, if upload new pkg to old dify (#311)
- Updated the  method in the  interface to remove the  parameter, simplifying its usage.
- Introduced a new  function to provide a default verification structure.
- Added a  file to store verification data, improving the plugin signing process.
- Enhanced tests in  to validate the verification process, ensuring proper handling of success and failure scenarios.
- Refactored related code to accommodate the new verification structure and improve overall maintainability.
2025-05-26 13:10:34 +08:00