{"record":{"id":"7d9a3e59ee61bc7b","repo":"langchain-ai/deepagents","slug":"invalid-plugin-name-name-r","errorCode":null,"errorMessage":"Invalid plugin name: {name!r}","messagePattern":"Invalid plugin name: (.+?)","errorType":"exception","errorClass":"PluginManifestError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/manifest.py","lineNumber":82,"sourceCode":"    the empty string are not.\n\n    Returns:\n        The validated name or fallback.\n\n    Raises:\n        PluginManifestError: If neither value is a valid name.\n    \"\"\"\n    if (\n        isinstance(name, str)\n        and name\n        and _NAME_RE.fullmatch(name)\n        and (allow_at or \"@\" not in name)\n    ):\n        return name\n    if fallback and _NAME_RE.fullmatch(fallback) and (allow_at or \"@\" not in fallback):\n        return fallback\n    msg = f\"Invalid plugin name: {name!r}\"\n    raise PluginManifestError(msg)\n\n\ndef _is_windows_absolute(path: str) -> bool:\n    return bool(PureWindowsPath(path).drive or PureWindowsPath(path).root)\n\n\ndef resolve_relative_path(\n    declaration: str,\n    plugin_root: Path,\n    *,\n    require_dot_prefix: bool = True,\n) -> tuple[Path | None, str | None]:\n    \"\"\"Resolve one path declared relative to `plugin_root`.\n\n    Plugin manifest component fields must start with `./`. Marketplace source\n    paths must not, because the marketplace format also accepts a bare relative\n    path such as `tools/my-plugin`; those callers pass\n    `require_dot_prefix=False`. Both forms stay inside `plugin_root`.","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/manifest.py#L64-L100","documentation":"`_validate_name` checks that a plugin/marketplace name is a nonempty string with no whitespace (matching `_NAME_RE`), optionally forbidding `@` when `allow_at` is false, and falls back to a provided `fallback_name` (e.g. the directory name from the marketplace entry). If neither the value nor fallback is valid, it raises `PluginManifestError` with this message.","triggerScenarios":"`load_manifest` finds a manifest whose `name` field is missing, empty, not a string, contains whitespace, or fails `_NAME_RE` — and no valid `fallback_name` was passed (or the fallback itself is invalid); also via `_parse_entry` and `_load_marketplace_from_path` for marketplace entry/source names (where `allow_at=False`).","commonSituations":"Plugin author used a display-style name like `\"Code Review\"` in `plugin.json`; `name` omitted and the directory name is also invalid (spaces, empty); marketplace entry names containing `@` where it's disallowed; non-ASCII or punctuation-only names.","solutions":["Set a valid `name` in the manifest: nonempty, no whitespace, matching the allowed charset (e.g. `code-review`).","If relying on the fallback, ensure the marketplace entry/directory name is also a valid identifier.","Keep `@` out of names except where the `name@marketplace` form is expected.","Validate the manifest locally before publishing."],"exampleFix":"// before\n{\"name\": \"Code Review\"}\n// after\n{\"name\": \"code-review\"}","handlingStrategy":"validation","validationCode":"import re\nNAME_RE = re.compile(r\"[A-Za-z0-9][A-Za-z0-9._-]*\")\nassert isinstance(name, str) and name and NAME_RE.fullmatch(name), f\"bad name: {name!r}\"","typeGuard":"def is_valid_plugin_name(name: object) -> bool:\n    import re\n    return (\n        isinstance(name, str)\n        and bool(name)\n        and not any(c.isspace() for c in name)\n        and name != \"@\"\n    )","tryCatchPattern":"try:\n    load_manifest(root, fallback_name=fallback)\nexcept PluginManifestError as exc:\n    if \"Invalid plugin name\" in str(exc):\n        raise SystemExit(f\"fix manifest name: {exc}\") from exc","preventionTips":["Use lowercase kebab-case identifiers for plugin names.","Never put spaces in `name` or directory names used as fallbacks.","Omit `@` except in `name@marketplace` ids.","Validate names in CI before publishing a plugin or marketplace."],"tags":["plugins","manifest","naming","validation"],"backgroundTag":"invalid-plugin-name","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}