Conversation
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add automatic plugin loading for embedded workflow engine
Add Feb 27, 2026
plugins/all package to simplify built-in plugin registration for embedded engines
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a plugins/all package that provides a single entry point for registering all 25 built-in workflow engine plugins, eliminating the need to manually import and wire each plugin package individually. This significantly simplifies the setup for applications embedding the workflow engine.
Changes:
- Added
plugins/allpackage withDefaultPlugins()andLoadAll()functions - Updated
cmd/server/main.goto useallplugins.DefaultPlugins()instead of manually listing 25 plugin imports - Migrated
example/main.gofrom individual handler registration toallplugins.LoadAll(engine)pattern
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/all/all.go | New package providing DefaultPlugins() and LoadAll() convenience functions for plugin registration |
| plugins/all/all_test.go | Comprehensive test suite covering plugin uniqueness, independence, loading, and error handling |
| cmd/server/main.go | Replaced 25 individual plugin imports with single allplugins.DefaultPlugins() call |
| example/main.go | Migrated from legacy handler registration to plugin-based loading via allplugins.LoadAll() |
| example/go.mod | Added transitive dependencies required by newly-loaded plugins (cache, reverseproxy, scheduler, gobwas/glob, robfig/cron, go-chi/chi) |
| example/go.sum | Updated checksums for new transitive dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Embedding the workflow engine required importing and wiring 25+ plugin packages individually. This adds a
plugins/allpackage as a single entry point for all built-in plugins.New:
plugins/allDefaultPlugins() []plugin.EnginePlugin— returns a fresh slice of all standard plugins; safe to modify before loading (add, remove, reorder)LoadAll(engine PluginLoader) error— loads all default plugins in one call;PluginLoaderis a minimal interface satisfied by*workflow.StdEngineUpdated callers
cmd/server/main.go—defaultEnginePlugins()now delegates toallplugins.DefaultPlugins(), replacing 25 individual plugin importsexample/main.go— migrated from the legacyhandlers.New*WorkflowHandler()pattern toallplugins.LoadAll(engine)🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.