feat: fleet ops, KEV scan, tunnels, beacon fallback, persistence

Extend owned-fleet control with scheduled tasks, audit log, file browser,
HTTPS beacon when WS drops, protocol tunnels, registry/autostart forge
options, KEV exposure in full sys check with Telegram alerts, and UI/tests.
This commit is contained in:
AetherForge
2026-06-04 09:34:33 -07:00
parent d52479c9a6
commit 5fc601b564
111 changed files with 5845 additions and 116 deletions

View File

@@ -7,7 +7,7 @@ import userEvent from '@testing-library/user-event';
import { MemoryRouter } from 'react-router-dom';
import { type ReactNode } from 'react';
import { routerFuture } from '../routerFuture';
import { mockAgent, mockServerInfo } from '../test/fixtures';
import { mockAgent, mockServerInfo, mockServerConfig } from '../test/fixtures';
import { api } from '../api/client';
import { downloadApiFile, downloadAuthedFile } from '../api/download';
import { getStoredAuth } from '../api/auth';
@@ -54,6 +54,9 @@ import AmbientBackground from './Ambient/AmbientBackground';
import CursorFire from './Visual/CursorFire';
import MatrixRain from './Layout/MatrixRain';
vi.mock('./Fleet/ProtocolTunnelPanel', () => ({ default: () => null }));
vi.mock('./Fleet/FullSysCheckPanel', () => ({ default: () => null }));
vi.mock('../hooks/useWebSocket', () => ({
useWebSocket: vi.fn(),
}));
@@ -358,6 +361,7 @@ describe('AgentRemoteActions', () => {
beforeEach(() => {
vi.spyOn(api, 'listBuilds').mockResolvedValue([]);
vi.spyOn(api, 'sendAgentCommand').mockResolvedValue({ success: true });
vi.spyOn(api, 'getConfig').mockResolvedValue(mockServerConfig());
});
it('compact mode disables actions when offline', () => {
@@ -382,7 +386,11 @@ describe('AgentRemoteActions', () => {
});
it('full panel shows Target heading and recon section', async () => {
render(<AgentRemoteActions agent={mockAgent({ name: 'Node A' })} online />);
render(
<MemoryRouter future={routerFuture}>
<AgentRemoteActions agent={mockAgent({ name: 'Node A' })} online />
</MemoryRouter>
);
await waitFor(() => {
expect(screen.getByRole('heading', { name: 'Target: Node A' })).toBeInTheDocument();
});
@@ -391,7 +399,11 @@ describe('AgentRemoteActions', () => {
});
it('disables recon buttons when agent offline', async () => {
render(<AgentRemoteActions agent={mockAgent({ status: 'offline' })} online={false} />);
render(
<MemoryRouter future={routerFuture}>
<AgentRemoteActions agent={mockAgent({ status: 'offline' })} online={false} />
</MemoryRouter>
);
await waitFor(() => {
expect(screen.getByRole('heading', { name: /Target:/i })).toBeInTheDocument();
});