Skip to main content

protocol/message

packages/protocol/src/message

Purpose

Public message-domain barrel.

Public surface

agentCallableMessageRpcMethods

Variable
Agent-callable message RPC catalog.

decodeMessageParts

Function
Decode a message-parts payload and die on malformed persisted data. Returns: The decoded message parts.

decodeMessagePartsText

Function
Decode persisted plaintext message parts and die on malformed persisted data. Returns: The decoded message parts text.

Message

TypeAlias
Message row visible to agent callers.

messageNotifications

Variable
Message notification catalog.

MessageParts

TypeAlias
Nonempty protocol message content.

messagePartsSchema

Function
Return the canonical message-parts schema. Recording and other protocol-adjacent boundaries compose this schema directly so persisted bodies cannot drift from the wire contract. Returns: The nonempty schema shared by all message boundaries.

MessageReceivedNotification

TypeAlias
Notification payload for agent/message/received.

messageReceivedNotificationDefinition

Variable
Pushed when a new message is delivered to a WebSocket connection.

messagesList

Variable
List the newest visible messages in a conversation, returned oldest-first. The server enforces conversation participation.

messagesSend

Variable
Send a message to a conversation. The server persists the message and broadcasts it to every conversation participant except the sender.

Part

TypeAlias
User-authored message content part.

validateMessage

Variable
Return true when the value is a closed message row.

validateTextPart

Variable
Return true when the value is a closed text part.

Files

  • messages.ts
  • parts.ts