Commit Graph

37 Commits

Author SHA1 Message Date
598a6737de Fix SAS Service build errors
- Use raw FFI for named pipe operations instead of windows crate APIs
- Add Win32_System_IO feature to Cargo.toml
- Define pipe constants manually to avoid missing exports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:55:36 -07:00
68eab236bf Add SAS Service for Ctrl+Alt+Del support
- New guruconnect-sas-service binary (runs as SYSTEM)
- Named pipe IPC for agent-to-service communication
- Multi-tier SAS approach: service > sas.dll > fallback
- Service auto-install/uninstall helpers in startup.rs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:34:41 -07:00
f6bf0cfd26 Add PostgreSQL database persistence
- Add connect_machines, connect_sessions, connect_session_events, connect_support_codes tables
- Implement db module with connection pooling (sqlx)
- Add machine persistence across server restarts
- Add audit logging for session/viewer events
- Support codes now persisted to database

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:51:01 -07:00
448d3b75ac Add connected technician tracking to dashboard
- Add ViewerInfo struct to track viewer name and connection time
- Update session manager to track viewers with names
- Update API to return viewer list for each session
- Update dashboard to display "Mike Connected (3 min)" on machine bars
- Update viewer.html to pass viewer_name parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:17:47 -07:00
f3b76b7b62 Add clickable Online/Offline filters in sidebar 2025-12-28 18:44:34 -07:00
d01fb4173f Fix sidebar counts to use is_online status 2025-12-28 18:41:47 -07:00
1cc94c61e7 Add is_online/is_persistent for persistent agent sessions
- Sessions now track whether agent is online or offline
- Persistent agents (no support code) stay in session list when disconnected
- Dashboard shows online/offline status with color indicator
- Connect/Chat buttons disabled when agent is offline
- Agent reconnection reuses existing session
2025-12-28 17:52:26 -07:00
3c2e0708ef Add remote desktop viewer
- Create viewer.html with canvas-based video display
- Implement protobuf parsing for VideoFrame/RawFrame
- Add zstd decompression using fzstd library
- Convert BGRA to RGBA for canvas rendering
- Add mouse event capture and encoding
- Add keyboard event capture and encoding
- Add Ctrl+Alt+Del special key support
- Add fullscreen toggle
- Update dashboard to open viewer in new window
- Auto-reconnect on connection loss

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:40:29 -07:00
cc35d1112f Fix: use Self:: for static method calls 2025-12-28 17:26:09 -07:00
4417fdfb6e Implement idle/active mode for scalable agent connections
- Add StartStream/StopStream/AgentStatus messages to protobuf
- Agent now starts in idle mode (heartbeat only, no capture)
- Agent enters streaming mode when viewer connects (StartStream)
- Agent returns to idle when all viewers disconnect (StopStream)
- Server tracks viewer IDs and sends start/stop commands
- Heartbeat mechanism with 90 second timeout detection
- Session API now includes streaming status and agent info

This allows 2000+ agents to connect with minimal bandwidth.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:24:51 -07:00
5bb5116b92 Hide console window, add Debug Window tray option
- Hide console window by default (windows_subsystem = "windows")
- Add "Show Debug Window" menu item to tray
- AllocConsole when debug window requested
- Console shows logs for troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:09:15 -07:00
d7c272dabc Restrict session termination to support sessions only
- Persistent agents: No "End Session" menu, shows "Managed by Administrator"
- Persistent agents: Always reconnect, can only be removed via admin disconnect
- Support sessions: User can end via tray icon
- Tray icon still shows for persistent agents (status display only)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:04:08 -07:00
52c47b2de1 Fix persistence logic for persistent vs support sessions
- Persistent agents (no code) now add to startup on launch
- All agents add to startup, cleanup removes it on explicit exit
- Persistent agents reconnect automatically on disconnect
- Support sessions still exit without reconnecting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 17:02:21 -07:00
4b29dbe6c8 Add disconnect/uninstall for persistent sessions
- Server: Add DELETE /api/sessions/:id endpoint to disconnect agents
- Server: SessionManager.disconnect_session() sends Disconnect message
- Agent: Handle ADMIN_DISCONNECT to trigger uninstall
- Agent: Add startup::uninstall() to remove from startup and schedule exe deletion
- Dashboard: Add Disconnect button in Access tab machine details
- Dashboard: Add Chat button for persistent sessions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:53:29 -07:00
aa03a87c7c Add chat functionality between technician and client
- Add ChatMessage to protobuf definitions
- Server relays chat messages between agent and viewer
- Agent chat module shows messages via MessageBox
- Dashboard chat modal with WebSocket connection
- Simplified protobuf encoder/decoder in JavaScript

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:31:16 -07:00
0dcbae69a0 Add startup persistence for support sessions
- Added startup.rs module for Windows registry operations
- Agent adds itself to HKCU\...\Run on session start
- Agent removes itself from startup on session end
- Works with user-level registry (no admin required)
- Added Win32_System_Registry feature to windows crate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:15:24 -07:00
43f15b0b1a Add UAC elevation support with manifest
- Added guruconnect.manifest requesting highestAvailable privileges
- Using winres to embed manifest in executable
- Added is_elevated() function to detect admin status
- Logs elevation status on startup
- Manifest includes Windows 7-11 compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:12:03 -07:00
c57429f26a Fix tray icon event handling on Windows
- Add Windows message queue pumping in process_events()
- PeekMessageW/TranslateMessage/DispatchMessageW for event delivery
- Menu clicks and tray events now work properly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:09:08 -07:00
dea96bd300 Add system tray icon with menu for agent
- Added tray-icon and muda crates for tray functionality
- Tray icon shows green circle when connected
- Menu displays: session code, machine name, End Session option
- End Session menu item cleanly terminates the agent
- Tray events processed in session main loop

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:06:16 -07:00
8246d135f9 Add cancellation flow for support sessions
Server changes:
- Allow cancelling connected codes (not just pending)
- Reject agent connections with cancelled codes
- Periodic cancellation check during active sessions
- Send Disconnect message when code is cancelled

Agent changes:
- Detect cancellation via Disconnect message
- Show Windows MessageBox to notify user
- Exit cleanly without reconnecting for support sessions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 15:30:43 -07:00
f408667a3f Auto-refresh dashboard and show client info
- Support tab auto-refreshes every 3 seconds
- Shows client hostname under code when connected
- Changes Cancel button to Join button when connected
- Added joinSession placeholder function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:49:03 -07:00
90ac39a0bc Extract support code from executable filename
Agent now reads its own filename to extract the 6-digit code.
User just downloads GuruConnect-123456.exe and double-clicks - no
command line arguments or prompts needed.

Supports patterns:
- GuruConnect-123456.exe
- GuruConnect_123456.exe
- GuruConnect123456.exe

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:35:05 -07:00
1d2ca47771 Link support codes to agent sessions
- Server: Accept support_code param in WebSocket connection
- Server: Link code to session when agent connects, mark as connected
- Server: Mark code as completed when agent disconnects
- Agent: Accept support code from command line argument
- Agent: Send hostname and support_code in WebSocket params
- Portal: Trigger agent download with code in filename
- Portal: Show code reminder in download instructions
- Dashboard: Add machines list fetching (Access tab)
- Add TODO.md for feature tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:11:52 -07:00
9af59158b2 Add team feedback to requirements document
- 25 detailed requirements from Howard's team
- Backstage mode (like RustDesk unattended access)
- Toolbox features (TaskMgr, CMD, PowerShell, RegEdit)
- Annotations, chat, and security requirements
- Cross-platform and mobile support needs
- PSA integrations (Halo, Autotask, ConnectWise)
- Branding and white-label requirements
- Session recording and reporting features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:52:05 -07:00
e118fe6698 Add agent_id to WebSocket authentication
- Add UUID-based agent_id field to Config struct
- Auto-generate and persist agent_id on first run
- Include agent_id in WebSocket query parameters
- Update production server URL to connect.azcomputerguru.com

Fixes WebSocket connection failure where server expected agent_id parameter.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:52:05 -07:00
AZ Computer Guru
7c16b2bf4d Set production server URL as default 2025-12-28 13:21:09 -07:00
AZ Computer Guru
d14fa5880f Fix transport variable reference 2025-12-28 12:44:28 -07:00
AZ Computer Guru
d2c8cf1c0b Fix remaining API issues and borrow conflicts
- Rename display param to target_display to avoid tracing conflict
- Refactor session loop to avoid holding borrow across handle_message
2025-12-28 12:43:54 -07:00
AZ Computer Guru
b1de7be632 Fix more Windows crate 0.58 API changes
- GetDesc now returns value instead of mutable param
- CPUAccessFlags is u32, not flag wrapper
- SetEvictionPriority takes enum directly
- Fix encode_utf16 iteration
- Rename display variable to avoid tracing conflict
- Fix borrow issue in websocket receive
2025-12-28 12:41:51 -07:00
AZ Computer Guru
582387f60e Merge branch 'main' of ssh://172.16.3.20:2222/azcomputerguru/guru-connect 2025-12-28 12:39:47 -07:00
AZ Computer Guru
09223cf97a Fix Windows crate 0.58 API compatibility
- Define XBUTTON1/XBUTTON2 constants (removed from windows crate)
- Update D3D11_CPU_ACCESS_FLAG usage
- Fix CreateTexture2D output parameter
- Fix BitBlt/EnumDisplayMonitors return type handling
- Fix encode_utf16 iterator usage
2025-12-28 12:39:33 -07:00
3f1fd8f20d Add technician login and dashboard pages
- Add /login page with dark theme matching portal
- Add /dashboard with 4 tabs: Support, Access, Build, Settings
- Add clean URL routes (/login, /dashboard) to server
- Add "Technician Login" link to portal footer
- Dashboard shows active support codes with generate/cancel
- Build tab has installer builder form (placeholder for agent)
- Access tab has 3-panel layout for machine management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 12:04:16 -07:00
611bc00d06 Add support codes API and portal server changes
- support_codes.rs: 6-digit code management
- main.rs: Portal routes, static file serving, AppState
- relay/mod.rs: Updated for AppState
- Cargo.toml: Added rand, tower-http fs feature

Generated with Claude Code
2025-12-28 17:54:05 +00:00
70a9fcd129 Add portal frontend and support code API
Portal:
- Code entry page with dark theme
- Browser detection for download instructions
- Custom protocol handler support
- Mobile-friendly numeric input

Server:
- Support codes module (6-digit generation, validation)
- Static file serving for portal
- New API endpoints: /api/codes/*

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:53:02 -07:00
cbb09ea524 Add portal UX and dashboard specifications
Portal (unauthenticated):
- Code entry with browser-specific download instructions
- Custom protocol handler (guruconnect://session/{code})
- One-time agent runs in userspace, no admin required

Dashboard (authenticated):
- Support tab: Active sessions by technician, support request queue
- Access tab: Three-panel layout with groupings sidebar
- Build tab: Installer builder form
- Settings tab: Appearance, groupings, notifications, account

Visual style matches GuruRMM dashboard design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:37:34 -07:00
aa15902f7b Add comprehensive REQUIREMENTS.md and build config
Requirements include:
- Support sessions (5-6 digit codes) + Unattended (permanent)
- Server-built installers with MSI support
- Auto-generated dashboard groups (Company, Site, OS, Tag)
- Full bidirectional clipboard with keystroke injection
- Chat/messaging with support request queue
- Auto-update, Safe Mode support, Emergency Reboot, Wake-on-LAN
- 64-bit primary, 32-bit secondary build targets

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 09:53:29 -07:00
AZ Computer Guru
33893ea73b Initial GuruConnect implementation - Phase 1 MVP
- Agent: DXGI/GDI screen capture, mouse/keyboard input, WebSocket transport
- Server: Axum relay, session management, REST API
- Dashboard: React viewer components with TypeScript
- Protocol: Protobuf definitions for all message types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:18:05 -07:00