From 85435ad4b50cd393dec4835e72342f1448c8a4e4 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 5 May 2026 05:16:00 +0900 Subject: [PATCH] fix(plugins): route plugin and marketplace aliases through local handler (#2993) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 #55 partial (plugins/marketplace bypass complete). --- rust/crates/rusty-claude-cli/src/main.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rust/crates/rusty-claude-cli/src/main.rs b/rust/crates/rusty-claude-cli/src/main.rs index 11539c9a..379e8c0c 100644 --- a/rust/crates/rusty-claude-cli/src/main.rs +++ b/rust/crates/rusty-claude-cli/src/main.rs @@ -877,13 +877,17 @@ fn parse_args(args: &[String]) -> Result { // `missing Anthropic credentials` even though the command is purely // local introspection. Mirror `agents`/`mcp`/`skills`: action is the // first positional arg, target is the second. - "plugins" => { + // `plugin` (singular) and `marketplace` are aliases for `plugins`. + // All three must route to the same local handler so that no form + // falls through to the LLM/prompt path. + "plugins" | "plugin" | "marketplace" => { let tail = &rest[1..]; let action = tail.first().cloned(); let target = tail.get(1).cloned(); if tail.len() > 2 { return Err(format!( - "unexpected extra arguments after `claw plugins {}`: {}", + "unexpected extra arguments after `claw {} {}`: {}", + rest[0], tail[..2].join(" "), tail[2..].join(" ") ));