from abc import ABC, abstractmethod


class ToolPlugin(ABC):
    """
    工具插件基类，所有工具插件需继承并实现相关方法
    """

    @abstractmethod
    def register(self, server):
        """注册插件到 Server"""
        pass

    @abstractmethod
    def unregister(self, server):
        """从 Server 注销插件"""
        pass

    @abstractmethod
    def refresh(self, config):
        """根据新配置刷新插件"""
        pass
