games-development-ai/contracts/play-loop/acceptance-provenance-v4.schema.json
lili 686aaaa421
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
feat(reference-assets): 签认《山海行纪》并闭合可信消费门
冻结地图1二十分钟纵切版的平衡、证据与金标登记。

新增 ReferenceAsset/2 清单、策略、release、受信快照及 CLI/Service/acceptance provenance /4 消费链;保持 survivor live、R1 签名与部署关闭。
2026-07-28 09:11:54 -07:00

122 lines
4.1 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://wanxiang.ai/contracts/play-loop/acceptance-provenance-v4.schema.json",
"title": "AcceptanceProvenanceV4",
"description": "acceptance-provenance/4。逐字段镜像 acceptance-request/3 与 acceptance-provenance/3 的身份字段,不改写 /3;新增且必填的 referenceAssetVerificationReceipts 以 ref/hash 引用可信消费回执,阻断只有声明没有验证证据的 provenance。",
"type": "object",
"required": [
"schemaVersion", "gameId", "briefHash", "genre", "templateRoute", "proofProfileId",
"proofRegistryVersion", "taskBindingHash", "interactionBinding", "sourceArtifactHash",
"parentAcceptanceRequestHash", "repairOrdinal", "acceptanceRequestHash", "artifactHash",
"referenceAssetVerificationReceipts"
],
"properties": {
"schemaVersion": { "const": "acceptance-provenance/4" },
"gameId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
"briefHash": { "$ref": "#/$defs/sha256" },
"genre": { "enum": ["narrative", "trpg", "heritage", "puzzle", "sim-business"] },
"templateRoute": { "type": "string", "pattern": "^_template-[a-z0-9-]+$" },
"proofProfileId": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" },
"proofRegistryVersion": { "type": "string", "minLength": 1 },
"taskBindingHash": { "$ref": "#/$defs/sha256" },
"interactionBinding": {
"anyOf": [
{ "$ref": "interaction-binding.schema.json" },
{ "type": "null" }
]
},
"sourceArtifactHash": {
"anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }]
},
"parentAcceptanceRequestHash": {
"anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }]
},
"repairOrdinal": { "enum": [0, 1] },
"acceptanceRequestHash": { "$ref": "#/$defs/sha256" },
"artifactHash": { "$ref": "#/$defs/sha256" },
"designRef": {
"anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
},
"referenceAssetRecordIds": {
"type": "array",
"items": { "$ref": "#/$defs/recordId" }
},
"consumerRef": {
"anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
},
"consumedReferenceAssets": {
"type": "array",
"items": { "$ref": "#/$defs/consumedReferenceAsset" }
},
"referenceAssetVerificationReceipts": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/verificationReceiptRef" }
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": { "repairOrdinal": { "const": 0 } },
"required": ["repairOrdinal"]
},
"then": {
"properties": {
"sourceArtifactHash": { "type": "null" },
"parentAcceptanceRequestHash": { "type": "null" }
}
}
},
{
"if": {
"properties": { "repairOrdinal": { "const": 1 } },
"required": ["repairOrdinal"]
},
"then": {
"properties": {
"sourceArtifactHash": { "$ref": "#/$defs/sha256" },
"parentAcceptanceRequestHash": { "$ref": "#/$defs/sha256" }
}
}
}
],
"$defs": {
"sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"recordId": {
"type": "string",
"pattern": "^[A-Za-z0-9_][A-Za-z0-9._-]*$"
},
"relativePath": {
"type": "string",
"minLength": 1,
"maxLength": 1024,
"pattern": "^(?!/)(?!.*//)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\).+$"
},
"consumedReferenceAsset": {
"type": "object",
"required": ["recordId", "role", "artifactHash"],
"properties": {
"recordId": { "$ref": "#/$defs/recordId" },
"role": {
"enum": ["harness_fixture", "prompt_eval_gold", "generation_exemplar", "game_content_gold"]
},
"artifactHash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
},
"verificationReceiptRef": {
"type": "object",
"required": ["ref", "hash"],
"properties": {
"ref": { "$ref": "#/$defs/relativePath" },
"hash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
}
}
}