Commit 6428a89
feat(wfctl): add plugin registry install/search/list/update/remove commands
Adds wfctl plugin management subcommands backed by the GoCodeAlone/workflow-registry:
- `plugin search [query]` — lists registry plugins, filters by name/description/keyword
- `plugin install <name>[@ver]` — fetches manifest, downloads OS/arch tarball, verifies
SHA256 checksum (when present), extracts to data/plugins/<name>/, writes plugin.json
- `plugin list` — scans data/plugins/ and prints installed plugins + versions
- `plugin update <name>` — re-installs latest version from registry
- `plugin remove <name>` — deletes installed plugin directory
New files:
- cmd/wfctl/registry.go: RegistryManifest struct, FetchManifest, ListPluginNames,
SearchPlugins, FindDownload — registry client using net/http + stdlib only
- cmd/wfctl/plugin_install.go: install flow (gzip+tar extraction with zip-slip guard,
SHA256 verification), local plugin list/remove helpers
- cmd/wfctl/registry_test.go: unit tests for manifest parsing, OS/arch matching,
checksum verification, path traversal guard, list/remove commands
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent e7a7c43 commit 6428a89
File tree
4 files changed
+850
-3
lines changed- cmd/wfctl
4 files changed
+850
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
| |||
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
34 | 49 | | |
35 | 50 | | |
36 | 51 | | |
| |||
0 commit comments