@mcp-use/agent 2.0.0-beta.18 → 2.0.0-beta.19

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.
Files changed (70) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/adapters/base.d.ts +31 -28
  3. package/dist/adapters/base.d.ts.map +1 -1
  4. package/dist/adapters/index.d.ts +1 -1
  5. package/dist/adapters/index.d.ts.map +1 -1
  6. package/dist/adapters/langchain_adapter.d.ts +10 -0
  7. package/dist/adapters/langchain_adapter.d.ts.map +1 -1
  8. package/dist/adapters/native_adapter.d.ts +27 -2
  9. package/dist/adapters/native_adapter.d.ts.map +1 -1
  10. package/dist/agents/agent_options.d.ts +47 -4
  11. package/dist/agents/agent_options.d.ts.map +1 -1
  12. package/dist/agents/mcp_agent.d.ts +85 -14
  13. package/dist/agents/mcp_agent.d.ts.map +1 -1
  14. package/dist/agents/mcp_agent_langchain.d.ts +102 -37
  15. package/dist/agents/mcp_agent_langchain.d.ts.map +1 -1
  16. package/dist/agents/prompts/index.d.ts +7 -0
  17. package/dist/agents/prompts/index.d.ts.map +1 -1
  18. package/dist/agents/remote.d.ts +39 -14
  19. package/dist/agents/remote.d.ts.map +1 -1
  20. package/dist/agents/run_options.d.ts +15 -0
  21. package/dist/agents/run_options.d.ts.map +1 -1
  22. package/dist/agents/types.d.ts +45 -23
  23. package/dist/agents/types.d.ts.map +1 -1
  24. package/dist/agents/utils/ai_sdk.d.ts +14 -5
  25. package/dist/agents/utils/ai_sdk.d.ts.map +1 -1
  26. package/dist/agents/utils/index.d.ts +1 -1
  27. package/dist/agents/utils/index.d.ts.map +1 -1
  28. package/dist/agents/utils/llm_provider.d.ts +31 -23
  29. package/dist/agents/utils/llm_provider.d.ts.map +1 -1
  30. package/dist/index.d.ts +10 -5
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +100 -21
  33. package/dist/index.js.map +1 -1
  34. package/dist/langchain.d.ts +6 -2
  35. package/dist/langchain.d.ts.map +1 -1
  36. package/dist/langchain.js +195 -44
  37. package/dist/langchain.js.map +1 -1
  38. package/dist/llm/chat.d.ts +8 -1
  39. package/dist/llm/chat.d.ts.map +1 -1
  40. package/dist/llm/messageFormat.d.ts +36 -6
  41. package/dist/llm/messageFormat.d.ts.map +1 -1
  42. package/dist/llm/provider_config.d.ts +25 -1
  43. package/dist/llm/provider_config.d.ts.map +1 -1
  44. package/dist/llm/providers/ollama/utils.d.ts +22 -0
  45. package/dist/llm/providers/ollama/utils.d.ts.map +1 -1
  46. package/dist/llm/providers/openai-chat-completions.d.ts +8 -1
  47. package/dist/llm/providers/openai-chat-completions.d.ts.map +1 -1
  48. package/dist/llm/types.d.ts +85 -18
  49. package/dist/llm/types.d.ts.map +1 -1
  50. package/dist/managers/server_manager.d.ts +30 -0
  51. package/dist/managers/server_manager.d.ts.map +1 -1
  52. package/dist/managers/tools/acquire_active_mcp_server.d.ts +5 -0
  53. package/dist/managers/tools/acquire_active_mcp_server.d.ts.map +1 -1
  54. package/dist/managers/tools/add_server_from_config.d.ts +12 -0
  55. package/dist/managers/tools/add_server_from_config.d.ts.map +1 -1
  56. package/dist/managers/tools/base.d.ts +7 -0
  57. package/dist/managers/tools/base.d.ts.map +1 -1
  58. package/dist/managers/tools/connect_mcp_server.d.ts +9 -0
  59. package/dist/managers/tools/connect_mcp_server.d.ts.map +1 -1
  60. package/dist/managers/tools/list_mcp_servers.d.ts +5 -0
  61. package/dist/managers/tools/list_mcp_servers.d.ts.map +1 -1
  62. package/dist/managers/tools/release_mcp_server_connection.d.ts +5 -0
  63. package/dist/managers/tools/release_mcp_server_connection.d.ts.map +1 -1
  64. package/dist/managers/types.d.ts +9 -0
  65. package/dist/managers/types.d.ts.map +1 -1
  66. package/dist/observability/index.d.ts +1 -1
  67. package/dist/observability/index.d.ts.map +1 -1
  68. package/dist/observability/manager.d.ts +20 -8
  69. package/dist/observability/manager.d.ts.map +1 -1
  70. package/package.json +1 -2
@@ -1,5 +1,12 @@
1
1
  import type { ProviderConfig, ProviderMessage } from "./types.js";
2
- /** Single-shot chat completion without tools (sampling, props generation). */
2
+ /**
3
+ * Runs one provider chat completion without exposing tools.
4
+ *
5
+ * @param params - Provider configuration, messages, and optional cancellation
6
+ * signal.
7
+ * @returns The assistant's final text.
8
+ * @throws {@link LlmRequestError} when the provider rejects the HTTP request.
9
+ */
3
10
  export declare function completeChat(params: {
4
11
  config: ProviderConfig;
5
12
  messages: ProviderMessage[];
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/llm/chat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElE,8EAA8E;AAC9E,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlB"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/llm/chat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElE;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlB"}
@@ -1,26 +1,48 @@
1
1
  import type { ProviderMessage } from "./types.js";
2
2
  import type { BaseMessage } from "../agents/types.js";
3
- interface InspectorAttachment {
3
+ /** Attachment accepted by {@link convertMessagesToProvider}. */
4
+ export interface InspectorAttachment {
5
+ /** Attachment kind. Files that are not images are ignored. */
4
6
  type: "image" | "file";
7
+ /** Base64-encoded attachment bytes. */
5
8
  data: string;
9
+ /** MIME type for the encoded bytes. */
6
10
  mimeType: string;
7
11
  }
8
- interface InspectorMessagePart {
12
+ /** Text or completed tool invocation in an inspector message. */
13
+ export interface InspectorMessagePart {
14
+ /** Message part kind. */
9
15
  type: "text" | "tool-invocation";
16
+ /** Text content when `type` is `"text"`. */
10
17
  text?: string;
18
+ /** Invocation details when `type` is `"tool-invocation"`. */
11
19
  toolInvocation?: {
20
+ /** Tool name. */
12
21
  toolName: string;
22
+ /** Tool arguments. */
13
23
  args: Record<string, unknown>;
24
+ /** Completed result. Omit while the invocation is pending. */
14
25
  result?: unknown;
15
26
  };
16
27
  }
17
- interface InspectorMessageLike {
28
+ /** Structural inspector message accepted by {@link convertMessagesToProvider}. */
29
+ export interface InspectorMessageLike {
30
+ /** Author of the message. */
18
31
  role: "user" | "assistant";
32
+ /** Plain text or framework-specific content. */
19
33
  content: unknown;
34
+ /** Optional message attachments. */
20
35
  attachments?: InspectorAttachment[];
36
+ /** Optional AI SDK-style message parts. */
21
37
  parts?: InspectorMessagePart[];
22
38
  }
23
- /** Convert legacy LangChain external history for the native agent runtime. */
39
+ /**
40
+ * Converts LangChain messages into provider-neutral history.
41
+ *
42
+ * @param messages - LangChain history in conversation order.
43
+ * @returns Equivalent provider messages.
44
+ * @throws TypeError if a message has an unsupported or unknown role.
45
+ */
24
46
  export declare function convertExternalHistoryToProvider(messages: BaseMessage[]): ProviderMessage[];
25
47
  /**
26
48
  * Convert inspector chat `Message[]` to provider-neutral `ProviderMessage[]`.
@@ -29,6 +51,10 @@ export declare function convertExternalHistoryToProvider(messages: BaseMessage[]
29
51
  * assistant message (bearing `toolCalls`) followed by one `tool` message per
30
52
  * invocation carrying the serialized result. This mirrors what the inspector
31
53
  * previously built using LangChain's AIMessage + ToolMessage pair.
54
+ *
55
+ * @param messages - Inspector messages in conversation order.
56
+ * @returns Provider-neutral messages, including completed tool call/result
57
+ * pairs.
32
58
  */
33
59
  export declare function convertMessagesToProvider(messages: InspectorMessageLike[]): ProviderMessage[];
34
60
  /**
@@ -42,10 +68,14 @@ export declare function extractSystem(messages: ProviderMessage[]): {
42
68
  system?: string;
43
69
  rest: ProviderMessage[];
44
70
  };
45
- /** Parse a `data:...;base64,...` URL. */
71
+ /**
72
+ * Parses a base64 data URL.
73
+ *
74
+ * @param url - URL in `data:<mime>;base64,<payload>` form.
75
+ * @returns The MIME type and base64 payload, or `null` for another URL form.
76
+ */
46
77
  export declare function parseDataUrl(url: string): {
47
78
  mimeType: string;
48
79
  data: string;
49
80
  } | null;
50
- export {};
51
81
  //# sourceMappingURL=messageFormat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormat.d.ts","sourceRoot":"","sources":["../../src/llm/messageFormat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAChC;AA2CD,8EAA8E;AAC9E,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,WAA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,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAChC;AA2CD;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,WAAW,EAAE,GACtB,eAAe,EAAE,CAuCnB;AAsBD;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,oBAAoB,EAAE,GAC/B,eAAe,EAAE,CAgEnB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,eAAe,EAAE,CAAC;CACzB,CAiBA;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,GACV;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI3C"}
@@ -1,13 +1,37 @@
1
1
  import type { ProviderConfig, ProviderName } from "./types.js";
2
+ /** Optional credentials and request settings for a string model identifier. */
2
3
  export interface NativeLLMConfig {
4
+ /** Provider API key. When omitted, the provider environment variable is used. */
3
5
  apiKey?: string;
6
+ /** Sampling temperature forwarded to the provider. */
4
7
  temperature?: number;
8
+ /** Maximum number of output tokens requested from the provider. */
5
9
  maxTokens?: number;
10
+ /** Provider API base URL override. */
6
11
  baseUrl?: string;
12
+ /** Additional HTTP headers sent with every request. */
7
13
  extraHeaders?: Record<string, string>;
14
+ /** Fetch credentials mode used for provider requests. */
8
15
  credentials?: RequestCredentials;
9
16
  }
10
- /** Parse "provider/model" into native ProviderConfig (no LangChain). */
17
+ /**
18
+ * Parses a `"provider/model"` identifier into a provider configuration.
19
+ *
20
+ * @param llmString - Provider and model separated by the first slash.
21
+ * @param config - Optional credentials and request overrides.
22
+ * @returns A complete provider configuration.
23
+ * @throws Error if the identifier is invalid, the provider is unsupported, or
24
+ * no required API key is available.
25
+ */
11
26
  export declare function parseLLMStringToProviderConfig(llmString: string, config?: NativeLLMConfig): ProviderConfig;
27
+ /**
28
+ * Builds a provider configuration from separate provider and model values.
29
+ *
30
+ * @param provider - Provider implementation to use.
31
+ * @param model - Provider-specific model identifier.
32
+ * @param config - Optional credentials and request overrides.
33
+ * @returns A complete provider configuration.
34
+ * @throws Error if no required API key is available.
35
+ */
12
36
  export declare function providerConfigFromOptions(provider: ProviderName, model: string, config?: NativeLLMConfig): ProviderConfig;
13
37
  //# sourceMappingURL=provider_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider_config.d.ts","sourceRoot":"","sources":["../../src/llm/provider_config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AA6BD,wEAAwE;AACxE,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,eAAe,GACvB,cAAc,CAgChB;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,eAAe,GACvB,cAAc,CAWhB"}
1
+ {"version":3,"file":"provider_config.d.ts","sourceRoot":"","sources":["../../src/llm/provider_config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/D,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,yDAAyD;IACzD,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,eAAe,GACvB,cAAc,CAgChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,eAAe,GACvB,cAAc,CAWhB"}
@@ -1,7 +1,29 @@
1
+ /** Default origin used by a local Ollama installation. */
1
2
  export declare const DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434";
3
+ /**
4
+ * Normalizes an Ollama origin for use with `/api/*` endpoints.
5
+ *
6
+ * @param baseUrl - Ollama origin, optionally ending in `/` or `/api`.
7
+ * @returns The origin without trailing slashes or a trailing `/api`.
8
+ */
2
9
  export declare function normalizeOllamaBaseUrl(baseUrl?: string): string;
10
+ /**
11
+ * Builds an absolute URL for an Ollama API endpoint.
12
+ *
13
+ * @param baseUrl - Ollama origin. Defaults to
14
+ * {@link DEFAULT_OLLAMA_BASE_URL}.
15
+ * @param path - Endpoint path beginning with `/api/`.
16
+ * @returns An absolute endpoint URL.
17
+ */
3
18
  export declare function buildOllamaApiUrl(baseUrl: string | undefined, path: `/api/${string}`): string;
19
+ /**
20
+ * Indicates that a browser could not reach Ollama, commonly because its CORS
21
+ * origin allowlist rejected the request.
22
+ */
4
23
  export declare class OllamaCorsError extends Error {
24
+ /**
25
+ * @param cause - Original network error.
26
+ */
5
27
  constructor(cause: unknown);
6
28
  }
7
29
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/llm/providers/ollama/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,EAAE,QAAQ,MAAM,EAAE,GACrB,MAAM,CAER;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,KAAK,EAAE,OAAO,EAOzB;CACF"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/llm/providers/ollama/utils.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,IAAI,EAAE,QAAQ,MAAM,EAAE,GACrB,MAAM,CAER;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC;;OAEG;IACH,YAAY,KAAK,EAAE,OAAO,EAOzB;CACF"}
@@ -1,8 +1,15 @@
1
1
  import type { LlmStreamEvent, ProviderConfig, ProviderMessage, ProviderTool } from "../types.js";
2
- /** Structured HTTP error from an LLM provider fetch (preserves status + JSON body). */
2
+ /** HTTP error returned by an LLM provider request. */
3
3
  export declare class LlmRequestError extends Error {
4
+ /** HTTP response status. */
4
5
  readonly status: number;
6
+ /** Parsed JSON response body, or the raw response text. */
5
7
  readonly body?: unknown;
8
+ /**
9
+ * @param status - HTTP response status.
10
+ * @param message - Error message.
11
+ * @param body - Parsed or raw provider response body.
12
+ */
6
13
  constructor(status: number, message: string, body?: unknown);
7
14
  }
8
15
  interface ChatParams {
@@ -1 +1 @@
1
- {"version":3,"file":"openai-chat-completions.d.ts","sourceRoot":"","sources":["../../../src/llm/providers/openai-chat-completions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACb,MAAM,aAAa,CAAC;AAGrB,uFAAuF;AACvF,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB,YAAY,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAK1D;CACF;AAmBD,UAAU,UAAU;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA2BD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAoDvE;AAED,wBAAuB,UAAU,CAC/B,MAAM,EAAE,UAAU,GACjB,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAmI/C;AAED,wBAAsB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAC;CAC1E,CAAC,CAiDD"}
1
+ {"version":3,"file":"openai-chat-completions.d.ts","sourceRoot":"","sources":["../../../src/llm/providers/openai-chat-completions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACb,MAAM,aAAa,CAAC;AAGrB,sDAAsD;AACtD,qBAAa,eAAgB,SAAQ,KAAK;IACxC,4BAA4B;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,YAAY,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAK1D;CACF;AAmBD,UAAU,UAAU;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA2BD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAoDvE;AAED,wBAAuB,UAAU,CAC/B,MAAM,EAAE,UAAU,GACjB,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAmI/C;AAED,wBAAsB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAC;CAC1E,CAAC,CAiDD"}
@@ -3,17 +3,25 @@
3
3
  *
4
4
  * These replace the langchain BaseMessage / StreamEvent types that the
5
5
  * inspector previously depended on. The goal is to keep the inspector free
6
- * of any @langchain/* or langchain runtime imports so that consumers of
7
- * @mcp-use/inspector (and, transitively, of mcp-use) do not need to install
6
+ * of any `@langchain/*` or langchain runtime imports so that consumers of
7
+ * `@mcp-use/inspector` (and, transitively, of mcp-use) do not need to install
8
8
  * langchain to bundle their apps.
9
9
  */
10
+ /** LLM providers supported by the native agent runtime. */
10
11
  export type ProviderName = "openai" | "openai-compatible" | "anthropic" | "google" | "openrouter" | "ollama";
12
+ /** Provider-neutral model and HTTP request configuration. */
11
13
  export interface ProviderConfig {
14
+ /** Provider implementation used for requests. */
12
15
  provider: ProviderName;
16
+ /** Provider-specific model identifier. */
13
17
  model: string;
18
+ /** Provider API key. Ollama may use an empty string. */
14
19
  apiKey: string;
20
+ /** Sampling temperature forwarded to the provider. */
15
21
  temperature?: number;
22
+ /** Maximum number of output tokens requested from the provider. */
16
23
  maxTokens?: number;
24
+ /** Provider API base URL override. */
17
25
  baseUrl?: string;
18
26
  /** Extra HTTP headers to merge into every request (e.g. OpenRouter's HTTP-Referer). */
19
27
  extraHeaders?: Record<string, string>;
@@ -22,7 +30,9 @@ export interface ProviderConfig {
22
30
  /** Responses API reasoning effort (direct OpenAI provider). */
23
31
  reasoningEffort?: "none" | "low" | "medium" | "high";
24
32
  }
33
+ /** Image content supplied to a multimodal model. */
25
34
  export interface ImageContentPart {
35
+ /** Content discriminator. */
26
36
  type: "image";
27
37
  /** Full data URL (`data:image/png;base64,...`) or raw https URL. */
28
38
  url: string;
@@ -31,10 +41,14 @@ export interface ImageContentPart {
31
41
  /** Base64 payload without the data-URL prefix (when available). */
32
42
  data?: string;
33
43
  }
44
+ /** Text content supplied to a model. */
34
45
  export interface TextContentPart {
46
+ /** Content discriminator. */
35
47
  type: "text";
48
+ /** Plain-text content. */
36
49
  text: string;
37
50
  }
51
+ /** Text or image content in a provider message. */
38
52
  export type ContentPart = TextContentPart | ImageContentPart;
39
53
  /**
40
54
  * Provider-neutral message shape. Each provider module is responsible for
@@ -42,6 +56,7 @@ export type ContentPart = TextContentPart | ImageContentPart;
42
56
  * messages, Gemini generateContent).
43
57
  */
44
58
  export interface ProviderMessage {
59
+ /** Message role in the provider-neutral conversation. */
45
60
  role: "system" | "user" | "assistant" | "tool";
46
61
  /** Text content, OR a list of rich content parts (for multimodal input). */
47
62
  content: string | ContentPart[];
@@ -49,68 +64,120 @@ export interface ProviderMessage {
49
64
  toolCalls?: ProviderToolCall[];
50
65
  /** Tool result payload (tool messages only). */
51
66
  toolCallId?: string;
67
+ /** Tool name associated with a tool result. */
52
68
  toolName?: string;
69
+ /** Raw result returned by the MCP tool. */
53
70
  toolResult?: unknown;
71
+ /** Whether the MCP tool reported an error. */
54
72
  toolIsError?: boolean;
55
73
  }
74
+ /** Tool call requested by a model. */
56
75
  export interface ProviderToolCall {
76
+ /** Provider-generated call identifier. */
57
77
  id: string;
78
+ /** Tool name exposed to the model. */
58
79
  name: string;
80
+ /** Parsed tool arguments. */
59
81
  args: Record<string, unknown>;
60
82
  }
83
+ /** Provider-neutral tool definition supplied to a model. */
61
84
  export interface ProviderTool {
85
+ /** Tool name exposed to the model. */
62
86
  name: string;
87
+ /** Human-readable tool description. */
63
88
  description?: string;
64
89
  /** JSON Schema object describing the tool's input. */
65
90
  inputSchema: Record<string, unknown>;
66
91
  }
92
+ /** Token counts reported by an LLM provider. */
67
93
  export interface TokenUsage {
94
+ /** Tokens read from the request. */
68
95
  inputTokens?: number;
96
+ /** Tokens generated in the response. */
69
97
  outputTokens?: number;
98
+ /** Total input and output tokens. */
70
99
  totalTokens?: number;
100
+ /** Input tokens served from a provider cache. */
71
101
  cachedInputTokens?: number;
102
+ /** Tokens used for model reasoning. */
72
103
  reasoningTokens?: number;
73
104
  }
74
- /**
75
- * Stream events emitted by the tool loop. These replace LangChain's
76
- * `on_chat_model_stream`, `on_tool_start`, `on_tool_end` events. The shape
77
- * is deliberately narrow and tailored to what the inspector UI needs.
78
- */
79
- export type LlmStreamEvent = {
105
+ /** Text emitted by the model. */
106
+ export interface LlmTextDeltaEvent {
107
+ /** Event discriminator. */
80
108
  type: "text-delta";
109
+ /** Incremental text. */
81
110
  delta: string;
82
- } | {
111
+ }
112
+ /** Start of a model-requested tool call. */
113
+ export interface LlmToolCallStartEvent {
114
+ /** Event discriminator. */
83
115
  type: "tool-call-start";
84
- /** Stable per-turn index so multiple parallel calls can be tracked. */
116
+ /** Stable per-turn index for tracking parallel calls. */
85
117
  index: number;
118
+ /** Provider-generated tool call identifier. */
86
119
  toolCallId: string;
120
+ /** Tool name exposed to the model. */
87
121
  toolName: string;
88
- } | {
122
+ }
123
+ /** Incremental JSON arguments for a model-requested tool call. */
124
+ export interface LlmToolCallArgsDeltaEvent {
125
+ /** Event discriminator. */
89
126
  type: "tool-call-args-delta";
127
+ /** Stable per-turn index for tracking parallel calls. */
90
128
  index: number;
129
+ /** Provider-generated tool call identifier. */
91
130
  toolCallId: string;
131
+ /** Tool name exposed to the model. */
92
132
  toolName: string;
93
- /** Partial JSON fragment. Concatenate across deltas, then parse. */
133
+ /** Partial JSON fragment. Concatenate all fragments before parsing. */
94
134
  argsDelta: string;
95
- } | {
135
+ }
136
+ /** A tool call with complete, parsed arguments. */
137
+ export interface LlmToolCallReadyEvent {
138
+ /** Event discriminator. */
96
139
  type: "tool-call-ready";
140
+ /** Stable per-turn index for tracking parallel calls. */
97
141
  index: number;
142
+ /** Provider-generated tool call identifier. */
98
143
  toolCallId: string;
144
+ /** Tool name exposed to the model. */
99
145
  toolName: string;
146
+ /** Parsed tool arguments. */
100
147
  args: Record<string, unknown>;
101
- } | {
148
+ }
149
+ /** Result of an MCP tool invocation. */
150
+ export interface LlmToolResultEvent {
151
+ /** Event discriminator. */
102
152
  type: "tool-result";
153
+ /** Provider-generated tool call identifier. */
103
154
  toolCallId: string;
155
+ /** Invoked tool name. */
104
156
  toolName: string;
157
+ /** Raw MCP tool result. */
105
158
  result: unknown;
159
+ /** Whether the tool reported an error. */
106
160
  isError: boolean;
107
- } | {
161
+ }
162
+ /** Token usage reported by the provider. */
163
+ export interface LlmUsageEvent {
164
+ /** Event discriminator. */
108
165
  type: "usage";
166
+ /** Provider-normalized token counts. */
109
167
  usage: TokenUsage;
110
- } | {
168
+ }
169
+ /** Error emitted during streaming. */
170
+ export interface LlmErrorEvent {
171
+ /** Event discriminator. */
111
172
  type: "error";
173
+ /** Human-readable error message. */
112
174
  message: string;
113
- } | {
175
+ }
176
+ /** Indicates that the tool loop finished. */
177
+ export interface LlmDoneEvent {
178
+ /** Event discriminator. */
114
179
  type: "done";
115
- };
180
+ }
181
+ /** Provider-neutral event emitted by the native agent tool loop. */
182
+ export type LlmStreamEvent = LlmTextDeltaEvent | LlmToolCallStartEvent | LlmToolCallArgsDeltaEvent | LlmToolCallReadyEvent | LlmToolResultEvent | LlmUsageEvent | LlmErrorEvent | LlmDoneEvent;
116
183
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/llm/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,YAAY,GACpB,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,kFAAkF;IAClF,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CACtD;AAED,MAAM,WAA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,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oEAAoE;AACpE,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,qBAAqB,GACrB,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,aAAa,GACb,aAAa,GACb,YAAY,CAAC"}
@@ -2,18 +2,48 @@ import type { StructuredToolInterface } from "@langchain/core/tools";
2
2
  import type { LangChainAdapter } from "../adapters/langchain_adapter.js";
3
3
  import type { MCPClient } from "@mcp-use/client";
4
4
  import type { IServerManager } from "./types.js";
5
+ /** Selects an active MCP server and exposes its LangChain tools. */
5
6
  export declare class ServerManager implements IServerManager {
7
+ /** Whether capabilities have been loaded for each configured server. */
6
8
  readonly initializedServers: Record<string, boolean>;
9
+ /** Cached LangChain tools, resources, and prompts by server name. */
7
10
  readonly serverTools: Record<string, StructuredToolInterface[]>;
11
+ /** MCP client that owns server configurations and sessions. */
8
12
  readonly client: MCPClient;
13
+ /** Adapter used to create LangChain tools. */
9
14
  readonly adapter: LangChainAdapter;
15
+ /** Server whose cached tools are currently exposed. */
10
16
  activeServer: string | null;
11
17
  private overrideManagementTools?;
18
+ /**
19
+ * @param client - MCP client that owns the managed servers.
20
+ * @param adapter - Adapter used to convert MCP capabilities.
21
+ * @param managementTools - Optional replacement for the built-in server
22
+ * management tools.
23
+ */
12
24
  constructor(client: MCPClient, adapter: LangChainAdapter, managementTools?: StructuredToolInterface[]);
25
+ /**
26
+ * Replaces the management tools returned by {@link ServerManager.tools}.
27
+ *
28
+ * @param tools - Complete replacement tool list.
29
+ */
13
30
  setManagementTools(tools: StructuredToolInterface[]): void;
31
+ /**
32
+ * Writes current connection and tool-cache state at debug level.
33
+ *
34
+ * @param context - Label describing why the state was logged.
35
+ */
14
36
  logState(context: string): void;
37
+ /** Validates that the client contains at least one server configuration. */
15
38
  initialize(): void;
39
+ /**
40
+ * Connects configured servers as needed and caches all tools, resources, and
41
+ * prompts.
42
+ */
16
43
  prefetchServerTools(): Promise<void>;
44
+ /**
45
+ * @returns Management tools plus cached tools from the active server, if any.
46
+ */
17
47
  get tools(): StructuredToolInterface[];
18
48
  }
19
49
  //# sourceMappingURL=server_manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server_manager.d.ts","sourceRoot":"","sources":["../../src/managers/server_manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAmDjD,qBAAa,aAAc,YAAW,cAAc;IAClD,SAAgB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACjE,SAAgB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAAM;IAE5E,SAAgB,MAAM,EAAE,SAAS,CAAC;IAClC,SAAgB,OAAO,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1C,OAAO,CAAC,uBAAuB,CAAC,CAA4B;IAE5D,YACE,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,gBAAgB,EACzB,eAAe,CAAC,EAAE,uBAAuB,EAAE,EAK5C;IAEM,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAKhE;IAEM,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAmBrC;IAED,UAAU,IAAI,IAAI,CAKjB;IAEK,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAsEzC;IAED,IAAI,KAAK,IAAI,uBAAuB,EAAE,CAsBrC;CACF"}
1
+ {"version":3,"file":"server_manager.d.ts","sourceRoot":"","sources":["../../src/managers/server_manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAmDjD,oEAAoE;AACpE,qBAAa,aAAc,YAAW,cAAc;IAClD,wEAAwE;IACxE,SAAgB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACjE,qEAAqE;IACrE,SAAgB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAAM;IAE5E,+DAA+D;IAC/D,SAAgB,MAAM,EAAE,SAAS,CAAC;IAClC,8CAA8C;IAC9C,SAAgB,OAAO,EAAE,gBAAgB,CAAC;IAC1C,uDAAuD;IAChD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1C,OAAO,CAAC,uBAAuB,CAAC,CAA4B;IAE5D;;;;;OAKG;IACH,YACE,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,gBAAgB,EACzB,eAAe,CAAC,EAAE,uBAAuB,EAAE,EAK5C;IAED;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAKhE;IAED;;;;OAIG;IACI,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAmBrC;IAED,4EAA4E;IAC5E,UAAU,IAAI,IAAI,CAKjB;IAED;;;OAGG;IACG,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAsEzC;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,uBAAuB,EAAE,CAsBrC;CACF"}
@@ -2,11 +2,16 @@ import type { IServerManager } from "../types.js";
2
2
  import { z } from "zod";
3
3
  import { MCPServerTool } from "./base.js";
4
4
  declare const PresentActiveServerSchema: z.ZodObject<{}, z.core.$strip>;
5
+ /** Reports the MCP server whose tools are currently active. */
5
6
  export declare class AcquireActiveMCPServerTool extends MCPServerTool<typeof PresentActiveServerSchema> {
7
+ /** Tool name exposed to the model. */
6
8
  name: string;
9
+ /** Tool description exposed to the model. */
7
10
  description: string;
11
+ /** Empty input schema. */
8
12
  schema: z.ZodObject<{}, z.core.$strip>;
9
13
  constructor(manager: IServerManager);
14
+ /** @returns A message identifying the active server, or stating there is none. */
10
15
  _call(): Promise<string>;
11
16
  }
12
17
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"acquire_active_mcp_server.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/acquire_active_mcp_server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,yBAAyB,gCAAe,CAAC;AAE/C,qBAAa,0BAA2B,SAAQ,aAAa,CAC3D,OAAO,yBAAyB,CACjC;IACU,IAAI,SAA2B;IAC/B,WAAW,SAC6C;IACxD,MAAM,iCAA6B;IAE5C,YAAY,OAAO,EAAE,cAAc,EAElC;IAEK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAM7B;CACF"}
1
+ {"version":3,"file":"acquire_active_mcp_server.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/acquire_active_mcp_server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,yBAAyB,gCAAe,CAAC;AAE/C,+DAA+D;AAC/D,qBAAa,0BAA2B,SAAQ,aAAa,CAC3D,OAAO,yBAAyB,CACjC;IACC,sCAAsC;IAC7B,IAAI,SAA2B;IACxC,6CAA6C;IACpC,WAAW,SAC6C;IACjE,0BAA0B;IACjB,MAAM,iCAA6B;IAE5C,YAAY,OAAO,EAAE,cAAc,EAElC;IAED,kFAAkF;IAC5E,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAM7B;CACF"}
@@ -1,15 +1,27 @@
1
1
  import type { IServerManager } from "../types.js";
2
2
  import { StructuredTool } from "@langchain/core/tools";
3
3
  import { z } from "zod";
4
+ /** Adds, connects, and activates an MCP server from model-supplied config. */
4
5
  export declare class AddMCPServerFromConfigTool extends StructuredTool {
6
+ /** Tool name exposed to the model. */
5
7
  name: string;
8
+ /** Tool description exposed to the model. */
6
9
  description: string;
10
+ /** Input schema for the server name and transport configuration. */
7
11
  schema: z.ZodObject<{
8
12
  serverName: z.ZodString;
9
13
  serverConfig: z.ZodAny;
10
14
  }, z.core.$strip>;
11
15
  private manager;
16
+ /**
17
+ * @param manager - Server manager that receives the new server.
18
+ */
12
19
  constructor(manager: IServerManager);
20
+ /**
21
+ * Adds the server, opens a session, and makes the server active.
22
+ *
23
+ * @returns A success message with loaded tool names, or an error message.
24
+ */
13
25
  protected _call({ serverName, serverConfig, }: z.infer<typeof this.schema>): Promise<string>;
14
26
  }
15
27
  //# sourceMappingURL=add_server_from_config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add_server_from_config.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/add_server_from_config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,IAAI,SAAgC;IACpC,WAAW,SACyG;IAEpH,MAAM;;;sBAOH;IAEH,OAAO,CAAC,OAAO,CAAiB;IAEhC,YAAY,OAAO,EAAE,cAAc,EAGlC;IAED,UAAgB,KAAK,CAAC,EACpB,UAAU,EACV,YAAY,GACb,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CA2B/C;CACF"}
1
+ {"version":3,"file":"add_server_from_config.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/add_server_from_config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,8EAA8E;AAC9E,qBAAa,0BAA2B,SAAQ,cAAc;IAC5D,sCAAsC;IACtC,IAAI,SAAgC;IACpC,6CAA6C;IAC7C,WAAW,SACyG;IAEpH,oEAAoE;IACpE,MAAM;;;sBASH;IAEH,OAAO,CAAC,OAAO,CAAiB;IAEhC;;OAEG;IACH,YAAY,OAAO,EAAE,cAAc,EAGlC;IAED;;;;OAIG;IACH,UAAgB,KAAK,CAAC,EACpB,UAAU,EACV,YAAY,GACb,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CA2B/C;CACF"}
@@ -7,12 +7,19 @@ import { StructuredTool } from "@langchain/core/tools";
7
7
  type ToolOutputT = any;
8
8
  export type SchemaOutputT<T extends ToolSchemaBase> = T extends z.ZodSchema ? z.output<T> : T extends JSONSchema ? unknown : never;
9
9
  export declare class MCPServerTool<SchemaT extends ToolSchemaBase> extends StructuredTool<SchemaT, SchemaOutputT<SchemaT>> {
10
+ /** Default tool name. Subclasses replace this value. */
10
11
  name: string;
12
+ /** Default tool description. Subclasses replace this value. */
11
13
  description: string;
14
+ /** Input schema supplied by the concrete management tool. */
12
15
  schema: SchemaT;
13
16
  private readonly _manager;
17
+ /**
18
+ * @param manager - Server manager operated by this tool.
19
+ */
14
20
  constructor(manager: IServerManager);
15
21
  protected _call(_arg: SchemaOutputT<SchemaT>, _runManager?: CallbackManagerForToolRun, _parentConfig?: ToolRunnableConfig): Promise<ToolOutputT>;
22
+ /** @returns The server manager operated by this tool. */
16
23
  get manager(): IServerManager;
17
24
  }
18
25
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,KAAK,WAAW,GAAG,GAAG,CAAC;AACvB,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,GACvE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GACX,CAAC,SAAS,UAAU,GAClB,OAAO,GACP,KAAK,CAAC;AAEZ,qBAAa,aAAa,CACxB,OAAO,SAAS,cAAc,CAC9B,SAAQ,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,EAAE,MAAM,CAAqB;IACjC,WAAW,EAAE,MAAM,CAA0C;IAC7D,MAAM,EAAG,OAAO,CAAC;IAE1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAE1C,YAAY,OAAO,EAAE,cAAc,EAGlC;IAED,UAAgB,KAAK,CACnB,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,EAC5B,WAAW,CAAC,EAAE,yBAAyB,EACvC,aAAa,CAAC,EAAE,kB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yD;IACzD,IAAI,OAAO,IAAI,cAAc,CAE5B;CACF"}
@@ -5,13 +5,22 @@ import { MCPServerTool } from "./base.js";
5
5
  declare const ConnectMCPServerSchema: z.ZodObject<{
6
6
  serverName: z.ZodString;
7
7
  }, z.core.$strip>;
8
+ /** Activates a configured MCP server and exposes its capabilities. */
8
9
  export declare class ConnectMCPServerTool extends MCPServerTool<typeof ConnectMCPServerSchema> {
10
+ /** Tool name exposed to the model. */
9
11
  name: string;
12
+ /** Tool description exposed to the model. */
10
13
  description: string;
14
+ /** Input schema containing the server name. */
11
15
  schema: z.ZodObject<{
12
16
  serverName: z.ZodString;
13
17
  }, z.core.$strip>;
14
18
  constructor(manager: IServerManager);
19
+ /**
20
+ * Activates a configured server and loads its capabilities if needed.
21
+ *
22
+ * @returns A human-readable success or error message.
23
+ */
15
24
  _call({ serverName }: SchemaOutputT<typeof ConnectMCPServerSchema>): Promise<string>;
16
25
  }
17
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"connect_mcp_server.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/connect_mcp_server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,sBAAsB;;iBAE1B,CAAC;AAEH,qBAAa,oBAAqB,SAAQ,aAAa,CACrD,OAAO,sBAAsB,CAC9B;IACU,IAAI,SAA2B;IAC/B,WAAW,SAC6H;IACxI,MAAM;;sBAA0B;IAEzC,YAAY,OAAO,EAAE,cAAc,EAElC;IAEK,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,aAAa,CAAC,OAAO,sBAAsB,CAAC,mBA+CvE;CACF"}
1
+ {"version":3,"file":"connect_mcp_server.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/connect_mcp_server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,sBAAsB;;iBAG1B,CAAC;AAEH,sEAAsE;AACtE,qBAAa,oBAAqB,SAAQ,aAAa,CACrD,OAAO,sBAAsB,CAC9B;IACC,sCAAsC;IAC7B,IAAI,SAA2B;IACxC,6CAA6C;IACpC,WAAW,SAC6H;IACjJ,+CAA+C;IACtC,MAAM;;sBAA0B;IAEzC,YAAY,OAAO,EAAE,cAAc,EAElC;IAED;;;;OAIG;IACG,KAAK,CAAC,EAAE,UAAU,EAAE,EAAE,aAAa,CAAC,OAAO,sBAAsB,CAAC,mBA+CvE;CACF"}
@@ -2,11 +2,16 @@ import type { IServerManager } from "../types.js";
2
2
  import { z } from "zod";
3
3
  import { MCPServerTool } from "./base.js";
4
4
  declare const EnumerateServersSchema: z.ZodObject<{}, z.core.$strip>;
5
+ /** Lists configured MCP servers and their cached capability counts. */
5
6
  export declare class ListMCPServersTool extends MCPServerTool<typeof EnumerateServersSchema> {
7
+ /** Tool name exposed to the model. */
6
8
  name: string;
9
+ /** Tool description exposed to the model. */
7
10
  description: string;
11
+ /** Empty input schema. */
8
12
  schema: z.ZodObject<{}, z.core.$strip>;
9
13
  constructor(manager: IServerManager);
14
+ /** @returns A formatted list of configured servers and capability counts. */
10
15
  _call(): Promise<string>;
11
16
  }
12
17
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"list_mcp_servers.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/list_mcp_servers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,sBAAsB,gCAAe,CAAC;AAE5C,qBAAa,kBAAmB,SAAQ,aAAa,CACnD,OAAO,sBAAsB,CAC9B;IACU,IAAI,SAAsB;IAC1B,WAAW,SAAkN;IAC7N,MAAM,iCAA0B;IAEzC,YAAY,OAAO,EAAE,cAAc,EAElC;IAEK,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CA0B7B;CACF"}
1
+ {"version":3,"file":"list_mcp_servers.d.ts","sourceRoot":"","sources":["../../../src/managers/tools/list_mcp_servers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,QAAA,MAAM,sBAAsB,gCAAe,CAAC;AAE5C,uEAAuE;AACvE,qBAAa,kBAAmB,SAAQ,aAAa,CACnD,OAAO,sBAAsB,CAC9B;IACC,sCAAsC;IAC7B,IAAI,SAAsB;IACnC,6CAA6C;IACpC,WAAW,SAAkN;IACtO,0BAA0B;IACjB,MAAM,iCAA0B;IAEzC,YAAY,OAAO,EAAE,cAAc,EAElC;IAED,6EAA6E;IACvE,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CA0B7B;CACF"}