muuuuse 2.2.3 → 2.2.5
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/src/runtime.js +3 -16
package/package.json
CHANGED
package/src/runtime.js
CHANGED
|
@@ -42,7 +42,6 @@ const PENDING_RELAY_CONTEXT_TTL_MS = 2 * 60 * 1000;
|
|
|
42
42
|
const EMITTED_ANSWER_TTL_MS = 5 * 60 * 1000;
|
|
43
43
|
const MAX_RECENT_INBOUND_RELAYS = 12;
|
|
44
44
|
const MAX_RECENT_EMITTED_ANSWERS = 48;
|
|
45
|
-
const MAX_RELAY_CHAIN_HOP = 1;
|
|
46
45
|
const STOP_FORCE_KILL_MS = 1200;
|
|
47
46
|
const SEAT_JOIN_WAIT_MS = 3000;
|
|
48
47
|
const SEAT_JOIN_POLL_MS = 60;
|
|
@@ -997,7 +996,6 @@ class ArmedSeat {
|
|
|
997
996
|
deliveredAtMs,
|
|
998
997
|
expiresAtMs: deliveredAtMs + PENDING_RELAY_CONTEXT_TTL_MS,
|
|
999
998
|
hop: Number.isInteger(entry.hop) ? entry.hop : 0,
|
|
1000
|
-
relayUsed: false,
|
|
1001
999
|
};
|
|
1002
1000
|
this.relayCount += 1;
|
|
1003
1001
|
this.rememberInboundRelay(payload);
|
|
@@ -1252,15 +1250,6 @@ class ArmedSeat {
|
|
|
1252
1250
|
}
|
|
1253
1251
|
|
|
1254
1252
|
const pendingInboundContext = this.getPendingInboundContext();
|
|
1255
|
-
if (this.flowMode !== "on" && pendingInboundContext && pendingInboundContext.hop >= MAX_RELAY_CHAIN_HOP) {
|
|
1256
|
-
this.log(`[${this.seatId}] suppressed relay loop: ${previewText(payload)}`);
|
|
1257
|
-
return;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
if (pendingInboundContext?.relayUsed) {
|
|
1261
|
-
this.log(`[${this.seatId}] suppressed extra queued relay output: ${previewText(payload)}`);
|
|
1262
|
-
return;
|
|
1263
|
-
}
|
|
1264
1253
|
|
|
1265
1254
|
const entryId = entry.id || createId(12);
|
|
1266
1255
|
const signedEntry = {
|
|
@@ -1281,9 +1270,6 @@ class ArmedSeat {
|
|
|
1281
1270
|
);
|
|
1282
1271
|
appendJsonl(this.paths.eventsPath, signedEntry);
|
|
1283
1272
|
this.rememberEmittedAnswer(answerKey);
|
|
1284
|
-
if (pendingInboundContext) {
|
|
1285
|
-
pendingInboundContext.relayUsed = true;
|
|
1286
|
-
}
|
|
1287
1273
|
|
|
1288
1274
|
this.log(`[${this.seatId}] ${previewText(payload)}`);
|
|
1289
1275
|
}
|
|
@@ -1401,12 +1387,13 @@ function previewText(text, maxLength = 88) {
|
|
|
1401
1387
|
function buildAnswerKey(entry, payload) {
|
|
1402
1388
|
const origin = String(entry.origin || "unknown").trim() || "unknown";
|
|
1403
1389
|
const id = typeof entry.id === "string" ? entry.id.trim() : "";
|
|
1390
|
+
const payloadHash = hashText(payload);
|
|
1404
1391
|
if (id) {
|
|
1405
|
-
return `${origin}:${id}`;
|
|
1392
|
+
return `${origin}:${id}:${payloadHash}`;
|
|
1406
1393
|
}
|
|
1407
1394
|
|
|
1408
1395
|
const createdAt = typeof entry.createdAt === "string" ? entry.createdAt : "";
|
|
1409
|
-
return `${origin}:${createdAt}:${
|
|
1396
|
+
return `${origin}:${createdAt}:${payloadHash}`;
|
|
1410
1397
|
}
|
|
1411
1398
|
|
|
1412
1399
|
function buildSeatReport(sessionName, seatId) {
|