@mcpilotx/intentorch 0.5.0
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/LICENSE +201 -0
- package/README.md +545 -0
- package/dist/ai/ai.d.ts +205 -0
- package/dist/ai/ai.js +1200 -0
- package/dist/ai/cloud-intent-engine.d.ts +270 -0
- package/dist/ai/cloud-intent-engine.js +956 -0
- package/dist/ai/command.d.ts +59 -0
- package/dist/ai/command.js +285 -0
- package/dist/ai/config.d.ts +66 -0
- package/dist/ai/config.js +211 -0
- package/dist/ai/enhanced-intent.d.ts +17 -0
- package/dist/ai/enhanced-intent.js +32 -0
- package/dist/ai/index.d.ts +29 -0
- package/dist/ai/index.js +44 -0
- package/dist/ai/intent.d.ts +16 -0
- package/dist/ai/intent.js +30 -0
- package/dist/core/ai-config.d.ts +25 -0
- package/dist/core/ai-config.js +326 -0
- package/dist/core/config-manager.d.ts +36 -0
- package/dist/core/config-manager.js +400 -0
- package/dist/core/config-validator.d.ts +9 -0
- package/dist/core/config-validator.js +184 -0
- package/dist/core/constants.d.ts +34 -0
- package/dist/core/constants.js +37 -0
- package/dist/core/error-ai.d.ts +23 -0
- package/dist/core/error-ai.js +217 -0
- package/dist/core/error-handler.d.ts +197 -0
- package/dist/core/error-handler.js +467 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.js +17 -0
- package/dist/core/logger.d.ts +27 -0
- package/dist/core/logger.js +108 -0
- package/dist/core/performance-monitor.d.ts +74 -0
- package/dist/core/performance-monitor.js +260 -0
- package/dist/core/providers.d.ts +36 -0
- package/dist/core/providers.js +304 -0
- package/dist/core/retry-manager.d.ts +41 -0
- package/dist/core/retry-manager.js +204 -0
- package/dist/core/types.d.ts +155 -0
- package/dist/core/types.js +2 -0
- package/dist/daemon/index.d.ts +10 -0
- package/dist/daemon/index.js +15 -0
- package/dist/daemon/intent-engine.d.ts +22 -0
- package/dist/daemon/intent-engine.js +50 -0
- package/dist/daemon/orchestrator.d.ts +24 -0
- package/dist/daemon/orchestrator.js +100 -0
- package/dist/daemon/pm.d.ts +33 -0
- package/dist/daemon/pm.js +127 -0
- package/dist/daemon/process.d.ts +11 -0
- package/dist/daemon/process.js +49 -0
- package/dist/daemon/server.d.ts +17 -0
- package/dist/daemon/server.js +435 -0
- package/dist/daemon/service.d.ts +36 -0
- package/dist/daemon/service.js +278 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +36 -0
- package/dist/mcp/client.d.ts +51 -0
- package/dist/mcp/client.js +276 -0
- package/dist/mcp/index.d.ts +162 -0
- package/dist/mcp/index.js +199 -0
- package/dist/mcp/tool-registry.d.ts +71 -0
- package/dist/mcp/tool-registry.js +308 -0
- package/dist/mcp/transport.d.ts +83 -0
- package/dist/mcp/transport.js +515 -0
- package/dist/mcp/types.d.ts +136 -0
- package/dist/mcp/types.js +31 -0
- package/dist/runtime/adapter-advanced.d.ts +184 -0
- package/dist/runtime/adapter-advanced.js +160 -0
- package/dist/runtime/adapter.d.ts +9 -0
- package/dist/runtime/adapter.js +2 -0
- package/dist/runtime/detector-advanced.d.ts +59 -0
- package/dist/runtime/detector-advanced.js +487 -0
- package/dist/runtime/detector.d.ts +5 -0
- package/dist/runtime/detector.js +56 -0
- package/dist/runtime/docker-adapter.d.ts +18 -0
- package/dist/runtime/docker-adapter.js +170 -0
- package/dist/runtime/docker.d.ts +17 -0
- package/dist/runtime/docker.js +71 -0
- package/dist/runtime/executable-analyzer.d.ts +56 -0
- package/dist/runtime/executable-analyzer.js +391 -0
- package/dist/runtime/go-adapter.d.ts +19 -0
- package/dist/runtime/go-adapter.js +190 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.js +10 -0
- package/dist/runtime/node-adapter.d.ts +10 -0
- package/dist/runtime/node-adapter.js +23 -0
- package/dist/runtime/node.d.ts +20 -0
- package/dist/runtime/node.js +86 -0
- package/dist/runtime/python-adapter.d.ts +11 -0
- package/dist/runtime/python-adapter.js +102 -0
- package/dist/runtime/python.d.ts +17 -0
- package/dist/runtime/python.js +72 -0
- package/dist/runtime/rust-adapter.d.ts +21 -0
- package/dist/runtime/rust-adapter.js +267 -0
- package/dist/sdk.d.ts +500 -0
- package/dist/sdk.js +904 -0
- package/docs/README.ZH_CN.md +545 -0
- package/docs/api.md +888 -0
- package/docs/architecture.md +731 -0
- package/docs/development.md +744 -0
- package/package.json +112 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP (Model Context Protocol) Module Entry
|
|
3
|
+
* Provides complete MCP protocol support, focusing on MCP tool management
|
|
4
|
+
*/
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './transport';
|
|
7
|
+
export * from './client';
|
|
8
|
+
export * from './tool-registry';
|
|
9
|
+
/**
|
|
10
|
+
* Create MCP client configuration
|
|
11
|
+
*/
|
|
12
|
+
export declare function createMCPConfig(transportType: 'stdio' | 'http' | 'sse', options: {
|
|
13
|
+
command?: string;
|
|
14
|
+
args?: string[];
|
|
15
|
+
url?: string;
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
autoConnect?: boolean;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
}): {
|
|
21
|
+
autoConnect?: boolean;
|
|
22
|
+
timeout?: number;
|
|
23
|
+
maxRetries?: number;
|
|
24
|
+
transport: {
|
|
25
|
+
url: string;
|
|
26
|
+
headers: Record<string, string>;
|
|
27
|
+
command: string;
|
|
28
|
+
args: string[];
|
|
29
|
+
type: "stdio" | "http" | "sse";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Tool category constants
|
|
34
|
+
*/
|
|
35
|
+
export declare const TOOL_CATEGORIES: {
|
|
36
|
+
readonly FILESYSTEM: "filesystem";
|
|
37
|
+
readonly NETWORK: "network";
|
|
38
|
+
readonly DATABASE: "database";
|
|
39
|
+
readonly AI: "ai";
|
|
40
|
+
readonly UTILITY: "utility";
|
|
41
|
+
readonly DEVELOPMENT: "development";
|
|
42
|
+
readonly SYSTEM: "system";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Predefined tool patterns (for tool discovery and classification)
|
|
46
|
+
*/
|
|
47
|
+
export declare const TOOL_PATTERNS: {
|
|
48
|
+
readonly READ_FILE: {
|
|
49
|
+
readonly name: "read_file";
|
|
50
|
+
readonly description: "Read file content";
|
|
51
|
+
readonly inputSchema: {
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly path: {
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly description: "File path";
|
|
57
|
+
};
|
|
58
|
+
readonly encoding: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly description: "Encoding format";
|
|
61
|
+
readonly default: "utf-8";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
readonly required: readonly ["path"];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
readonly WRITE_FILE: {
|
|
68
|
+
readonly name: "write_file";
|
|
69
|
+
readonly description: "Write file content";
|
|
70
|
+
readonly inputSchema: {
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly properties: {
|
|
73
|
+
readonly path: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly description: "File path";
|
|
76
|
+
};
|
|
77
|
+
readonly content: {
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly description: "File content";
|
|
80
|
+
};
|
|
81
|
+
readonly encoding: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
readonly description: "Encoding format";
|
|
84
|
+
readonly default: "utf-8";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly required: readonly ["path", "content"];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
readonly HTTP_REQUEST: {
|
|
91
|
+
readonly name: "http_request";
|
|
92
|
+
readonly description: "Send HTTP request";
|
|
93
|
+
readonly inputSchema: {
|
|
94
|
+
readonly type: "object";
|
|
95
|
+
readonly properties: {
|
|
96
|
+
readonly url: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly description: "Request URL";
|
|
99
|
+
};
|
|
100
|
+
readonly method: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly description: "HTTP method";
|
|
103
|
+
readonly default: "GET";
|
|
104
|
+
};
|
|
105
|
+
readonly headers: {
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly description: "Request headers";
|
|
108
|
+
};
|
|
109
|
+
readonly body: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly description: "Request body";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly required: readonly ["url"];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly EXECUTE_COMMAND: {
|
|
118
|
+
readonly name: "execute_command";
|
|
119
|
+
readonly description: "Execute system command";
|
|
120
|
+
readonly inputSchema: {
|
|
121
|
+
readonly type: "object";
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly command: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly description: "Command to execute";
|
|
126
|
+
};
|
|
127
|
+
readonly args: {
|
|
128
|
+
readonly type: "array";
|
|
129
|
+
readonly description: "Command arguments";
|
|
130
|
+
readonly items: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly cwd: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly description: "Working directory";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
readonly required: readonly ["command"];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Discover local MCP servers
|
|
145
|
+
* Returns predefined common MCP server configurations
|
|
146
|
+
*/
|
|
147
|
+
export declare function discoverLocalMCPServers(): Promise<Array<{
|
|
148
|
+
name: string;
|
|
149
|
+
transport: any;
|
|
150
|
+
}>>;
|
|
151
|
+
/**
|
|
152
|
+
* Load MCP server configurations from environment variables
|
|
153
|
+
*/
|
|
154
|
+
export declare function loadMCPServersFromEnv(): Array<{
|
|
155
|
+
name: string;
|
|
156
|
+
transport: any;
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Default export MCPClient class
|
|
160
|
+
*/
|
|
161
|
+
export { MCPClient as default } from './client';
|
|
162
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP (Model Context Protocol) Module Entry
|
|
3
|
+
* Provides complete MCP protocol support, focusing on MCP tool management
|
|
4
|
+
*/
|
|
5
|
+
// Export type definitions
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
// Export transport layer
|
|
8
|
+
export * from './transport.js';
|
|
9
|
+
// Export client
|
|
10
|
+
export * from './client.js';
|
|
11
|
+
// Export tool registry
|
|
12
|
+
export * from './tool-registry.js';
|
|
13
|
+
// ==================== Utility Functions ====================
|
|
14
|
+
/**
|
|
15
|
+
* Create MCP client configuration
|
|
16
|
+
*/
|
|
17
|
+
export function createMCPConfig(transportType, options) {
|
|
18
|
+
const { command, args, url, headers, ...clientOptions } = options;
|
|
19
|
+
return {
|
|
20
|
+
transport: {
|
|
21
|
+
type: transportType,
|
|
22
|
+
...(transportType === 'stdio' && command && { command, args }),
|
|
23
|
+
...(transportType === 'http' && url && { url, headers }),
|
|
24
|
+
...(transportType === 'sse' && url && { url, headers }),
|
|
25
|
+
},
|
|
26
|
+
...clientOptions,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Tool category constants
|
|
31
|
+
*/
|
|
32
|
+
export const TOOL_CATEGORIES = {
|
|
33
|
+
FILESYSTEM: 'filesystem',
|
|
34
|
+
NETWORK: 'network',
|
|
35
|
+
DATABASE: 'database',
|
|
36
|
+
AI: 'ai',
|
|
37
|
+
UTILITY: 'utility',
|
|
38
|
+
DEVELOPMENT: 'development',
|
|
39
|
+
SYSTEM: 'system',
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Predefined tool patterns (for tool discovery and classification)
|
|
43
|
+
*/
|
|
44
|
+
export const TOOL_PATTERNS = {
|
|
45
|
+
// Filesystem tools
|
|
46
|
+
READ_FILE: {
|
|
47
|
+
name: 'read_file',
|
|
48
|
+
description: 'Read file content',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
path: { type: 'string', description: 'File path' },
|
|
53
|
+
encoding: { type: 'string', description: 'Encoding format', default: 'utf-8' },
|
|
54
|
+
},
|
|
55
|
+
required: ['path'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
WRITE_FILE: {
|
|
59
|
+
name: 'write_file',
|
|
60
|
+
description: 'Write file content',
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
path: { type: 'string', description: 'File path' },
|
|
65
|
+
content: { type: 'string', description: 'File content' },
|
|
66
|
+
encoding: { type: 'string', description: 'Encoding format', default: 'utf-8' },
|
|
67
|
+
},
|
|
68
|
+
required: ['path', 'content'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
// Network tools
|
|
72
|
+
HTTP_REQUEST: {
|
|
73
|
+
name: 'http_request',
|
|
74
|
+
description: 'Send HTTP request',
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
url: { type: 'string', description: 'Request URL' },
|
|
79
|
+
method: { type: 'string', description: 'HTTP method', default: 'GET' },
|
|
80
|
+
headers: { type: 'object', description: 'Request headers' },
|
|
81
|
+
body: { type: 'string', description: 'Request body' },
|
|
82
|
+
},
|
|
83
|
+
required: ['url'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
// System tools
|
|
87
|
+
EXECUTE_COMMAND: {
|
|
88
|
+
name: 'execute_command',
|
|
89
|
+
description: 'Execute system command',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
command: { type: 'string', description: 'Command to execute' },
|
|
94
|
+
args: { type: 'array', description: 'Command arguments', items: { type: 'string' } },
|
|
95
|
+
cwd: { type: 'string', description: 'Working directory' },
|
|
96
|
+
},
|
|
97
|
+
required: ['command'],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
// ==================== Tool Discovery Helper Functions ====================
|
|
102
|
+
/**
|
|
103
|
+
* Discover local MCP servers
|
|
104
|
+
* Returns predefined common MCP server configurations
|
|
105
|
+
*/
|
|
106
|
+
export async function discoverLocalMCPServers() {
|
|
107
|
+
const servers = [];
|
|
108
|
+
// Predefined common MCP servers
|
|
109
|
+
const commonServers = [
|
|
110
|
+
// Filesystem server
|
|
111
|
+
{
|
|
112
|
+
name: 'filesystem',
|
|
113
|
+
command: 'npx',
|
|
114
|
+
args: ['@modelcontextprotocol/server-filesystem'],
|
|
115
|
+
},
|
|
116
|
+
// Clock server
|
|
117
|
+
{
|
|
118
|
+
name: 'clock',
|
|
119
|
+
command: 'npx',
|
|
120
|
+
args: ['@modelcontextprotocol/server-clock'],
|
|
121
|
+
},
|
|
122
|
+
// GitHub server
|
|
123
|
+
{
|
|
124
|
+
name: 'github',
|
|
125
|
+
command: 'npx',
|
|
126
|
+
args: ['@modelcontextprotocol/server-github'],
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
for (const server of commonServers) {
|
|
130
|
+
servers.push({
|
|
131
|
+
name: server.name,
|
|
132
|
+
transport: {
|
|
133
|
+
type: 'stdio',
|
|
134
|
+
command: server.command,
|
|
135
|
+
args: server.args,
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return servers;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Load MCP server configurations from environment variables
|
|
143
|
+
*/
|
|
144
|
+
export function loadMCPServersFromEnv() {
|
|
145
|
+
const servers = [];
|
|
146
|
+
// Read MCP server configurations from environment variables
|
|
147
|
+
// Format: MCP_SERVER_<NAME>_TYPE=stdio|http|sse
|
|
148
|
+
// MCP_SERVER_<NAME>_COMMAND=command (for stdio)
|
|
149
|
+
// MCP_SERVER_<NAME>_URL=url (for http/sse)
|
|
150
|
+
const envPrefix = 'MCP_SERVER_';
|
|
151
|
+
Object.keys(process.env).forEach(key => {
|
|
152
|
+
if (key.startsWith(envPrefix) && key.endsWith('_TYPE')) {
|
|
153
|
+
const serverName = key.slice(envPrefix.length, -5).toLowerCase();
|
|
154
|
+
const transportType = process.env[key];
|
|
155
|
+
const transport = { type: transportType };
|
|
156
|
+
if (transportType === 'stdio') {
|
|
157
|
+
const commandKey = `${envPrefix}${serverName.toUpperCase()}_COMMAND`;
|
|
158
|
+
const argsKey = `${envPrefix}${serverName.toUpperCase()}_ARGS`;
|
|
159
|
+
if (process.env[commandKey]) {
|
|
160
|
+
transport.command = process.env[commandKey];
|
|
161
|
+
if (process.env[argsKey]) {
|
|
162
|
+
try {
|
|
163
|
+
transport.args = JSON.parse(process.env[argsKey]);
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
transport.args = process.env[argsKey].split(' ');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else if (transportType === 'http' || transportType === 'sse') {
|
|
172
|
+
const urlKey = `${envPrefix}${serverName.toUpperCase()}_URL`;
|
|
173
|
+
const headersKey = `${envPrefix}${serverName.toUpperCase()}_HEADERS`;
|
|
174
|
+
if (process.env[urlKey]) {
|
|
175
|
+
transport.url = process.env[urlKey];
|
|
176
|
+
if (process.env[headersKey]) {
|
|
177
|
+
try {
|
|
178
|
+
transport.headers = JSON.parse(process.env[headersKey]);
|
|
179
|
+
}
|
|
180
|
+
catch {
|
|
181
|
+
// Ignore parsing errors
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
servers.push({
|
|
187
|
+
name: serverName,
|
|
188
|
+
transport,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return servers;
|
|
193
|
+
}
|
|
194
|
+
// ==================== Default Export ====================
|
|
195
|
+
/**
|
|
196
|
+
* Default export MCPClient class
|
|
197
|
+
*/
|
|
198
|
+
export { MCPClient as default } from './client.js';
|
|
199
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Registration and Management
|
|
3
|
+
* Focuses on MCP tool management, providing tool registration, discovery, execution and other functions
|
|
4
|
+
*/
|
|
5
|
+
import { Tool, ToolCall, ToolResult } from './types';
|
|
6
|
+
export interface ToolExecutor {
|
|
7
|
+
(args: Record<string, any>): Promise<ToolResult>;
|
|
8
|
+
}
|
|
9
|
+
export interface RegisteredTool {
|
|
10
|
+
tool: Tool;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
metadata: {
|
|
13
|
+
serverId: string;
|
|
14
|
+
serverName?: string;
|
|
15
|
+
discoveredAt: number;
|
|
16
|
+
lastUsed?: number;
|
|
17
|
+
usageCount?: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* MCP Tool Registry
|
|
22
|
+
* Focuses on managing tools discovered from MCP servers
|
|
23
|
+
*/
|
|
24
|
+
export declare class ToolRegistry {
|
|
25
|
+
private tools;
|
|
26
|
+
private serverTools;
|
|
27
|
+
/**
|
|
28
|
+
* Register tool
|
|
29
|
+
*/
|
|
30
|
+
registerTool(tool: Tool, executor: ToolExecutor, serverId: string, serverName?: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Batch register tools
|
|
33
|
+
*/
|
|
34
|
+
registerTools(tools: Tool[], executorFactory: (toolName: string) => ToolExecutor, serverId: string, serverName?: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Unregister tool
|
|
37
|
+
*/
|
|
38
|
+
unregisterTool(toolName: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Unregister all tools for specified server
|
|
41
|
+
*/
|
|
42
|
+
unregisterServerTools(serverId: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Execute tool
|
|
45
|
+
*/
|
|
46
|
+
executeTool(toolCall: ToolCall): Promise<ToolResult>;
|
|
47
|
+
getTool(name: string): RegisteredTool | undefined;
|
|
48
|
+
getAllTools(): RegisteredTool[];
|
|
49
|
+
getToolsByServer(serverId: string): RegisteredTool[];
|
|
50
|
+
getServerIds(): string[];
|
|
51
|
+
/**
|
|
52
|
+
* Get connected servers with their names
|
|
53
|
+
*/
|
|
54
|
+
getConnectedServers(): string[];
|
|
55
|
+
searchTools(query: string): RegisteredTool[];
|
|
56
|
+
private validateToolArguments;
|
|
57
|
+
getToolStatistics(): {
|
|
58
|
+
totalTools: number;
|
|
59
|
+
byServer: Record<string, number>;
|
|
60
|
+
mostUsed: {
|
|
61
|
+
name: string;
|
|
62
|
+
serverId: string;
|
|
63
|
+
serverName: string;
|
|
64
|
+
usageCount: number;
|
|
65
|
+
lastUsed: number;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
private emitToolUpdate;
|
|
69
|
+
clear(): void;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=tool-registry.d.ts.map
|