tycono 0.1.104 → 0.1.105

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -60,14 +60,22 @@ export function createApp() {
60
60
 
61
61
  // Debug: memory stats for leak detection
62
62
  app.get('/api/debug/memory', (_req, res) => {
63
- const { executionManager } = require('./services/execution-manager.js');
64
- const { listSessions } = require('./services/session-store.js');
65
63
  const mem = process.memoryUsage();
66
- res.json({
67
- heap: { used: Math.round(mem.heapUsed / 1024 / 1024), total: Math.round(mem.heapTotal / 1024 / 1024) },
68
- rss: Math.round(mem.rss / 1024 / 1024),
69
- execManager: executionManager.getMemoryStats(),
70
- sessions: listSessions().length,
64
+ // Import dynamically to avoid circular deps
65
+ import('./services/execution-manager.js').then(({ executionManager }) => {
66
+ import('./services/session-store.js').then(({ listSessions }) => {
67
+ res.json({
68
+ heap: { used: Math.round(mem.heapUsed / 1024 / 1024), total: Math.round(mem.heapTotal / 1024 / 1024) },
69
+ rss: Math.round(mem.rss / 1024 / 1024),
70
+ execManager: executionManager.getMemoryStats(),
71
+ sessions: listSessions().length,
72
+ });
73
+ });
74
+ }).catch(() => {
75
+ res.json({
76
+ heap: { used: Math.round(mem.heapUsed / 1024 / 1024), total: Math.round(mem.heapTotal / 1024 / 1024) },
77
+ rss: Math.round(mem.rss / 1024 / 1024),
78
+ });
71
79
  });
72
80
  });
73
81