feat: implement new plugin architecture v2 #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the new plugin architecture v2 with ZIP-based distribution, hook system, and automated build tooling.
Changes
New Features
Manifest System
manifest/manifest.go- Package for parsing and validatingmanifest.jsonfilesExtended Plugin Interface
Hooksfield toPluginstruct for hook handlersPermissionsfield for permission managementHookHandlertype:func(ctx context.Context, args map[string]interface{}) errorHookRegistrywith:RegisterHook(pluginID, hookName, priority, handler)UnregisterHooks(pluginID)GetHooks(hookName)- returns sorted by priorityExecuteHooks(hookName, args)- executes all handlersComponent Enhancements
Slugfield toComponentfor unique identificationPropertiesfield for configurable component propertiesPropertyTypeconstants (String, Int, Bool, List)Build System
Makefilewith targets:make test- Runs all tests (required before build)make build- Compiles and packages pluginmake checksum- Generates SHA-256 checksummake sign- Generates GPG signature (optional)make clean- Removes build artifactsCI/CD
.github/workflows/ci.yml- Runs tests on push/PR.github/workflows/release.yml- Builds and releases on tag creationDocumentation
README.mdwith:Files Added
manifest/manifest.go- Manifest parsing packageMakefile- Build automation.github/workflows/ci.yml- CI pipeline.github/workflows/release.yml- Release pipelineFiles Modified
components/model.go- Added Slug and Properties fieldsplugins/general.go- Extended Plugin struct, added HookRegistryREADME.md- Comprehensive documentationBackward Compatibility
This is a breaking change for the plugin architecture. Existing plugins will need to be updated to:
manifest.jsonto their packageGetPlugins()functionPluginstruct formatTesting
All tests must pass before building:
Verification
Users can verify plugin integrity:
Related Issues
Contributors: @hl4b-hal