@huyooo/ai-chat-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/dist/index.cjs +1563 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +496 -0
- package/dist/index.d.ts +496 -0
- package/dist/index.js +1554 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Chat Core 类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** 对话模式 */
|
|
5
|
+
type ChatMode = 'agent' | 'plan' | 'ask';
|
|
6
|
+
/** 可用模型 */
|
|
7
|
+
type ModelProvider = 'doubao' | 'deepseek' | 'qwen' | 'gemini' | 'openrouter';
|
|
8
|
+
/** 模型配置 */
|
|
9
|
+
interface ModelConfig {
|
|
10
|
+
provider: ModelProvider;
|
|
11
|
+
model: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
supportsTools: boolean;
|
|
14
|
+
supportsWebSearch: boolean;
|
|
15
|
+
/** 支持的深度思考模式 */
|
|
16
|
+
supportedThinkingModes: ThinkingMode[];
|
|
17
|
+
}
|
|
18
|
+
/** 预定义模型列表 */
|
|
19
|
+
declare const AVAILABLE_MODELS: ModelConfig[];
|
|
20
|
+
/** Agent 配置 */
|
|
21
|
+
interface AgentConfig {
|
|
22
|
+
/** 豆包/火山引擎 API Key (用于豆包和 DeepSeek) */
|
|
23
|
+
arkApiKey: string;
|
|
24
|
+
/** 豆包 API URL */
|
|
25
|
+
arkApiUrl?: string;
|
|
26
|
+
/** 通义千问 API Key */
|
|
27
|
+
qwenApiKey?: string;
|
|
28
|
+
/** 通义千问 API URL */
|
|
29
|
+
qwenApiUrl?: string;
|
|
30
|
+
/** OpenRouter API Key */
|
|
31
|
+
openrouterApiKey?: string;
|
|
32
|
+
/** OpenRouter API URL */
|
|
33
|
+
openrouterApiUrl?: string;
|
|
34
|
+
/** Gemini API Key (用于图片/视频) */
|
|
35
|
+
geminiApiKey: string;
|
|
36
|
+
/** 工作目录 */
|
|
37
|
+
workingDir?: string;
|
|
38
|
+
}
|
|
39
|
+
/** 深度思考模式 */
|
|
40
|
+
type ThinkingMode = 'enabled' | 'disabled';
|
|
41
|
+
/** 聊天配置(每次聊天可变的选项) */
|
|
42
|
+
interface ChatOptions {
|
|
43
|
+
/** 对话模式 */
|
|
44
|
+
mode?: ChatMode;
|
|
45
|
+
/** 使用的模型 */
|
|
46
|
+
model?: string;
|
|
47
|
+
/** 模型提供商 */
|
|
48
|
+
provider?: ModelProvider;
|
|
49
|
+
/** 是否启用联网搜索 */
|
|
50
|
+
enableWebSearch?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 深度思考模式
|
|
53
|
+
* - 'enabled': 强制开启深度思考
|
|
54
|
+
* - 'disabled': 强制关闭深度思考
|
|
55
|
+
*/
|
|
56
|
+
thinkingMode?: ThinkingMode;
|
|
57
|
+
/** 深度思考预算(token 数,仅 enabled 时有效) */
|
|
58
|
+
thinkingBudget?: number;
|
|
59
|
+
}
|
|
60
|
+
/** 聊天进度事件类型 */
|
|
61
|
+
type ChatProgressType = 'thinking' | 'search_start' | 'search_result' | 'tool_call' | 'tool_result' | 'text' | 'text_delta' | 'image' | 'video' | 'done' | 'error';
|
|
62
|
+
/** 聊天进度事件 */
|
|
63
|
+
interface ChatProgress {
|
|
64
|
+
type: ChatProgressType;
|
|
65
|
+
data: unknown;
|
|
66
|
+
}
|
|
67
|
+
/** 工具调用进度 */
|
|
68
|
+
interface ToolCallProgress {
|
|
69
|
+
type: 'tool_call';
|
|
70
|
+
data: {
|
|
71
|
+
name: string;
|
|
72
|
+
args: Record<string, unknown>;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** 工具结果进度 */
|
|
76
|
+
interface ToolResultProgress {
|
|
77
|
+
type: 'tool_result';
|
|
78
|
+
data: {
|
|
79
|
+
name: string;
|
|
80
|
+
result: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** 搜索开始进度 */
|
|
84
|
+
interface SearchStartProgress {
|
|
85
|
+
type: 'search_start';
|
|
86
|
+
data: {
|
|
87
|
+
query: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** 搜索结果进度 */
|
|
91
|
+
interface SearchResultProgress {
|
|
92
|
+
type: 'search_result';
|
|
93
|
+
data: {
|
|
94
|
+
results: Array<{
|
|
95
|
+
title: string;
|
|
96
|
+
url: string;
|
|
97
|
+
snippet: string;
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/** 文本进度 */
|
|
102
|
+
interface TextProgress {
|
|
103
|
+
type: 'text';
|
|
104
|
+
data: string;
|
|
105
|
+
}
|
|
106
|
+
/** 流式文本增量 */
|
|
107
|
+
interface TextDeltaProgress {
|
|
108
|
+
type: 'text_delta';
|
|
109
|
+
data: string;
|
|
110
|
+
}
|
|
111
|
+
/** 思考进度 */
|
|
112
|
+
interface ThinkingProgress {
|
|
113
|
+
type: 'thinking';
|
|
114
|
+
data: {
|
|
115
|
+
content: string;
|
|
116
|
+
isComplete?: boolean;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
/** 图片进度 */
|
|
120
|
+
interface ImageProgress {
|
|
121
|
+
type: 'image';
|
|
122
|
+
data: {
|
|
123
|
+
path?: string;
|
|
124
|
+
base64?: string;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
/** 工具执行器接口(可由使用方实现) */
|
|
128
|
+
interface ToolExecutor$1 {
|
|
129
|
+
/** 执行 Shell 命令 */
|
|
130
|
+
executeCommand(command: string, workingDir?: string): Promise<{
|
|
131
|
+
success: boolean;
|
|
132
|
+
output?: string;
|
|
133
|
+
error?: string;
|
|
134
|
+
}>;
|
|
135
|
+
/** 读取文件 */
|
|
136
|
+
readFile?(path: string): Promise<Buffer>;
|
|
137
|
+
/** 写入文件 */
|
|
138
|
+
writeFile?(path: string, data: Buffer): Promise<void>;
|
|
139
|
+
/** 读取目录 */
|
|
140
|
+
readDirectory?(path: string): Promise<string[]>;
|
|
141
|
+
}
|
|
142
|
+
/** 工具定义(OpenAI 格式) */
|
|
143
|
+
interface ToolDefinition {
|
|
144
|
+
type: 'function';
|
|
145
|
+
function: {
|
|
146
|
+
name: string;
|
|
147
|
+
description: string;
|
|
148
|
+
parameters: {
|
|
149
|
+
type: 'object';
|
|
150
|
+
properties: Record<string, {
|
|
151
|
+
type: string;
|
|
152
|
+
description: string;
|
|
153
|
+
enum?: string[];
|
|
154
|
+
items?: {
|
|
155
|
+
type: string;
|
|
156
|
+
};
|
|
157
|
+
}>;
|
|
158
|
+
required: string[];
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/** 聊天消息(内部格式) */
|
|
163
|
+
interface ChatMessage {
|
|
164
|
+
/** 消息 ID(豆包 Responses API 需要) */
|
|
165
|
+
id?: string;
|
|
166
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
167
|
+
content: string;
|
|
168
|
+
/** 深度思考内容(DeepSeek 思考模式下需要回传) */
|
|
169
|
+
reasoning_content?: string;
|
|
170
|
+
tool_call_id?: string;
|
|
171
|
+
tool_calls?: Array<{
|
|
172
|
+
id: string;
|
|
173
|
+
type: 'function';
|
|
174
|
+
function: {
|
|
175
|
+
name: string;
|
|
176
|
+
arguments: string;
|
|
177
|
+
};
|
|
178
|
+
}>;
|
|
179
|
+
}
|
|
180
|
+
/** DeepSeek Responses API 消息格式 */
|
|
181
|
+
interface DeepSeekMessage {
|
|
182
|
+
role: 'user' | 'assistant';
|
|
183
|
+
content: Array<{
|
|
184
|
+
type: 'input_text' | 'output_text';
|
|
185
|
+
text: string;
|
|
186
|
+
}>;
|
|
187
|
+
}
|
|
188
|
+
/** DeepSeek / 火山引擎 Responses API 工具定义 */
|
|
189
|
+
interface DeepSeekTool {
|
|
190
|
+
type: 'function' | 'web_search';
|
|
191
|
+
function?: {
|
|
192
|
+
name: string;
|
|
193
|
+
description: string;
|
|
194
|
+
parameters: Record<string, unknown>;
|
|
195
|
+
};
|
|
196
|
+
max_keyword?: number;
|
|
197
|
+
limit?: number;
|
|
198
|
+
sources?: string[];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Provider 基础接口定义
|
|
203
|
+
*
|
|
204
|
+
* 所有 AI 模型提供商都实现这个统一接口
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
/** 工具执行器类型 */
|
|
208
|
+
type ToolExecutor = (name: string, args: Record<string, unknown>) => Promise<string>;
|
|
209
|
+
/** 聊天上下文 */
|
|
210
|
+
interface ChatContext {
|
|
211
|
+
/** 对话历史 */
|
|
212
|
+
history: ChatMessage[];
|
|
213
|
+
/** 系统提示词 */
|
|
214
|
+
systemPrompt: string;
|
|
215
|
+
/** 工作目录 */
|
|
216
|
+
workingDir: string;
|
|
217
|
+
/** 工具执行器 */
|
|
218
|
+
executeTool: ToolExecutor;
|
|
219
|
+
/** 取消信号 */
|
|
220
|
+
signal: AbortSignal;
|
|
221
|
+
}
|
|
222
|
+
/** 模型能力定义 */
|
|
223
|
+
interface ModelCapabilities {
|
|
224
|
+
supportsTools: boolean;
|
|
225
|
+
supportsWebSearch: boolean;
|
|
226
|
+
supportsThinking: boolean;
|
|
227
|
+
supportedThinkingModes: Array<'enabled' | 'disabled'>;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* ChatProvider 接口
|
|
231
|
+
*
|
|
232
|
+
* 每个 AI 模型提供商都需要实现这个接口
|
|
233
|
+
*/
|
|
234
|
+
interface ChatProvider {
|
|
235
|
+
/** 提供商名称 */
|
|
236
|
+
readonly name: string;
|
|
237
|
+
/** 支持的模型列表 */
|
|
238
|
+
readonly supportedModels: string[];
|
|
239
|
+
/**
|
|
240
|
+
* 检查是否支持指定模型
|
|
241
|
+
*/
|
|
242
|
+
supportsModel(model: string): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* 获取模型能力
|
|
245
|
+
*/
|
|
246
|
+
getModelCapabilities(model: string): ModelCapabilities;
|
|
247
|
+
/**
|
|
248
|
+
* 执行聊天
|
|
249
|
+
*
|
|
250
|
+
* @param message 用户消息
|
|
251
|
+
* @param model 模型名称
|
|
252
|
+
* @param options 聊天选项
|
|
253
|
+
* @param context 聊天上下文
|
|
254
|
+
* @returns 异步生成器,产出聊天进度事件
|
|
255
|
+
*/
|
|
256
|
+
chat(message: string, model: string, options: ChatOptions, context: ChatContext): AsyncGenerator<ChatProgress>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* ARK Provider (火山引擎)
|
|
261
|
+
*
|
|
262
|
+
* 统一使用 Responses API,支持:
|
|
263
|
+
* - 函数调用 Function Calling
|
|
264
|
+
* - 联网搜索 Web Search
|
|
265
|
+
* - 深度思考 Thinking
|
|
266
|
+
* - 上下文缓存 Caching
|
|
267
|
+
*
|
|
268
|
+
* 支持模型:豆包 (doubao-*), DeepSeek (deepseek-*)
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/** ARK Provider 配置 */
|
|
272
|
+
interface ArkProviderConfig {
|
|
273
|
+
apiKey: string;
|
|
274
|
+
apiUrl?: string;
|
|
275
|
+
/** 是否启用上下文缓存 */
|
|
276
|
+
enableCaching?: boolean;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* ARK Provider 实现
|
|
280
|
+
*
|
|
281
|
+
* 统一使用 Responses API
|
|
282
|
+
*/
|
|
283
|
+
declare class ArkProvider implements ChatProvider {
|
|
284
|
+
readonly name = "ark";
|
|
285
|
+
readonly supportedModels: string[];
|
|
286
|
+
private apiKey;
|
|
287
|
+
private apiUrl;
|
|
288
|
+
private enableCaching;
|
|
289
|
+
constructor(config: ArkProviderConfig);
|
|
290
|
+
supportsModel(model: string): boolean;
|
|
291
|
+
getModelCapabilities(model: string): ModelCapabilities;
|
|
292
|
+
/**
|
|
293
|
+
* 聊天入口 - 统一使用 Responses API
|
|
294
|
+
*/
|
|
295
|
+
chat(message: string, model: string, options: ChatOptions, context: ChatContext): AsyncGenerator<ChatProgress>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Qwen Provider (通义千问)
|
|
300
|
+
*
|
|
301
|
+
* 使用 DashScope 原生协议以获得完整功能:
|
|
302
|
+
* - 联网搜索引用 (search_info)
|
|
303
|
+
* - 角标标注 (enable_citation)
|
|
304
|
+
* - 深度思考 (enable_thinking)
|
|
305
|
+
*/
|
|
306
|
+
|
|
307
|
+
/** Qwen Provider 配置 */
|
|
308
|
+
interface QwenProviderConfig {
|
|
309
|
+
apiKey: string;
|
|
310
|
+
apiUrl?: string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Qwen Provider 实现
|
|
314
|
+
*/
|
|
315
|
+
declare class QwenProvider implements ChatProvider {
|
|
316
|
+
readonly name = "qwen";
|
|
317
|
+
readonly supportedModels: string[];
|
|
318
|
+
private apiKey;
|
|
319
|
+
private apiUrl;
|
|
320
|
+
constructor(config: QwenProviderConfig);
|
|
321
|
+
supportsModel(model: string): boolean;
|
|
322
|
+
getModelCapabilities(model: string): ModelCapabilities;
|
|
323
|
+
chat(message: string, model: string, options: ChatOptions, context: ChatContext): AsyncGenerator<ChatProgress>;
|
|
324
|
+
/** 调用 DashScope API (流式) */
|
|
325
|
+
private callDashScopeStream;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Gemini 3 Provider (Google)
|
|
330
|
+
*
|
|
331
|
+
* 使用 @google/genai SDK
|
|
332
|
+
*
|
|
333
|
+
* Gemini 3 新特性:
|
|
334
|
+
* - thinking_level: 'low' | 'high' (控制推理深度,替代旧的 thinking_budget)
|
|
335
|
+
* - thoughtSignature (维持推理上下文,必须返回给模型)
|
|
336
|
+
* - includeThoughts (返回思考摘要)
|
|
337
|
+
*
|
|
338
|
+
* 限制:
|
|
339
|
+
* - Google Search + 自定义 Function Calling 仍然不兼容
|
|
340
|
+
* - 内置工具可组合:google_search + url_context + code_execution
|
|
341
|
+
*
|
|
342
|
+
* 参考:https://ai.google.dev/docs/gemini-3
|
|
343
|
+
*/
|
|
344
|
+
|
|
345
|
+
/** Gemini Provider 配置 */
|
|
346
|
+
interface GeminiProviderConfig {
|
|
347
|
+
apiKey: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Gemini Provider 实现
|
|
351
|
+
*/
|
|
352
|
+
declare class GeminiProvider implements ChatProvider {
|
|
353
|
+
readonly name = "gemini";
|
|
354
|
+
readonly supportedModels: string[];
|
|
355
|
+
private geminiClient;
|
|
356
|
+
private apiKey;
|
|
357
|
+
constructor(config: GeminiProviderConfig);
|
|
358
|
+
/** 懒加载 Gemini 客户端 */
|
|
359
|
+
private getClient;
|
|
360
|
+
supportsModel(model: string): boolean;
|
|
361
|
+
getModelCapabilities(model: string): ModelCapabilities;
|
|
362
|
+
chat(message: string, model: string, options: ChatOptions, context: ChatContext): AsyncGenerator<ChatProgress>;
|
|
363
|
+
/** 转换消息格式为 Gemini 格式 */
|
|
364
|
+
private convertToGeminiMessages;
|
|
365
|
+
/** 转换工具定义为 Gemini functionDeclarations 格式 */
|
|
366
|
+
private convertToGeminiFunctions;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* OpenRouter Provider
|
|
371
|
+
*
|
|
372
|
+
* 使用 OpenAI 兼容格式,支持多种模型:
|
|
373
|
+
* - Claude (anthropic/claude-*)
|
|
374
|
+
* - GPT (openai/gpt-*)
|
|
375
|
+
* - Gemini (google/gemini-*)
|
|
376
|
+
*
|
|
377
|
+
* 特性:
|
|
378
|
+
* - Web Search 插件支持
|
|
379
|
+
* - URL 引用 annotations
|
|
380
|
+
* - Extended Thinking (reasoning) 支持
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
/** OpenRouter Provider 配置 */
|
|
384
|
+
interface OpenRouterProviderConfig {
|
|
385
|
+
apiKey: string;
|
|
386
|
+
apiUrl?: string;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* OpenRouter Provider 实现
|
|
390
|
+
*/
|
|
391
|
+
declare class OpenRouterProvider implements ChatProvider {
|
|
392
|
+
readonly name = "openrouter";
|
|
393
|
+
readonly supportedModels: string[];
|
|
394
|
+
private apiKey;
|
|
395
|
+
private apiUrl;
|
|
396
|
+
constructor(config: OpenRouterProviderConfig);
|
|
397
|
+
supportsModel(model: string): boolean;
|
|
398
|
+
getModelCapabilities(model: string): ModelCapabilities;
|
|
399
|
+
/** 检查模型是否支持 Extended Thinking */
|
|
400
|
+
private supportsThinking;
|
|
401
|
+
chat(message: string, model: string, options: ChatOptions, context: ChatContext): AsyncGenerator<ChatProgress>;
|
|
402
|
+
/** 调用 OpenRouter API */
|
|
403
|
+
private callOpenRouter;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* 混合 Agent 类
|
|
408
|
+
*
|
|
409
|
+
* 职责:
|
|
410
|
+
* 1. 管理多个 Provider
|
|
411
|
+
* 2. 路由请求到正确的 Provider
|
|
412
|
+
* 3. 管理对话历史和上下文
|
|
413
|
+
* 4. 处理工具执行
|
|
414
|
+
*/
|
|
415
|
+
declare class HybridAgent {
|
|
416
|
+
private config;
|
|
417
|
+
private providers;
|
|
418
|
+
private geminiClient;
|
|
419
|
+
private toolExecutor;
|
|
420
|
+
private conversationHistory;
|
|
421
|
+
private abortController;
|
|
422
|
+
constructor(config: AgentConfig, toolExecutor?: ToolExecutor$1);
|
|
423
|
+
/**
|
|
424
|
+
* 初始化所有 Provider
|
|
425
|
+
*/
|
|
426
|
+
private initializeProviders;
|
|
427
|
+
/**
|
|
428
|
+
* 判断模型提供商
|
|
429
|
+
*/
|
|
430
|
+
private getModelProvider;
|
|
431
|
+
/**
|
|
432
|
+
* 获取 Provider
|
|
433
|
+
*/
|
|
434
|
+
private getProvider;
|
|
435
|
+
/**
|
|
436
|
+
* 构建系统提示词
|
|
437
|
+
*/
|
|
438
|
+
private buildSystemPrompt;
|
|
439
|
+
/**
|
|
440
|
+
* 获取默认深度思考模式(统一为 disabled)
|
|
441
|
+
*/
|
|
442
|
+
private getDefaultThinkingMode;
|
|
443
|
+
/**
|
|
444
|
+
* 执行工具
|
|
445
|
+
*/
|
|
446
|
+
private executeTool;
|
|
447
|
+
/**
|
|
448
|
+
* 聊天入口
|
|
449
|
+
*
|
|
450
|
+
* 使用 Provider 模式路由请求到对应的模型提供商
|
|
451
|
+
*/
|
|
452
|
+
chat(message: string, options?: ChatOptions, images?: string[]): AsyncGenerator<ChatProgress>;
|
|
453
|
+
/**
|
|
454
|
+
* 中断当前请求
|
|
455
|
+
*/
|
|
456
|
+
abort(): void;
|
|
457
|
+
/**
|
|
458
|
+
* 清空对话历史
|
|
459
|
+
*/
|
|
460
|
+
clearHistory(): void;
|
|
461
|
+
/**
|
|
462
|
+
* 获取对话历史
|
|
463
|
+
*/
|
|
464
|
+
getHistory(): ChatMessage[];
|
|
465
|
+
/**
|
|
466
|
+
* 设置工作目录
|
|
467
|
+
*/
|
|
468
|
+
setWorkingDir(dir: string): void;
|
|
469
|
+
/**
|
|
470
|
+
* 获取当前配置
|
|
471
|
+
*/
|
|
472
|
+
getConfig(): Required<AgentConfig>;
|
|
473
|
+
/**
|
|
474
|
+
* 获取模型能力
|
|
475
|
+
*/
|
|
476
|
+
getModelCapabilities(model: string): ModelCapabilities | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* 获取所有支持的模型
|
|
479
|
+
*/
|
|
480
|
+
getSupportedModels(): ModelConfig[];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* 工具定义和默认执行器
|
|
485
|
+
*/
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* 创建工具定义
|
|
489
|
+
*/
|
|
490
|
+
declare function createToolDefinitions(workingDir?: string): ToolDefinition[];
|
|
491
|
+
/**
|
|
492
|
+
* 创建默认工具执行器(Node.js 环境)
|
|
493
|
+
*/
|
|
494
|
+
declare function createDefaultToolExecutor(workingDir?: string): ToolExecutor$1;
|
|
495
|
+
|
|
496
|
+
export { AVAILABLE_MODELS, type AgentConfig, ArkProvider, type ChatContext, type ChatMessage, type ChatMode, type ChatOptions, type ChatProgress, type ChatProgressType, type ChatProvider, type DeepSeekMessage, type DeepSeekTool, GeminiProvider, HybridAgent, type ImageProgress, type ModelCapabilities, type ModelConfig, type ModelProvider, OpenRouterProvider, type ToolExecutor as ProviderToolExecutor, QwenProvider, type SearchResultProgress, type SearchStartProgress, type TextDeltaProgress, type TextProgress, type ThinkingMode, type ThinkingProgress, type ToolCallProgress, type ToolDefinition, type ToolExecutor$1 as ToolExecutor, type ToolResultProgress, createDefaultToolExecutor, createToolDefinitions };
|