Skip to content

Add SupportsPlugins() capability detection and validation for agentic engines#14516

Merged
pelikhan merged 4 commits intomainfrom
copilot/reimplement-agentic-engine-function
Feb 8, 2026
Merged

Add SupportsPlugins() capability detection and validation for agentic engines#14516
pelikhan merged 4 commits intomainfrom
copilot/reimplement-agentic-engine-function

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Plugin installation is engine-specific and not universally supported. Currently only Copilot CLI supports the plugin install command.

Changes

  • Interface extension: Added SupportsPlugins() bool to CapabilityProvider interface
  • Base implementation: Added supportsPlugins field to BaseEngine with getter method
  • Engine configuration: Set supportsPlugins: true for Copilot engine only (Claude, Codex, Custom default to false)
  • Test coverage: Added tests verifying capability detection across all engines
  • Validation: Added validatePluginSupport() function that prevents compilation when plugins are specified with engines that don't support them
  • Error handling: Shows clear, actionable error messages when users try to use plugins with unsupported engines

Usage

engine := workflow.NewCopilotEngine()
if engine.SupportsPlugins() {
    // Generate plugin installation steps
    steps := workflow.GeneratePluginInstallationSteps(plugins, engine.GetID(), token)
}

Validation Example

When plugins are specified with an unsupported engine, compilation fails with:

✗ engine 'claude' does not support plugins. The following plugins cannot be installed: org/test-plugin

Only the 'copilot' engine currently supports plugin installation.

To fix this, either:
1. Remove the 'plugins' field from your workflow
2. Change to an engine that supports plugins (e.g., engine: copilot)

The implementation follows the existing Interface Segregation Principle pattern used for other capabilities (SupportsFirewall, SupportsHTTPTransport, etc.).

Original prompt

Look at #14377 and reimplement the agentic engine function to determine if an engine supports plugins. Only copilot supports it now.

Ignore the other changes


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 8, 2026 13:05
- Added SupportsPlugins() to CapabilityProvider interface
- Added supportsPlugins field to BaseEngine struct
- Implemented SupportsPlugins() method in BaseEngine
- Updated CopilotEngine to set supportsPlugins: true
- Other engines (Claude, Codex, Custom) default to false
- Added tests to verify only Copilot supports plugins

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Reimplement agentic engine function for plugin support Add SupportsPlugins() capability detection for agentic engines Feb 8, 2026
Copilot AI requested a review from pelikhan February 8, 2026 13:12
@pelikhan
Copy link
Contributor

pelikhan commented Feb 8, 2026

@copilot if the engine does not support a plugin, show error when trying to use plugin

- Added validatePluginSupport() function in engine_validation.go
- Validates plugins are only used with engines that support them
- Currently only copilot engine supports plugins
- Shows clear error message with actionable fixes when unsupported
- Added comprehensive test coverage for validation
- Integrated validation in compiler_orchestrator_tools.go

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 8, 2026

@copilot if the engine does not support a plugin, show error when trying to use plugin

Added validation in commit 1b58416. When plugins are specified with an engine that doesn't support them (currently only copilot supports plugins), the compiler now shows a clear error message:

✗ engine 'claude' does not support plugins. The following plugins cannot be installed: org/test-plugin

Only the 'copilot' engine currently supports plugin installation.

To fix this, either:
1. Remove the 'plugins' field from your workflow
2. Change to an engine that supports plugins (e.g., engine: copilot)

The validation prevents compilation and lists all plugins that cannot be installed, making it clear to users what needs to be fixed.

Copilot AI changed the title Add SupportsPlugins() capability detection for agentic engines Add SupportsPlugins() capability detection and validation for agentic engines Feb 8, 2026
@pelikhan pelikhan marked this pull request as ready for review February 8, 2026 13:40
Copilot AI review requested due to automatic review settings February 8, 2026 13:40
@pelikhan pelikhan merged commit ee7394a into main Feb 8, 2026
3 checks passed
@pelikhan pelikhan deleted the copilot/reimplement-agentic-engine-function branch February 8, 2026 13:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit engine capability flag for plugin installation and enforces it during workflow compilation so plugins can’t be used with engines that don’t support installing them.

Changes:

  • Extended engine capability detection with SupportsPlugins() and added a default implementation on BaseEngine.
  • Added compile-time validation to reject workflows that specify plugins with engines that report SupportsPlugins() == false.
  • Added unit tests for plugin-support validation and engine capability detection; updated docs table entry.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/workflow/engine_validation_test.go Adds tests covering plugin-support validation behavior and error message content.
pkg/workflow/engine_validation.go Introduces validatePluginSupport() to fail compilation when plugins are used with unsupported engines.
pkg/workflow/copilot_engine_test.go Adds assertions that Copilot supports plugins and other engines do not.
pkg/workflow/copilot_engine.go Marks Copilot engine as supportsPlugins: true.
pkg/workflow/compiler_orchestrator_tools.go Runs plugin-support validation during tools/markdown processing.
pkg/workflow/agentic_engine.go Extends CapabilityProvider + BaseEngine with SupportsPlugins() capability plumbing.
docs/src/content/docs/agent-factory-status.mdx Adds “Dependabot Burner” to the agent-factory status table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Build error message listing the plugins that were specified
pluginsList := strings.Join(pluginInfo.Plugins, ", ")

return fmt.Errorf("engine '%s' does not support plugins. The following plugins cannot be installed: %s\n\nOnly the 'copilot' engine currently supports plugin installation.\n\nTo fix this, either:\n1. Remove the 'plugins' field from your workflow\n2. Change to an engine that supports plugins (e.g., engine: copilot)\n\nSee: %s",
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validatePluginSupport currently hard-codes that only the 'copilot' engine supports plugin installation and returns an error for any other engine with plugins. This conflicts with the existing behavior where Claude and Codex engines still generate plugin installation steps (e.g., in their GetInstallationSteps implementations), and there are tests/workflows that compile plugins with those engines. Please align the codebase in one direction: either (a) mark Claude/Codex as SupportsPlugins=true and update the error message to list supported engines dynamically, or (b) remove/disable plugin-install step generation (and related tests/docs) for Claude/Codex so validation matches actual support.

Suggested change
return fmt.Errorf("engine '%s' does not support plugins. The following plugins cannot be installed: %s\n\nOnly the 'copilot' engine currently supports plugin installation.\n\nTo fix this, either:\n1. Remove the 'plugins' field from your workflow\n2. Change to an engine that supports plugins (e.g., engine: copilot)\n\nSee: %s",
return fmt.Errorf("engine '%s' does not support plugins. The following plugins cannot be installed: %s\n\nTo fix this, either:\n1. Remove the 'plugins' field from your workflow\n2. Change to an engine that supports plugins (see the documentation for supported engines)\n\nSee: %s",

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +103
func TestOtherEnginesNoPluginSupport(t *testing.T) {
// Test that only Copilot engine supports plugins
engines := []CodingAgentEngine{
NewClaudeEngine(),
NewCodexEngine(),
NewCustomEngine(),
}

for _, engine := range engines {
if engine.SupportsPlugins() {
t.Errorf("Expected engine '%s' to not support plugins, but it does", engine.GetID())
}
}
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new test codifies that Claude/Codex/Custom engines do not support plugins, but other parts of the workflow package currently generate plugin installation steps for Claude and Codex. If plugins are truly Copilot-only, those engine implementations (and any tests expecting plugin installs for them) should be updated/removed; otherwise this test should be updated to reflect actual supported engines.

Copilot uses AI. Check for mistakes.
Comment on lines +421 to +447
{
name: "plugins with claude engine (not supported)",
pluginInfo: &PluginInfo{
Plugins: []string{"org/plugin1"},
},
engineID: "claude",
expectError: true,
errorMsg: "does not support plugins",
},
{
name: "plugins with codex engine (not supported)",
pluginInfo: &PluginInfo{
Plugins: []string{"org/plugin1", "org/plugin2"},
},
engineID: "codex",
expectError: true,
errorMsg: "does not support plugins",
},
{
name: "plugins with custom engine (not supported)",
pluginInfo: &PluginInfo{
Plugins: []string{"org/plugin1"},
},
engineID: "custom",
expectError: true,
errorMsg: "does not support plugins",
},
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests assume plugins are only supported for the 'copilot' engine. That assumption currently conflicts with existing plugin compilation/import tests and engine installation logic that include 'claude plugin install' / 'codex plugin install' steps. Please reconcile: either update SupportsPlugins defaults for those engines and adjust validation/tests, or remove non-copilot plugin installation support everywhere so this validation behavior is consistent.

Copilot uses AI. Check for mistakes.
Comment on lines 125 to +131
// SupportsFirewall returns true if this engine supports network firewalling/sandboxing
// When true, the engine can enforce network restrictions defined in the workflow
SupportsFirewall() bool

// SupportsPlugins returns true if this engine supports plugin installation
// When true, plugins can be installed using the engine's plugin install command
SupportsPlugins() bool
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface hierarchy comment block above lists CapabilityProvider methods but doesn't mention SupportsPlugins, even though it is now part of the interface. Please update that documentation list to keep the file-level architecture docs accurate.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants