冻结地图1二十分钟纵切版的平衡、证据与金标登记。 新增 ReferenceAsset/2 清单、策略、release、受信快照及 CLI/Service/acceptance provenance /4 消费链;保持 survivor live、R1 签名与部署关闭。
160 lines
5.1 KiB
JSON
160 lines
5.1 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "https://wanxiang.ai/contracts/play-loop/reference-asset-record-v2.schema.json",
|
||
"title": "ReferenceAssetRecordV2",
|
||
"description": "ReferenceAssetRecord/2。冻结并扩展 ReferenceAssetRecord/1,不修改 /1 版本线。candidate/migration_pending 可以保留三项新身份为 null;active 必须具备运行制品、消费清单和清单 hash;retired 若保留历史签认则必须完整保留身份字段。",
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "recordId", "role", "lifecycleStatus",
|
||
"assetRef", "assetVersion", "artifactHash", "evidenceRefs"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "ReferenceAssetRecord/2" },
|
||
"recordId": {
|
||
"type": "string",
|
||
"pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]*$"
|
||
},
|
||
"role": {
|
||
"enum": ["harness_fixture", "prompt_eval_gold", "generation_exemplar", "game_content_gold"]
|
||
},
|
||
"lifecycleStatus": {
|
||
"enum": ["candidate", "migration_pending", "active", "retired"]
|
||
},
|
||
"assetRef": { "$ref": "#/$defs/relativePath" },
|
||
"assetVersion": { "type": "string", "minLength": 1 },
|
||
"artifactHash": { "$ref": "#/$defs/sha256" },
|
||
"consumerRef": {
|
||
"anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
|
||
},
|
||
"designRef": {
|
||
"anyOf": [
|
||
{
|
||
"type": "array",
|
||
"items": { "type": "string", "minLength": 1 },
|
||
"minItems": 1
|
||
},
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"evidenceRefs": {
|
||
"type": "array",
|
||
"items": { "type": "string", "minLength": 1 }
|
||
},
|
||
"signedBy": {
|
||
"anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
|
||
},
|
||
"signedAt": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string",
|
||
"pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:?\\d{2})?)?$"
|
||
},
|
||
{ "type": "null" }
|
||
]
|
||
},
|
||
"artifactRef": {
|
||
"anyOf": [{ "$ref": "#/$defs/relativePath" }, { "type": "null" }]
|
||
},
|
||
"consumptionManifestRef": {
|
||
"anyOf": [{ "$ref": "#/$defs/relativePath" }, { "type": "null" }]
|
||
},
|
||
"consumptionManifestHash": {
|
||
"anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }]
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"allOf": [
|
||
{
|
||
"if": {
|
||
"properties": { "lifecycleStatus": { "const": "active" } },
|
||
"required": ["lifecycleStatus"]
|
||
},
|
||
"then": {
|
||
"required": [
|
||
"consumerRef", "signedBy", "signedAt",
|
||
"artifactRef", "consumptionManifestRef", "consumptionManifestHash"
|
||
],
|
||
"properties": {
|
||
"consumerRef": { "type": "string", "minLength": 1 },
|
||
"signedBy": { "type": "string", "minLength": 1 },
|
||
"signedAt": {
|
||
"type": "string",
|
||
"pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:?\\d{2})?)?$"
|
||
},
|
||
"artifactRef": { "$ref": "#/$defs/relativePath" },
|
||
"consumptionManifestRef": { "$ref": "#/$defs/relativePath" },
|
||
"consumptionManifestHash": { "$ref": "#/$defs/sha256" }
|
||
}
|
||
}
|
||
},
|
||
{
|
||
"if": {
|
||
"properties": {
|
||
"role": { "const": "game_content_gold" },
|
||
"lifecycleStatus": { "const": "active" }
|
||
},
|
||
"required": ["role", "lifecycleStatus"]
|
||
},
|
||
"then": {
|
||
"properties": {
|
||
"designRef": {
|
||
"type": "array",
|
||
"items": { "type": "string", "minLength": 1 },
|
||
"minItems": 1
|
||
}
|
||
},
|
||
"required": ["designRef"]
|
||
}
|
||
},
|
||
{
|
||
"if": {
|
||
"properties": { "lifecycleStatus": { "const": "retired" } },
|
||
"required": ["lifecycleStatus"],
|
||
"anyOf": [
|
||
{
|
||
"required": ["consumerRef"],
|
||
"properties": { "consumerRef": { "type": "string", "minLength": 1 } }
|
||
},
|
||
{
|
||
"required": ["signedBy"],
|
||
"properties": { "signedBy": { "type": "string", "minLength": 1 } }
|
||
},
|
||
{
|
||
"required": ["signedAt"],
|
||
"properties": { "signedAt": { "type": "string", "minLength": 1 } }
|
||
}
|
||
]
|
||
},
|
||
"then": {
|
||
"required": [
|
||
"consumerRef", "signedBy", "signedAt",
|
||
"artifactRef", "consumptionManifestRef", "consumptionManifestHash"
|
||
],
|
||
"properties": {
|
||
"consumerRef": { "type": "string", "minLength": 1 },
|
||
"signedBy": { "type": "string", "minLength": 1 },
|
||
"signedAt": {
|
||
"type": "string",
|
||
"pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?(Z|[+-]\\d{2}:?\\d{2})?)?$"
|
||
},
|
||
"artifactRef": { "$ref": "#/$defs/relativePath" },
|
||
"consumptionManifestRef": { "$ref": "#/$defs/relativePath" },
|
||
"consumptionManifestHash": { "$ref": "#/$defs/sha256" }
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"$defs": {
|
||
"sha256": {
|
||
"type": "string",
|
||
"pattern": "^[0-9a-f]{64}$"
|
||
},
|
||
"relativePath": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"maxLength": 1024,
|
||
"pattern": "^(?!/)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\).+$"
|
||
}
|
||
}
|
||
}
|