@crewai-ts/core 0.1.2 → 0.1.3
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/dist/a2a.d.ts +1684 -0
- package/dist/a2ui-schemas.d.ts +3312 -0
- package/dist/a2ui.d.ts +379 -0
- package/dist/agent-adapters.d.ts +178 -0
- package/dist/agent-executors.d.ts +508 -0
- package/dist/agent-parser.d.ts +44 -0
- package/dist/agent-planning.d.ts +358 -0
- package/dist/agent-utils.d.ts +210 -0
- package/dist/agent.d.ts +444 -0
- package/dist/auth.d.ts +179 -0
- package/dist/config-utils.d.ts +5 -0
- package/dist/content-processor.d.ts +12 -0
- package/dist/context.d.ts +157 -0
- package/dist/converter.d.ts +97 -0
- package/dist/crew-chat.d.ts +97 -0
- package/dist/crew.d.ts +424 -0
- package/dist/decorators.d.ts +20 -0
- package/dist/env.d.ts +13 -0
- package/dist/errors.d.ts +27 -0
- package/dist/evaluators.d.ts +477 -0
- package/dist/events.d.ts +2657 -0
- package/dist/execution-utils.d.ts +85 -0
- package/dist/experimental-conversational.d.ts +181 -0
- package/dist/file-handler.d.ts +36 -0
- package/dist/file-store.d.ts +37 -0
- package/dist/files.d.ts +554 -0
- package/dist/flow-conversation.d.ts +90 -0
- package/dist/flow-definition.d.ts +195 -0
- package/dist/flow-persistence.d.ts +107 -0
- package/dist/flow-visualization.d.ts +77 -0
- package/dist/flow.d.ts +927 -0
- package/dist/formatter.d.ts +7 -0
- package/dist/guardrail.d.ts +95 -0
- package/dist/hooks.d.ts +241 -0
- package/dist/human-input.d.ts +74 -0
- package/dist/i18n.d.ts +26 -0
- package/dist/index.d.ts +99 -13004
- package/dist/input-files.d.ts +24 -0
- package/dist/input-provider.d.ts +22 -0
- package/dist/knowledge.d.ts +353 -0
- package/dist/lite-agent-output.d.ts +69 -0
- package/dist/lite-agent.d.ts +154 -0
- package/dist/llm.d.ts +630 -0
- package/dist/llms-hooks-transport.d.ts +1 -2
- package/dist/lock-store.d.ts +14 -0
- package/dist/logger.d.ts +55 -0
- package/dist/mcp.d.ts +315 -0
- package/dist/memory.d.ts +915 -0
- package/dist/metadata.d.ts +9 -0
- package/dist/misc-compat.d.ts +125 -0
- package/dist/openai-completion.d.ts +324 -0
- package/dist/outputs.d.ts +69 -0
- package/dist/planning.d.ts +60 -0
- package/dist/plus-api.d.ts +194 -0
- package/dist/project-compat.d.ts +133 -0
- package/dist/project.d.ts +221 -0
- package/dist/prompts.d.ts +66 -0
- package/dist/provider-completions.d.ts +593 -0
- package/dist/rag.d.ts +1074 -0
- package/dist/rpm.d.ts +27 -0
- package/dist/rw-lock.d.ts +21 -0
- package/dist/schema-utils.d.ts +121 -0
- package/dist/security.d.ts +66 -0
- package/dist/settings.d.ts +103 -0
- package/dist/skills.d.ts +145 -0
- package/dist/state-provider-core.d.ts +1 -1
- package/dist/state.d.ts +204 -0
- package/dist/step-execution-context.d.ts +36 -0
- package/dist/streaming.d.ts +153 -0
- package/dist/string-utils.d.ts +12 -0
- package/dist/task-output-storage.d.ts +62 -0
- package/dist/task.d.ts +305 -0
- package/dist/telemetry.d.ts +91 -0
- package/dist/token-counter-callback.d.ts +36 -0
- package/dist/tools.d.ts +563 -0
- package/dist/tracing-utils.d.ts +56 -0
- package/dist/training-converter.d.ts +36 -0
- package/dist/training-handler.d.ts +10 -0
- package/dist/types.d.ts +72 -0
- package/dist/utilities.d.ts +130 -0
- package/dist/utility-types.d.ts +10 -0
- package/dist/version.d.ts +12 -0
- package/package.json +326 -4904
- package/dist/index.d.cts +0 -13068
- package/dist/llms-hooks-transport-ChGiFBiU.d.ts +0 -233
- package/dist/llms-hooks-transport-DZlurMUQ.d.cts +0 -233
- package/dist/llms-hooks-transport.d.cts +0 -2
- package/dist/state-provider-core-Be9RKRAm.d.cts +0 -4876
- package/dist/state-provider-core-Be9RKRAm.d.ts +0 -4876
- package/dist/state-provider-core.d.cts +0 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import './state-provider-core-Be9RKRAm.js';
|
|
1
|
+
export { AsyncHTTPTransport, HTTPTransport, HTTPTransportKwargs, type HTTPTransportKwargs as HTTPTransportKwargsType, } from "./hooks.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type LockBackend = <T>(name: string, fn: () => T | Promise<T>, options: {
|
|
2
|
+
timeout: number;
|
|
3
|
+
}) => T | Promise<T>;
|
|
4
|
+
export declare function lock<T>(name: string, fn: () => T | Promise<T>, options?: {
|
|
5
|
+
timeout?: number;
|
|
6
|
+
}): Promise<T>;
|
|
7
|
+
export declare const withLock: typeof lock;
|
|
8
|
+
export declare const with_lock: typeof lock;
|
|
9
|
+
export declare function setLockBackend(backend: LockBackend | null): void;
|
|
10
|
+
export declare const set_lock_backend: typeof setLockBackend;
|
|
11
|
+
export declare function clearNamedLocks(): void;
|
|
12
|
+
export declare const clear_named_locks: typeof clearNamedLocks;
|
|
13
|
+
export declare function getLockName(name: string): string;
|
|
14
|
+
export declare const get_lock_name: typeof getLockName;
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type PrinterColor = "purple" | "bold_purple" | "green" | "bold_green" | "cyan" | "bold_cyan" | "magenta" | "bold_magenta" | "yellow" | "bold_yellow" | "red" | "blue" | "bold_blue";
|
|
2
|
+
export declare const PrinterColor: Readonly<{
|
|
3
|
+
readonly purple: "purple";
|
|
4
|
+
readonly bold_purple: "bold_purple";
|
|
5
|
+
readonly green: "green";
|
|
6
|
+
readonly bold_green: "bold_green";
|
|
7
|
+
readonly cyan: "cyan";
|
|
8
|
+
readonly bold_cyan: "bold_cyan";
|
|
9
|
+
readonly magenta: "magenta";
|
|
10
|
+
readonly bold_magenta: "bold_magenta";
|
|
11
|
+
readonly yellow: "yellow";
|
|
12
|
+
readonly bold_yellow: "bold_yellow";
|
|
13
|
+
readonly red: "red";
|
|
14
|
+
readonly blue: "blue";
|
|
15
|
+
readonly bold_blue: "bold_blue";
|
|
16
|
+
}>;
|
|
17
|
+
export type ColoredText = {
|
|
18
|
+
text: string;
|
|
19
|
+
color?: PrinterColor | null;
|
|
20
|
+
};
|
|
21
|
+
export declare const ColoredText: Readonly<{
|
|
22
|
+
kind: "ColoredText";
|
|
23
|
+
}>;
|
|
24
|
+
export type LoggerOptions = {
|
|
25
|
+
verbose?: boolean;
|
|
26
|
+
defaultColor?: PrinterColor;
|
|
27
|
+
default_color?: PrinterColor;
|
|
28
|
+
writer?: (message: string) => void;
|
|
29
|
+
};
|
|
30
|
+
export declare class Logger {
|
|
31
|
+
verbose: boolean;
|
|
32
|
+
defaultColor: PrinterColor;
|
|
33
|
+
default_color: PrinterColor;
|
|
34
|
+
private readonly writer;
|
|
35
|
+
constructor(options?: LoggerOptions);
|
|
36
|
+
log(level: string, message: string, color?: PrinterColor | null): void;
|
|
37
|
+
}
|
|
38
|
+
export declare class Printer {
|
|
39
|
+
private readonly writer;
|
|
40
|
+
constructor(writer?: (message: string) => void);
|
|
41
|
+
print(content: string | readonly ColoredText[], color?: PrinterColor | null, _sep?: string, end?: string): void;
|
|
42
|
+
}
|
|
43
|
+
export declare const PRINTER: Printer;
|
|
44
|
+
export declare function setSuppressConsoleOutput(suppress: boolean): boolean;
|
|
45
|
+
export declare const set_suppress_console_output: typeof setSuppressConsoleOutput;
|
|
46
|
+
export declare function shouldSuppressConsoleOutput(): boolean;
|
|
47
|
+
export declare const should_suppress_console_output: typeof shouldSuppressConsoleOutput;
|
|
48
|
+
export declare function suppressLogging<T>(fn: () => T | Promise<T>): Promise<T>;
|
|
49
|
+
export declare const suppress_logging: typeof suppressLogging;
|
|
50
|
+
export declare function suppressWarnings<T>(fn: () => T | Promise<T>): Promise<T>;
|
|
51
|
+
export declare const suppress_warnings: typeof suppressWarnings;
|
|
52
|
+
export declare function withSuppressedOutput<T>(fn: () => T | Promise<T>): Promise<T>;
|
|
53
|
+
export declare const with_suppressed_output: typeof withSuppressedOutput;
|
|
54
|
+
export declare function renderColoredText(parts: readonly ColoredText[], colorize?: boolean): string;
|
|
55
|
+
export declare const render_colored_text: typeof renderColoredText;
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
+
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
3
|
+
import { type BaseTool } from "./tools.js";
|
|
4
|
+
export declare const TransportType: {
|
|
5
|
+
readonly STDIO: "stdio";
|
|
6
|
+
readonly HTTP: "http";
|
|
7
|
+
readonly STREAMABLE_HTTP: "streamable-http";
|
|
8
|
+
readonly SSE: "sse";
|
|
9
|
+
};
|
|
10
|
+
export type TransportType = typeof TransportType[keyof typeof TransportType];
|
|
11
|
+
export type MCPToolDefinition = Record<string, unknown> & {
|
|
12
|
+
name?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const MCPReadStream: Readonly<{
|
|
15
|
+
kind: "MCPReadStream";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const MCPWriteStream: Readonly<{
|
|
18
|
+
kind: "MCPWriteStream";
|
|
19
|
+
}>;
|
|
20
|
+
export type ToolFilterContextOptions = {
|
|
21
|
+
agent: unknown;
|
|
22
|
+
serverName?: string;
|
|
23
|
+
server_name?: string;
|
|
24
|
+
runContext?: Record<string, unknown> | null;
|
|
25
|
+
run_context?: Record<string, unknown> | null;
|
|
26
|
+
};
|
|
27
|
+
export declare class ToolFilterContext {
|
|
28
|
+
readonly agent: unknown;
|
|
29
|
+
readonly serverName: string;
|
|
30
|
+
readonly server_name: string;
|
|
31
|
+
readonly runContext: Record<string, unknown> | null;
|
|
32
|
+
readonly run_context: Record<string, unknown> | null;
|
|
33
|
+
constructor(options: ToolFilterContextOptions);
|
|
34
|
+
}
|
|
35
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
36
|
+
export type ToolFilter = ((tool: MCPToolDefinition) => MaybePromise<boolean>) | ((context: ToolFilterContext, tool: MCPToolDefinition) => MaybePromise<boolean>);
|
|
37
|
+
export declare const ToolFilter: Readonly<{
|
|
38
|
+
kind: "ToolFilter";
|
|
39
|
+
}>;
|
|
40
|
+
export declare class StaticToolFilter {
|
|
41
|
+
readonly allowedToolNames: ReadonlySet<string>;
|
|
42
|
+
readonly allowed_tool_names: ReadonlySet<string>;
|
|
43
|
+
readonly blockedToolNames: ReadonlySet<string>;
|
|
44
|
+
readonly blocked_tool_names: ReadonlySet<string>;
|
|
45
|
+
constructor(options?: {
|
|
46
|
+
allowedToolNames?: readonly string[] | null;
|
|
47
|
+
allowed_tool_names?: readonly string[] | null;
|
|
48
|
+
blockedToolNames?: readonly string[] | null;
|
|
49
|
+
blocked_tool_names?: readonly string[] | null;
|
|
50
|
+
});
|
|
51
|
+
filter(tool: MCPToolDefinition): boolean;
|
|
52
|
+
call(tool: MCPToolDefinition): boolean;
|
|
53
|
+
__call__(tool: MCPToolDefinition): boolean;
|
|
54
|
+
}
|
|
55
|
+
export declare function createStaticToolFilter(allowedToolNames?: readonly string[] | null, blockedToolNames?: readonly string[] | null): (tool: MCPToolDefinition) => boolean;
|
|
56
|
+
export declare const create_static_tool_filter: typeof createStaticToolFilter;
|
|
57
|
+
export declare function createDynamicToolFilter<TFilter extends (context: ToolFilterContext, tool: MCPToolDefinition) => MaybePromise<boolean>>(filterFunc: TFilter): TFilter;
|
|
58
|
+
export declare const create_dynamic_tool_filter: typeof createDynamicToolFilter;
|
|
59
|
+
export type MCPServerStdioOptions = {
|
|
60
|
+
command: string;
|
|
61
|
+
args?: readonly string[];
|
|
62
|
+
env?: Record<string, string> | null;
|
|
63
|
+
toolFilter?: ToolFilter | null;
|
|
64
|
+
tool_filter?: ToolFilter | null;
|
|
65
|
+
cacheToolsList?: boolean;
|
|
66
|
+
cache_tools_list?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export declare class MCPServerStdio {
|
|
69
|
+
readonly command: string;
|
|
70
|
+
readonly args: readonly string[];
|
|
71
|
+
readonly env: Record<string, string> | null;
|
|
72
|
+
readonly toolFilter: ToolFilter | null;
|
|
73
|
+
readonly tool_filter: ToolFilter | null;
|
|
74
|
+
readonly cacheToolsList: boolean;
|
|
75
|
+
readonly cache_tools_list: boolean;
|
|
76
|
+
constructor(options: MCPServerStdioOptions);
|
|
77
|
+
}
|
|
78
|
+
export type MCPServerHTTPOptions = {
|
|
79
|
+
url: string;
|
|
80
|
+
headers?: Record<string, string> | null;
|
|
81
|
+
streamable?: boolean;
|
|
82
|
+
toolFilter?: ToolFilter | null;
|
|
83
|
+
tool_filter?: ToolFilter | null;
|
|
84
|
+
cacheToolsList?: boolean;
|
|
85
|
+
cache_tools_list?: boolean;
|
|
86
|
+
};
|
|
87
|
+
export declare class MCPServerHTTP {
|
|
88
|
+
readonly url: string;
|
|
89
|
+
readonly headers: Record<string, string> | null;
|
|
90
|
+
readonly streamable: boolean;
|
|
91
|
+
readonly toolFilter: ToolFilter | null;
|
|
92
|
+
readonly tool_filter: ToolFilter | null;
|
|
93
|
+
readonly cacheToolsList: boolean;
|
|
94
|
+
readonly cache_tools_list: boolean;
|
|
95
|
+
constructor(options: MCPServerHTTPOptions);
|
|
96
|
+
}
|
|
97
|
+
export type MCPServerSSEOptions = {
|
|
98
|
+
url: string;
|
|
99
|
+
headers?: Record<string, string> | null;
|
|
100
|
+
toolFilter?: ToolFilter | null;
|
|
101
|
+
tool_filter?: ToolFilter | null;
|
|
102
|
+
cacheToolsList?: boolean;
|
|
103
|
+
cache_tools_list?: boolean;
|
|
104
|
+
};
|
|
105
|
+
export declare class MCPServerSSE {
|
|
106
|
+
readonly url: string;
|
|
107
|
+
readonly headers: Record<string, string> | null;
|
|
108
|
+
readonly toolFilter: ToolFilter | null;
|
|
109
|
+
readonly tool_filter: ToolFilter | null;
|
|
110
|
+
readonly cacheToolsList: boolean;
|
|
111
|
+
readonly cache_tools_list: boolean;
|
|
112
|
+
constructor(options: MCPServerSSEOptions);
|
|
113
|
+
}
|
|
114
|
+
export type MCPServerConfig = MCPServerStdio | MCPServerHTTP | MCPServerSSE;
|
|
115
|
+
export declare const MCPServerConfig: Readonly<{
|
|
116
|
+
kind: "MCPServerConfig";
|
|
117
|
+
}>;
|
|
118
|
+
export declare abstract class BaseTransport {
|
|
119
|
+
protected readStreamValue: unknown;
|
|
120
|
+
protected writeStreamValue: unknown;
|
|
121
|
+
protected connectedValue: boolean;
|
|
122
|
+
protected sdkTransportValue: Transport | null;
|
|
123
|
+
abstract get transportType(): TransportType;
|
|
124
|
+
protected abstract createSdkTransport(): Transport;
|
|
125
|
+
get transport_type(): TransportType;
|
|
126
|
+
get connected(): boolean;
|
|
127
|
+
get readStream(): unknown;
|
|
128
|
+
get read_stream(): unknown;
|
|
129
|
+
get writeStream(): unknown;
|
|
130
|
+
get write_stream(): unknown;
|
|
131
|
+
connect(): Promise<this>;
|
|
132
|
+
disconnect(): Promise<void>;
|
|
133
|
+
aenter(): Promise<this>;
|
|
134
|
+
__aenter__(): Promise<this>;
|
|
135
|
+
aexit(_excType?: unknown, _excVal?: unknown, _excTb?: unknown): Promise<void>;
|
|
136
|
+
__aexit__(excType?: unknown, excVal?: unknown, excTb?: unknown): Promise<void>;
|
|
137
|
+
protected setStreams(read: unknown, write: unknown): void;
|
|
138
|
+
_set_streams(read: unknown, write: unknown): void;
|
|
139
|
+
protected clearStreams(): void;
|
|
140
|
+
_clear_streams(): void;
|
|
141
|
+
markConnectedForClient(): void;
|
|
142
|
+
clearConnectedForClient(): void;
|
|
143
|
+
getSdkTransport(): Transport;
|
|
144
|
+
}
|
|
145
|
+
export declare class HTTPTransport extends BaseTransport {
|
|
146
|
+
readonly url: string;
|
|
147
|
+
readonly headers: Record<string, string>;
|
|
148
|
+
readonly streamable: boolean;
|
|
149
|
+
constructor(options: MCPServerHTTPOptions | string, headers?: Record<string, string> | null, streamable?: boolean);
|
|
150
|
+
get transportType(): TransportType;
|
|
151
|
+
protected createSdkTransport(): Transport;
|
|
152
|
+
}
|
|
153
|
+
export declare class SSETransport extends BaseTransport {
|
|
154
|
+
readonly url: string;
|
|
155
|
+
readonly headers: Record<string, string>;
|
|
156
|
+
constructor(options: MCPServerSSEOptions | string, headers?: Record<string, string> | null);
|
|
157
|
+
get transportType(): TransportType;
|
|
158
|
+
protected createSdkTransport(): Transport;
|
|
159
|
+
}
|
|
160
|
+
export declare class StdioTransport extends BaseTransport {
|
|
161
|
+
readonly command: string;
|
|
162
|
+
readonly args: readonly string[];
|
|
163
|
+
readonly env: Record<string, string>;
|
|
164
|
+
constructor(options: MCPServerStdioOptions | string, args?: readonly string[] | null, env?: Record<string, string> | null);
|
|
165
|
+
get transportType(): TransportType;
|
|
166
|
+
protected createSdkTransport(): Transport;
|
|
167
|
+
}
|
|
168
|
+
export declare function isMCPServerConfig(value: unknown): value is MCPServerConfig;
|
|
169
|
+
export declare const is_mcp_server_config: typeof isMCPServerConfig;
|
|
170
|
+
export declare const MCP_CONNECTION_TIMEOUT = 30;
|
|
171
|
+
export declare const MCP_TOOL_EXECUTION_TIMEOUT = 30;
|
|
172
|
+
export declare const MCP_DISCOVERY_TIMEOUT = 30;
|
|
173
|
+
export declare const MCP_MAX_RETRIES = 3;
|
|
174
|
+
export declare class _MCPToolResult {
|
|
175
|
+
readonly content: string;
|
|
176
|
+
readonly isError: boolean;
|
|
177
|
+
readonly is_error: boolean;
|
|
178
|
+
constructor(content: string, isError?: boolean);
|
|
179
|
+
}
|
|
180
|
+
type SchemaCacheEntry = {
|
|
181
|
+
tools: MCPToolDefinition[];
|
|
182
|
+
createdAt: number;
|
|
183
|
+
};
|
|
184
|
+
export type MCPClientOptions = {
|
|
185
|
+
connectTimeout?: number;
|
|
186
|
+
connect_timeout?: number;
|
|
187
|
+
executionTimeout?: number;
|
|
188
|
+
execution_timeout?: number;
|
|
189
|
+
discoveryTimeout?: number;
|
|
190
|
+
discovery_timeout?: number;
|
|
191
|
+
maxRetries?: number;
|
|
192
|
+
max_retries?: number;
|
|
193
|
+
cacheToolsList?: boolean;
|
|
194
|
+
cache_tools_list?: boolean;
|
|
195
|
+
};
|
|
196
|
+
export declare class MCPClient {
|
|
197
|
+
readonly transport: BaseTransport;
|
|
198
|
+
readonly connectTimeout: number;
|
|
199
|
+
readonly connect_timeout: number;
|
|
200
|
+
readonly executionTimeout: number;
|
|
201
|
+
readonly execution_timeout: number;
|
|
202
|
+
readonly discoveryTimeout: number;
|
|
203
|
+
readonly discovery_timeout: number;
|
|
204
|
+
readonly maxRetries: number;
|
|
205
|
+
readonly max_retries: number;
|
|
206
|
+
readonly cacheToolsList: boolean;
|
|
207
|
+
readonly cache_tools_list: boolean;
|
|
208
|
+
private client;
|
|
209
|
+
private initialized;
|
|
210
|
+
private wasConnected;
|
|
211
|
+
constructor(transport: BaseTransport, options?: MCPClientOptions);
|
|
212
|
+
get connected(): boolean;
|
|
213
|
+
get session(): Client;
|
|
214
|
+
connect(): Promise<this>;
|
|
215
|
+
disconnect(): Promise<void>;
|
|
216
|
+
aenter(): Promise<this>;
|
|
217
|
+
__aenter__(): Promise<this>;
|
|
218
|
+
aexit(_excType?: unknown, _excVal?: unknown, _excTb?: unknown): Promise<void>;
|
|
219
|
+
__aexit__(excType?: unknown, excVal?: unknown, excTb?: unknown): Promise<void>;
|
|
220
|
+
listTools(useCache?: boolean | null): Promise<MCPToolDefinition[]>;
|
|
221
|
+
list_tools(useCache?: boolean | null): Promise<MCPToolDefinition[]>;
|
|
222
|
+
listToolsImpl(): Promise<MCPToolDefinition[]>;
|
|
223
|
+
_list_tools_impl(): Promise<MCPToolDefinition[]>;
|
|
224
|
+
callTool(toolName: string, args?: Record<string, unknown> | null): Promise<string>;
|
|
225
|
+
call_tool(toolName: string, args?: Record<string, unknown> | null): Promise<string>;
|
|
226
|
+
cleanToolArguments(args: Record<string, unknown>): Record<string, unknown>;
|
|
227
|
+
_clean_tool_arguments(args: Record<string, unknown>): Record<string, unknown>;
|
|
228
|
+
callToolImpl(toolName: string, args: Record<string, unknown>): Promise<_MCPToolResult>;
|
|
229
|
+
_call_tool_impl(toolName: string, args: Record<string, unknown>): Promise<_MCPToolResult>;
|
|
230
|
+
emitConnectionFailed(serverName: string, serverUrl: string | null, transportType: string | null, error: unknown, errorType: string, startedAt: Date): void;
|
|
231
|
+
_emit_connection_failed(serverName: string, serverUrl: string | null, transportType: string | null, error: unknown, errorType: string, startedAt: Date): void;
|
|
232
|
+
listPrompts(): Promise<Record<string, unknown>[]>;
|
|
233
|
+
listPromptsImpl(): Promise<Record<string, unknown>[]>;
|
|
234
|
+
_list_prompts_impl(): Promise<Record<string, unknown>[]>;
|
|
235
|
+
list_prompts(): Promise<Record<string, unknown>[]>;
|
|
236
|
+
getPrompt(name: string, args?: Record<string, string> | null): Promise<unknown>;
|
|
237
|
+
getPromptImpl(name: string, args: Record<string, string>): Promise<unknown>;
|
|
238
|
+
get_prompt(name: string, args?: Record<string, string> | null): Promise<unknown>;
|
|
239
|
+
_get_prompt_impl(name: string, args: Record<string, string>): Promise<unknown>;
|
|
240
|
+
listResources(): Promise<Record<string, unknown>[]>;
|
|
241
|
+
list_resources(): Promise<Record<string, unknown>[]>;
|
|
242
|
+
readResource(uri: string): Promise<unknown>;
|
|
243
|
+
read_resource(uri: string): Promise<unknown>;
|
|
244
|
+
getServerInfo(): [string, string | null, string];
|
|
245
|
+
_get_server_info(): [string, string | null, string];
|
|
246
|
+
getCacheKey(kind: string): string;
|
|
247
|
+
_get_cache_key(kind: string): string;
|
|
248
|
+
retryOperation<T>(operation: () => Promise<T>, timeout?: number | null): Promise<T>;
|
|
249
|
+
_retry_operation<T>(operation: () => Promise<T>, timeout?: number | null): Promise<T>;
|
|
250
|
+
cleanupOnError(): Promise<void>;
|
|
251
|
+
_cleanup_on_error(): Promise<void>;
|
|
252
|
+
}
|
|
253
|
+
export type MCPToolResolverOptions = {
|
|
254
|
+
agent?: unknown;
|
|
255
|
+
logger?: {
|
|
256
|
+
log(level: string, message: string): void;
|
|
257
|
+
} | null;
|
|
258
|
+
};
|
|
259
|
+
export declare class MCPToolResolver {
|
|
260
|
+
private readonly agent;
|
|
261
|
+
private readonly logger;
|
|
262
|
+
private readonly clientsValue;
|
|
263
|
+
constructor(options?: MCPToolResolverOptions);
|
|
264
|
+
constructor(agent: unknown, logger?: {
|
|
265
|
+
log(level: string, message: string): void;
|
|
266
|
+
} | null);
|
|
267
|
+
get clients(): MCPClient[];
|
|
268
|
+
resolve(mcps: readonly (string | MCPServerConfig)[] | null | undefined): Promise<BaseTool[]>;
|
|
269
|
+
cleanup(): Promise<void>;
|
|
270
|
+
disconnectAll(): Promise<void>;
|
|
271
|
+
_disconnect_all(): Promise<void>;
|
|
272
|
+
static parseAmpRef(mcpConfig: string): [string, string | null];
|
|
273
|
+
static _parse_amp_ref(mcpConfig: string): [string, string | null];
|
|
274
|
+
parseAmpRef(mcpConfig: string): [string, string | null];
|
|
275
|
+
_parse_amp_ref(mcpConfig: string): [string, string | null];
|
|
276
|
+
fetchAmpMcpConfigs(slugs: readonly string[]): Record<string, Record<string, unknown>>;
|
|
277
|
+
_fetch_amp_mcp_configs(slugs: readonly string[]): Record<string, Record<string, unknown>>;
|
|
278
|
+
resolveAmp(ampRefs: readonly [string, string | null][]): Promise<[BaseTool[], MCPClient[]]>;
|
|
279
|
+
_resolve_amp(ampRefs: readonly [string, string | null][]): Promise<[BaseTool[], MCPClient[]]>;
|
|
280
|
+
resolveNative(config: MCPServerConfig): Promise<BaseTool[]>;
|
|
281
|
+
_resolve_native(config: MCPServerConfig): Promise<[BaseTool[], MCPClient[]]>;
|
|
282
|
+
resolveExternal(mcpRef: string): Promise<BaseTool[]>;
|
|
283
|
+
_resolve_external(mcpRef: string): Promise<BaseTool[]>;
|
|
284
|
+
static createTransport(config: MCPServerConfig): [BaseTransport, string];
|
|
285
|
+
static _create_transport(config: MCPServerConfig): [BaseTransport, string];
|
|
286
|
+
createTransport(config: MCPServerConfig): [BaseTransport, string];
|
|
287
|
+
_create_transport(config: MCPServerConfig): [BaseTransport, string];
|
|
288
|
+
static buildMcpConfigFromDict(config: Record<string, unknown>): MCPServerConfig;
|
|
289
|
+
static _build_mcp_config_from_dict(config: Record<string, unknown>): MCPServerConfig;
|
|
290
|
+
buildMcpConfigFromDict(config: Record<string, unknown>): MCPServerConfig;
|
|
291
|
+
_build_mcp_config_from_dict(config: Record<string, unknown>): MCPServerConfig;
|
|
292
|
+
static extractServerName(serverUrl: string): string;
|
|
293
|
+
static _extract_server_name(serverUrl: string): string;
|
|
294
|
+
extractServerName(serverUrl: string): string;
|
|
295
|
+
_extract_server_name(serverUrl: string): string;
|
|
296
|
+
setupClientAndListTools(client: MCPClient): Promise<MCPToolDefinition[]>;
|
|
297
|
+
_setup_client_and_list_tools(client: MCPClient): Promise<MCPToolDefinition[]>;
|
|
298
|
+
getMcpToolSchemas(serverParams: Record<string, unknown>): Record<string, Record<string, unknown>>;
|
|
299
|
+
_get_mcp_tool_schemas(serverParams: Record<string, unknown>): Record<string, Record<string, unknown>>;
|
|
300
|
+
getMcpToolSchemasAsync(serverParams: Record<string, unknown>): Promise<Record<string, Record<string, unknown>>>;
|
|
301
|
+
_get_mcp_tool_schemas_async(serverParams: Record<string, unknown>): Promise<Record<string, Record<string, unknown>>>;
|
|
302
|
+
retryMcpDiscovery(operation: (serverUrl: string) => Promise<Record<string, Record<string, unknown>>>, serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
303
|
+
_retry_mcp_discovery(operation: (serverUrl: string) => Promise<Record<string, Record<string, unknown>>>, serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
304
|
+
attemptMcpDiscovery(operation: (serverUrl: string) => Promise<Record<string, Record<string, unknown>>>, serverUrl: string): Promise<[Record<string, Record<string, unknown>> | null, string, boolean]>;
|
|
305
|
+
_attempt_mcp_discovery(operation: (serverUrl: string) => Promise<Record<string, Record<string, unknown>>>, serverUrl: string): Promise<[Record<string, Record<string, unknown>> | null, string, boolean]>;
|
|
306
|
+
discoverMcpToolsWithTimeout(serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
307
|
+
_discover_mcp_tools_with_timeout(serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
308
|
+
discoverMcpTools(serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
309
|
+
_discover_mcp_tools(serverUrl: string): Promise<Record<string, Record<string, unknown>>>;
|
|
310
|
+
jsonSchemaToPydantic(toolName: string, jsonSchema: Record<string, unknown>): Record<string, unknown>;
|
|
311
|
+
_json_schema_to_pydantic(toolName: string, jsonSchema: Record<string, unknown>): Record<string, unknown>;
|
|
312
|
+
private log;
|
|
313
|
+
}
|
|
314
|
+
export declare const mcp_schema_cache: Map<string, SchemaCacheEntry>;
|
|
315
|
+
export {};
|