genexus-mcp 1.1.4 → 1.1.6
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/cli/run.js +20 -13
- package/package.json +1 -1
- package/publish/gateway_debug.log +48 -0
package/cli/run.js
CHANGED
|
@@ -6,6 +6,14 @@ const fs = require('fs');
|
|
|
6
6
|
const cwdConfigPath = path.join(process.cwd(), 'config.json');
|
|
7
7
|
const args = process.argv.slice(2);
|
|
8
8
|
|
|
9
|
+
function generateConfig(gxPath, kbPath) {
|
|
10
|
+
return {
|
|
11
|
+
GeneXus: { InstallationPath: gxPath },
|
|
12
|
+
Server: { HttpPort: 5000, McpStdio: true, SessionIdleTimeoutMinutes: 10, WorkerIdleTimeoutMinutes: 5 },
|
|
13
|
+
Environment: { KBPath: kbPath }
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
// Interactive Setup Wizard
|
|
10
18
|
if (args[0] === 'init' || args[0] === 'setup') {
|
|
11
19
|
console.log('================================================');
|
|
@@ -32,10 +40,7 @@ if (args[0] === 'init' || args[0] === 'setup') {
|
|
|
32
40
|
const finalGx = gxAnswer.trim() || defaultGx;
|
|
33
41
|
|
|
34
42
|
const targetConfigPath = path.join(finalKb, 'config.json');
|
|
35
|
-
const defaultConfig =
|
|
36
|
-
GeneXus: { InstallationPath: finalGx },
|
|
37
|
-
Environment: { KBPath: finalKb }
|
|
38
|
-
};
|
|
43
|
+
const defaultConfig = generateConfig(finalGx, finalKb);
|
|
39
44
|
|
|
40
45
|
try {
|
|
41
46
|
if (!fs.existsSync(finalKb)) fs.mkdirSync(finalKb, { recursive: true });
|
|
@@ -96,10 +101,16 @@ if (args[0] === 'init' || args[0] === 'setup') {
|
|
|
96
101
|
return; // Stop execution
|
|
97
102
|
}
|
|
98
103
|
|
|
99
|
-
//
|
|
100
|
-
if (
|
|
104
|
+
// Priority 1: Explicitly passed GX_CONFIG_PATH
|
|
105
|
+
if (process.env.GX_CONFIG_PATH) {
|
|
106
|
+
// Keep it, do nothing.
|
|
107
|
+
}
|
|
108
|
+
// Priority 2: Config inside CWD
|
|
109
|
+
else if (fs.existsSync(cwdConfigPath)) {
|
|
101
110
|
process.env.GX_CONFIG_PATH = cwdConfigPath;
|
|
102
|
-
}
|
|
111
|
+
}
|
|
112
|
+
// Priority 3: Zero-Config Fallback
|
|
113
|
+
else {
|
|
103
114
|
const possibleGxPaths = [
|
|
104
115
|
"C:\\Program Files (x86)\\GeneXus\\GeneXus18",
|
|
105
116
|
"C:\\Program Files (x86)\\GeneXus\\GeneXus17",
|
|
@@ -126,10 +137,7 @@ if (fs.existsSync(cwdConfigPath)) {
|
|
|
126
137
|
console.error(`[genexus-mcp] Auto-discovered GeneXus at: ${foundGxPath}`);
|
|
127
138
|
console.error(`[genexus-mcp] Generating default config.json for KB at: ${process.cwd()}`);
|
|
128
139
|
|
|
129
|
-
const defaultConfig =
|
|
130
|
-
GeneXus: { InstallationPath: foundGxPath },
|
|
131
|
-
Environment: { KBPath: process.cwd() }
|
|
132
|
-
};
|
|
140
|
+
const defaultConfig = generateConfig(foundGxPath, process.cwd());
|
|
133
141
|
|
|
134
142
|
fs.writeFileSync(cwdConfigPath, JSON.stringify(defaultConfig, null, 2));
|
|
135
143
|
process.env.GX_CONFIG_PATH = cwdConfigPath;
|
|
@@ -162,8 +170,7 @@ if (!fs.existsSync(gatewayExePath)) {
|
|
|
162
170
|
const child = spawn(gatewayExePath, process.argv.slice(2), {
|
|
163
171
|
stdio: 'inherit',
|
|
164
172
|
env: process.env,
|
|
165
|
-
windowsHide: true
|
|
166
|
-
shell: true
|
|
173
|
+
windowsHide: true
|
|
167
174
|
});
|
|
168
175
|
|
|
169
176
|
child.on('error', (err) => {
|
package/package.json
CHANGED
|
@@ -5945,3 +5945,51 @@
|
|
|
5945
5945
|
[2026-04-09 15:48:11.391] [Gateway] Worker lifecycle ready.
|
|
5946
5946
|
[2026-04-09 15:48:11.391] [Gateway] Setting up .gx_mirror watcher...
|
|
5947
5947
|
[2026-04-09 15:48:11.392] [Gateway] .gx_mirror watcher active.
|
|
5948
|
+
[2026-04-09 16:03:37.013] === Gateway starting (Stdio Mode) ===
|
|
5949
|
+
[2026-04-09 16:03:37.030] [Gateway] Loading config from: C:\sistemas\Projetos\GenexusMCP\publish\config.json
|
|
5950
|
+
[2026-04-09 16:03:37.081] [Gateway] KB Path configured: C:\KBs\academicoLocal
|
|
5951
|
+
[2026-04-09 16:03:37.084] [Gateway] Startup orphan-kill disabled. Existing gateway reuse is handled by the extension client.
|
|
5952
|
+
[2026-04-09 16:03:37.096] [Gateway] lease_recovered key=port=5000|kb=c:\kbs\academicolocal|program=c:\program files (x86)\genexus\genexus18|shadow=c:\sistemas\projetos\genexusmcp\.gx_mirror previousPid=37468 forced=False
|
|
5953
|
+
[2026-04-09 16:03:37.107] === Gateway starting (Stdio Mode) ===
|
|
5954
|
+
[2026-04-09 16:03:37.107] [Gateway] Starting HTTP server on port 5000...
|
|
5955
|
+
[2026-04-09 16:03:37.108] [Gateway] Initializing Worker lifecycle...
|
|
5956
|
+
[2026-04-09 16:03:37.110] [Gateway] Worker lifecycle ready.
|
|
5957
|
+
[2026-04-09 16:03:37.110] [Gateway] Setting up .gx_mirror watcher...
|
|
5958
|
+
[2026-04-09 16:03:37.111] [Gateway] .gx_mirror watcher active.
|
|
5959
|
+
[2026-04-09 16:03:37.111] [Gateway] Entering Stdio Loop...
|
|
5960
|
+
[2026-04-09 16:03:37.115] [HTTP] Starting server on 127.0.0.1:5000...
|
|
5961
|
+
[2026-04-09 16:07:57.583] === Gateway starting (Stdio Mode) ===
|
|
5962
|
+
[2026-04-09 16:07:57.598] [Gateway] Loading config from: C:\sistemas\Projetos\GenexusMCP\config.json
|
|
5963
|
+
[2026-04-09 16:07:57.645] [Gateway] KB Path configured: C:\KBs\academicoLocal
|
|
5964
|
+
[2026-04-09 16:07:57.647] [Gateway] Startup orphan-kill disabled. Existing gateway reuse is handled by the extension client.
|
|
5965
|
+
[2026-04-09 16:07:57.661] [Gateway] lease_recovered key=port=5000|kb=c:\kbs\academicolocal|program=c:\program files (x86)\genexus\genexus18|shadow=c:\sistemas\projetos\genexusmcp\.gx_mirror previousPid=9432 forced=False
|
|
5966
|
+
[2026-04-09 16:07:57.670] === Gateway starting (Stdio Mode) ===
|
|
5967
|
+
[2026-04-09 16:07:57.670] [Gateway] Starting HTTP server on port 5000...
|
|
5968
|
+
[2026-04-09 16:07:57.671] [Gateway] Initializing Worker lifecycle...
|
|
5969
|
+
[2026-04-09 16:07:57.673] [Gateway] Worker lifecycle ready.
|
|
5970
|
+
[2026-04-09 16:07:57.673] [Gateway] Setting up .gx_mirror watcher...
|
|
5971
|
+
[2026-04-09 16:07:57.674] [Gateway] .gx_mirror watcher active.
|
|
5972
|
+
[2026-04-09 16:07:57.674] [Gateway] Entering Stdio Loop...
|
|
5973
|
+
[2026-04-09 16:07:57.676] [HTTP] Starting server on 127.0.0.1:5000...
|
|
5974
|
+
[2026-04-09 16:14:43.667] === Gateway starting (Stdio Mode) ===
|
|
5975
|
+
[2026-04-09 16:14:43.684] [Gateway] Loading config from: C:\Users\2635801\.gemini\antigravity\brain\7365ac0f-28d5-4326-a546-3e37e2ba58e9\scratch_test\config.json
|
|
5976
|
+
[2026-04-09 16:14:43.733] [Gateway] KB Path configured: C:\Users\2635801\.gemini\antigravity\brain\7365ac0f-28d5-4326-a546-3e37e2ba58e9\scratch_test
|
|
5977
|
+
[2026-04-09 16:14:43.735] [Gateway] Startup orphan-kill disabled. Existing gateway reuse is handled by the extension client.
|
|
5978
|
+
[2026-04-09 16:14:43.757] === Gateway starting (Stdio Mode) ===
|
|
5979
|
+
[2026-04-09 16:14:43.758] [Gateway] Initializing Worker lifecycle...
|
|
5980
|
+
[2026-04-09 16:14:43.760] [Gateway] Worker lifecycle ready.
|
|
5981
|
+
[2026-04-09 16:14:43.760] [Gateway] Setting up .gx_mirror watcher...
|
|
5982
|
+
[2026-04-09 16:14:43.761] [Gateway] .gx_mirror watcher active.
|
|
5983
|
+
[2026-04-09 16:15:01.900] === Gateway starting (Stdio Mode) ===
|
|
5984
|
+
[2026-04-09 16:15:01.917] [Gateway] Loading config from: C:\Users\2635801\.gemini\antigravity\brain\7365ac0f-28d5-4326-a546-3e37e2ba58e9\scratch_test\config.json
|
|
5985
|
+
[2026-04-09 16:15:01.988] [Gateway] KB Path configured: C:\Users\2635801\.gemini\antigravity\brain\7365ac0f-28d5-4326-a546-3e37e2ba58e9\scratch_test
|
|
5986
|
+
[2026-04-09 16:15:01.992] [Gateway] Startup orphan-kill disabled. Existing gateway reuse is handled by the extension client.
|
|
5987
|
+
[2026-04-09 16:15:02.007] [Gateway] lease_recovered pid=62748 path=C:\Users\2635801\AppData\Local\GenexusMCP\gateway-leases\10489faf15b6f8f9dc9b091928c083f0dae05a6480f5b753d23e3767c6c7c1e0.json
|
|
5988
|
+
[2026-04-09 16:15:02.019] === Gateway starting (Stdio Mode) ===
|
|
5989
|
+
[2026-04-09 16:15:02.020] [Gateway] Starting HTTP server on port 5000...
|
|
5990
|
+
[2026-04-09 16:15:02.021] [Gateway] Initializing Worker lifecycle...
|
|
5991
|
+
[2026-04-09 16:15:02.023] [Gateway] Worker lifecycle ready.
|
|
5992
|
+
[2026-04-09 16:15:02.024] [Gateway] Setting up .gx_mirror watcher...
|
|
5993
|
+
[2026-04-09 16:15:02.024] [Gateway] .gx_mirror watcher active.
|
|
5994
|
+
[2026-04-09 16:15:02.024] [Gateway] Entering Stdio Loop...
|
|
5995
|
+
[2026-04-09 16:15:02.029] [HTTP] Starting server on 127.0.0.1:5000...
|