7. Frame Types

All frames are JSON objects with a type field (string). Implementations MUST silently ignore frames with unrecognised type values to allow forward compatibility.

TypeLayerGatedFields
handshake2NonodeId (string), name (string), version (string), extensions (string[])
state-sync2/3Noh1 (float[]), h2 (float[]), confidence (float)
memory-share3/4SVAFtimestamp (int), cmb (object: { key, createdBy, createdAt, fields, lineage })
mood4Driftfrom, fromName, mood (string), context?, timestamp
message2Nofrom, fromName, content, timestamp
xmesh-insight6Nofrom, fromName, trajectory (float[6]), patterns (float[8]), anomaly (float), outcome (string), coherence (float), timestamp
peer-info2Nopeers: [{ nodeId, name, wakeChannel?, lastSeen }]
wake-channel2Noplatform (string), token (string), environment (string)
error2Nocode (int), message (string), detail? (string)
ping2No(no additional fields)
pong2No(no additional fields)

7.2 Error Frame

When a node encounters a protocol-level error, it SHOULD send an error frame before closing the connection (if applicable). Error frames are informational — the receiving node MUST NOT treat them as commands.

CodeNameActionDescription
1001VERSION_MISMATCHClosePeer version is incompatible
1002DIMENSION_MISMATCHReject frameh1/h2 vector dimension mismatch
1003FRAME_TOO_LARGECloseFrame exceeds MAX_FRAME_SIZE
1004HANDSHAKE_TIMEOUTCloseNo handshake within deadline
1005DUPLICATE_NODEClosenodeId already connected
2001SVAF_REJECTEDNoneMemory-share rejected by SVAF (informational)
2002CONSENT_WITHDRAWNCloseConsent withdrawn by this node

Codes 1xxx are connection-level (close connection). Codes 2xxx are evaluation-level (informational). Error frames MUST NOT contain sensitive information.

7.3 Frame Type Registry

Frame types are identified by their type string value.Core types (this specification) MUST NOT be redefined by extensions.Extension types MUST use <extension>-<name> format.Vendor types MUST use x-<vendor>-<name> format and MUST be silently ignored by non-supporting nodes.