{
  "report_info": {
    "version": "9.0.1",
    "generated_at": "2026-04-11T17:16:23Z",
    "binary_name": "ai-monitor"
  },
  "binary": {
    "name": "ai-monitor",
    "path": "/home/kodachi/k900/dashboard/hooks/ai-monitor",
    "timestamp": "2026-04-11T17:16:23Z",
    "file_info": {
      "size": 2757392,
      "sha256": "a25c34764af05f5c98b3514b829beab899eb14228c054ec8b33305f6c160b58a"
    },
    "flag_n": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:23.161739029Z",
      "command": "info",
      "version": "9.0.1",
      "data": {
        "name": "ai-monitor",
        "version": "9.0.1",
        "author": "Warith Al Maawali",
        "description": "Proactive system monitoring daemon with anomaly detection and suggestions",
        "copyright": "© 2026 Linux Kodachi",
        "website": "https://www.digi77.com",
        "license": "Proprietary",
        "features": [],
        "securityFeatures": {
          "inputValidation": "All inputs are validated and sanitized",
          "rateLimiting": "Built-in rate limiting for network operations",
          "authentication": "Secure authentication with certificate pinning",
          "encryption": "TLS 1.3 for all network communications"
        },
        "systemRequirements": {
          "os": "Linux (Debian-based)",
          "privileges": "root/sudo for system operations",
          "dependencies": [
            "OpenSSL",
            "libcurl"
          ]
        }
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_v": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:23.278486575Z",
      "command": "version",
      "version": "9.0.1",
      "data": {
        "name": "ai-monitor",
        "version": "9.0.1",
        "buildDate": "2026-04-11T17:16:23.278096862Z",
        "gitCommit": "unknown",
        "rustVersion": "1.82.0"
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_h": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:23.377576801Z",
      "command": "help",
      "version": "9.0.1",
      "data": {
        "name": "ai-monitor",
        "description": "Proactive system monitoring daemon with anomaly detection and suggestions",
        "usage": "ai-monitor [OPTIONS] [COMMAND] [ARGS]",
        "commandCategories": [
          {
            "category": "Commands",
            "commands": [
              {
                "name": "start",
                "description": "Start the system monitoring daemon",
                "usage": "ai-monitor ai-monitor start [OPTIONS]",
                "options": [
                  {
                    "flag": "--interval",
                    "description": "Check interval in seconds",
                    "default": "30"
                  },
                  {
                    "flag": "--threshold",
                    "description": "Security score threshold",
                    "default": "70"
                  },
                  {
                    "flag": "--daemon",
                    "description": "Run as background daemon"
                  }
                ],
                "requires_sudo": false,
                "examples": [
                  "ai-monitor start",
                  "ai-monitor start --interval 60",
                  "ai-monitor start --threshold 80",
                  "ai-monitor start --daemon"
                ]
              },
              {
                "name": "status",
                "description": "Show current monitor status and statistics",
                "usage": "ai-monitor ai-monitor status",
                "options": [
                  {
                    "flag": "--verbose",
                    "description": "Show detailed status"
                  }
                ],
                "requires_sudo": false,
                "examples": [
                  "ai-monitor status",
                  "ai-monitor status --verbose",
                  "ai-monitor status --json"
                ]
              },
              {
                "name": "suggestions",
                "description": "List and manage proactive suggestions",
                "usage": "ai-monitor ai-monitor suggestions [OPTIONS]",
                "options": [
                  {
                    "flag": "--category",
                    "description": "Filter by category"
                  },
                  {
                    "flag": "--resolve",
                    "description": "Resolve suggestion by ID"
                  },
                  {
                    "flag": "--dismiss",
                    "description": "Dismiss suggestion by ID"
                  },
                  {
                    "flag": "--cleanup",
                    "description": "Cleanup old suggestions"
                  }
                ],
                "requires_sudo": false,
                "examples": [
                  "ai-monitor suggestions",
                  "ai-monitor suggestions --category security",
                  "ai-monitor suggestions --resolve 1",
                  "ai-monitor suggestions --dismiss 2",
                  "ai-monitor suggestions --cleanup",
                  "ai-monitor suggestions --json"
                ]
              },
              {
                "name": "service",
                "description": "Manage the ai-monitor systemd service lifecycle",
                "usage": "ai-monitor ai-monitor service <ACTION>",
                "options": [
                  {
                    "flag": "<ACTION>",
                    "description": "install | uninstall | enable | disable | status",
                    "required": true
                  }
                ],
                "requires_sudo": false,
                "examples": [
                  "sudo ai-monitor service install",
                  "sudo ai-monitor service enable",
                  "ai-monitor service status",
                  "sudo ai-monitor service disable",
                  "sudo ai-monitor service uninstall"
                ]
              }
            ]
          }
        ],
        "globalOptions": [
          {
            "flag": "-h, --help",
            "description": "Print help information"
          },
          {
            "flag": "-v, --version",
            "description": "Print version information"
          },
          {
            "flag": "-n, --info",
            "description": "Display detailed information"
          },
          {
            "flag": "-e, --examples",
            "description": "Show usage examples"
          },
          {
            "flag": "--json",
            "description": "Output in JSON format"
          },
          {
            "flag": "--json-pretty",
            "description": "Pretty-print JSON output with indentation"
          },
          {
            "flag": "--json-human",
            "description": "Enhanced JSON output with improved formatting (like jq)"
          },
          {
            "flag": "--verbose",
            "description": "Enable verbose output"
          },
          {
            "flag": "--quiet",
            "description": "Suppress non-essential output"
          },
          {
            "flag": "--no-color",
            "description": "Disable colored output"
          },
          {
            "flag": "--config <FILE>",
            "description": "Use custom configuration file"
          },
          {
            "flag": "--timeout <SECS>",
            "description": "Set timeout (default: 30)"
          },
          {
            "flag": "--retry <COUNT>",
            "description": "Retry attempts (default: 3)"
          }
        ],
        "environmentVariables": [
          {
            "name": "RUST_LOG",
            "description": "Set logging level",
            "default": "info",
            "values": "error|warn|info|debug|trace"
          },
          {
            "name": "NO_COLOR",
            "description": "Disable all colored output when set",
            "default": "unset",
            "values": "1|true|yes (any value disables color)"
          }
        ],
        "exitCodes": {
          "2": "Invalid arguments",
          "0": "Success",
          "1": "General error",
          "3": "Permission denied",
          "4": "Network error",
          "5": "File not found"
        }
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_e": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:23.601098230Z",
      "command": "examples",
      "version": "9.0.1",
      "data": {
        "name": "ai-monitor",
        "description": "Usage examples for ai-monitor",
        "categories": [
          {
            "id": "1_basic",
            "title": "Basic Usage",
            "description": "Basic monitoring operations",
            "examples": [
              {
                "command": "ai-monitor start",
                "description": "Start the monitoring daemon with default settings",
                "expectedOutput": "Monitor daemon started successfully"
              },
              {
                "command": "ai-monitor status",
                "description": "Show current monitor status",
                "expectedOutput": "Monitor status with active suggestions count"
              },
              {
                "command": "ai-monitor suggestions",
                "description": "List all active suggestions",
                "expectedOutput": "List of proactive suggestions"
              },
              {
                "command": "ai-monitor start --json",
                "description": "Start daemon with JSON status output",
                "expectedOutput": "JSON response with daemon process info",
                "notes": "Useful for automated service management"
              },
              {
                "command": "ai-monitor status --json",
                "description": "Get monitor status as JSON",
                "expectedOutput": "JSON with monitor state and suggestion counts",
                "notes": "Structured output for monitoring dashboards"
              },
              {
                "command": "ai-monitor suggestions --json",
                "description": "List all suggestions as JSON",
                "expectedOutput": "JSON array of active suggestions with metadata",
                "notes": "Structured output for programmatic consumption"
              }
            ]
          },
          {
            "id": "2_advanced",
            "title": "Advanced Configuration",
            "description": "Advanced monitoring and suggestion management",
            "examples": [
              {
                "command": "ai-monitor start --interval 60 --threshold 80",
                "description": "Start with custom interval and security threshold",
                "expectedOutput": "Monitor started with custom configuration",
                "notes": "Interval in seconds, threshold 1-100"
              },
              {
                "command": "ai-monitor start --daemon",
                "description": "Start monitor as background daemon",
                "expectedOutput": "Monitor daemon started in background"
              },
              {
                "command": "ai-monitor suggestions --category security",
                "description": "List security-related suggestions only",
                "expectedOutput": "Filtered suggestions by category"
              },
              {
                "command": "ai-monitor suggestions --category network",
                "description": "Show network-related suggestions",
                "expectedOutput": "Network category suggestions"
              },
              {
                "command": "ai-monitor suggestions --resolve 1",
                "description": "Mark suggestion as resolved",
                "expectedOutput": "Suggestion marked as resolved"
              },
              {
                "command": "ai-monitor status --verbose --json",
                "description": "Get detailed status in JSON format",
                "expectedOutput": "Comprehensive monitor status in JSON"
              },
              {
                "command": "ai-monitor start --interval 60 --threshold 80 --json",
                "description": "Start with all parameters and JSON output",
                "expectedOutput": "JSON with custom interval and threshold configuration",
                "notes": "60-second interval, 80% security threshold, structured output"
              },
              {
                "command": "ai-monitor suggestions --category security --json",
                "description": "Security suggestions as JSON",
                "expectedOutput": "JSON array of security-category suggestions",
                "notes": "Filter and format combined for automation"
              }
            ]
          },
          {
            "id": "3_service",
            "title": "Service Management",
            "description": "Manage the systemd daemon lifecycle",
            "examples": [
              {
                "command": "sudo ai-monitor start --daemon",
                "description": "Install service (if needed) and start as systemd daemon",
                "expectedOutput": "ai-monitor daemon started via systemd",
                "notes": "Requires root. Auto-installs the service file."
              },
              {
                "command": "sudo ai-monitor service install",
                "description": "Install the systemd service file",
                "expectedOutput": "Service installed successfully"
              },
              {
                "command": "ai-monitor service status",
                "description": "Check the daemon status",
                "expectedOutput": "Service status with active/enabled state",
                "notes": "Does not require root"
              },
              {
                "command": "ai-monitor service status --json",
                "description": "Check daemon status as JSON",
                "expectedOutput": "JSON with service active/enabled state",
                "notes": "Structured output for monitoring scripts"
              },
              {
                "command": "sudo ai-monitor service uninstall",
                "description": "Stop, disable, and remove the service",
                "expectedOutput": "Service uninstalled successfully"
              }
            ]
          },
          {
            "id": "3b_tier_monitoring",
            "title": "AI Tier Health Monitoring",
            "description": "Monitor health status of all 6 AI engine tiers",
            "examples": [
              {
                "command": "ai-monitor status --json",
                "description": "Show health status of all AI tiers",
                "expectedOutput": "JSON with per-tier availability and health",
                "notes": "Covers TF-IDF, ONNX, Mistral.rs, GenAI/Ollama, Legacy LLM, Claude tiers"
              },
              {
                "command": "ai-monitor suggestions --category security --json",
                "description": "Security suggestions including AI tier recommendations",
                "expectedOutput": "JSON with AI-informed security suggestions",
                "notes": "AI tiers can generate security recommendations via tool calling"
              },
              {
                "command": "ai-monitor start --interval 120 --json",
                "description": "Monitor with AI tier health checks every 2 minutes",
                "expectedOutput": "Daemon started with AI tier monitoring enabled",
                "notes": "Periodically checks Ollama, GGUF model, and Claude CLI availability"
              }
            ]
          },
          {
            "id": "4_maintenance",
            "title": "Maintenance Operations",
            "description": "Cleanup and maintenance commands",
            "examples": [
              {
                "command": "ai-monitor suggestions --cleanup",
                "description": "Cleanup old inactive suggestions",
                "expectedOutput": "Count of cleaned up suggestions",
                "notes": "Removes suggestions older than 30 days"
              },
              {
                "command": "ai-monitor suggestions --dismiss 2",
                "description": "Dismiss a suggestion without resolving",
                "expectedOutput": "Suggestion marked as dismissed"
              },
              {
                "command": "ai-monitor suggestions --category optimization",
                "description": "Show optimization suggestions",
                "expectedOutput": "Performance and optimization suggestions"
              },
              {
                "command": "ai-monitor suggestions --category recovery",
                "description": "Show recovery suggestions",
                "expectedOutput": "System recovery and repair suggestions"
              }
            ]
          },
          {
            "id": "5_onnx_policy",
            "title": "ONNX Classifier & Policy Monitoring",
            "description": "Monitor ONNX intent classifier and AI policy file health",
            "examples": [
              {
                "command": "ai-monitor status --json",
                "description": "Check ONNX intent classifier health",
                "expectedOutput": "JSON including ONNX classifier model status",
                "notes": "Verifies kodachi-intent-classifier.onnx is loadable"
              },
              {
                "command": "ai-monitor status --json",
                "description": "Check AI policy file integrity",
                "expectedOutput": "JSON including policy file signature verification",
                "notes": "Verifies ai-policy.json exists and signature is valid"
              },
              {
                "command": "ai-monitor status --json",
                "description": "Show ONNX vs LLM routing statistics",
                "expectedOutput": "JSON with fast-path (ONNX) vs slow-path (LLM) breakdown",
                "notes": "Shows percentage of queries routed via fast path"
              }
            ]
          }
        ],
        "quickReference": [
          "sudo ai-monitor --help",
          "sudo ai-monitor --version",
          "sudo ai-monitor --info --json",
          "sudo ai-monitor --examples --json"
        ]
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    }
  }
}
