diff --git a/agent-node/bootstrap_installer.py b/agent-node/bootstrap_installer.py index 19c8676..eed5f12 100644 --- a/agent-node/bootstrap_installer.py +++ b/agent-node/bootstrap_installer.py @@ -190,7 +190,10 @@ pass hub_url = args.hub or existing_config.get("hub_url", DEFAULT_HUB) - token = args.token or existing_config.get("auth_token") or os.getenv("AGENT_AUTH_TOKEN", "") + + # NEW: The update endpoint requires the hub's secret key, not the node's specific invite/auth token + token = args.token or existing_config.get("secret_key") 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" install_dir = args.install_dir