{"record":{"id":"41073d4e8a4575bb","repo":"langchain-ai/deepagents","slug":"invalid-plugin-name-name-r-41073d","errorCode":null,"errorMessage":"Invalid plugin name: {name!r}","messagePattern":"Invalid plugin name: (.+?)","errorType":"exception","errorClass":"MarketplaceError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/marketplace.py","lineNumber":818,"sourceCode":"    )\n\n\ndef _load_marketplace_from_path(root: Path, manifest_path: Path) -> PluginMarketplace:\n    try:\n        raw = json.loads(manifest_path.read_text(encoding=\"utf-8\"))\n    except json.JSONDecodeError as exc:\n        msg = f\"Invalid JSON syntax in {manifest_path}: {exc}\"\n        raise MarketplaceError(msg) from exc\n    except OSError as exc:\n        msg = f\"Could not read marketplace manifest {manifest_path}: {exc}\"\n        raise MarketplaceError(msg) from exc\n    if not isinstance(raw, dict):\n        msg = f\"Marketplace manifest {manifest_path} must be a JSON object\"\n        raise MarketplaceError(msg)\n    try:\n        name = _validate_name(raw.get(\"name\"), allow_at=False)\n    except ValueError as exc:\n        raise MarketplaceError(str(exc)) from exc\n    plugins_raw = raw.get(\"plugins\")\n    if not isinstance(plugins_raw, list):\n        msg = f\"Marketplace {name} must contain a plugins array\"\n        raise MarketplaceError(msg)\n    warnings: list[str] = []\n    plugins = tuple(\n        plugin\n        for entry in plugins_raw\n        if (plugin := _parse_entry(entry, warnings=warnings)) is not None\n    )\n    for warning in warnings:\n        logger.warning(\"%s\", warning)\n    metadata = json_object(raw.get(\"metadata\"))\n    return PluginMarketplace(\n        name=name,\n        root=root,\n        manifest_path=manifest_path,\n        metadata=metadata,","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/marketplace.py#L800-L836","documentation":"The manifest's top-level `name` field is validated with _validate_name(allow_at=False). If it is missing, empty, or contains disallowed characters (including '@'), the ValueError is converted to MarketplaceError with the message 'Invalid plugin name: ...'. Marketplace names must be simple identifiers because '@' is reserved for the plugin-id separator.","triggerScenarios":"load_marketplace / add_local_marketplace on a manifest whose `name` is absent, empty string, contains '@', or otherwise fails _validate_name's rules.","commonSituations":"Typing a marketplace name like 'team@corp' (conflicts with plugin@marketplace ids); forgetting the `name` key entirely; whitespace or path separators in the name; copy-pasting a plugin id into the marketplace name field.","solutions":["Set a non-empty `name` in the manifest using only allowed identifier characters and no '@'.","Remove any '@' or path characters from the marketplace name.","Reinstall/refresh the marketplace from upstream if the shipped manifest is invalid."],"exampleFix":"// before\n{ \"name\": \"team@corp\", \"plugins\": [] }\n// after\n{ \"name\": \"team-corp\", \"plugins\": [] }","handlingStrategy":"validation","validationCode":"import re\nNAME_RE = re.compile(r\"^[A-Za-z0-9][A-Za-z0-9._-]*$\")\n\ndef marketplace_name_ok(doc: dict) -> bool:\n    name = doc.get(\"name\")\n    return isinstance(name, str) and NAME_RE.fullmatch(name) is not None and \"@\" not in name","typeGuard":"def is_valid_name(v: object) -> TypeGuard[str]:\n    return isinstance(v, str) and bool(v) and \"@\" not in v","tryCatchPattern":"try:\n    mp = load_marketplace(root)\nexcept MarketplaceError as exc:\n    if \"Invalid plugin name\" in str(exc):\n        rename_marketplace_in_manifest(root)\n    raise","preventionTips":["Reserve '@' exclusively for plugin-id separation; never use it in names.","Constrain names to letters, digits, dot, dash, underscore.","Test manifest names in CI with the same regex the library uses."],"tags":["validation","naming","marketplace","config"],"backgroundTag":"invalid-identifier-name","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}