{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wanxiang.ai/contracts/play-loop/match3-pair-resolution.schema.json", "title": "Match3PairResolutionV1", "description": "Match3PairResolution/1。把一个 swap_pair 选择解析为 sealed candidate 的规范 pair 与 runner 决定的第二端。", "type": "object", "required": [ "schemaVersion", "interactionProfileId", "interactionRegistryVersion", "interactionBindingHash", "selectionRef", "selectionHash", "swapSetRef", "swapSetHash", "candidateSetHash", "candidateId", "latticeId", "pair", "firstEndpoint", "secondEndpoint", "status", "error", "resolutionHash" ], "properties": { "schemaVersion": { "const": "Match3PairResolution/1" }, "interactionProfileId": { "const": "match3.orthogonal-swap-v1" }, "interactionRegistryVersion": { "const": "2026-07-15.v2" }, "interactionBindingHash": { "$ref": "#/$defs/sha256" }, "selectionRef": { "type": "string", "minLength": 1 }, "selectionHash": { "$ref": "#/$defs/sha256" }, "swapSetRef": { "type": "string", "minLength": 1 }, "swapSetHash": { "$ref": "#/$defs/sha256" }, "candidateSetHash": { "$ref": "#/$defs/sha256" }, "candidateId": { "type": "string", "pattern": "^ms[0-9]{2,3}$" }, "latticeId": { "type": "string", "pattern": "^l[0-9]{2}$" }, "pair": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "$ref": "#/$defs/cell" } }, "firstEndpoint": { "$ref": "#/$defs/endpoint" }, "secondEndpoint": { "$ref": "#/$defs/endpoint" }, "status": { "enum": ["resolved", "failed"] }, "error": { "anyOf": [ { "type": "null" }, { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } }, "additionalProperties": false } ] }, "resolutionHash": { "$ref": "#/$defs/sha256" } }, "additionalProperties": false, "allOf": [ { "if": { "properties": { "status": { "const": "resolved" } }, "required": ["status"] }, "then": { "properties": { "error": { "type": "null" } } }, "else": { "properties": { "error": { "type": "object" } } } } ], "$defs": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "cell": { "type": "object", "required": ["row", "column"], "properties": { "row": { "type": "integer", "minimum": 1, "maximum": 12 }, "column": { "type": "integer", "minimum": 1, "maximum": 12 } }, "additionalProperties": false }, "endpoint": { "type": "object", "required": ["id", "cell", "subAnchor"], "properties": { "id": { "type": "string", "pattern": "^l[0-9]{2}$" }, "cell": { "$ref": "#/$defs/cell" }, "subAnchor": { "const": "center" } }, "additionalProperties": false } } }