{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://wanxiang.ai/contracts/play-loop/target-resolution.schema.json", "title": "TargetResolutionV1", "description": "TargetResolution/1 条件联合。tap/drag 必须 resolved 或 failed;key/wait 必须 not_applicable;parser 失败由调用方记录 null。", "oneOf": [ { "$ref": "#/$defs/resolved" }, { "$ref": "#/$defs/notApplicable" }, { "$ref": "#/$defs/failed" } ], "$defs": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "point": { "type": "object", "required": ["x", "y"], "properties": { "x": { "type": "number", "minimum": 0, "maximum": 389 }, "y": { "type": "number", "minimum": 0, "maximum": 843 } }, "additionalProperties": false }, "resolvedPoint": { "type": "object", "required": ["role", "target", "point"], "properties": { "role": { "enum": ["target", "from", "to"] }, "target": { "$ref": "actor-selection.schema.json#/$defs/targetRef" }, "point": { "$ref": "#/$defs/point" } }, "additionalProperties": false }, "resolved": { "type": "object", "required": [ "status", "targetSetRef", "targetSetHash", "sourceFrameRef", "sourceFrameHash", "guideManifestRef", "guideManifestHash", "resolverVersion", "selection", "resolvedPoints", "error" ], "properties": { "status": { "const": "resolved" }, "targetSetRef": { "type": "string", "minLength": 1 }, "targetSetHash": { "$ref": "#/$defs/sha256" }, "sourceFrameRef": { "type": "string", "minLength": 1 }, "sourceFrameHash": { "$ref": "#/$defs/sha256" }, "guideManifestRef": { "type": "string", "minLength": 1 }, "guideManifestHash": { "$ref": "#/$defs/sha256" }, "resolverVersion": { "type": "string", "minLength": 1 }, "selection": { "$ref": "actor-selection.schema.json" }, "resolvedPoints": { "type": "array", "minItems": 1, "maxItems": 2, "items": { "$ref": "#/$defs/resolvedPoint" } }, "error": { "type": "null" } }, "additionalProperties": false }, "notApplicable": { "type": "object", "required": ["status"], "properties": { "status": { "const": "not_applicable" } }, "additionalProperties": false }, "failed": { "type": "object", "required": [ "status", "targetSetRef", "targetSetHash", "sourceFrameRef", "sourceFrameHash", "guideManifestRef", "guideManifestHash", "resolverVersion", "selection", "resolvedPoints", "error" ], "properties": { "status": { "const": "failed" }, "targetSetRef": { "type": ["string", "null"], "minLength": 1 }, "targetSetHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] }, "sourceFrameRef": { "type": ["string", "null"], "minLength": 1 }, "sourceFrameHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] }, "guideManifestRef": { "type": ["string", "null"], "minLength": 1 }, "guideManifestHash": { "anyOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] }, "resolverVersion": { "type": "string", "minLength": 1 }, "selection": { "$ref": "actor-selection.schema.json" }, "resolvedPoints": { "type": "array", "maxItems": 0 }, "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string", "minLength": 1 }, "message": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "additionalProperties": false } } }