Commit Graph

58 Commits

Author SHA1 Message Date
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 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
Will 371bbbfc94 fix REMOTE_INSTALL_URL, need default value (#141) 2025-05-14 13:01:06 +08:00
Bowen Liang 9353164ddb feat: support REMOTE_INSTALL_URL config for remote installing and debugging (#136)
* support REMOTE_INSTALL_URL

* nit

* nit

* passing remote_install_host and remote_install_port to TCPReaderWriter

* fix the host and port parsing approach without yarl

* extract method for parsing the host and port

* nit

* nit

* nit

* nit

* improve _get_remote_install_host_and_port method

* fix style

* fix style
2025-05-13 15:42:54 +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
QuantumGhost 22ae421dd6 feat(python): Integrate flake8-builtins (A) ruleset with ruff (#66)
Introduce the flake8-builtins (A) ruleset to prevent accidental shadowing
of Python's built-in functions.

Address existing issues primarily by adding `# noqa` to suppress warnings where necessary.
2025-03-24 18:58:50 +08:00
Yeuoly 46c029bf65 refactor: aws_lambda to serverless 2025-02-10 14:58:05 +08:00
Yeuoly f69257db40 fix: add AWS_LAMBDA_HOST 2025-01-21 14:32:12 +08:00
Novice Lee 92558f5c07 feat: add agent strategy support 2025-01-08 07:48:27 +08:00
Yeuoly d450c94888 fix: using absolute importing 2024-12-17 18:24:31 +08:00
Yeuoly a623638d01 refactor: rename agent to agent strategy 2024-12-12 18:26:34 +08:00
Yeuoly 15c14aedf8 feat: agent plugin 2024-12-09 22:01:41 +08:00
-LAN- ef7b886db4 refactor: prevent yoda-conditions
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:55:35 +08:00
-LAN- b3e0612e53 chore: Apply format
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:18:36 +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 e71e7575d7 fix: endless aws transaction 2024-11-08 21:22:18 +08:00
Yeuoly 37b1fcace4 refactor: initialization process 2024-11-05 16:43:39 +08:00
takatost 6f117d207d fix route 2024-11-01 00:45:14 -07:00
Yeuoly 697ddc22d7 feat: support split large file into small chunks 2024-10-23 16:50:24 +08:00
Yeuoly 041df019b0 feat: add app_id/conversation_id/message_id/endpoint_id into sessions 2024-10-16 15:22:08 +08:00
takatost 0d541b7d5b feat: add missing routes 2024-09-27 18:56:01 +08:00
takatost 5c9a48c67d feat: add GetAIModelSchema route 2024-09-26 15:11:04 +08:00
Yeuoly c325ff7193 fix: aws runtime lifetime 2024-09-12 23:18:23 +08:00
Yeuoly 3ac5a201e1 fix: relative import 2024-09-11 15:45:53 +08:00
takatost f611636766 remove unused files 2024-09-04 19:51:15 +08:00
Yeuoly 98ce6231a5 feat: assets 2024-09-04 18:26:54 +08:00
Yeuoly 5b09b6b537 feat: support tool selector 2024-09-04 15:24:13 +08:00
takatost 26d3b944b3 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	python/dify_plugin/core/runtime/abstract/request.py
#	python/dify_plugin/core/runtime/request.py
#	python/dify_plugin/plugin.py
2024-08-30 03:31:24 +08:00
takatost a6d55f604d refactor: move runtime request into separate modules 2024-08-30 03:28:09 +08:00
Yeuoly 83b0cf34dc feat: add logger to tcp stream 2024-08-28 12:49:22 +08:00
Yeuoly 55443ac092 refactor: move entities to core 2024-08-27 17:09:38 +08:00
Yeuoly 8a471941dc refactor 2024-08-27 12:45:00 +08:00
Yeuoly 14910881e6 refactor: rename webhook to endpoint 2024-08-26 21:32:42 +08:00
Yeuoly 90b164af7a refactor 2024-08-26 10:57:54 +08:00
Yeuoly 3307a1b6fe feat: add install method to tool runtime 2024-08-26 10:47:19 +08:00
Yeuoly 2ff7635ae6 refactor: plugin stream reader 2024-08-26 10:33:19 +08:00
Yeuoly 7991deafaa refactor: plugin io server 2024-08-26 00:32:11 +08:00
Yeuoly feed30a8f3 refactor: io stream 2024-08-22 19:56:56 +08:00
Yeuoly a1b94e9eb2 feat: aws lambda simulate tdd 2024-08-15 23:30:45 +08:00
Yeuoly c7b363d88d feat: add aws lambda 2024-08-15 19:29:22 +08:00
Yeuoly a6be9c74c7 feat: support webhook 2024-08-06 17:58:10 +08:00
Yeuoly 8e05e0eb1a feat: remote debugging 2024-07-26 21:13:18 +08:00
Yeuoly f53a10bcd4 feat: support tcp developing 2024-07-24 19:35:17 +08:00
Yeuoly f565e1354f feat: code based workflow 2024-07-24 00:42:35 +08:00
Yeuoly d3069b6da2 enhance: migrate to gevent 2024-07-23 14:25:47 +08:00
Yeuoly 1eee8cfcd4 feat: validate credentials 2024-07-22 21:13:20 +08:00
Yeuoly 71c44df7d9 refactor: tts 2024-07-22 12:55:49 +08:00
Yeuoly 27de419b1a feat: stage 2024-07-19 17:46:38 +08:00
Yeuoly 2de6929831 feat: model invocation 2024-07-16 14:34:03 +08:00
Yeuoly f8ae5cbf51 refactor: io router 2024-07-15 23:29:55 +08:00