Commit Graph

11 Commits

Author SHA1 Message Date
Harry 8d32dfb347 refactor: add payload to event handler's on_event function 2025-10-20 12:04:43 +08:00
Harry 66e3c29c2c chore: bump dify_plugin version to 0.6.0b9 in pyproject.toml
- 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.
2025-10-11 21:58:54 +08:00
Harry 8cdd62509d refactor: enhance trigger subscription handling and improve type annotations
- 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.
2025-10-11 21:09:12 +08:00
Harry a9b6abf9fc refactor: update trigger and event terminology across the codebase
- Renamed classes and methods related to triggers to use "Event" terminology for consistency and clarity.
- Updated the PluginExecutor, PluginRegistration, and TriggerFactory to reflect the new event handling structure.
- Adjusted YAML configurations and example implementations to align with the new event definitions.
- Enhanced the .gitignore file to include .DS_Store and ensure cleaner project management.

These changes improve the overall coherence of the codebase and enhance the clarity of event-driven functionality.
2025-09-30 20:10:16 +08:00
Yeuoly e8d4949f0b refactor: simplify trigger implementation in tests
- Removed the TriggerRuntime dependency from the test_construct_trigger.py file, streamlining the trigger instantiation process.
- Adjusted imports to reflect the updated structure, enhancing code clarity.

These changes contribute to a cleaner and more maintainable test setup for the trigger functionality.
2025-09-26 23:25:43 +08:00
Harry b182fd2668 feat(trigger): enhance GitHub trigger event handling and update version
- Refactored `TriggerInvokeResponse` to use `Mapping[str, Any]` for event representation.
- Renamed `properties` to `variables` in the `Event` class for clarity and updated the description accordingly.
- Expanded the event options in the GitHub trigger configuration to allow selection of all events.
- Removed the deprecated `issue_comment` trigger implementation and its associated files.
- Bumped version in `manifest.yaml` to 0.0.9 to reflect these changes.

These updates improve the flexibility and clarity of the GitHub trigger integration, allowing for a broader range of event handling.
2025-09-17 13:46:04 +08:00
Harry 9c431c21a1 test: fix import names after refactoring
- Update TriggerEvent import (was Trigger) in test_construct_trigger.py
- Update http_parser function imports to use new names:
  * serialize_request (was convert_request_to_raw_data)
  * serialize_response (was convert_response_to_raw_data)
  * deserialize_request (was parse_raw_request)
  * deserialize_response (was parse_raw_response)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 14:39:03 +08:00
Harry e9df3cbd4a feat(trigger): enhance trigger execution and response handling
- Introduced new response entities for trigger operations: TriggerInvokeResponse, TriggerDispatchResponse, TriggerSubscriptionResponse, TriggerUnsubscribeResponse, and TriggerRefreshResponse.
- Updated PluginExecutor methods to utilize the new response structures, improving clarity and consistency in trigger handling.
- Enhanced HTTP request parsing and response conversion utilities for better integration with various content types.
- Refactored GitHub provider to align with the updated trigger dispatch and subscription handling mechanisms.
2025-08-30 19:36:24 +08:00
Harry f05cbce8f8 feat(trigger): implement trigger provider functionality and actions 2025-08-26 20:52:57 +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