T1: Tray App Core — System Tray Icon & Agent Process Manager
Priority: p0
The foundational tray application with system tray icon, context menu, and subprocess management.
New Files
cpp/dotnet/GaiaTray/
├── GaiaTray.csproj
├── Program.cs # Entry point, single-instance mutex
├── TrayIcon.cs # NotifyIcon, context menu, balloon notifications
├── AgentProcessManager.cs # Start/stop/monitor agent subprocesses
├── AgentRegistry.cs # Installed agent inventory + manifest parsing
├── AgentConfig.cs # Per-agent configuration
├── Resources/
│ ├── gaia-tray.ico
│ └── gaia-tray-active.ico
└── Properties/
└── launchSettings.json
Core Functionality
- System tray icon with right-click context menu
- Single-instance enforcement via named mutex (
Global\GaiaTrayMutex)
- Auto-start on Windows login (registry
HKCU\...\Run)
- Agent subprocess management:
- Start:
Process.Start(agentPath, "--stdio") with redirected I/O
- Stop: graceful JSON-RPC
shutdown → Process.Kill() after timeout
- Monitor:
Process.Exited event handler with auto-restart option
- Health ping: periodic
initialize JSON-RPC call
- DPI awareness:
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2)
- Dark mode:
DwmSetWindowAttribute(DWMWA_USE_IMMERSIVE_DARK_MODE)
- Agent crash recovery with notification + terminal auto-open
- State persistence:
%LOCALAPPDATA%\GAIA\tray-config.json
Context Menu
GAIA
├── Process Intelligence ► [Start] [Stop] [Terminal] [Interact] [Configure]
├── Network Intelligence ► [Start] [Stop] [Terminal] [Interact] [Configure]
├── Storage Intelligence ► [Not Installed] [Install]
├── ── (separator) ──
├── Start All Enabled / Stop All
├── ── (separator) ──
├── Manage Agents... / Notifications... / Action History... / Settings...
├── ── (separator) ──
├── About GAIA
└── Exit
Blocked by: Nothing (can start with mock data)
See full spec
T1: Tray App Core — System Tray Icon & Agent Process Manager
Priority: p0
The foundational tray application with system tray icon, context menu, and subprocess management.
New Files
Core Functionality
Global\GaiaTrayMutex)HKCU\...\Run)Process.Start(agentPath, "--stdio")with redirected I/Oshutdown→Process.Kill()after timeoutProcess.Exitedevent handler with auto-restart optioninitializeJSON-RPC callApplication.SetHighDpiMode(HighDpiMode.PerMonitorV2)DwmSetWindowAttribute(DWMWA_USE_IMMERSIVE_DARK_MODE)%LOCALAPPDATA%\GAIA\tray-config.jsonContext Menu
Blocked by: Nothing (can start with mock data)
See full spec