{"record":{"id":"87bd907c71c33bbf","repo":"langchain-ai/deepagents","slug":"git-marketplace-source-is-missing-repository-metad","errorCode":null,"errorMessage":"Git marketplace source is missing repository metadata","messagePattern":"Git marketplace source is missing repository metadata","errorType":"exception","errorClass":"MarketplaceError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/marketplace.py","lineNumber":433,"sourceCode":"        path = Path(source.value).expanduser().resolve()\n        return _load_marketplace_file(path), path\n    if source.source_type == \"url\":\n        path = _download_marketplace(source.value)\n        marketplace = _load_marketplace_file(path)\n        _reject_url_marketplace_with_local_plugins(marketplace, source.value)\n        return marketplace, path\n    if source.source_type == \"github\":\n        if not isinstance(source, RepositoryMarketplaceSource):\n            msg = \"GitHub marketplace source is missing repository metadata\"\n            raise MarketplaceError(msg)\n        root = _materialize_marketplace_repository(\n            source, f\"https://github.com/{source.value}.git\"\n        )\n        return load_marketplace(root), root\n    if source.source_type == \"git\":\n        if not isinstance(source, RepositoryMarketplaceSource):\n            msg = \"Git marketplace source is missing repository metadata\"\n            raise MarketplaceError(msg)\n        root = _materialize_marketplace_repository(source, source.value)\n        return load_marketplace(root), root\n    msg = f\"Unsupported marketplace source type: {source.source_type}\"\n    raise MarketplaceError(msg)\n\n\ndef _reject_url_marketplace_with_local_plugins(\n    marketplace: PluginMarketplace, url: str\n) -> None:\n    \"\"\"Reject URL marketplaces whose plugins need a sibling filesystem tree.\n\n    Direct marketplace JSON URLs only cache the catalog file. Relative plugin\n    sources such as `./plugins/foo` cannot be resolved from that cache alone.\n\n    Raises:\n        MarketplaceError: If any plugin entry uses a local relative source.\n    \"\"\"\n    local_plugins = [","sourceCodeStart":415,"sourceCodeEnd":451,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/marketplace.py#L415-L451","documentation":"Analogous to the GitHub case: a marketplace source with source_type == \"git\" must be a RepositoryMarketplaceSource containing the repository URL/identifier. Without that metadata the library cannot clone the marketplace repository, so it raises this error.","triggerScenarios":"materialize_marketplace_source receives a source with source_type == \"git\" that is not a RepositoryMarketplaceSource instance.","commonSituations":"Config parsing produced the base source class instead of the repository subclass; programmatic construction missing repository metadata; migrating configs between formats or versions.","solutions":["Use RepositoryMarketplaceSource for git-type sources with the repo URL as value","Fix the config parser/deserializer so git sources map to RepositoryMarketplaceSource","Validate the marketplace config before passing it into materialize_marketplace_source"],"exampleFix":"// before\nsource = MarketplaceSource(source_type=\"git\", value=\"https://github.com/org/plugins.git\")\n// after\nsource = RepositoryMarketplaceSource(source_type=\"git\", value=\"https://github.com/org/plugins.git\")","handlingStrategy":"type-guard","validationCode":"if source.source_type == \"git\" and not isinstance(source, RepositoryMarketplaceSource):\n    raise ValueError(\"git source must be RepositoryMarketplaceSource\")","typeGuard":"def is_repository_source(source: MarketplaceSource) -> bool:\n    return isinstance(source, RepositoryMarketplaceSource)","tryCatchPattern":"try:\n    marketplace, path = materialize_marketplace_source(source)\nexcept MarketplaceError as exc:\n    if \"Git marketplace source is missing repository metadata\" in str(exc):\n        source = RepositoryMarketplaceSource(source_type=\"git\", value=source.value)\n        marketplace, path = materialize_marketplace_source(source)\n    else:\n        raise","preventionTips":["Construct git sources as RepositoryMarketplaceSource with the repo URL","Validate configs before passing them to materialize_marketplace_source","Write config parsers that emit the correct source subclass per type"],"tags":["configuration","types","git","marketplace"],"backgroundTag":"missing-repository-metadata","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}