agentgui 1.0.36 → 1.0.38

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/bin/gmgui.cjs +13 -16
  2. package/package.json +1 -1
package/bin/gmgui.cjs CHANGED
@@ -48,31 +48,28 @@ async function gmgui(args = []) {
48
48
  stdio: 'inherit'
49
49
  });
50
50
 
51
- ps.on('error', reject);
52
-
53
- // Keep this process alive indefinitely to keep the server running
54
- process.stdin.resume();
51
+ ps.on('error', (err) => {
52
+ console.error(`Failed to start server: ${err.message}`);
53
+ reject(err);
54
+ });
55
55
 
56
- // If server exits, keep this process alive
57
56
  ps.on('exit', (code) => {
58
57
  if (code !== 0) {
59
58
  console.error(`Server exited with code ${code}`);
59
+ // Don't reject - keep the promise pending so process stays alive
60
60
  }
61
61
  });
62
+
63
+ // Never resolve this promise - keeps the process alive indefinitely
62
64
  });
63
65
  } else {
64
66
  throw new Error(`Unknown command: ${command}`);
65
67
  }
66
68
  }
67
69
 
68
- // Run if this file is executed directly (works with symlinks, npm, npx)
69
- const isBinFile = process.argv[1].endsWith('gmgui.cjs') ||
70
- process.argv[1].endsWith('gmgui.js') ||
71
- process.argv[1].endsWith('/gmgui') ||
72
- process.argv[1].includes('bin/gmgui');
73
- if (isBinFile) {
74
- gmgui(process.argv.slice(2)).catch(err => {
75
- console.error(err.message);
76
- process.exit(1);
77
- });
78
- }
70
+ // Always run when executed as a bin file (this file should only be used that way)
71
+ // Works with npm, npx, bunx, and direct execution
72
+ gmgui(process.argv.slice(2)).catch(err => {
73
+ console.error(err.message);
74
+ process.exit(1);
75
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",