- Combined REMOTE_INSTALL_URL and REMOTE_INSTALL_PORT into a single line for clarity.
- This change improves the configuration format for easier understanding and usage.
* feat(oauth): implement refresh credentials functionality
- Added RefreshCredentials endpoint to handle OAuth credential refresh requests.
- Introduced RequestOAuthRefreshCredentials structure for request validation.
- Updated access types and actions to include refresh credentials.
- Enhanced server routing and controller logic to support the new functionality.
- Updated OAuth entities to include expiration handling for refreshed credentials.
* feat(oauth): add metadata field to OAuthGetCredentialsResult
---------
Co-authored-by: Harry <xh001x@hotmail.com>
* feat(plugin_decoder): add support for internationalized readme files
- Introduced the AvailableI18nReadme method in the PluginDecoder interface to retrieve available readme files in multiple languages.
- Implemented the method in FSPluginDecoder and ZipPluginDecoder to read localized readme files from the filesystem and zip archives.
- Enhanced UnixPluginDecoder to handle readme files in a structured manner, including support for reading from a dedicated "readme" directory.
- Added unit tests to verify the functionality of the AvailableI18nReadme method and ensure correct retrieval of localized readme content.
* feat(plugin): add support for multilingual README generation
- Introduced functionality to create README files in multiple languages (Simplified Chinese, Japanese, Portuguese) based on user selection.
- Enhanced the profile management to include options for enabling internationalized README and selecting languages.
- Added new language choice structure to manage language options and their selection state.
- Implemented rendering and writing of language-specific README files during plugin creation.
- Included new README template files for each supported language.
* feat(plugin): add README command and list functionality
- Introduced a new `readme` command to the plugin CLI for managing README files.
- Added `list` subcommand to display available README languages for a specified plugin path.
- Implemented functionality to read and list supported README languages in a tabular format.
- Enhanced error handling for plugin file reading and decoding processes.
* feat: add support for dark icon
- Introduced IconDark field in PluginDeclaration and related structures to support dark mode icons.
- Updated the installation process to handle dark icons.
- Enhanced asset validation to check for the presence of dark icons.
This change improves the visual consistency of plugins in dark mode environments.
* enhance(cli/icon): add plugin icon support with multiple categories
- Added support for light and dark icons for various plugin categories including agent, datasource, extension, model, tool, and trigger.
- Replaced the previous single icon implementation with a structured map for better organization and retrieval of icons based on category and theme.
- Removed the old Python icon file to streamline asset management.
This update improves the visual representation of plugins across different themes, enhancing user experience.
* change icons
* fix
* fix
* comments
- Removed redundant flag retrieval in the plugin initialization process, simplifying the code.
- Updated permission handling to use a single `permissionRequirement` structure for better clarity and maintainability.
- Enhanced YAML templates by adding quotes around dynamic values to ensure proper formatting and prevent potential parsing issues.
- 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: introduce 'run' command for local plugin execution
- Added a new command `run` to launch plugins locally, allowing communication through stdin/stdout.
- Removed the previous `test` command and its associated functionality to streamline the plugin testing process.
* feat: enhance 'run' command with TCP support
- Introduced a new `RunPluginPayload` structure to encapsulate plugin execution parameters.
- Added TCP communication mode to the `run` command, allowing multiple client connections.
- Updated command flags to configure run mode and logging options.
- Implemented client handling and server creation for both stdin/stdout and TCP modes.
* docs: improve comments in RunPlugin function for clarity
- Enhanced comments to provide clearer explanations of the plugin decoding process and the creation of client streams for both stdin/stdout and TCP modes.
- Updated comments to reflect the functionality and behavior of the plugin execution flow.
* refactor: update command structure and enhance plugin invocation handling
- Changed the command structure to add `runPluginCommand` under `pluginCommand` for better organization.
- Introduced `InvokePluginPayload` type to encapsulate plugin invocation details.
- Enhanced `RunPlugin` function to handle responses and errors more effectively, including logging to stdout.
- Updated client handling to support session management and improved error handling during plugin invocation.
- Renamed TCP server creation function for consistency.
* feat: enhance plugin response handling and logging capabilities
- Added a new flag `--response-format` to specify the output format (text or json) for plugin responses.
- Introduced a `logger` to manage logging output to stdout with timestamps and file information.
- Updated `logResponse` and `systemLog` functions to handle different response formats.
- Enhanced `handleClient` and `RunPlugin` functions to utilize the new response format feature.
- Implemented signal handling to clean up temporary directories on shutdown.
* feat: enhance plugin response structure and logging
- Added `InvokeID` to `InvokePluginPayload` and `GenericResponse` for better tracking of plugin invocations.
- Updated `logResponse` to include `InvokeID` in error responses for improved debugging.
- Enhanced client handling in `handleClient` to log plugin readiness and received requests.
- Refactored client stream creation for better readability and consistency.
* feat: add plugin invoke end response type and logging
- Introduced `GENERIC_RESPONSE_TYPE_PLUGIN_INVOKE_END` to enhance response tracking for plugin invocations.
- Updated `handleClient` to log the end of plugin invocation, improving visibility into the plugin lifecycle.
* chore: remove fullfeature tags
* 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.
- Modified the docstring in the moderation model to use the correct format for the plugin name, enhancing clarity and consistency in the documentation.
- Updated the InitPluginWithFlags function to conditionally validate the plugin name, author, and description only when the quick flag is set.
- This change improves the flexibility of the plugin initialization process by allowing bypassing validation in certain scenarios.
* feat: enhance plugin initialization with configurable parameters
- Added new flags for plugin initialization, allowing users to specify author, name, description, and various permissions.
- Implemented InitPluginWithFlags function to handle the new parameters and validate input.
- Introduced methods to set category, language, and minimal Dify version within the plugin model.
- Enhanced profile management by adding methods to set author and name directly.
- Improved category and language selection with dedicated setter methods.
* add enum
* 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.