mc8yp 2.6.0 → 2.6.1

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/cli.mjs +8 -6
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1546,7 +1546,7 @@ const consola = createConsola();
1546
1546
  //#endregion
1547
1547
  //#region package.json
1548
1548
  var name = "mc8yp";
1549
- var version = "2.6.0";
1549
+ var version = "2.6.1";
1550
1550
  var description$1 = "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management";
1551
1551
  //#endregion
1552
1552
  //#region \0virtual:core-openapi
@@ -77814,7 +77814,7 @@ function armIdleTimer(sessionId) {
77814
77814
  const session = sessions.get(sessionId);
77815
77815
  if (!session) return;
77816
77816
  if (session.timer) clearTimeout(session.timer);
77817
- session.timer = setTimeout(() => evictSandboxSession(sessionId), IDLE_TTL_MS);
77817
+ session.timer = setTimeout(() => evictSandboxSession(sessionId, "idle-timeout"), IDLE_TTL_MS);
77818
77818
  session.timer.unref?.();
77819
77819
  }
77820
77820
  function getSessionAdapter(sessionId) {
@@ -77833,22 +77833,24 @@ function resetSessionAdapter(sessionId) {
77833
77833
  armIdleTimer(sessionId);
77834
77834
  }
77835
77835
  /**
77836
- * Drop a session's sandbox and its timer. Exported for a future clean-close
77837
- * (DELETE) hook and used by the process-exit teardown.
77836
+ * Drop a session's sandbox and its timer. Called by the clean-close (DELETE)
77837
+ * hook, the idle timer, and the process-exit teardown.
77838
77838
  * @param sessionId - MCP session id.
77839
+ * @param reason - Why the sandbox is being dropped; included in the eviction log line.
77839
77840
  */
77840
- function evictSandboxSession(sessionId) {
77841
+ function evictSandboxSession(sessionId, reason) {
77841
77842
  const session = sessions.get(sessionId);
77842
77843
  if (!session) return;
77843
77844
  if (session.timer) clearTimeout(session.timer);
77844
77845
  session.adapter.dispose?.();
77845
77846
  sessions.delete(sessionId);
77847
+ consola.info(`[sandbox] evicted workspace for session ${sessionId} (reason: ${reason})`);
77846
77848
  }
77847
77849
  /**
77848
77850
  * Evict every session (process exit, test cleanup).
77849
77851
  */
77850
77852
  function disposeAllSandboxSessions() {
77851
- for (const sessionId of [...sessions.keys()]) evictSandboxSession(sessionId);
77853
+ for (const sessionId of [...sessions.keys()]) evictSandboxSession(sessionId, "shutdown");
77852
77854
  }
77853
77855
  /**
77854
77856
  * Build the `sandbox` host-module leaf for one codemode run: the full Flue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mc8yp",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "type": "module",
5
5
  "description": "Cumulocity IoT MCP Server - Model Context Protocol integration for IoT device management",
6
6
  "keywords": [