sdkwork-browser-agent 1.0.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.
Files changed (146) hide show
  1. package/README.md +228 -0
  2. package/README.zh.md +228 -0
  3. package/dist/agent-Bpxmkz8W.d.ts +197 -0
  4. package/dist/agent-kexkkI13.d.cts +197 -0
  5. package/dist/browser/agent-Bpxmkz8W.d.ts +197 -0
  6. package/dist/browser/chunk-7W2JJCSS.js +276 -0
  7. package/dist/browser/chunk-7W2JJCSS.js.map +1 -0
  8. package/dist/browser/chunk-BHRFRGR7.js +144 -0
  9. package/dist/browser/chunk-BHRFRGR7.js.map +1 -0
  10. package/dist/browser/chunk-CLP6UNSV.js +285 -0
  11. package/dist/browser/chunk-CLP6UNSV.js.map +1 -0
  12. package/dist/browser/chunk-HXLRBB7S.js +1569 -0
  13. package/dist/browser/chunk-HXLRBB7S.js.map +1 -0
  14. package/dist/browser/chunk-VJEFLRZT.js +1720 -0
  15. package/dist/browser/chunk-VJEFLRZT.js.map +1 -0
  16. package/dist/browser/index.d.ts +842 -0
  17. package/dist/browser/index.js +3293 -0
  18. package/dist/browser/index.js.map +1 -0
  19. package/dist/browser/llm/index.d.ts +235 -0
  20. package/dist/browser/llm/index.js +29 -0
  21. package/dist/browser/llm/index.js.map +1 -0
  22. package/dist/browser/mcp/index.d.ts +63 -0
  23. package/dist/browser/mcp/index.js +9 -0
  24. package/dist/browser/mcp/index.js.map +1 -0
  25. package/dist/browser/provider-Dna36xA-.d.ts +105 -0
  26. package/dist/browser/skills/index.d.ts +401 -0
  27. package/dist/browser/skills/index.js +31 -0
  28. package/dist/browser/skills/index.js.map +1 -0
  29. package/dist/browser/storage/index.d.ts +64 -0
  30. package/dist/browser/storage/index.js +15 -0
  31. package/dist/browser/storage/index.js.map +1 -0
  32. package/dist/browser/tools/index.d.ts +45 -0
  33. package/dist/browser/tools/index.js +15 -0
  34. package/dist/browser/tools/index.js.map +1 -0
  35. package/dist/browser/types-CG5I-byI.d.ts +30 -0
  36. package/dist/chunk-56J3IBXZ.js +144 -0
  37. package/dist/chunk-56J3IBXZ.js.map +1 -0
  38. package/dist/chunk-5XTVS5MB.js +1720 -0
  39. package/dist/chunk-5XTVS5MB.js.map +1 -0
  40. package/dist/chunk-6AYIRBGI.js +166 -0
  41. package/dist/chunk-6AYIRBGI.js.map +1 -0
  42. package/dist/chunk-C2EYJHXW.cjs +276 -0
  43. package/dist/chunk-C2EYJHXW.cjs.map +1 -0
  44. package/dist/chunk-HOZQ445W.cjs +166 -0
  45. package/dist/chunk-HOZQ445W.cjs.map +1 -0
  46. package/dist/chunk-KZNZ6CGD.cjs +144 -0
  47. package/dist/chunk-KZNZ6CGD.cjs.map +1 -0
  48. package/dist/chunk-XFMT5ZA4.js +276 -0
  49. package/dist/chunk-XFMT5ZA4.js.map +1 -0
  50. package/dist/chunk-XPGICLEJ.cjs +1720 -0
  51. package/dist/chunk-XPGICLEJ.cjs.map +1 -0
  52. package/dist/index.cjs +1311 -0
  53. package/dist/index.cjs.map +1 -0
  54. package/dist/index.d.cts +395 -0
  55. package/dist/index.d.ts +395 -0
  56. package/dist/index.js +1311 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/llm/index.cjs +29 -0
  59. package/dist/llm/index.cjs.map +1 -0
  60. package/dist/llm/index.d.cts +235 -0
  61. package/dist/llm/index.d.ts +235 -0
  62. package/dist/llm/index.js +29 -0
  63. package/dist/llm/index.js.map +1 -0
  64. package/dist/mcp/index.cjs +9 -0
  65. package/dist/mcp/index.cjs.map +1 -0
  66. package/dist/mcp/index.d.cts +63 -0
  67. package/dist/mcp/index.d.ts +63 -0
  68. package/dist/mcp/index.js +9 -0
  69. package/dist/mcp/index.js.map +1 -0
  70. package/dist/node/agent-Bpxmkz8W.d.ts +197 -0
  71. package/dist/node/agent-kexkkI13.d.cts +197 -0
  72. package/dist/node/chunk-7W2JJCSS.js +276 -0
  73. package/dist/node/chunk-7W2JJCSS.js.map +1 -0
  74. package/dist/node/chunk-BHRFRGR7.js +144 -0
  75. package/dist/node/chunk-BHRFRGR7.js.map +1 -0
  76. package/dist/node/chunk-CLP6UNSV.js +285 -0
  77. package/dist/node/chunk-CLP6UNSV.js.map +1 -0
  78. package/dist/node/chunk-HXLRBB7S.js +1569 -0
  79. package/dist/node/chunk-HXLRBB7S.js.map +1 -0
  80. package/dist/node/chunk-IYG37UN3.cjs +144 -0
  81. package/dist/node/chunk-IYG37UN3.cjs.map +1 -0
  82. package/dist/node/chunk-JF33ZOMB.cjs +285 -0
  83. package/dist/node/chunk-JF33ZOMB.cjs.map +1 -0
  84. package/dist/node/chunk-KXXS33G3.cjs +276 -0
  85. package/dist/node/chunk-KXXS33G3.cjs.map +1 -0
  86. package/dist/node/chunk-MTFOABGC.cjs +1720 -0
  87. package/dist/node/chunk-MTFOABGC.cjs.map +1 -0
  88. package/dist/node/chunk-VJEFLRZT.js +1720 -0
  89. package/dist/node/chunk-VJEFLRZT.js.map +1 -0
  90. package/dist/node/chunk-YDHQCPSN.cjs +1569 -0
  91. package/dist/node/chunk-YDHQCPSN.cjs.map +1 -0
  92. package/dist/node/index.cjs +3293 -0
  93. package/dist/node/index.cjs.map +1 -0
  94. package/dist/node/index.d.cts +842 -0
  95. package/dist/node/index.d.ts +842 -0
  96. package/dist/node/index.js +3293 -0
  97. package/dist/node/index.js.map +1 -0
  98. package/dist/node/llm/index.cjs +29 -0
  99. package/dist/node/llm/index.cjs.map +1 -0
  100. package/dist/node/llm/index.d.cts +235 -0
  101. package/dist/node/llm/index.d.ts +235 -0
  102. package/dist/node/llm/index.js +29 -0
  103. package/dist/node/llm/index.js.map +1 -0
  104. package/dist/node/mcp/index.cjs +9 -0
  105. package/dist/node/mcp/index.cjs.map +1 -0
  106. package/dist/node/mcp/index.d.cts +63 -0
  107. package/dist/node/mcp/index.d.ts +63 -0
  108. package/dist/node/mcp/index.js +9 -0
  109. package/dist/node/mcp/index.js.map +1 -0
  110. package/dist/node/provider-Dna36xA-.d.cts +105 -0
  111. package/dist/node/provider-Dna36xA-.d.ts +105 -0
  112. package/dist/node/skills/index.cjs +31 -0
  113. package/dist/node/skills/index.cjs.map +1 -0
  114. package/dist/node/skills/index.d.cts +401 -0
  115. package/dist/node/skills/index.d.ts +401 -0
  116. package/dist/node/skills/index.js +31 -0
  117. package/dist/node/skills/index.js.map +1 -0
  118. package/dist/node/storage/index.cjs +15 -0
  119. package/dist/node/storage/index.cjs.map +1 -0
  120. package/dist/node/storage/index.d.cts +64 -0
  121. package/dist/node/storage/index.d.ts +64 -0
  122. package/dist/node/storage/index.js +15 -0
  123. package/dist/node/storage/index.js.map +1 -0
  124. package/dist/node/tools/index.cjs +15 -0
  125. package/dist/node/tools/index.cjs.map +1 -0
  126. package/dist/node/tools/index.d.cts +45 -0
  127. package/dist/node/tools/index.d.ts +45 -0
  128. package/dist/node/tools/index.js +15 -0
  129. package/dist/node/tools/index.js.map +1 -0
  130. package/dist/node/types-CG5I-byI.d.cts +30 -0
  131. package/dist/node/types-CG5I-byI.d.ts +30 -0
  132. package/dist/provider-Dna36xA-.d.cts +105 -0
  133. package/dist/provider-Dna36xA-.d.ts +105 -0
  134. package/dist/skills/index.cjs +15 -0
  135. package/dist/skills/index.cjs.map +1 -0
  136. package/dist/skills/index.d.cts +43 -0
  137. package/dist/skills/index.d.ts +43 -0
  138. package/dist/skills/index.js +15 -0
  139. package/dist/skills/index.js.map +1 -0
  140. package/dist/tools/index.cjs +15 -0
  141. package/dist/tools/index.cjs.map +1 -0
  142. package/dist/tools/index.d.cts +45 -0
  143. package/dist/tools/index.d.ts +45 -0
  144. package/dist/tools/index.js +15 -0
  145. package/dist/tools/index.js.map +1 -0
  146. package/package.json +150 -0
@@ -0,0 +1,235 @@
1
+ import { f as LLMProviderConfig, L as LLMProvider, b as LLMRequest, c as LLMResponse, d as LLMStreamChunk } from '../provider-Dna36xA-.js';
2
+ export { e as LLMManager, a as LLMMessage, g as LLMProviderFactory, h as LLMProviderRegistry, i as ToolCall, T as ToolDefinition, j as globalProviderRegistry } from '../provider-Dna36xA-.js';
3
+
4
+ /**
5
+ * OpenAI Provider Implementation
6
+ * Updated with latest GPT-5 series models (2025)
7
+ */
8
+
9
+ interface OpenAIConfig extends LLMProviderConfig {
10
+ organization?: string;
11
+ project?: string;
12
+ }
13
+ declare class OpenAIProvider implements LLMProvider {
14
+ readonly name = "openai";
15
+ readonly supportedModels: string[];
16
+ private _apiKey;
17
+ private _baseUrl;
18
+ private _defaultParams;
19
+ private _timeout;
20
+ private _organization?;
21
+ private _project?;
22
+ constructor(config: OpenAIConfig);
23
+ validateConfig(): boolean;
24
+ private makeRequest;
25
+ complete(request: LLMRequest): Promise<LLMResponse>;
26
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
27
+ private buildRequestBody;
28
+ private formatMessages;
29
+ private parseResponse;
30
+ private parseStreamChunk;
31
+ }
32
+
33
+ /**
34
+ * Anthropic Claude Provider Implementation
35
+ * Updated with Claude 4.5 series models (2025)
36
+ */
37
+
38
+ interface AnthropicConfig extends LLMProviderConfig {
39
+ anthropicVersion?: string;
40
+ }
41
+ declare class AnthropicProvider implements LLMProvider {
42
+ readonly name = "anthropic";
43
+ readonly supportedModels: string[];
44
+ private _apiKey;
45
+ private _baseUrl;
46
+ private _defaultParams;
47
+ private _timeout;
48
+ private _anthropicVersion;
49
+ constructor(config: AnthropicConfig);
50
+ validateConfig(): boolean;
51
+ private makeRequest;
52
+ complete(request: LLMRequest): Promise<LLMResponse>;
53
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
54
+ private buildRequestBody;
55
+ private parseResponse;
56
+ private parseStreamChunk;
57
+ }
58
+
59
+ /**
60
+ * Google Gemini Provider Implementation
61
+ * Updated with Gemini 2.0/3.0 series models (2025)
62
+ */
63
+
64
+ interface GeminiConfig extends LLMProviderConfig {
65
+ apiVersion?: string;
66
+ }
67
+ declare class GeminiProvider implements LLMProvider {
68
+ readonly name = "gemini";
69
+ readonly supportedModels: string[];
70
+ private _apiKey;
71
+ private _baseUrl;
72
+ private _defaultParams;
73
+ private _timeout;
74
+ private _apiVersion;
75
+ constructor(config: GeminiConfig);
76
+ validateConfig(): boolean;
77
+ private makeRequest;
78
+ complete(request: LLMRequest): Promise<LLMResponse>;
79
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
80
+ private buildRequestBody;
81
+ private parseResponse;
82
+ private parseStreamChunk;
83
+ }
84
+
85
+ /**
86
+ * Moonshot (月之暗面) Provider Implementation
87
+ * API: https://platform.moonshot.cn
88
+ */
89
+
90
+ interface MoonshotConfig extends LLMProviderConfig {
91
+ }
92
+ declare class MoonshotProvider implements LLMProvider {
93
+ readonly name = "moonshot";
94
+ readonly supportedModels: string[];
95
+ private _apiKey;
96
+ private _baseUrl;
97
+ private _defaultParams;
98
+ private _timeout;
99
+ constructor(config: MoonshotConfig);
100
+ validateConfig(): boolean;
101
+ private makeRequest;
102
+ complete(request: LLMRequest): Promise<LLMResponse>;
103
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
104
+ private buildRequestBody;
105
+ private parseResponse;
106
+ private parseStreamChunk;
107
+ }
108
+
109
+ /**
110
+ * MiniMax Provider Implementation
111
+ * API: https://platform.minimaxi.com
112
+ */
113
+
114
+ interface MiniMaxConfig extends LLMProviderConfig {
115
+ groupId?: string;
116
+ }
117
+ declare class MiniMaxProvider implements LLMProvider {
118
+ readonly name = "minimax";
119
+ readonly supportedModels: string[];
120
+ private _apiKey;
121
+ private _groupId;
122
+ private _baseUrl;
123
+ private _defaultParams;
124
+ private _timeout;
125
+ constructor(config: MiniMaxConfig);
126
+ validateConfig(): boolean;
127
+ private makeRequest;
128
+ complete(request: LLMRequest): Promise<LLMResponse>;
129
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
130
+ private buildRequestBody;
131
+ private parseResponse;
132
+ private parseStreamChunk;
133
+ }
134
+
135
+ /**
136
+ * Zhipu AI (智谱AI) Provider Implementation
137
+ * API: https://open.bigmodel.cn
138
+ */
139
+
140
+ interface ZhipuConfig extends LLMProviderConfig {
141
+ }
142
+ declare class ZhipuProvider implements LLMProvider {
143
+ readonly name = "zhipu";
144
+ readonly supportedModels: string[];
145
+ private _apiKey;
146
+ private _baseUrl;
147
+ private _defaultParams;
148
+ private _timeout;
149
+ constructor(config: ZhipuConfig);
150
+ validateConfig(): boolean;
151
+ private makeRequest;
152
+ complete(request: LLMRequest): Promise<LLMResponse>;
153
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
154
+ private buildRequestBody;
155
+ private parseResponse;
156
+ private parseStreamChunk;
157
+ }
158
+
159
+ /**
160
+ * Qwen (通义千问) Provider Implementation
161
+ * API: https://dashscope.aliyun.com
162
+ * Updated with latest Qwen3 series models (2025)
163
+ */
164
+
165
+ interface QwenConfig extends LLMProviderConfig {
166
+ }
167
+ declare class QwenProvider implements LLMProvider {
168
+ readonly name = "qwen";
169
+ readonly supportedModels: string[];
170
+ private _apiKey;
171
+ private _baseUrl;
172
+ private _defaultParams;
173
+ private _timeout;
174
+ constructor(config: QwenConfig);
175
+ validateConfig(): boolean;
176
+ private makeRequest;
177
+ complete(request: LLMRequest): Promise<LLMResponse>;
178
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
179
+ private buildRequestBody;
180
+ private parseResponse;
181
+ private parseStreamChunk;
182
+ }
183
+
184
+ /**
185
+ * DeepSeek Provider Implementation
186
+ * API: https://platform.deepseek.com
187
+ * Updated with latest DeepSeek-V3.2 models (2025)
188
+ */
189
+
190
+ interface DeepSeekConfig extends LLMProviderConfig {
191
+ }
192
+ declare class DeepSeekProvider implements LLMProvider {
193
+ readonly name = "deepseek";
194
+ readonly supportedModels: string[];
195
+ private _apiKey;
196
+ private _baseUrl;
197
+ private _defaultParams;
198
+ private _timeout;
199
+ constructor(config: DeepSeekConfig);
200
+ validateConfig(): boolean;
201
+ private makeRequest;
202
+ complete(request: LLMRequest): Promise<LLMResponse>;
203
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
204
+ private buildRequestBody;
205
+ private parseResponse;
206
+ private parseStreamChunk;
207
+ }
208
+
209
+ /**
210
+ * Doubao (豆包) Provider Implementation
211
+ * API: https://console.volcengine.com/ark
212
+ * Updated with latest Doubao 1.8 series models (2025)
213
+ */
214
+
215
+ interface DoubaoConfig extends LLMProviderConfig {
216
+ region?: string;
217
+ }
218
+ declare class DoubaoProvider implements LLMProvider {
219
+ readonly name = "doubao";
220
+ readonly supportedModels: string[];
221
+ private _apiKey;
222
+ private _baseUrl;
223
+ private _defaultParams;
224
+ private _timeout;
225
+ constructor(config: DoubaoConfig);
226
+ validateConfig(): boolean;
227
+ private makeRequest;
228
+ complete(request: LLMRequest): Promise<LLMResponse>;
229
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
230
+ private buildRequestBody;
231
+ private parseResponse;
232
+ private parseStreamChunk;
233
+ }
234
+
235
+ export { type AnthropicConfig, AnthropicProvider, type DeepSeekConfig, DeepSeekProvider, type DoubaoConfig, DoubaoProvider, type GeminiConfig, GeminiProvider, LLMProvider, LLMProviderConfig, LLMRequest, LLMResponse, LLMStreamChunk, type MiniMaxConfig, MiniMaxProvider, type MoonshotConfig, MoonshotProvider, type OpenAIConfig, OpenAIProvider, type QwenConfig, QwenProvider, type ZhipuConfig, ZhipuProvider };
@@ -0,0 +1,29 @@
1
+ import {
2
+ AnthropicProvider,
3
+ DeepSeekProvider,
4
+ DoubaoProvider,
5
+ GeminiProvider,
6
+ LLMManager,
7
+ LLMProviderRegistry,
8
+ MiniMaxProvider,
9
+ MoonshotProvider,
10
+ OpenAIProvider,
11
+ QwenProvider,
12
+ ZhipuProvider,
13
+ globalProviderRegistry
14
+ } from "../chunk-VJEFLRZT.js";
15
+ export {
16
+ AnthropicProvider,
17
+ DeepSeekProvider,
18
+ DoubaoProvider,
19
+ GeminiProvider,
20
+ LLMManager,
21
+ LLMProviderRegistry,
22
+ MiniMaxProvider,
23
+ MoonshotProvider,
24
+ OpenAIProvider,
25
+ QwenProvider,
26
+ ZhipuProvider,
27
+ globalProviderRegistry
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,63 @@
1
+ import { M as MCPResource, h as MCPTool, f as MCPResourceContent, i as MCPToolResult } from '../agent-Bpxmkz8W.js';
2
+ import '../provider-Dna36xA-.js';
3
+
4
+ /**
5
+ * MCP (Model Context Protocol) Implementation
6
+ * https://modelcontextprotocol.io
7
+ */
8
+
9
+ interface MCPServerConfig {
10
+ name: string;
11
+ version: string;
12
+ resources?: MCPResource[];
13
+ tools?: MCPTool[];
14
+ }
15
+ interface MCPClientConfig {
16
+ url: string;
17
+ auth?: {
18
+ type: 'bearer' | 'apiKey';
19
+ token: string;
20
+ };
21
+ }
22
+ declare class MCPClient {
23
+ private config;
24
+ private resources;
25
+ private tools;
26
+ constructor(config: MCPClientConfig);
27
+ connect(): Promise<void>;
28
+ private createRemoteResource;
29
+ private createRemoteTool;
30
+ getResources(): MCPResource[];
31
+ getTools(): MCPTool[];
32
+ getResource(uri: string): MCPResource | undefined;
33
+ getTool(name: string): MCPTool | undefined;
34
+ }
35
+ declare class MCPServer {
36
+ private config;
37
+ private resources;
38
+ private tools;
39
+ constructor(config: MCPServerConfig);
40
+ registerResource(resource: MCPResource): void;
41
+ registerTool(tool: MCPTool): void;
42
+ unregisterResource(uri: string): boolean;
43
+ unregisterTool(name: string): boolean;
44
+ getCapabilities(): {
45
+ name: string;
46
+ version: string;
47
+ resources: Array<{
48
+ uri: string;
49
+ name: string;
50
+ description?: string;
51
+ mimeType?: string;
52
+ }>;
53
+ tools: Array<{
54
+ name: string;
55
+ description: string;
56
+ inputSchema: unknown;
57
+ }>;
58
+ };
59
+ readResource(uri: string): Promise<MCPResourceContent | null>;
60
+ executeTool(name: string, args: unknown): Promise<MCPToolResult | null>;
61
+ }
62
+
63
+ export { MCPClient, type MCPClientConfig, MCPServer, type MCPServerConfig };
@@ -0,0 +1,9 @@
1
+ import {
2
+ MCPClient,
3
+ MCPServer
4
+ } from "../chunk-BHRFRGR7.js";
5
+ export {
6
+ MCPClient,
7
+ MCPServer
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * LLM Provider Interface
3
+ * Supports various LLM providers: OpenAI, Anthropic, Google, local models, etc.
4
+ */
5
+ interface LLMMessage {
6
+ role: 'system' | 'user' | 'assistant' | 'tool';
7
+ content: string;
8
+ name?: string;
9
+ tool_calls?: ToolCall[];
10
+ tool_call_id?: string;
11
+ }
12
+ interface ToolCall {
13
+ id: string;
14
+ type: 'function';
15
+ function: {
16
+ name: string;
17
+ arguments: string;
18
+ };
19
+ }
20
+ interface LLMRequest {
21
+ messages: LLMMessage[];
22
+ model?: string;
23
+ temperature?: number;
24
+ max_tokens?: number;
25
+ top_p?: number;
26
+ stream?: boolean;
27
+ tools?: ToolDefinition[];
28
+ tool_choice?: 'auto' | 'none' | {
29
+ type: 'function';
30
+ function: {
31
+ name: string;
32
+ };
33
+ };
34
+ }
35
+ interface ToolDefinition {
36
+ type: 'function';
37
+ function: {
38
+ name: string;
39
+ description: string;
40
+ parameters: Record<string, unknown>;
41
+ };
42
+ }
43
+ interface LLMResponse {
44
+ id: string;
45
+ model: string;
46
+ content: string;
47
+ role: 'assistant';
48
+ tool_calls?: ToolCall[];
49
+ usage?: {
50
+ prompt_tokens: number;
51
+ completion_tokens: number;
52
+ total_tokens: number;
53
+ };
54
+ finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter';
55
+ }
56
+ interface LLMStreamChunk {
57
+ id: string;
58
+ model: string;
59
+ delta: {
60
+ content?: string;
61
+ role?: 'assistant';
62
+ tool_calls?: ToolCall[];
63
+ };
64
+ finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter';
65
+ }
66
+ interface LLMProviderConfig {
67
+ apiKey?: string;
68
+ baseUrl?: string;
69
+ model?: string;
70
+ defaultParams?: Partial<LLMRequest>;
71
+ timeout?: number;
72
+ retries?: number;
73
+ }
74
+ interface LLMProvider {
75
+ readonly name: string;
76
+ readonly supportedModels: string[];
77
+ complete(request: LLMRequest): Promise<LLMResponse>;
78
+ stream(request: LLMRequest): AsyncIterableIterator<LLMStreamChunk>;
79
+ validateConfig(): boolean;
80
+ }
81
+ type LLMProviderFactory = (config: LLMProviderConfig) => LLMProvider;
82
+ declare class LLMProviderRegistry {
83
+ private providers;
84
+ private instances;
85
+ register(name: string, factory: LLMProviderFactory): void;
86
+ create(name: string, config: LLMProviderConfig): LLMProvider;
87
+ get(name: string): LLMProvider | undefined;
88
+ listProviders(): string[];
89
+ isRegistered(name: string): boolean;
90
+ }
91
+ declare const globalProviderRegistry: LLMProviderRegistry;
92
+ declare class LLMManager {
93
+ private registry;
94
+ private providers;
95
+ private defaultProvider?;
96
+ constructor(registry?: LLMProviderRegistry);
97
+ addProvider(name: string, config: LLMProviderConfig): LLMProvider;
98
+ setDefaultProvider(name: string): void;
99
+ getProvider(name?: string): LLMProvider;
100
+ complete(request: LLMRequest, providerName?: string): Promise<LLMResponse>;
101
+ stream(request: LLMRequest, providerName?: string): AsyncIterableIterator<LLMStreamChunk>;
102
+ listProviders(): string[];
103
+ }
104
+
105
+ export { type LLMProvider as L, type ToolDefinition as T, type LLMMessage as a, type LLMRequest as b, type LLMResponse as c, type LLMStreamChunk as d, LLMManager as e, type LLMProviderConfig as f, type LLMProviderFactory as g, LLMProviderRegistry as h, type ToolCall as i, globalProviderRegistry as j };