@webeyez/mcp-server 1.0.5 → 1.0.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.
@@ -7,6 +7,17 @@ exports.InMemoryJobStore = void 0;
7
7
  */
8
8
  class InMemoryJobStore {
9
9
  activeJobs = new Map();
10
+ constructor() {
11
+ // Run cleanup interval every 1 minute to prune jobs older than 10 minutes
12
+ setInterval(() => {
13
+ const tenMinutesAgo = Date.now() - 10 * 60 * 1000;
14
+ for (const [jobId, job] of this.activeJobs.entries()) {
15
+ if (job.startedAt < tenMinutesAgo) {
16
+ this.activeJobs.delete(jobId);
17
+ }
18
+ }
19
+ }, 60 * 1000);
20
+ }
10
21
  async get(jobId) {
11
22
  return this.activeJobs.get(jobId);
12
23
  }
@@ -354,8 +354,6 @@ function setupPublicTools(server, context) {
354
354
  };
355
355
  }
356
356
  if (job.status === 'error') {
357
- // Once retrieved, we can optionally clean up the job to free memory
358
- await jobStore.delete(jobId);
359
357
  return {
360
358
  content: [{
361
359
  type: "text",
@@ -376,7 +374,6 @@ function setupPublicTools(server, context) {
376
374
  resultData = resultData.substring(0, debugIndex).trim();
377
375
  }
378
376
  }
379
- await jobStore.delete(jobId);
380
377
  return {
381
378
  content: [{
382
379
  type: "text",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webeyez/mcp-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "mcpName": "io.github.ShaharAlbag/webeyez-mcp-server",
5
5
  "main": "dist/index.js",
6
6
  "files": [