{
  "repo": "tidbcloud/api-gateway",
  "binary": "sentinel",
  "binary_path": "sentinel/sentinel.py",
  "dependencies": {
    "KongSentinelLifecycle.StartScheduledChecks": {
      "infrastructure": {
        "filesystem": {
          "conditions": [
            "CONFIG_PATH points to a valid YAML config file"
          ],
          "operations": [
            {
              "operation": "READ SENTINEL CONFIG",
              "trigger": "Load domains, credentials, and Feishu webhook configuration",
              "conditions": [
                "yaml.safe_load(open(CONFIG_PATH)) succeeds"
              ],
              "implementation": "module import -> yaml.safe_load(open(CONFIG_PATH))"
            }
          ]
        }
      },
      "services": [
        {
          "name": "kong-probe-targets",
          "target_interface": "HTTPS /status/200 and related gateway endpoints",
          "operation_type": "http_get",
          "conditions": [
            "Scheduled probe jobs are active"
          ],
          "operations": [
            {
              "operation": "RUN HEALTH AND AUTH CHECKS",
              "trigger": "Probe healthy, authentication, certificate, and cross-region states on configured domains",
              "conditions": [
                "schedule.run_pending() triggers configured jobs"
              ],
              "implementation": "main -> schedule.every(...).do(h.run/a.run/c.run) -> requests.get/post/delete(...)"
            }
          ]
        },
        {
          "name": "feishu",
          "target_interface": "webhook bot API",
          "operation_type": "http_post",
          "conditions": [
            "Probe errors reach the configured threshold"
          ],
          "operations": [
            {
              "operation": "SEND ALERT",
              "trigger": "Notify Feishu on repeated health/auth/cert/cross-region failures",
              "conditions": [
                "ErrorStatus.send(...) is invoked"
              ],
              "implementation": "send_alert(content) -> requests.post(FEISHU_WEBHOOK_URL, json=data, timeout=3)"
            }
          ]
        }
      ]
    },
    "KongSentinelLifecycle.StartMetricsServer": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    }
  }
}
