@easbot/llm 0.3.28 → 0.3.29
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/README.en.md +1 -4
- package/README.md +1 -4
- package/dist/assets/txt/model/graph-summary.txt +5 -0
- package/dist/assets/txt/model/knowledge-summary.txt +5 -0
- package/dist/assets/txt/model/memory-summary.txt +5 -0
- package/dist/chunks/chunk-4A6CXMF2.cjs +2 -0
- package/dist/chunks/chunk-QKEOAEWA.mjs +2 -0
- package/dist/chunks/{copilot-TJATIV2S.mjs → copilot-LRTA3GBD.mjs} +1 -1
- package/dist/chunks/copilot-T25BJSTK.cjs +1 -0
- package/dist/chunks/models-snapshot-4CLLJLX6.mjs +2 -0
- package/dist/chunks/models-snapshot-OF5YAGCK.cjs +2 -0
- package/dist/index.cjs +50 -32
- package/dist/index.d.cts +934 -95
- package/dist/index.d.ts +934 -95
- package/dist/index.mjs +50 -32
- package/package.json +9 -7
- package/dist/chunks/chunk-3BANRW36.mjs +0 -2
- package/dist/chunks/chunk-UIFIYRZK.cjs +0 -2
- package/dist/chunks/copilot-R22QW5MH.cjs +0 -1
- package/dist/chunks/models-snapshot-3EXCDFMS.mjs +0 -2
- package/dist/chunks/models-snapshot-L4WLMITS.cjs +0 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
2
2
|
import { JSONSchema7, LanguageModelV3 } from '@ai-sdk/provider';
|
|
3
3
|
import z, { z as z$1 } from 'zod';
|
|
4
|
-
import { LanguageModel, EmbeddingModel, RerankingModel, APICallError, ModelMessage } from 'ai';
|
|
4
|
+
import { Provider as Provider$1, LanguageModel, EmbeddingModel, RerankingModel, APICallError, ModelMessage } from 'ai';
|
|
5
5
|
import { JSONSchema } from 'zod/v4/core';
|
|
6
6
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
|
7
7
|
import { EasbotClient } from '@easbot/sdk';
|
|
8
|
+
import { AgentInput, AgentResult, AgentCallback, SubAgentConfig, SubAgentInput, SubAgentExecuteOptions, SubAgentResult } from '@easbot/types';
|
|
9
|
+
export { SubAgentConfig, SubAgentExecuteOptions, SubAgentInput, SubAgentInstance, SubAgentResult, SubAgentStatus } from '@easbot/types';
|
|
10
|
+
export { BusinessErrors } from '@easbot/utils';
|
|
8
11
|
|
|
9
12
|
declare namespace ModelsDev {
|
|
10
13
|
const Model: z.ZodObject<{
|
|
11
14
|
id: z.ZodString;
|
|
12
15
|
name: z.ZodString;
|
|
16
|
+
description: z.ZodOptional<z.ZodString>;
|
|
13
17
|
family: z.ZodOptional<z.ZodString>;
|
|
14
18
|
release_date: z.ZodString;
|
|
19
|
+
last_updated: z.ZodOptional<z.ZodString>;
|
|
15
20
|
attachment: z.ZodBoolean;
|
|
16
21
|
reasoning: z.ZodBoolean;
|
|
22
|
+
reasoning_options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<"effort">;
|
|
24
|
+
values: z.ZodArray<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"toggle">;
|
|
27
|
+
}, z.core.$strict>]>>>;
|
|
17
28
|
temperature: z.ZodBoolean;
|
|
18
29
|
tool_call: z.ZodBoolean;
|
|
30
|
+
structured_output: z.ZodOptional<z.ZodBoolean>;
|
|
19
31
|
interleaved: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
20
32
|
field: z.ZodEnum<{
|
|
21
33
|
reasoning_content: "reasoning_content";
|
|
22
34
|
reasoning_details: "reasoning_details";
|
|
23
35
|
}>;
|
|
24
36
|
}, z.core.$strict>]>>;
|
|
37
|
+
knowledge: z.ZodOptional<z.ZodString>;
|
|
25
38
|
cost: z.ZodOptional<z.ZodObject<{
|
|
26
39
|
input: z.ZodNumber;
|
|
27
40
|
output: z.ZodNumber;
|
|
@@ -33,6 +46,15 @@ declare namespace ModelsDev {
|
|
|
33
46
|
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
34
47
|
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
35
48
|
}, z.core.$strip>>;
|
|
49
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
input: z.ZodNumber;
|
|
51
|
+
output: z.ZodNumber;
|
|
52
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
tier: z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"context">;
|
|
55
|
+
size: z.ZodNumber;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>>>;
|
|
36
58
|
}, z.core.$strip>>;
|
|
37
59
|
limit: z.ZodObject<{
|
|
38
60
|
context: z.ZodNumber;
|
|
@@ -61,6 +83,7 @@ declare namespace ModelsDev {
|
|
|
61
83
|
beta: "beta";
|
|
62
84
|
deprecated: "deprecated";
|
|
63
85
|
}>>;
|
|
86
|
+
open_weights: z.ZodOptional<z.ZodBoolean>;
|
|
64
87
|
options: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
65
88
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
66
89
|
provider: z.ZodOptional<z.ZodObject<{
|
|
@@ -70,26 +93,37 @@ declare namespace ModelsDev {
|
|
|
70
93
|
}, z.core.$strip>;
|
|
71
94
|
type Model = z.infer<typeof Model>;
|
|
72
95
|
const Provider: z.ZodObject<{
|
|
73
|
-
api: z.ZodOptional<z.ZodString>;
|
|
74
|
-
name: z.ZodString;
|
|
75
|
-
env: z.ZodArray<z.ZodString>;
|
|
76
96
|
id: z.ZodString;
|
|
97
|
+
name: z.ZodString;
|
|
77
98
|
npm: z.ZodOptional<z.ZodString>;
|
|
99
|
+
env: z.ZodArray<z.ZodString>;
|
|
100
|
+
api: z.ZodOptional<z.ZodString>;
|
|
101
|
+
doc: z.ZodOptional<z.ZodString>;
|
|
78
102
|
models: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
79
103
|
id: z.ZodString;
|
|
80
104
|
name: z.ZodString;
|
|
105
|
+
description: z.ZodOptional<z.ZodString>;
|
|
81
106
|
family: z.ZodOptional<z.ZodString>;
|
|
82
107
|
release_date: z.ZodString;
|
|
108
|
+
last_updated: z.ZodOptional<z.ZodString>;
|
|
83
109
|
attachment: z.ZodBoolean;
|
|
84
110
|
reasoning: z.ZodBoolean;
|
|
111
|
+
reasoning_options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<"effort">;
|
|
113
|
+
values: z.ZodArray<z.ZodString>;
|
|
114
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<"toggle">;
|
|
116
|
+
}, z.core.$strict>]>>>;
|
|
85
117
|
temperature: z.ZodBoolean;
|
|
86
118
|
tool_call: z.ZodBoolean;
|
|
119
|
+
structured_output: z.ZodOptional<z.ZodBoolean>;
|
|
87
120
|
interleaved: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
88
121
|
field: z.ZodEnum<{
|
|
89
122
|
reasoning_content: "reasoning_content";
|
|
90
123
|
reasoning_details: "reasoning_details";
|
|
91
124
|
}>;
|
|
92
125
|
}, z.core.$strict>]>>;
|
|
126
|
+
knowledge: z.ZodOptional<z.ZodString>;
|
|
93
127
|
cost: z.ZodOptional<z.ZodObject<{
|
|
94
128
|
input: z.ZodNumber;
|
|
95
129
|
output: z.ZodNumber;
|
|
@@ -101,6 +135,15 @@ declare namespace ModelsDev {
|
|
|
101
135
|
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
102
136
|
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
103
137
|
}, z.core.$strip>>;
|
|
138
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
139
|
+
input: z.ZodNumber;
|
|
140
|
+
output: z.ZodNumber;
|
|
141
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
tier: z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"context">;
|
|
144
|
+
size: z.ZodNumber;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
}, z.core.$strip>>>;
|
|
104
147
|
}, z.core.$strip>>;
|
|
105
148
|
limit: z.ZodObject<{
|
|
106
149
|
context: z.ZodNumber;
|
|
@@ -129,6 +172,7 @@ declare namespace ModelsDev {
|
|
|
129
172
|
beta: "beta";
|
|
130
173
|
deprecated: "deprecated";
|
|
131
174
|
}>>;
|
|
175
|
+
open_weights: z.ZodOptional<z.ZodBoolean>;
|
|
132
176
|
options: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
133
177
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
134
178
|
provider: z.ZodOptional<z.ZodObject<{
|
|
@@ -140,9 +184,9 @@ declare namespace ModelsDev {
|
|
|
140
184
|
type Provider = z.infer<typeof Provider>;
|
|
141
185
|
const Data: {
|
|
142
186
|
(): Promise<Record<string, {
|
|
187
|
+
id: string;
|
|
143
188
|
name: string;
|
|
144
189
|
env: string[];
|
|
145
|
-
id: string;
|
|
146
190
|
models: Record<string, {
|
|
147
191
|
id: string;
|
|
148
192
|
name: string;
|
|
@@ -157,10 +201,20 @@ declare namespace ModelsDev {
|
|
|
157
201
|
input?: number | undefined;
|
|
158
202
|
};
|
|
159
203
|
options: Record<string, any>;
|
|
204
|
+
description?: string | undefined;
|
|
160
205
|
family?: string | undefined;
|
|
206
|
+
last_updated?: string | undefined;
|
|
207
|
+
reasoning_options?: ({
|
|
208
|
+
type: "effort";
|
|
209
|
+
values: string[];
|
|
210
|
+
} | {
|
|
211
|
+
type: "toggle";
|
|
212
|
+
})[] | undefined;
|
|
213
|
+
structured_output?: boolean | undefined;
|
|
161
214
|
interleaved?: true | {
|
|
162
215
|
field: "reasoning_content" | "reasoning_details";
|
|
163
216
|
} | undefined;
|
|
217
|
+
knowledge?: string | undefined;
|
|
164
218
|
cost?: {
|
|
165
219
|
input: number;
|
|
166
220
|
output: number;
|
|
@@ -172,6 +226,15 @@ declare namespace ModelsDev {
|
|
|
172
226
|
cache_read?: number | undefined;
|
|
173
227
|
cache_write?: number | undefined;
|
|
174
228
|
} | undefined;
|
|
229
|
+
tiers?: {
|
|
230
|
+
input: number;
|
|
231
|
+
output: number;
|
|
232
|
+
tier: {
|
|
233
|
+
type: "context";
|
|
234
|
+
size: number;
|
|
235
|
+
};
|
|
236
|
+
cache_read?: number | undefined;
|
|
237
|
+
}[] | undefined;
|
|
175
238
|
} | undefined;
|
|
176
239
|
modalities?: {
|
|
177
240
|
input: ("text" | "audio" | "image" | "video" | "pdf")[];
|
|
@@ -179,21 +242,23 @@ declare namespace ModelsDev {
|
|
|
179
242
|
} | undefined;
|
|
180
243
|
experimental?: boolean | undefined;
|
|
181
244
|
status?: "alpha" | "beta" | "deprecated" | undefined;
|
|
245
|
+
open_weights?: boolean | undefined;
|
|
182
246
|
headers?: Record<string, string> | undefined;
|
|
183
247
|
provider?: {
|
|
184
248
|
npm: string;
|
|
185
249
|
} | undefined;
|
|
186
250
|
variants?: Record<string, Record<string, any>> | undefined;
|
|
187
251
|
}>;
|
|
188
|
-
api?: string | undefined;
|
|
189
252
|
npm?: string | undefined;
|
|
253
|
+
api?: string | undefined;
|
|
254
|
+
doc?: string | undefined;
|
|
190
255
|
}>>;
|
|
191
256
|
reset(): void;
|
|
192
257
|
};
|
|
193
258
|
function get(): Promise<Record<string, {
|
|
259
|
+
id: string;
|
|
194
260
|
name: string;
|
|
195
261
|
env: string[];
|
|
196
|
-
id: string;
|
|
197
262
|
models: Record<string, {
|
|
198
263
|
id: string;
|
|
199
264
|
name: string;
|
|
@@ -208,10 +273,20 @@ declare namespace ModelsDev {
|
|
|
208
273
|
input?: number | undefined;
|
|
209
274
|
};
|
|
210
275
|
options: Record<string, any>;
|
|
276
|
+
description?: string | undefined;
|
|
211
277
|
family?: string | undefined;
|
|
278
|
+
last_updated?: string | undefined;
|
|
279
|
+
reasoning_options?: ({
|
|
280
|
+
type: "effort";
|
|
281
|
+
values: string[];
|
|
282
|
+
} | {
|
|
283
|
+
type: "toggle";
|
|
284
|
+
})[] | undefined;
|
|
285
|
+
structured_output?: boolean | undefined;
|
|
212
286
|
interleaved?: true | {
|
|
213
287
|
field: "reasoning_content" | "reasoning_details";
|
|
214
288
|
} | undefined;
|
|
289
|
+
knowledge?: string | undefined;
|
|
215
290
|
cost?: {
|
|
216
291
|
input: number;
|
|
217
292
|
output: number;
|
|
@@ -223,6 +298,15 @@ declare namespace ModelsDev {
|
|
|
223
298
|
cache_read?: number | undefined;
|
|
224
299
|
cache_write?: number | undefined;
|
|
225
300
|
} | undefined;
|
|
301
|
+
tiers?: {
|
|
302
|
+
input: number;
|
|
303
|
+
output: number;
|
|
304
|
+
tier: {
|
|
305
|
+
type: "context";
|
|
306
|
+
size: number;
|
|
307
|
+
};
|
|
308
|
+
cache_read?: number | undefined;
|
|
309
|
+
}[] | undefined;
|
|
226
310
|
} | undefined;
|
|
227
311
|
modalities?: {
|
|
228
312
|
input: ("text" | "audio" | "image" | "video" | "pdf")[];
|
|
@@ -230,31 +314,34 @@ declare namespace ModelsDev {
|
|
|
230
314
|
} | undefined;
|
|
231
315
|
experimental?: boolean | undefined;
|
|
232
316
|
status?: "alpha" | "beta" | "deprecated" | undefined;
|
|
317
|
+
open_weights?: boolean | undefined;
|
|
233
318
|
headers?: Record<string, string> | undefined;
|
|
234
319
|
provider?: {
|
|
235
320
|
npm: string;
|
|
236
321
|
} | undefined;
|
|
237
322
|
variants?: Record<string, Record<string, any>> | undefined;
|
|
238
323
|
}>;
|
|
239
|
-
api?: string | undefined;
|
|
240
324
|
npm?: string | undefined;
|
|
325
|
+
api?: string | undefined;
|
|
326
|
+
doc?: string | undefined;
|
|
241
327
|
}>>;
|
|
242
328
|
function refresh(): Promise<void>;
|
|
329
|
+
function init(): void;
|
|
243
330
|
}
|
|
244
|
-
declare function initModelsRefresh(): void;
|
|
245
331
|
|
|
246
332
|
declare namespace Provider {
|
|
247
|
-
function registerPluginAuthLoader(entry: {
|
|
333
|
+
export function registerPluginAuthLoader(entry: {
|
|
248
334
|
providerId: string;
|
|
249
335
|
authProvider: string;
|
|
250
336
|
loader: (getAuth: () => Promise<any>, authProviderData: any) => Promise<any>;
|
|
251
337
|
}): void;
|
|
252
|
-
function clearPluginAuthLoaders(): void;
|
|
253
|
-
const DEFAULT_CONTEXT_LIMIT = 200000;
|
|
254
|
-
const DEFAULT_INPUT_LIMIT_RATIO = 0.9;
|
|
255
|
-
const DEFAULT_OUTPUT_LIMIT = 8192;
|
|
256
|
-
function getDefaultInputLimit(contextLimit?: number): number;
|
|
257
|
-
|
|
338
|
+
export function clearPluginAuthLoaders(): void;
|
|
339
|
+
export const DEFAULT_CONTEXT_LIMIT = 200000;
|
|
340
|
+
export const DEFAULT_INPUT_LIMIT_RATIO = 0.9;
|
|
341
|
+
export const DEFAULT_OUTPUT_LIMIT = 8192;
|
|
342
|
+
export function getDefaultInputLimit(contextLimit?: number): number;
|
|
343
|
+
type CustomModelLoader = (sdk: any, modelId: string, options?: Record<string, any>) => Promise<any>;
|
|
344
|
+
export const Model: z.ZodObject<{
|
|
258
345
|
id: z.ZodString;
|
|
259
346
|
providerId: z.ZodString;
|
|
260
347
|
api: z.ZodObject<{
|
|
@@ -322,14 +409,27 @@ declare namespace Provider {
|
|
|
322
409
|
release_date: z.ZodString;
|
|
323
410
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
324
411
|
}, z.core.$strip>;
|
|
325
|
-
type Model = z.infer<typeof Model>;
|
|
326
|
-
|
|
412
|
+
export type Model = z.infer<typeof Model>;
|
|
413
|
+
export function formatModel(model: Pick<Model, 'providerId' | 'id'>): string;
|
|
414
|
+
export const LIMITS: {
|
|
415
|
+
readonly TEMPERATURE_MIN: 0.2;
|
|
416
|
+
readonly TEMPERATURE_MAX: 0.95;
|
|
417
|
+
readonly TEMPERATURE: {
|
|
418
|
+
readonly SUMMARY: 0.3;
|
|
419
|
+
readonly CODE: 0.2;
|
|
420
|
+
readonly EXTRACTION: 0.2;
|
|
421
|
+
readonly PLAN: 0.4;
|
|
422
|
+
readonly GENERIC: 0.6;
|
|
423
|
+
readonly CREATIVE: 0.9;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
export const Info: z.ZodObject<{
|
|
327
427
|
id: z.ZodString;
|
|
328
428
|
name: z.ZodString;
|
|
329
429
|
source: z.ZodEnum<{
|
|
330
|
-
api: "api";
|
|
331
430
|
env: "env";
|
|
332
431
|
custom: "custom";
|
|
432
|
+
api: "api";
|
|
333
433
|
config: "config";
|
|
334
434
|
}>;
|
|
335
435
|
env: z.ZodArray<z.ZodString>;
|
|
@@ -404,14 +504,95 @@ declare namespace Provider {
|
|
|
404
504
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
405
505
|
}, z.core.$strip>>;
|
|
406
506
|
}, z.core.$strip>;
|
|
407
|
-
type Info = z.infer<typeof Info>;
|
|
408
|
-
function fromModelsDevProvider(provider: ModelsDev.Provider): Info;
|
|
409
|
-
|
|
410
|
-
function
|
|
507
|
+
export type Info = z.infer<typeof Info>;
|
|
508
|
+
export function fromModelsDevProvider(provider: ModelsDev.Provider): Info;
|
|
509
|
+
type StateResult = Awaited<ReturnType<typeof createState>>;
|
|
510
|
+
function createState(): Promise<{
|
|
511
|
+
models: Map<string, string | _ai_sdk_provider.LanguageModelV3 | (string & {}) | _ai_sdk_provider.LanguageModelV2 | _ai_sdk_provider.EmbeddingModelV3 | _ai_sdk_provider.EmbeddingModelV2<string> | _ai_sdk_provider.RerankingModelV3>;
|
|
512
|
+
providers: {
|
|
513
|
+
[providerId: string]: {
|
|
514
|
+
id: string;
|
|
515
|
+
name: string;
|
|
516
|
+
source: "env" | "custom" | "api" | "config";
|
|
517
|
+
env: string[];
|
|
518
|
+
options: Record<string, any>;
|
|
519
|
+
models: Record<string, {
|
|
520
|
+
id: string;
|
|
521
|
+
providerId: string;
|
|
522
|
+
api: {
|
|
523
|
+
id: string;
|
|
524
|
+
url: string;
|
|
525
|
+
npm: string;
|
|
526
|
+
};
|
|
527
|
+
name: string;
|
|
528
|
+
capabilities: {
|
|
529
|
+
temperature: boolean;
|
|
530
|
+
reasoning: boolean;
|
|
531
|
+
attachment: boolean;
|
|
532
|
+
toolcall: boolean;
|
|
533
|
+
input: {
|
|
534
|
+
text: boolean;
|
|
535
|
+
audio: boolean;
|
|
536
|
+
image: boolean;
|
|
537
|
+
video: boolean;
|
|
538
|
+
pdf: boolean;
|
|
539
|
+
};
|
|
540
|
+
output: {
|
|
541
|
+
text: boolean;
|
|
542
|
+
audio: boolean;
|
|
543
|
+
image: boolean;
|
|
544
|
+
video: boolean;
|
|
545
|
+
pdf: boolean;
|
|
546
|
+
};
|
|
547
|
+
interleaved: boolean | {
|
|
548
|
+
field: "reasoning_content" | "reasoning_details";
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
cost: {
|
|
552
|
+
input: number;
|
|
553
|
+
output: number;
|
|
554
|
+
cache: {
|
|
555
|
+
read: number;
|
|
556
|
+
write: number;
|
|
557
|
+
};
|
|
558
|
+
experimentalOver200K?: {
|
|
559
|
+
input: number;
|
|
560
|
+
output: number;
|
|
561
|
+
cache: {
|
|
562
|
+
read: number;
|
|
563
|
+
write: number;
|
|
564
|
+
};
|
|
565
|
+
} | undefined;
|
|
566
|
+
};
|
|
567
|
+
limit: {
|
|
568
|
+
context: number;
|
|
569
|
+
output: number;
|
|
570
|
+
input?: number | undefined;
|
|
571
|
+
};
|
|
572
|
+
status: "alpha" | "beta" | "deprecated" | "active";
|
|
573
|
+
options: Record<string, any>;
|
|
574
|
+
headers: Record<string, string>;
|
|
575
|
+
release_date: string;
|
|
576
|
+
family?: string | undefined;
|
|
577
|
+
variants?: Record<string, Record<string, any>> | undefined;
|
|
578
|
+
}>;
|
|
579
|
+
key?: string | undefined;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
sdk: Map<number, Provider$1>;
|
|
583
|
+
localProxy: Map<string, string | _ai_sdk_provider.LanguageModelV3 | (string & {}) | _ai_sdk_provider.LanguageModelV2 | _ai_sdk_provider.EmbeddingModelV3 | _ai_sdk_provider.EmbeddingModelV2<string> | _ai_sdk_provider.RerankingModelV3>;
|
|
584
|
+
modelLoaders: {
|
|
585
|
+
[providerId: string]: CustomModelLoader;
|
|
586
|
+
};
|
|
587
|
+
}>;
|
|
588
|
+
export function state(): Promise<StateResult>;
|
|
589
|
+
export function resetState(): void;
|
|
590
|
+
export function init(): Promise<void>;
|
|
591
|
+
export function list(): Promise<{
|
|
411
592
|
[providerId: string]: {
|
|
412
593
|
id: string;
|
|
413
594
|
name: string;
|
|
414
|
-
source: "
|
|
595
|
+
source: "env" | "custom" | "api" | "config";
|
|
415
596
|
env: string[];
|
|
416
597
|
options: Record<string, any>;
|
|
417
598
|
models: Record<string, {
|
|
@@ -477,11 +658,11 @@ declare namespace Provider {
|
|
|
477
658
|
key?: string | undefined;
|
|
478
659
|
};
|
|
479
660
|
}>;
|
|
480
|
-
function getLocalProxy(): Promise<Map<string, string | _ai_sdk_provider.LanguageModelV3 | (string & {}) | _ai_sdk_provider.LanguageModelV2 | _ai_sdk_provider.EmbeddingModelV3 | _ai_sdk_provider.EmbeddingModelV2<string> | _ai_sdk_provider.RerankingModelV3>>;
|
|
481
|
-
function getProvider(providerId: string): Promise<{
|
|
661
|
+
export function getLocalProxy(): Promise<Map<string, string | _ai_sdk_provider.LanguageModelV3 | (string & {}) | _ai_sdk_provider.LanguageModelV2 | _ai_sdk_provider.EmbeddingModelV3 | _ai_sdk_provider.EmbeddingModelV2<string> | _ai_sdk_provider.RerankingModelV3>>;
|
|
662
|
+
export function getProvider(providerId: string): Promise<{
|
|
482
663
|
id: string;
|
|
483
664
|
name: string;
|
|
484
|
-
source: "
|
|
665
|
+
source: "env" | "custom" | "api" | "config";
|
|
485
666
|
env: string[];
|
|
486
667
|
options: Record<string, any>;
|
|
487
668
|
models: Record<string, {
|
|
@@ -546,7 +727,7 @@ declare namespace Provider {
|
|
|
546
727
|
}>;
|
|
547
728
|
key?: string | undefined;
|
|
548
729
|
} | undefined>;
|
|
549
|
-
function getModel(providerId: string, modelId: string): Promise<{
|
|
730
|
+
export function getModel(providerId: string, modelId: string): Promise<{
|
|
550
731
|
id: string;
|
|
551
732
|
providerId: string;
|
|
552
733
|
api: {
|
|
@@ -606,14 +787,14 @@ declare namespace Provider {
|
|
|
606
787
|
family?: string | undefined;
|
|
607
788
|
variants?: Record<string, Record<string, any>> | undefined;
|
|
608
789
|
}>;
|
|
609
|
-
function getLanguage(model: Model): Promise<LanguageModel>;
|
|
610
|
-
function getEmbedding(providerId: string, modelId: string): Promise<EmbeddingModel>;
|
|
611
|
-
function getRerank(providerId: string, modelId: string): Promise<RerankingModel>;
|
|
612
|
-
function closest(providerId: string, query: string[]): Promise<{
|
|
790
|
+
export function getLanguage(model: Model): Promise<LanguageModel>;
|
|
791
|
+
export function getEmbedding(providerId: string, modelId: string): Promise<EmbeddingModel>;
|
|
792
|
+
export function getRerank(providerId: string, modelId: string): Promise<RerankingModel>;
|
|
793
|
+
export function closest(providerId: string, query: string[]): Promise<{
|
|
613
794
|
providerId: string;
|
|
614
795
|
modelId: string;
|
|
615
796
|
} | undefined>;
|
|
616
|
-
function getSmallModel(providerId: string): Promise<{
|
|
797
|
+
export function getSmallModel(providerId: string): Promise<{
|
|
617
798
|
id: string;
|
|
618
799
|
providerId: string;
|
|
619
800
|
api: {
|
|
@@ -673,7 +854,7 @@ declare namespace Provider {
|
|
|
673
854
|
family?: string | undefined;
|
|
674
855
|
variants?: Record<string, Record<string, any>> | undefined;
|
|
675
856
|
} | undefined>;
|
|
676
|
-
function sort(models: Model[]): {
|
|
857
|
+
export function sort(models: Model[]): {
|
|
677
858
|
id: string;
|
|
678
859
|
providerId: string;
|
|
679
860
|
api: {
|
|
@@ -712,61 +893,372 @@ declare namespace Provider {
|
|
|
712
893
|
read: number;
|
|
713
894
|
write: number;
|
|
714
895
|
};
|
|
715
|
-
experimentalOver200K?: {
|
|
716
|
-
input: number;
|
|
717
|
-
output: number;
|
|
718
|
-
cache: {
|
|
719
|
-
read: number;
|
|
720
|
-
write: number;
|
|
896
|
+
experimentalOver200K?: {
|
|
897
|
+
input: number;
|
|
898
|
+
output: number;
|
|
899
|
+
cache: {
|
|
900
|
+
read: number;
|
|
901
|
+
write: number;
|
|
902
|
+
};
|
|
903
|
+
} | undefined;
|
|
904
|
+
};
|
|
905
|
+
limit: {
|
|
906
|
+
context: number;
|
|
907
|
+
output: number;
|
|
908
|
+
input?: number | undefined;
|
|
909
|
+
};
|
|
910
|
+
status: "alpha" | "beta" | "deprecated" | "active";
|
|
911
|
+
options: Record<string, any>;
|
|
912
|
+
headers: Record<string, string>;
|
|
913
|
+
release_date: string;
|
|
914
|
+
family?: string | undefined;
|
|
915
|
+
variants?: Record<string, Record<string, any>> | undefined;
|
|
916
|
+
}[];
|
|
917
|
+
export function defaultModel(): Promise<{
|
|
918
|
+
providerId: string;
|
|
919
|
+
modelId: string;
|
|
920
|
+
}>;
|
|
921
|
+
export function parseModel(model: string): {
|
|
922
|
+
providerId: string;
|
|
923
|
+
modelId: string;
|
|
924
|
+
};
|
|
925
|
+
export const ModelNotFoundError: {
|
|
926
|
+
new (data: {
|
|
927
|
+
providerId: string;
|
|
928
|
+
modelId: string;
|
|
929
|
+
suggestions?: string[] | undefined;
|
|
930
|
+
}, options?: ErrorOptions): {
|
|
931
|
+
readonly name: "ProviderModelNotFoundError";
|
|
932
|
+
readonly data: {
|
|
933
|
+
providerId: string;
|
|
934
|
+
modelId: string;
|
|
935
|
+
suggestions?: string[] | undefined;
|
|
936
|
+
};
|
|
937
|
+
schema(): z.ZodObject<{
|
|
938
|
+
name: z.ZodLiteral<"ProviderModelNotFoundError">;
|
|
939
|
+
data: z.ZodObject<{
|
|
940
|
+
providerId: z.ZodString;
|
|
941
|
+
modelId: z.ZodString;
|
|
942
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
943
|
+
}, z.core.$strip>;
|
|
944
|
+
}, z.core.$strip>;
|
|
945
|
+
toObject(): {
|
|
946
|
+
name: "ProviderModelNotFoundError";
|
|
947
|
+
data: {
|
|
948
|
+
providerId: string;
|
|
949
|
+
modelId: string;
|
|
950
|
+
suggestions?: string[] | undefined;
|
|
951
|
+
};
|
|
952
|
+
};
|
|
953
|
+
message: string;
|
|
954
|
+
stack?: string;
|
|
955
|
+
cause?: unknown;
|
|
956
|
+
};
|
|
957
|
+
readonly Schema: z.ZodObject<{
|
|
958
|
+
name: z.ZodLiteral<"ProviderModelNotFoundError">;
|
|
959
|
+
data: z.ZodObject<{
|
|
960
|
+
providerId: z.ZodString;
|
|
961
|
+
modelId: z.ZodString;
|
|
962
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
963
|
+
}, z.core.$strip>;
|
|
964
|
+
}, z.core.$strip>;
|
|
965
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
966
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
967
|
+
readonly Unknown: {
|
|
968
|
+
new (data: {
|
|
969
|
+
message: string;
|
|
970
|
+
}, options?: ErrorOptions): {
|
|
971
|
+
readonly name: "UnknownError";
|
|
972
|
+
readonly data: {
|
|
973
|
+
message: string;
|
|
974
|
+
};
|
|
975
|
+
schema(): z.ZodObject<{
|
|
976
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
977
|
+
data: z.ZodObject<{
|
|
978
|
+
message: z.ZodString;
|
|
979
|
+
}, z.core.$strip>;
|
|
980
|
+
}, z.core.$strip>;
|
|
981
|
+
toObject(): {
|
|
982
|
+
name: "UnknownError";
|
|
983
|
+
data: {
|
|
984
|
+
message: string;
|
|
985
|
+
};
|
|
986
|
+
};
|
|
987
|
+
message: string;
|
|
988
|
+
stack?: string;
|
|
989
|
+
cause?: unknown;
|
|
990
|
+
};
|
|
991
|
+
readonly Schema: z.ZodObject<{
|
|
992
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
993
|
+
data: z.ZodObject<{
|
|
994
|
+
message: z.ZodString;
|
|
995
|
+
}, z.core.$strip>;
|
|
996
|
+
}, z.core.$strip>;
|
|
997
|
+
isInstance(input: any): input is {
|
|
998
|
+
readonly name: "UnknownError";
|
|
999
|
+
readonly data: {
|
|
1000
|
+
message: string;
|
|
1001
|
+
};
|
|
1002
|
+
schema(): z.ZodObject<{
|
|
1003
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1004
|
+
data: z.ZodObject<{
|
|
1005
|
+
message: z.ZodString;
|
|
1006
|
+
}, z.core.$strip>;
|
|
1007
|
+
}, z.core.$strip>;
|
|
1008
|
+
toObject(): {
|
|
1009
|
+
name: "UnknownError";
|
|
1010
|
+
data: {
|
|
1011
|
+
message: string;
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
message: string;
|
|
1015
|
+
stack?: string;
|
|
1016
|
+
cause?: unknown;
|
|
1017
|
+
};
|
|
1018
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
1019
|
+
readonly Unknown: any;
|
|
1020
|
+
isError(error: unknown): error is Error;
|
|
1021
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1022
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1023
|
+
stackTraceLimit: number;
|
|
1024
|
+
};
|
|
1025
|
+
isError(error: unknown): error is Error;
|
|
1026
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1027
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1028
|
+
stackTraceLimit: number;
|
|
1029
|
+
};
|
|
1030
|
+
export const InitError: {
|
|
1031
|
+
new (data: {
|
|
1032
|
+
providerId: string;
|
|
1033
|
+
}, options?: ErrorOptions): {
|
|
1034
|
+
readonly name: "ProviderInitError";
|
|
1035
|
+
readonly data: {
|
|
1036
|
+
providerId: string;
|
|
1037
|
+
};
|
|
1038
|
+
schema(): z.ZodObject<{
|
|
1039
|
+
name: z.ZodLiteral<"ProviderInitError">;
|
|
1040
|
+
data: z.ZodObject<{
|
|
1041
|
+
providerId: z.ZodString;
|
|
1042
|
+
}, z.core.$strip>;
|
|
1043
|
+
}, z.core.$strip>;
|
|
1044
|
+
toObject(): {
|
|
1045
|
+
name: "ProviderInitError";
|
|
1046
|
+
data: {
|
|
1047
|
+
providerId: string;
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
message: string;
|
|
1051
|
+
stack?: string;
|
|
1052
|
+
cause?: unknown;
|
|
1053
|
+
};
|
|
1054
|
+
readonly Schema: z.ZodObject<{
|
|
1055
|
+
name: z.ZodLiteral<"ProviderInitError">;
|
|
1056
|
+
data: z.ZodObject<{
|
|
1057
|
+
providerId: z.ZodString;
|
|
1058
|
+
}, z.core.$strip>;
|
|
1059
|
+
}, z.core.$strip>;
|
|
1060
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
1061
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
1062
|
+
readonly Unknown: {
|
|
1063
|
+
new (data: {
|
|
1064
|
+
message: string;
|
|
1065
|
+
}, options?: ErrorOptions): {
|
|
1066
|
+
readonly name: "UnknownError";
|
|
1067
|
+
readonly data: {
|
|
1068
|
+
message: string;
|
|
1069
|
+
};
|
|
1070
|
+
schema(): z.ZodObject<{
|
|
1071
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1072
|
+
data: z.ZodObject<{
|
|
1073
|
+
message: z.ZodString;
|
|
1074
|
+
}, z.core.$strip>;
|
|
1075
|
+
}, z.core.$strip>;
|
|
1076
|
+
toObject(): {
|
|
1077
|
+
name: "UnknownError";
|
|
1078
|
+
data: {
|
|
1079
|
+
message: string;
|
|
1080
|
+
};
|
|
1081
|
+
};
|
|
1082
|
+
message: string;
|
|
1083
|
+
stack?: string;
|
|
1084
|
+
cause?: unknown;
|
|
1085
|
+
};
|
|
1086
|
+
readonly Schema: z.ZodObject<{
|
|
1087
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1088
|
+
data: z.ZodObject<{
|
|
1089
|
+
message: z.ZodString;
|
|
1090
|
+
}, z.core.$strip>;
|
|
1091
|
+
}, z.core.$strip>;
|
|
1092
|
+
isInstance(input: any): input is {
|
|
1093
|
+
readonly name: "UnknownError";
|
|
1094
|
+
readonly data: {
|
|
1095
|
+
message: string;
|
|
1096
|
+
};
|
|
1097
|
+
schema(): z.ZodObject<{
|
|
1098
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1099
|
+
data: z.ZodObject<{
|
|
1100
|
+
message: z.ZodString;
|
|
1101
|
+
}, z.core.$strip>;
|
|
1102
|
+
}, z.core.$strip>;
|
|
1103
|
+
toObject(): {
|
|
1104
|
+
name: "UnknownError";
|
|
1105
|
+
data: {
|
|
1106
|
+
message: string;
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
message: string;
|
|
1110
|
+
stack?: string;
|
|
1111
|
+
cause?: unknown;
|
|
1112
|
+
};
|
|
1113
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
1114
|
+
readonly Unknown: any;
|
|
1115
|
+
isError(error: unknown): error is Error;
|
|
1116
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1117
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1118
|
+
stackTraceLimit: number;
|
|
1119
|
+
};
|
|
1120
|
+
isError(error: unknown): error is Error;
|
|
1121
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1122
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1123
|
+
stackTraceLimit: number;
|
|
1124
|
+
};
|
|
1125
|
+
export { };
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
declare namespace ProviderError {
|
|
1129
|
+
const ModelNotFoundError: {
|
|
1130
|
+
new (data: {
|
|
1131
|
+
message: string;
|
|
1132
|
+
providerId: string;
|
|
1133
|
+
modelId: string;
|
|
1134
|
+
suggestions?: string[] | undefined;
|
|
1135
|
+
}, options?: ErrorOptions): {
|
|
1136
|
+
readonly name: "ProviderModelNotFoundError";
|
|
1137
|
+
readonly data: {
|
|
1138
|
+
message: string;
|
|
1139
|
+
providerId: string;
|
|
1140
|
+
modelId: string;
|
|
1141
|
+
suggestions?: string[] | undefined;
|
|
1142
|
+
};
|
|
1143
|
+
schema(): z.ZodObject<{
|
|
1144
|
+
name: z.ZodLiteral<"ProviderModelNotFoundError">;
|
|
1145
|
+
data: z.ZodObject<{
|
|
1146
|
+
message: z.ZodString;
|
|
1147
|
+
providerId: z.ZodString;
|
|
1148
|
+
modelId: z.ZodString;
|
|
1149
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1150
|
+
}, z.core.$strip>;
|
|
1151
|
+
}, z.core.$strip>;
|
|
1152
|
+
toObject(): {
|
|
1153
|
+
name: "ProviderModelNotFoundError";
|
|
1154
|
+
data: {
|
|
1155
|
+
message: string;
|
|
1156
|
+
providerId: string;
|
|
1157
|
+
modelId: string;
|
|
1158
|
+
suggestions?: string[] | undefined;
|
|
1159
|
+
};
|
|
1160
|
+
};
|
|
1161
|
+
message: string;
|
|
1162
|
+
stack?: string;
|
|
1163
|
+
cause?: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
readonly Schema: z.ZodObject<{
|
|
1166
|
+
name: z.ZodLiteral<"ProviderModelNotFoundError">;
|
|
1167
|
+
data: z.ZodObject<{
|
|
1168
|
+
message: z.ZodString;
|
|
1169
|
+
providerId: z.ZodString;
|
|
1170
|
+
modelId: z.ZodString;
|
|
1171
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1172
|
+
}, z.core.$strip>;
|
|
1173
|
+
}, z.core.$strip>;
|
|
1174
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
1175
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
1176
|
+
readonly Unknown: {
|
|
1177
|
+
new (data: {
|
|
1178
|
+
message: string;
|
|
1179
|
+
}, options?: ErrorOptions): {
|
|
1180
|
+
readonly name: "UnknownError";
|
|
1181
|
+
readonly data: {
|
|
1182
|
+
message: string;
|
|
1183
|
+
};
|
|
1184
|
+
schema(): z.ZodObject<{
|
|
1185
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1186
|
+
data: z.ZodObject<{
|
|
1187
|
+
message: z.ZodString;
|
|
1188
|
+
}, z.core.$strip>;
|
|
1189
|
+
}, z.core.$strip>;
|
|
1190
|
+
toObject(): {
|
|
1191
|
+
name: "UnknownError";
|
|
1192
|
+
data: {
|
|
1193
|
+
message: string;
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
message: string;
|
|
1197
|
+
stack?: string;
|
|
1198
|
+
cause?: unknown;
|
|
1199
|
+
};
|
|
1200
|
+
readonly Schema: z.ZodObject<{
|
|
1201
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1202
|
+
data: z.ZodObject<{
|
|
1203
|
+
message: z.ZodString;
|
|
1204
|
+
}, z.core.$strip>;
|
|
1205
|
+
}, z.core.$strip>;
|
|
1206
|
+
isInstance(input: any): input is {
|
|
1207
|
+
readonly name: "UnknownError";
|
|
1208
|
+
readonly data: {
|
|
1209
|
+
message: string;
|
|
721
1210
|
};
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
1211
|
+
schema(): z.ZodObject<{
|
|
1212
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
1213
|
+
data: z.ZodObject<{
|
|
1214
|
+
message: z.ZodString;
|
|
1215
|
+
}, z.core.$strip>;
|
|
1216
|
+
}, z.core.$strip>;
|
|
1217
|
+
toObject(): {
|
|
1218
|
+
name: "UnknownError";
|
|
1219
|
+
data: {
|
|
1220
|
+
message: string;
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
message: string;
|
|
1224
|
+
stack?: string;
|
|
1225
|
+
cause?: unknown;
|
|
1226
|
+
};
|
|
1227
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
1228
|
+
readonly Unknown: any;
|
|
1229
|
+
isError(error: unknown): error is Error;
|
|
1230
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1231
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1232
|
+
stackTraceLimit: number;
|
|
728
1233
|
};
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
family?: string | undefined;
|
|
734
|
-
variants?: Record<string, Record<string, any>> | undefined;
|
|
735
|
-
}[];
|
|
736
|
-
function defaultModel(): Promise<{
|
|
737
|
-
providerId: string;
|
|
738
|
-
modelId: string;
|
|
739
|
-
}>;
|
|
740
|
-
function parseModel(model: string): {
|
|
741
|
-
providerId: string;
|
|
742
|
-
modelId: string;
|
|
1234
|
+
isError(error: unknown): error is Error;
|
|
1235
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
1236
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
1237
|
+
stackTraceLimit: number;
|
|
743
1238
|
};
|
|
744
|
-
|
|
1239
|
+
type ModelNotFoundError = z.infer<typeof ModelNotFoundError.Schema>;
|
|
1240
|
+
const InitError: {
|
|
745
1241
|
new (data: {
|
|
1242
|
+
message: string;
|
|
746
1243
|
providerId: string;
|
|
747
|
-
modelId: string;
|
|
748
|
-
suggestions?: string[] | undefined;
|
|
749
1244
|
}, options?: ErrorOptions): {
|
|
750
|
-
readonly name: "
|
|
1245
|
+
readonly name: "ProviderInitError";
|
|
751
1246
|
readonly data: {
|
|
1247
|
+
message: string;
|
|
752
1248
|
providerId: string;
|
|
753
|
-
modelId: string;
|
|
754
|
-
suggestions?: string[] | undefined;
|
|
755
1249
|
};
|
|
756
1250
|
schema(): z.ZodObject<{
|
|
757
|
-
name: z.ZodLiteral<"
|
|
1251
|
+
name: z.ZodLiteral<"ProviderInitError">;
|
|
758
1252
|
data: z.ZodObject<{
|
|
1253
|
+
message: z.ZodString;
|
|
759
1254
|
providerId: z.ZodString;
|
|
760
|
-
modelId: z.ZodString;
|
|
761
|
-
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
762
1255
|
}, z.core.$strip>;
|
|
763
1256
|
}, z.core.$strip>;
|
|
764
1257
|
toObject(): {
|
|
765
|
-
name: "
|
|
1258
|
+
name: "ProviderInitError";
|
|
766
1259
|
data: {
|
|
1260
|
+
message: string;
|
|
767
1261
|
providerId: string;
|
|
768
|
-
modelId: string;
|
|
769
|
-
suggestions?: string[] | undefined;
|
|
770
1262
|
};
|
|
771
1263
|
};
|
|
772
1264
|
message: string;
|
|
@@ -774,11 +1266,10 @@ declare namespace Provider {
|
|
|
774
1266
|
cause?: unknown;
|
|
775
1267
|
};
|
|
776
1268
|
readonly Schema: z.ZodObject<{
|
|
777
|
-
name: z.ZodLiteral<"
|
|
1269
|
+
name: z.ZodLiteral<"ProviderInitError">;
|
|
778
1270
|
data: z.ZodObject<{
|
|
1271
|
+
message: z.ZodString;
|
|
779
1272
|
providerId: z.ZodString;
|
|
780
|
-
modelId: z.ZodString;
|
|
781
|
-
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
782
1273
|
}, z.core.$strip>;
|
|
783
1274
|
}, z.core.$strip>;
|
|
784
1275
|
isInstance(input: any): input is InstanceType<any>;
|
|
@@ -846,24 +1337,49 @@ declare namespace Provider {
|
|
|
846
1337
|
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
847
1338
|
stackTraceLimit: number;
|
|
848
1339
|
};
|
|
849
|
-
|
|
1340
|
+
type InitError = z.infer<typeof InitError.Schema>;
|
|
1341
|
+
const APIError: {
|
|
850
1342
|
new (data: {
|
|
1343
|
+
message: string;
|
|
851
1344
|
providerId: string;
|
|
1345
|
+
isRetryable: boolean;
|
|
1346
|
+
statusCode?: number | undefined;
|
|
1347
|
+
responseBody?: string | undefined;
|
|
1348
|
+
responseHeaders?: Record<string, string> | undefined;
|
|
1349
|
+
metadata?: Record<string, string> | undefined;
|
|
852
1350
|
}, options?: ErrorOptions): {
|
|
853
|
-
readonly name: "
|
|
1351
|
+
readonly name: "ProviderAPIError";
|
|
854
1352
|
readonly data: {
|
|
1353
|
+
message: string;
|
|
855
1354
|
providerId: string;
|
|
1355
|
+
isRetryable: boolean;
|
|
1356
|
+
statusCode?: number | undefined;
|
|
1357
|
+
responseBody?: string | undefined;
|
|
1358
|
+
responseHeaders?: Record<string, string> | undefined;
|
|
1359
|
+
metadata?: Record<string, string> | undefined;
|
|
856
1360
|
};
|
|
857
1361
|
schema(): z.ZodObject<{
|
|
858
|
-
name: z.ZodLiteral<"
|
|
1362
|
+
name: z.ZodLiteral<"ProviderAPIError">;
|
|
859
1363
|
data: z.ZodObject<{
|
|
1364
|
+
message: z.ZodString;
|
|
860
1365
|
providerId: z.ZodString;
|
|
1366
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
1367
|
+
isRetryable: z.ZodBoolean;
|
|
1368
|
+
responseBody: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
responseHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1370
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
861
1371
|
}, z.core.$strip>;
|
|
862
1372
|
}, z.core.$strip>;
|
|
863
1373
|
toObject(): {
|
|
864
|
-
name: "
|
|
1374
|
+
name: "ProviderAPIError";
|
|
865
1375
|
data: {
|
|
1376
|
+
message: string;
|
|
866
1377
|
providerId: string;
|
|
1378
|
+
isRetryable: boolean;
|
|
1379
|
+
statusCode?: number | undefined;
|
|
1380
|
+
responseBody?: string | undefined;
|
|
1381
|
+
responseHeaders?: Record<string, string> | undefined;
|
|
1382
|
+
metadata?: Record<string, string> | undefined;
|
|
867
1383
|
};
|
|
868
1384
|
};
|
|
869
1385
|
message: string;
|
|
@@ -871,9 +1387,15 @@ declare namespace Provider {
|
|
|
871
1387
|
cause?: unknown;
|
|
872
1388
|
};
|
|
873
1389
|
readonly Schema: z.ZodObject<{
|
|
874
|
-
name: z.ZodLiteral<"
|
|
1390
|
+
name: z.ZodLiteral<"ProviderAPIError">;
|
|
875
1391
|
data: z.ZodObject<{
|
|
1392
|
+
message: z.ZodString;
|
|
876
1393
|
providerId: z.ZodString;
|
|
1394
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
1395
|
+
isRetryable: z.ZodBoolean;
|
|
1396
|
+
responseBody: z.ZodOptional<z.ZodString>;
|
|
1397
|
+
responseHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1398
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
877
1399
|
}, z.core.$strip>;
|
|
878
1400
|
}, z.core.$strip>;
|
|
879
1401
|
isInstance(input: any): input is InstanceType<any>;
|
|
@@ -941,9 +1463,7 @@ declare namespace Provider {
|
|
|
941
1463
|
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
942
1464
|
stackTraceLimit: number;
|
|
943
1465
|
};
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
declare namespace ProviderError {
|
|
1466
|
+
type APIError = z.infer<typeof APIError.Schema>;
|
|
947
1467
|
type ParsedStreamError = {
|
|
948
1468
|
type: 'context_overflow';
|
|
949
1469
|
message: string;
|
|
@@ -972,6 +1492,7 @@ declare namespace ProviderError {
|
|
|
972
1492
|
providerId: string;
|
|
973
1493
|
error: APICallError;
|
|
974
1494
|
}): ParsedAPICallError;
|
|
1495
|
+
function throwAsBusinessError(providerId: string, error: APICallError): never;
|
|
975
1496
|
}
|
|
976
1497
|
|
|
977
1498
|
declare namespace ProviderAuth {
|
|
@@ -1334,7 +1855,7 @@ declare namespace ProviderTransform {
|
|
|
1334
1855
|
function message(msgs: ModelMessage[], model: Provider.Model, options: Record<string, unknown>): ModelMessage[];
|
|
1335
1856
|
function temperature(model: Provider.Model): 1 | 0.6 | 0.55 | undefined;
|
|
1336
1857
|
function topP(model: Provider.Model): 1 | 0.95 | undefined;
|
|
1337
|
-
function topK(model: Provider.Model):
|
|
1858
|
+
function topK(model: Provider.Model): 64 | 20 | 40 | undefined;
|
|
1338
1859
|
function variants(model: Provider.Model): Record<string, Record<string, any>>;
|
|
1339
1860
|
function options(input: {
|
|
1340
1861
|
model: Provider.Model;
|
|
@@ -1511,7 +2032,7 @@ declare namespace SummaryProvider {
|
|
|
1511
2032
|
}>;
|
|
1512
2033
|
}>;
|
|
1513
2034
|
model?: Provider.Model | LanguageModel;
|
|
1514
|
-
|
|
2035
|
+
maxOutputTokens?: number;
|
|
1515
2036
|
abortSignal?: AbortSignal;
|
|
1516
2037
|
};
|
|
1517
2038
|
type MemorySummaryInput = {
|
|
@@ -1540,7 +2061,7 @@ declare namespace SummaryProvider {
|
|
|
1540
2061
|
}>;
|
|
1541
2062
|
}>;
|
|
1542
2063
|
model?: Provider.Model | LanguageModel;
|
|
1543
|
-
|
|
2064
|
+
maxOutputTokens?: number;
|
|
1544
2065
|
abortSignal?: AbortSignal;
|
|
1545
2066
|
};
|
|
1546
2067
|
function summarizeNote(input: NoteSummaryInput, abortSignal?: AbortSignal): Promise<string>;
|
|
@@ -1691,7 +2212,7 @@ interface AgentMessage {
|
|
|
1691
2212
|
name: string;
|
|
1692
2213
|
callId?: string;
|
|
1693
2214
|
title?: string;
|
|
1694
|
-
status: 'completed' | '
|
|
2215
|
+
status: 'completed' | 'failed';
|
|
1695
2216
|
output?: unknown;
|
|
1696
2217
|
error?: string;
|
|
1697
2218
|
input?: Record<string, unknown>;
|
|
@@ -1748,7 +2269,7 @@ interface PartData {
|
|
|
1748
2269
|
tool?: string;
|
|
1749
2270
|
callId?: string;
|
|
1750
2271
|
state?: {
|
|
1751
|
-
status?: 'pending' | '
|
|
2272
|
+
status?: 'pending' | 'in_progress' | 'completed' | 'failed';
|
|
1752
2273
|
input?: Record<string, unknown>;
|
|
1753
2274
|
output?: unknown;
|
|
1754
2275
|
error?: string;
|
|
@@ -1785,6 +2306,281 @@ declare class SdkMessageCollector {
|
|
|
1785
2306
|
reset(): void;
|
|
1786
2307
|
}
|
|
1787
2308
|
|
|
2309
|
+
interface LocalAgentConfig {
|
|
2310
|
+
filterConfig?: Partial<AgentClientFilterConfig>;
|
|
2311
|
+
directory?: string;
|
|
2312
|
+
}
|
|
2313
|
+
declare const LocalAgentError: {
|
|
2314
|
+
new (data: {
|
|
2315
|
+
message: string;
|
|
2316
|
+
code: string;
|
|
2317
|
+
}, options?: ErrorOptions): {
|
|
2318
|
+
readonly name: "LocalAgentError";
|
|
2319
|
+
readonly data: {
|
|
2320
|
+
message: string;
|
|
2321
|
+
code: string;
|
|
2322
|
+
};
|
|
2323
|
+
schema(): z.ZodObject<{
|
|
2324
|
+
name: z.ZodLiteral<"LocalAgentError">;
|
|
2325
|
+
data: z.ZodObject<{
|
|
2326
|
+
message: z.ZodString;
|
|
2327
|
+
code: z.ZodString;
|
|
2328
|
+
}, z.core.$strip>;
|
|
2329
|
+
}, z.core.$strip>;
|
|
2330
|
+
toObject(): {
|
|
2331
|
+
name: "LocalAgentError";
|
|
2332
|
+
data: {
|
|
2333
|
+
message: string;
|
|
2334
|
+
code: string;
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
2337
|
+
message: string;
|
|
2338
|
+
stack?: string;
|
|
2339
|
+
cause?: unknown;
|
|
2340
|
+
};
|
|
2341
|
+
readonly Schema: z.ZodObject<{
|
|
2342
|
+
name: z.ZodLiteral<"LocalAgentError">;
|
|
2343
|
+
data: z.ZodObject<{
|
|
2344
|
+
message: z.ZodString;
|
|
2345
|
+
code: z.ZodString;
|
|
2346
|
+
}, z.core.$strip>;
|
|
2347
|
+
}, z.core.$strip>;
|
|
2348
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
2349
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
2350
|
+
readonly Unknown: {
|
|
2351
|
+
new (data: {
|
|
2352
|
+
message: string;
|
|
2353
|
+
}, options?: ErrorOptions): {
|
|
2354
|
+
readonly name: "UnknownError";
|
|
2355
|
+
readonly data: {
|
|
2356
|
+
message: string;
|
|
2357
|
+
};
|
|
2358
|
+
schema(): z.ZodObject<{
|
|
2359
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2360
|
+
data: z.ZodObject<{
|
|
2361
|
+
message: z.ZodString;
|
|
2362
|
+
}, z.core.$strip>;
|
|
2363
|
+
}, z.core.$strip>;
|
|
2364
|
+
toObject(): {
|
|
2365
|
+
name: "UnknownError";
|
|
2366
|
+
data: {
|
|
2367
|
+
message: string;
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
message: string;
|
|
2371
|
+
stack?: string;
|
|
2372
|
+
cause?: unknown;
|
|
2373
|
+
};
|
|
2374
|
+
readonly Schema: z.ZodObject<{
|
|
2375
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2376
|
+
data: z.ZodObject<{
|
|
2377
|
+
message: z.ZodString;
|
|
2378
|
+
}, z.core.$strip>;
|
|
2379
|
+
}, z.core.$strip>;
|
|
2380
|
+
isInstance(input: any): input is {
|
|
2381
|
+
readonly name: "UnknownError";
|
|
2382
|
+
readonly data: {
|
|
2383
|
+
message: string;
|
|
2384
|
+
};
|
|
2385
|
+
schema(): z.ZodObject<{
|
|
2386
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2387
|
+
data: z.ZodObject<{
|
|
2388
|
+
message: z.ZodString;
|
|
2389
|
+
}, z.core.$strip>;
|
|
2390
|
+
}, z.core.$strip>;
|
|
2391
|
+
toObject(): {
|
|
2392
|
+
name: "UnknownError";
|
|
2393
|
+
data: {
|
|
2394
|
+
message: string;
|
|
2395
|
+
};
|
|
2396
|
+
};
|
|
2397
|
+
message: string;
|
|
2398
|
+
stack?: string;
|
|
2399
|
+
cause?: unknown;
|
|
2400
|
+
};
|
|
2401
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
2402
|
+
readonly Unknown: any;
|
|
2403
|
+
isError(error: unknown): error is Error;
|
|
2404
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2405
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2406
|
+
stackTraceLimit: number;
|
|
2407
|
+
};
|
|
2408
|
+
isError(error: unknown): error is Error;
|
|
2409
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2410
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2411
|
+
stackTraceLimit: number;
|
|
2412
|
+
};
|
|
2413
|
+
declare class LocalAgent {
|
|
2414
|
+
private static _default;
|
|
2415
|
+
private log;
|
|
2416
|
+
private sdk;
|
|
2417
|
+
private filterConfig;
|
|
2418
|
+
private eventBus;
|
|
2419
|
+
private eventBridge;
|
|
2420
|
+
private bridgeStarted;
|
|
2421
|
+
constructor(sdk?: EasbotClient, config?: LocalAgentConfig);
|
|
2422
|
+
start(): Promise<void>;
|
|
2423
|
+
shutdown(): Promise<void>;
|
|
2424
|
+
private ensureBridge;
|
|
2425
|
+
private convertParts;
|
|
2426
|
+
run(input: AgentInput, options?: {
|
|
2427
|
+
onMessage?: (message: AgentMessage) => Promise<void> | void;
|
|
2428
|
+
}): Promise<AgentResult>;
|
|
2429
|
+
runAsync(input: AgentInput, callback: AgentCallback, options?: {
|
|
2430
|
+
onMessage?: (message: AgentMessage) => Promise<void> | void;
|
|
2431
|
+
}): Promise<void>;
|
|
2432
|
+
private assembleResult;
|
|
2433
|
+
private formatOutput;
|
|
2434
|
+
static getDefault(): LocalAgent;
|
|
2435
|
+
static setDefault(sdk: EasbotClient, config?: LocalAgentConfig): LocalAgent;
|
|
2436
|
+
static run(input: AgentInput, options?: {
|
|
2437
|
+
onMessage?: (message: AgentMessage) => Promise<void> | void;
|
|
2438
|
+
}): Promise<AgentResult>;
|
|
2439
|
+
static runAsync(input: AgentInput, callback: AgentCallback, options?: {
|
|
2440
|
+
onMessage?: (message: AgentMessage) => Promise<void> | void;
|
|
2441
|
+
}): Promise<void>;
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
type RunMode = 'ephemeral' | 'persistent';
|
|
2445
|
+
interface SubAgentRegistryConfig {
|
|
2446
|
+
enabled: boolean;
|
|
2447
|
+
defaultRunMode: RunMode;
|
|
2448
|
+
timeout: number;
|
|
2449
|
+
maxConcurrent: number;
|
|
2450
|
+
idleTimeout?: number;
|
|
2451
|
+
idleCheckInterval?: number;
|
|
2452
|
+
agents: SubAgentConfig[];
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
declare const SubAgentError: {
|
|
2456
|
+
new (data: {
|
|
2457
|
+
message: string;
|
|
2458
|
+
code: string;
|
|
2459
|
+
agent?: string | undefined;
|
|
2460
|
+
transport?: string | undefined;
|
|
2461
|
+
}, options?: ErrorOptions): {
|
|
2462
|
+
readonly name: "SubAgentError";
|
|
2463
|
+
readonly data: {
|
|
2464
|
+
message: string;
|
|
2465
|
+
code: string;
|
|
2466
|
+
agent?: string | undefined;
|
|
2467
|
+
transport?: string | undefined;
|
|
2468
|
+
};
|
|
2469
|
+
schema(): z.ZodObject<{
|
|
2470
|
+
name: z.ZodLiteral<"SubAgentError">;
|
|
2471
|
+
data: z.ZodObject<{
|
|
2472
|
+
message: z.ZodString;
|
|
2473
|
+
code: z.ZodString;
|
|
2474
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
2475
|
+
transport: z.ZodOptional<z.ZodString>;
|
|
2476
|
+
}, z.core.$strip>;
|
|
2477
|
+
}, z.core.$strip>;
|
|
2478
|
+
toObject(): {
|
|
2479
|
+
name: "SubAgentError";
|
|
2480
|
+
data: {
|
|
2481
|
+
message: string;
|
|
2482
|
+
code: string;
|
|
2483
|
+
agent?: string | undefined;
|
|
2484
|
+
transport?: string | undefined;
|
|
2485
|
+
};
|
|
2486
|
+
};
|
|
2487
|
+
message: string;
|
|
2488
|
+
stack?: string;
|
|
2489
|
+
cause?: unknown;
|
|
2490
|
+
};
|
|
2491
|
+
readonly Schema: z.ZodObject<{
|
|
2492
|
+
name: z.ZodLiteral<"SubAgentError">;
|
|
2493
|
+
data: z.ZodObject<{
|
|
2494
|
+
message: z.ZodString;
|
|
2495
|
+
code: z.ZodString;
|
|
2496
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
2497
|
+
transport: z.ZodOptional<z.ZodString>;
|
|
2498
|
+
}, z.core.$strip>;
|
|
2499
|
+
}, z.core.$strip>;
|
|
2500
|
+
isInstance(input: any): input is InstanceType<any>;
|
|
2501
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
2502
|
+
readonly Unknown: {
|
|
2503
|
+
new (data: {
|
|
2504
|
+
message: string;
|
|
2505
|
+
}, options?: ErrorOptions): {
|
|
2506
|
+
readonly name: "UnknownError";
|
|
2507
|
+
readonly data: {
|
|
2508
|
+
message: string;
|
|
2509
|
+
};
|
|
2510
|
+
schema(): z.ZodObject<{
|
|
2511
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2512
|
+
data: z.ZodObject<{
|
|
2513
|
+
message: z.ZodString;
|
|
2514
|
+
}, z.core.$strip>;
|
|
2515
|
+
}, z.core.$strip>;
|
|
2516
|
+
toObject(): {
|
|
2517
|
+
name: "UnknownError";
|
|
2518
|
+
data: {
|
|
2519
|
+
message: string;
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
message: string;
|
|
2523
|
+
stack?: string;
|
|
2524
|
+
cause?: unknown;
|
|
2525
|
+
};
|
|
2526
|
+
readonly Schema: z.ZodObject<{
|
|
2527
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2528
|
+
data: z.ZodObject<{
|
|
2529
|
+
message: z.ZodString;
|
|
2530
|
+
}, z.core.$strip>;
|
|
2531
|
+
}, z.core.$strip>;
|
|
2532
|
+
isInstance(input: any): input is {
|
|
2533
|
+
readonly name: "UnknownError";
|
|
2534
|
+
readonly data: {
|
|
2535
|
+
message: string;
|
|
2536
|
+
};
|
|
2537
|
+
schema(): z.ZodObject<{
|
|
2538
|
+
name: z.ZodLiteral<"UnknownError">;
|
|
2539
|
+
data: z.ZodObject<{
|
|
2540
|
+
message: z.ZodString;
|
|
2541
|
+
}, z.core.$strip>;
|
|
2542
|
+
}, z.core.$strip>;
|
|
2543
|
+
toObject(): {
|
|
2544
|
+
name: "UnknownError";
|
|
2545
|
+
data: {
|
|
2546
|
+
message: string;
|
|
2547
|
+
};
|
|
2548
|
+
};
|
|
2549
|
+
message: string;
|
|
2550
|
+
stack?: string;
|
|
2551
|
+
cause?: unknown;
|
|
2552
|
+
};
|
|
2553
|
+
create<Name extends string, Data extends z.core.$ZodType>(name: Name, data: Data): any;
|
|
2554
|
+
readonly Unknown: any;
|
|
2555
|
+
isError(error: unknown): error is Error;
|
|
2556
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2557
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2558
|
+
stackTraceLimit: number;
|
|
2559
|
+
};
|
|
2560
|
+
isError(error: unknown): error is Error;
|
|
2561
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2562
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2563
|
+
stackTraceLimit: number;
|
|
2564
|
+
};
|
|
2565
|
+
type SubAgentRunInput = AgentInput | SubAgentInput;
|
|
2566
|
+
declare class SubAgent {
|
|
2567
|
+
private static _default;
|
|
2568
|
+
private log;
|
|
2569
|
+
private registry;
|
|
2570
|
+
private registryConfig;
|
|
2571
|
+
private initError;
|
|
2572
|
+
constructor(registryConfig: SubAgentRegistryConfig | null);
|
|
2573
|
+
private ensureRegistry;
|
|
2574
|
+
private resolveAgentConfig;
|
|
2575
|
+
run(input: SubAgentRunInput, options?: SubAgentExecuteOptions): Promise<SubAgentResult>;
|
|
2576
|
+
shutdown(): Promise<void>;
|
|
2577
|
+
isEnabled(): boolean;
|
|
2578
|
+
static getDefault(): SubAgent | null;
|
|
2579
|
+
static setDefault(config: SubAgentRegistryConfig | null): SubAgent;
|
|
2580
|
+
static run(input: SubAgentRunInput): Promise<SubAgentResult>;
|
|
2581
|
+
static clearDefault(): void;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
1788
2584
|
interface IConfigProvider {
|
|
1789
2585
|
getInfo(): Promise<{
|
|
1790
2586
|
provider?: Record<string, Record<string, unknown>>;
|
|
@@ -1834,6 +2630,7 @@ declare namespace Flag {
|
|
|
1834
2630
|
const EASBOT_OUTPUT_TOKEN_MAX: number;
|
|
1835
2631
|
const EASBOT_ENABLE_EXPERIMENTAL_MODELS: boolean;
|
|
1836
2632
|
const EASBOT_DEFAULT_MODEL: string | undefined;
|
|
2633
|
+
const EASBOT_ENABLE_WORKTREE: boolean;
|
|
1837
2634
|
}
|
|
1838
2635
|
declare function setAdapterRegistry(registry: AdapterRegistry | undefined): void;
|
|
1839
2636
|
declare function getAdapterRegistry(): AdapterRegistry | undefined;
|
|
@@ -1852,28 +2649,39 @@ declare const ProviderAuthMethod: z.ZodObject<{
|
|
|
1852
2649
|
}, z.core.$strip>;
|
|
1853
2650
|
type ProviderAuthMethod = z.infer<typeof ProviderAuthMethod>;
|
|
1854
2651
|
declare const ProviderConfig: z.ZodObject<{
|
|
1855
|
-
api: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1856
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1857
|
-
env: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1858
2652
|
id: z.ZodOptional<z.ZodString>;
|
|
2653
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1859
2654
|
npm: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2655
|
+
env: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2656
|
+
api: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2657
|
+
doc: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1860
2658
|
whitelist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1861
2659
|
blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1862
2660
|
models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1863
2661
|
id: z.ZodOptional<z.ZodString>;
|
|
1864
2662
|
name: z.ZodOptional<z.ZodString>;
|
|
2663
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1865
2664
|
family: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1866
2665
|
release_date: z.ZodOptional<z.ZodString>;
|
|
2666
|
+
last_updated: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1867
2667
|
attachment: z.ZodOptional<z.ZodBoolean>;
|
|
1868
2668
|
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
2669
|
+
reasoning_options: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2670
|
+
type: z.ZodLiteral<"effort">;
|
|
2671
|
+
values: z.ZodArray<z.ZodString>;
|
|
2672
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2673
|
+
type: z.ZodLiteral<"toggle">;
|
|
2674
|
+
}, z.core.$strict>]>>>>;
|
|
1869
2675
|
temperature: z.ZodOptional<z.ZodBoolean>;
|
|
1870
2676
|
tool_call: z.ZodOptional<z.ZodBoolean>;
|
|
2677
|
+
structured_output: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1871
2678
|
interleaved: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
1872
2679
|
field: z.ZodEnum<{
|
|
1873
2680
|
reasoning_content: "reasoning_content";
|
|
1874
2681
|
reasoning_details: "reasoning_details";
|
|
1875
2682
|
}>;
|
|
1876
2683
|
}, z.core.$strict>]>>>;
|
|
2684
|
+
knowledge: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1877
2685
|
cost: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1878
2686
|
input: z.ZodNumber;
|
|
1879
2687
|
output: z.ZodNumber;
|
|
@@ -1885,6 +2693,15 @@ declare const ProviderConfig: z.ZodObject<{
|
|
|
1885
2693
|
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
1886
2694
|
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
1887
2695
|
}, z.core.$strip>>;
|
|
2696
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2697
|
+
input: z.ZodNumber;
|
|
2698
|
+
output: z.ZodNumber;
|
|
2699
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
2700
|
+
tier: z.ZodObject<{
|
|
2701
|
+
type: z.ZodLiteral<"context">;
|
|
2702
|
+
size: z.ZodNumber;
|
|
2703
|
+
}, z.core.$strip>;
|
|
2704
|
+
}, z.core.$strip>>>;
|
|
1888
2705
|
}, z.core.$strip>>>;
|
|
1889
2706
|
limit: z.ZodOptional<z.ZodObject<{
|
|
1890
2707
|
context: z.ZodNumber;
|
|
@@ -1913,6 +2730,7 @@ declare const ProviderConfig: z.ZodObject<{
|
|
|
1913
2730
|
beta: "beta";
|
|
1914
2731
|
deprecated: "deprecated";
|
|
1915
2732
|
}>>>;
|
|
2733
|
+
open_weights: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1916
2734
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1917
2735
|
headers: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1918
2736
|
provider: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -1933,28 +2751,39 @@ declare const ProviderConfig: z.ZodObject<{
|
|
|
1933
2751
|
type ProviderConfig = z.infer<typeof ProviderConfig>;
|
|
1934
2752
|
declare const LLMConfig: z.ZodObject<{
|
|
1935
2753
|
provider: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1936
|
-
api: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1937
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1938
|
-
env: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1939
2754
|
id: z.ZodOptional<z.ZodString>;
|
|
2755
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1940
2756
|
npm: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2757
|
+
env: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2758
|
+
api: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
2759
|
+
doc: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1941
2760
|
whitelist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1942
2761
|
blacklist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1943
2762
|
models: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1944
2763
|
id: z.ZodOptional<z.ZodString>;
|
|
1945
2764
|
name: z.ZodOptional<z.ZodString>;
|
|
2765
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1946
2766
|
family: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1947
2767
|
release_date: z.ZodOptional<z.ZodString>;
|
|
2768
|
+
last_updated: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1948
2769
|
attachment: z.ZodOptional<z.ZodBoolean>;
|
|
1949
2770
|
reasoning: z.ZodOptional<z.ZodBoolean>;
|
|
2771
|
+
reasoning_options: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2772
|
+
type: z.ZodLiteral<"effort">;
|
|
2773
|
+
values: z.ZodArray<z.ZodString>;
|
|
2774
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2775
|
+
type: z.ZodLiteral<"toggle">;
|
|
2776
|
+
}, z.core.$strict>]>>>>;
|
|
1950
2777
|
temperature: z.ZodOptional<z.ZodBoolean>;
|
|
1951
2778
|
tool_call: z.ZodOptional<z.ZodBoolean>;
|
|
2779
|
+
structured_output: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1952
2780
|
interleaved: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
|
|
1953
2781
|
field: z.ZodEnum<{
|
|
1954
2782
|
reasoning_content: "reasoning_content";
|
|
1955
2783
|
reasoning_details: "reasoning_details";
|
|
1956
2784
|
}>;
|
|
1957
2785
|
}, z.core.$strict>]>>>;
|
|
2786
|
+
knowledge: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1958
2787
|
cost: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
1959
2788
|
input: z.ZodNumber;
|
|
1960
2789
|
output: z.ZodNumber;
|
|
@@ -1966,6 +2795,15 @@ declare const LLMConfig: z.ZodObject<{
|
|
|
1966
2795
|
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
1967
2796
|
cache_write: z.ZodOptional<z.ZodNumber>;
|
|
1968
2797
|
}, z.core.$strip>>;
|
|
2798
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2799
|
+
input: z.ZodNumber;
|
|
2800
|
+
output: z.ZodNumber;
|
|
2801
|
+
cache_read: z.ZodOptional<z.ZodNumber>;
|
|
2802
|
+
tier: z.ZodObject<{
|
|
2803
|
+
type: z.ZodLiteral<"context">;
|
|
2804
|
+
size: z.ZodNumber;
|
|
2805
|
+
}, z.core.$strip>;
|
|
2806
|
+
}, z.core.$strip>>>;
|
|
1969
2807
|
}, z.core.$strip>>>;
|
|
1970
2808
|
limit: z.ZodOptional<z.ZodObject<{
|
|
1971
2809
|
context: z.ZodNumber;
|
|
@@ -1994,6 +2832,7 @@ declare const LLMConfig: z.ZodObject<{
|
|
|
1994
2832
|
beta: "beta";
|
|
1995
2833
|
deprecated: "deprecated";
|
|
1996
2834
|
}>>>;
|
|
2835
|
+
open_weights: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
1997
2836
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1998
2837
|
headers: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1999
2838
|
provider: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
@@ -2115,4 +2954,4 @@ declare function bootstrapLlmStandalone(options: {
|
|
|
2115
2954
|
};
|
|
2116
2955
|
}): void;
|
|
2117
2956
|
|
|
2118
|
-
export { type AdapterRegistry, type AgentClientFilterConfig, type AgentMessage, type BootstrapLlmOptions, type BootstrapLlmResult, type BootstrapModels, type BuildPromptOptions, CUSTOM_PROVIDER_DEFINITIONS, Config, DEBUG_AGENT_FILTER, DEFAULT_AGENT_FILTER, DEFAULT_ENABLED_PROVIDERS, EmbeddingProvider, type ExtractedEntity, type ExtractedRelation, type ExtractionResult, Flag, type GraphEntityTypeDef, GraphProvider, type GraphRelationTypeDef, type IConfigProvider, type IGlobalPathProvider, type IInstallationProvider, type IInstanceProvider, type ILLM, type ILLMCapabilities, type ILLMInitConfig, type ILLMModels, LLMConfig, LLMConfig as LLMConfigType, type MetaEntry, ModelsDev, type OpenaiCompatibleProvider, type OpenaiCompatibleProviderSettings, PROVIDER_DISPLAY_NAMES, type PartData, ProbeEmbeddingError, type ProbeEmbeddingOptions, Provider, ProviderAuth, ProviderAuthMethod, ProviderAuthMethod as ProviderAuthMethodType, ProviderConfig, ProviderConfig as ProviderConfigType, ProviderError, ProviderTransform, RerankProvider, SdkEventBridge, SdkEventBus, SdkEventType, SdkMessageCollector, type SdkSessionStatusProps, type SessionEvent, SummaryProvider, bootstrapLlm, bootstrapLlmStandalone, buildEntityExtractionPrompt, createOpenaiCompatible, extractEntitiesByRules, getAdapterRegistry, getIConfigProvider, getIGlobalPathProvider, getIInstallationProvider, getIInstanceProvider, hasAdapterRegistry, inferEntityType,
|
|
2957
|
+
export { type AdapterRegistry, type AgentClientFilterConfig, type AgentMessage, type BootstrapLlmOptions, type BootstrapLlmResult, type BootstrapModels, type BuildPromptOptions, CUSTOM_PROVIDER_DEFINITIONS, Config, DEBUG_AGENT_FILTER, DEFAULT_AGENT_FILTER, DEFAULT_ENABLED_PROVIDERS, EmbeddingProvider, type ExtractedEntity, type ExtractedRelation, type ExtractionResult, Flag, type GraphEntityTypeDef, GraphProvider, type GraphRelationTypeDef, type IConfigProvider, type IGlobalPathProvider, type IInstallationProvider, type IInstanceProvider, type ILLM, type ILLMCapabilities, type ILLMInitConfig, type ILLMModels, LLMConfig, LLMConfig as LLMConfigType, LocalAgent, type LocalAgentConfig, LocalAgentError, type MetaEntry, ModelsDev, type OpenaiCompatibleProvider, type OpenaiCompatibleProviderSettings, PROVIDER_DISPLAY_NAMES, type PartData, ProbeEmbeddingError, type ProbeEmbeddingOptions, Provider, ProviderAuth, ProviderAuthMethod, ProviderAuthMethod as ProviderAuthMethodType, ProviderConfig, ProviderConfig as ProviderConfigType, ProviderError, ProviderTransform, RerankProvider, SdkEventBridge, SdkEventBus, SdkEventType, SdkMessageCollector, type SdkSessionStatusProps, type SessionEvent, SubAgent, SubAgentError, type SubAgentRegistryConfig, type SubAgentRunInput, SummaryProvider, bootstrapLlm, bootstrapLlmStandalone, buildEntityExtractionPrompt, createOpenaiCompatible, extractEntitiesByRules, getAdapterRegistry, getIConfigProvider, getIGlobalPathProvider, getIInstallationProvider, getIInstanceProvider, hasAdapterRegistry, inferEntityType, normalizeExtractionResult, openaiCompatible, parseEntityExtractionResult, probeEmbeddingDims, readEnvString, readFlagBool, readFlagNumber, sanitizeEntityToken, setAdapterRegistry, syncMeta };
|