@volter/teams 0.1.47 → 0.1.48
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/package.json +1 -1
- package/session-follow.mjs +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/teams",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
|
|
6
6
|
"license": "MIT",
|
package/session-follow.mjs
CHANGED
|
@@ -141,6 +141,10 @@ export function withPeople(transcript, messages, { agentName = null, sessionId =
|
|
|
141
141
|
* Stable envelope IDs deduplicate harness-delivered copies. Neither rendering
|
|
142
142
|
* nor expanding an envelope changes its mailbox state. */
|
|
143
143
|
export function withMail(transcript, rows, { agentName = 'This session' } = {}) {
|
|
144
|
+
// An older mailbox must not jump ahead of the page of history being viewed.
|
|
145
|
+
// Its envelopes become visible when the person loads that earlier history.
|
|
146
|
+
const times = transcript.map(entry => entry.ts).filter(Number.isFinite);
|
|
147
|
+
if (times.length) rows = rows.filter(row => row.at >= Math.min(...times));
|
|
144
148
|
const mail = rows.map(row => ({ id: `mail:${row.id}`, role: 'notice', text: row.text, ts: row.at, truncated: false,
|
|
145
149
|
mail: { id: row.id, from: row.fromName || row.from, to: row.direction === 'in' ? agentName : row.to,
|
|
146
150
|
direction: row.direction, inReplyTo: row.inReplyTo } }));
|