Enhanced code review and frontend validation with intelligent triggers: Code Review Agent Enhancement: - Added Sequential Thinking MCP integration for complex issues - Triggers on 2+ rejections or 3+ critical issues - New escalation format with root cause analysis - Comprehensive solution strategies with trade-off evaluation - Educational feedback to break rejection cycles - Files: .claude/agents/code-review.md (+308 lines) - Docs: CODE_REVIEW_ST_ENHANCEMENT.md, CODE_REVIEW_ST_TESTING.md Frontend Design Skill Enhancement: - Automatic invocation for ANY UI change - Comprehensive validation checklist (200+ checkpoints) - 8 validation categories (visual, interactive, responsive, a11y, etc.) - 3 validation levels (quick, standard, comprehensive) - Integration with code review workflow - Files: .claude/skills/frontend-design/SKILL.md (+120 lines) - Docs: UI_VALIDATION_CHECKLIST.md (462 lines), AUTOMATIC_VALIDATION_ENHANCEMENT.md (587 lines) Settings Optimization: - Repaired .claude/settings.local.json (fixed m365 pattern) - Reduced permissions from 49 to 33 (33% reduction) - Removed duplicates, sorted alphabetically - Created SETTINGS_PERMISSIONS.md documentation Checkpoint Command Enhancement: - Dual checkpoint system (git + database) - Saves session context to API for cross-machine recall - Includes git metadata in database context - Files: .claude/commands/checkpoint.md (+139 lines) Decision Rationale: - Sequential Thinking MCP breaks rejection cycles by identifying root causes - Automatic frontend validation catches UI issues before code review - Dual checkpoints enable complete project memory across machines - Settings optimization improves maintainability Total: 1,200+ lines of documentation and enhancements Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
105 lines
3.7 KiB
Plaintext
105 lines
3.7 KiB
Plaintext
1→//! GuruRMM Agent - Cross-platform Remote Monitoring and Management Agent
|
|
2→//!
|
|
3→//! This agent connects to the GuruRMM server, reports system metrics,
|
|
4→//! monitors services (watchdog), and executes remote commands.
|
|
5→
|
|
6→mod config;
|
|
7→mod device_id;
|
|
8→mod ipc;
|
|
9→mod metrics;
|
|
10→mod service;
|
|
11→mod transport;
|
|
12→mod updater;
|
|
13→
|
|
14→use anyhow::{Context, Result};
|
|
15→use clap::{Parser, Subcommand};
|
|
16→use std::path::PathBuf;
|
|
17→use std::sync::Arc;
|
|
18→use tokio::sync::RwLock;
|
|
19→use tracing::{error, info, warn};
|
|
20→
|
|
21→use crate::config::AgentConfig;
|
|
22→use crate::metrics::MetricsCollector;
|
|
23→use crate::transport::WebSocketClient;
|
|
24→
|
|
25→/// GuruRMM Agent - Remote Monitoring and Management
|
|
26→#[derive(Parser)]
|
|
27→#[command(name = "gururmm-agent")]
|
|
28→#[command(author, version, about, long_about = None)]
|
|
29→struct Cli {
|
|
30→ /// Path to configuration file
|
|
31→ #[arg(short, long, default_value = "agent.toml")]
|
|
32→ config: PathBuf,
|
|
33→
|
|
34→ /// Subcommand to run
|
|
35→ #[command(subcommand)]
|
|
36→ command: Option<Commands>,
|
|
37→}
|
|
38→
|
|
39→#[derive(Subcommand)]
|
|
40→enum Commands {
|
|
41→ /// Run the agent (default)
|
|
42→ Run,
|
|
43→
|
|
44→ /// Install as a system service
|
|
45→ Install {
|
|
46→ /// Server WebSocket URL (e.g., wss://rmm-api.example.com/ws)
|
|
47→ #[arg(long)]
|
|
48→ server_url: Option<String>,
|
|
49→
|
|
50→ /// API key for authentication
|
|
51→ #[arg(long)]
|
|
52→ api_key: Option<String>,
|
|
53→
|
|
54→ /// Skip legacy service detection and cleanup
|
|
55→ #[arg(long, default_value = "false")]
|
|
56→ skip_legacy_check: bool,
|
|
57→ },
|
|
58→
|
|
59→ /// Uninstall the system service
|
|
60→ Uninstall,
|
|
61→
|
|
62→ /// Start the installed service
|
|
63→ Start,
|
|
64→
|
|
65→ /// Stop the installed service
|
|
66→ Stop,
|
|
67→
|
|
68→ /// Show agent status
|
|
69→ Status,
|
|
70→
|
|
71→ /// Generate a sample configuration file
|
|
72→ GenerateConfig {
|
|
73→ /// Output path for config file
|
|
74→ #[arg(short, long, default_value = "agent.toml")]
|
|
75→ output: PathBuf,
|
|
76→ },
|
|
77→
|
|
78→ /// Run as Windows service (called by SCM, not for manual use)
|
|
79→ #[command(hide = true)]
|
|
80→ Service,
|
|
81→}
|
|
82→
|
|
83→/// Shared application state
|
|
84→pub struct AppState {
|
|
85→ pub config: AgentConfig,
|
|
86→ pub metrics_collector: MetricsCollector,
|
|
87→ pub connected: RwLock<bool>,
|
|
88→ pub last_checkin: RwLock<Option<chrono::DateTime<chrono::Utc>>>,
|
|
89→ pub tray_policy: RwLock<ipc::TrayPolicy>,
|
|
90→}
|
|
91→
|
|
92→#[tokio::main]
|
|
93→async fn main() -> Result<()> {
|
|
94→ // Initialize logging
|
|
95→ tracing_subscriber::fmt()
|
|
96→ .with_env_filter(
|
|
97→ tracing_subscriber::EnvFilter::from_default_env()
|
|
98→ .add_directive("gururmm_agent=info".parse()?)
|
|
99→ .add_directive("info".parse()?),
|
|
100→ )
|
|
|
|
<system-reminder>
|
|
Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.
|
|
</system-reminder>
|