[PR #144] [MERGED] feat[0.3.0]: add plugin runner functionality #180

Closed
opened 2026-02-15 21:16:07 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/144
Author: @Yeuoly
Created: 5/15/2025
Status: Merged
Merged: 5/19/2025
Merged by: @Yeuoly

Base: mainHead: feat/runner


📝 Commits (10+)

  • 381c94c feat: add integration configuration and plugin runner functionality
  • 132042d apply ruff
  • 8b177d8 feat: enhance plugin runner with new response handling and exception management
  • 00870d8 refactor: rename PluginStopped exception to PluginStoppedError
  • 0fdfd40 fix: update version check for dify CLI in IntegrationConfig
  • 84ed8a4 chore: update dependencies and lock file
  • 9438259 feat: enhance IntegrationConfig with improved CLI path validation
  • 10b3f61 feat: add setup script for dify-plugin-cli installation
  • bb1bf11 feat: add integration test for invoking LLM with mocked OpenAI server
  • 2853a7d fix: add timeout to requests in LLM integration test

📊 Changes

13 files changed (+572 additions, -2 deletions)

View changed files

📝 .github/workflows/pull-request.yaml (+9 -0)
python/dify_plugin/config/integration_config.py (+55 -0)
📝 python/dify_plugin/core/entities/plugin/request.py (+7 -0)
python/dify_plugin/integration/entities.py (+37 -0)
python/dify_plugin/integration/exc.py (+6 -0)
python/dify_plugin/integration/run.py (+242 -0)
📝 python/pdm.lock (+2 -2)
📝 python/pyproject.toml (+1 -0)
python/scripts/launch_mock_server.sh (+14 -0)
python/tests/__mock_server/__init__.py (+8 -0)
python/tests/__mock_server/openai.py (+43 -0)
python/tests/integration/test_invoke_llm.py (+53 -0)
scripts/setup-dify-plugin-cli.sh (+95 -0)

📄 Description

  • Introduced IntegrationConfig class for managing plugin testing configurations, including validation for the dify_cli_path.
  • Added PluginInvokeRequest and PluginGenericResponse models to handle plugin invocation requests and responses.
  • Implemented PluginRunner class to facilitate running plugins locally, including asynchronous message handling and process management.
  • Merged access actions into a single PluginAccessAction for streamlined access control.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-sdks/pull/144 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 5/15/2025 **Status:** ✅ Merged **Merged:** 5/19/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/runner` --- ### 📝 Commits (10+) - [`381c94c`](https://github.com/langgenius/dify-plugin-sdks/commit/381c94c0ef94e151af0c62fae8b41e8802a3fb55) feat: add integration configuration and plugin runner functionality - [`132042d`](https://github.com/langgenius/dify-plugin-sdks/commit/132042d8338b5e1b1b4a4a85163bd079c4887eb6) apply ruff - [`8b177d8`](https://github.com/langgenius/dify-plugin-sdks/commit/8b177d8aaa2e1c026cd4a37e83a74d965d6210a6) feat: enhance plugin runner with new response handling and exception management - [`00870d8`](https://github.com/langgenius/dify-plugin-sdks/commit/00870d833ffb5ff0827789c3efd0296438c7c6d5) refactor: rename PluginStopped exception to PluginStoppedError - [`0fdfd40`](https://github.com/langgenius/dify-plugin-sdks/commit/0fdfd40badd73df21c6e458131bde64eda08825f) fix: update version check for dify CLI in IntegrationConfig - [`84ed8a4`](https://github.com/langgenius/dify-plugin-sdks/commit/84ed8a43233b40938a4afb375638587bf632560a) chore: update dependencies and lock file - [`9438259`](https://github.com/langgenius/dify-plugin-sdks/commit/9438259bfdfff72c0c33fe2b2bcfe6cd0099a982) feat: enhance IntegrationConfig with improved CLI path validation - [`10b3f61`](https://github.com/langgenius/dify-plugin-sdks/commit/10b3f61cfa55a963487a1bb852b81cf64fb6d966) feat: add setup script for dify-plugin-cli installation - [`bb1bf11`](https://github.com/langgenius/dify-plugin-sdks/commit/bb1bf11f193a1cd2be43e0b77d30cb4da29deeec) feat: add integration test for invoking LLM with mocked OpenAI server - [`2853a7d`](https://github.com/langgenius/dify-plugin-sdks/commit/2853a7d60ecfa150a080e9e8ced581e1ece8e1d9) fix: add timeout to requests in LLM integration test ### 📊 Changes **13 files changed** (+572 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request.yaml` (+9 -0) ➕ `python/dify_plugin/config/integration_config.py` (+55 -0) 📝 `python/dify_plugin/core/entities/plugin/request.py` (+7 -0) ➕ `python/dify_plugin/integration/entities.py` (+37 -0) ➕ `python/dify_plugin/integration/exc.py` (+6 -0) ➕ `python/dify_plugin/integration/run.py` (+242 -0) 📝 `python/pdm.lock` (+2 -2) 📝 `python/pyproject.toml` (+1 -0) ➕ `python/scripts/launch_mock_server.sh` (+14 -0) ➕ `python/tests/__mock_server/__init__.py` (+8 -0) ➕ `python/tests/__mock_server/openai.py` (+43 -0) ➕ `python/tests/integration/test_invoke_llm.py` (+53 -0) ➕ `scripts/setup-dify-plugin-cli.sh` (+95 -0) </details> ### 📄 Description - Introduced `IntegrationConfig` class for managing plugin testing configurations, including validation for the `dify_cli_path`. - Added `PluginInvokeRequest` and `PluginGenericResponse` models to handle plugin invocation requests and responses. - Implemented `PluginRunner` class to facilitate running plugins locally, including asynchronous message handling and process management. - Merged access actions into a single `PluginAccessAction` for streamlined access control. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:07 -05:00
yindo closed this issue 2026-02-15 21:16:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#180