15. JSON Schema
Formal JSON Schema definitions for core frame types. Implementations SHOULD validate frames against these schemas. Full schemas for all frame types are available in the downloadable specification.
15.1 Handshake Frame Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["type", "nodeId", "name", "version"],
"properties": {
"type": { "const": "handshake" },
"nodeId": { "type": "string", "format": "uuid" },
"name": { "type": "string", "minLength": 1, "maxLength": 64 },
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
"extensions": { "type": "array", "items": { "type": "string" } }
}
}15.2 CMB Schema
The cmb object within a memory-share frame:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["key", "createdBy", "createdAt", "fields"],
"properties": {
"key": { "type": "string", "description": "Content hash: h- + md5(field texts)" },
"createdBy": { "type": "string", "description": "Agent name that created this CMB" },
"createdAt": { "type": "integer", "description": "Unix ms timestamp of creation" },
"fields": {
"type": "object",
"required": ["focus", "issue", "intent", "motivation", "commitment", "perspective", "mood"],
"properties": {
"focus": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"issue": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"intent": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"motivation": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"commitment": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"perspective": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string" } } },
"mood": {
"type": "object",
"required": ["text", "valence", "arousal"],
"properties": {
"text": { "type": "string" },
"valence": { "type": "number", "minimum": -1, "maximum": 1 },
"arousal": { "type": "number", "minimum": -1, "maximum": 1 }
}
}
}
},
"lineage": {
"type": "object",
"properties": {
"parents": { "type": "array", "items": { "type": "string" }, "description": "Direct parent CMB keys" },
"ancestors": { "type": "array", "items": { "type": "string" }, "description": "Full ancestor chain" },
"method": { "type": "string", "description": "Fusion method (e.g. SVAF-v2)" }
}
}
}
}Complete memory-share frame with CMB:
{
"type": "memory-share",
"timestamp": 1774326000000,
"cmb": {
"key": "h-b2c3d4e5f6a7b8c9",
"createdBy": "melotune",
"createdAt": 1774326000000,
"fields": {
"focus": { "text": "user coding for 3 hours, energy declining" },
"issue": { "text": "sedentary since morning, skipping lunch" },
"intent": { "text": "recommend movement break before fatigue worsens" },
"motivation": { "text": "3 agents reported declining energy in last hour" },
"commitment": { "text": "fitness monitoring active, 10min stretch queued" },
"perspective": { "text": "fitness agent, afternoon session, home office" },
"mood": { "text": "concerned, low energy", "valence": -0.3, "arousal": -0.4 }
},
"lineage": {
"parents": ["h-a1b2c3d4e5f6"],
"ancestors": ["h-a1b2c3d4e5f6"],
"method": "SVAF-v2"
}
}
}