* feat: add InvokeLLMWithStructuredOutput functionality
- Introduced a new method InvokeLLMWithStructuredOutput to the BackwardsInvocation interface for handling structured output requests.
- Added corresponding request and response types to support structured output.
- Implemented the method in both RealBackwardsInvocation and MockedDifyInvocation for testing purposes.
- Updated permission handling and task execution for the new structured output invocation type.
This enhancement allows for more flexible and detailed responses from the LLM, improving the overall functionality of the invocation system.
* refactor: enhance LLMResultChunkWithStructuredOutput structure
- Updated the LLMResultChunkWithStructuredOutput type to include additional fields: Model, SystemFingerprint, and Delta.
- Added comments to clarify the reasoning behind the structure and the use of type embedding for JSON marshaling.
This change improves the clarity and functionality of the LLMResultChunkWithStructuredOutput type, ensuring proper JSON serialization.
* refactor: streamline LLMResultChunk construction in InvokeLLMWithStructuredOutput
- Simplified the construction of LLMResultChunk and LLMResultChunkWithStructuredOutput by removing unnecessary type embedding.
- Enhanced readability and maintainability of the code while preserving functionality.
This change contributes to cleaner code and improved clarity in the handling of structured output responses.
* feat(dynamic_select): implement dynamic parameter fetching functionality
- Added FetchDynamicParameterOptions function to handle dynamic parameter selection.
- Introduced new access type and action for dynamic select in access_types.
- Updated HTTP server routes to include the new endpoint for fetching dynamic parameters.
- Created necessary service and controller files for dynamic select operations.
* refactor(access_types): rename dynamic select access type to dynamic parameter
- Updated access type constants to reflect the change from PLUGIN_ACCESS_TYPE_DYNAMIC_SELECT to PLUGIN_ACCESS_TYPE_DYNAMIC_PARAMETER.
- Adjusted related references in the PluginDispatchers and FetchDynamicParameterOptions function to maintain consistency.
- Updated the method in the interface to remove the parameter, simplifying its usage.
- Introduced a new function to provide a default verification structure.
- Added a file to store verification data, improving the plugin signing process.
- Enhanced tests in to validate the verification process, ensuring proper handling of success and failure scenarios.
- Refactored related code to accommodate the new verification structure and improve overall maintainability.
* feat: Enhance plugin signing with authorized category verification
- Added support for an `authorized_category` flag in the signature command to validate the category before signing.
- Updated the `Sign` function to accept a verification parameter, allowing for category-based signing.
- Enhanced error handling for invalid categories during the signing process.
- Updated tests to cover new verification scenarios and ensure proper functionality with the authorized category.
* fix
* fix
* test
* test: Add unit test for plugin verification without verification field
- Introduced a new test case to verify the behavior of plugins that lack a verification field.
- Updated the signature_test.go file to include the test, ensuring proper functionality of the signing process.
- Removed the outdated verifier_test.go file and associated test data to streamline the codebase.
* feat: add repository URL support for plugin manifest
- Introduced a new optional flag for specifying the plugin repository URL during initialization.
- Updated the InitPluginWithFlags function to handle the new repository parameter.
- Enhanced profile management to include repository input.
- Modified related tests to validate the new repository functionality.
* fix: improve input validation in profile checkRule method
- Updated the checkRule method to ensure cursor is within valid range before checking for empty input values. This change prevents potential out-of-bounds errors and enhances the robustness of the input validation process.
* feat: implement OAuth functionality in plugin daemon
- Added OAuth service methods for getting authorization URLs and credentials.
- Updated access types to include OAuth-related actions.
- Created new controller for handling OAuth requests.
- Introduced entities for OAuth results and requests.
- Enhanced plugin entities to support OAuth schema in tool declarations.
* feat: add OAuth endpoints for authorization and credentials retrieval
- Introduced new POST endpoints for obtaining authorization URLs and credentials in the OAuth controller.
- Enhanced the plugin dispatch group to include these new OAuth routes, improving integration with OAuth services.
* refactor: clean up OAuth entity and request structures
- Removed unused validation logic and constants from the OAuth entity file.
- Added required provider field to OAuth request structures for better validation and clarity.
* feat: implement OAuth functionality in plugin daemon
- Added OAuth service methods for getting authorization URLs and credentials.
- Updated access types to include OAuth-related actions.
- Created new controller for handling OAuth requests.
- Introduced entities for OAuth results and requests.
- Enhanced plugin entities to support OAuth schema in tool declarations.
* feat: add OAuth endpoints for authorization and credentials retrieval
- Introduced new POST endpoints for obtaining authorization URLs and credentials in the OAuth controller.
- Enhanced the plugin dispatch group to include these new OAuth routes, improving integration with OAuth services.
- Implemented a compatibility layer in LLMResultChunk to ensure backward compatibility with the old format by adding a `PromptMessages` field.
- Added a new test case `TestLLMResultChunkCompatibility` to verify the JSON marshaling behavior of the updated LLMResultChunk structure.
* refactor(plugin_packager): update Assets method to use OS-independent path separator
- Modified the Assets method in FSPluginDecoder and PluginDecoderHelper to accept a separator argument, ensuring compatibility across different operating systems.
- Updated the Assets method in ZipPluginDecoder to use '/' as the separator for zip files, addressing issue #166.
- Improved code readability by adjusting formatting in the ZipPluginDecoder struct.
* fix: add tests
* feat(plugin): add version requirement functionality to plugin initialization
- Introduced a new `version_require` sub-menu to handle minimal Dify version input.
- Updated the plugin initialization process to include the new version requirement.
- Enhanced the `PluginMeta` struct to store the minimal Dify version.
- Added validation for the minimal Dify version input to ensure correctness.
* fix(plugin): rename MinimalDifyVersion to MinimumDifyVersion for consistency
- Updated the `PluginMeta` struct to change the field name from `MinimalDifyVersion` to `MinimumDifyVersion`.
- Adjusted the plugin initialization logic to reflect the new field name, ensuring proper handling of version requirements.
Modify session write method to include a new plugin access action parameter across multiple runtime implementations. This change allows for more granular tracking and handling of plugin interactions by introducing an optional action context to the write method.