fix: plugin install compatibility with ExternalPluginManager#188
Merged
fix: plugin install compatibility with ExternalPluginManager#188
Conversation
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>
Contributor
There was a problem hiding this comment.
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
RegistryCapabilitiesstruct to capture plugin capabilities (moduleTypes, stepTypes, triggerTypes) from registry manifests - Enhanced
installedPluginJSONto 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 infocommand to display detailed information about installed plugins - Enhanced
wfctl plugin listto 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 |
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
wfctl plugin installto include all fields required byExternalPluginManager.LoadPlugin()— previously only wrotename+version, now includesauthor,description,license,tier,repository,tags,type,moduleTypes,stepTypes,triggerTypesRegistryCapabilitiesstruct somoduleTypes,stepTypes,triggerTypesfrom registry manifests flow through to the installed plugin.jsonplugin.LoadManifest()andValidate(), and verifies the binary exists and is executablewfctl plugin infocommand — shows detailed info about an installed plugin (all manifest fields + binary status)plugin list— now shows TYPE and DESCRIPTION columns alongside NAME and VERSIONRoot Cause
ExternalPluginManager.LoadPlugin()callsmanifest.Validate()which requiresauthoranddescriptionfields. The installer was writing a minimal JSON with onlynameandversion, 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 loaderTestPluginInstallFlatTarball— tests flat tarball (like authz v0.1.0 produces), binary rename, and ExternalPluginManager discovery🤖 Generated with Claude Code