@defai.digital/ax-cli 4.1.11 → 4.1.15
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/.ax-cli/settings.json +1 -0
- package/README.md +140 -589
- package/bin/ax-cli +6 -0
- package/dist/agent/dependency-resolver.d.ts +7 -0
- package/dist/agent/dependency-resolver.js +46 -18
- package/dist/agent/dependency-resolver.js.map +1 -1
- package/dist/agent/execution/tool-executor.d.ts +4 -0
- package/dist/agent/execution/tool-executor.js +76 -52
- package/dist/agent/execution/tool-executor.js.map +1 -1
- package/dist/agent/parallel-tools.d.ts +4 -0
- package/dist/agent/parallel-tools.js +65 -24
- package/dist/agent/parallel-tools.js.map +1 -1
- package/dist/agent/planning/plan-executor.d.ts +0 -5
- package/dist/agent/planning/plan-executor.js +23 -6
- package/dist/agent/planning/plan-executor.js.map +1 -1
- package/dist/agent/streaming/stream-handler.js +7 -4
- package/dist/agent/streaming/stream-handler.js.map +1 -1
- package/dist/agent/subagent-orchestrator.d.ts +35 -2
- package/dist/agent/subagent-orchestrator.js +188 -146
- package/dist/agent/subagent-orchestrator.js.map +1 -1
- package/dist/agent/subagent-types.js +3 -1
- package/dist/agent/subagent-types.js.map +1 -1
- package/dist/agent/subagent.d.ts +15 -4
- package/dist/agent/subagent.js +91 -72
- package/dist/agent/subagent.js.map +1 -1
- package/dist/design/figma-alias.d.ts +77 -0
- package/dist/design/figma-alias.js +246 -0
- package/dist/design/figma-alias.js.map +1 -1
- package/dist/design/figma-client.d.ts +4 -0
- package/dist/design/figma-client.js +24 -4
- package/dist/design/figma-client.js.map +1 -1
- package/dist/design/figma-map.js +78 -6
- package/dist/design/figma-map.js.map +1 -1
- package/dist/design/figma-tokens.js +6 -2
- package/dist/design/figma-tokens.js.map +1 -1
- package/dist/design/index.d.ts +1 -1
- package/dist/design/index.js +3 -1
- package/dist/design/index.js.map +1 -1
- package/dist/design/types.d.ts +9 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/client-v2.js +4 -0
- package/dist/mcp/client-v2.js.map +1 -1
- package/dist/mcp/config-detector.js +3 -4
- package/dist/mcp/config-detector.js.map +1 -1
- package/dist/mcp/debug.d.ts +207 -0
- package/dist/mcp/debug.js +398 -0
- package/dist/mcp/debug.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +4 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/reconnection.js +6 -3
- package/dist/mcp/reconnection.js.map +1 -1
- package/dist/mcp/validation.js +15 -6
- package/dist/mcp/validation.js.map +1 -1
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.js +2 -0
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/provider-context-store.d.ts +127 -0
- package/dist/memory/provider-context-store.js +385 -0
- package/dist/memory/provider-context-store.js.map +1 -0
- package/dist/sdk/errors.d.ts +2 -0
- package/dist/sdk/errors.js +2 -0
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.d.ts +633 -62
- package/dist/sdk/index.js +854 -116
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +46 -4
- package/dist/sdk/testing.js +58 -6
- package/dist/sdk/testing.js.map +1 -1
- package/dist/sdk/version.d.ts +13 -9
- package/dist/sdk/version.js +13 -9
- package/dist/sdk/version.js.map +1 -1
- package/dist/utils/file-lock.d.ts +141 -0
- package/dist/utils/file-lock.js +559 -0
- package/dist/utils/file-lock.js.map +1 -0
- package/dist/utils/provider-context.d.ts +243 -0
- package/dist/utils/provider-context.js +421 -0
- package/dist/utils/provider-context.js.map +1 -0
- package/dist/utils/provider-file-cache.d.ts +91 -0
- package/dist/utils/provider-file-cache.js +165 -0
- package/dist/utils/provider-file-cache.js.map +1 -0
- package/dist/utils/provider-settings.d.ts +181 -0
- package/dist/utils/provider-settings.js +450 -0
- package/dist/utils/provider-settings.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Debug Mode
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive diagnostic utilities for troubleshooting MCP server connections,
|
|
5
|
+
* tool calls, and configuration issues.
|
|
6
|
+
*
|
|
7
|
+
* @module mcp/debug
|
|
8
|
+
*/
|
|
9
|
+
import { EventEmitter } from 'events';
|
|
10
|
+
import type { ServerName, ToolName, ConnectionState, MCPTool, MCPPrompt } from './client-v2.js';
|
|
11
|
+
import type { TransportType } from './transports.js';
|
|
12
|
+
import { Result } from './type-safety.js';
|
|
13
|
+
/**
|
|
14
|
+
* Types of debug events that can be emitted
|
|
15
|
+
*/
|
|
16
|
+
export type DebugEventType = 'connection:start' | 'connection:success' | 'connection:failure' | 'connection:disconnect' | 'tool:call:start' | 'tool:call:success' | 'tool:call:failure' | 'tool:call:timeout' | 'transport:created' | 'transport:error' | 'health:check' | 'health:failure' | 'reconnection:scheduled' | 'reconnection:attempt' | 'reconnection:success' | 'reconnection:failure' | 'schema:validation' | 'resource:updated' | 'progress:update';
|
|
17
|
+
/**
|
|
18
|
+
* Debug event structure
|
|
19
|
+
*/
|
|
20
|
+
export interface DebugEvent {
|
|
21
|
+
type: DebugEventType;
|
|
22
|
+
timestamp: Date;
|
|
23
|
+
serverName?: ServerName;
|
|
24
|
+
toolName?: ToolName;
|
|
25
|
+
data: Record<string, unknown>;
|
|
26
|
+
duration?: number;
|
|
27
|
+
error?: Error;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Server diagnostic information
|
|
31
|
+
*/
|
|
32
|
+
export interface ServerDiagnostics {
|
|
33
|
+
serverName: ServerName;
|
|
34
|
+
status: ConnectionState['status'];
|
|
35
|
+
transportType?: TransportType;
|
|
36
|
+
connectedAt?: number;
|
|
37
|
+
failedAt?: number;
|
|
38
|
+
lastError?: string;
|
|
39
|
+
toolCount: number;
|
|
40
|
+
tools: string[];
|
|
41
|
+
promptCount: number;
|
|
42
|
+
prompts: string[];
|
|
43
|
+
reconnectionAttempts: number;
|
|
44
|
+
healthCheckStatus?: 'healthy' | 'unhealthy' | 'unknown';
|
|
45
|
+
lastHealthCheck?: Date;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Overall MCP diagnostic summary
|
|
49
|
+
*/
|
|
50
|
+
export interface MCPDiagnostics {
|
|
51
|
+
timestamp: Date;
|
|
52
|
+
totalServers: number;
|
|
53
|
+
connectedServers: number;
|
|
54
|
+
failedServers: number;
|
|
55
|
+
connectingServers: number;
|
|
56
|
+
totalTools: number;
|
|
57
|
+
totalPrompts: number;
|
|
58
|
+
servers: ServerDiagnostics[];
|
|
59
|
+
recentEvents: DebugEvent[];
|
|
60
|
+
healthCheckEnabled: boolean;
|
|
61
|
+
reconnectionEnabled: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Debug log level
|
|
65
|
+
*/
|
|
66
|
+
export type DebugLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
|
67
|
+
/**
|
|
68
|
+
* Debug logger configuration
|
|
69
|
+
*/
|
|
70
|
+
export interface DebugLoggerConfig {
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
level: DebugLogLevel;
|
|
73
|
+
maxEvents: number;
|
|
74
|
+
includeTimestamps: boolean;
|
|
75
|
+
formatOutput: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Default debug logger configuration
|
|
79
|
+
*/
|
|
80
|
+
export declare const DEFAULT_DEBUG_CONFIG: DebugLoggerConfig;
|
|
81
|
+
/**
|
|
82
|
+
* MCP Debug Logger
|
|
83
|
+
*
|
|
84
|
+
* Captures and formats debug events for MCP operations.
|
|
85
|
+
* Can be enabled/disabled at runtime.
|
|
86
|
+
*/
|
|
87
|
+
export declare class MCPDebugLogger extends EventEmitter {
|
|
88
|
+
private config;
|
|
89
|
+
private events;
|
|
90
|
+
private serverHealthStatus;
|
|
91
|
+
constructor(config?: Partial<DebugLoggerConfig>);
|
|
92
|
+
/**
|
|
93
|
+
* Enable debug mode
|
|
94
|
+
*/
|
|
95
|
+
enable(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Disable debug mode
|
|
98
|
+
*/
|
|
99
|
+
disable(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Check if debug mode is enabled
|
|
102
|
+
*/
|
|
103
|
+
isEnabled(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Set debug level
|
|
106
|
+
*/
|
|
107
|
+
setLevel(level: DebugLogLevel): void;
|
|
108
|
+
/**
|
|
109
|
+
* Log a debug event
|
|
110
|
+
*/
|
|
111
|
+
log(type: DebugEventType, data: Record<string, unknown>, options?: {
|
|
112
|
+
serverName?: ServerName;
|
|
113
|
+
toolName?: ToolName;
|
|
114
|
+
duration?: number;
|
|
115
|
+
error?: Error;
|
|
116
|
+
}): void;
|
|
117
|
+
/**
|
|
118
|
+
* Check if event type should be logged at current level
|
|
119
|
+
*/
|
|
120
|
+
private shouldLog;
|
|
121
|
+
/**
|
|
122
|
+
* Get log level for event type
|
|
123
|
+
*/
|
|
124
|
+
private getEventLevel;
|
|
125
|
+
/**
|
|
126
|
+
* Format and output an event
|
|
127
|
+
*/
|
|
128
|
+
private outputEvent;
|
|
129
|
+
/**
|
|
130
|
+
* Record health check result
|
|
131
|
+
*/
|
|
132
|
+
recordHealthCheck(serverName: ServerName, healthy: boolean): void;
|
|
133
|
+
/**
|
|
134
|
+
* Get recent events
|
|
135
|
+
*/
|
|
136
|
+
getRecentEvents(count?: number): DebugEvent[];
|
|
137
|
+
/**
|
|
138
|
+
* Get events for a specific server
|
|
139
|
+
*/
|
|
140
|
+
getServerEvents(serverName: ServerName): DebugEvent[];
|
|
141
|
+
/**
|
|
142
|
+
* Get events for a specific tool
|
|
143
|
+
*/
|
|
144
|
+
getToolEvents(toolName: ToolName): DebugEvent[];
|
|
145
|
+
/**
|
|
146
|
+
* Get events by type
|
|
147
|
+
*/
|
|
148
|
+
getEventsByType(type: DebugEventType): DebugEvent[];
|
|
149
|
+
/**
|
|
150
|
+
* Get health status for a server
|
|
151
|
+
*/
|
|
152
|
+
getHealthStatus(serverName: ServerName): {
|
|
153
|
+
status: 'healthy' | 'unhealthy' | 'unknown';
|
|
154
|
+
lastCheck?: Date;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Clear all recorded events
|
|
158
|
+
*/
|
|
159
|
+
clearEvents(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Clear health status
|
|
162
|
+
*/
|
|
163
|
+
clearHealthStatus(): void;
|
|
164
|
+
/**
|
|
165
|
+
* Get configuration
|
|
166
|
+
*/
|
|
167
|
+
getConfig(): DebugLoggerConfig;
|
|
168
|
+
/**
|
|
169
|
+
* Update configuration
|
|
170
|
+
*/
|
|
171
|
+
updateConfig(config: Partial<DebugLoggerConfig>): void;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Get the singleton debug logger instance
|
|
175
|
+
*/
|
|
176
|
+
export declare function getMCPDebugLogger(): MCPDebugLogger;
|
|
177
|
+
/**
|
|
178
|
+
* Reset the debug logger instance (for testing)
|
|
179
|
+
*/
|
|
180
|
+
export declare function resetMCPDebugLogger(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Collect diagnostics from MCPManagerV2
|
|
183
|
+
*
|
|
184
|
+
* @param manager - The MCP manager instance
|
|
185
|
+
* @returns Diagnostic summary
|
|
186
|
+
*/
|
|
187
|
+
export declare function collectMCPDiagnostics(manager: {
|
|
188
|
+
getServers(): ServerName[];
|
|
189
|
+
getConnectionState(serverName: ServerName): ConnectionState | undefined;
|
|
190
|
+
getTools(): MCPTool[];
|
|
191
|
+
getPrompts(): MCPPrompt[];
|
|
192
|
+
getTransportType(serverName: ServerName): Result<TransportType, Error>;
|
|
193
|
+
getConnectionStatus(): {
|
|
194
|
+
connected: number;
|
|
195
|
+
failed: number;
|
|
196
|
+
connecting: number;
|
|
197
|
+
total: number;
|
|
198
|
+
};
|
|
199
|
+
}): Promise<MCPDiagnostics>;
|
|
200
|
+
/**
|
|
201
|
+
* Format diagnostics for display
|
|
202
|
+
*/
|
|
203
|
+
export declare function formatMCPDiagnostics(diagnostics: MCPDiagnostics): string;
|
|
204
|
+
/**
|
|
205
|
+
* Create a debug session that instruments MCP manager events
|
|
206
|
+
*/
|
|
207
|
+
export declare function createDebugSession(manager: EventEmitter, options?: Partial<DebugLoggerConfig>): MCPDebugLogger;
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Debug Mode
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive diagnostic utilities for troubleshooting MCP server connections,
|
|
5
|
+
* tool calls, and configuration issues.
|
|
6
|
+
*
|
|
7
|
+
* @module mcp/debug
|
|
8
|
+
*/
|
|
9
|
+
import { EventEmitter } from 'events';
|
|
10
|
+
/**
|
|
11
|
+
* Default debug logger configuration
|
|
12
|
+
*/
|
|
13
|
+
export const DEFAULT_DEBUG_CONFIG = {
|
|
14
|
+
enabled: false,
|
|
15
|
+
level: 'info',
|
|
16
|
+
maxEvents: 100,
|
|
17
|
+
includeTimestamps: true,
|
|
18
|
+
formatOutput: true,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* MCP Debug Logger
|
|
22
|
+
*
|
|
23
|
+
* Captures and formats debug events for MCP operations.
|
|
24
|
+
* Can be enabled/disabled at runtime.
|
|
25
|
+
*/
|
|
26
|
+
export class MCPDebugLogger extends EventEmitter {
|
|
27
|
+
config;
|
|
28
|
+
events = [];
|
|
29
|
+
serverHealthStatus = new Map();
|
|
30
|
+
constructor(config = {}) {
|
|
31
|
+
super();
|
|
32
|
+
this.config = { ...DEFAULT_DEBUG_CONFIG, ...config };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Enable debug mode
|
|
36
|
+
*/
|
|
37
|
+
enable() {
|
|
38
|
+
this.config.enabled = true;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Disable debug mode
|
|
42
|
+
*/
|
|
43
|
+
disable() {
|
|
44
|
+
this.config.enabled = false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if debug mode is enabled
|
|
48
|
+
*/
|
|
49
|
+
isEnabled() {
|
|
50
|
+
return this.config.enabled;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Set debug level
|
|
54
|
+
*/
|
|
55
|
+
setLevel(level) {
|
|
56
|
+
this.config.level = level;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Log a debug event
|
|
60
|
+
*/
|
|
61
|
+
log(type, data, options) {
|
|
62
|
+
if (!this.config.enabled)
|
|
63
|
+
return;
|
|
64
|
+
const event = {
|
|
65
|
+
type,
|
|
66
|
+
timestamp: new Date(),
|
|
67
|
+
data,
|
|
68
|
+
...options,
|
|
69
|
+
};
|
|
70
|
+
// Add to event buffer
|
|
71
|
+
this.events.push(event);
|
|
72
|
+
// Trim buffer if needed
|
|
73
|
+
if (this.events.length > this.config.maxEvents) {
|
|
74
|
+
this.events = this.events.slice(-this.config.maxEvents);
|
|
75
|
+
}
|
|
76
|
+
// Emit event for external listeners
|
|
77
|
+
this.emit('debug', event);
|
|
78
|
+
// Console output if enabled
|
|
79
|
+
if (this.shouldLog(type)) {
|
|
80
|
+
this.outputEvent(event);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Check if event type should be logged at current level
|
|
85
|
+
*/
|
|
86
|
+
shouldLog(type) {
|
|
87
|
+
const levelPriority = {
|
|
88
|
+
trace: 0,
|
|
89
|
+
debug: 1,
|
|
90
|
+
info: 2,
|
|
91
|
+
warn: 3,
|
|
92
|
+
error: 4,
|
|
93
|
+
};
|
|
94
|
+
const eventLevel = this.getEventLevel(type);
|
|
95
|
+
return levelPriority[eventLevel] >= levelPriority[this.config.level];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get log level for event type
|
|
99
|
+
*/
|
|
100
|
+
getEventLevel(type) {
|
|
101
|
+
if (type.includes('failure') || type.includes('error') || type.includes('timeout')) {
|
|
102
|
+
return 'error';
|
|
103
|
+
}
|
|
104
|
+
if (type.includes('health:failure')) {
|
|
105
|
+
return 'warn';
|
|
106
|
+
}
|
|
107
|
+
if (type.includes('reconnection')) {
|
|
108
|
+
return 'info';
|
|
109
|
+
}
|
|
110
|
+
if (type.includes('start') || type.includes('success')) {
|
|
111
|
+
return 'debug';
|
|
112
|
+
}
|
|
113
|
+
return 'trace';
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Format and output an event
|
|
117
|
+
*/
|
|
118
|
+
outputEvent(event) {
|
|
119
|
+
if (!this.config.formatOutput) {
|
|
120
|
+
console.log('[MCP Debug]', event);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const timestamp = this.config.includeTimestamps
|
|
124
|
+
? `[${event.timestamp.toISOString()}]`
|
|
125
|
+
: '';
|
|
126
|
+
const level = this.getEventLevel(event.type).toUpperCase().padEnd(5);
|
|
127
|
+
const serverInfo = event.serverName ? ` [${event.serverName}]` : '';
|
|
128
|
+
const toolInfo = event.toolName ? ` ${event.toolName}` : '';
|
|
129
|
+
const durationInfo = event.duration ? ` (${event.duration}ms)` : '';
|
|
130
|
+
let message = `${timestamp} ${level} ${event.type}${serverInfo}${toolInfo}${durationInfo}`;
|
|
131
|
+
if (Object.keys(event.data).length > 0) {
|
|
132
|
+
message += ` ${JSON.stringify(event.data)}`;
|
|
133
|
+
}
|
|
134
|
+
if (event.error) {
|
|
135
|
+
message += ` ERROR: ${event.error.message}`;
|
|
136
|
+
}
|
|
137
|
+
console.log(message);
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Record health check result
|
|
141
|
+
*/
|
|
142
|
+
recordHealthCheck(serverName, healthy) {
|
|
143
|
+
this.serverHealthStatus.set(serverName, {
|
|
144
|
+
status: healthy ? 'healthy' : 'unhealthy',
|
|
145
|
+
lastCheck: new Date(),
|
|
146
|
+
});
|
|
147
|
+
this.log('health:check', { healthy }, { serverName });
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get recent events
|
|
151
|
+
*/
|
|
152
|
+
getRecentEvents(count) {
|
|
153
|
+
const limit = count ?? this.config.maxEvents;
|
|
154
|
+
return this.events.slice(-limit);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get events for a specific server
|
|
158
|
+
*/
|
|
159
|
+
getServerEvents(serverName) {
|
|
160
|
+
return this.events.filter((e) => e.serverName === serverName);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Get events for a specific tool
|
|
164
|
+
*/
|
|
165
|
+
getToolEvents(toolName) {
|
|
166
|
+
return this.events.filter((e) => e.toolName === toolName);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get events by type
|
|
170
|
+
*/
|
|
171
|
+
getEventsByType(type) {
|
|
172
|
+
return this.events.filter((e) => e.type === type);
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Get health status for a server
|
|
176
|
+
*/
|
|
177
|
+
getHealthStatus(serverName) {
|
|
178
|
+
const status = this.serverHealthStatus.get(serverName);
|
|
179
|
+
if (!status) {
|
|
180
|
+
return { status: 'unknown' };
|
|
181
|
+
}
|
|
182
|
+
return status;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Clear all recorded events
|
|
186
|
+
*/
|
|
187
|
+
clearEvents() {
|
|
188
|
+
this.events = [];
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Clear health status
|
|
192
|
+
*/
|
|
193
|
+
clearHealthStatus() {
|
|
194
|
+
this.serverHealthStatus.clear();
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Get configuration
|
|
198
|
+
*/
|
|
199
|
+
getConfig() {
|
|
200
|
+
return { ...this.config };
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Update configuration
|
|
204
|
+
*/
|
|
205
|
+
updateConfig(config) {
|
|
206
|
+
this.config = { ...this.config, ...config };
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// =============================================================================
|
|
210
|
+
// Singleton Instance
|
|
211
|
+
// =============================================================================
|
|
212
|
+
let debugLoggerInstance = null;
|
|
213
|
+
/**
|
|
214
|
+
* Get the singleton debug logger instance
|
|
215
|
+
*/
|
|
216
|
+
export function getMCPDebugLogger() {
|
|
217
|
+
if (!debugLoggerInstance) {
|
|
218
|
+
debugLoggerInstance = new MCPDebugLogger();
|
|
219
|
+
}
|
|
220
|
+
return debugLoggerInstance;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Reset the debug logger instance (for testing)
|
|
224
|
+
*/
|
|
225
|
+
export function resetMCPDebugLogger() {
|
|
226
|
+
if (debugLoggerInstance) {
|
|
227
|
+
debugLoggerInstance.removeAllListeners();
|
|
228
|
+
debugLoggerInstance.clearEvents();
|
|
229
|
+
debugLoggerInstance.clearHealthStatus();
|
|
230
|
+
}
|
|
231
|
+
debugLoggerInstance = null;
|
|
232
|
+
}
|
|
233
|
+
// =============================================================================
|
|
234
|
+
// Diagnostic Utilities
|
|
235
|
+
// =============================================================================
|
|
236
|
+
/**
|
|
237
|
+
* Collect diagnostics from MCPManagerV2
|
|
238
|
+
*
|
|
239
|
+
* @param manager - The MCP manager instance
|
|
240
|
+
* @returns Diagnostic summary
|
|
241
|
+
*/
|
|
242
|
+
export async function collectMCPDiagnostics(manager) {
|
|
243
|
+
const debugLogger = getMCPDebugLogger();
|
|
244
|
+
const connectionStatus = manager.getConnectionStatus();
|
|
245
|
+
const allTools = manager.getTools();
|
|
246
|
+
const allPrompts = manager.getPrompts();
|
|
247
|
+
const serverNames = manager.getServers();
|
|
248
|
+
const serverDiagnostics = [];
|
|
249
|
+
// Collect all servers (not just connected ones)
|
|
250
|
+
const allServerNames = new Set();
|
|
251
|
+
for (const tool of allTools) {
|
|
252
|
+
allServerNames.add(tool.serverName);
|
|
253
|
+
}
|
|
254
|
+
for (const serverName of serverNames) {
|
|
255
|
+
allServerNames.add(serverName);
|
|
256
|
+
}
|
|
257
|
+
for (const serverName of allServerNames) {
|
|
258
|
+
const state = manager.getConnectionState(serverName);
|
|
259
|
+
const transportResult = manager.getTransportType(serverName);
|
|
260
|
+
const serverTools = allTools.filter((t) => t.serverName === serverName);
|
|
261
|
+
const serverPrompts = allPrompts.filter((p) => p.serverName === serverName);
|
|
262
|
+
const healthStatus = debugLogger.getHealthStatus(serverName);
|
|
263
|
+
const diagnostic = {
|
|
264
|
+
serverName,
|
|
265
|
+
status: state?.status ?? 'idle',
|
|
266
|
+
transportType: transportResult.success ? transportResult.value : undefined,
|
|
267
|
+
connectedAt: state?.status === 'connected' ? state.connectedAt : undefined,
|
|
268
|
+
failedAt: state?.status === 'failed' ? state.failedAt : undefined,
|
|
269
|
+
lastError: state?.status === 'failed' ? state.error.message : undefined,
|
|
270
|
+
toolCount: serverTools.length,
|
|
271
|
+
tools: serverTools.map((t) => String(t.name)),
|
|
272
|
+
promptCount: serverPrompts.length,
|
|
273
|
+
prompts: serverPrompts.map((p) => p.name),
|
|
274
|
+
reconnectionAttempts: 0, // Would need access to private state
|
|
275
|
+
healthCheckStatus: healthStatus.status,
|
|
276
|
+
lastHealthCheck: healthStatus.lastCheck,
|
|
277
|
+
};
|
|
278
|
+
serverDiagnostics.push(diagnostic);
|
|
279
|
+
}
|
|
280
|
+
return {
|
|
281
|
+
timestamp: new Date(),
|
|
282
|
+
totalServers: connectionStatus.total,
|
|
283
|
+
connectedServers: connectionStatus.connected,
|
|
284
|
+
failedServers: connectionStatus.failed,
|
|
285
|
+
connectingServers: connectionStatus.connecting,
|
|
286
|
+
totalTools: allTools.length,
|
|
287
|
+
totalPrompts: allPrompts.length,
|
|
288
|
+
servers: serverDiagnostics,
|
|
289
|
+
recentEvents: debugLogger.getRecentEvents(20),
|
|
290
|
+
healthCheckEnabled: true, // Would need access to config
|
|
291
|
+
reconnectionEnabled: true, // Would need access to config
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Format diagnostics for display
|
|
296
|
+
*/
|
|
297
|
+
export function formatMCPDiagnostics(diagnostics) {
|
|
298
|
+
const lines = [];
|
|
299
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
300
|
+
lines.push(' MCP DIAGNOSTICS REPORT');
|
|
301
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
302
|
+
lines.push(`Timestamp: ${diagnostics.timestamp.toISOString()}`);
|
|
303
|
+
lines.push('');
|
|
304
|
+
// Summary
|
|
305
|
+
lines.push('┌─────────────────────────────────────────────────────────────┐');
|
|
306
|
+
lines.push('│ SUMMARY │');
|
|
307
|
+
lines.push('├─────────────────────────────────────────────────────────────┤');
|
|
308
|
+
lines.push(`│ Servers: ${diagnostics.connectedServers}/${diagnostics.totalServers} connected, ${diagnostics.failedServers} failed, ${diagnostics.connectingServers} connecting`);
|
|
309
|
+
lines.push(`│ Tools: ${diagnostics.totalTools} registered`);
|
|
310
|
+
lines.push(`│ Prompts: ${diagnostics.totalPrompts} available`);
|
|
311
|
+
lines.push('└─────────────────────────────────────────────────────────────┘');
|
|
312
|
+
lines.push('');
|
|
313
|
+
// Server details
|
|
314
|
+
if (diagnostics.servers.length > 0) {
|
|
315
|
+
lines.push('┌─────────────────────────────────────────────────────────────┐');
|
|
316
|
+
lines.push('│ SERVER DETAILS │');
|
|
317
|
+
lines.push('└─────────────────────────────────────────────────────────────┘');
|
|
318
|
+
for (const server of diagnostics.servers) {
|
|
319
|
+
const statusIcon = server.status === 'connected' ? '✓' : server.status === 'failed' ? '✗' : '○';
|
|
320
|
+
const healthIcon = server.healthCheckStatus === 'healthy' ? '♥' : server.healthCheckStatus === 'unhealthy' ? '!' : '?';
|
|
321
|
+
lines.push(` ${statusIcon} ${server.serverName}`);
|
|
322
|
+
lines.push(` Status: ${server.status} ${healthIcon}`);
|
|
323
|
+
if (server.transportType) {
|
|
324
|
+
lines.push(` Transport: ${server.transportType}`);
|
|
325
|
+
}
|
|
326
|
+
if (server.connectedAt) {
|
|
327
|
+
lines.push(` Connected: ${new Date(server.connectedAt).toISOString()}`);
|
|
328
|
+
}
|
|
329
|
+
if (server.lastError) {
|
|
330
|
+
lines.push(` Last Error: ${server.lastError}`);
|
|
331
|
+
}
|
|
332
|
+
lines.push(` Tools: ${server.toolCount} (${server.tools.slice(0, 3).join(', ')}${server.tools.length > 3 ? '...' : ''})`);
|
|
333
|
+
if (server.promptCount > 0) {
|
|
334
|
+
lines.push(` Prompts: ${server.promptCount}`);
|
|
335
|
+
}
|
|
336
|
+
lines.push('');
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
// Recent events
|
|
340
|
+
if (diagnostics.recentEvents.length > 0) {
|
|
341
|
+
lines.push('┌─────────────────────────────────────────────────────────────┐');
|
|
342
|
+
lines.push('│ RECENT EVENTS │');
|
|
343
|
+
lines.push('└─────────────────────────────────────────────────────────────┘');
|
|
344
|
+
for (const event of diagnostics.recentEvents.slice(-10)) {
|
|
345
|
+
const time = event.timestamp.toISOString().split('T')[1].split('.')[0];
|
|
346
|
+
const serverInfo = event.serverName ? ` [${event.serverName}]` : '';
|
|
347
|
+
lines.push(` ${time} ${event.type}${serverInfo}`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
lines.push('');
|
|
351
|
+
lines.push('═══════════════════════════════════════════════════════════════');
|
|
352
|
+
return lines.join('\n');
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Create a debug session that instruments MCP manager events
|
|
356
|
+
*/
|
|
357
|
+
export function createDebugSession(manager, options) {
|
|
358
|
+
const debugLogger = getMCPDebugLogger();
|
|
359
|
+
if (options) {
|
|
360
|
+
debugLogger.updateConfig(options);
|
|
361
|
+
}
|
|
362
|
+
debugLogger.enable();
|
|
363
|
+
// Wire up manager events to debug logger
|
|
364
|
+
manager.on('serverAdded', (serverName, toolCount) => {
|
|
365
|
+
debugLogger.log('connection:success', { toolCount }, { serverName });
|
|
366
|
+
});
|
|
367
|
+
manager.on('serverError', (serverName, error) => {
|
|
368
|
+
debugLogger.log('connection:failure', {}, { serverName, error });
|
|
369
|
+
});
|
|
370
|
+
manager.on('serverRemoved', (serverName) => {
|
|
371
|
+
debugLogger.log('connection:disconnect', {}, { serverName });
|
|
372
|
+
});
|
|
373
|
+
manager.on('server-unhealthy', (serverName, error) => {
|
|
374
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
375
|
+
debugLogger.log('health:failure', {}, { serverName, error: err });
|
|
376
|
+
debugLogger.recordHealthCheck(serverName, false);
|
|
377
|
+
});
|
|
378
|
+
manager.on('reconnection-scheduled', (serverName, attempt, delay) => {
|
|
379
|
+
debugLogger.log('reconnection:scheduled', { attempt, delay }, { serverName });
|
|
380
|
+
});
|
|
381
|
+
manager.on('reconnection-succeeded', (serverName, attempts) => {
|
|
382
|
+
debugLogger.log('reconnection:success', { attempts }, { serverName });
|
|
383
|
+
});
|
|
384
|
+
manager.on('reconnection-failed', (serverName, attempts, reason) => {
|
|
385
|
+
debugLogger.log('reconnection:failure', { attempts, reason }, { serverName });
|
|
386
|
+
});
|
|
387
|
+
manager.on('progress', (data) => {
|
|
388
|
+
debugLogger.log('progress:update', { progress: data.progress, total: data.total }, { serverName: data.serverName });
|
|
389
|
+
});
|
|
390
|
+
manager.on('resource-updated', (serverName, uri) => {
|
|
391
|
+
debugLogger.log('resource:updated', { uri }, { serverName });
|
|
392
|
+
});
|
|
393
|
+
manager.on('schema-validation-failed', (data) => {
|
|
394
|
+
debugLogger.log('schema:validation', { valid: false, errors: data.errors }, { serverName: data.serverName, toolName: data.toolName });
|
|
395
|
+
});
|
|
396
|
+
return debugLogger;
|
|
397
|
+
}
|
|
398
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/mcp/debug.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,C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,CAAC,0BAA0B,EAAE,CAAC,IAAsE,EAAE,EAAE;QAChH,WAAW,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxI,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -48,3 +48,4 @@ export { resolveMCPReferences, extractMCPReferences } from "./resources.js";
|
|
|
48
48
|
export { parseMCPIdentifier, promptToSlashCommand, parsePromptCommand, formatPromptResult, getPromptDescription, } from "./prompts.js";
|
|
49
49
|
export { ZAI_SERVER_NAMES, ZAI_ENDPOINTS, ZAI_VISION_PACKAGE, ZAI_MCP_TEMPLATES, ZAI_QUOTA_LIMITS, generateZAIServerConfig, getAllZAIServerNames, isZAIServer, getZAITemplate, type ZAIServerName, type ZAIPlanTier, type ZAIMCPTemplate, } from "./zai-templates.js";
|
|
50
50
|
export { detectZAIServices, getEnabledZAIServers, validateZAIApiKey, getZAIApiKey, isZAIMCPConfigured, getRecommendedServers, isGLMModel, isZAIBaseURL, formatZAIStatus, type ZAIServiceStatus, } from "./zai-detector.js";
|
|
51
|
+
export { MCPDebugLogger, getMCPDebugLogger, resetMCPDebugLogger, collectMCPDiagnostics, formatMCPDiagnostics, createDebugSession, DEFAULT_DEBUG_CONFIG, type DebugEventType, type DebugEvent, type DebugLogLevel, type DebugLoggerConfig, type ServerDiagnostics, type MCPDiagnostics, } from "./debug.js";
|
package/dist/mcp/index.js
CHANGED
|
@@ -78,4 +78,8 @@ export { parseMCPIdentifier, promptToSlashCommand, parsePromptCommand, formatPro
|
|
|
78
78
|
export { ZAI_SERVER_NAMES, ZAI_ENDPOINTS, ZAI_VISION_PACKAGE, ZAI_MCP_TEMPLATES, ZAI_QUOTA_LIMITS, generateZAIServerConfig, getAllZAIServerNames, isZAIServer, getZAITemplate, } from "./zai-templates.js";
|
|
79
79
|
// Z.AI service detection and validation
|
|
80
80
|
export { detectZAIServices, getEnabledZAIServers, validateZAIApiKey, getZAIApiKey, isZAIMCPConfigured, getRecommendedServers, isGLMModel, isZAIBaseURL, formatZAIStatus, } from "./zai-detector.js";
|
|
81
|
+
// ============================================================================
|
|
82
|
+
// DEBUG MODE
|
|
83
|
+
// ============================================================================
|
|
84
|
+
export { MCPDebugLogger, getMCPDebugLogger, resetMCPDebugLogger, collectMCPDiagnostics, formatMCPDiagnostics, createDebugSession, DEFAULT_DEBUG_CONFIG, } from "./debug.js";
|
|
81
85
|
//# sourceMappingURL=index.js.map
|
package/dist/mcp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,kEAAkE;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,+DAA+D;AAC/D,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,GAIf,MAAM,gBAAgB,CAAC;AAGxB,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,gCAAgC;AAChC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAGrB,iCAAiC;AACjC,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEtG,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,OAAO,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