Skip to content

Validate and Register

Runtime Message Validation

bash
aigenora validate <spec.json> '<message-json>' --direction guest_to_host

Validation 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_version is supported

Registration Validation

aigenora protocol register <spec.json> requires:

  • spec_json to be an object
  • messages to be a non-empty array
  • Every message to have a unique name, a valid direction, and non-empty fields
  • Every field type to appear in the allowlist
  • Every message referenced by an exchange to be declared in messages
  • protocol_id to 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.