zeroclaw-labs/zeroclaw · error

plugin name must not be empty

Error message

plugin name must not be empty

What it means

Validation guard in parse_plugin_spec: the trimmed registry source string is empty, so it cannot name a plugin to install. This is the first check in the parser used by plugin install/download paths before any name@version splitting happens.

Solutions

  1. Provide a non-empty plugin name.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/zeroclaw-plugins/src/registry.rs:110 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/c543565c5efd7b9b. Report an issue: GitHub.

Appendix: source

Thrown at crates/zeroclaw-plugins/src/registry.rs:110

pub fn install_source(entry: &PluginRegistryEntry) -> String {
    format!("{}@{}", entry.name, entry.version)
}

pub fn install_command(entry: &PluginRegistryEntry, registry_url: Option<&str>) -> String {
    let source = install_source(entry);
    match registry_url {
        Some(registry_url) if !registry_url.trim().is_empty() => {
            format!("zeroclaw plugin install {source} --registry {registry_url}")
        }
        _ => format!("zeroclaw plugin install {source}"),
    }
}

pub fn parse_plugin_spec(source: &str) -> Result<PluginSpec> {
    let source = source.trim();
    if source.is_empty() {
        bail!("plugin name must not be empty");
    }
    let Some((name, version)) = source.rsplit_once('@') else {
        return Ok(PluginSpec {
            name: source.to_string(),
            version: None,
        });
    };
    if name.is_empty() || version.is_empty() {
        bail!("plugin registry source must be name or name@version");
    }
    Ok(PluginSpec {
        name: name.to_string(),
        version: Some(version.to_string()),
    })
}

pub fn resolve_entry<'a>(
    index: &'a PluginRegistryIndex,

View on GitHub (pinned to 88bb9c8533)