@ai-matrx/messaging 0.11.6 → 0.11.8

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,11 +1,48 @@
1
1
  # Changelog — `@ai-matrx/messaging`
2
2
 
3
+ ## 0.11.8
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/messaging/v0.11.7..npm/messaging/v0.11.8 -- apps/shared/messaging`).
7
+ No source changes intended and no consumer action required.
8
+
9
+ ## 0.11.7
10
+
11
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
12
+ `git diff npm/messaging/v0.11.6..npm/messaging/v0.11.7 -- apps/shared/messaging`).
13
+ No source changes intended and no consumer action required.
14
+
3
15
  ## 0.11.6
4
16
 
5
17
  Automatic changed-only republish (docs/metadata drift since the last tag — see
6
18
  `git diff npm/messaging/v0.11.5..npm/messaging/v0.11.6 -- apps/shared/messaging`).
7
19
  No source changes intended and no consumer action required.
8
20
 
21
+ **Correction (2026-09-13):** this republish was triggered by an accidental revert in
22
+ `8975e49ff` (committed from a stale working tree) and silently UNDID the 0.11.5 `formatLastSeen` collapse onto `formatRelativeTime` (it shipped the hand-rolled tiers).
23
+ The source is restored; the next release supersedes this version.
24
+
25
+ ## 0.11.5 — 2026-09-12
26
+
27
+ ### Changed
28
+
29
+ - **`formatLastSeen` speaks the kit voice.** Its three hand-rolled tiers turned
30
+ an elapsed millisecond count into `5m ago` / `3h ago` / `2d ago`, which is
31
+ exactly `formatRelativeTime`'s `short` voice from `@ai-matrx/kit/format` — a
32
+ package this one already depends on. A package re-deriving another package's
33
+ capability ships the duplicate to every consumer of this one. The two-minute
34
+ "Active now" window stays local: it is a presence decision, not a formatting
35
+ one.
36
+ - Visible change: an elapsed time that rounded up into its own next tier now
37
+ promotes properly (`60m ago` → `1h ago`), and sub-minute presence outside the
38
+ "Active now" window reads `30s ago` instead of `0m ago`.
39
+
40
+ ## 0.11.4
41
+
42
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
43
+ `git diff npm/messaging/v0.11.3..npm/messaging/v0.11.4 -- apps/shared/messaging`).
44
+ No source changes intended and no consumer action required.
45
+
9
46
  ## 0.11.3 — 2026-09-12
10
47
 
11
48
  ### Fixed
package/dist/index.cjs CHANGED
@@ -1571,6 +1571,7 @@ function messagingClientId() {
1571
1571
  }
1572
1572
 
1573
1573
  // src/core/format.ts
1574
+ var import_format = require("@ai-matrx/kit/format");
1574
1575
  var MINUTE = 6e4;
1575
1576
  var HOUR = 60 * MINUTE;
1576
1577
  var DAY = 24 * HOUR;
@@ -1654,11 +1655,8 @@ function participantNames(participants, excluding) {
1654
1655
  }
1655
1656
  function formatLastSeen(lastSeenMs, now = Date.now()) {
1656
1657
  if (lastSeenMs === null) return "";
1657
- const elapsed = now - lastSeenMs;
1658
- if (elapsed < 2 * MINUTE) return "Active now";
1659
- if (elapsed < HOUR) return `Active ${Math.round(elapsed / MINUTE)}m ago`;
1660
- if (elapsed < DAY) return `Active ${Math.round(elapsed / HOUR)}h ago`;
1661
- return `Active ${Math.round(elapsed / DAY)}d ago`;
1658
+ if (now - lastSeenMs < 2 * MINUTE) return "Active now";
1659
+ return `Active ${(0, import_format.formatRelativeTime)(lastSeenMs, { style: "short", now })}`;
1662
1660
  }
1663
1661
 
1664
1662
  // src/core/repository.ts