Address channels and existing threads in application inbox messages

Closed
BO
1mo ago
+3587-1697

Closes twentyhq/core-team-issues#3115.

sendInboxMessage can now reply in an existing conversation (threadId, under the access rule of the attach mutation, with sender-scoped message ids and no opener), file a new conversation in a channel the app's default role reaches (channelId, unowned when no recipient is listed), mention members explicitly (mentionedWorkspaceMemberIds, delivered recipients get no obligation) and attach records before the message is written (recordTargets). workspaceMemberIds becomes optional; title is required with threadKey and ignored with threadId. The result adds messageId, isNewThread and isDismissed, and chatMessages exposes senderApplicationId.

Existing-thread recipients are checked before writes. New shares require prior application participation and the acting member's sharing rights when a member makes the call.

The existing input shape and its ids are unchanged. Cross-field rules live in a pure normalizer (INVALID_INBOX_MESSAGE_INPUT), and the access and record-target services move to AgentChatThreadModule so the inbox service can use them. The SDK helper, docs, skill reference and changelog follow, and the metadata clients are regenerated.