games-development-ai/contracts/play-loop/interaction-profile-registry-v2.schema.json
lili cbfd4d871b
Some checks failed
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
feat(acceptance): 闭合 playtest v3 与 A+ 可信消费链
固化 Match-3 生产者、视觉、音频与双 Judge 证据闭包。

将《山海行纪》r1.1 绑定新的不可变 release,并以生产预检现场核验 bundle、Registry/2 和 25 项 Writer 快照。

同步地图1平衡锁值、跨游戏回归修复、验收契约与 SoT 证据。
2026-07-28 20:16:13 -07:00

257 lines
10 KiB
JSON
Raw Permalink 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/interaction-profile-registry-v2.schema.json",
"title": "InteractionProfileRegistryV2",
"description": "View/4 enforce 专用 registryv1 继续冻结服务 solver shadow 与 A-C。",
"type": "object",
"required": ["schemaVersion", "registryVersion", "profiles", "registryHash"],
"properties": {
"schemaVersion": { "const": "InteractionProfileRegistry/2" },
"registryVersion": { "const": "2026-07-15.v2" },
"profiles": {
"type": "object",
"required": ["match3.orthogonal-swap-v1"],
"properties": { "match3.orthogonal-swap-v1": { "$ref": "#/$defs/profile" } },
"additionalProperties": false
},
"registryHash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false,
"$defs": {
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
"component": {
"type": "object", "required": ["id", "version", "config", "configHash"],
"properties": {
"id": { "type": "string", "minLength": 1 },
"version": { "const": "1.0.0" },
"config": { "type": "object" },
"configHash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
},
"profile": {
"type": "object",
"required": [
"id", "genre", "proofProfileId", "templateRoute", "solver", "actorProtocol",
"producerCapability", "overlayNormalizer", "equivalenceAlgorithm", "geometryPolicy", "recoveryPolicy"
],
"properties": {
"id": { "const": "match3.orthogonal-swap-v1" },
"genre": { "const": "puzzle" },
"proofProfileId": { "const": "puzzle.match-board" },
"templateRoute": { "const": "_template-puzzle" },
"solver": {
"type": "object", "required": ["id", "version", "config", "configHash"],
"properties": {
"id": { "const": "match3-orthogonal-swap" },
"version": { "const": "1.0.0" },
"config": {
"type": "object",
"required": ["adjacency", "requireNewRun", "minRunLength", "pairOrder"],
"properties": {
"adjacency": { "const": "orthogonal" },
"requireNewRun": { "const": true },
"minRunLength": { "const": 3 },
"pairOrder": { "const": "row-major" }
},
"additionalProperties": false
},
"configHash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
},
"producerCapability": {
"type": "object", "required": ["id", "version", "config", "configHash"],
"properties": {
"id": { "const": "match3-producer-profile" },
"version": { "const": "1.0.0" },
"config": {
"type": "object",
"required": ["viewport", "grid", "cellShell", "selectionOverlay", "themeSafeBounds"],
"properties": {
"viewport": {
"type": "object", "required": ["width", "height"],
"properties": {
"width": { "const": 390 },
"height": { "const": 844 }
},
"additionalProperties": false
},
"grid": {
"type": "object", "required": ["rows", "columns", "pitchPx", "originX", "originY"],
"properties": {
"rows": { "const": 8 },
"columns": { "const": 8 },
"pitchPx": { "const": 40 },
"originX": { "const": 35 },
"originY": { "const": 120 }
},
"additionalProperties": false
},
"cellShell": {
"type": "object", "required": ["shape", "radiusPx", "fillStyle"],
"properties": {
"shape": { "const": "circle" },
"radiusPx": { "const": 20 },
"fillStyle": { "const": "#1a1a2e" }
},
"additionalProperties": false
},
"selectionOverlay": {
"type": "object",
"required": ["shape", "maskSizePx", "strokeStyle", "expectedChangedPixelCount", "supportMaskHash"],
"properties": {
"shape": { "const": "pixel-mask-ring" },
"maskSizePx": { "const": 40 },
"strokeStyle": { "const": "#ffffff" },
"expectedChangedPixelCount": { "const": 472 },
"supportMaskHash": { "const": "ea15306223beee4a5d9a1a7b857011d076714c0339451f793e49655a4ec7c18f" }
},
"additionalProperties": false
},
"themeSafeBounds": {
"type": "object", "required": ["insetPx"],
"properties": {
"insetPx": { "const": 12 }
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"configHash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
},
"actorProtocol": {
"type": "object", "required": ["viewVersion", "selectionVersion", "prompt", "parser", "resolver"],
"properties": {
"viewVersion": { "const": "ActorView/4" },
"selectionVersion": { "const": "ActorSelection/2" },
"prompt": {
"type": "object", "required": ["id", "version", "artifactRef", "runtimeEligible", "hash"],
"properties": {
"id": { "const": "playtest.actor.contract-match3-v4" },
"version": { "const": "3.0.1" },
"artifactRef": { "const": "artifacts/playtest-actor-v4.contract.md" },
"runtimeEligible": { "const": false },
"hash": { "$ref": "#/$defs/sha256" }
},
"additionalProperties": false
},
"parser": {
"allOf": [
{ "$ref": "#/$defs/component" },
{
"properties": {
"id": { "const": "actor-selection-v2" },
"config": {
"type": "object",
"required": ["allowedTypes", "unknownFields", "waitMinMs", "waitMaxMs"],
"properties": {
"allowedTypes": { "const": ["tap", "drag", "key", "wait", "swap_pair"] },
"unknownFields": { "const": "reject" },
"waitMinMs": { "const": 100 },
"waitMaxMs": { "const": 600 }
},
"additionalProperties": false
}
}
}
]
},
"resolver": {
"allOf": [
{ "$ref": "#/$defs/component" },
{
"properties": {
"id": { "const": "match3-pair-resolver" },
"config": {
"type": "object",
"required": ["dispatch", "actionCount", "secondEndpoint", "repeatActorRequest"],
"properties": {
"dispatch": { "const": "native-tap-pair" },
"actionCount": { "const": 2 },
"secondEndpoint": { "const": "other-canonical-pair-endpoint" },
"repeatActorRequest": { "const": false }
},
"additionalProperties": false
}
}
}
]
}
},
"additionalProperties": false
},
"overlayNormalizer": {
"allOf": [
{ "$ref": "#/$defs/component" },
{
"properties": {
"id": { "const": "match3-selection-overlay-normalizer" },
"config": {
"type": "object",
"required": ["removeSelectionOverlay", "recomputeTargetSetAfterFirstTap"],
"properties": {
"removeSelectionOverlay": { "const": true },
"recomputeTargetSetAfterFirstTap": { "const": true }
},
"additionalProperties": false
}
}
}
]
},
"equivalenceAlgorithm": {
"allOf": [
{ "$ref": "#/$defs/component" },
{
"properties": {
"id": { "const": "anonymous-cell-equivalence" },
"config": {
"type": "object",
"required": ["representation", "classIdInvariant", "requireCompleteClassification"],
"properties": {
"representation": { "const": "pairwise-equality-matrix" },
"classIdInvariant": { "const": true },
"requireCompleteClassification": { "const": true }
},
"additionalProperties": false
}
}
}
]
},
"geometryPolicy": {
"type": "object", "required": ["maxCenterDeltaPx", "requireSameDimensions"],
"properties": {
"maxCenterDeltaPx": { "const": 0 },
"requireSameDimensions": { "const": true }
},
"additionalProperties": false
},
"recoveryPolicy": {
"type": "object",
"required": ["maxActionGroupsPerRoll", "maxResetPerRoll", "selectionReset"],
"properties": {
"maxActionGroupsPerRoll": { "const": 2 },
"maxResetPerRoll": { "const": 1 },
"selectionReset": {
"type": "object", "required": ["type", "strategy", "budgetMs"],
"properties": {
"type": { "const": "tap" },
"strategy": { "const": "repeat-first-endpoint" },
"budgetMs": { "const": 600 }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
}