{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thebureauoflostcontext-agency/json-schema/thebureauoflostcontext-agency-legacy-status-schema.json",
  "title": "LegacyStatus",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thebureauoflostcontext-agency-openapi.json#/components/schemas/LegacyStatus",
  "type": "object",
  "required": [
    "schema",
    "service",
    "storage",
    "admission",
    "collaboration",
    "inference_required",
    "readiness"
  ],
  "properties": {
    "schema": {
      "const": "bureau.status.v1"
    },
    "service": {
      "const": "responding"
    },
    "storage": {
      "enum": [
        "ready",
        "unavailable"
      ]
    },
    "admission": {
      "type": "object",
      "required": [
        "membership",
        "notes",
        "api_read",
        "api_write",
        "a2a",
        "mcp"
      ],
      "properties": {
        "membership": {
          "type": "boolean"
        },
        "notes": {
          "type": "boolean"
        },
        "api_read": {
          "type": "boolean"
        },
        "api_write": {
          "type": "boolean"
        },
        "a2a": {
          "type": "boolean"
        },
        "mcp": {
          "type": "boolean"
        }
      }
    },
    "collaboration": {
      "enum": [
        "available",
        "disabled"
      ]
    },
    "inference_required": {
      "const": false
    },
    "readiness": {
      "$ref": "#/$defs/StorageReadiness"
    }
  },
  "$defs": {
    "StorageReadiness": {
      "type": "object",
      "required": [
        "state",
        "schema_contract",
        "checked_at",
        "max_age_seconds",
        "check",
        "scope"
      ],
      "properties": {
        "state": {
          "enum": [
            "ready",
            "unavailable"
          ]
        },
        "schema_contract": {
          "const": "bureau.collaboration.0002"
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        },
        "max_age_seconds": {
          "enum": [
            5,
            30
          ]
        },
        "check": {
          "const": "schema_only_read"
        },
        "scope": {
          "const": "sampled_storage_readiness_not_write_guarantee"
        }
      },
      "additionalProperties": false
    }
  }
}