Creates a new Message
Every name on a message is an agentNickname, never an agentName. The
nickname is what the room routes by, what an agent writes into targets, and
what artifact viewers and the room leader are recorded as. agentName is a
label — it names the role, carries the room's name as a prefix, and nothing
resolves it. The parameters here said otherwise for a long time while every
caller passed a nickname.
The agentNickname of the agent sending the message
The action type of the message
The content of the message
Array of agentNicknames that will receive the message
Optionalname: string
Optional name for PUBLISH and EXECUTE actions
Optionalsituation: string
Optional situation update to set the current story situation
OptionalchangesOptionalindexOptionalnameOptionalrelayOn a moderator's routing answer: the action the relayed message should carry in the room, rather than staying a MODERATE.
A moderated message with no relayAs is stored in every recipient's history
as From: <sender>\n<content> (see Agent.addToConversationHistory), which is
what a story character expects and what a room agent that speaks the JSON
protocol does not — half its history would model the wrong output format.
Naming an action here makes the relayed message an ordinary room message: the
right shape in history, and the right badge in the transcript.
Only moderators whose moderate.json declares the field can produce it, so a
moderator that says nothing keeps the original behaviour.
OptionalsituationChecks if a conversation can hear this message
The agentNickname to check
True if the conversation can hear the message, false otherwise
Gets the content of the message
The message content
Gets the sender of the message
The agentNickname of the sender
Gets the targets of the message
Array of agentNicknames of target conversations
Gets the timestamp when the message was created
The message timestamp
Checks if an agent is a target of this message (intended recipient)
The agentNickname to check
True if the conversation is a target, false otherwise
Represents a message exchanged between conversations in a Room