import subprocess class TaskAgent: def run_shell_command(self, command): try: result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=10) return result.stdout or result.stderr except Exception as e: return f"[TaskAgent Error] {str(e)}"