Commit Graph

430 Commits

Author SHA1 Message Date
Harry a844db7a68 refactor: streamline code by improving import order and simplifying function definitions 2025-07-02 16:32:20 +08:00
Harry e8cc4760cb refactor: update type hints to use union syntax and improve import order 2025-07-02 16:15:28 +08:00
Harry 2f5d00aee6 fix: update import statements to include LogMetadata from provider_config 2025-07-02 14:14:31 +08:00
Harry e59d246115 Merge remote-tracking branch 'origin/main' into feat/oauth-datasource
# Conflicts:
#	python/dify_plugin/core/entities/plugin/request.py
#	python/dify_plugin/core/plugin_executor.py
#	python/dify_plugin/entities/__init__.py
#	python/dify_plugin/entities/tool.py
#	python/dify_plugin/interfaces/tool/__init__.py
#	python/dify_plugin/plugin.py
#	python/pyproject.toml
2025-07-02 14:08:12 +08:00
Harry b835fddf34 feat: update _browse_files method to return OnlineDriveBrowseFilesResponse 2025-07-02 13:30:16 +08:00
Yeuoly c1e36d653c Refactor: standardize string quotes for model name retrieval in OpenAI compatible interfaces (#168) 2025-06-28 00:24:10 +08:00
cyflhn 4aabe2b650 add endpoint model name in credentials for openai compatible interface (#24)
Co-authored-by: root <root@localhost.localdomain>
2025-06-27 23:58:22 +08:00
Harry ab07c664d9 feat: rename online driver to online drive and update related classes and methods :) 2025-06-27 20:13:00 +08:00
Harry 7b06a2ac23 feat: add online driver datasource 2025-06-27 16:33:44 +08:00
belugaliu cfb551dd88 fix[0.4.0]: add response body to CredentialsValidateFailedError exceptions to aid in error diagnosis, especially useful for locally provided models (#161)
* fix: Add response body to CredentialsValidateFailedError exceptions to aid in error diagnosis, especially useful for locally provided models

* fix: linter

---------

Co-authored-by: liull <liulili@thunisoft.com>
Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-06-27 16:04:40 +08:00
Yeuoly 132d6572ee feat[0.4.0]: add dynamic select support (#163)
* feat: add dynamic select support

- Introduced ParameterOption class for parameter options with value, label, and optional icon.
- Updated ToolParameterOption to inherit from ParameterOption.
- Added DYNAMIC_SELECT to CommonParameterType enum.
- Implemented fetch_parameter_options method in Tool class for fetching parameter options.
- Created DynamicSelectProtocol for dynamic select functionality.
- Added tests for Tool construction and parameter options fetching.

* feat: implement dynamic parameter fetching functionality

- Added DynamicParameterFetchParameterOptionsRequest class for dynamic parameter requests.
- Introduced DynamicParameterActions enum for action types related to dynamic parameters.
- Enhanced PluginExecutor with methods to handle dynamic parameter fetching.
- Updated Tool interface to include a method for fetching parameter options.
- Documented the DynamicSelectProtocol for clarity on its usage.

* feat: enhance plugin functionality with dynamic parameter options and trigger interface

- Added dynamic parameter fetching capabilities to the Plugin class.
- Introduced TriggerProvider and Trigger classes for managing trigger functionalities.
- Updated Tool interface to enforce implementation of credential validation and OAuth methods.
- Enhanced error messages for NotImplementedError in ToolProvider and Trigger classes.
- Removed deprecated tools and their configurations from the codebase.

* docs: update README.md to include support for `dynamic-select` parameter type in manifest versioning

* chore: remove code_based_workflow
2025-06-27 15:59:22 +08:00
Yeuoly 1ec2ff6d6c feat[0.4.0]: add LLMStructuredOutput and LLMStructuredOutputInvocation for s… (#166)
* feat: add LLMStructuredOutput and LLMStructuredOutputInvocation for structured output handling

- Introduced LLMStructuredOutput model class for structured output representation.
- Added LLMStructuredOutputInvocation class to handle invocation with structured output.
- Updated ModelInvocations to include LLMStructuredOutputInvocation.
- Modified InvokeType enum to support LLMStructuredOutput type.

* docs: update README.md to include support for LLM structured output in manifest versioning
2025-06-27 15:54:42 +08:00
Harry 758af03409 fix: datasource oauth schema 2025-06-26 16:14:49 +08:00
Harry 856dffeda8 feat: update OAuth methods to include redirect_uri parameter 2025-06-26 14:38:28 +08:00
Yeuoly a9a752af23 docs: update README.md with manifest versioning details and enhance s… (#164)
* docs: update README.md with manifest versioning details and enhance setup.py field descriptions for version compatibility

* docs: enhance README.md with manifest versioning details and update Python SDK README for version constraints
2025-06-25 19:24:48 +08:00
Yeuoly 5ba4e2fffc Merge branch 'feat/dynamic-select' into feat/trigger 2025-06-25 15:04:23 +08:00
Yeuoly 5415dbafa9 feat: enhance plugin functionality with dynamic parameter options and trigger interface
- Added dynamic parameter fetching capabilities to the Plugin class.
- Introduced TriggerProvider and Trigger classes for managing trigger functionalities.
- Updated Tool interface to enforce implementation of credential validation and OAuth methods.
- Enhanced error messages for NotImplementedError in ToolProvider and Trigger classes.
- Removed deprecated tools and their configurations from the codebase.
2025-06-25 15:03:28 +08:00
Yeuoly 90fe40b8b7 Merge branch 'feat/dynamic-select' into feat/trigger 2025-06-23 20:59:12 +08:00
Yeuoly 24c77fafae feat: implement dynamic parameter fetching functionality
- Added DynamicParameterFetchParameterOptionsRequest class for dynamic parameter requests.
- Introduced DynamicParameterActions enum for action types related to dynamic parameters.
- Enhanced PluginExecutor with methods to handle dynamic parameter fetching.
- Updated Tool interface to include a method for fetching parameter options.
- Documented the DynamicSelectProtocol for clarity on its usage.
2025-06-23 20:56:04 +08:00
Yeuoly ffc06fa5c0 Merge branch 'feat/dynamic-select' into feat/trigger 2025-06-23 18:07:53 +08:00
Yeuoly 503db4ced5 feat: add dynamic select support
- Introduced ParameterOption class for parameter options with value, label, and optional icon.
- Updated ToolParameterOption to inherit from ParameterOption.
- Added DYNAMIC_SELECT to CommonParameterType enum.
- Implemented fetch_parameter_options method in Tool class for fetching parameter options.
- Created DynamicSelectProtocol for dynamic select functionality.
- Added tests for Tool construction and parameter options fetching.
2025-06-23 18:06:19 +08:00
Yeuoly 0df3d13ec6 fix: linter 2025-06-23 17:53:09 +08:00
Yeuoly 4bc3d18364 feat: add trigger functionality and dynamic select parameter support
- Introduced new `Trigger` and `TriggerProvider` classes for handling trigger operations.
- Added `TriggerResponse`, `TriggerRuntime`, and `TriggerParameter` models to manage trigger data.
- Implemented `DynamicSelectProtocol` for dynamic parameter options.
- Updated `ToolParameterOption` to inherit from `ParameterOption`.
- Enhanced `CommonParameterType` with `DYNAMIC_SELECT` option.
- Added tests for `TriggerProvider` and `Trigger` to ensure proper functionality.
2025-06-23 17:51:21 +08:00
Harry b1e745603d feat: Plugin OAuth 2025-06-23 14:25:17 +08:00
Novice 0d1add3434 fix: update array parameter tool error 2025-06-20 11:27:24 +08:00
Novice 31d2edc099 fix: handle mcp array and object type 2025-06-19 16:54:54 +08:00
Dongyu Li 4c00e1e753 feat: update OnlineDocumentPage and bump version to 0.4.0b8 2025-06-19 09:49:03 +08:00
Dongyu Li 1830ab4aa2 feat: update OnlineDocumentPage and bump version to 0.4.0b7 2025-06-18 15:55:53 +08:00
Harry 29fd8a6311 feat: datasource 2025-06-13 10:20:10 +08:00
Harry cc31f2848c feat: datasource 2025-06-12 22:57:38 +08:00
Harry 63a8a5da25 feat: datasource 2025-06-12 18:59:21 +08:00
Harry 4f25923fc6 feat: streaming datasource 2025-06-12 18:29:40 +08:00
Dongyu Li 989edf9653 feat: website crawl response add default value 2025-06-12 17:59:21 +08:00
Dongyu Li 826a6dbf9e feat: update website crawl response and update version to 0.4.0b5 2025-06-12 17:36:29 +08:00
Dongyu Li d0460c2443 feat: update website crawl response and update version to 0.4.0b6 2025-06-12 16:18:20 +08:00
Harry 9d0e038d3a feat: streaming datasource 2025-06-11 18:35:10 +08:00
Dongyu Li 87609ba7f7 feat: update datasource response message and update version to 0.4.0b5 2025-06-11 17:06:36 +08:00
Dongyu Li 4ff33e34b6 feat:update datasource entity and update pyproject.toml to 0.4.0b4 2025-06-09 14:38:39 +08:00
Dongyu Li e12eb45e06 feat:update GetWebsiteCrawlResponse entity 2025-06-06 17:15:50 +08:00
Novice 95d1ea0bdb feat: agent plugin handle object and array type 2025-06-05 14:36:27 +08:00
Dongyu Li edc5d4b666 feat:add datasource router 2025-06-05 10:34:18 +08:00
Novice f614c4345c feat: add mcp tool type 2025-05-28 15:43:55 +08:00
Dongyu Li b7ef900b2f feat:update GetOnlineDocumentPageContentRequest entity 2025-05-27 17:21:20 +08:00
Yeuoly cc4a611b0c feat: enhance PluginRunner to build plugins from source directories (#150)
* feat: enhance PluginRunner to build plugins from source directories

- Added functionality to the PluginRunner to detect if the plugin package path is a directory and build the plugin accordingly.
- Introduced a new method `_build_plugin` to handle the building process and log the output.
- Implemented resource cleanup for temporary directories used during the build process.
- Updated integration tests to reflect changes in the mock server configuration by using a constant for the server port.

* fix: linter
2025-05-27 14:04:26 +08:00
Yeuoly 1b410adfc3 refactor: update Notion datasource configuration and provider
- Removed the `provider` field from `DatasourceIdentity` in the manifest.
- Added identity and description fields to `notion.yaml` for better clarity.
- Enhanced `notion.py` with OAuth methods for authorization and credential handling.
- Updated `notion.yaml` to include icon and provider type information.
2025-05-26 15:40:24 +08:00
Yeuoly 8f028d2832 feat: add datasource declaration handling in plugin initialization
- Implemented logic to write a datasource declaration message when a datasource configuration is present during plugin initialization.
- Introduced a new message type, `DATASOURCE_DECLARATION`, in the `InitializeMessage` class to support this functionality.
2025-05-23 19:17:15 +08:00
Yeuoly c6c4bdc69c fix: improve description formatting for datasource manifest paths
- Updated the description of the `datasources` field in `PluginConfiguration` to enhance clarity and readability by splitting the text into two lines.
2025-05-23 19:06:45 +08:00
Yeuoly 0922b15e54 feat: implement datasource actions and validation methods
- Added new request models for datasource actions including validation, website crawling, and content retrieval.
- Enhanced `PluginExecutor` with methods to validate datasource credentials, crawl websites, and retrieve pages and content.
- Updated `PluginRegistration` to include methods for fetching datasource provider classes and handling website and online document datasources.
- Refined the `DatasourceProvider` interface to use `Mapping` for credentials, improving type safety.
2025-05-23 19:06:18 +08:00
Yeuoly d72b26ed76 feat: implement datasource provider mapping and actions
- Introduced `DatasourceProviderMapping` class to manage datasource provider configurations and mappings.
- Enhanced `PluginRegistration` to include datasource configuration and mapping logic.
- Added new `DatasourceActions` enum for handling datasource-related actions.
- Updated `PluginConfiguration` to include a list of datasource manifest paths, improving plugin extensibility.
2025-05-23 18:52:18 +08:00
Yeuoly 040d8d5ddd feat: enhance datasource provider model with validation and documentation
- Added validation for the `datasources` field in `DatasourceProviderManifest` to ensure it is a list of strings representing datasource paths.
- Introduced YAML loading for datasource configurations, improving the handling of datasource entities.
- Enhanced documentation annotations for `DatasourceProviderType`, `DatasourceParameter`, and `DatasourceIdentity` classes to clarify their purpose and usage.
2025-05-23 18:39:43 +08:00