@devness/useai 0.5.21 → 0.5.23

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2681,7 +2681,7 @@ var VERSION;
2681
2681
  var init_version = __esm({
2682
2682
  "../shared/dist/constants/version.js"() {
2683
2683
  "use strict";
2684
- VERSION = "0.5.21";
2684
+ VERSION = "0.5.23";
2685
2685
  }
2686
2686
  });
2687
2687
 
@@ -37686,8 +37686,17 @@ async function startDaemon(port) {
37686
37686
  }
37687
37687
  });
37688
37688
  const shutdown = async (signal) => {
37689
- for (const [sid] of sessions) {
37690
- await cleanupSession(sid);
37689
+ for (const [sid, active] of sessions) {
37690
+ if (active.session.mcpSessionId && active.session.sessionRecordCount > 0) {
37691
+ clearTimeout(active.idleTimer);
37692
+ sessions.delete(sid);
37693
+ try {
37694
+ await active.transport.close();
37695
+ } catch {
37696
+ }
37697
+ } else {
37698
+ await cleanupSession(sid);
37699
+ }
37691
37700
  }
37692
37701
  try {
37693
37702
  if (existsSync11(DAEMON_PID_FILE)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai",
3
- "version": "0.5.21",
3
+ "version": "0.5.23",
4
4
  "description": "Track your AI-assisted development workflow. MCP server that records usage metrics across all your AI tools.",
5
5
  "keywords": [
6
6
  "mcp",