{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/surfingdog-ai/json-schema/surfingdog-ai-door-history-schema.json",
  "title": "DoorHistory",
  "description": "On a single business: what this network's own reads found of the doors it shows, kept for good, one line a day (protocol §4.8). Each door type at each host, the doors there now first: the first and last day a read found it answering and on how many days, and for a door read every day (a member's, a claimed listing's), from 14 checked days, its daily checks: a day is answered only when every check that day answered; one missed (failed, or blocked while the door is down by the network's reads) or refused (blocked otherwise) is not. A read an agent's report or the business asked for is no check, and no agent's report enters any of it. Absent when there is nothing to say.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/network-openapi.json#/components/schemas/DoorHistory",
  "type": "object",
  "required": [
    "as_of",
    "doors"
  ],
  "properties": {
    "as_of": {
      "type": "string",
      "format": "date"
    },
    "doors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type",
          "host",
          "first_seen",
          "last_seen",
          "days_seen",
          "current"
        ],
        "properties": {
          "type": {
            "type": "string",
            "pattern": "^(inbox|mcp|a2a|openapi|api|ucp|acp|nlweb|webhook|other|platform:[a-z0-9-]{1,40})$",
            "description": "A door type (inbox, mcp, a2a, platform:shopify and the rest)."
          },
          "host": {
            "type": "string"
          },
          "first_seen": {
            "type": "string",
            "format": "date",
            "description": "The first UTC day a read of ours found a door of this type at this host answering."
          },
          "last_seen": {
            "type": "string",
            "format": "date",
            "description": "The last such day."
          },
          "days_seen": {
            "type": "integer",
            "minimum": 1,
            "description": "On how many days a read of ours found it answering: a door the crawl reads about once a month is seen on few days, and nothing is said of the days between."
          },
          "current": {
            "type": "boolean",
            "description": "Whether a door of this type is at this host now."
          },
          "checks": {
            "type": "object",
            "description": "A door read every day, from 14 checked days: the first and last day checked, the days checked, answered and refused, and the last 90 days ending on as_of (a every check answered, x one was missed, b one was refused and none missed, . no check).",
            "required": [
              "first_checked",
              "last_checked",
              "days",
              "answered",
              "refused",
              "recent"
            ],
            "properties": {
              "first_checked": {
                "type": "string",
                "format": "date"
              },
              "last_checked": {
                "type": "string",
                "format": "date"
              },
              "days": {
                "type": "integer",
                "minimum": 1
              },
              "answered": {
                "type": "integer",
                "minimum": 0
              },
              "refused": {
                "type": "integer",
                "minimum": 0,
                "description": "Days on which a check was refused (blocked while the door was not down) and none missed."
              },
              "recent": {
                "type": "string",
                "pattern": "^[axb.]{90}$"
              }
            }
          },
          "summary": {
            "type": "string",
            "description": "With checks, in English: \"Answered every check on 41 of 42 days checked since 3 Oct 2026 (97%).\" The share is floored, the days refused follow it (\"(75%; refused our check on 5)\"), and it says \"from … to …\" when the last check is more than 7 days old. Informative: another network may word it its own way."
          }
        }
      }
    }
  }
}