{
  "tool_id": "sleep_calculator",
  "slug": "sleep-calculator",
  "path": "/sleep-calculator/",
  "mode": "engine_module",
  "usage": "Client-side calculator. Open https://aifithub.io/sleep-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aifithub.io/engines/sleep-calculator.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aifithub.io/methodology/sleep-calculator/",
  "sample_input": {
    "tool": "sleep_calculator",
    "wake_time": "06:30",
    "fall_asleep_minutes": 15
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "wake_time": {
        "type": "string"
      },
      "fall_asleep_minutes": {
        "type": "number"
      }
    },
    "required": [
      "tool",
      "wake_time",
      "fall_asleep_minutes"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "windows": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "bedTime": {
              "type": "object",
              "properties": {
                "hours": {
                  "type": "number"
                },
                "minutes": {
                  "type": "number"
                }
              }
            },
            "wakeTime": {
              "type": "object",
              "properties": {
                "hours": {
                  "type": "number"
                },
                "minutes": {
                  "type": "number"
                }
              }
            },
            "cycles": {
              "type": "number"
            },
            "sleepHours": {
              "type": "number"
            },
            "rating": {
              "type": "string"
            }
          }
        }
      },
      "fallAsleepMinutes": {
        "type": "number"
      }
    }
  }
}
