Commit Graph

55 Commits

Author SHA1 Message Date
Harry d75f734b7d feat: add checkbox parameter type to provider configuration
- Introduced a new CHECKBOX type in CommonParameterType to enhance parameter options.
- Updated ToolParameter and TriggerParameter classes to include the new CHECKBOX type.
- Modified the GitHub trigger manifest version to 1.1.0 and changed parameter type from select to checkbox in issues.yaml.

These changes improve the flexibility of parameter types available in the plugin, allowing for more diverse user interactions.
2025-09-29 14:29:38 +08:00
Novice fbb6346f69 feat: add rag tag (#200) 2025-09-02 21:58:09 +08:00
Harry 1c3a3d1db3 refactor: remove output schema resolution logic from datasource and tool manifest loading 2025-08-08 14:23:22 +08:00
Harry e96e7716b7 refactor: clean up whitespace and formatting in schema-related files 2025-08-07 17:28:04 +08:00
Harry 9f37b75887 feat: implement built-in schema definitions and schema resolution utilities 2025-08-07 17:18:05 +08:00
Yeuoly 2448e826a8 fix(tool): temporarily alias LogMetadata to CommonLogMetadata to prevent import errors before version 0.5.0 (#182)
* fix(tool): temporarily alias LogMetadata to CommonLogMetadata to prevent import errors before version 0.5.0

* apply ruff
2025-07-24 17:32:14 +08:00
Maries c6f83a63e1 feat[0.4.2]: Tool OAuth (#179)
* chore: fix ruff issue

* feat(oauth): implement OAuth

* feat(invoke-message): refactor message handling and introduce InvokeMessage class

* feat(plugin-oauth): add credential_id and credential_type to tool parameters

* feat(plugin-oauth): add credential_id and credential_type to tool parameters

* chore: update dify_plugin version to 0.5.0b4 and clean up github.yaml

* chore: update plugin version to 0.1.2 in manifest.yaml

* feat(session): session context and tool backwards invocation credential support

* feat(oauth): session context and tool backwards invocation credential support

* feat: update README and requirements for OAuth support in version 0.4.2

* feat: add .gitignore to exclude IDE files and secret keys

* chore: apply ruff

* feat: bump version to 0.4.2b1

* feat: update GitHub plugin configuration for OAuth support and improve credential handling

* feat: update .gitignore to exclude dify plugin files and public keys

* feat: fix credential validation for GitHub API and bump version to 0.2.1

* feat: update GitHub plugin to support multiple access tokens and bump version to 0.2.5

* chore: apply ruff

* feat: add ToolProviderOAuthError for improved OAuth error handling in GitHub plugin

* chore: apply ruff

* chore: bump version to 0.4.2

* chore: update examples sdk version to 0.4.2

* fix: thread deadlock in PluginRunner when running tests without gevent monkey patching

* feat: add support for refreshing OAuth credentials in Plugin and GitHub provider

* feat: refactor OAuth credential handling to return structured OAuthCredentials object

* apply ruff

* feat: refactor OAuth credential handling to use ToolOAuthCredentials for improved structure

* feat: reorganize imports in __init__.py for improved clarity and structure

* feat: add Microsoft To Do plugin for refresh token example

* chore: apply ruff

* fix: update author in GitHub configuration and clean up Microsoft To Do schema

* chore: bump version to 0.4.2b2 in pyproject.toml

* feat: update Microsoft To Do plugin to handle OAuth token encoding and version bump

* feat:remove inelegant example

* chore: update dify_plugin version to 0.4.2

* chore: bump version to 0.4.2 in pyproject.toml

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-07-23 13:49:01 +08:00
Yeuoly d27bbddc02 feat: dark icon (#173)
* docs: update README.md to include support for `dark-icon` field in manifest versioning

* feat: add dark mode icon fields to Tool and SimpleProviderEntity models

- Introduced `icon_dark` field in ToolProviderIdentity for dark mode support.
- Added `icon_small_dark` and `icon_large_dark` fields in SimpleProviderEntity for dark mode icons.
2025-07-09 16:06:20 +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
Novice 31d2edc099 fix: handle mcp array and object type 2025-06-19 16:54:54 +08:00
Novice 95d1ea0bdb feat: agent plugin handle object and array type 2025-06-05 14:36:27 +08:00
Novice f614c4345c feat: add mcp tool type 2025-05-28 15:43:55 +08:00
Yeuoly 6d5d601804 feat[0.4.0](oauth): implement OAuth authorization URL and credentials retrieval (#116)
* feat(oauth): implement OAuth authorization URL and credentials retrieval

- Added OAuthGetAuthorizationUrlRequest and OAuthGetCredentialsRequest models for handling OAuth requests.
- Introduced methods in PluginExecutor for generating OAuth authorization URLs and retrieving OAuth credentials.
- Updated ToolProvider interface to include OAuth methods for authorization URL and credentials handling.
- Refactored PluginInvokeType and related action enums to support OAuth actions.
2025-05-19 22:13:53 +08:00
Tianyi Jing 931e4d1485 feat: support list in ToolInvokeMessage.JsonMessage (#122)
Signed-off-by: jingfelix <jingfelix@outlook.com>
2025-05-06 15:54:47 +08:00
Yeuoly 038edf957e feat: generate docs automatically (#121)
- Added CLI for generating documentation with `generate-docs` command.
- Introduced `SchemaDocumentationGenerator` to create structured documentation from schemas.
- Implemented `SchemaDoc` class for schema metadata and documentation management.
- Updated `PluginConfiguration` to include descriptions for plugin components.
- Added support for outside reference fields in the SchemaDocumentationGenerator to improve documentation clarity.
- Updated SchemaDoc to include outside_reference_fields parameter.
- Modified various entity classes to utilize outside_reference_fields for better schema representation.
- Introduced new container type checks and helper methods for handling dynamic fields in documentation generation.
2025-04-30 14:48:03 +08:00
Chieh Wang 293d622e68 feat: Add Citations and Attributions to Agent Node (#107)
* feat: support var-selector params & surpport retriever_resources messsage

* opt: rename var-select to any

* fix: line too long

* opt: Add RetrieverResource Type
2025-04-27 13:54:22 +08:00
Yeuoly ca736effd7 feat(invocation): add FetchAppInvocation and update type hints for improved clarity (#100)
* feat(invocation): add FetchAppInvocation and update type hints for improved clarity

- Introduced FetchAppInvocation class to handle fetching app data.
- Updated type hints in ToolInvokeMessage and related classes to use Mapping for better type safety.
- Added FetchApp enum value to InvokeType for consistency in invocation types.

* apply ruff
2025-04-16 20:25:39 +08:00
QuantumGhost 5cb24625c3 ci(python): Add CI Pipeline for Python SDK (#72)
* chore(python): temporarily disable `UP007` rule in Ruff

Disable the `UP007` rule temporarily due to numerous existing
violations in the current codebase.

* ci(python): add lint and test for Python SDK

* ci: Add mega-linter

* chore(python): Add final newline to markdown files

* fix(python): Fix linter issues by using ruff's auto fix

* fix(python): Fix TRY400 linter violations

Ruff suggests using `logger.exception` to log when
logging an exception, instead of using `logging.error`.

The former logs the exception and the traceback
automatically.

ref: https://docs.astral.sh/ruff/rules/error-instead-of-exception/

* fix(python): fix ruff linter violations

* test(python): Add Test cases for LLM entities

Test the initialization of `LLMResult` and `LLMResultChunk`.

* test(python): Add test for `AgentModelConfig`

Ensures that the `history_prompt_messages` attribute is
not shared between instances of `AgentModelConfig`.

* chore(python): output diffs in Ruff's format check

* style(python): format code with Ruff

* chore(python): Add a bash script for fix and format python code

* chore: add `persist-credentials: false` to checkout action

Enhances security by preventing subsequent
steps from accessing GitHub credentials, reducing
potential attack surfaces.

Ref: https://github.com/actions/checkout#checkout-v4
2025-04-14 20:25:19 +08:00
Junyan Qin (Chin) 0216ed8187 feat: add supports for provider to register array[tool] type field (#78) 2025-04-07 16:14:36 +08:00
Novice Lee afc8397bc3 feat: add metadata to log 2025-02-07 10:53:20 +08:00
Novice Lee fb24978387 feat: add agent node log 2025-01-09 08:51:43 +08:00
Novice 43e58b93e7 Merge pull request #7 from langgenius/feat/agent-node
feat: add agent strategy support
2025-01-08 07:50:49 +08:00
Novice Lee 92558f5c07 feat: add agent strategy support 2025-01-08 07:48:27 +08:00
Yeuoly fa458ab0d9 fix: get attribute dose not exists in BlobMessage 2025-01-03 14:47:49 +08:00
Yeuoly bc4e9a05aa fix: variable message 2024-12-27 22:57:38 +08:00
Yeuoly 3e7565f075 feat: support percision to agent strategy parameter 2024-12-27 18:03:58 +08:00
Yeuoly 82438a99a2 feat: support parameter auto generate 2024-12-26 17:28:42 +08:00
Yeuoly f408642b27 fix: missing output schema 2024-12-17 18:14:40 +08:00
Yeuoly 74c8f073c9 feat: add label to agent log 2024-12-15 18:15:01 +08:00
Yeuoly 4ae9b45006 feat: support dify tool selector 2024-12-13 22:49:51 +08:00
Yeuoly ba023e3470 feat: support agent log 2024-12-13 00:07:52 +08:00
Yeuoly c93028221c refactor: support agent 2024-12-12 19:15:00 +08:00
Yeuoly 435c0da60e refactor: use absolute paths 2024-12-03 15:19:19 +08:00
-LAN- b4b0c29169 refactor: prevent raise-without-from-inside-except
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 22:18:56 +08:00
-LAN- da41fbf0ab refactor: suppressible-exception
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 22:13:06 +08:00
-LAN- 6358a80025 chore: prevent collapsible-if
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:59:13 +08:00
-LAN- b3e0612e53 chore: Apply format
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:18:36 +08:00
-LAN- 37128aeadd chore: Apply unsafe auto-fixes and check manually
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:17:21 +08:00
-LAN- 5858fe715e chore: Apply formet and auto fix
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:10:36 +08:00
Yeuoly ad6ca50b38 feat: summarize, fix: missing files 2024-12-02 16:00:34 +08:00
Yeuoly eb8a9c4039 fix: add float type to default 2024-11-28 17:35:37 +08:00
Yeuoly afd5c2c3e4 fix: credentials 2024-11-27 17:46:59 +08:00
Yeuoly d53dd64f37 refactor: remove tool-selector 2024-11-14 16:11:14 +08:00
Yeuoly 697ddc22d7 feat: support split large file into small chunks 2024-10-23 16:50:24 +08:00
Yeuoly cedcf6a214 refactor: manifest 2024-09-30 21:14:06 +08:00
Yeuoly e3dbc574f5 feat: support tool runtime parameters 2024-09-29 18:20:16 +08:00
Yeuoly 64856a75a9 add modes 2024-09-26 17:41:41 +08:00
Yeuoly 400d4080dc fix: tool provider 2024-09-23 21:32:04 +08:00
Yeuoly 3ac5a201e1 fix: relative import 2024-09-11 15:45:53 +08:00
Yeuoly 70db8bcb8e refactor 2024-09-11 15:12:37 +08:00