{"record":{"id":"086469248f4577aa","repo":"langchain-ai/deepagents","slug":"github-marketplace-source-is-missing-repository-me","errorCode":null,"errorMessage":"GitHub marketplace source is missing repository metadata","messagePattern":"GitHub marketplace source is missing repository metadata","errorType":"exception","errorClass":"MarketplaceError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/marketplace.py","lineNumber":425,"sourceCode":"\n    Raises:\n        MarketplaceError: If loading, cloning, downloading, or parsing fails.\n    \"\"\"\n    if source.source_type == \"directory\":\n        root = Path(source.value).expanduser().resolve()\n        return load_marketplace(root), root\n    if source.source_type == \"file\":\n        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.","sourceCodeStart":407,"sourceCodeEnd":443,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/marketplace.py#L407-L443","documentation":"When materializing a marketplace whose source_type is \"github\", the source object must be a RepositoryMarketplaceSource carrying repository metadata (owner/repo). If the parsed source claims to be a GitHub type but lacks that subclass, the library cannot know which repository to clone and raises this error.","triggerScenarios":"materialize_marketplace_source receives a source with source_type == \"github\" that is not an instance of RepositoryMarketplaceSource — typically constructed programmatically or deserialized from malformed config.","commonSituations":"Hand-built source objects missing the repository field; a deserializer instantiating the base marketplace-source class instead of RepositoryMarketplaceSource; a schema change between library versions.","solutions":["Construct the source as RepositoryMarketplaceSource with the owner/repo value (e.g. \"org/repo\")","Fix the deserialization/parsing path so github sources produce RepositoryMarketplaceSource","Check that the marketplace config file declares the required repository fields"],"exampleFix":"// before\nsource = MarketplaceSource(source_type=\"github\", value=\"org/repo\")\n// after\nsource = RepositoryMarketplaceSource(source_type=\"github\", value=\"org/repo\")","handlingStrategy":"type-guard","validationCode":"if source.source_type == \"github\" and not isinstance(source, RepositoryMarketplaceSource):\n    raise ValueError(\"github 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 \"GitHub marketplace source is missing repository metadata\" in str(exc):\n        source = RepositoryMarketplaceSource(source_type=\"github\", value=source.value)\n        marketplace, path = materialize_marketplace_source(source)\n    else:\n        raise","preventionTips":["Always construct github sources via RepositoryMarketplaceSource","Validate parsed configs against the source classes before use","Keep deserializers in sync with the source class hierarchy"],"tags":["configuration","types","github","marketplace"],"backgroundTag":"missing-repository-metadata","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}