@ai-matrx/messaging 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog — `@ai-matrx/messaging`
2
2
 
3
+ ## 0.10.4 — 2026-09-08
4
+
5
+ ### Fixed
6
+
7
+ - Message-level Reply controls retain their compact 24px desktop treatment but expose the full
8
+ 44px package touch target at phone widths. The visible icon is unchanged; the interactive
9
+ control no longer violates the mobile tap floor.
10
+
11
+ ### Consumer action (C28)
12
+
13
+ None. Upgrade to receive the responsive message-action target.
14
+
15
+ ## 0.10.3 — 2026-09-08
16
+
17
+ ### Fixed
18
+
19
+ - Flat platform agent-event envelopes no longer display the human audit principal as a visible
20
+ “via” author. The principal remains immutable in `sender_id` and `principalUserId`; it is not
21
+ presentation identity for an automated event.
22
+ - The engine declares the conversation room's read-only presence shape on the first holder,
23
+ before subscribe. Typing and online-roster hooks can now attach without forcing a late-binding
24
+ room rebuild and its `channel.room.binding.refused` diagnostics.
25
+
26
+ ### Consumer action (C28)
27
+
28
+ None. Upgrade `@ai-matrx/realtime` alongside this package so presence/typing holders also receive
29
+ the ephemeral-roster backfill fix.
30
+
3
31
  ## 0.10.2 — 2026-09-08
4
32
 
5
33
  **Agent-authored review events wore the human audit principal's name, avatar, alignment, and
package/dist/index.cjs CHANGED
@@ -152,6 +152,7 @@ function readActorHint(metadata) {
152
152
  const avatar2 = record["agentAvatarUrl"] ?? record["agent_avatar_url"];
153
153
  return {
154
154
  agentId,
155
+ showPrincipalAttribution: true,
155
156
  ...typeof name2 === "string" && name2.length > 0 ? { agentName: name2 } : {},
156
157
  ...typeof avatar2 === "string" && avatar2.length > 0 ? { agentAvatarUrl: avatar2 } : {}
157
158
  };
@@ -162,6 +163,7 @@ function readActorHint(metadata) {
162
163
  const name = envelope["actor_label"] ?? envelope["actorLabel"];
163
164
  const avatar = envelope["actor_avatar_url"] ?? envelope["actorAvatarUrl"];
164
165
  return {
166
+ showPrincipalAttribution: false,
165
167
  ...typeof id === "string" && id.length > 0 ? { agentId: id } : {},
166
168
  ...typeof name === "string" && name.length > 0 ? { agentName: name } : {},
167
169
  ...typeof avatar === "string" && avatar.length > 0 ? { agentAvatarUrl: avatar } : {}
@@ -183,7 +185,11 @@ function resolveActor(message, sender) {
183
185
  displayName: hint.agentName ?? "Agent",
184
186
  avatarUrl: hint.agentAvatarUrl ?? null,
185
187
  isAgent: true,
186
- onBehalfOfName: humanName,
188
+ // The nested envelope explicitly models an agent acting on behalf of a
189
+ // session principal. Platform event rows use the flat actor envelope as
190
+ // the complete presentation identity; surfacing their audit writer as
191
+ // "via Human" wrongly re-attaches that person to an automated event.
192
+ onBehalfOfName: hint.showPrincipalAttribution ? humanName : null,
187
193
  principalUserId: message.senderId
188
194
  };
189
195
  }
@@ -1370,6 +1376,11 @@ function createMessagingEngine(options) {
1370
1376
  if (openChannels.has(id) || disposed) return;
1371
1377
  const handle = manager.open({
1372
1378
  topic: conversationTopic(id),
1379
+ // Presence callbacks are JOIN-TIME in supabase-js. Declare the
1380
+ // read-only room shape on the first holder (the engine) so the
1381
+ // composer/typist/online hooks can attach without forcing a rebuild
1382
+ // after this durable channel has already subscribed.
1383
+ presence: { publish: false, state: {} },
1373
1384
  postgresChanges: [
1374
1385
  {
1375
1386
  event: "*",