{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.connectsoft.ai/reference/schemas/release-manifest.schema.json",
  "title": "ReleaseManifest (release-manifest-v1)",
  "description": "Immutable manifest of one published asset release (BC-04): the complete dependency closure with source commits and content hashes. The same inputs produce the same release hash; one changed dependency changes the hash.",
  "type": "object",
  "required": ["releaseId", "assetKind", "assetId", "version", "state", "closure", "hash", "publishedAt", "publishedBy"],
  "additionalProperties": false,
  "properties": {
    "releaseId": { "type": "string" },
    "assetKind": { "enum": ["agent", "skill", "tool", "workflow", "policy", "model-profile", "edition", "template-bundle"] },
    "assetId": { "type": "string" },
    "version": { "type": "string" },
    "state": { "enum": ["Draft", "InReview", "Published", "Deprecated"] },
    "source": { "type": "object", "required": ["repository", "commit", "path"], "properties": { "repository": { "type": "string" }, "commit": { "type": "string" }, "path": { "type": "string" } } },
    "closure": {
      "type": "array",
      "description": "Every dependency, resolved to an exact version and hash.",
      "items": { "type": "object", "required": ["kind", "id", "version", "hash"], "properties": { "kind": { "enum": ["agent", "skill", "tool", "workflow", "policy", "model-profile", "descriptor", "evaluation-suite", "runtime-adapter"] }, "id": { "type": "string" }, "version": { "type": "string" }, "hash": { "type": "string" }, "state": { "type": "string" } } }
    },
    "compatibility": { "type": "object", "properties": { "runtimeAdapter": { "type": "string" }, "templates": { "type": "array", "items": { "type": "string" } }, "minPlatformVersion": { "type": "string" } } },
    "evaluation": { "type": "object", "properties": { "suiteId": { "type": "string" }, "recordRef": { "type": "string", "description": "Artifact reference of the evaluation record (ADR-0021)." }, "verdict": { "enum": ["passed", "failed", "waived"] } } },
    "signature": { "type": "object", "properties": { "algorithm": { "type": "string" }, "keyId": { "type": "string" }, "value": { "type": "string" } } },
    "approval": { "type": "object", "properties": { "approvalId": { "type": "string", "format": "uuid" }, "decidedBy": { "type": "string" } } },
    "hash": { "type": "string" },
    "publishedAt": { "type": "string", "format": "date-time" },
    "publishedBy": { "type": "string" },
    "revocation": { "type": "object", "properties": { "revokedAt": { "type": "string", "format": "date-time" }, "reason": { "type": "string" }, "inFlightPolicy": { "enum": ["finish", "cancel", "pause"] } } }
  }
}
