aps-agent/packaging/upgrade-manifest.schema.json

43 lines
2.3 KiB
JSON
Raw Normal View History

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://aps.local/schemas/upgrade-manifest.schema.json",
"title": "APS Desktop upgrade manifest v1",
"description": "离线升级介质清单:描述一个安装包产物(版本、文件名、SHA-256、大小、发布时间)。随签名产物一同发布;签名/上链由外部证书流程完成(本轮不实现)。",
"type": "object",
"required": ["schemaVersion", "product", "version", "package"],
"properties": {
"schemaVersion": { "const": 1, "description": "清单格式版本,当前固定为 1" },
"product": { "type": "string", "description": "产物标识,如 aps-agent-desktop" },
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+", "description": "语义化版本 主.次.补" },
"platform": { "type": "string", "enum": ["win32", "darwin", "linux"], "description": "目标平台(可选)" },
"arch": { "type": "string", "enum": ["x64", "arm64"], "description": "目标架构(可选)" },
"package": {
"type": "object",
"required": ["fileName", "sha256", "size"],
"properties": {
"fileName": { "type": "string", "description": "安装包文件名" },
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "安装包 SHA-256(小写十六进制)" },
"size": { "type": "integer", "minimum": 0, "description": "安装包字节数" }
}
},
"releasedAt": { "type": "string", "format": "date-time", "description": "发布时间(ISO 8601,UTC)" },
"minSupportedVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+", "description": "可升级的当前最低版本(可选)" },
"signature": {
"type": "object",
"description": "外部签名信息(占位;由外部证书流程填充,本轮不校验)",
"properties": {
"algorithm": { "type": "string" },
"value": { "type": "string" },
"certFingerprint": { "type": "string" }
}
},
"provenance": {
"type": "object",
"description": "可信 provenance 占位(外部上链流程填充,本轮不校验)",
"properties": {
"sbom": { "type": "string" },
"attestationUri": { "type": "string" }
}
}
}
}