@memnexus-ai/cli 1.7.45 → 1.7.47

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.
@@ -5,7 +5,8 @@
5
5
  * ~/.memnexus/config.json (stored by `mx auth login`), so no secrets
6
6
  * appear in agent MCP config files.
7
7
  *
8
- * All diagnostic logging goes to stderr stdout is the MCP protocol channel.
8
+ * All diagnostic logging goes to stderr AND a persistent log file at
9
+ * ~/.memnexus/logs/mcp-bridge.log. Use `mx mcp logs` to view.
9
10
  */
10
11
  import { Command } from 'commander';
11
12
  export declare function registerMcpCommands(program: Command): void;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAU1D"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoB1D"}
@@ -6,7 +6,8 @@
6
6
  * ~/.memnexus/config.json (stored by `mx auth login`), so no secrets
7
7
  * appear in agent MCP config files.
8
8
  *
9
- * All diagnostic logging goes to stderr stdout is the MCP protocol channel.
9
+ * All diagnostic logging goes to stderr AND a persistent log file at
10
+ * ~/.memnexus/logs/mcp-bridge.log. Use `mx mcp logs` to view.
10
11
  */
11
12
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
12
13
  if (k2 === undefined) k2 = k;
@@ -41,10 +42,28 @@ var __importStar = (this && this.__importStar) || (function () {
41
42
  return result;
42
43
  };
43
44
  })();
45
+ var __importDefault = (this && this.__importDefault) || function (mod) {
46
+ return (mod && mod.__esModule) ? mod : { "default": mod };
47
+ };
44
48
  Object.defineProperty(exports, "__esModule", { value: true });
45
49
  exports.registerMcpCommands = registerMcpCommands;
50
+ const node_fs_1 = require("node:fs");
51
+ const promises_1 = require("node:fs/promises");
52
+ const node_path_1 = __importDefault(require("node:path"));
53
+ const node_os_1 = __importDefault(require("node:os"));
46
54
  const config_1 = require("../lib/config");
55
+ const package_json_1 = __importDefault(require("../../package.json"));
47
56
  const DEFAULT_MCP_URL = 'https://mcp.memnexus.ai/mcp';
57
+ /** Directory for MCP bridge logs. */
58
+ function getLogDir() {
59
+ return node_path_1.default.join(node_os_1.default.homedir(), '.memnexus', 'logs');
60
+ }
61
+ /** Path to the MCP bridge log file. */
62
+ function getLogPath() {
63
+ return node_path_1.default.join(getLogDir(), 'mcp-bridge.log');
64
+ }
65
+ /** Max log file size before rotation (1 MB). */
66
+ const MAX_LOG_SIZE = 1024 * 1024;
48
67
  function registerMcpCommands(program) {
49
68
  const mcp = program.command('mcp').description('MCP bridge commands');
50
69
  mcp
@@ -54,6 +73,60 @@ function registerMcpCommands(program) {
54
73
  .action(async (opts) => {
55
74
  await serve(opts.url);
56
75
  });
76
+ mcp
77
+ .command('logs')
78
+ .description('Show MCP bridge log file location and recent output')
79
+ .option('-n, --lines <count>', 'Number of lines to show', '50')
80
+ .option('-f, --follow', 'Follow log output (like tail -f)')
81
+ .option('--path', 'Only print the log file path')
82
+ .action(async (opts) => {
83
+ await showLogs(opts);
84
+ });
85
+ }
86
+ /**
87
+ * Format an error with its cause chain for diagnostic logging.
88
+ * Node.js fetch errors (undici) put the real error in `error.cause`.
89
+ */
90
+ function formatError(err) {
91
+ if (!(err instanceof Error))
92
+ return String(err);
93
+ let msg = err.message;
94
+ const cause = err.cause;
95
+ if (cause instanceof Error) {
96
+ msg += ` — ${cause.message}`;
97
+ if ('code' in cause)
98
+ msg += ` (${cause.code})`;
99
+ }
100
+ return msg;
101
+ }
102
+ /**
103
+ * Create a logger that writes to both stderr and a persistent log file.
104
+ * The log file is at ~/.memnexus/logs/mcp-bridge.log with simple rotation.
105
+ */
106
+ async function createLogger() {
107
+ const logDir = getLogDir();
108
+ const logPath = getLogPath();
109
+ await (0, promises_1.mkdir)(logDir, { recursive: true });
110
+ // Simple rotation: if the log file exceeds MAX_LOG_SIZE, rename to .old
111
+ try {
112
+ if ((0, node_fs_1.existsSync)(logPath)) {
113
+ const stats = (0, node_fs_1.statSync)(logPath);
114
+ if (stats.size > MAX_LOG_SIZE) {
115
+ const { rename } = await Promise.resolve().then(() => __importStar(require('node:fs/promises')));
116
+ await rename(logPath, logPath + '.old');
117
+ }
118
+ }
119
+ }
120
+ catch {
121
+ // Rotation is best-effort; don't fail the bridge
122
+ }
123
+ const stream = (0, node_fs_1.createWriteStream)(logPath, { flags: 'a' });
124
+ return (msg) => {
125
+ const timestamp = new Date().toISOString();
126
+ const line = `${timestamp} ${msg}`;
127
+ process.stderr.write(`[mx mcp] ${msg}\n`);
128
+ stream.write(line + '\n');
129
+ };
57
130
  }
58
131
  async function serve(mcpUrl) {
59
132
  // Resolve API key
@@ -62,44 +135,83 @@ async function serve(mcpUrl) {
62
135
  process.stderr.write('Error: No API key configured. Run `mx auth login` first.\n');
63
136
  process.exit(1);
64
137
  }
65
- const log = (msg) => process.stderr.write(`[mx mcp] ${msg}\n`);
138
+ const log = await createLogger();
139
+ log(`Bridge starting — mx-cli v${package_json_1.default.version}, node ${process.version}, ${process.platform}`);
140
+ log(`Log file: ${getLogPath()}`);
66
141
  log(`Connecting to ${mcpUrl}`);
67
142
  // Dynamic imports — keeps the MCP SDK out of the main CLI bundle
68
143
  // unless this command is actually invoked.
69
144
  const { StdioServerTransport } = await Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/server/stdio.js')));
70
145
  const { StreamableHTTPClientTransport } = await Promise.resolve().then(() => __importStar(require('@modelcontextprotocol/sdk/client/streamableHttp.js')));
146
+ // Build the X-MX-Client analytics header value
147
+ const agentInfo = config_1.config.detectAIAgent();
148
+ const agentName = agentInfo.detected ? agentInfo.agent : 'mcp-bridge';
149
+ const mxClient = [
150
+ `mx-cli/${package_json_1.default.version}`,
151
+ `os=${process.platform}`,
152
+ `node=${process.version}`,
153
+ `agent=${agentName}`,
154
+ ].join(' ');
155
+ // Custom fetch wrapper that adds our headers non-destructively.
156
+ // The global fetch (index.ts) is monkey-patched to inject X-MX-Client,
157
+ // but that wrapper creates new Headers(init?.headers) which can lose
158
+ // headers when the SDK passes them on a Request object or omits init.
159
+ // This wrapper preserves existing headers and only adds missing ones.
160
+ const mcpFetch = (input, init) => {
161
+ const headers = new Headers(init?.headers);
162
+ // Also copy headers from Request object if input is a Request
163
+ if (input instanceof Request) {
164
+ input.headers.forEach((value, key) => {
165
+ if (!headers.has(key))
166
+ headers.set(key, value);
167
+ });
168
+ }
169
+ if (!headers.has('Authorization')) {
170
+ headers.set('Authorization', `Bearer ${apiKey}`);
171
+ }
172
+ if (!headers.has('X-MX-Client')) {
173
+ headers.set('X-MX-Client', mxClient);
174
+ }
175
+ return globalThis.fetch(input, { ...init, headers });
176
+ };
71
177
  // stdio side — reads JSON-RPC from the agent on stdin, writes to stdout
72
178
  const stdio = new StdioServerTransport();
73
- // HTTP side — connects to the remote MCP server with auth header
179
+ // HTTP side — connects to the remote MCP server with auth + analytics headers
74
180
  const http = new StreamableHTTPClientTransport(new URL(mcpUrl), {
75
181
  requestInit: {
76
182
  headers: {
77
183
  Authorization: `Bearer ${apiKey}`,
184
+ 'X-MX-Client': mxClient,
78
185
  },
79
186
  },
187
+ fetch: mcpFetch,
80
188
  });
81
189
  // Wire the two transports together as a raw message pipe:
82
190
  // Agent stdin → stdio.onmessage → http.send() → HTTP server
83
191
  // HTTP server → http.onmessage → stdio.send() → Agent stdout
84
192
  stdio.onmessage = (message) => {
85
193
  http.send(message).catch((err) => {
86
- log(`Error forwarding to server: ${err.message}`);
194
+ log(`Error forwarding to server: ${formatError(err)}`);
87
195
  });
88
196
  };
89
197
  http.onmessage = (message) => {
90
198
  stdio.send(message).catch((err) => {
91
- log(`Error forwarding to agent: ${err.message}`);
199
+ log(`Error forwarding to agent: ${formatError(err)}`);
92
200
  });
93
201
  };
94
202
  // Error handlers
95
203
  stdio.onerror = (error) => {
96
- log(`stdio error: ${error.message}`);
204
+ log(`stdio error: ${formatError(error)}`);
97
205
  };
98
206
  http.onerror = (error) => {
99
- log(`HTTP error: ${error.message}`);
207
+ log(`HTTP error: ${formatError(error)}`);
100
208
  };
101
209
  // Close handlers — shut down both sides when either closes
210
+ let shuttingDown = false;
102
211
  const shutdown = async () => {
212
+ if (shuttingDown)
213
+ return;
214
+ shuttingDown = true;
103
215
  log('Shutting down...');
104
216
  await Promise.allSettled([stdio.close(), http.close()]);
105
217
  process.exit(0);
@@ -119,8 +231,43 @@ async function serve(mcpUrl) {
119
231
  log('Bridge active');
120
232
  }
121
233
  catch (err) {
122
- log(`Failed to start: ${err.message}`);
234
+ log(`Failed to start: ${formatError(err)}`);
123
235
  process.exit(1);
124
236
  }
125
237
  }
238
+ async function showLogs(opts) {
239
+ const logPath = getLogPath();
240
+ if (opts.path) {
241
+ console.log(logPath);
242
+ return;
243
+ }
244
+ console.log(`Log file: ${logPath}\n`);
245
+ if (!(0, node_fs_1.existsSync)(logPath)) {
246
+ console.log('No log file found. The log is created when `mx mcp serve` runs.');
247
+ return;
248
+ }
249
+ const lineCount = parseInt(opts.lines, 10) || 50;
250
+ if (opts.follow) {
251
+ // tail -f mode — use child_process to stream
252
+ const { spawn } = await Promise.resolve().then(() => __importStar(require('node:child_process')));
253
+ const tailCmd = process.platform === 'win32' ? 'powershell' : 'tail';
254
+ const tailArgs = process.platform === 'win32'
255
+ ? ['-Command', `Get-Content -Path '${logPath}' -Tail ${lineCount} -Wait`]
256
+ : ['-n', String(lineCount), '-f', logPath];
257
+ const child = spawn(tailCmd, tailArgs, { stdio: 'inherit' });
258
+ child.on('error', (err) => {
259
+ console.error(`Failed to tail log: ${err.message}`);
260
+ process.exit(1);
261
+ });
262
+ // Forward signals to child
263
+ process.on('SIGINT', () => child.kill());
264
+ process.on('SIGTERM', () => child.kill());
265
+ return;
266
+ }
267
+ // Show last N lines
268
+ const content = await (0, promises_1.readFile)(logPath, 'utf-8');
269
+ const lines = content.trimEnd().split('\n');
270
+ const tail = lines.slice(-lineCount);
271
+ console.log(tail.join('\n'));
272
+ }
126
273
  //# sourceMappingURL=mcp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/commands/mcp.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOH,kDAUC;AAdD,0CAAuC;AAEvC,MAAM,eAAe,GAAG,6BAA6B,CAAC;AAEtD,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAEtE,GAAG;SACA,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,iDAAiD,CAAC;SAC9D,MAAM,CAAC,aAAa,EAAE,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,eAAe,CAAC;SAClF,MAAM,CAAC,KAAK,EAAE,IAAqB,EAAE,EAAE;QACtC,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC;AAED,KAAK,UAAU,KAAK,CAAC,MAAc;IACjC,kBAAkB;IAClB,MAAM,MAAM,GAAG,eAAM,CAAC,SAAS,EAAE,CAAC;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACnF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,E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I,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memnexus-ai/cli",
3
- "version": "1.7.45",
3
+ "version": "1.7.47",
4
4
  "description": "Command-line interface for MemNexus Core API",
5
5
  "main": "dist/index.js",
6
6
  "bin": {