registry = {}

def register(name: str):
    """Decorator to register a class as an operator in the registry."""
    def wrapper(cls):
        registry[name] = cls()
        return cls
    return wrapper

def get_operator(name: str):
    """Retrieve an initialized operator by name from the registry."""
    if name not in registry:
        raise KeyError(f"Operator '{name}' not found in registry. Have you loaded its plugin?")
    return registry[name]

def list_operators() -> list[str]:
    """Return a list of all registered operator names."""
    return list(registry.keys())
