{
  "report_info": {
    "version": "9.0.1",
    "generated_at": "2026-06-28T11:16:45Z",
    "binary_name": "kodachi-session-helper"
  },
  "binary": {
    "name": "kodachi-session-helper",
    "path": "/opt/kodachi/dashboard/hooks/kodachi-session-helper",
    "timestamp": "2026-06-28T11:16:45Z",
    "file_info": {
      "size": 2421504,
      "sha256": "819b3052577597cbf8b37532251b875eece4adb3f298602ae49cc2e3a0351bdd"
    },
    "flag_n": {
      "command": "info",
      "data": {
        "author": "Warith Al Maawali",
        "copyright": "© 2026 Linux Kodachi",
        "description": "Global emergency keyboard shortcut daemon for Kodachi OS",
        "features": [
          "X11 key grab registration with collision detection",
          "Raw /dev/input hardware corroboration (anti-XTEST)",
          "Hold-to-trigger with auto-repeat rejection (1500ms default)",
          "Local session token authentication (no network required)",
          "Delayed lockdown with cancel capability",
          "Unix socket for dashboard status queries",
          "Atomic config reload via SIGHUP",
          "LUKS device wipe + dashboard nuke combined actions",
          "X11 disconnect detection with auto-reconnect",
          "Memory protection via mlock and PR_SET_DUMPABLE"
        ],
        "license": "Proprietary",
        "name": "kodachi-session-helper",
        "securityFeatures": {
          "authentication": "Local 256-bit session token (no network dependency)",
          "encryption": "SHA-256 token digest; memory locked and zeroized on exit",
          "inputValidation": "All configuration validated; key grabs verified against collisions",
          "rateLimiting": "Hold-to-trigger with cooldown prevents accidental re-trigger"
        },
        "systemRequirements": {
          "dependencies": [
            "X11 display server",
            "health-control binary",
            "/dev/input access (input group)"
          ],
          "os": "Linux (Kodachi OS / Debian-based with X11)",
          "privileges": "User session (non-root); 'input' group for evdev"
        },
        "version": "9.8.4 (build 319)",
        "website": "https://digi77.com"
      },
      "errors": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:45.579099178Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_v": {
      "command": "version",
      "data": {
        "buildDate": "REDACTED-BUILD-TIME",
        "gitCommit": "unknown",
        "name": "kodachi-session-helper",
        "rustVersion": "1.82.0",
        "version": "9.8.4 (build 319)"
      },
      "errors": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:45.661105346Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_h": {
      "command": "help",
      "data": {
        "commandCategories": [
          {
            "category": "Daemon Control",
            "commands": [
              {
                "description": "Start the emergency shortcut daemon",
                "examples": [
                  "kodachi-session-helper daemon"
                ],
                "name": "daemon",
                "options": [],
                "requires_sudo": false,
                "usage": "kodachi-session-helper daemon"
              },
              {
                "description": "Query the running daemon's status",
                "examples": [
                  "kodachi-session-helper status",
                  "kodachi-session-helper status --json"
                ],
                "name": "status",
                "options": [],
                "requires_sudo": false,
                "usage": "kodachi-session-helper status [--json]"
              },
              {
                "description": "Send SIGHUP to reload configuration",
                "examples": [
                  "kodachi-session-helper reload"
                ],
                "name": "reload",
                "options": [],
                "requires_sudo": false,
                "usage": "kodachi-session-helper reload"
              }
            ]
          }
        ],
        "description": "Global emergency keyboard shortcut daemon for Kodachi OS",
        "environmentVariables": [
          {
            "default": ":0",
            "description": "X11 display to connect to",
            "name": "DISPLAY",
            "values": ":0, :1, etc."
          },
          {
            "default": "/run/user/<uid>",
            "description": "Runtime directory for socket and state files",
            "name": "XDG_RUNTIME_DIR",
            "values": "Directory path"
          }
        ],
        "exitCodes": {
          "0": "Success",
          "1": "General error",
          "2": "Invalid arguments",
          "3": "Permission denied (running as root)",
          "4": "X11 not available",
          "5": "Wayland session (unsupported)"
        },
        "globalOptions": [
          {
            "description": "Print help information",
            "flag": "-h, --help"
          },
          {
            "description": "Print version information",
            "flag": "-v, --version"
          },
          {
            "description": "Display detailed information",
            "flag": "-n, --info"
          },
          {
            "description": "Show usage examples",
            "flag": "-e, --examples"
          },
          {
            "description": "Output in JSON format",
            "flag": "--json"
          },
          {
            "description": "Pretty-print JSON output",
            "flag": "--json-pretty"
          },
          {
            "description": "Enhanced JSON output (like jq)",
            "flag": "--json-human"
          },
          {
            "description": "Enable verbose output",
            "flag": "--verbose"
          },
          {
            "description": "Suppress non-essential output",
            "flag": "--quiet"
          }
        ],
        "name": "kodachi-session-helper",
        "usage": "kodachi-session-helper [OPTIONS] [COMMAND]"
      },
      "errors": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:45.738673519Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    },
    "flag_e": {
      "command": "examples",
      "data": {
        "categories": [
          {
            "description": "Starting, stopping, and managing the daemon",
            "examples": [
              {
                "command": "kodachi-session-helper daemon",
                "description": "Start the emergency shortcut daemon",
                "expectedOutput": "Daemon starts and enters event loop",
                "notes": "Run as your user (not root). Requires X11 and input group membership."
              },
              {
                "command": "kodachi-session-helper status",
                "description": "Check if the daemon is running and view armed shortcuts",
                "expectedOutput": "Daemon status with shortcut list"
              },
              {
                "command": "kodachi-session-helper status --json",
                "description": "Get daemon status in JSON format",
                "expectedOutput": "JSON with running state, shortcuts, and capabilities"
              },
              {
                "command": "kodachi-session-helper reload",
                "description": "Reload configuration without restarting",
                "expectedOutput": "Sends SIGHUP to running daemon",
                "notes": "The daemon re-reads its config and re-registers key grabs."
              }
            ],
            "id": "1_daemon_control",
            "title": "Daemon Control"
          },
          {
            "description": "Getting information about the tool",
            "examples": [
              {
                "command": "kodachi-session-helper -v",
                "description": "Show version",
                "expectedOutput": "Version string"
              },
              {
                "command": "kodachi-session-helper -v --json",
                "description": "Version in JSON format",
                "expectedOutput": "JSON version envelope"
              },
              {
                "command": "kodachi-session-helper -n",
                "description": "Show detailed program information",
                "expectedOutput": "Features, requirements, and capabilities"
              },
              {
                "command": "kodachi-session-helper -n --json",
                "description": "Program info in JSON format",
                "expectedOutput": "JSON program info envelope"
              },
              {
                "command": "kodachi-session-helper -e",
                "description": "Show usage examples",
                "expectedOutput": "This examples listing"
              },
              {
                "command": "kodachi-session-helper -e --json",
                "description": "Examples in JSON format",
                "expectedOutput": "JSON examples envelope"
              },
              {
                "command": "kodachi-session-helper -h",
                "description": "Show help information",
                "expectedOutput": "Usage and command listing"
              },
              {
                "command": "kodachi-session-helper -h --json",
                "description": "Help in JSON format",
                "expectedOutput": "JSON help envelope"
              }
            ],
            "id": "2_program_information",
            "title": "Program Information"
          }
        ],
        "description": "Usage examples for kodachi-session-helper",
        "name": "kodachi-session-helper",
        "quickReference": [
          "kodachi-session-helper daemon",
          "kodachi-session-helper status",
          "kodachi-session-helper reload",
          "kodachi-session-helper --help",
          "kodachi-session-helper --version",
          "kodachi-session-helper --info --json",
          "kodachi-session-helper --examples --json"
        ]
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-06-28T11:16:45.887886751Z",
      "version": "9.8.4 (build 319)",
      "warnings": []
    }
  }
}
