zeroclaw-labs/zeroclaw · error

plugin registry source must be name or name@version

Error message

plugin registry source must be name or name@version

What it means

Validation guard in parse_plugin_spec: after rsplit_once('@'), either the name or the version half is empty — sources like '@1.0' or 'plugin@'. A spec must be a bare name or a complete name@version pair; a trailing or leading '@' with a missing side is rejected.

Solutions

  1. Use the form 'name' or 'name@version' for the plugin registry source.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/zeroclaw-plugins/src/registry.rs:119 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/0710d7c0b601c3d7. Report an issue: GitHub.

Appendix: source

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

            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,
    spec: &PluginSpec,
) -> Result<&'a PluginRegistryEntry> {
    let mut matches = index
        .plugins
        .iter()
        .filter(|entry| entry.name == spec.name)
        .filter(|entry| {
            spec.version
                .as_ref()

View on GitHub (pinned to 88bb9c8533)