{
  "version": 1,
  "id": "scn_ops_health",
  "slug": "server-health",
  "name": "Server Health",
  "icon": "waveform.path.ecg",
  "tint": "#22C55E",
  "settings": {
    "description": "The scene we watch our own production with: a runbook, a rolling health log, and a daily probe. Needs no connected accounts: edit the runbook's endpoint table to point at your own systems."
  },
  "assets": [
    {
      "id": "runbook",
      "type": "daslab/note",
      "name": "Runbook",
      "fields": {
        "content": "## Endpoints to probe\n\n| endpoint | expect | timeout |\n|---|---|---|\n| https://daslab.run/health | HTTP 200, `\"status\":\"ok\"` | 10s |\n| https://daslab.run/health/kern | HTTP 200 | 10s |\n\n## Rules\n\n- Probe from a Sandbox with `curl -s -m 10 -w '%{http_code} %{time_total}s'`.\n- Record: timestamp (UTC), endpoint, HTTP code, response time, and the `status`/`version`/`build` fields from the body.\n- Any non-200, non-ok status, or timeout → the log entry LEADS with the symptom and the likely area, not the healthy parts.\n- Keep the log to the most recent 14 days — trim older entries at the start of each run.\n- Never write credentials, admin keys, or admin URLs into the log.\n"
      },
      "layout": {
        "sortOrder": 0,
        "size": "large"
      }
    },
    {
      "id": "health_log",
      "type": "daslab/note",
      "name": "Health log",
      "fields": {
        "content": "_Appended daily at 07:00 UTC by the `daily-health` schedule. Newest first, rolling 14 days._\n\n### 2026-07-16 07:00:00 UTC\n- **https://daslab.run/health**: HTTP 200 (0.079s) | `status: \"ok\"`, `version: \"1.0.1\"`, `build: \"01dc91c9a8c5\"`\n- **https://daslab.run/health/kern**: HTTP 200 (0.018s) | `status: \"ok\"`, `version: N/A`, `build: N/A`\n"
      },
      "layout": {
        "sortOrder": 1,
        "size": "xlarge"
      }
    }
  ],
  "schedules": [
    {
      "id": "daily-health",
      "title": "Daily server health probe",
      "cron": "0 7 * * *",
      "prompt": "1. Read the **Runbook** note (this scene) for the endpoint list and rules.\n2. In a Sandbox, curl each endpoint per the runbook and capture HTTP code, response time, and body fields.\n3. Append a dated entry to the **Health log** note (newest first; trim entries older than 14 days).\n4. If anything failed or degraded, lead the entry with the symptom and the likely area.\n\nNever write credentials or admin keys into the log."
    }
  ]
}
