averecion-lite 1.4.4 → 1.4.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/dist/log-watcher.js +13 -11
- package/package.json +1 -1
package/dist/log-watcher.js
CHANGED
|
@@ -425,19 +425,21 @@ class LogWatcher extends events_1.EventEmitter {
|
|
|
425
425
|
return `${from}:${body.substring(0, 100)}`;
|
|
426
426
|
}
|
|
427
427
|
isDuplicate(event, isThreat) {
|
|
428
|
-
|
|
429
|
-
if (!whatsappTools.includes(event.tool))
|
|
430
|
-
return false;
|
|
431
|
-
const fingerprint = this.getContentFingerprint(event);
|
|
432
|
-
if (!fingerprint)
|
|
433
|
-
return false;
|
|
434
|
-
const dedupeKey = isThreat ? `threat:${fingerprint}` : `safe:${fingerprint}`;
|
|
435
|
-
const lastSeen = this.recentContentHashes.get(dedupeKey);
|
|
436
|
-
const now = Date.now();
|
|
437
|
-
if (lastSeen && now - lastSeen < 10000) {
|
|
428
|
+
if (event.tool === "whatsapp-processing") {
|
|
438
429
|
return true;
|
|
439
430
|
}
|
|
440
|
-
|
|
431
|
+
if (event.tool === "whatsapp-gateway") {
|
|
432
|
+
const fingerprint = this.getContentFingerprint(event);
|
|
433
|
+
if (!fingerprint)
|
|
434
|
+
return false;
|
|
435
|
+
const dedupeKey = `gw:${fingerprint}`;
|
|
436
|
+
const lastSeen = this.recentContentHashes.get(dedupeKey);
|
|
437
|
+
const now = Date.now();
|
|
438
|
+
if (lastSeen && now - lastSeen < 10000)
|
|
439
|
+
return true;
|
|
440
|
+
this.recentContentHashes.set(dedupeKey, now);
|
|
441
|
+
return false;
|
|
442
|
+
}
|
|
441
443
|
return false;
|
|
442
444
|
}
|
|
443
445
|
handleToolEvent(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "averecion-lite",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Real-time AI agent monitoring - watches logs, detects dangerous commands and prompt injection attempts",
|
|
5
5
|
"author": "Averecion <hello@averecion.com>",
|
|
6
6
|
"homepage": "https://github.com/averecion/clawguard#readme",
|