diff --git a/agent-node/bootstrap_installer.py b/agent-node/bootstrap_installer.py index e54355c..f680e0f 100644 --- a/agent-node/bootstrap_installer.py +++ b/agent-node/bootstrap_installer.py @@ -203,7 +203,14 @@ node_token = args.token or existing_config.get("auth_token") or os.getenv("AGENT_AUTH_TOKEN", "") node_id = args.node_id or existing_config.get("node_id", "cortex-node-001") - grpc = args.grpc or existing_config.get("grpc_endpoint") or hub_url.replace("https://", "").replace("http://", "") + ":50051" + + # Ensure grpc endpoint has a port + grpc = args.grpc or existing_config.get("grpc_endpoint") + if not grpc: + grpc = hub_url.replace("https://", "").replace("http://", "") + ":50051" + elif ":" not in grpc: + grpc = f"{grpc}:50051" + install_dir = args.install_dir if not hub_token: @@ -219,7 +226,7 @@ if os.path.exists(local_version_file): with open(local_version_file) as f: local_version = f.read().strip() - if local_version == remote_version and not args.update_only: + if local_version == remote_version and not args.update_only and not args.daemon: _print(f"Already at {local_version} — launching existing installation.") _launch(install_dir, as_daemon=args.daemon) return # unreachable unless daemon diff --git a/ai-hub/app/api/routes/nodes.py b/ai-hub/app/api/routes/nodes.py index 9cb344c..718dce0 100644 --- a/ai-hub/app/api/routes/nodes.py +++ b/ai-hub/app/api/routes/nodes.py @@ -1074,12 +1074,10 @@ def _generate_node_config_yaml(node: models.AgentNode) -> str: """Helper to generate the agent_config.yaml content.""" hub_url = os.getenv("HUB_PUBLIC_URL", "https://ai.jerxie.com") + # Preserve the gRPC endpoint as-is from environment hub_grpc = os.getenv("HUB_GRPC_ENDPOINT", "ai.jerxie.com:443") secret_key = os.getenv("SECRET_KEY", "dev-secret-key-1337") - - # Clean up gRPC endpoint - if it ends in :443, remove it as it's implied by TLS - if hub_grpc.endswith(":443"): - hub_grpc = hub_grpc[:-4] + skill_cfg = node.skill_config or {} if isinstance(skill_cfg, str):