{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://bare-os.dev/schemas/mbr-layout.schema.json", "title": "Bare OS mbr_layout RPC payload", "description": "Shape for bare_os.mbr_layout response payload emitted by seeder/protocol channel.", "type": "object", "additionalProperties": false, "required": [ "role", "protocol", "primaryHex", "failoverHexes", "keyCount", "activeIndex", "atMs" ], "properties": { "role": { "const": "seeder" }, "protocol": { "const": "bare-os-v1" }, "primaryHex": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$" }, "failoverHexes": { "type": "array", "items": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "maxItems": 31 }, "keyCount": { "type": "integer", "minimum": 0, "maximum": 32 }, "keyLabels": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 }, "maxItems": 32 }, "regionLabels": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 }, "maxItems": 32 }, "activeIndex": { "type": "integer", "minimum": 0, "maximum": 31 }, "atMs": { "type": "integer", "minimum": 0 } }, "allOf": [ { "if": { "properties": { "primaryHex": { "type": "null" } } }, "then": { "properties": { "keyCount": { "const": 0 } } } }, { "if": { "properties": { "primaryHex": { "type": "string" } } }, "then": { "properties": { "keyCount": { "minimum": 1 } } } } ], "examples": [ { "role": "seeder", "protocol": "bare-os-v1", "primaryHex": "1111111111111111111111111111111111111111111111111111111111111111", "failoverHexes": [ "2222222222222222222222222222222222222222222222222222222222222222", "3333333333333333333333333333333333333333333333333333333333333333" ], "keyCount": 3, "keyLabels": ["primary", "failover-a", "failover-b"], "regionLabels": ["primary", "failover-a", "failover-b"], "activeIndex": 0, "atMs": 1745715600000 } ] }