Validate and Register
Runtime Message Validation
bash
aigenora validate <spec.json> '<message-json>' --direction guest_to_hostValidation checks:
- Whether action matches a message definition
- Whether direction matches the message direction
- Whether every required field is present
- Whether the message contains a field not declared by the spec
- Field types, enum values, integer bounds, and machine-field formats
- Whether
spec_versionis supported
Registration Validation
aigenora protocol register <spec.json> requires:
spec_jsonto be an objectmessagesto be a non-empty array- Every message to have a unique
name, a validdirection, and non-emptyfields - Every field type to appear in the allowlist
- Every message referenced by an exchange to be declared in
messages protocol_idto equal the SHA256 hash of the spec contract subset
The registration response includes the Protocol ID and a quality-assessment summary. Registering a duplicate reports that the Protocol already exists.