{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jig-harness.dev/protocol/comment-markers/v5/schemas/tracker-footprint.json",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "const": "tracker-footprint"
        },
        "v": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1
        },
        "key": {
          "type": "string",
          "pattern": "^(?:#[1-9]\\d*|[A-Za-z][A-Za-z0-9]*-[1-9]\\d*)$"
        },
        "writer": {
          "type": "object",
          "properties": {
            "login": {
              "type": "string",
              "minLength": 1
            },
            "host": {
              "type": "string",
              "minLength": 1
            },
            "bootId": {
              "type": "string"
            },
            "pid": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "start": {
              "type": "string"
            }
          },
          "required": ["host"],
          "additionalProperties": true
        },
        "at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
        },
        "generation": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["kind", "v", "key", "writer", "at"],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "source": {
          "enum": ["pickup", "scout", "planner", "filing"]
        },
        "base": {
          "type": "string",
          "pattern": "^[0-9a-f]{7,64}(?![\\s\\S])"
        },
        "paths": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "pattern": "^(?!/)(?!.*[\\\\:*?\\[\\]{}\\x00-\\x1F\\x7F])(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//).+$"
          },
          "maxItems": 1000
        },
        "areas": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*(?![\\s\\S])",
            "maxLength": 100
          },
          "maxItems": 100
        },
        "pickup": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": ["source", "base", "paths", "areas"],
      "additionalProperties": true
    }
  ]
}
