murmur-it 0.2.5 → 0.2.6

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
@@ -4,6 +4,12 @@ All notable changes to murmur are documented here. The format follows [Keep a Ch
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.2.6] - 2026-10-21
8
+
9
+ ### Added
10
+
11
+ - A timed-out `murmur_wait` (or `murmur_send` with `wait`) now carries a `note` when a recipient of the latest ask has not replied. It names who has the message but has not answered and who has not confirmed receipt (queued or sent), and tells the asker not to start work that could overlap theirs: ask the user, or wait again. It is absent when the wait condition was met and on a `timeoutMs: 0` check, which did not wait.
12
+
7
13
  ## [0.2.5] - 2026-10-21
8
14
 
9
15
  ### Added
@@ -137,7 +143,8 @@ All notable changes to murmur are documented here. The format follows [Keep a Ch
137
143
  - Limits: send rate, duplicate window, thread and inbox caps.
138
144
  - 283 tests at 100 percent lines and branches, and an end-to-end rig that replayed the live 3-peer scenario.
139
145
 
140
- [Unreleased]: https://github.com/rennf93/murmur/compare/v0.2.5...HEAD
146
+ [Unreleased]: https://github.com/rennf93/murmur/compare/v0.2.6...HEAD
147
+ [0.2.6]: https://github.com/rennf93/murmur/releases/tag/v0.2.6
141
148
  [0.2.5]: https://github.com/rennf93/murmur/releases/tag/v0.2.5
142
149
  [0.2.4]: https://github.com/rennf93/murmur/releases/tag/v0.2.4
143
150
  [0.2.3]: https://github.com/rennf93/murmur/releases/tag/v0.2.3
package/dist/broker.js CHANGED
@@ -962,6 +962,7 @@ export class Broker {
962
962
  threadId,
963
963
  until,
964
964
  held: new Set(),
965
+ snapshot: timeoutMs === 0,
965
966
  timer: setTimeout(() => this.resolveTimedOut(waiter), timeoutMs),
966
967
  };
967
968
  conn.waiters.add(waiter);
@@ -1052,11 +1053,14 @@ export class Broker {
1052
1053
  return;
1053
1054
  }
1054
1055
  try {
1056
+ const matrix = this.matrixFor(waiter.threadId);
1057
+ const note = waiter.snapshot ? null : timeoutNote(matrix);
1055
1058
  this.replyOk(waiter.conn.socket, waiter.id, {
1056
1059
  threadId: waiter.threadId,
1057
1060
  conditionMet: false,
1058
1061
  timedOut: true,
1059
- matrix: this.matrixFor(waiter.threadId),
1062
+ matrix,
1063
+ ...(note === null ? {} : { note }),
1060
1064
  replies: this.takeReplies(waiter.threadId, waiter.conn.handle, waiter.held),
1061
1065
  });
1062
1066
  }
@@ -1171,3 +1175,23 @@ async function clearStaleSocket(socketPath) {
1171
1175
  }
1172
1176
  unlinkSync(socketPath);
1173
1177
  }
1178
+ // What a timed-out asker is told: who has the message but is silent, whose receipt
1179
+ // is unproven (queued or sent), and not to start work that could overlap theirs.
1180
+ // Null when everyone replied.
1181
+ function timeoutNote(matrix) {
1182
+ const names = (states) => matrix.filter((m) => states.includes(m.state)).map((m) => m.recipient);
1183
+ const silent = names(['delivered', 'acknowledged']);
1184
+ const unreached = names(['queued', 'sent']);
1185
+ const clauses = [];
1186
+ if (silent.length > 0) {
1187
+ const v = silent.length > 1 ? 'have' : 'has';
1188
+ clauses.push(`${silent.join(', ')} ${v} the message but ${v} not replied`);
1189
+ }
1190
+ if (unreached.length > 0) {
1191
+ clauses.push(`${unreached.join(', ')} ${unreached.length > 1 ? 'have' : 'has'} not confirmed receipt`);
1192
+ }
1193
+ if (clauses.length === 0) {
1194
+ return null;
1195
+ }
1196
+ return `timed out: ${clauses.join('; ')}. Do not start work that could overlap theirs: ask the user, or murmur_wait again.`;
1197
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "murmur-it",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Local, client-agnostic message bus for AI CLI sessions with group threads",
5
5
  "license": "MIT",
6
6
  "author": "Renn F",