Skip to content

Commit 85435ad

Browse files
authored
fix(plugins): route plugin and marketplace aliases through local handler (ultraworkers#2993)
claw plugin list / claw marketplace / claw marketplace list all fell through to the prompt/LLM path because parse_subcommand only matched "plugins" (the primary name) while the canonical spec aliases "plugin" and "marketplace" were unhandled. This manifested as auth errors and session creation on direct invocation — dogfood confirmed Gaebal's binary created one session via plugin prompt fallback. Fix: extend the plugins arm in parse_subcommand to also match "plugin" | "marketplace" so all three forms route to the same CliAction::Plugins without network calls or session creation. Verified: all six forms (bare + list subcommand for each name) return kind:plugin JSON, exit 0, and create zero sessions. Closes ROADMAP ultraworkers#55 partial (plugins/marketplace bypass complete).
1 parent 5eb4b8a commit 85435ad

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • rust/crates/rusty-claude-cli/src

rust/crates/rusty-claude-cli/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,13 +877,17 @@ fn parse_args(args: &[String]) -> Result<CliAction, String> {
877877
// `missing Anthropic credentials` even though the command is purely
878878
// local introspection. Mirror `agents`/`mcp`/`skills`: action is the
879879
// first positional arg, target is the second.
880-
"plugins" => {
880+
// `plugin` (singular) and `marketplace` are aliases for `plugins`.
881+
// All three must route to the same local handler so that no form
882+
// falls through to the LLM/prompt path.
883+
"plugins" | "plugin" | "marketplace" => {
881884
let tail = &rest[1..];
882885
let action = tail.first().cloned();
883886
let target = tail.get(1).cloned();
884887
if tail.len() > 2 {
885888
return Err(format!(
886-
"unexpected extra arguments after `claw plugins {}`: {}",
889+
"unexpected extra arguments after `claw {} {}`: {}",
890+
rest[0],
887891
tail[..2].join(" "),
888892
tail[2..].join(" ")
889893
));

0 commit comments

Comments
 (0)