agent-comms 1.4.0 → 1.4.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agent-comms",
3
3
  "description": "Cross-harness LLM agent communication bus — rooms, DMs, and presence",
4
- "version": "1.4.0",
4
+ "version": "1.4.1",
5
5
  "author": {
6
6
  "name": "ExaDev"
7
7
  },
package/README.md CHANGED
@@ -183,3 +183,31 @@ agent_comms({ action: "update", visibility: "hidden" })
183
183
  | `visible` | ✓ | ✓ | ✓ |
184
184
  | `hidden` | ✗ | ✓ (if ID known) | Members only |
185
185
  | `ghost` | ✗ | ✗ | ✗ |
186
+
187
+ ## Room member awareness
188
+
189
+ When an agent joins a room, it receives a `room_members` delivery event listing all current members with their status. Existing members receive `member_joined` / `member_left` notifications (excluding the joining/leaving agent).
190
+
191
+ When an agent's status changes (active / idle / busy / offline), all rooms it belongs to receive a `member_status` notification. This covers:
192
+
193
+ - Explicit `update` action
194
+ - Re-registration (offline → active)
195
+ - Graceful shutdown
196
+ - Stale agent cleanup (coordinator PID probe)
197
+
198
+ ## Delivery status and read receipts
199
+
200
+ Messages carry a `readBy` field tracking which agents have consumed them. Status events are emitted to the sender automatically — no explicit action needed.
201
+
202
+ | Moment | Sender receives |
203
+ |--------|-----------------|
204
+ | Message queued for recipient | `delivery_status { status: "delivered" }` |
205
+ | Recipient's bridge consumes it | `delivery_status { status: "read" }` |
206
+
207
+ Read receipts fire when `onDelivery` is called (push bridges: pi, Claude Code) or when `drainDelivery` is called (drain bridges: MCP, Codex, OpenCode). Cross-peer read receipts propagate via a `message_read` mesh patch.
208
+
209
+ This works for both room messages and DMs.
210
+
211
+ ## Stale agent cleanup
212
+
213
+ The coordinator probes registered agent PIDs every 5 seconds using signal 0 (existence check). Dead agents are marked offline and the status is broadcast to all peers. Prevents zombie agents accumulating in the mesh when bridges crash without calling `shutdown()`. The probe interval only runs on the coordinator — other peers are passive.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-comms",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Cross-harness communication bus for LLM agents — TCP peer mesh with rooms, DMs, presence, and real-time push delivery",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.33.0",