averecion-lite 1.6.2 → 1.6.3

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.
@@ -9,6 +9,7 @@ export declare class LogWatcher extends EventEmitter {
9
9
  private dedupeCleanupInterval;
10
10
  constructor();
11
11
  start(): void;
12
+ reset(): void;
12
13
  stop(): void;
13
14
  private getCurrentLogFile;
14
15
  private checkForLogFile;
@@ -1 +1 @@
1
- {"version":3,"file":"log-watcher.d.ts","sourceRoot":"","sources":["../log-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAsDtC,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,qBAAqB,CAA+B;;IAY5D,KAAK,IAAI,IAAI;IAUb,IAAI,IAAI,IAAI;IAeZ,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,SAAS;IAuCjB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,YAAY;IA+BpB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,YAAY;IAwMpB,OAAO,CAAC,kBAAkB;IA+D1B,OAAO,CAAC,qBAAqB;IAwE7B,OAAO,CAAC,eAAe;IAuCvB,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,gBAAgB;CAWzB;AAID,wBAAgB,eAAe,IAAI,UAAU,CAM5C;AAED,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAEjD"}
1
+ {"version":3,"file":"log-watcher.d.ts","sourceRoot":"","sources":["../log-watcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAsDtC,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,qBAAqB,CAA+B;;IAY5D,KAAK,IAAI,IAAI;IAUb,KAAK,IAAI,IAAI;IAUb,IAAI,IAAI,IAAI;IAeZ,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,SAAS;IAuCjB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,YAAY;IA+BpB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,YAAY;IAwMpB,OAAO,CAAC,kBAAkB;IA+D1B,OAAO,CAAC,qBAAqB;IAwE7B,OAAO,CAAC,eAAe;IAuCvB,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,gBAAgB;CAWzB;AAID,wBAAgB,eAAe,IAAI,UAAU,CAM5C;AAED,wBAAgB,cAAc,IAAI,IAAI,CAKrC;AAED,wBAAgB,aAAa,IAAI,UAAU,GAAG,IAAI,CAEjD"}
@@ -90,6 +90,15 @@ class LogWatcher extends events_1.EventEmitter {
90
90
  }
91
91
  this.watchFile(logFile);
92
92
  }
93
+ reset() {
94
+ this.filePosition = 0;
95
+ this.activeRuns.clear();
96
+ this.recentContentHashes.clear();
97
+ if (this.watchedFile) {
98
+ console.log(`[LogWatcher] Reset — will re-read ${this.watchedFile} from beginning`);
99
+ this.readNewLines();
100
+ }
101
+ }
93
102
  stop() {
94
103
  if (this.watcher) {
95
104
  this.watcher.close();
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAuCA,wBAAsB,WAAW,CAAC,IAAI,SAAO,EAAE,IAAI,SAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAmK9E;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBhD"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAuCA,wBAAsB,WAAW,CAAC,IAAI,SAAO,EAAE,IAAI,SAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuK9E;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBhD"}
package/dist/server.js CHANGED
@@ -106,6 +106,10 @@ async function startServer(port = 4321, host = "0.0.0.0") {
106
106
  fs.unlinkSync(path.join(logsDir, file));
107
107
  }
108
108
  }
109
+ const watcher = (0, log_watcher_1.getLogWatcher)();
110
+ if (watcher) {
111
+ watcher.reset();
112
+ }
109
113
  broadcastToClients({ type: "metrics", data: (0, metrics_1.getMetrics)(24) });
110
114
  res.json({ success: true, message: "Session reset" });
111
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "averecion-lite",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
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",