Files
registry/schemas/mcp-package-review.v1.schema.json

139 lines
3.8 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "MCP 包来源自动审核回执;与实际条目、包版本、制品摘要和审核日期做额外语义绑定。",
"required": [
"schemaVersion",
"reviewer",
"reviewedAt",
"entryId",
"previousVersion",
"version",
"packageName",
"ecosystem",
"sourceUrl",
"artifactUrl",
"contentSha256",
"licenseEvidenceSha256",
"checks",
"limitations"
],
"properties": {
"$schema": {
"type": "string",
"description": "本地审核记录 Schema 引用。"
},
"schemaVersion": {
"const": 1,
"description": "机器审核记录版本。"
},
"reviewer": {
"const": "automated:mcp-package-source-v1",
"description": "明确的机器审核身份,不冒充人工或上游背书。"
},
"reviewedAt": {
"type": "string",
"format": "date-time",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
"description": "实际完成机械核验的 UTC 时间。"
},
"entryId": {
"type": "string",
"minLength": 1,
"description": "受审核的 Registry MCP 条目 ID。"
},
"previousVersion": {
"type": "string",
"pattern": "^\\d+(?:\\.\\d+){1,3}$",
"description": "已有准入证据的原发行版本。"
},
"version": {
"type": "string",
"pattern": "^\\d+(?:\\.\\d+){1,3}$",
"description": "核验的新固定发行版本。"
},
"packageName": {
"type": "string",
"minLength": 1,
"description": "安装和连接配置共同使用的包身份。"
},
"ecosystem": {
"enum": [
"npm",
"pypi"
],
"description": "已实现制品机械核验的包注册表。"
},
"sourceUrl": {
"type": "string",
"format": "uri",
"description": "与 sidecar provenance 完全相同的包主页身份。"
},
"artifactUrl": {
"type": "string",
"format": "uri",
"description": "本次实际读取并核对摘要的官方固定制品 URL。"
},
"contentSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "实际制品字节 SHA-256,与目录记录绑定。"
},
"licenseEvidenceSha256": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"propertyNames": {
"pattern": "^(?![\\\\/])(?!.*(?:^|/)\\.\\.(?:/|$))[^\\\\]+$"
},
"description": "包内许可证和第三方声明的实际路径与摘要,不复制许可正文。"
},
"checks": {
"type": "object",
"required": [
"publishedIntegrity",
"previousCatalogDigest",
"boundedOrdinaryFiles",
"licenseAndNoticeUnchanged",
"structuredPrerequisitesUnchanged",
"pinnedLaunchSelectors"
],
"properties": {
"publishedIntegrity": {
"const": true
},
"previousCatalogDigest": {
"const": true
},
"boundedOrdinaryFiles": {
"const": true
},
"licenseAndNoticeUnchanged": {
"const": true
},
"structuredPrerequisitesUnchanged": {
"const": true
},
"pinnedLaunchSelectors": {
"const": true
}
},
"additionalProperties": false,
"description": "仅列本版本实际实现并完成的检查。新增检查必须同时实现,不能由 Schema 自动声明通过。"
},
"limitations": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
},
"description": "来源核验、软件运行和供应链认证的边界。"
}
},
"additionalProperties": false
}