@lov3kaizen/agentsea-core 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/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/index.d.mts +1346 -0
- package/dist/index.d.ts +1346 -0
- package/dist/index.js +6167 -0
- package/dist/index.mjs +6066 -0
- package/package.json +98 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1346 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
interface Message {
|
|
5
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
6
|
+
content: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
toolCallId?: string;
|
|
9
|
+
}
|
|
10
|
+
type OutputFormat = 'text' | 'markdown' | 'html' | 'react';
|
|
11
|
+
interface FormatOptions {
|
|
12
|
+
includeMetadata?: boolean;
|
|
13
|
+
sanitizeHtml?: boolean;
|
|
14
|
+
highlightCode?: boolean;
|
|
15
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
16
|
+
}
|
|
17
|
+
interface AgentConfig {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
model: string;
|
|
21
|
+
provider: string;
|
|
22
|
+
systemPrompt?: string;
|
|
23
|
+
tools?: Tool[];
|
|
24
|
+
temperature?: number;
|
|
25
|
+
maxTokens?: number;
|
|
26
|
+
maxIterations?: number;
|
|
27
|
+
memory?: MemoryConfig;
|
|
28
|
+
providerConfig?: ProviderInstanceConfig;
|
|
29
|
+
outputFormat?: OutputFormat;
|
|
30
|
+
formatOptions?: FormatOptions;
|
|
31
|
+
}
|
|
32
|
+
interface ProviderInstanceConfig {
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
apiKey?: string;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
defaultHeaders?: Record<string, string>;
|
|
37
|
+
organization?: string;
|
|
38
|
+
}
|
|
39
|
+
interface AgentContext {
|
|
40
|
+
conversationId: string;
|
|
41
|
+
userId?: string;
|
|
42
|
+
sessionData: Record<string, any>;
|
|
43
|
+
history: Message[];
|
|
44
|
+
metadata?: Record<string, any>;
|
|
45
|
+
}
|
|
46
|
+
interface FormattedContent {
|
|
47
|
+
raw: string;
|
|
48
|
+
format: OutputFormat;
|
|
49
|
+
rendered?: string;
|
|
50
|
+
metadata?: {
|
|
51
|
+
hasCodeBlocks?: boolean;
|
|
52
|
+
hasTables?: boolean;
|
|
53
|
+
hasLists?: boolean;
|
|
54
|
+
links?: Array<{
|
|
55
|
+
text: string;
|
|
56
|
+
url: string;
|
|
57
|
+
}>;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
interface AgentResponse {
|
|
61
|
+
content: string;
|
|
62
|
+
formatted?: FormattedContent;
|
|
63
|
+
toolCalls?: ToolCall[];
|
|
64
|
+
metadata: {
|
|
65
|
+
tokensUsed: number;
|
|
66
|
+
latencyMs: number;
|
|
67
|
+
iterations: number;
|
|
68
|
+
cost?: number;
|
|
69
|
+
};
|
|
70
|
+
nextAgent?: string;
|
|
71
|
+
finishReason?: 'stop' | 'length' | 'tool_calls' | 'error';
|
|
72
|
+
}
|
|
73
|
+
interface Tool {
|
|
74
|
+
name: string;
|
|
75
|
+
description: string;
|
|
76
|
+
parameters: z.ZodSchema;
|
|
77
|
+
execute: (params: any, context: ToolContext) => Promise<any>;
|
|
78
|
+
retryConfig?: RetryConfig;
|
|
79
|
+
}
|
|
80
|
+
interface ToolContext {
|
|
81
|
+
agentName: string;
|
|
82
|
+
conversationId: string;
|
|
83
|
+
metadata: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
interface ToolCall {
|
|
86
|
+
id: string;
|
|
87
|
+
tool: string;
|
|
88
|
+
parameters: any;
|
|
89
|
+
result?: any;
|
|
90
|
+
error?: string;
|
|
91
|
+
}
|
|
92
|
+
interface RetryConfig {
|
|
93
|
+
maxAttempts: number;
|
|
94
|
+
backoff: 'linear' | 'exponential';
|
|
95
|
+
initialDelayMs?: number;
|
|
96
|
+
maxDelayMs?: number;
|
|
97
|
+
retryableErrors?: string[];
|
|
98
|
+
}
|
|
99
|
+
interface MemoryConfig {
|
|
100
|
+
type: 'buffer' | 'summary' | 'vector' | 'hybrid';
|
|
101
|
+
maxMessages?: number;
|
|
102
|
+
storage?: 'memory' | 'redis' | 'database';
|
|
103
|
+
ttl?: number;
|
|
104
|
+
summaryModel?: string;
|
|
105
|
+
}
|
|
106
|
+
interface MemoryStore {
|
|
107
|
+
save(conversationId: string, messages: Message[]): Promise<void>;
|
|
108
|
+
load(conversationId: string): Promise<Message[]>;
|
|
109
|
+
clear(conversationId: string): Promise<void>;
|
|
110
|
+
search?(query: string, limit?: number): Promise<Message[]>;
|
|
111
|
+
}
|
|
112
|
+
interface LLMProvider {
|
|
113
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
114
|
+
streamResponse?(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
115
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
116
|
+
}
|
|
117
|
+
interface ProviderConfig {
|
|
118
|
+
model: string;
|
|
119
|
+
temperature?: number;
|
|
120
|
+
maxTokens?: number;
|
|
121
|
+
tools?: Tool[];
|
|
122
|
+
systemPrompt?: string;
|
|
123
|
+
topP?: number;
|
|
124
|
+
stopSequences?: string[];
|
|
125
|
+
}
|
|
126
|
+
interface LLMResponse {
|
|
127
|
+
content: string;
|
|
128
|
+
stopReason: string;
|
|
129
|
+
usage: {
|
|
130
|
+
inputTokens: number;
|
|
131
|
+
outputTokens: number;
|
|
132
|
+
};
|
|
133
|
+
rawResponse: any;
|
|
134
|
+
}
|
|
135
|
+
interface LLMStreamChunk {
|
|
136
|
+
type: 'content' | 'tool_call' | 'done';
|
|
137
|
+
content?: string;
|
|
138
|
+
toolCall?: Partial<ToolCall>;
|
|
139
|
+
done?: boolean;
|
|
140
|
+
}
|
|
141
|
+
type StreamEvent = {
|
|
142
|
+
type: 'iteration';
|
|
143
|
+
iteration: number;
|
|
144
|
+
} | {
|
|
145
|
+
type: 'content';
|
|
146
|
+
content: string;
|
|
147
|
+
delta?: boolean;
|
|
148
|
+
} | {
|
|
149
|
+
type: 'tool_calls';
|
|
150
|
+
toolCalls: ToolCall[];
|
|
151
|
+
} | {
|
|
152
|
+
type: 'tool_result';
|
|
153
|
+
toolCall: ToolCall;
|
|
154
|
+
} | {
|
|
155
|
+
type: 'done';
|
|
156
|
+
metadata?: {
|
|
157
|
+
tokensUsed?: number;
|
|
158
|
+
latencyMs?: number;
|
|
159
|
+
iterations?: number;
|
|
160
|
+
};
|
|
161
|
+
} | {
|
|
162
|
+
type: 'error';
|
|
163
|
+
error: string;
|
|
164
|
+
};
|
|
165
|
+
type WorkflowType = 'sequential' | 'parallel' | 'supervisor' | 'custom';
|
|
166
|
+
interface WorkflowConfig {
|
|
167
|
+
name: string;
|
|
168
|
+
type: WorkflowType;
|
|
169
|
+
agents: AgentConfig[];
|
|
170
|
+
routing?: RoutingLogic;
|
|
171
|
+
errorHandling?: ErrorHandlingStrategy;
|
|
172
|
+
}
|
|
173
|
+
interface RoutingLogic {
|
|
174
|
+
strategy: 'conditional' | 'round-robin' | 'dynamic';
|
|
175
|
+
rules?: RoutingRule[];
|
|
176
|
+
}
|
|
177
|
+
interface RoutingRule {
|
|
178
|
+
condition: (context: AgentContext, response: AgentResponse) => boolean;
|
|
179
|
+
nextAgent: string;
|
|
180
|
+
}
|
|
181
|
+
type ErrorHandlingStrategy = 'fail-fast' | 'retry' | 'fallback' | 'continue';
|
|
182
|
+
interface AgentMetrics {
|
|
183
|
+
agentName: string;
|
|
184
|
+
latencyMs: number;
|
|
185
|
+
tokensUsed: number;
|
|
186
|
+
success: boolean;
|
|
187
|
+
error?: string;
|
|
188
|
+
timestamp: Date;
|
|
189
|
+
}
|
|
190
|
+
interface SpanContext {
|
|
191
|
+
traceId: string;
|
|
192
|
+
spanId: string;
|
|
193
|
+
parentSpanId?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare class ToolRegistry {
|
|
197
|
+
private tools;
|
|
198
|
+
register(tool: Tool): void;
|
|
199
|
+
registerMany(tools: Tool[]): void;
|
|
200
|
+
get(name: string): Tool | undefined;
|
|
201
|
+
getAll(): Tool[];
|
|
202
|
+
has(name: string): boolean;
|
|
203
|
+
unregister(name: string): boolean;
|
|
204
|
+
clear(): void;
|
|
205
|
+
execute(toolCall: ToolCall, context: ToolContext): Promise<any>;
|
|
206
|
+
private executeWithRetry;
|
|
207
|
+
private calculateDelay;
|
|
208
|
+
private sleep;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
declare class Agent {
|
|
212
|
+
readonly config: AgentConfig;
|
|
213
|
+
private readonly provider;
|
|
214
|
+
private readonly toolRegistry;
|
|
215
|
+
private readonly memory?;
|
|
216
|
+
private iterationCount;
|
|
217
|
+
constructor(config: AgentConfig, provider: LLMProvider, toolRegistry: ToolRegistry, memory?: MemoryStore | undefined);
|
|
218
|
+
execute(input: string, context: AgentContext): Promise<AgentResponse>;
|
|
219
|
+
executeStream(input: string, context: AgentContext): AsyncGenerator<StreamEvent, void, unknown>;
|
|
220
|
+
private executeLoop;
|
|
221
|
+
private executeLoopStream;
|
|
222
|
+
private executeToolCalls;
|
|
223
|
+
private loadHistory;
|
|
224
|
+
private saveHistory;
|
|
225
|
+
formatResponse(response: AgentResponse): AgentResponse;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
declare const calculatorTool: Tool;
|
|
229
|
+
|
|
230
|
+
declare const httpRequestTool: Tool;
|
|
231
|
+
|
|
232
|
+
declare const fileReadTool: Tool;
|
|
233
|
+
declare const fileWriteTool: Tool;
|
|
234
|
+
declare const fileListTool: Tool;
|
|
235
|
+
|
|
236
|
+
declare const textSummaryTool: Tool;
|
|
237
|
+
declare const stringTransformTool: Tool;
|
|
238
|
+
|
|
239
|
+
declare const figmaGetFileTool: Tool;
|
|
240
|
+
declare const figmaGetNodesTool: Tool;
|
|
241
|
+
declare const figmaGetImagesTool: Tool;
|
|
242
|
+
declare const figmaGetCommentsTool: Tool;
|
|
243
|
+
declare const figmaPostCommentTool: Tool;
|
|
244
|
+
|
|
245
|
+
declare const n8nExecuteWorkflowTool: Tool;
|
|
246
|
+
declare const n8nGetExecutionTool: Tool;
|
|
247
|
+
declare const n8nListWorkflowsTool: Tool;
|
|
248
|
+
declare const n8nTriggerWebhookTool: Tool;
|
|
249
|
+
declare const n8nGetWorkflowTool: Tool;
|
|
250
|
+
|
|
251
|
+
declare class AnthropicProvider implements LLMProvider {
|
|
252
|
+
private client;
|
|
253
|
+
constructor(apiKey?: string);
|
|
254
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
255
|
+
streamResponse(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
256
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
257
|
+
private convertMessages;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
declare class OpenAIProvider implements LLMProvider {
|
|
261
|
+
private client;
|
|
262
|
+
constructor(apiKey?: string);
|
|
263
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
264
|
+
streamResponse(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
265
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
266
|
+
private convertMessages;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
declare class GeminiProvider implements LLMProvider {
|
|
270
|
+
private client;
|
|
271
|
+
private model;
|
|
272
|
+
constructor(apiKey?: string);
|
|
273
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
274
|
+
streamResponse(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
275
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
276
|
+
private getModel;
|
|
277
|
+
private convertMessages;
|
|
278
|
+
private estimateTokens;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
interface OllamaConfig {
|
|
282
|
+
baseUrl?: string;
|
|
283
|
+
timeout?: number;
|
|
284
|
+
}
|
|
285
|
+
declare class OllamaProvider implements LLMProvider {
|
|
286
|
+
private baseUrl;
|
|
287
|
+
private timeout;
|
|
288
|
+
constructor(config?: OllamaConfig);
|
|
289
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
290
|
+
streamResponse(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
291
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
292
|
+
private convertMessages;
|
|
293
|
+
private makeRequest;
|
|
294
|
+
listModels(): Promise<string[]>;
|
|
295
|
+
pullModel(modelName: string): Promise<void>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
interface OpenAICompatibleConfig {
|
|
299
|
+
baseUrl: string;
|
|
300
|
+
apiKey?: string;
|
|
301
|
+
defaultHeaders?: Record<string, string>;
|
|
302
|
+
timeout?: number;
|
|
303
|
+
organization?: string;
|
|
304
|
+
}
|
|
305
|
+
declare class OpenAICompatibleProvider implements LLMProvider {
|
|
306
|
+
private client;
|
|
307
|
+
private config;
|
|
308
|
+
constructor(config: OpenAICompatibleConfig);
|
|
309
|
+
generateResponse(messages: Message[], config: ProviderConfig): Promise<LLMResponse>;
|
|
310
|
+
streamResponse(messages: Message[], config: ProviderConfig): AsyncIterable<LLMStreamChunk>;
|
|
311
|
+
parseToolCalls(response: LLMResponse): ToolCall[];
|
|
312
|
+
private convertMessages;
|
|
313
|
+
listModels(): Promise<string[]>;
|
|
314
|
+
getBaseUrl(): string;
|
|
315
|
+
}
|
|
316
|
+
declare class LMStudioProvider extends OpenAICompatibleProvider {
|
|
317
|
+
constructor(config?: Partial<OpenAICompatibleConfig>);
|
|
318
|
+
}
|
|
319
|
+
declare class LocalAIProvider extends OpenAICompatibleProvider {
|
|
320
|
+
constructor(config?: Partial<OpenAICompatibleConfig>);
|
|
321
|
+
}
|
|
322
|
+
declare class TextGenerationWebUIProvider extends OpenAICompatibleProvider {
|
|
323
|
+
constructor(config?: Partial<OpenAICompatibleConfig>);
|
|
324
|
+
}
|
|
325
|
+
declare class VLLMProvider extends OpenAICompatibleProvider {
|
|
326
|
+
constructor(config?: Partial<OpenAICompatibleConfig>);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
declare class BufferMemory implements MemoryStore {
|
|
330
|
+
private maxMessages?;
|
|
331
|
+
private store;
|
|
332
|
+
constructor(maxMessages?: number | undefined);
|
|
333
|
+
save(conversationId: string, messages: Message[]): Promise<void>;
|
|
334
|
+
load(conversationId: string): Promise<Message[]>;
|
|
335
|
+
clear(conversationId: string): Promise<void>;
|
|
336
|
+
clearAll(): void;
|
|
337
|
+
getConversationIds(): string[];
|
|
338
|
+
size(): number;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare class RedisMemory implements MemoryStore {
|
|
342
|
+
private redis;
|
|
343
|
+
private prefix;
|
|
344
|
+
private ttl?;
|
|
345
|
+
constructor(config?: {
|
|
346
|
+
host?: string;
|
|
347
|
+
port?: number;
|
|
348
|
+
password?: string;
|
|
349
|
+
db?: number;
|
|
350
|
+
prefix?: string;
|
|
351
|
+
ttl?: number;
|
|
352
|
+
});
|
|
353
|
+
save(conversationId: string, messages: Message[]): Promise<void>;
|
|
354
|
+
load(conversationId: string): Promise<Message[]>;
|
|
355
|
+
clear(conversationId: string): Promise<void>;
|
|
356
|
+
getConversationIds(): Promise<string[]>;
|
|
357
|
+
disconnect(): Promise<void>;
|
|
358
|
+
private getKey;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
declare class SummaryMemory implements MemoryStore {
|
|
362
|
+
private provider;
|
|
363
|
+
private maxRecentMessages;
|
|
364
|
+
private summaryModel;
|
|
365
|
+
private store;
|
|
366
|
+
constructor(provider: LLMProvider, maxRecentMessages?: number, summaryModel?: string);
|
|
367
|
+
save(conversationId: string, messages: Message[]): Promise<void>;
|
|
368
|
+
load(conversationId: string): Promise<Message[]>;
|
|
369
|
+
clear(conversationId: string): Promise<void>;
|
|
370
|
+
private createSummary;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare class TenantBufferMemory {
|
|
374
|
+
private maxMessages?;
|
|
375
|
+
private store;
|
|
376
|
+
constructor(maxMessages?: number | undefined);
|
|
377
|
+
save(conversationId: string, messages: Message[], tenantId?: string): void;
|
|
378
|
+
load(conversationId: string, tenantId?: string): Message[];
|
|
379
|
+
clear(conversationId: string, tenantId?: string): void;
|
|
380
|
+
clearTenant(tenantId: string): void;
|
|
381
|
+
clearAll(): void;
|
|
382
|
+
getConversationIds(tenantId?: string): string[];
|
|
383
|
+
size(tenantId?: string): number;
|
|
384
|
+
getTenantIds(): string[];
|
|
385
|
+
getTenantStats(): Array<{
|
|
386
|
+
tenantId: string;
|
|
387
|
+
conversationCount: number;
|
|
388
|
+
messageCount: number;
|
|
389
|
+
}>;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare abstract class Workflow {
|
|
393
|
+
protected config: WorkflowConfig;
|
|
394
|
+
protected provider: LLMProvider;
|
|
395
|
+
protected toolRegistry: ToolRegistry;
|
|
396
|
+
protected memory?: MemoryStore | undefined;
|
|
397
|
+
protected agents: Map<string, Agent>;
|
|
398
|
+
constructor(config: WorkflowConfig, provider: LLMProvider, toolRegistry: ToolRegistry, memory?: MemoryStore | undefined);
|
|
399
|
+
private initializeAgents;
|
|
400
|
+
abstract execute(input: string, context: AgentContext): Promise<AgentResponse>;
|
|
401
|
+
protected handleError(error: Error, agentName: string, _context: AgentContext): AgentResponse | null;
|
|
402
|
+
protected getAgent(name: string): Agent;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare class SequentialWorkflow extends Workflow {
|
|
406
|
+
execute(input: string, context: AgentContext): Promise<AgentResponse>;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
declare class ParallelWorkflow extends Workflow {
|
|
410
|
+
execute(input: string, context: AgentContext): Promise<AgentResponse>;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
declare class SupervisorWorkflow extends Workflow {
|
|
414
|
+
execute(input: string, context: AgentContext): Promise<AgentResponse>;
|
|
415
|
+
private determineNextAgent;
|
|
416
|
+
private getNextRoundRobinAgent;
|
|
417
|
+
private getFallbackAgent;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
declare class WorkflowFactory {
|
|
421
|
+
static create(config: WorkflowConfig, provider: LLMProvider, toolRegistry: ToolRegistry, memory?: MemoryStore): Workflow;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
type LogLevel = 'error' | 'warn' | 'info' | 'debug';
|
|
425
|
+
interface LoggerConfig {
|
|
426
|
+
level?: LogLevel;
|
|
427
|
+
format?: 'json' | 'simple';
|
|
428
|
+
filename?: string;
|
|
429
|
+
console?: boolean;
|
|
430
|
+
}
|
|
431
|
+
declare class Logger {
|
|
432
|
+
private logger;
|
|
433
|
+
constructor(config?: LoggerConfig);
|
|
434
|
+
error(message: string, meta?: any): void;
|
|
435
|
+
warn(message: string, meta?: any): void;
|
|
436
|
+
info(message: string, meta?: any): void;
|
|
437
|
+
debug(message: string, meta?: any): void;
|
|
438
|
+
child(context: Record<string, any>): Logger;
|
|
439
|
+
}
|
|
440
|
+
declare const defaultLogger: Logger;
|
|
441
|
+
|
|
442
|
+
declare class MetricsCollector {
|
|
443
|
+
private metrics;
|
|
444
|
+
private listeners;
|
|
445
|
+
record(metric: AgentMetrics): void;
|
|
446
|
+
getAll(): AgentMetrics[];
|
|
447
|
+
getByAgent(agentName: string): AgentMetrics[];
|
|
448
|
+
getByTimeRange(start: Date, end: Date): AgentMetrics[];
|
|
449
|
+
getStats(agentName?: string): {
|
|
450
|
+
totalCalls: number;
|
|
451
|
+
successRate: number;
|
|
452
|
+
avgLatency: number;
|
|
453
|
+
totalTokens: number;
|
|
454
|
+
errors: number;
|
|
455
|
+
};
|
|
456
|
+
subscribe(listener: (metric: AgentMetrics) => void): () => void;
|
|
457
|
+
clear(): void;
|
|
458
|
+
private notifyListeners;
|
|
459
|
+
}
|
|
460
|
+
declare const globalMetrics: MetricsCollector;
|
|
461
|
+
|
|
462
|
+
interface Span {
|
|
463
|
+
traceId: string;
|
|
464
|
+
spanId: string;
|
|
465
|
+
parentSpanId?: string;
|
|
466
|
+
name: string;
|
|
467
|
+
startTime: Date;
|
|
468
|
+
endTime?: Date;
|
|
469
|
+
attributes: Record<string, any>;
|
|
470
|
+
events: Array<{
|
|
471
|
+
timestamp: Date;
|
|
472
|
+
name: string;
|
|
473
|
+
attributes?: any;
|
|
474
|
+
}>;
|
|
475
|
+
status: 'ok' | 'error';
|
|
476
|
+
error?: Error;
|
|
477
|
+
}
|
|
478
|
+
declare class Tracer {
|
|
479
|
+
private spans;
|
|
480
|
+
private activeSpans;
|
|
481
|
+
startSpan(name: string, context?: SpanContext): {
|
|
482
|
+
span: Span;
|
|
483
|
+
context: SpanContext;
|
|
484
|
+
};
|
|
485
|
+
endSpan(spanId: string, error?: Error): void;
|
|
486
|
+
setAttributes(spanId: string, attributes: Record<string, any>): void;
|
|
487
|
+
addEvent(spanId: string, name: string, attributes?: Record<string, any>): void;
|
|
488
|
+
getSpan(spanId: string): Span | undefined;
|
|
489
|
+
getTrace(traceId: string): Span[];
|
|
490
|
+
getSpanDuration(spanId: string): number | undefined;
|
|
491
|
+
clear(): void;
|
|
492
|
+
export(): Span[];
|
|
493
|
+
}
|
|
494
|
+
declare const globalTracer: Tracer;
|
|
495
|
+
|
|
496
|
+
declare class RateLimiter {
|
|
497
|
+
private maxTokens;
|
|
498
|
+
private refillRate;
|
|
499
|
+
private tokens;
|
|
500
|
+
private lastRefill;
|
|
501
|
+
constructor(maxTokens: number, refillRate: number);
|
|
502
|
+
consume(tokens?: number): boolean;
|
|
503
|
+
waitForTokens(tokens?: number): Promise<void>;
|
|
504
|
+
getTokens(): number;
|
|
505
|
+
reset(): void;
|
|
506
|
+
private refill;
|
|
507
|
+
private sleep;
|
|
508
|
+
}
|
|
509
|
+
declare class SlidingWindowRateLimiter {
|
|
510
|
+
private maxRequests;
|
|
511
|
+
private windowMs;
|
|
512
|
+
private requests;
|
|
513
|
+
constructor(maxRequests: number, windowMs: number);
|
|
514
|
+
isAllowed(key: string): boolean;
|
|
515
|
+
getRemaining(key: string): number;
|
|
516
|
+
reset(key: string): void;
|
|
517
|
+
clear(): void;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
declare class Cache<T = any> {
|
|
521
|
+
private defaultTTL?;
|
|
522
|
+
private store;
|
|
523
|
+
constructor(defaultTTL?: number | undefined);
|
|
524
|
+
set(key: string, value: T, ttl?: number): void;
|
|
525
|
+
get(key: string): T | undefined;
|
|
526
|
+
has(key: string): boolean;
|
|
527
|
+
delete(key: string): boolean;
|
|
528
|
+
clear(): void;
|
|
529
|
+
getStats(): {
|
|
530
|
+
size: number;
|
|
531
|
+
keys: string[];
|
|
532
|
+
totalHits: number;
|
|
533
|
+
};
|
|
534
|
+
getOrSet(key: string, factory: () => Promise<T> | T, ttl?: number): Promise<T>;
|
|
535
|
+
cleanup(): number;
|
|
536
|
+
get size(): number;
|
|
537
|
+
}
|
|
538
|
+
declare class LRUCache<T = any> {
|
|
539
|
+
private maxSize;
|
|
540
|
+
private cache;
|
|
541
|
+
constructor(maxSize: number);
|
|
542
|
+
get(key: string): T | undefined;
|
|
543
|
+
set(key: string, value: T): void;
|
|
544
|
+
has(key: string): boolean;
|
|
545
|
+
delete(key: string): boolean;
|
|
546
|
+
clear(): void;
|
|
547
|
+
get size(): number;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare class ContentFormatter {
|
|
551
|
+
static format(content: string, format: OutputFormat, options?: FormatOptions): FormattedContent;
|
|
552
|
+
private static formatText;
|
|
553
|
+
private static formatMarkdown;
|
|
554
|
+
private static formatHtml;
|
|
555
|
+
private static formatReact;
|
|
556
|
+
private static extractMetadata;
|
|
557
|
+
private static sanitizeHtml;
|
|
558
|
+
private static addCodeHighlighting;
|
|
559
|
+
private static wrapWithTheme;
|
|
560
|
+
private static addReactAttributes;
|
|
561
|
+
static detectFormat(content: string): OutputFormat;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
interface MCPServerConfig {
|
|
565
|
+
name: string;
|
|
566
|
+
command: string;
|
|
567
|
+
args?: string[];
|
|
568
|
+
env?: Record<string, string>;
|
|
569
|
+
transport?: 'stdio' | 'sse';
|
|
570
|
+
url?: string;
|
|
571
|
+
}
|
|
572
|
+
interface MCPTool {
|
|
573
|
+
name: string;
|
|
574
|
+
description: string;
|
|
575
|
+
inputSchema: {
|
|
576
|
+
type: 'object';
|
|
577
|
+
properties: Record<string, any>;
|
|
578
|
+
required?: string[];
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
interface MCPResource {
|
|
582
|
+
uri: string;
|
|
583
|
+
name: string;
|
|
584
|
+
description?: string;
|
|
585
|
+
mimeType?: string;
|
|
586
|
+
}
|
|
587
|
+
interface MCPPrompt {
|
|
588
|
+
name: string;
|
|
589
|
+
description?: string;
|
|
590
|
+
arguments?: Array<{
|
|
591
|
+
name: string;
|
|
592
|
+
description?: string;
|
|
593
|
+
required?: boolean;
|
|
594
|
+
}>;
|
|
595
|
+
}
|
|
596
|
+
interface MCPServerCapabilities {
|
|
597
|
+
tools?: {
|
|
598
|
+
listChanged?: boolean;
|
|
599
|
+
};
|
|
600
|
+
resources?: {
|
|
601
|
+
subscribe?: boolean;
|
|
602
|
+
listChanged?: boolean;
|
|
603
|
+
};
|
|
604
|
+
prompts?: {
|
|
605
|
+
listChanged?: boolean;
|
|
606
|
+
};
|
|
607
|
+
logging?: Record<string, never>;
|
|
608
|
+
}
|
|
609
|
+
interface MCPServerInfo {
|
|
610
|
+
name: string;
|
|
611
|
+
version: string;
|
|
612
|
+
protocolVersion: string;
|
|
613
|
+
capabilities: MCPServerCapabilities;
|
|
614
|
+
}
|
|
615
|
+
interface MCPCallToolRequest {
|
|
616
|
+
method: 'tools/call';
|
|
617
|
+
params: {
|
|
618
|
+
name: string;
|
|
619
|
+
arguments?: Record<string, any>;
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
interface MCPCallToolResponse {
|
|
623
|
+
content: Array<{
|
|
624
|
+
type: 'text' | 'image' | 'resource';
|
|
625
|
+
text?: string;
|
|
626
|
+
data?: string;
|
|
627
|
+
mimeType?: string;
|
|
628
|
+
}>;
|
|
629
|
+
isError?: boolean;
|
|
630
|
+
}
|
|
631
|
+
interface MCPListToolsRequest {
|
|
632
|
+
method: 'tools/list';
|
|
633
|
+
params?: {
|
|
634
|
+
cursor?: string;
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
interface MCPListToolsResponse {
|
|
638
|
+
tools: MCPTool[];
|
|
639
|
+
nextCursor?: string;
|
|
640
|
+
}
|
|
641
|
+
interface MCPReadResourceRequest {
|
|
642
|
+
method: 'resources/read';
|
|
643
|
+
params: {
|
|
644
|
+
uri: string;
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
interface MCPReadResourceResponse {
|
|
648
|
+
contents: Array<{
|
|
649
|
+
uri: string;
|
|
650
|
+
mimeType?: string;
|
|
651
|
+
text?: string;
|
|
652
|
+
blob?: string;
|
|
653
|
+
}>;
|
|
654
|
+
}
|
|
655
|
+
interface MCPMessage {
|
|
656
|
+
jsonrpc: '2.0';
|
|
657
|
+
id?: string | number;
|
|
658
|
+
method?: string;
|
|
659
|
+
params?: any;
|
|
660
|
+
result?: any;
|
|
661
|
+
error?: {
|
|
662
|
+
code: number;
|
|
663
|
+
message: string;
|
|
664
|
+
data?: any;
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
declare class MCPClient extends EventEmitter {
|
|
669
|
+
private config;
|
|
670
|
+
private transport;
|
|
671
|
+
private serverInfo;
|
|
672
|
+
private requestId;
|
|
673
|
+
private pendingRequests;
|
|
674
|
+
constructor(config: MCPServerConfig);
|
|
675
|
+
connect(): Promise<void>;
|
|
676
|
+
private initialize;
|
|
677
|
+
listTools(): Promise<MCPTool[]>;
|
|
678
|
+
callTool(name: string, args?: Record<string, any>): Promise<MCPCallToolResponse>;
|
|
679
|
+
listResources(): Promise<MCPResource[]>;
|
|
680
|
+
readResource(uri: string): Promise<MCPReadResourceResponse>;
|
|
681
|
+
listPrompts(): Promise<MCPPrompt[]>;
|
|
682
|
+
getPrompt(name: string, args?: Record<string, string>): Promise<any>;
|
|
683
|
+
getServerInfo(): MCPServerInfo | null;
|
|
684
|
+
disconnect(): void;
|
|
685
|
+
isConnected(): boolean;
|
|
686
|
+
private sendRequest;
|
|
687
|
+
private handleMessage;
|
|
688
|
+
private nextId;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
declare class MCPRegistry {
|
|
692
|
+
private servers;
|
|
693
|
+
private tools;
|
|
694
|
+
addServer(config: MCPServerConfig): Promise<MCPClient>;
|
|
695
|
+
removeServer(name: string): void;
|
|
696
|
+
getServer(name: string): MCPClient | undefined;
|
|
697
|
+
getServers(): Map<string, MCPClient>;
|
|
698
|
+
getTools(): Tool[];
|
|
699
|
+
getTool(name: string): Tool | undefined;
|
|
700
|
+
getServerInfo(name: string): MCPServerInfo | null;
|
|
701
|
+
disconnectAll(): void;
|
|
702
|
+
private loadServerTools;
|
|
703
|
+
private removeServerTools;
|
|
704
|
+
reloadServerTools(serverName: string): Promise<void>;
|
|
705
|
+
reloadAllTools(): Promise<void>;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
declare function mcpToolToAgenticTool(mcpTool: MCPTool, client: MCPClient): Tool;
|
|
709
|
+
|
|
710
|
+
interface MCPTransport extends EventEmitter {
|
|
711
|
+
connect(): Promise<void>;
|
|
712
|
+
send(message: MCPMessage): void;
|
|
713
|
+
close(): void;
|
|
714
|
+
isConnected(): boolean;
|
|
715
|
+
}
|
|
716
|
+
declare class StdioTransport extends EventEmitter implements MCPTransport {
|
|
717
|
+
private command;
|
|
718
|
+
private args;
|
|
719
|
+
private env?;
|
|
720
|
+
private process;
|
|
721
|
+
private connected;
|
|
722
|
+
private buffer;
|
|
723
|
+
constructor(command: string, args?: string[], env?: Record<string, string> | undefined);
|
|
724
|
+
connect(): Promise<void>;
|
|
725
|
+
send(message: MCPMessage): void;
|
|
726
|
+
close(): void;
|
|
727
|
+
isConnected(): boolean;
|
|
728
|
+
private handleData;
|
|
729
|
+
}
|
|
730
|
+
declare class SSETransport extends EventEmitter implements MCPTransport {
|
|
731
|
+
private url;
|
|
732
|
+
private eventSource;
|
|
733
|
+
private connected;
|
|
734
|
+
constructor(url: string);
|
|
735
|
+
connect(): Promise<void>;
|
|
736
|
+
send(message: MCPMessage): Promise<void>;
|
|
737
|
+
close(): void;
|
|
738
|
+
isConnected(): boolean;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
interface ACPProduct {
|
|
742
|
+
id: string;
|
|
743
|
+
name: string;
|
|
744
|
+
description?: string;
|
|
745
|
+
price: {
|
|
746
|
+
amount: number;
|
|
747
|
+
currency: string;
|
|
748
|
+
};
|
|
749
|
+
images?: string[];
|
|
750
|
+
variants?: ACPProductVariant[];
|
|
751
|
+
metadata?: Record<string, any>;
|
|
752
|
+
}
|
|
753
|
+
interface ACPProductVariant {
|
|
754
|
+
id: string;
|
|
755
|
+
name: string;
|
|
756
|
+
price: {
|
|
757
|
+
amount: number;
|
|
758
|
+
currency: string;
|
|
759
|
+
};
|
|
760
|
+
attributes?: Record<string, string>;
|
|
761
|
+
inventory?: {
|
|
762
|
+
available: boolean;
|
|
763
|
+
quantity?: number;
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
interface ACPCartItem {
|
|
767
|
+
productId: string;
|
|
768
|
+
variantId?: string;
|
|
769
|
+
quantity: number;
|
|
770
|
+
price: {
|
|
771
|
+
amount: number;
|
|
772
|
+
currency: string;
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
interface ACPCart {
|
|
776
|
+
id: string;
|
|
777
|
+
items: ACPCartItem[];
|
|
778
|
+
totalAmount: {
|
|
779
|
+
amount: number;
|
|
780
|
+
currency: string;
|
|
781
|
+
};
|
|
782
|
+
metadata?: Record<string, any>;
|
|
783
|
+
}
|
|
784
|
+
interface ACPCheckoutSession {
|
|
785
|
+
id: string;
|
|
786
|
+
cartId: string;
|
|
787
|
+
status: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
788
|
+
customer?: ACPCustomer;
|
|
789
|
+
shippingAddress?: ACPAddress;
|
|
790
|
+
billingAddress?: ACPAddress;
|
|
791
|
+
paymentMethod?: ACPPaymentMethod;
|
|
792
|
+
totalAmount: {
|
|
793
|
+
amount: number;
|
|
794
|
+
currency: string;
|
|
795
|
+
};
|
|
796
|
+
createdAt: string;
|
|
797
|
+
updatedAt: string;
|
|
798
|
+
metadata?: Record<string, any>;
|
|
799
|
+
}
|
|
800
|
+
interface ACPCustomer {
|
|
801
|
+
id?: string;
|
|
802
|
+
email: string;
|
|
803
|
+
name?: string;
|
|
804
|
+
phone?: string;
|
|
805
|
+
metadata?: Record<string, any>;
|
|
806
|
+
}
|
|
807
|
+
interface ACPAddress {
|
|
808
|
+
line1: string;
|
|
809
|
+
line2?: string;
|
|
810
|
+
city: string;
|
|
811
|
+
state?: string;
|
|
812
|
+
postalCode: string;
|
|
813
|
+
country: string;
|
|
814
|
+
}
|
|
815
|
+
interface ACPPaymentMethod {
|
|
816
|
+
type: 'card' | 'delegated' | 'wallet' | 'bank_transfer';
|
|
817
|
+
token?: string;
|
|
818
|
+
delegatedProvider?: string;
|
|
819
|
+
metadata?: Record<string, any>;
|
|
820
|
+
}
|
|
821
|
+
interface ACPPaymentIntent {
|
|
822
|
+
id: string;
|
|
823
|
+
amount: {
|
|
824
|
+
amount: number;
|
|
825
|
+
currency: string;
|
|
826
|
+
};
|
|
827
|
+
status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
|
|
828
|
+
paymentMethod?: ACPPaymentMethod;
|
|
829
|
+
metadata?: Record<string, any>;
|
|
830
|
+
}
|
|
831
|
+
interface ACPOrder {
|
|
832
|
+
id: string;
|
|
833
|
+
checkoutSessionId: string;
|
|
834
|
+
status: 'pending' | 'confirmed' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'refunded';
|
|
835
|
+
items: ACPCartItem[];
|
|
836
|
+
customer: ACPCustomer;
|
|
837
|
+
shippingAddress: ACPAddress;
|
|
838
|
+
billingAddress?: ACPAddress;
|
|
839
|
+
totalAmount: {
|
|
840
|
+
amount: number;
|
|
841
|
+
currency: string;
|
|
842
|
+
};
|
|
843
|
+
paymentStatus: 'pending' | 'paid' | 'failed' | 'refunded';
|
|
844
|
+
trackingNumber?: string;
|
|
845
|
+
createdAt: string;
|
|
846
|
+
updatedAt: string;
|
|
847
|
+
metadata?: Record<string, any>;
|
|
848
|
+
}
|
|
849
|
+
interface ACPProductSearchQuery {
|
|
850
|
+
query?: string;
|
|
851
|
+
category?: string;
|
|
852
|
+
minPrice?: number;
|
|
853
|
+
maxPrice?: number;
|
|
854
|
+
limit?: number;
|
|
855
|
+
offset?: number;
|
|
856
|
+
sortBy?: 'price' | 'name' | 'popularity' | 'newest';
|
|
857
|
+
sortOrder?: 'asc' | 'desc';
|
|
858
|
+
}
|
|
859
|
+
interface ACPProductSearchResult {
|
|
860
|
+
products: ACPProduct[];
|
|
861
|
+
total: number;
|
|
862
|
+
hasMore: boolean;
|
|
863
|
+
}
|
|
864
|
+
interface ACPConfig {
|
|
865
|
+
baseUrl: string;
|
|
866
|
+
apiKey?: string;
|
|
867
|
+
merchantId?: string;
|
|
868
|
+
timeout?: number;
|
|
869
|
+
headers?: Record<string, string>;
|
|
870
|
+
}
|
|
871
|
+
interface ACPDelegatedPaymentConfig {
|
|
872
|
+
provider: string;
|
|
873
|
+
merchantAccountId: string;
|
|
874
|
+
returnUrl?: string;
|
|
875
|
+
cancelUrl?: string;
|
|
876
|
+
metadata?: Record<string, any>;
|
|
877
|
+
}
|
|
878
|
+
interface ACPWebhookEvent {
|
|
879
|
+
id: string;
|
|
880
|
+
type: 'checkout.completed' | 'payment.succeeded' | 'payment.failed' | 'order.confirmed' | 'order.shipped' | 'order.delivered' | 'order.cancelled';
|
|
881
|
+
data: ACPCheckoutSession | ACPPaymentIntent | ACPOrder;
|
|
882
|
+
createdAt: string;
|
|
883
|
+
}
|
|
884
|
+
interface ACPResponse<T> {
|
|
885
|
+
data: T;
|
|
886
|
+
error?: {
|
|
887
|
+
code: string;
|
|
888
|
+
message: string;
|
|
889
|
+
details?: any;
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
interface ACPPaginationMeta {
|
|
893
|
+
total: number;
|
|
894
|
+
limit: number;
|
|
895
|
+
offset: number;
|
|
896
|
+
hasMore: boolean;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
declare class ACPClient {
|
|
900
|
+
private config;
|
|
901
|
+
constructor(config: ACPConfig);
|
|
902
|
+
private request;
|
|
903
|
+
searchProducts(query: ACPProductSearchQuery): Promise<ACPResponse<ACPProductSearchResult>>;
|
|
904
|
+
getProduct(productId: string): Promise<ACPResponse<ACPProduct>>;
|
|
905
|
+
getProducts(productIds: string[]): Promise<ACPResponse<ACPProduct[]>>;
|
|
906
|
+
createCart(): Promise<ACPResponse<ACPCart>>;
|
|
907
|
+
getCart(cartId: string): Promise<ACPResponse<ACPCart>>;
|
|
908
|
+
addToCart(cartId: string, item: ACPCartItem): Promise<ACPResponse<ACPCart>>;
|
|
909
|
+
updateCartItem(cartId: string, productId: string, quantity: number): Promise<ACPResponse<ACPCart>>;
|
|
910
|
+
removeFromCart(cartId: string, productId: string): Promise<ACPResponse<ACPCart>>;
|
|
911
|
+
clearCart(cartId: string): Promise<ACPResponse<ACPCart>>;
|
|
912
|
+
createCheckoutSession(cartId: string, customer?: ACPCustomer): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
913
|
+
getCheckoutSession(sessionId: string): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
914
|
+
updateShippingAddress(sessionId: string, address: ACPAddress): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
915
|
+
updateBillingAddress(sessionId: string, address: ACPAddress): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
916
|
+
updatePaymentMethod(sessionId: string, paymentMethod: ACPPaymentMethod): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
917
|
+
completeCheckout(sessionId: string): Promise<ACPResponse<ACPCheckoutSession>>;
|
|
918
|
+
createDelegatedPayment(sessionId: string, config: ACPDelegatedPaymentConfig): Promise<ACPResponse<ACPPaymentIntent>>;
|
|
919
|
+
getPaymentIntent(intentId: string): Promise<ACPResponse<ACPPaymentIntent>>;
|
|
920
|
+
confirmPayment(intentId: string, paymentToken?: string): Promise<ACPResponse<ACPPaymentIntent>>;
|
|
921
|
+
getOrder(orderId: string): Promise<ACPResponse<ACPOrder>>;
|
|
922
|
+
getCustomerOrders(customerId: string, limit?: number, offset?: number): Promise<ACPResponse<ACPOrder[]>>;
|
|
923
|
+
cancelOrder(orderId: string): Promise<ACPResponse<ACPOrder>>;
|
|
924
|
+
getOrderTracking(orderId: string): Promise<ACPResponse<{
|
|
925
|
+
trackingNumber: string;
|
|
926
|
+
carrier: string;
|
|
927
|
+
status: string;
|
|
928
|
+
}>>;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
declare function createACPTools(client: ACPClient): Tool[];
|
|
932
|
+
|
|
933
|
+
interface ConversationTurn {
|
|
934
|
+
role: 'user' | 'assistant' | 'system';
|
|
935
|
+
content: string;
|
|
936
|
+
metadata?: Record<string, any>;
|
|
937
|
+
timestamp?: Date;
|
|
938
|
+
}
|
|
939
|
+
interface ConversationState {
|
|
940
|
+
currentStep: string;
|
|
941
|
+
data: Record<string, any>;
|
|
942
|
+
history: ConversationTurn[];
|
|
943
|
+
metadata: Record<string, any>;
|
|
944
|
+
}
|
|
945
|
+
interface ConversationStep {
|
|
946
|
+
id: string;
|
|
947
|
+
prompt: string;
|
|
948
|
+
schema?: z.ZodSchema;
|
|
949
|
+
next?: string | ((response: any, state: ConversationState) => string);
|
|
950
|
+
onComplete?: (response: any, state: ConversationState) => void | Promise<void>;
|
|
951
|
+
validation?: (response: any) => boolean | Promise<boolean>;
|
|
952
|
+
errorMessage?: string;
|
|
953
|
+
maxRetries?: number;
|
|
954
|
+
}
|
|
955
|
+
interface ConversationSchemaConfig {
|
|
956
|
+
name: string;
|
|
957
|
+
description?: string;
|
|
958
|
+
startStep: string;
|
|
959
|
+
steps: ConversationStep[];
|
|
960
|
+
onComplete?: (state: ConversationState) => void | Promise<void>;
|
|
961
|
+
onError?: (error: Error, state: ConversationState) => void | Promise<void>;
|
|
962
|
+
}
|
|
963
|
+
declare class ConversationSchema {
|
|
964
|
+
private config;
|
|
965
|
+
private state;
|
|
966
|
+
constructor(config: ConversationSchemaConfig);
|
|
967
|
+
getState(): ConversationState;
|
|
968
|
+
reset(): void;
|
|
969
|
+
getCurrentStep(): ConversationStep | undefined;
|
|
970
|
+
processResponse(userResponse: string): Promise<{
|
|
971
|
+
success: boolean;
|
|
972
|
+
message?: string;
|
|
973
|
+
nextPrompt?: string;
|
|
974
|
+
isComplete: boolean;
|
|
975
|
+
state: ConversationState;
|
|
976
|
+
}>;
|
|
977
|
+
private extractDataFromResponse;
|
|
978
|
+
getFormattedHistory(): string;
|
|
979
|
+
exportState(): string;
|
|
980
|
+
importState(stateJson: string): void;
|
|
981
|
+
}
|
|
982
|
+
declare class ConversationSchemaBuilder {
|
|
983
|
+
private config;
|
|
984
|
+
name(name: string): this;
|
|
985
|
+
description(description: string): this;
|
|
986
|
+
startAt(stepId: string): this;
|
|
987
|
+
addStep(step: ConversationStep): this;
|
|
988
|
+
onComplete(callback: (state: ConversationState) => void | Promise<void>): this;
|
|
989
|
+
onError(callback: (error: Error, state: ConversationState) => void | Promise<void>): this;
|
|
990
|
+
build(): ConversationSchema;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
declare class ConversationManager {
|
|
994
|
+
private agent;
|
|
995
|
+
private schema;
|
|
996
|
+
private conversationId;
|
|
997
|
+
constructor(agent: Agent, schema: ConversationSchema, conversationId?: string);
|
|
998
|
+
start(): {
|
|
999
|
+
prompt: string;
|
|
1000
|
+
state: ConversationState;
|
|
1001
|
+
};
|
|
1002
|
+
processMessage(userMessage: string): Promise<{
|
|
1003
|
+
response: string;
|
|
1004
|
+
isComplete: boolean;
|
|
1005
|
+
state: ConversationState;
|
|
1006
|
+
aiResponse?: string;
|
|
1007
|
+
}>;
|
|
1008
|
+
private buildAIPrompt;
|
|
1009
|
+
getState(): ConversationState;
|
|
1010
|
+
reset(): void;
|
|
1011
|
+
getHistory(): ConversationTurn[];
|
|
1012
|
+
export(): string;
|
|
1013
|
+
import(stateJson: string): void;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
type AudioFormat = 'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm';
|
|
1017
|
+
type VoiceType = string;
|
|
1018
|
+
interface STTConfig {
|
|
1019
|
+
model?: string;
|
|
1020
|
+
language?: string;
|
|
1021
|
+
temperature?: number;
|
|
1022
|
+
prompt?: string;
|
|
1023
|
+
responseFormat?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
|
|
1024
|
+
}
|
|
1025
|
+
interface TTSConfig {
|
|
1026
|
+
model?: string;
|
|
1027
|
+
voice?: VoiceType;
|
|
1028
|
+
speed?: number;
|
|
1029
|
+
format?: AudioFormat;
|
|
1030
|
+
}
|
|
1031
|
+
interface STTResult {
|
|
1032
|
+
text: string;
|
|
1033
|
+
language?: string;
|
|
1034
|
+
duration?: number;
|
|
1035
|
+
segments?: Array<{
|
|
1036
|
+
id: number;
|
|
1037
|
+
start: number;
|
|
1038
|
+
end: number;
|
|
1039
|
+
text: string;
|
|
1040
|
+
}>;
|
|
1041
|
+
words?: Array<{
|
|
1042
|
+
word: string;
|
|
1043
|
+
start: number;
|
|
1044
|
+
end: number;
|
|
1045
|
+
}>;
|
|
1046
|
+
}
|
|
1047
|
+
interface TTSResult {
|
|
1048
|
+
audio: Buffer;
|
|
1049
|
+
format: AudioFormat;
|
|
1050
|
+
duration?: number;
|
|
1051
|
+
byteLength: number;
|
|
1052
|
+
}
|
|
1053
|
+
interface STTProvider {
|
|
1054
|
+
transcribe(audio: Buffer | string, config?: STTConfig): Promise<STTResult>;
|
|
1055
|
+
transcribeStream?(audioStream: ReadableStream | NodeJS.ReadableStream, config?: STTConfig): AsyncIterable<Partial<STTResult>>;
|
|
1056
|
+
supportsStreaming(): boolean;
|
|
1057
|
+
}
|
|
1058
|
+
interface TTSProvider {
|
|
1059
|
+
synthesize(text: string, config?: TTSConfig): Promise<TTSResult>;
|
|
1060
|
+
synthesizeStream?(text: string, config?: TTSConfig): AsyncIterable<Buffer>;
|
|
1061
|
+
supportsStreaming(): boolean;
|
|
1062
|
+
getVoices?(): Promise<Array<{
|
|
1063
|
+
id: string;
|
|
1064
|
+
name: string;
|
|
1065
|
+
language?: string;
|
|
1066
|
+
gender?: 'male' | 'female' | 'neutral';
|
|
1067
|
+
}>>;
|
|
1068
|
+
}
|
|
1069
|
+
interface VoiceMessage {
|
|
1070
|
+
role: 'user' | 'assistant';
|
|
1071
|
+
text: string;
|
|
1072
|
+
audio?: Buffer;
|
|
1073
|
+
timestamp: Date;
|
|
1074
|
+
}
|
|
1075
|
+
interface VoiceAgentConfig {
|
|
1076
|
+
sttProvider: STTProvider;
|
|
1077
|
+
ttsProvider: TTSProvider;
|
|
1078
|
+
sttConfig?: STTConfig;
|
|
1079
|
+
ttsConfig?: TTSConfig;
|
|
1080
|
+
autoSpeak?: boolean;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
declare class VoiceAgent {
|
|
1084
|
+
private agent;
|
|
1085
|
+
private sttProvider;
|
|
1086
|
+
private ttsProvider;
|
|
1087
|
+
private sttConfig?;
|
|
1088
|
+
private ttsConfig?;
|
|
1089
|
+
private autoSpeak;
|
|
1090
|
+
private conversationHistory;
|
|
1091
|
+
constructor(agent: Agent, config: VoiceAgentConfig);
|
|
1092
|
+
processVoice(audioInput: Buffer | string, context: AgentContext): Promise<{
|
|
1093
|
+
text: string;
|
|
1094
|
+
audio?: Buffer;
|
|
1095
|
+
response: AgentResponse;
|
|
1096
|
+
}>;
|
|
1097
|
+
speak(text: string, context: AgentContext): Promise<{
|
|
1098
|
+
text: string;
|
|
1099
|
+
audio: Buffer;
|
|
1100
|
+
response: AgentResponse;
|
|
1101
|
+
}>;
|
|
1102
|
+
transcribe(audioInput: Buffer | string): Promise<string>;
|
|
1103
|
+
synthesize(text: string): Promise<Buffer>;
|
|
1104
|
+
synthesizeStream(text: string): AsyncIterable<Buffer>;
|
|
1105
|
+
getHistory(): VoiceMessage[];
|
|
1106
|
+
clearHistory(): void;
|
|
1107
|
+
saveAudio(audio: Buffer, outputPath: string): void;
|
|
1108
|
+
exportConversation(outputDir: string): void;
|
|
1109
|
+
setAutoSpeak(enabled: boolean): void;
|
|
1110
|
+
setSTTConfig(config: STTConfig): void;
|
|
1111
|
+
setTTSConfig(config: TTSConfig): void;
|
|
1112
|
+
supportsStreaming(): {
|
|
1113
|
+
stt: boolean;
|
|
1114
|
+
tts: boolean;
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
declare class OpenAIWhisperProvider implements STTProvider {
|
|
1119
|
+
private client;
|
|
1120
|
+
constructor(apiKey?: string);
|
|
1121
|
+
transcribe(audio: Buffer | string, config?: STTConfig): Promise<STTResult>;
|
|
1122
|
+
supportsStreaming(): boolean;
|
|
1123
|
+
getSupportedLanguages(): string[];
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
interface LocalWhisperConfig {
|
|
1127
|
+
whisperPath?: string;
|
|
1128
|
+
modelPath?: string;
|
|
1129
|
+
}
|
|
1130
|
+
declare class LocalWhisperProvider implements STTProvider {
|
|
1131
|
+
private whisperPath;
|
|
1132
|
+
private modelPath?;
|
|
1133
|
+
constructor(config?: LocalWhisperConfig);
|
|
1134
|
+
transcribe(audio: Buffer | string, config?: STTConfig): Promise<STTResult>;
|
|
1135
|
+
supportsStreaming(): boolean;
|
|
1136
|
+
isInstalled(): Promise<boolean>;
|
|
1137
|
+
getInstallInstructions(): string;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
declare class OpenAITTSProvider implements TTSProvider {
|
|
1141
|
+
private client;
|
|
1142
|
+
constructor(apiKey?: string);
|
|
1143
|
+
synthesize(text: string, config?: TTSConfig): Promise<TTSResult>;
|
|
1144
|
+
synthesizeStream(text: string, config?: TTSConfig): AsyncIterable<Buffer>;
|
|
1145
|
+
supportsStreaming(): boolean;
|
|
1146
|
+
getVoices(): Promise<Array<{
|
|
1147
|
+
id: string;
|
|
1148
|
+
name: string;
|
|
1149
|
+
language?: string;
|
|
1150
|
+
gender?: 'male' | 'female' | 'neutral';
|
|
1151
|
+
}>>;
|
|
1152
|
+
getModels(): string[];
|
|
1153
|
+
getFormats(): AudioFormat[];
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
interface ElevenLabsConfig {
|
|
1157
|
+
apiKey?: string;
|
|
1158
|
+
baseUrl?: string;
|
|
1159
|
+
}
|
|
1160
|
+
declare class ElevenLabsTTSProvider implements TTSProvider {
|
|
1161
|
+
private apiKey;
|
|
1162
|
+
private baseUrl;
|
|
1163
|
+
constructor(config?: ElevenLabsConfig);
|
|
1164
|
+
synthesize(text: string, config?: TTSConfig): Promise<TTSResult>;
|
|
1165
|
+
synthesizeStream(text: string, config?: TTSConfig): AsyncIterable<Buffer>;
|
|
1166
|
+
supportsStreaming(): boolean;
|
|
1167
|
+
getVoices(): Promise<Array<{
|
|
1168
|
+
id: string;
|
|
1169
|
+
name: string;
|
|
1170
|
+
language?: string;
|
|
1171
|
+
gender?: 'male' | 'female' | 'neutral';
|
|
1172
|
+
}>>;
|
|
1173
|
+
getModels(): Promise<string[]>;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
interface PiperTTSConfig {
|
|
1177
|
+
piperPath?: string;
|
|
1178
|
+
modelPath?: string;
|
|
1179
|
+
configPath?: string;
|
|
1180
|
+
}
|
|
1181
|
+
declare class PiperTTSProvider implements TTSProvider {
|
|
1182
|
+
private piperPath;
|
|
1183
|
+
private modelPath?;
|
|
1184
|
+
private configPath?;
|
|
1185
|
+
constructor(config?: PiperTTSConfig);
|
|
1186
|
+
synthesize(text: string, config?: TTSConfig): Promise<TTSResult>;
|
|
1187
|
+
supportsStreaming(): boolean;
|
|
1188
|
+
isInstalled(): Promise<boolean>;
|
|
1189
|
+
getInstallInstructions(): string;
|
|
1190
|
+
getVoices(): Promise<Array<{
|
|
1191
|
+
id: string;
|
|
1192
|
+
name: string;
|
|
1193
|
+
language?: string;
|
|
1194
|
+
gender?: 'male' | 'female' | 'neutral';
|
|
1195
|
+
}>>;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
interface Tenant {
|
|
1199
|
+
id: string;
|
|
1200
|
+
name: string;
|
|
1201
|
+
slug: string;
|
|
1202
|
+
metadata?: Record<string, unknown>;
|
|
1203
|
+
settings?: TenantSettings;
|
|
1204
|
+
status: TenantStatus;
|
|
1205
|
+
createdAt: Date;
|
|
1206
|
+
updatedAt: Date;
|
|
1207
|
+
}
|
|
1208
|
+
declare enum TenantStatus {
|
|
1209
|
+
ACTIVE = "active",
|
|
1210
|
+
SUSPENDED = "suspended",
|
|
1211
|
+
INACTIVE = "inactive"
|
|
1212
|
+
}
|
|
1213
|
+
interface TenantSettings {
|
|
1214
|
+
maxAgents?: number;
|
|
1215
|
+
maxConversations?: number;
|
|
1216
|
+
rateLimit?: number;
|
|
1217
|
+
dataRetentionDays?: number;
|
|
1218
|
+
allowedProviders?: string[];
|
|
1219
|
+
custom?: Record<string, unknown>;
|
|
1220
|
+
}
|
|
1221
|
+
interface TenantContext {
|
|
1222
|
+
tenant: Tenant;
|
|
1223
|
+
userId?: string;
|
|
1224
|
+
metadata?: Record<string, unknown>;
|
|
1225
|
+
}
|
|
1226
|
+
interface TenantApiKey {
|
|
1227
|
+
id: string;
|
|
1228
|
+
tenantId: string;
|
|
1229
|
+
key: string;
|
|
1230
|
+
name: string;
|
|
1231
|
+
scopes: string[];
|
|
1232
|
+
expiresAt?: Date;
|
|
1233
|
+
createdAt: Date;
|
|
1234
|
+
lastUsedAt?: Date;
|
|
1235
|
+
isActive: boolean;
|
|
1236
|
+
}
|
|
1237
|
+
interface TenantQuota {
|
|
1238
|
+
tenantId: string;
|
|
1239
|
+
resource: string;
|
|
1240
|
+
used: number;
|
|
1241
|
+
limit: number;
|
|
1242
|
+
period: 'hourly' | 'daily' | 'monthly';
|
|
1243
|
+
periodStart: Date;
|
|
1244
|
+
periodEnd: Date;
|
|
1245
|
+
}
|
|
1246
|
+
interface TenantStorage {
|
|
1247
|
+
createTenant(tenant: Omit<Tenant, 'id' | 'createdAt' | 'updatedAt'>): Promise<Tenant>;
|
|
1248
|
+
getTenant(tenantId: string): Promise<Tenant | null>;
|
|
1249
|
+
getTenantBySlug(slug: string): Promise<Tenant | null>;
|
|
1250
|
+
updateTenant(tenantId: string, updates: Partial<Tenant>): Promise<Tenant>;
|
|
1251
|
+
deleteTenant(tenantId: string): Promise<void>;
|
|
1252
|
+
listTenants(options?: {
|
|
1253
|
+
limit?: number;
|
|
1254
|
+
offset?: number;
|
|
1255
|
+
status?: TenantStatus;
|
|
1256
|
+
}): Promise<{
|
|
1257
|
+
tenants: Tenant[];
|
|
1258
|
+
total: number;
|
|
1259
|
+
}>;
|
|
1260
|
+
createApiKey(apiKey: Omit<TenantApiKey, 'id' | 'createdAt'>): Promise<TenantApiKey>;
|
|
1261
|
+
getApiKeyByKey(key: string): Promise<TenantApiKey | null>;
|
|
1262
|
+
revokeApiKey(apiKeyId: string): Promise<void>;
|
|
1263
|
+
updateQuota(quota: TenantQuota): Promise<void>;
|
|
1264
|
+
getQuota(tenantId: string, resource: string, period: string): Promise<TenantQuota | null>;
|
|
1265
|
+
}
|
|
1266
|
+
interface TenantResolver {
|
|
1267
|
+
resolve(context: unknown): Promise<TenantContext | null>;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
interface TenantManagerConfig {
|
|
1271
|
+
storage: TenantStorage;
|
|
1272
|
+
defaultSettings?: Tenant['settings'];
|
|
1273
|
+
}
|
|
1274
|
+
declare class TenantManager {
|
|
1275
|
+
private storage;
|
|
1276
|
+
private defaultSettings;
|
|
1277
|
+
constructor(config: TenantManagerConfig);
|
|
1278
|
+
createTenant(data: {
|
|
1279
|
+
name: string;
|
|
1280
|
+
slug: string;
|
|
1281
|
+
metadata?: Record<string, unknown>;
|
|
1282
|
+
settings?: Tenant['settings'];
|
|
1283
|
+
}): Promise<Tenant>;
|
|
1284
|
+
getTenant(tenantId: string): Promise<Tenant | null>;
|
|
1285
|
+
getTenantBySlug(slug: string): Promise<Tenant | null>;
|
|
1286
|
+
updateTenant(tenantId: string, updates: Partial<Tenant>): Promise<Tenant>;
|
|
1287
|
+
suspendTenant(tenantId: string): Promise<Tenant>;
|
|
1288
|
+
activateTenant(tenantId: string): Promise<Tenant>;
|
|
1289
|
+
deleteTenant(tenantId: string): Promise<void>;
|
|
1290
|
+
listTenants(options?: {
|
|
1291
|
+
limit?: number;
|
|
1292
|
+
offset?: number;
|
|
1293
|
+
status?: TenantStatus;
|
|
1294
|
+
}): Promise<{
|
|
1295
|
+
tenants: Tenant[];
|
|
1296
|
+
total: number;
|
|
1297
|
+
}>;
|
|
1298
|
+
createApiKey(tenantId: string, data: {
|
|
1299
|
+
name: string;
|
|
1300
|
+
scopes?: string[];
|
|
1301
|
+
expiresAt?: Date;
|
|
1302
|
+
}): Promise<{
|
|
1303
|
+
apiKey: TenantApiKey;
|
|
1304
|
+
plainKey: string;
|
|
1305
|
+
}>;
|
|
1306
|
+
verifyApiKey(plainKey: string): Promise<Tenant | null>;
|
|
1307
|
+
revokeApiKey(apiKeyId: string): Promise<void>;
|
|
1308
|
+
checkQuota(tenantId: string, resource: string, amount?: number): Promise<{
|
|
1309
|
+
allowed: boolean;
|
|
1310
|
+
remaining: number;
|
|
1311
|
+
}>;
|
|
1312
|
+
incrementQuota(tenantId: string, resource: string, amount?: number): Promise<void>;
|
|
1313
|
+
private hashApiKey;
|
|
1314
|
+
private getResourceLimit;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
declare class MemoryTenantStorage implements TenantStorage {
|
|
1318
|
+
private tenants;
|
|
1319
|
+
private tenantsBySlug;
|
|
1320
|
+
private apiKeys;
|
|
1321
|
+
private apiKeysByKey;
|
|
1322
|
+
private quotas;
|
|
1323
|
+
private nextId;
|
|
1324
|
+
private nextApiKeyId;
|
|
1325
|
+
createTenant(data: Omit<Tenant, 'id' | 'createdAt' | 'updatedAt'>): Promise<Tenant>;
|
|
1326
|
+
getTenant(tenantId: string): Promise<Tenant | null>;
|
|
1327
|
+
getTenantBySlug(slug: string): Promise<Tenant | null>;
|
|
1328
|
+
updateTenant(tenantId: string, updates: Partial<Tenant>): Promise<Tenant>;
|
|
1329
|
+
deleteTenant(tenantId: string): Promise<void>;
|
|
1330
|
+
listTenants(options?: {
|
|
1331
|
+
limit?: number;
|
|
1332
|
+
offset?: number;
|
|
1333
|
+
status?: TenantStatus;
|
|
1334
|
+
}): Promise<{
|
|
1335
|
+
tenants: Tenant[];
|
|
1336
|
+
total: number;
|
|
1337
|
+
}>;
|
|
1338
|
+
createApiKey(data: Omit<TenantApiKey, 'id' | 'createdAt'>): Promise<TenantApiKey>;
|
|
1339
|
+
getApiKeyByKey(key: string): Promise<TenantApiKey | null>;
|
|
1340
|
+
revokeApiKey(apiKeyId: string): Promise<void>;
|
|
1341
|
+
updateQuota(quota: TenantQuota): Promise<void>;
|
|
1342
|
+
getQuota(tenantId: string, resource: string, period: string): Promise<TenantQuota | null>;
|
|
1343
|
+
clear(): void;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
export { type ACPAddress, type ACPCart, type ACPCartItem, type ACPCheckoutSession, ACPClient, type ACPConfig, type ACPCustomer, type ACPDelegatedPaymentConfig, type ACPOrder, type ACPPaginationMeta, type ACPPaymentIntent, type ACPPaymentMethod, type ACPProduct, type ACPProductSearchQuery, type ACPProductSearchResult, type ACPProductVariant, type ACPResponse, type ACPWebhookEvent, Agent, type AgentConfig, type AgentContext, type AgentMetrics, type AgentResponse, AnthropicProvider, type AudioFormat, BufferMemory, Cache, ContentFormatter, ConversationManager, ConversationSchema, ConversationSchemaBuilder, type ConversationSchemaConfig, type ConversationState, type ConversationStep, type ConversationTurn, ElevenLabsTTSProvider, type ErrorHandlingStrategy, type FormatOptions, type FormattedContent, GeminiProvider, type LLMProvider, type LLMResponse, type LLMStreamChunk, LMStudioProvider, LRUCache, LocalAIProvider, LocalWhisperProvider, type LogLevel, Logger, type LoggerConfig, type MCPCallToolRequest, type MCPCallToolResponse, MCPClient, type MCPListToolsRequest, type MCPListToolsResponse, type MCPMessage, type MCPPrompt, type MCPReadResourceRequest, type MCPReadResourceResponse, MCPRegistry, type MCPResource, type MCPServerCapabilities, type MCPServerConfig, type MCPServerInfo, type MCPTool, type MCPTransport, type MemoryConfig, type MemoryStore, MemoryTenantStorage, type Message, MetricsCollector, OllamaProvider, OpenAICompatibleProvider, OpenAIProvider, OpenAITTSProvider, OpenAIWhisperProvider, type OutputFormat, ParallelWorkflow, PiperTTSProvider, type ProviderConfig, type ProviderInstanceConfig, RateLimiter, RedisMemory, type RetryConfig, type RoutingLogic, type RoutingRule, SSETransport, type STTConfig, type STTProvider, type STTResult, SequentialWorkflow, SlidingWindowRateLimiter, type Span, type SpanContext, StdioTransport, type StreamEvent, SummaryMemory, SupervisorWorkflow, type TTSConfig, type TTSProvider, type TTSResult, type Tenant, type TenantApiKey, TenantBufferMemory, type TenantContext, TenantManager, type TenantManagerConfig, type TenantQuota, type TenantResolver, type TenantSettings, TenantStatus, type TenantStorage, TextGenerationWebUIProvider, type Tool, type ToolCall, type ToolContext, ToolRegistry, Tracer, VLLMProvider, VoiceAgent, type VoiceAgentConfig, type VoiceMessage, type VoiceType, Workflow, type WorkflowConfig, WorkflowFactory, type WorkflowType, calculatorTool, createACPTools, defaultLogger, figmaGetCommentsTool, figmaGetFileTool, figmaGetImagesTool, figmaGetNodesTool, figmaPostCommentTool, fileListTool, fileReadTool, fileWriteTool, globalMetrics, globalTracer, httpRequestTool, mcpToolToAgenticTool, n8nExecuteWorkflowTool, n8nGetExecutionTool, n8nGetWorkflowTool, n8nListWorkflowsTool, n8nTriggerWebhookTool, stringTransformTool, textSummaryTool };
|