feat: add plugins handler for routing commands to ~/.picoclaw/plugins#1130
feat: add plugins handler for routing commands to ~/.picoclaw/plugins#1130keithy wants to merge 12 commits intosipeed:mainfrom
Conversation
|
ci not pass |
e6aeefd to
85b6d24
Compare
|
Failures are due to missing function provided by #1155 |
db12516 to
843ccb7
Compare
…ugins Adds a new 'plugins' subcommand that routes commands to executable plugins in ~/.picoclaw/plugins, providing feature parity with the picoclaw-manager shell script. Example usage: picoclaw plugins list # List available plugins picoclaw plugins service restart # Run 'service' plugin 💘 Generated with Crush Assisted-by: MiniMax-M2.5 via Crush <crush@charm.land>
- Added root args validator to picoclaw command to route unknown commands to plugins (e.g., picoclaw service → picoclaw-service) - Removed built-in 'plugins' subcommand - now handled as plugin - Added prefix matching to support 'picoclaw-X' → 'X' shorthand - Added exported functions (FindPlugin, ExecPlugin, ListPlugins) - Updated tests for new command structure Example usage: picoclaw service status → runs picoclaw-service picoclaw launcher → runs picoclaw-launcher picoclaw plugins-list → runs picoclaw-plugins-list 💘 Generated with Crush Assisted-by: MiniMax-M2.5 via Crush <crush@charm.land>
- Use DisableFlagParsing to pass flags directly to plugins - Handle --help/-h in Args validator by checking for flag prefix - Handle --version/-v in main() by rewriting args to version subcommand - Add PICOCLAW_NO_BANNER=1 env var to hide banner for programmatic use - Add tests for flag handling and banner env var 💘 Generated with Crush Assisted-by: MiniMax-M2.5 via Crush <crush@charm.land>
💘 Generated with Crush Assisted-by: MiniMax-M2.5 via Crush <crush@charm.land>
|
Now that #1155 has been merged I will update this to use the functions that it provides. DONE |
843ccb7 to
9aba03e
Compare
|
We should discuss PicoClaw really need plugin? |
|
You already have picoclaw-launcher and picoclaw-launcher-tui these are effectively plugins already. see https://raw.githubusercontent.com/wiki/keithy/angelhub/picoclaw-skills-index.json I can't think of a more elegant solution for providing a supported generic interface to services, when it has already been decided (IMHO correctly) that picoclaw should not have to manage its own daemon behaviour in all these different contexts with differing external constraints. The thing about plugins is that it allows dependencies to be switched to the correct direction; the onion peels from the outside in. The installation environment can contribute the plugin which an external task can then depend upon. If I want to restart the service/daemon, the plugin exposes a standard interface, without the picoclaw implementation needing to know the details. Having a plugin mechanism allows you to reduce the core binary size by outsourcing functionality to plugins. "onboard" and "doctor" seem ripe for the plugin treatment, opening up the possibility for multiple variants. Not to mention potentially disposable functionality like, "migrate". It also allows for a much wider range of contributions doing things that you or I would never have thought of. Heaven forbid, if you were to express the same skepticism towards my IndexRegistry contribution, I could actually make picoclaw-skills a plugin. |
|
@keithy Hi! This PR has had no activity for over 2 weeks, so I'm closing it for now to keep things organized. Feel free to reopen anytime if you'd like to continue. |
Summary
Add plugins handler that routes root-level commands to executables in
~/.picoclaw/plugins/.picoclaw service→ runs~/.picoclaw/plugins/picoclaw-servicepicoclaw servicematchespicoclaw-service--helpare passed through to pluginsAlso adds
PICOCLAW_NO_BANNER=1env var for programmatic use.Documentation
Added to README.md:
Create a plugin:
For programmatic use, hide the banner: