{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.yingxueyuan.cn/schemas/yuanqi-migration-handoff-v1.schema.json",
  "title": "映雪网腾讯元器停服迁移交接清单",
  "description": "用户在本地勾选的静态迁移步骤和腾讯官方来源。勾选不构成对导出成功、账号状态或迁移完成的验证。",
  "type": "object",
  "additionalProperties": false,
  "required": ["$schema", "recordType", "schemaVersion", "createdAt", "title", "milestones", "migrationProgress", "sources", "agentInstructions", "handling"],
  "properties": {
    "$schema": { "const": "https://www.yingxueyuan.cn/schemas/yuanqi-migration-handoff-v1.schema.json" },
    "recordType": { "const": "yingxueyuan.yuanqi-migration-handoff" },
    "schemaVersion": { "const": "1.0.0" },
    "createdAt": { "type": "string", "format": "date-time" },
    "title": { "const": "腾讯元器停服迁移交接清单" },
    "milestones": {
      "type": "object",
      "additionalProperties": false,
      "required": ["stopCreatingAgentsAndDistributingApiKeys", "publicServiceShutdown", "postShutdownExportRequestDeadline", "postShutdownExportConsoleAvailability"],
      "properties": {
        "stopCreatingAgentsAndDistributingApiKeys": { "const": "2026-10-29" },
        "publicServiceShutdown": { "const": "2026-11-09" },
        "postShutdownExportRequestDeadline": { "const": "2027-01-09" },
        "postShutdownExportConsoleAvailability": { "type": "string", "minLength": 1 }
      }
    },
    "migrationProgress": {
      "type": "object",
      "additionalProperties": false,
      "required": ["status", "checkedCount", "totalCount", "completionVerified", "items"],
      "properties": {
        "status": { "enum": ["not_started", "in_progress", "user_marked_all_items"] },
        "checkedCount": { "type": "integer", "minimum": 0 },
        "totalCount": { "type": "integer", "minimum": 0 },
        "completionVerified": { "const": false },
        "items": {
          "type": "array",
          "maxItems": 30,
          "items": { "$ref": "#/$defs/item" }
        }
      }
    },
    "sources": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "items": { "$ref": "#/$defs/source" }
    },
    "agentInstructions": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": { "type": "string", "minLength": 1 }
    },
    "handling": {
      "type": "object",
      "additionalProperties": false,
      "required": ["sourceOfChecklistStatus", "checklistInputContainsFreeText", "uploadedByThisPage", "persistedByThisPage", "warning"],
      "properties": {
        "sourceOfChecklistStatus": { "const": "用户在当前页面手动勾选" },
        "checklistInputContainsFreeText": { "const": false },
        "uploadedByThisPage": { "const": false },
        "persistedByThisPage": { "const": false },
        "warning": { "type": "string", "minLength": 1 }
      }
    }
  },
  "$defs": {
    "item": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "title", "detail", "userMarked", "status"],
      "allOf": [
        {
          "if": { "properties": { "userMarked": { "const": true } }, "required": ["userMarked"] },
          "then": { "properties": { "status": { "const": "user_marked_done" } } }
        },
        {
          "if": { "properties": { "userMarked": { "const": false } }, "required": ["userMarked"] },
          "then": { "properties": { "status": { "const": "not_marked_done" } } }
        }
      ],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9-]+$", "maxLength": 80 },
        "title": { "type": "string", "minLength": 1, "maxLength": 200 },
        "detail": { "type": "string", "minLength": 1, "maxLength": 1000 },
        "userMarked": { "type": "boolean" },
        "status": { "enum": ["user_marked_done", "not_marked_done"] }
      }
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": ["label", "url", "updatedAt"],
      "properties": {
        "label": { "type": "string", "minLength": 1 },
        "url": { "type": "string", "format": "uri", "pattern": "^https://yuanqi\\.tencent\\.com/" },
        "updatedAt": { "type": "string", "format": "date" }
      }
    }
  }
}
