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>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
//! GuruConnect Agent - Remote Desktop Agent for Windows
|
||||
//!
|
||||
//! Provides screen capture, input injection, and remote control capabilities.
|
||||
//!
|
||||
//! Usage:
|
||||
//! guruconnect-agent.exe [support_code]
|
||||
//!
|
||||
//! If a support code is provided, the agent will connect using that code
|
||||
//! for a one-time support session.
|
||||
|
||||
mod capture;
|
||||
mod config;
|
||||
@@ -28,8 +34,25 @@ async fn main() -> Result<()> {
|
||||
|
||||
info!("GuruConnect Agent v{}", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
// Parse command line arguments
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
let support_code = if args.len() > 1 {
|
||||
let code = args[1].trim().to_string();
|
||||
// Validate it looks like a 6-digit code
|
||||
if code.len() == 6 && code.chars().all(|c| c.is_ascii_digit()) {
|
||||
info!("Support code provided: {}", code);
|
||||
Some(code)
|
||||
} else {
|
||||
info!("Invalid support code format, ignoring: {}", code);
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
// Load configuration
|
||||
let config = config::Config::load()?;
|
||||
let mut config = config::Config::load()?;
|
||||
config.support_code = support_code;
|
||||
info!("Loaded configuration for server: {}", config.server_url);
|
||||
|
||||
// Run the agent
|
||||
|
||||
Reference in New Issue
Block a user