- DB: new agent_commands table (id, agent_id, command, status, output, exit_code, timestamps)
- Server: 4 new routes
POST /api/agents/:id/commands queue a command (dashboard → agent)
GET /api/agents/:id/commands history (last 50) for dashboard
GET /api/agents/commands/pending agent dequeues + marks running (Bearer auth)
POST /api/agents/commands/:id/result agent posts output/exit_code (Bearer auth)
Output capped at 128 KB; Bearer token enforced on agent-facing routes
- Agents (Linux/macOS/Windows): each polls /commands/pending each cycle,
executes via bash/PowerShell with 60s timeout, posts result back
- UI: ">_" button on each AgentCard opens CommandTerminal panel
Input line, Run button, history list (status icon + command + time)
Click any entry with output to expand/collapse its output
Auto-refreshes every 4 s while open
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- agent/skywatch-agent-macos.sh: Full macOS bash agent (launchd)
- CPU via top -l 2, memory via vm_stat/sysctl, disk via df -P
- Network via netstat -ib, uptime via kern.boottime, OS via sw_vers
- agent/install-agent-macos.sh: Installs macOS agent as launchd daemon
- agent/skywatch-agent-windows.ps1: PowerShell agent (Task Scheduler)
- CPU via Win32_PerfRawData two-sample delta, memory via Win32_OperatingSystem
- Disk via Get-PSDrive, network via Get-NetAdapterStatistics
- agent/install-agent-windows.ps1: Installs Windows agent via Task Scheduler
- server/index.js: New routes for macOS and Windows agent scripts/installers
- client/src/Agents.js: Multi-platform install panel with Linux/macOS/Windows tabs
- client/src/Agents.css: Platform tab button styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- agent/skywatch-agent.sh: bash daemon that collects CPU, memory, disk,
network, load, and uptime, then POSTs to /api/agents/report every 60 s
- agent/install-agent.sh: systemd installer; registers agent on first run
- server/database.js: adds `agents` and `agent_metrics` tables with indexes
- server/index.js: adds agent API routes (register, report, list, history,
delete, script/installer download); optional AGENT_REGISTRATION_KEY guard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>