forked from molecule-ai/molecule-core
Pure mechanical split — no behavior changes. Groups the PluginsHandler
surface area by responsibility so each file stays focused and readable.
Before: plugins.go — 981 lines, 32 funcs
After:
plugins.go — 194 (struct, constructor, shared helpers)
plugins_sources.go — 14 (ListSources)
plugins_listing.go — 174 (ListRegistry, ListInstalled,
ListAvailableForWorkspace,
CheckRuntimeCompatibility)
plugins_install.go — 276 (Install, Uninstall, Download handlers)
plugins_install_pipeline.go — 368 (resolveAndStage, deliverToContainer,
copy/stream tar, CLAUDE.md marker
stripping, dirSize, httpErr,
installRequest/stageResult,
install-layer consts + envx caps)
plugins_test.go (1365 lines) untouched — tests pass unchanged.
go build, go vet, and go test -race ./internal/handlers/... all clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| bundle | ||
| channels | ||
| crypto | ||
| db | ||
| envx | ||
| events | ||
| handlers | ||
| metrics | ||
| middleware | ||
| models | ||
| plugins | ||
| provisioner | ||
| registry | ||
| router | ||
| scheduler | ||
| ws | ||
| wsauth | ||