mirror of
https://git.openapi.site/https://github.com/desirecore/registry.git
synced 2026-12-06 03:39:05 +08:00
merge: 同步 main 并改用已合入的作者契约
main 已在 #16 合入受主仓固定的 4.3 作者 Schema(95afcff…)和校验逻辑,因此保留其字节,不再引入本分支的候选 Schema(29ece0b…)。 - 删除 application-release-contract.mjs:它要求所有条目声明 definitionPath,会拒绝已上架的 definitionSource: manifest 条目;其余检查 main 已覆盖,仅把 definitionPath 规范路径检查移入 application-contract.mjs。 - 保留 webBundles 统计,并在 authored-release 测试样本中声明,与客户端 checkout 校验一致。 - 测试不再写死条目数,并增加 CLI 校验入口与作者 Schema 摘要断言。 - README 合并到现有作者契约章节,移除已过时的候选说明。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
80e0ff0355
38 files changed
+2240
-82
No files matched your search
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"$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
|
||||
}
|
||||
@@ -3477,7 +3477,6 @@
|
||||
"schemaVersion",
|
||||
"releaseDigest",
|
||||
"manifestPath",
|
||||
"definitionPath",
|
||||
"requiredCapabilities"
|
||||
],
|
||||
"properties": {
|
||||
@@ -3502,6 +3501,10 @@
|
||||
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*[\\\\\\x00-\\x1f])[^?#]+$",
|
||||
"description": "同一 release 文件清单中的作者定义路径;相对 POSIX 路径,禁止宿主路径、穿越和 URL。"
|
||||
},
|
||||
"definitionSource": {
|
||||
"const": "manifest",
|
||||
"description": "作者定义直接来自已核验 app-release.json 的 definition;包中不另外声明 definition 文件。"
|
||||
},
|
||||
"requiredCapabilities": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
@@ -3532,6 +3535,30 @@
|
||||
"description": "仅容器release从同一delivery映射的固定镜像依赖;不包含登录凭据,不假定本机Docker可用。"
|
||||
}
|
||||
},
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [
|
||||
"definitionPath"
|
||||
],
|
||||
"not": {
|
||||
"required": [
|
||||
"definitionSource"
|
||||
]
|
||||
},
|
||||
"description": "兼容已有包内独立作者定义文件。"
|
||||
},
|
||||
{
|
||||
"required": [
|
||||
"definitionSource"
|
||||
],
|
||||
"not": {
|
||||
"required": [
|
||||
"definitionPath"
|
||||
]
|
||||
},
|
||||
"description": "使用 release 清单中的内联作者定义,不能同时声称存在独立文件。"
|
||||
}
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"webBundle": {
|
||||
|
||||
Reference in new issue
Block a user