Skip to content

fix: plugin install compatibility with ExternalPluginManager#188

Merged
intel352 merged 1 commit intomainfrom
fix/plugin-install-compatibility
Feb 27, 2026
Merged

fix: plugin install compatibility with ExternalPluginManager#188
intel352 merged 1 commit intomainfrom
fix/plugin-install-compatibility

Conversation

@intel352
Copy link
Contributor

Summary

  • Expanded plugin.json written by wfctl plugin install to include all fields required by ExternalPluginManager.LoadPlugin() — previously only wrote name+version, now includes author, description, license, tier, repository, tags, type, moduleTypes, stepTypes, triggerTypes
  • Parse registry manifest capabilities — added RegistryCapabilities struct so moduleTypes, stepTypes, triggerTypes from registry manifests flow through to the installed plugin.json
  • Post-install verification — after writing plugin.json, validates it using the engine's plugin.LoadManifest() and Validate(), and verifies the binary exists and is executable
  • New wfctl plugin info command — shows detailed info about an installed plugin (all manifest fields + binary status)
  • Improved plugin list — now shows TYPE and DESCRIPTION columns alongside NAME and VERSION

Root Cause

ExternalPluginManager.LoadPlugin() calls manifest.Validate() which requires author and description fields. The installer was writing a minimal JSON with only name and version, causing validation failure when the engine tried to load installed plugins.

Test plan

  • TestPluginInstallE2E — expanded to verify all manifest fields (author, description, type, capabilities)
  • TestInstalledManifestEngineValidation — writes manifest from RegistryManifest, validates with engine's loader
  • TestPluginInstallFlatTarball — tests flat tarball (like authz v0.1.0 produces), binary rename, and ExternalPluginManager discovery
  • All existing tests pass
  • golangci-lint: 0 issues
  • CI pipeline

🤖 Generated with Claude Code

The installed plugin.json was missing required fields (author, description)
causing ExternalPluginManager.LoadPlugin() manifest validation to fail.

- Expand installedPluginJSON to include all engine-required fields
- Parse registry manifest capabilities (moduleTypes, stepTypes, triggerTypes)
- Add post-install verification using engine's manifest loader and validator
- Add `wfctl plugin info` command for detailed installed plugin info
- Improve `plugin list` to show type and description columns
- Add e2e tests for flat tarball extraction and engine manifest validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 27, 2026 03:30
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

This PR fixes a critical compatibility issue where wfctl plugin install was writing a minimal plugin.json that failed validation when the engine's ExternalPluginManager.LoadPlugin() tried to load it. The fix expands the written manifest to include all fields required by the engine's validation (author, description) plus additional metadata fields for CLI display purposes.

Changes:

  • Expanded RegistryCapabilities struct to capture plugin capabilities (moduleTypes, stepTypes, triggerTypes) from registry manifests
  • Enhanced installedPluginJSON to include all engine-required fields (author, description) plus optional display fields (type, tier, license, repository, tags, capabilities)
  • Added post-install verification that validates the written manifest using the engine's loader and checks binary executability
  • Added wfctl plugin info command to display detailed information about installed plugins
  • Enhanced wfctl plugin list to show plugin type and description alongside name and version

Reviewed changes

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

File Description
cmd/wfctl/registry.go Added RegistryCapabilities struct to capture plugin capabilities from registry manifests; added Homepage field to RegistryManifest
cmd/wfctl/plugin_install_e2e_test.go Added comprehensive tests: expanded E2E test to verify all manifest fields, added TestInstalledManifestEngineValidation to verify engine compatibility, added TestPluginInstallFlatTarball to test flat tarball handling and binary renaming
cmd/wfctl/plugin_install.go Expanded installedPluginJSON with all required fields, updated writeInstalledManifest to populate all fields from registry manifest, added verifyInstalledPlugin for post-install validation, added runPluginInfo command, enhanced runPluginList to display type and description, refactored readInstalledVersion into readInstalledInfo
cmd/wfctl/plugin.go Added info subcommand routing and usage documentation

@intel352 intel352 merged commit e6233d1 into main Feb 27, 2026
18 checks passed
@intel352 intel352 deleted the fix/plugin-install-compatibility branch February 27, 2026 03:42
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