- Updated version in pyproject.toml and requirements.txt to 0.6.0b13.
- Changed 'raw_http_response' to 'response' in TriggerDispatchResponse model for clarity.
- Updated GitHub trigger manifest version to 1.3.8.
- Updated the version of dify_plugin from 0.6.0b10 to 0.6.0b11 in pyproject.toml.
This change ensures that the project reflects the latest version of the plugin.
- Updated the version of dify_plugin from 0.6.0b9 to 0.6.0b10 in pyproject.toml.
This change ensures that the project reflects the latest version of the plugin.
- Updated the version of dify_plugin from 0.6.0b8 to 0.6.0b9 in pyproject.toml.
This change ensures that the project is aligned with the latest version of the plugin.
- Updated the PluginExecutor and related classes to improve type annotations and clarity, particularly in methods handling OAuth credentials and trigger subscriptions.
- Refactored the PluginRegistration and TriggerFactory classes to streamline the retrieval of trigger providers and event handlers, ensuring better type safety and consistency.
- Adjusted the YAML loader function to specify return types, enhancing code readability and maintainability.
These changes improve the overall structure and usability of the trigger subscription system, making it more robust and easier to understand.
- Updated the version in pyproject.toml from 0.6.0b6 to 0.6.0b7.
- Renamed trigger-related methods and classes for clarity, changing invoke_trigger to invoke_trigger_event and updating associated request and response classes.
- Adjusted event handling in the GithubTrigger class to improve event dispatching.
These changes ensure the plugin is up-to-date and enhance the clarity and functionality of event handling.
- Updated the version of dify_plugin from 0.6.0b5 to 0.6.0b6 in pyproject.toml.
This change ensures that the project dependencies are aligned with the latest plugin version.
- Updated the version of dify_plugin from 0.6.0b4 to 0.6.0b5 in both pyproject.toml and requirements.txt.
This change ensures that the project dependencies are aligned with the latest plugin version.
- Updated the version of the dify_plugin from 0.6.0b3 to 0.6.0b4 in pyproject.toml.
This change ensures that the project reflects the latest version of the plugin.
- Updated the version of the dify_plugin from 0.6.0b1 to 0.6.0b2 in pyproject.toml.
- Adjusted the requirements.txt file to reflect the new plugin version.
These changes ensure that the project dependencies are aligned with the latest plugin version.
- Added TriggerSubscriptionConstructorRuntime for managing subscription credentials and session data.
- Refactored PluginExecutor to utilize the new trigger subscription constructor for improved event handling.
- Updated PluginRegistration to support the new trigger subscription constructor interface.
- Introduced example-lark-trigger dependency in pyproject.toml for enhanced functionality.
- Cleaned up and standardized trigger-related classes and interfaces for better maintainability.
These changes improve the overall structure and functionality of the trigger subscription system, ensuring a more robust and flexible event handling process.
* 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>
* feat: add integration configuration and plugin runner functionality
- 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.
* apply ruff
* feat: enhance plugin runner with new response handling and exception management
- Added `PLUGIN_INVOKE_END` response type to manage the end of plugin invocations.
- Introduced `PluginStopped` exception to handle plugin termination gracefully.
- Updated `PluginRunner` to support stopping the plugin process and handling asynchronous message reading with improved error management.
- Modified message queue to accommodate `None` responses for completed invocations.
* refactor: rename PluginStopped exception to PluginStoppedError
- Renamed `PluginStopped` to `PluginStoppedError` for clarity and consistency.
- Updated references in the `run.py` file to reflect the new exception name.
- Added a docstring to `PluginStoppedError` to describe its purpose.
* fix: update version check for dify CLI in IntegrationConfig
- Modified the version check in the IntegrationConfig class to require a minimum version of 0.1.0 instead of 0.4.0.
- Ensured that the version validation logic is clearer and more robust.
* chore: update dependencies and lock file
- Updated the `content_hash` in `pdm.lock` to reflect changes in dependencies.
- Added `packaging>=25.0` to the dependencies in `pyproject.toml` to ensure compatibility with the latest packaging features.
* feat: enhance IntegrationConfig with improved CLI path validation
- Added a list of potential plugin names to search for the dify CLI executable.
- Updated the validation logic to check for the CLI path against multiple plugin names.
- Changed error handling to use ValidationError for invalid CLI path and version checks.
* feat: add setup script for dify-plugin-cli installation
- Introduced a new script to automate the installation of dify-plugin-cli, including OS and architecture detection.
- Updated the pull request workflow to include the setup of the dify-plugin-cli before installing dependencies.
- Refactored error handling in IntegrationConfig to use ValueError instead of ValidationError for CLI path and version checks.
* feat: add integration test for invoking LLM with mocked OpenAI server
- Introduced a new integration test in `test_invoke_llm.py` to validate the invocation of the LLM plugin using a mocked OpenAI server.
- Implemented a mock server to simulate OpenAI's chat completions API, supporting both streaming and non-streaming responses.
- The test downloads the latest `langgenius-openai` plugin, runs the plugin, and asserts the expected response from the LLM.
* fix: add timeout to requests in LLM integration test
- Updated the `test_invoke_llm.py` file to include a timeout of 10 seconds for both POST and GET requests to the marketplace API.
- This change aims to improve the reliability of the integration test by preventing indefinite blocking on network calls.
* feat: enhance dify-plugin-cli setup script with installation verification and PATH configuration
- Added verification to check if dify-plugin is available in the user's PATH after installation.
- Implemented logic to add dify-plugin to the system PATH for all users when run as root, or to the user's profile for non-root users.
- Created symlinks in common bin directories and provided usage instructions for the dify-plugin commands.
* refactor: update dify-plugin-cli setup script for improved PATH management
- Enhanced the script to add the installation directory to the GITHUB_PATH for GitHub Actions.
- Modified the PATH export for local development to ensure the installation directory is prioritized.
- Removed redundant installation verification and symlink creation logic, streamlining the setup process.
* test: add SSH support to pull request workflow
- Integrated SSH functionality into the pull request workflow using the mxschmitt/action-tmate@v3 action.
- This addition allows for interactive debugging and terminal access during pull request checks.
* chore: remove SSH step from pull request workflow and fix import in integration test
- Eliminated the SSH step from the pull request workflow to streamline the process.
- Fixed the import statement for the `requests` library in `test_invoke_llm.py` to ensure proper functionality during the test execution.
* wtf
* feat: implement OpenAI mock server for integration testing
- Added a new mock server in `python/tests/__mock_server` to simulate OpenAI's chat completions API, supporting both streaming and non-streaming responses.
- Updated the pull request workflow to install the `uv` tool and launch the mock server during testing.
- Refactored `test_invoke_llm.py` to utilize the mock server, ensuring reliable integration tests without external dependencies.
* apply ruff
* refactor: streamline mock server launch in pull request workflow
- Replaced inline mock server launch commands in the pull request workflow with a dedicated script `launch_mock_server.sh` for improved readability and maintainability.
- The new script handles the execution of the mock server, ensuring a cleaner workflow configuration.
* fix: update mock server launch path in pull request workflow
- Changed the path for launching the mock server script from `./scripts/launch_mock_server.sh` to `./python/scripts/launch_mock_server.sh` to ensure correct execution within the workflow.
* fix: run mock server in background during pull request workflow
- Updated the pull request workflow to launch the mock server script in the background by appending `&` to the command. This change allows subsequent steps to execute without waiting for the mock server to terminate.
* chore: clean up dify-plugin-cli setup script by removing outdated installation instructions
- Removed outdated comments regarding the download and installation of dify-plugin-cli, streamlining the script for clarity.
* feat: enhance PluginRunner with graceful shutdown and thread safety
- Introduced a stop flag and a lock to ensure thread-safe access to the stop flag in the PluginRunner class.
- Implemented a _close method to handle graceful termination of the plugin process, including sending a SIGTERM signal and closing pipes.
- Refactored the _read_async method to ensure proper cleanup and handling of messages, maintaining the integrity of the message queue.