diff --git a/backend/app.py b/backend/app.py index 2b04167..08d0ce3 100644 --- a/backend/app.py +++ b/backend/app.py @@ -404,7 +404,10 @@ def create_suggested_monitors(): if 0 <= idx < len(suggestions.monitors): suggestion = suggestions.monitors[idx] monitor_result = monitor_service.create_from_suggestion( - suggestion, result.hostname + suggestion, + result.hostname, + username=result.username, + port=result.port, ) created.append(monitor_result) diff --git a/backend/services/monitors.py b/backend/services/monitors.py index 4301c5b..ff170cf 100644 --- a/backend/services/monitors.py +++ b/backend/services/monitors.py @@ -153,7 +153,13 @@ class MonitorService: self.created_monitors.extend(created) return created - def create_from_suggestion(self, suggestion: MonitorSuggestion, hostname: str) -> dict: + def create_from_suggestion( + self, + suggestion: MonitorSuggestion, + hostname: str, + username: str = "root", + port: int = 22, + ) -> dict: """ Create a monitor from a Claude suggestion. In production mode, this executes automatically. @@ -208,6 +214,8 @@ class MonitorService: push_token=push_token, monitor_id=monitor_id, interval_minutes=max(1, suggestion.interval // 60), + username=username, + port=port, ) response["deployment"] = deploy_result else: