code: def external_commands(self):
          
          res = []
          with self.app.external_commands_lock:
              for cmd in self.app.get_external_commands():
                  res.append(cmd.serialize())
          return res
docs: Get the external commands from the daemon
  
          Use a lock for this function to protect
  
          :return: serialized external command list
          :rtype: str