@axhub/genie 0.2.5 → 0.2.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/dist/assets/App-CYTE30Cf.js +484 -0
- package/dist/assets/{ReviewApp-CsqTAlGU.js → ReviewApp-BEicSBzW.js} +1 -1
- package/dist/assets/{_basePickBy-CFRQvihx.js → _basePickBy-DkiHsp3X.js} +1 -1
- package/dist/assets/{_baseUniq-Dhh8nCvs.js → _baseUniq-7ElXb2sX.js} +1 -1
- package/dist/assets/{arc-DQ0v3dU4.js → arc-CEsS3MdK.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-DmUHdvQH.js → architectureDiagram-2XIMDMQ5-BubZ7T3U.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-Bbxhj5KC.js → blockDiagram-WCTKOSBZ-Cza6M6Ht.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-BOivDlQU.js → c4Diagram-IC4MRINW-jhjtOQ12.js} +1 -1
- package/dist/assets/channel-RmqTALN0.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-DlvtrM0q.js → chunk-4BX2VUAB--HkodwbY.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DJUSHyTa.js → chunk-55IACEB6-CyBuez4e.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-C6Ch-htf.js → chunk-FMBD7UC4-CuzG4iAl.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-DzQIht58.js → chunk-JSJVCQXG-BNi8S861.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-C05jARMH.js → chunk-KX2RTZJC-D817O-GT.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-Ci-n7jfu.js → chunk-NQ4KR5QH-DyujyOvx.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-jxti9HTX.js → chunk-QZHKN3VN-VMEn-zxh.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-C559Mk71.js → chunk-WL4C6EOR-CQHHFLvx.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-wvVV1ggz.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-wvVV1ggz.js +1 -0
- package/dist/assets/clone-oT5aWXpf.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DNO9ncXL.js → cose-bilkent-S5V4N54A-qykDd54p.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-DJ3dNSYk.js → dagre-KLK3FWXG-Bqp7DjEa.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-Ba_LGLun.js → diagram-E7M64L7V-BKtx468K.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-Da6K4aP-.js → diagram-IFDJBPK2--fHfW6V2.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-vZZKB92A.js → diagram-P4PSJMXO-D1kQI5RB.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-Csb8dFdP.js → erDiagram-INFDFZHY-DT9YzdNw.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-DUV13pHi.js → flowDiagram-PKNHOUZH-DWeNr4yg.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-B5Kv9Wfz.js → ganttDiagram-A5KZAMGK--IgwcUhI.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BZ5gW69I.js → gitGraphDiagram-K3NZZRJ6-B5a8UWjN.js} +1 -1
- package/dist/assets/{graph-BbvHswRd.js → graph-Cw1rYoD9.js} +1 -1
- package/dist/assets/{highlighted-body-TPN3WLV5-DZJajMGm.js → highlighted-body-TPN3WLV5-BCxJHuqY.js} +1 -1
- package/dist/assets/{index-BiErUGrv.js → index-CBuAXA5S.js} +2 -2
- package/dist/assets/index-CyLWKyxy.css +1 -0
- package/dist/assets/{infoDiagram-LFFYTUFH-8auUIPKW.js → infoDiagram-LFFYTUFH-D2u70rhN.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-JmsNlo2I.js → ishikawaDiagram-PHBUUO56-Cl8yrezU.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-Cuudv7Vv.js → journeyDiagram-4ABVD52K-ddP0AMU9.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-Bappd2YO.js → kanban-definition-K7BYSVSG-DbVt0v29.js} +1 -1
- package/dist/assets/{layout-BmbfFZKy.js → layout-W_tRx4UV.js} +1 -1
- package/dist/assets/{linear-WZnF-PT6.js → linear-CcMb2ay-.js} +1 -1
- package/dist/assets/{mermaid-O7DHMXV3-D-2fQRvw.js → mermaid-O7DHMXV3-BBJqt8pT.js} +6 -6
- package/dist/assets/{mindmap-definition-YRQLILUH-BQHnzzud.js → mindmap-definition-YRQLILUH-BGhZa7Na.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-uxjlAy1t.js → pieDiagram-SKSYHLDU-CDyJaACv.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-DpwZU-f_.js → quadrantDiagram-337W2JSQ-BSYuqf0Q.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-C_9ClOWm.js → requirementDiagram-Z7DCOOCP-Cfi9YX9H.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-2-FHHM-R.js → sankeyDiagram-WA2Y5GQK-Di1ShaMF.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-egns-0XI.js → sequenceDiagram-2WXFIKYE-CYTTG38e.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-DoW8U53H.js → stateDiagram-RAJIS63D-CVZYMqyW.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-Bbl0b4-i.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-chPa8ppH.js → timeline-definition-YZTLITO2-B1sdb5mK.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-ajdAP-72.js → treemap-KZPCXAKY-CGG4gx3C.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-C9If0AT0.js → vennDiagram-LZ73GAT5-Dds37L2k.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-DD42U6Or.js → xychartDiagram-JWTSCODW-C8QKSyRR.js} +1 -1
- package/dist/favicon.png +0 -0
- package/dist/icons/icon-128x128.png +0 -0
- package/dist/icons/icon-144x144.png +0 -0
- package/dist/icons/icon-152x152.png +0 -0
- package/dist/icons/icon-192x192.png +0 -0
- package/dist/icons/icon-384x384.png +0 -0
- package/dist/icons/icon-512x512.png +0 -0
- package/dist/icons/icon-72x72.png +0 -0
- package/dist/icons/icon-96x96.png +0 -0
- package/dist/index.html +2 -3
- package/dist/logo-128.png +0 -0
- package/dist/logo-256.png +0 -0
- package/dist/logo-32.png +0 -0
- package/dist/logo-512.png +0 -0
- package/dist/logo-64.png +0 -0
- package/package.json +1 -1
- package/server/cli.js +7 -3
- package/server/external-agent/service.js +25 -0
- package/server/index.js +7 -2
- package/server/routes/codex.js +5 -5
- package/server/routes/mcp.js +18 -34
- package/server/session-core/providerDiscovery.js +2 -2
- package/server/utils/codexPath.js +3 -1
- package/server/utils/spawnCommand.js +7 -0
- package/dist/assets/App-BxazfNJn.js +0 -484
- package/dist/assets/channel-Cj8xVD0X.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-CI2zklxw.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-CI2zklxw.js +0 -1
- package/dist/assets/clone-BEVqubrI.js +0 -1
- package/dist/assets/index-BFX9lxRB.css +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-BoFZZ4Ds.js +0 -1
package/server/routes/mcp.js
CHANGED
|
@@ -2,13 +2,9 @@ import express from 'express';
|
|
|
2
2
|
import { promises as fs } from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import os from 'os';
|
|
5
|
-
import {
|
|
6
|
-
import { dirname } from 'path';
|
|
7
|
-
import { spawn } from 'child_process';
|
|
5
|
+
import { spawnCommand } from '../utils/spawnCommand.js';
|
|
8
6
|
|
|
9
7
|
const router = express.Router();
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = dirname(__filename);
|
|
12
8
|
|
|
13
9
|
// Claude CLI command routes
|
|
14
10
|
|
|
@@ -16,12 +12,8 @@ const __dirname = dirname(__filename);
|
|
|
16
12
|
router.get('/cli/list', async (req, res) => {
|
|
17
13
|
try {
|
|
18
14
|
console.log('📋 Listing MCP servers using Claude CLI');
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const { promisify } = await import('util');
|
|
22
|
-
const exec = promisify(spawn);
|
|
23
|
-
|
|
24
|
-
const process = spawn('claude', ['mcp', 'list'], {
|
|
15
|
+
|
|
16
|
+
const process = spawnCommand('claude', ['mcp', 'list'], {
|
|
25
17
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
26
18
|
});
|
|
27
19
|
|
|
@@ -59,11 +51,9 @@ router.get('/cli/list', async (req, res) => {
|
|
|
59
51
|
router.post('/cli/add', async (req, res) => {
|
|
60
52
|
try {
|
|
61
53
|
const { name, type = 'stdio', command, args = [], url, headers = {}, env = {}, scope = 'user', projectPath } = req.body;
|
|
62
|
-
|
|
54
|
+
|
|
63
55
|
console.log(`➕ Adding MCP server using Claude CLI (${scope} scope):`, name);
|
|
64
|
-
|
|
65
|
-
const { spawn } = await import('child_process');
|
|
66
|
-
|
|
56
|
+
|
|
67
57
|
let cliArgs = ['mcp', 'add'];
|
|
68
58
|
|
|
69
59
|
// Add scope flag
|
|
@@ -105,8 +95,8 @@ router.post('/cli/add', async (req, res) => {
|
|
|
105
95
|
spawnOptions.cwd = projectPath;
|
|
106
96
|
console.log('📁 Running in project directory:', projectPath);
|
|
107
97
|
}
|
|
108
|
-
|
|
109
|
-
const process =
|
|
98
|
+
|
|
99
|
+
const process = spawnCommand('claude', cliArgs, spawnOptions);
|
|
110
100
|
|
|
111
101
|
let stdout = '';
|
|
112
102
|
let stderr = '';
|
|
@@ -142,9 +132,9 @@ router.post('/cli/add', async (req, res) => {
|
|
|
142
132
|
router.post('/cli/add-json', async (req, res) => {
|
|
143
133
|
try {
|
|
144
134
|
const { name, jsonConfig, scope = 'user', projectPath } = req.body;
|
|
145
|
-
|
|
135
|
+
|
|
146
136
|
console.log('➕ Adding MCP server using JSON format:', name);
|
|
147
|
-
|
|
137
|
+
|
|
148
138
|
// Validate and parse JSON config
|
|
149
139
|
let parsedConfig;
|
|
150
140
|
try {
|
|
@@ -178,8 +168,6 @@ router.post('/cli/add-json', async (req, res) => {
|
|
|
178
168
|
});
|
|
179
169
|
}
|
|
180
170
|
|
|
181
|
-
const { spawn } = await import('child_process');
|
|
182
|
-
|
|
183
171
|
// Build the command: claude mcp add-json --scope <scope> <name> '<json>'
|
|
184
172
|
const cliArgs = ['mcp', 'add-json', '--scope', scope, name];
|
|
185
173
|
|
|
@@ -198,8 +186,8 @@ router.post('/cli/add-json', async (req, res) => {
|
|
|
198
186
|
spawnOptions.cwd = projectPath;
|
|
199
187
|
console.log('📁 Running in project directory:', projectPath);
|
|
200
188
|
}
|
|
201
|
-
|
|
202
|
-
const process =
|
|
189
|
+
|
|
190
|
+
const process = spawnCommand('claude', cliArgs, spawnOptions);
|
|
203
191
|
|
|
204
192
|
let stdout = '';
|
|
205
193
|
let stderr = '';
|
|
@@ -247,11 +235,9 @@ router.delete('/cli/remove/:name', async (req, res) => {
|
|
|
247
235
|
actualName = serverName;
|
|
248
236
|
actualScope = actualScope || prefix; // Use prefix as scope if not provided in query
|
|
249
237
|
}
|
|
250
|
-
|
|
238
|
+
|
|
251
239
|
console.log('🗑️ Removing MCP server using Claude CLI:', actualName, 'scope:', actualScope);
|
|
252
|
-
|
|
253
|
-
const { spawn } = await import('child_process');
|
|
254
|
-
|
|
240
|
+
|
|
255
241
|
// Build command args based on scope
|
|
256
242
|
let cliArgs = ['mcp', 'remove'];
|
|
257
243
|
|
|
@@ -267,7 +253,7 @@ router.delete('/cli/remove/:name', async (req, res) => {
|
|
|
267
253
|
|
|
268
254
|
console.log('🔧 Running Claude CLI command:', 'claude', cliArgs.join(' '));
|
|
269
255
|
|
|
270
|
-
const process =
|
|
256
|
+
const process = spawnCommand('claude', cliArgs, {
|
|
271
257
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
272
258
|
});
|
|
273
259
|
|
|
@@ -305,12 +291,10 @@ router.delete('/cli/remove/:name', async (req, res) => {
|
|
|
305
291
|
router.get('/cli/get/:name', async (req, res) => {
|
|
306
292
|
try {
|
|
307
293
|
const { name } = req.params;
|
|
308
|
-
|
|
294
|
+
|
|
309
295
|
console.log('📄 Getting MCP server details using Claude CLI:', name);
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
const process = spawn('claude', ['mcp', 'get', name], {
|
|
296
|
+
|
|
297
|
+
const process = spawnCommand('claude', ['mcp', 'get', name], {
|
|
314
298
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
315
299
|
});
|
|
316
300
|
|
|
@@ -549,4 +533,4 @@ function parseClaudeGetOutput(output) {
|
|
|
549
533
|
}
|
|
550
534
|
}
|
|
551
535
|
|
|
552
|
-
export default router;
|
|
536
|
+
export default router;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { spawn } from 'child_process';
|
|
2
1
|
import { promises as fs } from 'fs';
|
|
3
2
|
import path from 'path';
|
|
4
3
|
import os from 'os';
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
checkOpencodeCredentials
|
|
11
10
|
} from '../routes/cli-auth.js';
|
|
12
11
|
import { listOpencodeModels } from '../opencode-cli.js';
|
|
12
|
+
import { spawnCommand } from '../utils/spawnCommand.js';
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_MODELS,
|
|
15
15
|
CODEX_MODELS, GEMINI_MODELS,
|
|
@@ -36,7 +36,7 @@ function runCommand(command, args = [], options = {}) {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
try {
|
|
39
|
-
child =
|
|
39
|
+
child = spawnCommand(command, args, {
|
|
40
40
|
cwd: options.cwd || process.cwd(),
|
|
41
41
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
42
42
|
env: { ...process.env, ...(options.env || {}) }
|
|
@@ -45,7 +45,9 @@ export function getBundledCodexPath() {
|
|
|
45
45
|
|
|
46
46
|
export function getCodexPathOverride() {
|
|
47
47
|
if (process.platform === 'win32') {
|
|
48
|
-
|
|
48
|
+
// The SDK uses child_process.spawn() directly. Handing it a .cmd wrapper
|
|
49
|
+
// is brittle on Windows, so point it at the bundled executable instead.
|
|
50
|
+
return getBundledCodexPath();
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
return path.join(__dirname, '..', 'bin', 'codex-sdk-wrapper.js');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { spawn as nodeSpawn } from 'child_process';
|
|
2
|
+
import crossSpawn from 'cross-spawn';
|
|
3
|
+
|
|
4
|
+
export function spawnCommand(command, args = [], options = {}) {
|
|
5
|
+
const spawnImpl = process.platform === 'win32' ? crossSpawn : nodeSpawn;
|
|
6
|
+
return spawnImpl(command, args, options);
|
|
7
|
+
}
|