agentgui 1.0.35 → 1.0.37
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/bin/gmgui.cjs +10 -15
- package/package.json +1 -1
package/bin/gmgui.cjs
CHANGED
|
@@ -51,13 +51,13 @@ async function gmgui(args = []) {
|
|
|
51
51
|
ps.on('error', reject);
|
|
52
52
|
|
|
53
53
|
// Keep this process alive indefinitely to keep the server running
|
|
54
|
-
// The server will handle all actual work; this process just provides the bridge
|
|
55
54
|
process.stdin.resume();
|
|
56
55
|
|
|
57
|
-
// If server exits
|
|
56
|
+
// If server exits, keep this process alive
|
|
58
57
|
ps.on('exit', (code) => {
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
if (code !== 0) {
|
|
59
|
+
console.error(`Server exited with code ${code}`);
|
|
60
|
+
}
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
63
|
} else {
|
|
@@ -65,14 +65,9 @@ async function gmgui(args = []) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
//
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
gmgui(process.argv.slice(2)).catch(err => {
|
|
75
|
-
console.error(err.message);
|
|
76
|
-
process.exit(1);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
68
|
+
// Always run when executed as a bin file (this file should only be used that way)
|
|
69
|
+
// Works with npm, npx, bunx, and direct execution
|
|
70
|
+
gmgui(process.argv.slice(2)).catch(err => {
|
|
71
|
+
console.error(err.message);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
});
|