Commit b8c862e4 authored by Lisa's avatar Lisa

fix: register browser/computer capabilities after controller init

parent 9f498292
...@@ -544,14 +544,14 @@ class NodeAgent: ...@@ -544,14 +544,14 @@ class NodeAgent:
def __init__(self, config_path: Optional[str] = None): def __init__(self, config_path: Optional[str] = None):
self.config = self._load_config(config_path) self.config = self._load_config(config_path)
self.executor = make_executor(self.config) self.executor = make_executor(self.config)
self.capabilities = self._detect_capabilities()
self.computer = make_computer_controller(self.config) self.computer = make_computer_controller(self.config)
self.browser = None self.browser = None
if self.capabilities.get('enable_browser') and HAS_BROWSER: if self.config.get('enable_browser') and HAS_BROWSER:
try: try:
self.browser = BrowserController() self.browser = BrowserController()
except Exception as e: except Exception as e:
_log_init_warning('browser_control', e) _log_init_warning('browser_control', e)
self.capabilities = self._detect_capabilities()
def _load_config(self, path: Optional[str]) -> Dict[str, Any]: def _load_config(self, path: Optional[str]) -> Dict[str, Any]:
"""Load node configuration from JSON.""" """Load node configuration from JSON."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment