Extract every raw mention name from text (no resolution against agents/users).
Rewrite mentions in text to a canonical @Name format using the proper casing
from mentions. Useful when normalizing user-typed mentions before storage or display.
Parse every mention out of the supplied text.
Tries JSON format first; if no JSON mentions are present, falls back to the legacy
text format and resolves names against availableAgents / availableUsers.
Message text to parse
Agents to resolve legacy @Name references against
OptionalavailableUsers: UserInfo[]Optional users to resolve legacy @Name references against
Parsed mentions with agent/user separation
Convert a message containing JSON-encoded mentions to plain text — @{…} blocks
become simple @Name strings. Delegates to
ConversationUtility.ToPlainText which is the canonical implementation.
Optionalagents: MJAIAgentEntityExtended[]Optionalusers: UserInfo[]Validate every mention in text. Returns an array of mention names that could not be
resolved to a known agent or user.
OptionalavailableUsers: UserInfo[]
Parses
@-mentions out of conversation message text.Pure logic — no framework deps, no I/O, no observable state. Safe to call from browser, Node, tests, or anywhere TypeScript runs.
Consumers usually access this via
ConversationsRuntime.Instance.Mentions.