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:
@@ -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' : ''}`),
|
||||
|
||||
Reference in New Issue
Block a user