huskies: merge 568_story_gateway_ui_connected_agents_dashboard

This commit is contained in:
dave
2026-04-15 18:20:39 +00:00
parent d68614e26a
commit 149a383447
3 changed files with 172 additions and 7 deletions
+9
View File
@@ -8,6 +8,8 @@ export interface JoinedAgent {
label: string;
address: string;
registered_at: number;
/// Unix timestamp of the last heartbeat from this agent.
last_seen: number;
/// Project this agent is assigned to, if any.
assigned_project?: string;
}
@@ -102,4 +104,11 @@ export const gatewayApi = {
{ method: "DELETE" },
);
},
/// Send a heartbeat for an agent to update its last-seen timestamp.
heartbeat(id: string): Promise<void> {
return gatewayRequest<void>(`/gateway/agents/${id}/heartbeat`, {
method: "POST",
});
},
};