class TransportRouter:
    def __init__(self, local_registry: dict, remote_registry: dict):
        self.local_registry = local_registry
        self.remote_registry = remote_registry

    def resolve(self, module_type: str, provider_name: str):
        if provider_name in self.local_registry.get(module_type, {}):
            return self.local_registry[module_type][provider_name]
        if provider_name in self.remote_registry.get(module_type, {}):
            return self.remote_registry[module_type][provider_name]
        raise KeyError(f"Unknown provider: {module_type}/{provider_name}")
