feat(host-agent): include mcp_busy_device_ids in heartbeat payload
This commit is contained in:
@@ -168,17 +168,21 @@ class HostAgentClient:
|
||||
*,
|
||||
address: str | None = None,
|
||||
policy_revision: int = 0,
|
||||
mcp_busy_device_ids: list[str] | None = None,
|
||||
) -> HeartbeatResponse:
|
||||
payload: dict[str, Any] = {
|
||||
"host_id": self.config.host_id,
|
||||
"address": address,
|
||||
"devices": [device.model_dump(mode="json") for device in devices],
|
||||
"policy_revision": policy_revision,
|
||||
"planner_transport": self.config.ai_planner_transport,
|
||||
}
|
||||
if mcp_busy_device_ids:
|
||||
payload["mcp_busy_device_ids"] = list(mcp_busy_device_ids)
|
||||
response = await self._request(
|
||||
"PUT",
|
||||
f"/internal/v1/hosts/{self.config.host_id}/heartbeat",
|
||||
json={
|
||||
"host_id": self.config.host_id,
|
||||
"address": address,
|
||||
"devices": [device.model_dump(mode="json") for device in devices],
|
||||
"policy_revision": policy_revision,
|
||||
"planner_transport": self.config.ai_planner_transport,
|
||||
},
|
||||
json=payload,
|
||||
)
|
||||
return HeartbeatResponse.model_validate(response.json())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user