enum ACP::Protocol::MessageKind

Overview

Represents a raw incoming JSON-RPC message before it is classified. We parse to JSON::Any first and then inspect the fields to determine if it is a response, request (agent→client method), or notification.

Defined in:

acp/protocol/types.cr

Enum Members

Response = 0

A response to a request we sent (has "id" and "result" or "error").

Request = 1

A method call from the agent that expects a response (has "id" and "method").

Notification = 2

A one-way notification (has "method" but no "id").

Instance Method Summary

Instance Method Detail

def notification? #

Returns true if this enum value equals Notification


[View source]
def request? #

Returns true if this enum value equals Request


[View source]
def response? #

Returns true if this enum value equals Response


[View source]