Add tactical fleet remote actions and agent command channel.

Extend remote commands with exec, PowerShell, file transfer, and fleet-wide broadcast; refresh AgentRemoteActions UI and WebSocket handling.
This commit is contained in:
drjones
2026-05-27 21:24:57 -07:00
parent b10d353a8b
commit 830c755235
6 changed files with 477 additions and 234 deletions

View File

@@ -84,10 +84,14 @@ export const api = {
getAIActivity: () => fetchJSON<AIActivityEntry[]>('/ai/activity'),
getEarningsEstimate: (hashrate: number) =>
fetchJSON<EarningsEstimate>(`/earnings/estimate?hashrate=${encodeURIComponent(hashrate)}`),
sendAgentCommand: (id: string, action: string, tailLines?: number) =>
sendAgentCommand: (
id: string,
action: string,
payload?: { tail_lines?: number; command?: string; path?: string; data?: string }
) =>
fetchJSON<{ success: boolean }>(`/agents/${id}/command`, {
method: 'POST',
body: JSON.stringify({ action, tail_lines: tailLines }),
body: JSON.stringify({ action, ...payload }),
}),
getAgentLog: (id: string, refresh = false) =>
fetchJSON<{ agent_id: string; content: string }>(`/agents/${id}/log${refresh ? '?refresh=1' : ''}`),