Newer
Older
cortex-hub / poc-grpc-agent / agent_node / skills / base.py
class BaseSkill:
    """Abstract interface for all Node capabilities (Shell, Browser, etc.)."""
    def execute(self, task, sandbox, on_complete, on_event=None):
        """Processes the given task and notifies results via callbacks."""
        raise NotImplementedError

    def cancel(self, task_id: str) -> bool:
        """Attempts to cancel the task and returns success status."""
        return False

    def shutdown(self):
        """Cleanup resources on node exit."""
        pass