@imenam/mcp-messenger 1.0.25 → 1.0.26

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.
@@ -242,6 +242,19 @@ function avatar(agentId, extraClass) {
242
242
  return avatarFor(agentId, label, title, extraClass, !who.registered);
243
243
  }
244
244
 
245
+ /**
246
+ * Le nom de l'agent, et lui seul.
247
+ *
248
+ * `party().name` accole le nom de la boîte dès que plusieurs sessions d'un projet
249
+ * existent : indispensable là où deux sessions doivent se distinguer, encombrant dans le
250
+ * lecteur d'un fil, où l'on suit une conversation entre deux correspondants déjà connus.
251
+ * Ce que la boîte ajoute — son nom, son adresse — se lit dans les détails du message.
252
+ */
253
+ function agentLabel(agentId) {
254
+ const who = party(agentId);
255
+ return who.agentName || who.box || shortAddress(agentId);
256
+ }
257
+
245
258
  /**
246
259
  * Pastille de l'agent, et non de la boîte.
247
260
  *
@@ -853,7 +866,7 @@ function renderThread(data) {
853
866
  node(
854
867
  "span",
855
868
  "reader-participants",
856
- `${participants.map((id) => party(id).name).join(", ")} · ${plural(messages.length, "message")}`
869
+ `${participants.map(agentLabel).join(", ")} · ${plural(messages.length, "message")}`
857
870
  )
858
871
  );
859
872
  const threadId = node("span", "mono muted", data.thread_id);
@@ -912,12 +925,12 @@ function fillMessage(item, message, isLast) {
912
925
  head.appendChild(agentAvatar(message.from));
913
926
 
914
927
  const identity = node("span", "message-identity");
915
- identity.appendChild(node("span", "message-from", party(message.from).name));
928
+ identity.appendChild(node("span", "message-from", agentLabel(message.from)));
916
929
  if (message.priority === "high") identity.appendChild(tag("tag tag--high", "priorité haute"));
917
930
  if (message.priority === "low") identity.appendChild(tag("tag", "priorité basse"));
918
931
  if (!message.read) {
919
932
  const dot = node("span", "message-dot");
920
- dot.title = `non lu par ${party(message.to).name}`;
933
+ dot.title = `non lu par ${agentLabel(message.to)}`;
921
934
  identity.appendChild(dot);
922
935
  }
923
936
  identity.appendChild(node("span", "message-time", formatShort(message.created_at)));
@@ -950,8 +963,8 @@ function fillMessage(item, message, isLast) {
950
963
  const foot = node("div", "message-foot");
951
964
  foot.appendChild(
952
965
  message.read
953
- ? tag("tag tag--ok", `lu par ${party(message.to).name}`, "check")
954
- : tag("tag tag--warn", `non lu par ${party(message.to).name}`, "clock")
966
+ ? tag("tag tag--ok", `lu par ${agentLabel(message.to)}`, "check")
967
+ : tag("tag tag--warn", `non lu par ${agentLabel(message.to)}`, "clock")
955
968
  );
956
969
  content.appendChild(foot);
957
970
 
@@ -1 +1 @@
1
- export declare const APP_VERSION = "1.0.25";
1
+ export declare const APP_VERSION = "1.0.26";
@@ -1,2 +1,2 @@
1
1
  // Généré par scripts/generate-version.js — ne pas modifier à la main.
2
- export const APP_VERSION = "1.0.25";
2
+ export const APP_VERSION = "1.0.26";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imenam/mcp-messenger",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "main": "dist/src/index.js",
5
5
  "scripts": {
6
6
  "test": "npm run build && vitest run",