固化 Match-3 生产者、视觉、音频与双 Judge 证据闭包。 将《山海行纪》r1.1 绑定新的不可变 release,并以生产预检现场核验 bundle、Registry/2 和 25 项 Writer 快照。 同步地图1平衡锁值、跨游戏回归修复、验收契约与 SoT 证据。
241 lines
10 KiB
JSON
241 lines
10 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "https://wanxiang.ai/contracts/play-loop/match3-audio-audit.schema.json",
|
||
"title": "Match3AudioAuditV1",
|
||
"description": "标准 Match-3 limiter 后实时音频审计。auditId 只绑定主题、配置、BGM 原始字节、插件和 auditTap;staged artifact 由 InteractionAudit/2 绑定。",
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "auditId", "themeHash", "configHash", "audioArtifactBinding",
|
||
"runtimeBinding", "capacity", "droppedWindowCount", "firstWindowSeq",
|
||
"lastWindowSeq", "samples", "pendingOnsetCueReceiptRefs"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "Match3AudioAudit/1" },
|
||
"auditId": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] },
|
||
"themeHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] },
|
||
"configHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] },
|
||
"audioArtifactBinding": {
|
||
"anyOf": [{ "$ref": "#/$defs/audioArtifactBinding" }, { "type": "null" }]
|
||
},
|
||
"runtimeBinding": {
|
||
"anyOf": [{ "$ref": "#/$defs/runtimeBinding" }, { "type": "null" }]
|
||
},
|
||
"capacity": { "type": "integer", "minimum": 1, "maximum": 4096 },
|
||
"droppedWindowCount": { "type": "integer", "minimum": 0 },
|
||
"firstWindowSeq": {
|
||
"anyOf": [{ "type": "integer", "minimum": 1 }, { "type": "null" }]
|
||
},
|
||
"lastWindowSeq": {
|
||
"anyOf": [{ "type": "integer", "minimum": 1 }, { "type": "null" }]
|
||
},
|
||
"samples": {
|
||
"type": "array", "maxItems": 4096,
|
||
"items": { "$ref": "#/$defs/window" }
|
||
},
|
||
"pendingOnsetCueReceiptRefs": {
|
||
"type": "array",
|
||
"items": { "$ref": "#/$defs/pendingOnsetCueReceiptRef" }
|
||
}
|
||
},
|
||
"additionalProperties": false,
|
||
"$defs": {
|
||
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
||
"audioArtifactBinding": {
|
||
"type": "object",
|
||
"required": ["kind", "sha256"],
|
||
"properties": {
|
||
"kind": { "const": "bgm-raw-sha256" },
|
||
"sha256": { "$ref": "#/$defs/sha256" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"runtimeBinding": {
|
||
"type": "object",
|
||
"required": ["pluginName", "pluginVersion", "graphGeneration", "auditTapId", "nodeIds"],
|
||
"properties": {
|
||
"pluginName": { "const": "match3-audio-director" },
|
||
"pluginVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
||
"graphGeneration": { "type": "integer", "minimum": 1 },
|
||
"auditTapId": { "$ref": "#/$defs/sha256" },
|
||
"nodeIds": {
|
||
"type": "array", "minItems": 1, "uniqueItems": true,
|
||
"items": { "$ref": "#/$defs/sha256" }
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"nodeIdArray": {
|
||
"type": "array", "minItems": 1, "uniqueItems": true,
|
||
"items": { "$ref": "#/$defs/sha256" }
|
||
},
|
||
"sourceIdArray": {
|
||
"type": "array", "uniqueItems": true,
|
||
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" }
|
||
},
|
||
"transitionRef": {
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "transitionSeq", "transactionId", "transactionHash", "phase", "cascadeIndex",
|
||
"transitionVirtualTimeMs", "terminalKind"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "Match3VisualTransition/1" },
|
||
"transitionSeq": { "type": "integer", "minimum": 1 },
|
||
"transactionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
|
||
"transactionHash": { "$ref": "#/$defs/sha256" },
|
||
"phase": {
|
||
"enum": [
|
||
"swap", "match_hold", "clear", "fall_refill", "cascade_gap",
|
||
"swap_forward", "rollback", "settle"
|
||
]
|
||
},
|
||
"cascadeIndex": { "type": "integer", "minimum": -1, "maximum": 63 },
|
||
"transitionVirtualTimeMs": { "type": "number", "minimum": 0 },
|
||
"terminalKind": {
|
||
"anyOf": [{ "enum": ["win", "lose"] }, { "type": "null" }]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"cueReceiptRef": {
|
||
"type": "object",
|
||
"required": [
|
||
"schemaVersion", "cueSeq", "transitionSeq", "transactionId", "phase",
|
||
"cascadeIndex", "cueKind", "epochId", "transitionVirtualTimeMs",
|
||
"scheduledAudioTime", "startCallAudioTime", "lateByMs", "layerCount",
|
||
"pitchSemitones", "cueSemanticHash"
|
||
],
|
||
"properties": {
|
||
"schemaVersion": { "const": "Match3AudioCueReceipt/1" },
|
||
"cueSeq": { "type": "integer", "minimum": 1 },
|
||
"transitionSeq": { "type": "integer", "minimum": 1 },
|
||
"transactionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
|
||
"phase": {
|
||
"enum": ["swap", "swap_forward", "rollback", "clear", "fall_refill", "settle"]
|
||
},
|
||
"cascadeIndex": { "type": "integer", "minimum": -1, "maximum": 63 },
|
||
"cueKind": { "enum": ["swap", "rollback", "clear", "fall", "terminal-win", "terminal-lose"] },
|
||
"epochId": { "type": "string", "minLength": 1, "maxLength": 128 },
|
||
"transitionVirtualTimeMs": { "type": "number", "minimum": 0 },
|
||
"scheduledAudioTime": { "type": "number", "minimum": 0 },
|
||
"startCallAudioTime": { "type": "number", "minimum": 0 },
|
||
"lateByMs": { "type": "number", "minimum": 0 },
|
||
"layerCount": { "type": "integer", "minimum": 1, "maximum": 16 },
|
||
"pitchSemitones": { "type": "number", "minimum": -48, "maximum": 48 },
|
||
"cueSemanticHash": { "$ref": "#/$defs/sha256" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"cueReceiptIdentity": {
|
||
"type": "object",
|
||
"required": ["cueSeq", "transitionSeq", "cueSemanticHash"],
|
||
"properties": {
|
||
"cueSeq": { "type": "integer", "minimum": 1 },
|
||
"transitionSeq": { "type": "integer", "minimum": 1 },
|
||
"cueSemanticHash": { "$ref": "#/$defs/sha256" }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"pendingOnsetCueReceiptRef": {
|
||
"type": "object",
|
||
"required": ["cueSeq", "transitionSeq", "cueSemanticHash", "deadlineAudioTime"],
|
||
"properties": {
|
||
"cueSeq": { "type": "integer", "minimum": 1 },
|
||
"transitionSeq": { "type": "integer", "minimum": 1 },
|
||
"cueSemanticHash": { "$ref": "#/$defs/sha256" },
|
||
"deadlineAudioTime": { "type": "number", "minimum": 0 }
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"onsetCheck": {
|
||
"type": "object",
|
||
"required": [
|
||
"cueReceiptRef", "status", "deadlineAudioTime", "firstAboveWindowSeq",
|
||
"confirmationWindowSeq", "analyserOnsetAudioTime"
|
||
],
|
||
"properties": {
|
||
"cueReceiptRef": { "$ref": "#/$defs/cueReceiptIdentity" },
|
||
"status": { "enum": ["detected", "missed"] },
|
||
"deadlineAudioTime": { "type": "number", "minimum": 0 },
|
||
"firstAboveWindowSeq": {
|
||
"anyOf": [{ "type": "integer", "minimum": 1 }, { "type": "null" }]
|
||
},
|
||
"confirmationWindowSeq": {
|
||
"anyOf": [{ "type": "integer", "minimum": 1 }, { "type": "null" }]
|
||
},
|
||
"analyserOnsetAudioTime": {
|
||
"anyOf": [{ "type": "number", "minimum": 0 }, { "type": "null" }]
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
},
|
||
"window": {
|
||
"type": "object",
|
||
"required": [
|
||
"windowSeq", "frame", "virtualNowMs", "audioTime", "windowStartAudioTime",
|
||
"windowEndAudioTime", "fftSize", "sampleRate", "rms", "peak", "muted",
|
||
"noiseFloorDbfs", "onsetThresholdDbfs", "onsetDeltaDb", "onsetChecks",
|
||
"sourceIds", "nodeIds", "auditTapId", "lastTransitionSeq", "lastCueSeq",
|
||
"transitionRefs", "cueReceiptRefs"
|
||
],
|
||
"properties": {
|
||
"windowSeq": { "type": "integer", "minimum": 1 },
|
||
"frame": { "type": "integer", "minimum": 0 },
|
||
"virtualNowMs": { "type": "number", "minimum": 0 },
|
||
"audioTime": { "type": "number", "minimum": 0 },
|
||
"windowStartAudioTime": { "type": "number", "minimum": 0 },
|
||
"windowEndAudioTime": { "type": "number", "exclusiveMinimum": 0 },
|
||
"fftSize": { "const": 2048 },
|
||
"sampleRate": { "type": "number", "exclusiveMinimum": 0 },
|
||
"rms": { "type": "number", "minimum": 0, "maximum": 1 },
|
||
"peak": { "type": "number", "minimum": 0, "maximum": 1 },
|
||
"muted": { "type": "boolean" },
|
||
"noiseFloorDbfs": { "type": "number", "minimum": -200, "maximum": 0 },
|
||
"onsetThresholdDbfs": { "type": "number", "minimum": -200, "maximum": 0 },
|
||
"onsetDeltaDb": { "type": "number", "minimum": -200, "maximum": 200 },
|
||
"onsetChecks": { "type": "array", "items": { "$ref": "#/$defs/onsetCheck" } },
|
||
"sourceIds": { "$ref": "#/$defs/sourceIdArray" },
|
||
"nodeIds": { "$ref": "#/$defs/nodeIdArray" },
|
||
"auditTapId": { "$ref": "#/$defs/sha256" },
|
||
"lastTransitionSeq": { "type": "integer", "minimum": 0 },
|
||
"lastCueSeq": { "type": "integer", "minimum": 0 },
|
||
"transitionRefs": {
|
||
"type": "array", "items": { "$ref": "#/$defs/transitionRef" }
|
||
},
|
||
"cueReceiptRefs": {
|
||
"type": "array", "items": { "$ref": "#/$defs/cueReceiptRef" }
|
||
}
|
||
},
|
||
"additionalProperties": false
|
||
}
|
||
},
|
||
"allOf": [
|
||
{
|
||
"if": { "properties": { "samples": { "maxItems": 0 } } },
|
||
"then": {
|
||
"properties": {
|
||
"auditId": { "type": "null" },
|
||
"themeHash": { "type": "null" },
|
||
"configHash": { "type": "null" },
|
||
"audioArtifactBinding": { "type": "null" },
|
||
"runtimeBinding": { "type": "null" },
|
||
"firstWindowSeq": { "type": "null" },
|
||
"lastWindowSeq": { "type": "null" },
|
||
"droppedWindowCount": { "const": 0 }
|
||
}
|
||
},
|
||
"else": {
|
||
"properties": {
|
||
"auditId": { "$ref": "#/$defs/sha256" },
|
||
"themeHash": { "$ref": "#/$defs/sha256" },
|
||
"configHash": { "$ref": "#/$defs/sha256" },
|
||
"audioArtifactBinding": { "$ref": "#/$defs/audioArtifactBinding" },
|
||
"runtimeBinding": { "$ref": "#/$defs/runtimeBinding" },
|
||
"firstWindowSeq": { "type": "integer", "minimum": 1 },
|
||
"lastWindowSeq": { "type": "integer", "minimum": 1 }
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|