Skip to content
This repository was archived by the owner on Jun 5, 2026. It is now read-only.

Chat Definitions#80

Merged
jazzz merged 24 commits into
masterfrom
jazzz/chatdefs
Mar 30, 2026
Merged

Chat Definitions#80
jazzz merged 24 commits into
masterfrom
jazzz/chatdefs

Conversation

@jazzz

@jazzz jazzz commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

This PR Introduces an Informational spec that defines Chat related terms.

These terms defined here are used across the Chat context, and is referenced by chat related specs.

Comment thread informational/chatdefs.md Outdated

### Software Entities

**Client**: Software that implements a chat protocol. It is responsible for establishing and maintaining communication with the underlying network, performing protocol operations (e.g., encryption, key management, frame generation), and exposing an interface for higher-level software. A Client serves as the technical component that provides messaging capabilities to Applications.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term client seems not clear, maybe just use chat-sdk implementation here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatSDK Implementation is a different concept. The Implementation is a library, the Client is an "Component" of an architecture. I'll reword the definition to reflect that.

Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md
Comment thread informational/chatdefs.md Outdated

**Payload**: The encoded bytes as produced by a chat protocol. The term `message` is avoided due to conflicts with other layers.

**Frame**: A data structure which is required to implement a chat protocol. Frames are used to disambiguate the objects defined by chat protocols from transport 'messages' and application `content`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have some examples about Frame, and how it connects between content and payload, not sure if there is an easy definition of data structure for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely - Examples though are provided in the conversation specifications. This definitions spec is intended to only define the terms used to provide consistent vocabulary. Frames definitions are arbitrary, and defined by their use case. The different in the 3 terms is the intent and purpose of the "Message".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment thread informational/chatdefs.md Outdated

**Delivery Acknowledgement**: A notification from a receiving client to sender that their message was successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.

**Invite**: An protocol message from one client to another to establish a communication channel. Invites notify a client that someone wants to communicate with them, and provides the required information to do so.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use direct message or similar for this term, and how invite fit in this scenario and roles like inviter invitee. We can also link to the detail spec here.

@igor-sirotin igor-sirotin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Mostly dust comments, but I'd like to clarify Frame vs Payload before approving.

Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md
Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md

@osmaczko osmaczko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful 👍

Comment thread informational/chatdefs.md Outdated

**Frame**: The data generated by a chat protocol. Frames are messages used by protocols to provide functionality - they are how clients exchange information with each other and coordinate state.

**Payload**: The encoded data or data structures used by lower layer protocols. This includes the encoded bytes passed to a delivery service or subsequent layers. Payloads are usually associated with the delivery process, which is not defined by chat protocols.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "encoded data" refer to here - an encoded Frame? And what are "lower layer protocols"? Should the chat protocol know about or mention them? Isn't the delivery service the only abstraction we should care about at this level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment thread informational/chatdefs.md Outdated
Comment thread informational/chatdefs.md Outdated

**Content Type**: The structured format of content. These data structures represent specific encodings of Text, Image, Audio data.

**Delivery Acknowledgement**: A notification from a receiving client to sender that their message was successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invite explicitly specifies that it is a frame. Should the delivery ack also be a frame?

Suggested change
**Delivery Acknowledgement**: A notification from a receiving client to sender that their message was successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.
**Delivery Acknowledgement**: A notification frame from a receiving client to sender that their message was successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An Invite requires a dedicated frame to be a sent which contains all the required information.

A delivery acknowledgement does not. It is a state change - rather than a "message" type.

Is this any better? Suggestions @osmaczko ?

Suggested change
**Delivery Acknowledgement**: A notification from a receiving client to sender that their message was successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.
**Delivery Acknowledgement**: A confirmation emitted to an application that a sent message has been successfully received. While similar to a read-receipt delivery acknowledgements differ in that the acknowledgement originates based on the client, where read-receipts are fired when they are displayed to a user.

@jazzz
jazzz requested review from igor-sirotin and osmaczko March 27, 2026 16:11
@jazzz
jazzz merged commit c8de343 into master Mar 30, 2026
1 check passed
@jazzz
jazzz deleted the jazzz/chatdefs branch March 30, 2026 18:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants