{
  "report_info": {
    "version": "9.0.1",
    "generated_at": "2026-04-11T17:16:21Z",
    "binary_name": "ai-discovery"
  },
  "binary": {
    "name": "ai-discovery",
    "path": "/home/kodachi/k900/dashboard/hooks/ai-discovery",
    "timestamp": "2026-04-11T17:16:21Z",
    "file_info": {
      "size": 1377288,
      "sha256": "49e48086946917c75021884ac65a0102e134982cb4840a2130d9ca63757c1310"
    },
    "flag_n": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:21.182465622Z",
      "command": "info",
      "version": "9.0.1",
      "data": {
        "name": "ai-discovery",
        "version": "9.0.1",
        "author": "Warith Al Maawali",
        "description": "Kodachi Auto-Discovery Daemon - Monitors and indexes Rust service binaries",
        "copyright": "© 2026 Linux Kodachi",
        "website": "https://www.digi77.com",
        "license": "Proprietary",
        "features": [
          "Binary file watching with inotify",
          "Automatic command extraction from -e --json",
          "Live command registry updates",
          "Daemon process management"
        ],
        "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:21.280497172Z",
      "command": "version",
      "version": "9.0.1",
      "data": {
        "name": "ai-discovery",
        "version": "9.0.1",
        "buildDate": "2026-04-11T17:16:21.280138903Z",
        "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:21.381716473Z",
      "command": "help",
      "version": "9.0.1",
      "data": {
        "name": "ai-discovery",
        "description": "Kodachi Auto-Discovery Daemon - Monitors and indexes Rust service binaries",
        "usage": "ai-discovery [OPTIONS] [COMMAND] [ARGS]",
        "commandCategories": [
          {
            "category": "Daemon Control",
            "commands": [
              {
                "name": "start",
                "description": "Start the auto-discovery daemon",
                "usage": "ai-discovery start [OPTIONS]",
                "options": [],
                "requires_sudo": false
              },
              {
                "name": "status",
                "description": "Show daemon status",
                "usage": "ai-discovery status [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          },
          {
            "category": "Registry Management",
            "commands": [
              {
                "name": "reindex",
                "description": "Force reindex all binaries",
                "usage": "ai-discovery reindex [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          }
        ],
        "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": {
          "5": "File not found",
          "0": "Success",
          "2": "Invalid arguments",
          "1": "General error",
          "3": "Permission denied",
          "4": "Network error"
        }
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_e": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:21.626751926Z",
      "command": "examples",
      "version": "9.0.1",
      "data": {
        "name": "ai-discovery",
        "description": "Usage examples for ai-discovery",
        "categories": [
          {
            "id": "1_daemon_control",
            "title": "Daemon Control",
            "description": "Start and monitor the auto-discovery daemon",
            "examples": [
              {
                "command": "sudo ai-discovery start",
                "description": "Start discovery daemon to monitor binaries",
                "expectedOutput": "Discovery daemon started successfully",
                "notes": "Monitors /dashboard/hooks/rust/*/target/release/"
              },
              {
                "command": "sudo ai-discovery start --foreground",
                "description": "Start in foreground mode for debugging",
                "expectedOutput": "Discovery daemon running in foreground",
                "notes": "Shows real-time file system events"
              },
              {
                "command": "sudo ai-discovery start --foreground --json",
                "description": "Foreground mode with JSON status output",
                "expectedOutput": "JSON events as binaries are discovered",
                "notes": "Combines debug visibility with structured output"
              },
              {
                "command": "ai-discovery status",
                "description": "Check daemon status and registry statistics",
                "expectedOutput": "Daemon status with command registry info",
                "notes": "Shows total commands, services, and last update"
              },
              {
                "command": "ai-discovery status --json",
                "description": "Get status in JSON format",
                "expectedOutput": "JSON response with daemon and registry status",
                "notes": "Useful for automated monitoring scripts"
              }
            ]
          },
          {
            "id": "2_registry_management",
            "title": "Registry Management",
            "description": "Manage the command registry and reindex binaries",
            "examples": [
              {
                "command": "sudo ai-discovery reindex",
                "description": "Force reindex all Rust service binaries",
                "expectedOutput": "All binaries reindexed successfully",
                "notes": "Extracts commands using -e --json from each binary"
              },
              {
                "command": "sudo ai-discovery reindex --json",
                "description": "Reindex with JSON output",
                "expectedOutput": "Reindex results in JSON format",
                "notes": "Shows discovered services and command counts"
              },
              {
                "command": "ai-discovery reindex --service health-control",
                "description": "Reindex specific service only",
                "expectedOutput": "Single service reindexed successfully",
                "notes": "Faster than full reindex for debugging"
              },
              {
                "command": "ai-discovery reindex --service health-control --json",
                "description": "Reindex single service with JSON output",
                "expectedOutput": "JSON with reindexed command count for health-control",
                "notes": "Fast targeted reindex with structured output"
              },
              {
                "command": "ai-discovery status --verbose",
                "description": "Show detailed registry contents",
                "expectedOutput": "Full list of discovered commands by service",
                "notes": "Displays all registered commands and metadata"
              },
              {
                "command": "ai-discovery status --verbose --json",
                "description": "Detailed registry contents as JSON",
                "expectedOutput": "JSON with full command list by service",
                "notes": "Combines verbose detail with structured output"
              }
            ]
          }
        ],
        "quickReference": [
          "sudo ai-discovery --help",
          "sudo ai-discovery --version",
          "sudo ai-discovery --info --json",
          "sudo ai-discovery --examples --json"
        ]
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    }
  }
}
