@tashiscool/agents 0.1.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/README.md +186 -0
- package/dist/conversation.d.ts +146 -0
- package/dist/conversation.d.ts.map +1 -0
- package/dist/conversation.js +239 -0
- package/dist/conversation.js.map +1 -0
- package/dist/events.d.ts +218 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +299 -0
- package/dist/events.js.map +1 -0
- package/dist/executor.d.ts +144 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +362 -0
- package/dist/executor.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/langchain.d.ts +210 -0
- package/dist/langchain.d.ts.map +1 -0
- package/dist/langchain.js +333 -0
- package/dist/langchain.js.map +1 -0
- package/dist/mcp.d.ts +208 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +266 -0
- package/dist/mcp.js.map +1 -0
- package/dist/memory.d.ts +96 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +248 -0
- package/dist/memory.js.map +1 -0
- package/dist/oauth.d.ts +158 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +344 -0
- package/dist/oauth.js.map +1 -0
- package/dist/output.d.ts +262 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +249 -0
- package/dist/output.js.map +1 -0
- package/dist/session.d.ts +212 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +347 -0
- package/dist/session.js.map +1 -0
- package/dist/tools.d.ts +125 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +195 -0
- package/dist/tools.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LangChain Message Builder
|
|
3
|
+
* Build LangChain-compatible messages from various sources
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Default role mapping
|
|
7
|
+
*/
|
|
8
|
+
const defaultRoleMapping = {
|
|
9
|
+
user: 'human',
|
|
10
|
+
assistant: 'ai',
|
|
11
|
+
system: 'system',
|
|
12
|
+
tool: 'tool',
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Convert standard message to LangChain format
|
|
16
|
+
*/
|
|
17
|
+
export function toLangChainMessage(message, options = {}) {
|
|
18
|
+
const roleMapping = { ...defaultRoleMapping, ...options.roleMapping };
|
|
19
|
+
const type = roleMapping[message.role] || 'human';
|
|
20
|
+
const base = {
|
|
21
|
+
type,
|
|
22
|
+
content: message.content,
|
|
23
|
+
};
|
|
24
|
+
if (message.name) {
|
|
25
|
+
base.name = message.name;
|
|
26
|
+
}
|
|
27
|
+
// Handle tool messages
|
|
28
|
+
if (type === 'tool' && message.toolCallId) {
|
|
29
|
+
return {
|
|
30
|
+
...base,
|
|
31
|
+
tool_call_id: message.toolCallId,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return base;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Convert array of messages to LangChain format
|
|
38
|
+
*/
|
|
39
|
+
export function toLangChainMessages(messages, options = {}) {
|
|
40
|
+
return messages.map((m) => toLangChainMessage(m, options));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Convert LangChain message to standard format
|
|
44
|
+
*/
|
|
45
|
+
export function fromLangChainMessage(lcMessage) {
|
|
46
|
+
const roleMapping = {
|
|
47
|
+
human: 'user',
|
|
48
|
+
ai: 'assistant',
|
|
49
|
+
system: 'system',
|
|
50
|
+
tool: 'tool',
|
|
51
|
+
function: 'tool',
|
|
52
|
+
};
|
|
53
|
+
const message = {
|
|
54
|
+
role: roleMapping[lcMessage.type] || 'user',
|
|
55
|
+
content: lcMessage.content,
|
|
56
|
+
};
|
|
57
|
+
if (lcMessage.name) {
|
|
58
|
+
message.name = lcMessage.name;
|
|
59
|
+
}
|
|
60
|
+
if ('tool_call_id' in lcMessage) {
|
|
61
|
+
message.toolCallId = lcMessage.tool_call_id;
|
|
62
|
+
}
|
|
63
|
+
return message;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Convert array of LangChain messages to standard format
|
|
67
|
+
*/
|
|
68
|
+
export function fromLangChainMessages(lcMessages) {
|
|
69
|
+
return lcMessages.map(fromLangChainMessage);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create a human message
|
|
73
|
+
*/
|
|
74
|
+
export function humanMessage(content, name) {
|
|
75
|
+
return { type: 'human', content, name };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Create an AI message
|
|
79
|
+
*/
|
|
80
|
+
export function aiMessage(content, toolCalls) {
|
|
81
|
+
const msg = { type: 'ai', content };
|
|
82
|
+
if (toolCalls?.length) {
|
|
83
|
+
msg.tool_calls = toolCalls;
|
|
84
|
+
}
|
|
85
|
+
return msg;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Create a system message
|
|
89
|
+
*/
|
|
90
|
+
export function systemMessage(content) {
|
|
91
|
+
return { type: 'system', content };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Create a tool message
|
|
95
|
+
*/
|
|
96
|
+
export function toolMessage(content, toolCallId, name) {
|
|
97
|
+
return { type: 'tool', content, tool_call_id: toolCallId, name };
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Convert tool call to LangChain format
|
|
101
|
+
*/
|
|
102
|
+
export function toLangChainToolCall(call) {
|
|
103
|
+
return {
|
|
104
|
+
id: call.id,
|
|
105
|
+
name: call.name,
|
|
106
|
+
args: call.arguments,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Convert LangChain tool call to standard format
|
|
111
|
+
*/
|
|
112
|
+
export function fromLangChainToolCall(lcCall) {
|
|
113
|
+
return {
|
|
114
|
+
id: lcCall.id,
|
|
115
|
+
name: lcCall.name,
|
|
116
|
+
arguments: lcCall.args,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Build tool result message
|
|
121
|
+
*/
|
|
122
|
+
export function buildToolResultMessage(result) {
|
|
123
|
+
let content;
|
|
124
|
+
if (result.error) {
|
|
125
|
+
content = `Error: ${result.error}`;
|
|
126
|
+
}
|
|
127
|
+
else if (typeof result.result === 'string') {
|
|
128
|
+
content = result.result;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
content = JSON.stringify(result.result);
|
|
132
|
+
}
|
|
133
|
+
return toolMessage(content, result.toolCallId, result.name);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Build messages from tool call + result pairs
|
|
137
|
+
*/
|
|
138
|
+
export function buildToolMessages(calls, results) {
|
|
139
|
+
const messages = [];
|
|
140
|
+
// AI message with tool calls
|
|
141
|
+
const aiMsg = aiMessage('', calls.map(toLangChainToolCall));
|
|
142
|
+
messages.push(aiMsg);
|
|
143
|
+
// Tool result messages
|
|
144
|
+
for (const result of results) {
|
|
145
|
+
messages.push(buildToolResultMessage(result));
|
|
146
|
+
}
|
|
147
|
+
return messages;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Message builder for complex conversations
|
|
151
|
+
*/
|
|
152
|
+
export class MessageBuilder {
|
|
153
|
+
messages = [];
|
|
154
|
+
/**
|
|
155
|
+
* Add system message
|
|
156
|
+
*/
|
|
157
|
+
system(content) {
|
|
158
|
+
this.messages.push(systemMessage(content));
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Add human message
|
|
163
|
+
*/
|
|
164
|
+
human(content, name) {
|
|
165
|
+
this.messages.push(humanMessage(content, name));
|
|
166
|
+
return this;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Add AI message
|
|
170
|
+
*/
|
|
171
|
+
ai(content, toolCalls) {
|
|
172
|
+
this.messages.push(aiMessage(content, toolCalls));
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Add tool result message
|
|
177
|
+
*/
|
|
178
|
+
tool(content, toolCallId, name) {
|
|
179
|
+
this.messages.push(toolMessage(content, toolCallId, name));
|
|
180
|
+
return this;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Add tool call and result
|
|
184
|
+
*/
|
|
185
|
+
toolCallAndResult(call, result) {
|
|
186
|
+
this.ai('', [toLangChainToolCall(call)]);
|
|
187
|
+
this.messages.push(buildToolResultMessage(result));
|
|
188
|
+
return this;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Add multiple messages
|
|
192
|
+
*/
|
|
193
|
+
addMany(messages) {
|
|
194
|
+
for (const msg of messages) {
|
|
195
|
+
this.messages.push(toLangChainMessage(msg));
|
|
196
|
+
}
|
|
197
|
+
return this;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Build the message array
|
|
201
|
+
*/
|
|
202
|
+
build() {
|
|
203
|
+
return [...this.messages];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Build as standard messages
|
|
207
|
+
*/
|
|
208
|
+
buildStandard() {
|
|
209
|
+
return this.messages.map(fromLangChainMessage);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Clear builder
|
|
213
|
+
*/
|
|
214
|
+
clear() {
|
|
215
|
+
this.messages = [];
|
|
216
|
+
return this;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Get message count
|
|
220
|
+
*/
|
|
221
|
+
get length() {
|
|
222
|
+
return this.messages.length;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Create a message builder
|
|
227
|
+
*/
|
|
228
|
+
export function createMessageBuilder() {
|
|
229
|
+
return new MessageBuilder();
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Convert to OpenAI message format
|
|
233
|
+
*/
|
|
234
|
+
export function toOpenAIMessage(message) {
|
|
235
|
+
const roleMap = {
|
|
236
|
+
human: 'user',
|
|
237
|
+
ai: 'assistant',
|
|
238
|
+
system: 'system',
|
|
239
|
+
tool: 'tool',
|
|
240
|
+
function: 'tool',
|
|
241
|
+
};
|
|
242
|
+
const msg = {
|
|
243
|
+
role: roleMap[message.type],
|
|
244
|
+
content: message.content,
|
|
245
|
+
};
|
|
246
|
+
if (message.name) {
|
|
247
|
+
msg.name = message.name;
|
|
248
|
+
}
|
|
249
|
+
if ('tool_call_id' in message) {
|
|
250
|
+
msg.tool_call_id = message.tool_call_id;
|
|
251
|
+
}
|
|
252
|
+
if ('tool_calls' in message && message.tool_calls) {
|
|
253
|
+
msg.tool_calls = message.tool_calls.map((tc) => ({
|
|
254
|
+
id: tc.id,
|
|
255
|
+
type: 'function',
|
|
256
|
+
function: {
|
|
257
|
+
name: tc.name,
|
|
258
|
+
arguments: JSON.stringify(tc.args),
|
|
259
|
+
},
|
|
260
|
+
}));
|
|
261
|
+
msg.content = msg.content || null;
|
|
262
|
+
}
|
|
263
|
+
return msg;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Convert array to OpenAI format
|
|
267
|
+
*/
|
|
268
|
+
export function toOpenAIMessages(messages) {
|
|
269
|
+
return messages.map(toOpenAIMessage);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Convert to Anthropic message format
|
|
273
|
+
*/
|
|
274
|
+
export function toAnthropicMessages(messages) {
|
|
275
|
+
let system;
|
|
276
|
+
const result = [];
|
|
277
|
+
for (const msg of messages) {
|
|
278
|
+
if (msg.type === 'system') {
|
|
279
|
+
system = msg.content;
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
if (msg.type === 'human') {
|
|
283
|
+
result.push({ role: 'user', content: msg.content });
|
|
284
|
+
}
|
|
285
|
+
else if (msg.type === 'ai') {
|
|
286
|
+
const aiMsg = msg;
|
|
287
|
+
if (aiMsg.tool_calls?.length) {
|
|
288
|
+
const content = [];
|
|
289
|
+
if (aiMsg.content) {
|
|
290
|
+
content.push({ type: 'text', text: aiMsg.content });
|
|
291
|
+
}
|
|
292
|
+
for (const tc of aiMsg.tool_calls) {
|
|
293
|
+
content.push({
|
|
294
|
+
type: 'tool_use',
|
|
295
|
+
id: tc.id,
|
|
296
|
+
name: tc.name,
|
|
297
|
+
input: tc.args,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
result.push({ role: 'assistant', content });
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
result.push({ role: 'assistant', content: aiMsg.content });
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else if (msg.type === 'tool') {
|
|
307
|
+
const toolMsg = msg;
|
|
308
|
+
// Merge with previous user message or create new one
|
|
309
|
+
const lastMsg = result[result.length - 1];
|
|
310
|
+
if (lastMsg?.role === 'user' && Array.isArray(lastMsg.content)) {
|
|
311
|
+
lastMsg.content.push({
|
|
312
|
+
type: 'tool_result',
|
|
313
|
+
tool_use_id: toolMsg.tool_call_id,
|
|
314
|
+
content: toolMsg.content,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
result.push({
|
|
319
|
+
role: 'user',
|
|
320
|
+
content: [
|
|
321
|
+
{
|
|
322
|
+
type: 'tool_result',
|
|
323
|
+
tool_use_id: toolMsg.tool_call_id,
|
|
324
|
+
content: toolMsg.content,
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return { system, messages: result };
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=langchain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"langchain.js","sourceRoot":"","sources":["../src/langchain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4EH;;GAEG;AACH,MAAM,kBAAkB,GAA8C;IACpE,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,IA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AE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC"}
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Client
|
|
3
|
+
* Model Context Protocol client for tool registration and calling
|
|
4
|
+
*/
|
|
5
|
+
import type { ToolDefinition, JsonSchema } from './tools.js';
|
|
6
|
+
/**
|
|
7
|
+
* MCP Server configuration
|
|
8
|
+
*/
|
|
9
|
+
export interface McpServerConfig {
|
|
10
|
+
/** Server name */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Server URL or command */
|
|
13
|
+
url?: string;
|
|
14
|
+
/** Command to spawn server */
|
|
15
|
+
command?: string;
|
|
16
|
+
/** Command arguments */
|
|
17
|
+
args?: string[];
|
|
18
|
+
/** Environment variables */
|
|
19
|
+
env?: Record<string, string>;
|
|
20
|
+
/** Connection timeout in ms */
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MCP Tool definition from server
|
|
25
|
+
*/
|
|
26
|
+
export interface McpTool {
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
inputSchema: JsonSchema;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* MCP Resource definition
|
|
33
|
+
*/
|
|
34
|
+
export interface McpResource {
|
|
35
|
+
uri: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
mimeType?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* MCP Prompt definition
|
|
42
|
+
*/
|
|
43
|
+
export interface McpPrompt {
|
|
44
|
+
name: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
arguments?: {
|
|
47
|
+
name: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
required?: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* MCP Call result
|
|
54
|
+
*/
|
|
55
|
+
export interface McpCallResult {
|
|
56
|
+
content: Array<{
|
|
57
|
+
type: 'text' | 'image' | 'resource';
|
|
58
|
+
text?: string;
|
|
59
|
+
data?: string;
|
|
60
|
+
mimeType?: string;
|
|
61
|
+
uri?: string;
|
|
62
|
+
}>;
|
|
63
|
+
isError?: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* MCP Connection state
|
|
67
|
+
*/
|
|
68
|
+
export type McpConnectionState = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
69
|
+
/**
|
|
70
|
+
* MCP Client interface
|
|
71
|
+
*/
|
|
72
|
+
export interface McpClient {
|
|
73
|
+
/** Get connection state */
|
|
74
|
+
getState(): McpConnectionState;
|
|
75
|
+
/** Connect to server */
|
|
76
|
+
connect(): Promise<void>;
|
|
77
|
+
/** Disconnect from server */
|
|
78
|
+
disconnect(): Promise<void>;
|
|
79
|
+
/** List available tools */
|
|
80
|
+
listTools(): Promise<McpTool[]>;
|
|
81
|
+
/** Call a tool */
|
|
82
|
+
callTool(name: string, args: Record<string, unknown>): Promise<McpCallResult>;
|
|
83
|
+
/** List available resources */
|
|
84
|
+
listResources(): Promise<McpResource[]>;
|
|
85
|
+
/** Read a resource */
|
|
86
|
+
readResource(uri: string): Promise<McpCallResult>;
|
|
87
|
+
/** List available prompts */
|
|
88
|
+
listPrompts(): Promise<McpPrompt[]>;
|
|
89
|
+
/** Get a prompt */
|
|
90
|
+
getPrompt(name: string, args?: Record<string, string>): Promise<{
|
|
91
|
+
messages: Array<{
|
|
92
|
+
role: string;
|
|
93
|
+
content: string;
|
|
94
|
+
}>;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Mock MCP client for development/testing
|
|
99
|
+
*/
|
|
100
|
+
export declare class MockMcpClient implements McpClient {
|
|
101
|
+
private state;
|
|
102
|
+
private tools;
|
|
103
|
+
private resources;
|
|
104
|
+
private prompts;
|
|
105
|
+
private toolHandlers;
|
|
106
|
+
constructor(config?: McpServerConfig);
|
|
107
|
+
/**
|
|
108
|
+
* Register a mock tool
|
|
109
|
+
*/
|
|
110
|
+
registerTool(tool: McpTool, handler: (args: Record<string, unknown>) => Promise<McpCallResult>): void;
|
|
111
|
+
/**
|
|
112
|
+
* Register a mock resource
|
|
113
|
+
*/
|
|
114
|
+
registerResource(resource: McpResource): void;
|
|
115
|
+
/**
|
|
116
|
+
* Register a mock prompt
|
|
117
|
+
*/
|
|
118
|
+
registerPrompt(prompt: McpPrompt): void;
|
|
119
|
+
getState(): McpConnectionState;
|
|
120
|
+
connect(): Promise<void>;
|
|
121
|
+
disconnect(): Promise<void>;
|
|
122
|
+
listTools(): Promise<McpTool[]>;
|
|
123
|
+
callTool(name: string, args: Record<string, unknown>): Promise<McpCallResult>;
|
|
124
|
+
listResources(): Promise<McpResource[]>;
|
|
125
|
+
readResource(uri: string): Promise<McpCallResult>;
|
|
126
|
+
listPrompts(): Promise<McpPrompt[]>;
|
|
127
|
+
getPrompt(name: string, args?: Record<string, string>): Promise<{
|
|
128
|
+
messages: Array<{
|
|
129
|
+
role: string;
|
|
130
|
+
content: string;
|
|
131
|
+
}>;
|
|
132
|
+
}>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* MCP Tool adapter - converts MCP tools to standard ToolDefinition
|
|
136
|
+
*/
|
|
137
|
+
export declare class McpToolAdapter {
|
|
138
|
+
private client;
|
|
139
|
+
private prefix;
|
|
140
|
+
constructor(client: McpClient, prefix?: string);
|
|
141
|
+
/**
|
|
142
|
+
* Convert MCP tool to ToolDefinition
|
|
143
|
+
*/
|
|
144
|
+
private convertTool;
|
|
145
|
+
/**
|
|
146
|
+
* Basic JSON Schema to Zod conversion
|
|
147
|
+
*/
|
|
148
|
+
private jsonSchemaToZod;
|
|
149
|
+
/**
|
|
150
|
+
* Get all tools as ToolDefinitions
|
|
151
|
+
*/
|
|
152
|
+
getTools(): Promise<ToolDefinition[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Get a specific tool by name
|
|
155
|
+
*/
|
|
156
|
+
getTool(name: string): Promise<ToolDefinition | undefined>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* MCP Server manager for multiple servers
|
|
160
|
+
*/
|
|
161
|
+
export declare class McpServerManager {
|
|
162
|
+
private clients;
|
|
163
|
+
private adapters;
|
|
164
|
+
/**
|
|
165
|
+
* Add an MCP server
|
|
166
|
+
*/
|
|
167
|
+
addServer(name: string, client: McpClient): void;
|
|
168
|
+
/**
|
|
169
|
+
* Get a client by name
|
|
170
|
+
*/
|
|
171
|
+
getClient(name: string): McpClient | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Connect to all servers
|
|
174
|
+
*/
|
|
175
|
+
connectAll(): Promise<void>;
|
|
176
|
+
/**
|
|
177
|
+
* Disconnect from all servers
|
|
178
|
+
*/
|
|
179
|
+
disconnectAll(): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Get all tools from all servers
|
|
182
|
+
*/
|
|
183
|
+
getAllTools(): Promise<ToolDefinition[]>;
|
|
184
|
+
/**
|
|
185
|
+
* Get tools from a specific server
|
|
186
|
+
*/
|
|
187
|
+
getToolsFromServer(name: string): Promise<ToolDefinition[]>;
|
|
188
|
+
/**
|
|
189
|
+
* List all connected servers
|
|
190
|
+
*/
|
|
191
|
+
listServers(): {
|
|
192
|
+
name: string;
|
|
193
|
+
state: McpConnectionState;
|
|
194
|
+
}[];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Create an MCP server manager
|
|
198
|
+
*/
|
|
199
|
+
export declare function createMcpManager(): McpServerManager;
|
|
200
|
+
/**
|
|
201
|
+
* Create a mock MCP client for testing
|
|
202
|
+
*/
|
|
203
|
+
export declare function createMockMcpClient(config?: McpServerConfig): MockMcpClient;
|
|
204
|
+
/**
|
|
205
|
+
* Create an MCP tool adapter
|
|
206
|
+
*/
|
|
207
|
+
export declare function createMcpToolAdapter(client: McpClient, prefix?: string): McpToolAdapter;
|
|
208
|
+
//# sour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