feat: Plugin architecture for extensibility#3221
Open
ankushss wants to merge 3 commits intomobile-dev-inc:mainfrom
Open
feat: Plugin architecture for extensibility#3221ankushss wants to merge 3 commits intomobile-dev-inc:mainfrom
ankushss wants to merge 3 commits intomobile-dev-inc:mainfrom
Conversation
Add core plugin system interfaces and registry: - MaestroPlugin: Base interface for lifecycle hooks - MaestroContext: Provides plugins access to Maestro, config, output - PluginRegistry: Manages plugins and broadcasts lifecycle events This enables extensions like accessibility scanners (ARIA) and performance monitors without forking the repository. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add plugin system to extend Maestro functionality: Plugin Management: - maestro add-plugin <jar> - Install plugin to ~/.maestro/plugins/ - maestro list-plugins - List installed plugins - maestro remove-plugin <name> - Remove plugin Plugin Loading: - --plugin flag supports names (aria-plugin) or paths (/path/to/plugin.jar) - Multiple plugins: --plugin plugin1 --plugin plugin2 - ServiceLoader-based discovery from JAR files Plugin Lifecycle: - onInit() - Initialize plugin with context - onFlowStart() - Called at flow start - onCommandStart/Complete/Failed/Skipped() - Command hooks - onFlowComplete() - Called at flow end - onShutdown() - Cleanup resources Architecture: - PluginRegistry manages lifecycle and isolates errors - PluginLoader resolves and loads plugins from JARs - PluginManager handles installation in ~/.maestro/plugins/ - MaestroContext provides access to Maestro, output dirs, config Integration: - Works with single flow, multiple flows, continuous, and sharded execution - Plugin errors isolated - failures don't crash tests - Passes through TestRunner, MaestroCommandRunner, TestSuiteInteractor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The pluginRegistry variable was defined in call() but needed to be passed through handleSessions() and runShardSuite() methods to be accessible in the session lambda where it's used. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Summary
Adds a complete plugin system to Maestro that allows extending functionality through JAR-based plugins with lifecycle hooks.
Plugin Management Commands
maestro add-plugin <plugin.jar>- Install plugin to ~/.maestro/plugins/maestro list-plugins- List installed pluginsmaestro remove-plugin <name>- Remove pluginPlugin Loading
--pluginflag supports plugin names or direct pathsmaestro test flow.yaml --plugin aria-plugin--plugin plugin1 --plugin plugin2Plugin Lifecycle Hooks
onInit()- Initialize plugin with context (Maestro instance, output dirs, config)onFlowStart()- Called when flow startsonCommandStart/Complete/Failed/Skipped()- Command lifecycle hooksonFlowComplete()- Called when flow completes (with success/failure status)onShutdown()- Cleanup resourcesArchitecture
Integration
Problem Statement
Currently, extending Maestro requires forking the repository. For example, we built an accessibility scanner that needed to:
This forking approach creates maintenance burden and prevents ecosystem growth.
Implementation Details
What's Included:
Files Changed:
Use Cases Enabled
Example Plugin
Package as JAR with META-INF/services/maestro.orchestra.plugin.MaestroPlugin file listing implementation.
Usage
Testing
Questions for Maintainers
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com