instar 0.24.7 → 0.24.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAskCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqvFtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyPH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAskCD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgwFtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -2597,6 +2597,7 @@ export async function startServer(options) {
2597
2597
  checkIntervalMinutes: 30,
2598
2598
  autoApply: config.updates?.autoApply ?? true,
2599
2599
  autoRestart: true,
2600
+ restartWindow: config.updates?.restartWindow ?? null,
2600
2601
  }, telegram, liveConfig);
2601
2602
  // Wire session deps for session-aware restart gating (Phase 2B)
2602
2603
  autoUpdater.setSessionDeps(sessionManager, sessionMonitor);
@@ -3517,6 +3518,24 @@ export async function startServer(options) {
3517
3518
  alertTopicId,
3518
3519
  });
3519
3520
  }
3521
+ // Periodic housekeeping — calls orphaned cleanup methods every 6 hours.
3522
+ // These methods exist on their respective classes but were never scheduled.
3523
+ const HOUSEKEEPING_INTERVAL_MS = 6 * 60 * 60 * 1000;
3524
+ setInterval(() => {
3525
+ try {
3526
+ triageOrchestrator?.cleanup();
3527
+ }
3528
+ catch { /* best-effort */ }
3529
+ try {
3530
+ sessionRecovery?.cleanup();
3531
+ }
3532
+ catch { /* best-effort */ }
3533
+ try {
3534
+ messageStore?.cleanup();
3535
+ }
3536
+ catch { /* best-effort */ }
3537
+ console.log('[Housekeeping] Periodic cleanup completed');
3538
+ }, HOUSEKEEPING_INTERVAL_MS);
3520
3539
  // Start tunnel AFTER server is listening (with retry on failure)
3521
3540
  if (tunnel) {
3522
3541
  tunnel.enableAutoReconnect();