{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/bigKING67/pi-67/schemas/pi67-publish-check.schema.json",
  "title": "pi-67 npm publish check",
  "type": "object",
  "required": [
    "schema",
    "createdAt",
    "status",
    "package",
    "distro",
    "paths",
    "git",
    "workflow",
    "scope",
    "target",
    "manifest",
    "registry",
    "auth",
    "pack",
    "checks",
    "blockers",
    "warnings",
    "nextSteps"
  ],
  "properties": {
    "schema": {
      "const": "pi67.publish-check.v1"
    },
    "createdAt": {
      "type": "string"
    },
    "status": {
      "enum": ["ready", "ready_with_notes", "blocked"]
    },
    "package": {
      "type": "object",
      "required": ["name", "version", "root"],
      "properties": {
        "name": { "type": "string" },
        "version": { "type": "string" },
        "root": { "type": "string" }
      },
      "additionalProperties": true
    },
    "distro": {
      "type": "object",
      "required": ["version", "rootPackageVersion"],
      "properties": {
        "version": { "type": "string" },
        "rootPackageVersion": { "type": "string" }
      },
      "additionalProperties": true
    },
    "paths": {
      "type": "object",
      "required": ["repoRoot", "agentDir", "workflow"],
      "properties": {
        "repoRoot": { "type": "string" },
        "agentDir": { "type": "string" },
        "workflow": { "type": "string" }
      },
      "additionalProperties": true
    },
    "git": {
      "type": "object"
    },
    "workflow": {
      "type": "object",
      "required": ["ok", "file", "message"],
      "properties": {
        "ok": { "type": "boolean" },
        "file": { "type": "string" },
        "message": { "type": "string" }
      },
      "additionalProperties": true
    },
    "scope": {
      "type": "object",
      "required": ["skipped", "ok", "blocking", "scoped", "scope", "message"],
      "properties": {
        "skipped": { "type": "boolean" },
        "ok": { "type": "boolean" },
        "blocking": { "type": "boolean" },
        "scoped": { "type": "boolean" },
        "scope": { "type": "string" },
        "message": { "type": "string" }
      },
      "additionalProperties": true
    },
    "target": {
      "type": "object",
      "required": [
        "skipped",
        "ok",
        "blocking",
        "packageName",
        "firstPublish",
        "allowFirstPublish",
        "code",
        "message"
      ],
      "properties": {
        "skipped": { "type": "boolean" },
        "ok": { "type": "boolean" },
        "blocking": { "type": "boolean" },
        "packageName": { "type": "string" },
        "firstPublish": { "type": "boolean" },
        "allowFirstPublish": { "type": "boolean" },
        "code": { "type": "string" },
        "message": { "type": "string" }
      },
      "additionalProperties": true
    },
    "manifest": {
      "type": "object",
      "required": ["summary", "release"],
      "properties": {
        "summary": {
          "type": "object"
        },
        "release": {
          "type": "object",
          "required": ["ok", "message", "problems", "warnings"],
          "properties": {
            "ok": { "type": "boolean" },
            "message": { "type": "string" },
            "problems": { "type": "array", "items": { "type": "string" } },
            "warnings": { "type": "array", "items": { "type": "string" } }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "registry": {
      "type": "object"
    },
    "exactVersion": {
      "type": "object",
      "required": [
        "skipped",
        "ok",
        "exists",
        "packageName",
        "requestedVersion",
        "publishedVersion",
        "message"
      ],
      "properties": {
        "skipped": { "type": "boolean" },
        "ok": { "type": "boolean" },
        "exists": { "type": "boolean" },
        "packageName": { "type": "string" },
        "requestedVersion": { "type": "string" },
        "publishedVersion": { "type": "string" },
        "message": { "type": "string" }
      },
      "additionalProperties": true
    },
    "auth": {
      "type": "object"
    },
    "pack": {
      "type": "object"
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "ok", "message"],
        "properties": {
          "name": { "type": "string" },
          "ok": { "type": "boolean" },
          "message": { "type": "string" }
        },
        "additionalProperties": true
      }
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "nextSteps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": true
}
