@opencode/ai 2.0.32 → 2.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/ai-client.d.ts +2 -2
- package/dist/experimental/evaluation-client.d.ts +1 -1
- package/dist/experimental/evaluation.d.ts +20 -20
- package/dist/experimental/realtime.d.ts +6 -14
- package/dist/experimental/realtime.js +28 -3
- package/dist/experimental/system-one.d.ts +1 -1
- package/dist/image-client.d.ts +8 -8
- package/dist/image.d.ts +593 -437
- package/dist/llm.d.ts +51 -51
- package/dist/media-client.d.ts +1 -1
- package/dist/media.d.ts +4 -4
- package/dist/promise.d.ts +199 -198
- package/dist/protocols/alibaba-chat.d.ts +81 -82
- package/dist/protocols/alibaba-chat.js +0 -1
- package/dist/protocols/alibaba-messages.d.ts +99 -99
- package/dist/protocols/alibaba-responses.d.ts +120 -120
- package/dist/protocols/anthropic-messages.d.ts +187 -187
- package/dist/protocols/anthropic-messages.js +3 -2
- package/dist/protocols/assemblyai-transcription.d.ts +1 -1
- package/dist/protocols/bedrock-converse.d.ts +75 -79
- package/dist/protocols/bfl-images.d.ts +1 -1
- package/dist/protocols/cartesia-speech.d.ts +17 -17
- package/dist/protocols/cohere-chat.d.ts +26 -23
- package/dist/protocols/cohere-chat.js +22 -1
- package/dist/protocols/deepgram-speech.d.ts +17 -17
- package/dist/protocols/deepgram-transcription.d.ts +1 -1
- package/dist/protocols/elevenlabs-speech.d.ts +17 -17
- package/dist/protocols/elevenlabs-transcription.d.ts +1 -1
- package/dist/protocols/fal-images.d.ts +1 -1
- package/dist/protocols/fal-video.d.ts +1 -1
- package/dist/protocols/gemini.d.ts +55 -55
- package/dist/protocols/google-images.d.ts +1 -1
- package/dist/protocols/google-interactions.d.ts +64 -62
- package/dist/protocols/google-interactions.js +19 -1
- package/dist/protocols/google-speech.d.ts +17 -17
- package/dist/protocols/google-transcription.d.ts +47 -47
- package/dist/protocols/google-video.d.ts +1 -1
- package/dist/protocols/meta-messages.d.ts +121 -121
- package/dist/protocols/meta-responses.d.ts +201 -201
- package/dist/protocols/mistral-chat.d.ts +45 -45
- package/dist/protocols/open-responses-channel.d.ts +1 -1
- package/dist/protocols/open-responses.d.ts +584 -450
- package/dist/protocols/open-responses.js +27 -35
- package/dist/protocols/openai-chat.d.ts +248 -248
- package/dist/protocols/openai-chat.js +11 -42
- package/dist/protocols/openai-compatible-chat.d.ts +32 -32
- package/dist/protocols/openai-compatible-responses.d.ts +88 -88
- package/dist/protocols/openai-images.d.ts +17 -17
- package/dist/protocols/openai-responses.d.ts +567 -567
- package/dist/protocols/openai-responses.js +1 -1
- package/dist/protocols/openai-speech.d.ts +17 -17
- package/dist/protocols/openai-transcription.d.ts +47 -47
- package/dist/protocols/replicate-images.d.ts +1 -1
- package/dist/protocols/runway-video.d.ts +1 -1
- package/dist/protocols/shared.d.ts +12 -1
- package/dist/protocols/shared.js +17 -1
- package/dist/protocols/stability-images.d.ts +2 -2
- package/dist/protocols/utils/bedrock-cache.d.ts +2 -2
- package/dist/protocols/utils/bedrock-media.d.ts +4 -4
- package/dist/protocols/utils/openai-options.d.ts +1 -1
- package/dist/protocols/utils/speech-stream.d.ts +1 -1
- package/dist/protocols/utils/tool-schema.d.ts +10 -5
- package/dist/protocols/utils/tool-stream.d.ts +152 -152
- package/dist/protocols/venice-chat.d.ts +109 -110
- package/dist/protocols/venice-chat.js +0 -1
- package/dist/protocols/xai-images.d.ts +1 -1
- package/dist/protocols/xai-responses.d.ts +79 -79
- package/dist/protocols/xai-video.d.ts +1 -1
- package/dist/protocols/zai-chat.d.ts +77 -78
- package/dist/protocols/zai-chat.js +0 -1
- package/dist/protocols/zai-images.d.ts +1 -1
- package/dist/protocols/zai-messages.d.ts +97 -97
- package/dist/providers/alibaba.d.ts +222 -283
- package/dist/providers/amazon-bedrock-mantle.d.ts +291 -298
- package/dist/providers/amazon-bedrock.d.ts +22 -28
- package/dist/providers/anthropic-compatible.d.ts +86 -90
- package/dist/providers/anthropic.d.ts +86 -90
- package/dist/providers/assemblyai.d.ts +2 -6
- package/dist/providers/azure.d.ts +228 -238
- package/dist/providers/baseten.d.ts +66 -70
- package/dist/providers/black-forest-labs.d.ts +2 -6
- package/dist/providers/cartesia.d.ts +2 -6
- package/dist/providers/cerebras.d.ts +66 -70
- package/dist/providers/cerebras.js +0 -1
- package/dist/providers/cloudflare-ai-gateway.d.ts +352 -356
- package/dist/providers/cloudflare-workers-ai.d.ts +66 -70
- package/dist/providers/cohere.d.ts +122 -132
- package/dist/providers/cohere.js +0 -2
- package/dist/providers/deepgram.d.ts +2 -7
- package/dist/providers/deepinfra.d.ts +66 -70
- package/dist/providers/deepinfra.js +0 -1
- package/dist/providers/deepseek.d.ts +66 -70
- package/dist/providers/deepseek.js +1 -1
- package/dist/providers/digitalocean.d.ts +137 -141
- package/dist/providers/elevenlabs.d.ts +2 -7
- package/dist/providers/fal.d.ts +2 -7
- package/dist/providers/fireworks.d.ts +66 -70
- package/dist/providers/google-vertex-chat.d.ts +34 -38
- package/dist/providers/google-vertex-interactions.d.ts +31 -41
- package/dist/providers/google-vertex-messages.d.ts +81 -85
- package/dist/providers/google-vertex-mistral.d.ts +23 -27
- package/dist/providers/google-vertex-responses.d.ts +90 -94
- package/dist/providers/google-vertex.d.ts +26 -30
- package/dist/providers/google.d.ts +94 -109
- package/dist/providers/groq.d.ts +111 -115
- package/dist/providers/groq.js +0 -1
- package/dist/providers/meta.d.ts +309 -317
- package/dist/providers/meta.js +1 -1
- package/dist/providers/minimax.d.ts +296 -303
- package/dist/providers/minimax.js +1 -1
- package/dist/providers/mistral.d.ts +22 -26
- package/dist/providers/moonshot.d.ts +296 -303
- package/dist/providers/moonshot.js +0 -1
- package/dist/providers/openai-compatible-responses.d.ts +90 -94
- package/dist/providers/openai-compatible.d.ts +34 -38
- package/dist/providers/openai.d.ts +93 -108
- package/dist/providers/opencode.d.ts +2 -8
- package/dist/providers/openrouter.d.ts +137 -144
- package/dist/providers/replicate.d.ts +2 -6
- package/dist/providers/runway.d.ts +2 -6
- package/dist/providers/stability.d.ts +2 -7
- package/dist/providers/togetherai.d.ts +66 -70
- package/dist/providers/togetherai.js +1 -1
- package/dist/providers/typesafe-ai.d.ts +2 -8
- package/dist/providers/venice.d.ts +58 -63
- package/dist/providers/vercel-ai-gateway.d.ts +2 -12
- package/dist/providers/xai.d.ts +38 -50
- package/dist/providers/zai-coding-plan.d.ts +206 -213
- package/dist/providers/zai.d.ts +40 -46
- package/dist/route/client.d.ts +51 -51
- package/dist/route/media-protocol.d.ts +1 -1
- package/dist/route/transport/http.d.ts +1 -1
- package/dist/route/transport/websocket.d.ts +8 -8
- package/dist/schema/errors.d.ts +19 -19
- package/dist/schema/events.d.ts +3090 -3288
- package/dist/schema/messages.d.ts +8 -7
- package/dist/schema/options.d.ts +2 -1
- package/dist/schema/options.js +2 -1
- package/dist/speech-client.d.ts +8 -8
- package/dist/speech.d.ts +434 -398
- package/dist/testing.d.ts +338 -338
- package/dist/tool-runtime.d.ts +1 -1
- package/dist/transcription-client.d.ts +23 -23
- package/dist/transcription.d.ts +562 -646
- package/dist/utils/sanitize.d.ts +4 -0
- package/dist/utils/sanitize.js +23 -6
- package/dist/video-client.d.ts +8 -8
- package/dist/video.d.ts +416 -372
- package/package.json +6 -6
package/dist/testing.d.ts
CHANGED
|
@@ -46,32 +46,20 @@ export declare const complete: (options: {
|
|
|
46
46
|
readonly reason: FinishReasonDetails;
|
|
47
47
|
readonly usage?: UsageInput;
|
|
48
48
|
readonly providerMetadata?: ProviderMetadata;
|
|
49
|
-
}, ...events: readonly LLMEvent[]) => (
|
|
50
|
-
readonly type: "compaction";
|
|
51
|
-
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
52
|
-
readonly id?: string | undefined;
|
|
53
|
-
readonly text?: string | null | undefined;
|
|
54
|
-
readonly encrypted?: string | undefined;
|
|
55
|
-
} & ({
|
|
56
|
-
readonly encrypted: string;
|
|
57
|
-
readonly text?: never;
|
|
58
|
-
} | {
|
|
59
|
-
readonly text: string | null;
|
|
60
|
-
readonly encrypted?: never;
|
|
61
|
-
})) | {
|
|
49
|
+
}, ...events: readonly LLMEvent[]) => ({
|
|
62
50
|
readonly type: "step-start";
|
|
63
51
|
readonly index: number;
|
|
64
52
|
} | {
|
|
65
|
-
readonly id: string;
|
|
66
53
|
readonly type: "text-start";
|
|
54
|
+
readonly id: string;
|
|
67
55
|
readonly providerMetadata?: {
|
|
68
56
|
readonly [x: string]: {
|
|
69
57
|
readonly [x: string]: unknown;
|
|
70
58
|
};
|
|
71
59
|
} | undefined;
|
|
72
60
|
} | {
|
|
73
|
-
readonly id: string;
|
|
74
61
|
readonly type: "text-delta";
|
|
62
|
+
readonly id: string;
|
|
75
63
|
readonly text: string;
|
|
76
64
|
readonly providerMetadata?: {
|
|
77
65
|
readonly [x: string]: {
|
|
@@ -79,8 +67,8 @@ export declare const complete: (options: {
|
|
|
79
67
|
};
|
|
80
68
|
} | undefined;
|
|
81
69
|
} | {
|
|
82
|
-
readonly id: string;
|
|
83
70
|
readonly type: "text-end";
|
|
71
|
+
readonly id: string;
|
|
84
72
|
readonly text?: string | undefined;
|
|
85
73
|
readonly providerMetadata?: {
|
|
86
74
|
readonly [x: string]: {
|
|
@@ -88,16 +76,16 @@ export declare const complete: (options: {
|
|
|
88
76
|
};
|
|
89
77
|
} | undefined;
|
|
90
78
|
} | {
|
|
91
|
-
readonly id: string;
|
|
92
79
|
readonly type: "reasoning-start";
|
|
80
|
+
readonly id: string;
|
|
93
81
|
readonly providerMetadata?: {
|
|
94
82
|
readonly [x: string]: {
|
|
95
83
|
readonly [x: string]: unknown;
|
|
96
84
|
};
|
|
97
85
|
} | undefined;
|
|
98
86
|
} | {
|
|
99
|
-
readonly id: string;
|
|
100
87
|
readonly type: "reasoning-delta";
|
|
88
|
+
readonly id: string;
|
|
101
89
|
readonly text: string;
|
|
102
90
|
readonly providerMetadata?: {
|
|
103
91
|
readonly [x: string]: {
|
|
@@ -105,8 +93,8 @@ export declare const complete: (options: {
|
|
|
105
93
|
};
|
|
106
94
|
} | undefined;
|
|
107
95
|
} | {
|
|
108
|
-
readonly id: string;
|
|
109
96
|
readonly type: "reasoning-end";
|
|
97
|
+
readonly id: string;
|
|
110
98
|
readonly text?: string | undefined;
|
|
111
99
|
readonly providerMetadata?: {
|
|
112
100
|
readonly [x: string]: {
|
|
@@ -114,55 +102,56 @@ export declare const complete: (options: {
|
|
|
114
102
|
};
|
|
115
103
|
} | undefined;
|
|
116
104
|
} | {
|
|
117
|
-
readonly id: string;
|
|
118
105
|
readonly type: "tool-input-start";
|
|
106
|
+
readonly id: string;
|
|
119
107
|
readonly name: string;
|
|
108
|
+
readonly namespace?: string | undefined;
|
|
109
|
+
readonly providerExecuted?: boolean | undefined;
|
|
120
110
|
readonly providerMetadata?: {
|
|
121
111
|
readonly [x: string]: {
|
|
122
112
|
readonly [x: string]: unknown;
|
|
123
113
|
};
|
|
124
114
|
} | undefined;
|
|
125
|
-
readonly namespace?: string | undefined;
|
|
126
|
-
readonly providerExecuted?: boolean | undefined;
|
|
127
115
|
} | {
|
|
128
|
-
readonly id: string;
|
|
129
116
|
readonly type: "tool-input-delta";
|
|
117
|
+
readonly id: string;
|
|
130
118
|
readonly name: string;
|
|
119
|
+
readonly namespace?: string | undefined;
|
|
131
120
|
readonly text: string;
|
|
132
121
|
readonly input?: unknown;
|
|
133
|
-
readonly namespace?: string | undefined;
|
|
134
122
|
} | {
|
|
135
|
-
readonly id: string;
|
|
136
123
|
readonly type: "tool-input-end";
|
|
124
|
+
readonly id: string;
|
|
137
125
|
readonly name: string;
|
|
126
|
+
readonly namespace?: string | undefined;
|
|
138
127
|
readonly providerMetadata?: {
|
|
139
128
|
readonly [x: string]: {
|
|
140
129
|
readonly [x: string]: unknown;
|
|
141
130
|
};
|
|
142
131
|
} | undefined;
|
|
143
|
-
readonly namespace?: string | undefined;
|
|
144
132
|
} | {
|
|
145
|
-
readonly id: string;
|
|
146
133
|
readonly type: "tool-input-error";
|
|
134
|
+
readonly id: string;
|
|
147
135
|
readonly name: string;
|
|
148
|
-
readonly raw: string;
|
|
149
136
|
readonly namespace?: string | undefined;
|
|
137
|
+
readonly raw: string;
|
|
150
138
|
} | {
|
|
151
|
-
readonly id: string;
|
|
152
139
|
readonly type: "tool-call";
|
|
140
|
+
readonly id: string;
|
|
153
141
|
readonly name: string;
|
|
142
|
+
readonly namespace?: string | undefined;
|
|
154
143
|
readonly input: unknown;
|
|
144
|
+
readonly providerExecuted?: boolean | undefined;
|
|
155
145
|
readonly providerMetadata?: {
|
|
156
146
|
readonly [x: string]: {
|
|
157
147
|
readonly [x: string]: unknown;
|
|
158
148
|
};
|
|
159
149
|
} | undefined;
|
|
160
|
-
readonly namespace?: string | undefined;
|
|
161
|
-
readonly providerExecuted?: boolean | undefined;
|
|
162
150
|
} | {
|
|
163
|
-
readonly id: string;
|
|
164
151
|
readonly type: "tool-result";
|
|
152
|
+
readonly id: string;
|
|
165
153
|
readonly name: string;
|
|
154
|
+
readonly namespace?: string | undefined;
|
|
166
155
|
readonly result: {
|
|
167
156
|
readonly type: "json";
|
|
168
157
|
readonly value: unknown;
|
|
@@ -196,28 +185,19 @@ export declare const complete: (options: {
|
|
|
196
185
|
readonly name?: string | undefined;
|
|
197
186
|
})[];
|
|
198
187
|
} | undefined;
|
|
188
|
+
readonly providerExecuted?: boolean | undefined;
|
|
199
189
|
readonly providerMetadata?: {
|
|
200
190
|
readonly [x: string]: {
|
|
201
191
|
readonly [x: string]: unknown;
|
|
202
192
|
};
|
|
203
193
|
} | undefined;
|
|
204
|
-
readonly namespace?: string | undefined;
|
|
205
|
-
readonly providerExecuted?: boolean | undefined;
|
|
206
194
|
} | {
|
|
207
|
-
readonly id: string;
|
|
208
195
|
readonly type: "tool-error";
|
|
209
|
-
readonly
|
|
196
|
+
readonly id: string;
|
|
210
197
|
readonly name: string;
|
|
211
|
-
readonly error?: unknown;
|
|
212
|
-
readonly providerMetadata?: {
|
|
213
|
-
readonly [x: string]: {
|
|
214
|
-
readonly [x: string]: unknown;
|
|
215
|
-
};
|
|
216
|
-
} | undefined;
|
|
217
198
|
readonly namespace?: string | undefined;
|
|
218
|
-
|
|
219
|
-
readonly
|
|
220
|
-
readonly media: import("./media.js").Asset;
|
|
199
|
+
readonly message: string;
|
|
200
|
+
readonly error?: unknown;
|
|
221
201
|
readonly providerMetadata?: {
|
|
222
202
|
readonly [x: string]: {
|
|
223
203
|
readonly [x: string]: unknown;
|
|
@@ -225,33 +205,41 @@ export declare const complete: (options: {
|
|
|
225
205
|
} | undefined;
|
|
226
206
|
} | {
|
|
227
207
|
readonly type: "step-finish";
|
|
208
|
+
readonly index: number;
|
|
228
209
|
readonly reason: {
|
|
229
|
-
readonly normalized: "
|
|
210
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
230
211
|
readonly raw?: string | undefined;
|
|
231
212
|
readonly category?: string | undefined;
|
|
232
213
|
readonly explanation?: string | undefined;
|
|
233
214
|
};
|
|
234
|
-
readonly
|
|
215
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
235
216
|
readonly providerMetadata?: {
|
|
236
217
|
readonly [x: string]: {
|
|
237
218
|
readonly [x: string]: unknown;
|
|
238
219
|
};
|
|
239
220
|
} | undefined;
|
|
240
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
241
221
|
} | {
|
|
242
222
|
readonly type: "finish";
|
|
243
223
|
readonly reason: {
|
|
244
|
-
readonly normalized: "
|
|
224
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
245
225
|
readonly raw?: string | undefined;
|
|
246
226
|
readonly category?: string | undefined;
|
|
247
227
|
readonly explanation?: string | undefined;
|
|
248
228
|
};
|
|
229
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
230
|
+
readonly providerMetadata?: {
|
|
231
|
+
readonly [x: string]: {
|
|
232
|
+
readonly [x: string]: unknown;
|
|
233
|
+
};
|
|
234
|
+
} | undefined;
|
|
235
|
+
} | {
|
|
236
|
+
readonly type: "media";
|
|
237
|
+
readonly media: import("./media.js").Asset;
|
|
249
238
|
readonly providerMetadata?: {
|
|
250
239
|
readonly [x: string]: {
|
|
251
240
|
readonly [x: string]: unknown;
|
|
252
241
|
};
|
|
253
242
|
} | undefined;
|
|
254
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
255
243
|
} | {
|
|
256
244
|
readonly type: "provider-error";
|
|
257
245
|
readonly message: string;
|
|
@@ -261,33 +249,33 @@ export declare const complete: (options: {
|
|
|
261
249
|
readonly [x: string]: unknown;
|
|
262
250
|
};
|
|
263
251
|
} | undefined;
|
|
264
|
-
}
|
|
265
|
-
export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
252
|
+
} | ({
|
|
266
253
|
readonly type: "compaction";
|
|
267
254
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
268
255
|
readonly id?: string | undefined;
|
|
269
|
-
readonly text?: string | null | undefined;
|
|
270
256
|
readonly encrypted?: string | undefined;
|
|
257
|
+
readonly text?: string | null | undefined;
|
|
271
258
|
} & ({
|
|
272
259
|
readonly encrypted: string;
|
|
273
260
|
readonly text?: never;
|
|
274
261
|
} | {
|
|
275
262
|
readonly text: string | null;
|
|
276
263
|
readonly encrypted?: never;
|
|
277
|
-
}))
|
|
264
|
+
})))[];
|
|
265
|
+
export declare const stop: (...events: readonly LLMEvent[]) => ({
|
|
278
266
|
readonly type: "step-start";
|
|
279
267
|
readonly index: number;
|
|
280
268
|
} | {
|
|
281
|
-
readonly id: string;
|
|
282
269
|
readonly type: "text-start";
|
|
270
|
+
readonly id: string;
|
|
283
271
|
readonly providerMetadata?: {
|
|
284
272
|
readonly [x: string]: {
|
|
285
273
|
readonly [x: string]: unknown;
|
|
286
274
|
};
|
|
287
275
|
} | undefined;
|
|
288
276
|
} | {
|
|
289
|
-
readonly id: string;
|
|
290
277
|
readonly type: "text-delta";
|
|
278
|
+
readonly id: string;
|
|
291
279
|
readonly text: string;
|
|
292
280
|
readonly providerMetadata?: {
|
|
293
281
|
readonly [x: string]: {
|
|
@@ -295,8 +283,8 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
295
283
|
};
|
|
296
284
|
} | undefined;
|
|
297
285
|
} | {
|
|
298
|
-
readonly id: string;
|
|
299
286
|
readonly type: "text-end";
|
|
287
|
+
readonly id: string;
|
|
300
288
|
readonly text?: string | undefined;
|
|
301
289
|
readonly providerMetadata?: {
|
|
302
290
|
readonly [x: string]: {
|
|
@@ -304,16 +292,16 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
304
292
|
};
|
|
305
293
|
} | undefined;
|
|
306
294
|
} | {
|
|
307
|
-
readonly id: string;
|
|
308
295
|
readonly type: "reasoning-start";
|
|
296
|
+
readonly id: string;
|
|
309
297
|
readonly providerMetadata?: {
|
|
310
298
|
readonly [x: string]: {
|
|
311
299
|
readonly [x: string]: unknown;
|
|
312
300
|
};
|
|
313
301
|
} | undefined;
|
|
314
302
|
} | {
|
|
315
|
-
readonly id: string;
|
|
316
303
|
readonly type: "reasoning-delta";
|
|
304
|
+
readonly id: string;
|
|
317
305
|
readonly text: string;
|
|
318
306
|
readonly providerMetadata?: {
|
|
319
307
|
readonly [x: string]: {
|
|
@@ -321,8 +309,8 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
321
309
|
};
|
|
322
310
|
} | undefined;
|
|
323
311
|
} | {
|
|
324
|
-
readonly id: string;
|
|
325
312
|
readonly type: "reasoning-end";
|
|
313
|
+
readonly id: string;
|
|
326
314
|
readonly text?: string | undefined;
|
|
327
315
|
readonly providerMetadata?: {
|
|
328
316
|
readonly [x: string]: {
|
|
@@ -330,55 +318,56 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
330
318
|
};
|
|
331
319
|
} | undefined;
|
|
332
320
|
} | {
|
|
333
|
-
readonly id: string;
|
|
334
321
|
readonly type: "tool-input-start";
|
|
322
|
+
readonly id: string;
|
|
335
323
|
readonly name: string;
|
|
324
|
+
readonly namespace?: string | undefined;
|
|
325
|
+
readonly providerExecuted?: boolean | undefined;
|
|
336
326
|
readonly providerMetadata?: {
|
|
337
327
|
readonly [x: string]: {
|
|
338
328
|
readonly [x: string]: unknown;
|
|
339
329
|
};
|
|
340
330
|
} | undefined;
|
|
341
|
-
readonly namespace?: string | undefined;
|
|
342
|
-
readonly providerExecuted?: boolean | undefined;
|
|
343
331
|
} | {
|
|
344
|
-
readonly id: string;
|
|
345
332
|
readonly type: "tool-input-delta";
|
|
333
|
+
readonly id: string;
|
|
346
334
|
readonly name: string;
|
|
335
|
+
readonly namespace?: string | undefined;
|
|
347
336
|
readonly text: string;
|
|
348
337
|
readonly input?: unknown;
|
|
349
|
-
readonly namespace?: string | undefined;
|
|
350
338
|
} | {
|
|
351
|
-
readonly id: string;
|
|
352
339
|
readonly type: "tool-input-end";
|
|
340
|
+
readonly id: string;
|
|
353
341
|
readonly name: string;
|
|
342
|
+
readonly namespace?: string | undefined;
|
|
354
343
|
readonly providerMetadata?: {
|
|
355
344
|
readonly [x: string]: {
|
|
356
345
|
readonly [x: string]: unknown;
|
|
357
346
|
};
|
|
358
347
|
} | undefined;
|
|
359
|
-
readonly namespace?: string | undefined;
|
|
360
348
|
} | {
|
|
361
|
-
readonly id: string;
|
|
362
349
|
readonly type: "tool-input-error";
|
|
350
|
+
readonly id: string;
|
|
363
351
|
readonly name: string;
|
|
364
|
-
readonly raw: string;
|
|
365
352
|
readonly namespace?: string | undefined;
|
|
353
|
+
readonly raw: string;
|
|
366
354
|
} | {
|
|
367
|
-
readonly id: string;
|
|
368
355
|
readonly type: "tool-call";
|
|
356
|
+
readonly id: string;
|
|
369
357
|
readonly name: string;
|
|
358
|
+
readonly namespace?: string | undefined;
|
|
370
359
|
readonly input: unknown;
|
|
360
|
+
readonly providerExecuted?: boolean | undefined;
|
|
371
361
|
readonly providerMetadata?: {
|
|
372
362
|
readonly [x: string]: {
|
|
373
363
|
readonly [x: string]: unknown;
|
|
374
364
|
};
|
|
375
365
|
} | undefined;
|
|
376
|
-
readonly namespace?: string | undefined;
|
|
377
|
-
readonly providerExecuted?: boolean | undefined;
|
|
378
366
|
} | {
|
|
379
|
-
readonly id: string;
|
|
380
367
|
readonly type: "tool-result";
|
|
368
|
+
readonly id: string;
|
|
381
369
|
readonly name: string;
|
|
370
|
+
readonly namespace?: string | undefined;
|
|
382
371
|
readonly result: {
|
|
383
372
|
readonly type: "json";
|
|
384
373
|
readonly value: unknown;
|
|
@@ -412,28 +401,19 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
412
401
|
readonly name?: string | undefined;
|
|
413
402
|
})[];
|
|
414
403
|
} | undefined;
|
|
404
|
+
readonly providerExecuted?: boolean | undefined;
|
|
415
405
|
readonly providerMetadata?: {
|
|
416
406
|
readonly [x: string]: {
|
|
417
407
|
readonly [x: string]: unknown;
|
|
418
408
|
};
|
|
419
409
|
} | undefined;
|
|
420
|
-
readonly namespace?: string | undefined;
|
|
421
|
-
readonly providerExecuted?: boolean | undefined;
|
|
422
410
|
} | {
|
|
423
|
-
readonly id: string;
|
|
424
411
|
readonly type: "tool-error";
|
|
425
|
-
readonly
|
|
412
|
+
readonly id: string;
|
|
426
413
|
readonly name: string;
|
|
427
|
-
readonly error?: unknown;
|
|
428
|
-
readonly providerMetadata?: {
|
|
429
|
-
readonly [x: string]: {
|
|
430
|
-
readonly [x: string]: unknown;
|
|
431
|
-
};
|
|
432
|
-
} | undefined;
|
|
433
414
|
readonly namespace?: string | undefined;
|
|
434
|
-
|
|
435
|
-
readonly
|
|
436
|
-
readonly media: import("./media.js").Asset;
|
|
415
|
+
readonly message: string;
|
|
416
|
+
readonly error?: unknown;
|
|
437
417
|
readonly providerMetadata?: {
|
|
438
418
|
readonly [x: string]: {
|
|
439
419
|
readonly [x: string]: unknown;
|
|
@@ -441,33 +421,41 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
441
421
|
} | undefined;
|
|
442
422
|
} | {
|
|
443
423
|
readonly type: "step-finish";
|
|
424
|
+
readonly index: number;
|
|
444
425
|
readonly reason: {
|
|
445
|
-
readonly normalized: "
|
|
426
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
446
427
|
readonly raw?: string | undefined;
|
|
447
428
|
readonly category?: string | undefined;
|
|
448
429
|
readonly explanation?: string | undefined;
|
|
449
430
|
};
|
|
450
|
-
readonly
|
|
431
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
451
432
|
readonly providerMetadata?: {
|
|
452
433
|
readonly [x: string]: {
|
|
453
434
|
readonly [x: string]: unknown;
|
|
454
435
|
};
|
|
455
436
|
} | undefined;
|
|
456
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
457
437
|
} | {
|
|
458
438
|
readonly type: "finish";
|
|
459
439
|
readonly reason: {
|
|
460
|
-
readonly normalized: "
|
|
440
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
461
441
|
readonly raw?: string | undefined;
|
|
462
442
|
readonly category?: string | undefined;
|
|
463
443
|
readonly explanation?: string | undefined;
|
|
464
444
|
};
|
|
445
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
446
|
+
readonly providerMetadata?: {
|
|
447
|
+
readonly [x: string]: {
|
|
448
|
+
readonly [x: string]: unknown;
|
|
449
|
+
};
|
|
450
|
+
} | undefined;
|
|
451
|
+
} | {
|
|
452
|
+
readonly type: "media";
|
|
453
|
+
readonly media: import("./media.js").Asset;
|
|
465
454
|
readonly providerMetadata?: {
|
|
466
455
|
readonly [x: string]: {
|
|
467
456
|
readonly [x: string]: unknown;
|
|
468
457
|
};
|
|
469
458
|
} | undefined;
|
|
470
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
471
459
|
} | {
|
|
472
460
|
readonly type: "provider-error";
|
|
473
461
|
readonly message: string;
|
|
@@ -477,33 +465,33 @@ export declare const stop: (...events: readonly LLMEvent[]) => (({
|
|
|
477
465
|
readonly [x: string]: unknown;
|
|
478
466
|
};
|
|
479
467
|
} | undefined;
|
|
480
|
-
}
|
|
481
|
-
export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
468
|
+
} | ({
|
|
482
469
|
readonly type: "compaction";
|
|
483
470
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
484
471
|
readonly id?: string | undefined;
|
|
485
|
-
readonly text?: string | null | undefined;
|
|
486
472
|
readonly encrypted?: string | undefined;
|
|
473
|
+
readonly text?: string | null | undefined;
|
|
487
474
|
} & ({
|
|
488
475
|
readonly encrypted: string;
|
|
489
476
|
readonly text?: never;
|
|
490
477
|
} | {
|
|
491
478
|
readonly text: string | null;
|
|
492
479
|
readonly encrypted?: never;
|
|
493
|
-
}))
|
|
480
|
+
})))[];
|
|
481
|
+
export declare const toolCalls: (...events: readonly LLMEvent[]) => ({
|
|
494
482
|
readonly type: "step-start";
|
|
495
483
|
readonly index: number;
|
|
496
484
|
} | {
|
|
497
|
-
readonly id: string;
|
|
498
485
|
readonly type: "text-start";
|
|
486
|
+
readonly id: string;
|
|
499
487
|
readonly providerMetadata?: {
|
|
500
488
|
readonly [x: string]: {
|
|
501
489
|
readonly [x: string]: unknown;
|
|
502
490
|
};
|
|
503
491
|
} | undefined;
|
|
504
492
|
} | {
|
|
505
|
-
readonly id: string;
|
|
506
493
|
readonly type: "text-delta";
|
|
494
|
+
readonly id: string;
|
|
507
495
|
readonly text: string;
|
|
508
496
|
readonly providerMetadata?: {
|
|
509
497
|
readonly [x: string]: {
|
|
@@ -511,8 +499,8 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
511
499
|
};
|
|
512
500
|
} | undefined;
|
|
513
501
|
} | {
|
|
514
|
-
readonly id: string;
|
|
515
502
|
readonly type: "text-end";
|
|
503
|
+
readonly id: string;
|
|
516
504
|
readonly text?: string | undefined;
|
|
517
505
|
readonly providerMetadata?: {
|
|
518
506
|
readonly [x: string]: {
|
|
@@ -520,16 +508,16 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
520
508
|
};
|
|
521
509
|
} | undefined;
|
|
522
510
|
} | {
|
|
523
|
-
readonly id: string;
|
|
524
511
|
readonly type: "reasoning-start";
|
|
512
|
+
readonly id: string;
|
|
525
513
|
readonly providerMetadata?: {
|
|
526
514
|
readonly [x: string]: {
|
|
527
515
|
readonly [x: string]: unknown;
|
|
528
516
|
};
|
|
529
517
|
} | undefined;
|
|
530
518
|
} | {
|
|
531
|
-
readonly id: string;
|
|
532
519
|
readonly type: "reasoning-delta";
|
|
520
|
+
readonly id: string;
|
|
533
521
|
readonly text: string;
|
|
534
522
|
readonly providerMetadata?: {
|
|
535
523
|
readonly [x: string]: {
|
|
@@ -537,8 +525,8 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
537
525
|
};
|
|
538
526
|
} | undefined;
|
|
539
527
|
} | {
|
|
540
|
-
readonly id: string;
|
|
541
528
|
readonly type: "reasoning-end";
|
|
529
|
+
readonly id: string;
|
|
542
530
|
readonly text?: string | undefined;
|
|
543
531
|
readonly providerMetadata?: {
|
|
544
532
|
readonly [x: string]: {
|
|
@@ -546,55 +534,56 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
546
534
|
};
|
|
547
535
|
} | undefined;
|
|
548
536
|
} | {
|
|
549
|
-
readonly id: string;
|
|
550
537
|
readonly type: "tool-input-start";
|
|
538
|
+
readonly id: string;
|
|
551
539
|
readonly name: string;
|
|
540
|
+
readonly namespace?: string | undefined;
|
|
541
|
+
readonly providerExecuted?: boolean | undefined;
|
|
552
542
|
readonly providerMetadata?: {
|
|
553
543
|
readonly [x: string]: {
|
|
554
544
|
readonly [x: string]: unknown;
|
|
555
545
|
};
|
|
556
546
|
} | undefined;
|
|
557
|
-
readonly namespace?: string | undefined;
|
|
558
|
-
readonly providerExecuted?: boolean | undefined;
|
|
559
547
|
} | {
|
|
560
|
-
readonly id: string;
|
|
561
548
|
readonly type: "tool-input-delta";
|
|
549
|
+
readonly id: string;
|
|
562
550
|
readonly name: string;
|
|
551
|
+
readonly namespace?: string | undefined;
|
|
563
552
|
readonly text: string;
|
|
564
553
|
readonly input?: unknown;
|
|
565
|
-
readonly namespace?: string | undefined;
|
|
566
554
|
} | {
|
|
567
|
-
readonly id: string;
|
|
568
555
|
readonly type: "tool-input-end";
|
|
556
|
+
readonly id: string;
|
|
569
557
|
readonly name: string;
|
|
558
|
+
readonly namespace?: string | undefined;
|
|
570
559
|
readonly providerMetadata?: {
|
|
571
560
|
readonly [x: string]: {
|
|
572
561
|
readonly [x: string]: unknown;
|
|
573
562
|
};
|
|
574
563
|
} | undefined;
|
|
575
|
-
readonly namespace?: string | undefined;
|
|
576
564
|
} | {
|
|
577
|
-
readonly id: string;
|
|
578
565
|
readonly type: "tool-input-error";
|
|
566
|
+
readonly id: string;
|
|
579
567
|
readonly name: string;
|
|
580
|
-
readonly raw: string;
|
|
581
568
|
readonly namespace?: string | undefined;
|
|
569
|
+
readonly raw: string;
|
|
582
570
|
} | {
|
|
583
|
-
readonly id: string;
|
|
584
571
|
readonly type: "tool-call";
|
|
572
|
+
readonly id: string;
|
|
585
573
|
readonly name: string;
|
|
574
|
+
readonly namespace?: string | undefined;
|
|
586
575
|
readonly input: unknown;
|
|
576
|
+
readonly providerExecuted?: boolean | undefined;
|
|
587
577
|
readonly providerMetadata?: {
|
|
588
578
|
readonly [x: string]: {
|
|
589
579
|
readonly [x: string]: unknown;
|
|
590
580
|
};
|
|
591
581
|
} | undefined;
|
|
592
|
-
readonly namespace?: string | undefined;
|
|
593
|
-
readonly providerExecuted?: boolean | undefined;
|
|
594
582
|
} | {
|
|
595
|
-
readonly id: string;
|
|
596
583
|
readonly type: "tool-result";
|
|
584
|
+
readonly id: string;
|
|
597
585
|
readonly name: string;
|
|
586
|
+
readonly namespace?: string | undefined;
|
|
598
587
|
readonly result: {
|
|
599
588
|
readonly type: "json";
|
|
600
589
|
readonly value: unknown;
|
|
@@ -628,28 +617,19 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
628
617
|
readonly name?: string | undefined;
|
|
629
618
|
})[];
|
|
630
619
|
} | undefined;
|
|
620
|
+
readonly providerExecuted?: boolean | undefined;
|
|
631
621
|
readonly providerMetadata?: {
|
|
632
622
|
readonly [x: string]: {
|
|
633
623
|
readonly [x: string]: unknown;
|
|
634
624
|
};
|
|
635
625
|
} | undefined;
|
|
636
|
-
readonly namespace?: string | undefined;
|
|
637
|
-
readonly providerExecuted?: boolean | undefined;
|
|
638
626
|
} | {
|
|
639
|
-
readonly id: string;
|
|
640
627
|
readonly type: "tool-error";
|
|
641
|
-
readonly
|
|
628
|
+
readonly id: string;
|
|
642
629
|
readonly name: string;
|
|
643
|
-
readonly error?: unknown;
|
|
644
|
-
readonly providerMetadata?: {
|
|
645
|
-
readonly [x: string]: {
|
|
646
|
-
readonly [x: string]: unknown;
|
|
647
|
-
};
|
|
648
|
-
} | undefined;
|
|
649
630
|
readonly namespace?: string | undefined;
|
|
650
|
-
|
|
651
|
-
readonly
|
|
652
|
-
readonly media: import("./media.js").Asset;
|
|
631
|
+
readonly message: string;
|
|
632
|
+
readonly error?: unknown;
|
|
653
633
|
readonly providerMetadata?: {
|
|
654
634
|
readonly [x: string]: {
|
|
655
635
|
readonly [x: string]: unknown;
|
|
@@ -657,33 +637,41 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
657
637
|
} | undefined;
|
|
658
638
|
} | {
|
|
659
639
|
readonly type: "step-finish";
|
|
640
|
+
readonly index: number;
|
|
660
641
|
readonly reason: {
|
|
661
|
-
readonly normalized: "
|
|
642
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
662
643
|
readonly raw?: string | undefined;
|
|
663
644
|
readonly category?: string | undefined;
|
|
664
645
|
readonly explanation?: string | undefined;
|
|
665
646
|
};
|
|
666
|
-
readonly
|
|
647
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
667
648
|
readonly providerMetadata?: {
|
|
668
649
|
readonly [x: string]: {
|
|
669
650
|
readonly [x: string]: unknown;
|
|
670
651
|
};
|
|
671
652
|
} | undefined;
|
|
672
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
673
653
|
} | {
|
|
674
654
|
readonly type: "finish";
|
|
675
655
|
readonly reason: {
|
|
676
|
-
readonly normalized: "
|
|
656
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
677
657
|
readonly raw?: string | undefined;
|
|
678
658
|
readonly category?: string | undefined;
|
|
679
659
|
readonly explanation?: string | undefined;
|
|
680
660
|
};
|
|
661
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
662
|
+
readonly providerMetadata?: {
|
|
663
|
+
readonly [x: string]: {
|
|
664
|
+
readonly [x: string]: unknown;
|
|
665
|
+
};
|
|
666
|
+
} | undefined;
|
|
667
|
+
} | {
|
|
668
|
+
readonly type: "media";
|
|
669
|
+
readonly media: import("./media.js").Asset;
|
|
681
670
|
readonly providerMetadata?: {
|
|
682
671
|
readonly [x: string]: {
|
|
683
672
|
readonly [x: string]: unknown;
|
|
684
673
|
};
|
|
685
674
|
} | undefined;
|
|
686
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
687
675
|
} | {
|
|
688
676
|
readonly type: "provider-error";
|
|
689
677
|
readonly message: string;
|
|
@@ -693,33 +681,33 @@ export declare const toolCalls: (...events: readonly LLMEvent[]) => (({
|
|
|
693
681
|
readonly [x: string]: unknown;
|
|
694
682
|
};
|
|
695
683
|
} | undefined;
|
|
696
|
-
}
|
|
697
|
-
export declare const text: (value: string, id: string) => (({
|
|
684
|
+
} | ({
|
|
698
685
|
readonly type: "compaction";
|
|
699
686
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
700
687
|
readonly id?: string | undefined;
|
|
701
|
-
readonly text?: string | null | undefined;
|
|
702
688
|
readonly encrypted?: string | undefined;
|
|
689
|
+
readonly text?: string | null | undefined;
|
|
703
690
|
} & ({
|
|
704
691
|
readonly encrypted: string;
|
|
705
692
|
readonly text?: never;
|
|
706
693
|
} | {
|
|
707
694
|
readonly text: string | null;
|
|
708
695
|
readonly encrypted?: never;
|
|
709
|
-
}))
|
|
696
|
+
})))[];
|
|
697
|
+
export declare const text: (value: string, id: string) => ({
|
|
710
698
|
readonly type: "step-start";
|
|
711
699
|
readonly index: number;
|
|
712
700
|
} | {
|
|
713
|
-
readonly id: string;
|
|
714
701
|
readonly type: "text-start";
|
|
702
|
+
readonly id: string;
|
|
715
703
|
readonly providerMetadata?: {
|
|
716
704
|
readonly [x: string]: {
|
|
717
705
|
readonly [x: string]: unknown;
|
|
718
706
|
};
|
|
719
707
|
} | undefined;
|
|
720
708
|
} | {
|
|
721
|
-
readonly id: string;
|
|
722
709
|
readonly type: "text-delta";
|
|
710
|
+
readonly id: string;
|
|
723
711
|
readonly text: string;
|
|
724
712
|
readonly providerMetadata?: {
|
|
725
713
|
readonly [x: string]: {
|
|
@@ -727,8 +715,8 @@ export declare const text: (value: string, id: string) => (({
|
|
|
727
715
|
};
|
|
728
716
|
} | undefined;
|
|
729
717
|
} | {
|
|
730
|
-
readonly id: string;
|
|
731
718
|
readonly type: "text-end";
|
|
719
|
+
readonly id: string;
|
|
732
720
|
readonly text?: string | undefined;
|
|
733
721
|
readonly providerMetadata?: {
|
|
734
722
|
readonly [x: string]: {
|
|
@@ -736,16 +724,16 @@ export declare const text: (value: string, id: string) => (({
|
|
|
736
724
|
};
|
|
737
725
|
} | undefined;
|
|
738
726
|
} | {
|
|
739
|
-
readonly id: string;
|
|
740
727
|
readonly type: "reasoning-start";
|
|
728
|
+
readonly id: string;
|
|
741
729
|
readonly providerMetadata?: {
|
|
742
730
|
readonly [x: string]: {
|
|
743
731
|
readonly [x: string]: unknown;
|
|
744
732
|
};
|
|
745
733
|
} | undefined;
|
|
746
734
|
} | {
|
|
747
|
-
readonly id: string;
|
|
748
735
|
readonly type: "reasoning-delta";
|
|
736
|
+
readonly id: string;
|
|
749
737
|
readonly text: string;
|
|
750
738
|
readonly providerMetadata?: {
|
|
751
739
|
readonly [x: string]: {
|
|
@@ -753,8 +741,8 @@ export declare const text: (value: string, id: string) => (({
|
|
|
753
741
|
};
|
|
754
742
|
} | undefined;
|
|
755
743
|
} | {
|
|
756
|
-
readonly id: string;
|
|
757
744
|
readonly type: "reasoning-end";
|
|
745
|
+
readonly id: string;
|
|
758
746
|
readonly text?: string | undefined;
|
|
759
747
|
readonly providerMetadata?: {
|
|
760
748
|
readonly [x: string]: {
|
|
@@ -762,55 +750,56 @@ export declare const text: (value: string, id: string) => (({
|
|
|
762
750
|
};
|
|
763
751
|
} | undefined;
|
|
764
752
|
} | {
|
|
765
|
-
readonly id: string;
|
|
766
753
|
readonly type: "tool-input-start";
|
|
754
|
+
readonly id: string;
|
|
767
755
|
readonly name: string;
|
|
756
|
+
readonly namespace?: string | undefined;
|
|
757
|
+
readonly providerExecuted?: boolean | undefined;
|
|
768
758
|
readonly providerMetadata?: {
|
|
769
759
|
readonly [x: string]: {
|
|
770
760
|
readonly [x: string]: unknown;
|
|
771
761
|
};
|
|
772
762
|
} | undefined;
|
|
773
|
-
readonly namespace?: string | undefined;
|
|
774
|
-
readonly providerExecuted?: boolean | undefined;
|
|
775
763
|
} | {
|
|
776
|
-
readonly id: string;
|
|
777
764
|
readonly type: "tool-input-delta";
|
|
765
|
+
readonly id: string;
|
|
778
766
|
readonly name: string;
|
|
767
|
+
readonly namespace?: string | undefined;
|
|
779
768
|
readonly text: string;
|
|
780
769
|
readonly input?: unknown;
|
|
781
|
-
readonly namespace?: string | undefined;
|
|
782
770
|
} | {
|
|
783
|
-
readonly id: string;
|
|
784
771
|
readonly type: "tool-input-end";
|
|
772
|
+
readonly id: string;
|
|
785
773
|
readonly name: string;
|
|
774
|
+
readonly namespace?: string | undefined;
|
|
786
775
|
readonly providerMetadata?: {
|
|
787
776
|
readonly [x: string]: {
|
|
788
777
|
readonly [x: string]: unknown;
|
|
789
778
|
};
|
|
790
779
|
} | undefined;
|
|
791
|
-
readonly namespace?: string | undefined;
|
|
792
780
|
} | {
|
|
793
|
-
readonly id: string;
|
|
794
781
|
readonly type: "tool-input-error";
|
|
782
|
+
readonly id: string;
|
|
795
783
|
readonly name: string;
|
|
796
|
-
readonly raw: string;
|
|
797
784
|
readonly namespace?: string | undefined;
|
|
785
|
+
readonly raw: string;
|
|
798
786
|
} | {
|
|
799
|
-
readonly id: string;
|
|
800
787
|
readonly type: "tool-call";
|
|
788
|
+
readonly id: string;
|
|
801
789
|
readonly name: string;
|
|
790
|
+
readonly namespace?: string | undefined;
|
|
802
791
|
readonly input: unknown;
|
|
792
|
+
readonly providerExecuted?: boolean | undefined;
|
|
803
793
|
readonly providerMetadata?: {
|
|
804
794
|
readonly [x: string]: {
|
|
805
795
|
readonly [x: string]: unknown;
|
|
806
796
|
};
|
|
807
797
|
} | undefined;
|
|
808
|
-
readonly namespace?: string | undefined;
|
|
809
|
-
readonly providerExecuted?: boolean | undefined;
|
|
810
798
|
} | {
|
|
811
|
-
readonly id: string;
|
|
812
799
|
readonly type: "tool-result";
|
|
800
|
+
readonly id: string;
|
|
813
801
|
readonly name: string;
|
|
802
|
+
readonly namespace?: string | undefined;
|
|
814
803
|
readonly result: {
|
|
815
804
|
readonly type: "json";
|
|
816
805
|
readonly value: unknown;
|
|
@@ -844,28 +833,19 @@ export declare const text: (value: string, id: string) => (({
|
|
|
844
833
|
readonly name?: string | undefined;
|
|
845
834
|
})[];
|
|
846
835
|
} | undefined;
|
|
836
|
+
readonly providerExecuted?: boolean | undefined;
|
|
847
837
|
readonly providerMetadata?: {
|
|
848
838
|
readonly [x: string]: {
|
|
849
839
|
readonly [x: string]: unknown;
|
|
850
840
|
};
|
|
851
841
|
} | undefined;
|
|
852
|
-
readonly namespace?: string | undefined;
|
|
853
|
-
readonly providerExecuted?: boolean | undefined;
|
|
854
842
|
} | {
|
|
855
|
-
readonly id: string;
|
|
856
843
|
readonly type: "tool-error";
|
|
857
|
-
readonly
|
|
844
|
+
readonly id: string;
|
|
858
845
|
readonly name: string;
|
|
859
|
-
readonly error?: unknown;
|
|
860
|
-
readonly providerMetadata?: {
|
|
861
|
-
readonly [x: string]: {
|
|
862
|
-
readonly [x: string]: unknown;
|
|
863
|
-
};
|
|
864
|
-
} | undefined;
|
|
865
846
|
readonly namespace?: string | undefined;
|
|
866
|
-
|
|
867
|
-
readonly
|
|
868
|
-
readonly media: import("./media.js").Asset;
|
|
847
|
+
readonly message: string;
|
|
848
|
+
readonly error?: unknown;
|
|
869
849
|
readonly providerMetadata?: {
|
|
870
850
|
readonly [x: string]: {
|
|
871
851
|
readonly [x: string]: unknown;
|
|
@@ -873,33 +853,41 @@ export declare const text: (value: string, id: string) => (({
|
|
|
873
853
|
} | undefined;
|
|
874
854
|
} | {
|
|
875
855
|
readonly type: "step-finish";
|
|
856
|
+
readonly index: number;
|
|
876
857
|
readonly reason: {
|
|
877
|
-
readonly normalized: "
|
|
858
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
878
859
|
readonly raw?: string | undefined;
|
|
879
860
|
readonly category?: string | undefined;
|
|
880
861
|
readonly explanation?: string | undefined;
|
|
881
862
|
};
|
|
882
|
-
readonly
|
|
863
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
883
864
|
readonly providerMetadata?: {
|
|
884
865
|
readonly [x: string]: {
|
|
885
866
|
readonly [x: string]: unknown;
|
|
886
867
|
};
|
|
887
868
|
} | undefined;
|
|
888
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
889
869
|
} | {
|
|
890
870
|
readonly type: "finish";
|
|
891
871
|
readonly reason: {
|
|
892
|
-
readonly normalized: "
|
|
872
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
893
873
|
readonly raw?: string | undefined;
|
|
894
874
|
readonly category?: string | undefined;
|
|
895
875
|
readonly explanation?: string | undefined;
|
|
896
876
|
};
|
|
877
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
878
|
+
readonly providerMetadata?: {
|
|
879
|
+
readonly [x: string]: {
|
|
880
|
+
readonly [x: string]: unknown;
|
|
881
|
+
};
|
|
882
|
+
} | undefined;
|
|
883
|
+
} | {
|
|
884
|
+
readonly type: "media";
|
|
885
|
+
readonly media: import("./media.js").Asset;
|
|
897
886
|
readonly providerMetadata?: {
|
|
898
887
|
readonly [x: string]: {
|
|
899
888
|
readonly [x: string]: unknown;
|
|
900
889
|
};
|
|
901
890
|
} | undefined;
|
|
902
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
903
891
|
} | {
|
|
904
892
|
readonly type: "provider-error";
|
|
905
893
|
readonly message: string;
|
|
@@ -909,33 +897,33 @@ export declare const text: (value: string, id: string) => (({
|
|
|
909
897
|
readonly [x: string]: unknown;
|
|
910
898
|
};
|
|
911
899
|
} | undefined;
|
|
912
|
-
}
|
|
913
|
-
export declare const textWithUsage: (value: string, id: string, inputTokens: number) => (({
|
|
900
|
+
} | ({
|
|
914
901
|
readonly type: "compaction";
|
|
915
902
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
916
903
|
readonly id?: string | undefined;
|
|
917
|
-
readonly text?: string | null | undefined;
|
|
918
904
|
readonly encrypted?: string | undefined;
|
|
905
|
+
readonly text?: string | null | undefined;
|
|
919
906
|
} & ({
|
|
920
907
|
readonly encrypted: string;
|
|
921
908
|
readonly text?: never;
|
|
922
909
|
} | {
|
|
923
910
|
readonly text: string | null;
|
|
924
911
|
readonly encrypted?: never;
|
|
925
|
-
}))
|
|
912
|
+
})))[];
|
|
913
|
+
export declare const textWithUsage: (value: string, id: string, inputTokens: number) => ({
|
|
926
914
|
readonly type: "step-start";
|
|
927
915
|
readonly index: number;
|
|
928
916
|
} | {
|
|
929
|
-
readonly id: string;
|
|
930
917
|
readonly type: "text-start";
|
|
918
|
+
readonly id: string;
|
|
931
919
|
readonly providerMetadata?: {
|
|
932
920
|
readonly [x: string]: {
|
|
933
921
|
readonly [x: string]: unknown;
|
|
934
922
|
};
|
|
935
923
|
} | undefined;
|
|
936
924
|
} | {
|
|
937
|
-
readonly id: string;
|
|
938
925
|
readonly type: "text-delta";
|
|
926
|
+
readonly id: string;
|
|
939
927
|
readonly text: string;
|
|
940
928
|
readonly providerMetadata?: {
|
|
941
929
|
readonly [x: string]: {
|
|
@@ -943,8 +931,8 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
943
931
|
};
|
|
944
932
|
} | undefined;
|
|
945
933
|
} | {
|
|
946
|
-
readonly id: string;
|
|
947
934
|
readonly type: "text-end";
|
|
935
|
+
readonly id: string;
|
|
948
936
|
readonly text?: string | undefined;
|
|
949
937
|
readonly providerMetadata?: {
|
|
950
938
|
readonly [x: string]: {
|
|
@@ -952,16 +940,16 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
952
940
|
};
|
|
953
941
|
} | undefined;
|
|
954
942
|
} | {
|
|
955
|
-
readonly id: string;
|
|
956
943
|
readonly type: "reasoning-start";
|
|
944
|
+
readonly id: string;
|
|
957
945
|
readonly providerMetadata?: {
|
|
958
946
|
readonly [x: string]: {
|
|
959
947
|
readonly [x: string]: unknown;
|
|
960
948
|
};
|
|
961
949
|
} | undefined;
|
|
962
950
|
} | {
|
|
963
|
-
readonly id: string;
|
|
964
951
|
readonly type: "reasoning-delta";
|
|
952
|
+
readonly id: string;
|
|
965
953
|
readonly text: string;
|
|
966
954
|
readonly providerMetadata?: {
|
|
967
955
|
readonly [x: string]: {
|
|
@@ -969,8 +957,8 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
969
957
|
};
|
|
970
958
|
} | undefined;
|
|
971
959
|
} | {
|
|
972
|
-
readonly id: string;
|
|
973
960
|
readonly type: "reasoning-end";
|
|
961
|
+
readonly id: string;
|
|
974
962
|
readonly text?: string | undefined;
|
|
975
963
|
readonly providerMetadata?: {
|
|
976
964
|
readonly [x: string]: {
|
|
@@ -978,55 +966,56 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
978
966
|
};
|
|
979
967
|
} | undefined;
|
|
980
968
|
} | {
|
|
981
|
-
readonly id: string;
|
|
982
969
|
readonly type: "tool-input-start";
|
|
970
|
+
readonly id: string;
|
|
983
971
|
readonly name: string;
|
|
972
|
+
readonly namespace?: string | undefined;
|
|
973
|
+
readonly providerExecuted?: boolean | undefined;
|
|
984
974
|
readonly providerMetadata?: {
|
|
985
975
|
readonly [x: string]: {
|
|
986
976
|
readonly [x: string]: unknown;
|
|
987
977
|
};
|
|
988
978
|
} | undefined;
|
|
989
|
-
readonly namespace?: string | undefined;
|
|
990
|
-
readonly providerExecuted?: boolean | undefined;
|
|
991
979
|
} | {
|
|
992
|
-
readonly id: string;
|
|
993
980
|
readonly type: "tool-input-delta";
|
|
981
|
+
readonly id: string;
|
|
994
982
|
readonly name: string;
|
|
983
|
+
readonly namespace?: string | undefined;
|
|
995
984
|
readonly text: string;
|
|
996
985
|
readonly input?: unknown;
|
|
997
|
-
readonly namespace?: string | undefined;
|
|
998
986
|
} | {
|
|
999
|
-
readonly id: string;
|
|
1000
987
|
readonly type: "tool-input-end";
|
|
988
|
+
readonly id: string;
|
|
1001
989
|
readonly name: string;
|
|
990
|
+
readonly namespace?: string | undefined;
|
|
1002
991
|
readonly providerMetadata?: {
|
|
1003
992
|
readonly [x: string]: {
|
|
1004
993
|
readonly [x: string]: unknown;
|
|
1005
994
|
};
|
|
1006
995
|
} | undefined;
|
|
1007
|
-
readonly namespace?: string | undefined;
|
|
1008
996
|
} | {
|
|
1009
|
-
readonly id: string;
|
|
1010
997
|
readonly type: "tool-input-error";
|
|
998
|
+
readonly id: string;
|
|
1011
999
|
readonly name: string;
|
|
1012
|
-
readonly raw: string;
|
|
1013
1000
|
readonly namespace?: string | undefined;
|
|
1001
|
+
readonly raw: string;
|
|
1014
1002
|
} | {
|
|
1015
|
-
readonly id: string;
|
|
1016
1003
|
readonly type: "tool-call";
|
|
1004
|
+
readonly id: string;
|
|
1017
1005
|
readonly name: string;
|
|
1006
|
+
readonly namespace?: string | undefined;
|
|
1018
1007
|
readonly input: unknown;
|
|
1008
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1019
1009
|
readonly providerMetadata?: {
|
|
1020
1010
|
readonly [x: string]: {
|
|
1021
1011
|
readonly [x: string]: unknown;
|
|
1022
1012
|
};
|
|
1023
1013
|
} | undefined;
|
|
1024
|
-
readonly namespace?: string | undefined;
|
|
1025
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1026
1014
|
} | {
|
|
1027
|
-
readonly id: string;
|
|
1028
1015
|
readonly type: "tool-result";
|
|
1016
|
+
readonly id: string;
|
|
1029
1017
|
readonly name: string;
|
|
1018
|
+
readonly namespace?: string | undefined;
|
|
1030
1019
|
readonly result: {
|
|
1031
1020
|
readonly type: "json";
|
|
1032
1021
|
readonly value: unknown;
|
|
@@ -1060,28 +1049,19 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
1060
1049
|
readonly name?: string | undefined;
|
|
1061
1050
|
})[];
|
|
1062
1051
|
} | undefined;
|
|
1052
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1063
1053
|
readonly providerMetadata?: {
|
|
1064
1054
|
readonly [x: string]: {
|
|
1065
1055
|
readonly [x: string]: unknown;
|
|
1066
1056
|
};
|
|
1067
1057
|
} | undefined;
|
|
1068
|
-
readonly namespace?: string | undefined;
|
|
1069
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1070
1058
|
} | {
|
|
1071
|
-
readonly id: string;
|
|
1072
1059
|
readonly type: "tool-error";
|
|
1073
|
-
readonly
|
|
1060
|
+
readonly id: string;
|
|
1074
1061
|
readonly name: string;
|
|
1075
|
-
readonly error?: unknown;
|
|
1076
|
-
readonly providerMetadata?: {
|
|
1077
|
-
readonly [x: string]: {
|
|
1078
|
-
readonly [x: string]: unknown;
|
|
1079
|
-
};
|
|
1080
|
-
} | undefined;
|
|
1081
1062
|
readonly namespace?: string | undefined;
|
|
1082
|
-
|
|
1083
|
-
readonly
|
|
1084
|
-
readonly media: import("./media.js").Asset;
|
|
1063
|
+
readonly message: string;
|
|
1064
|
+
readonly error?: unknown;
|
|
1085
1065
|
readonly providerMetadata?: {
|
|
1086
1066
|
readonly [x: string]: {
|
|
1087
1067
|
readonly [x: string]: unknown;
|
|
@@ -1089,33 +1069,41 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
1089
1069
|
} | undefined;
|
|
1090
1070
|
} | {
|
|
1091
1071
|
readonly type: "step-finish";
|
|
1072
|
+
readonly index: number;
|
|
1092
1073
|
readonly reason: {
|
|
1093
|
-
readonly normalized: "
|
|
1074
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1094
1075
|
readonly raw?: string | undefined;
|
|
1095
1076
|
readonly category?: string | undefined;
|
|
1096
1077
|
readonly explanation?: string | undefined;
|
|
1097
1078
|
};
|
|
1098
|
-
readonly
|
|
1079
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1099
1080
|
readonly providerMetadata?: {
|
|
1100
1081
|
readonly [x: string]: {
|
|
1101
1082
|
readonly [x: string]: unknown;
|
|
1102
1083
|
};
|
|
1103
1084
|
} | undefined;
|
|
1104
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1105
1085
|
} | {
|
|
1106
1086
|
readonly type: "finish";
|
|
1107
1087
|
readonly reason: {
|
|
1108
|
-
readonly normalized: "
|
|
1088
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1109
1089
|
readonly raw?: string | undefined;
|
|
1110
1090
|
readonly category?: string | undefined;
|
|
1111
1091
|
readonly explanation?: string | undefined;
|
|
1112
1092
|
};
|
|
1093
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1094
|
+
readonly providerMetadata?: {
|
|
1095
|
+
readonly [x: string]: {
|
|
1096
|
+
readonly [x: string]: unknown;
|
|
1097
|
+
};
|
|
1098
|
+
} | undefined;
|
|
1099
|
+
} | {
|
|
1100
|
+
readonly type: "media";
|
|
1101
|
+
readonly media: import("./media.js").Asset;
|
|
1113
1102
|
readonly providerMetadata?: {
|
|
1114
1103
|
readonly [x: string]: {
|
|
1115
1104
|
readonly [x: string]: unknown;
|
|
1116
1105
|
};
|
|
1117
1106
|
} | undefined;
|
|
1118
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1119
1107
|
} | {
|
|
1120
1108
|
readonly type: "provider-error";
|
|
1121
1109
|
readonly message: string;
|
|
@@ -1125,33 +1113,33 @@ export declare const textWithUsage: (value: string, id: string, inputTokens: num
|
|
|
1125
1113
|
readonly [x: string]: unknown;
|
|
1126
1114
|
};
|
|
1127
1115
|
} | undefined;
|
|
1128
|
-
}
|
|
1129
|
-
export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
1116
|
+
} | ({
|
|
1130
1117
|
readonly type: "compaction";
|
|
1131
1118
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1132
1119
|
readonly id?: string | undefined;
|
|
1133
|
-
readonly text?: string | null | undefined;
|
|
1134
1120
|
readonly encrypted?: string | undefined;
|
|
1121
|
+
readonly text?: string | null | undefined;
|
|
1135
1122
|
} & ({
|
|
1136
1123
|
readonly encrypted: string;
|
|
1137
1124
|
readonly text?: never;
|
|
1138
1125
|
} | {
|
|
1139
1126
|
readonly text: string | null;
|
|
1140
1127
|
readonly encrypted?: never;
|
|
1141
|
-
}))
|
|
1128
|
+
})))[];
|
|
1129
|
+
export declare const tool: (id: string, name: string, input: unknown) => ({
|
|
1142
1130
|
readonly type: "step-start";
|
|
1143
1131
|
readonly index: number;
|
|
1144
1132
|
} | {
|
|
1145
|
-
readonly id: string;
|
|
1146
1133
|
readonly type: "text-start";
|
|
1134
|
+
readonly id: string;
|
|
1147
1135
|
readonly providerMetadata?: {
|
|
1148
1136
|
readonly [x: string]: {
|
|
1149
1137
|
readonly [x: string]: unknown;
|
|
1150
1138
|
};
|
|
1151
1139
|
} | undefined;
|
|
1152
1140
|
} | {
|
|
1153
|
-
readonly id: string;
|
|
1154
1141
|
readonly type: "text-delta";
|
|
1142
|
+
readonly id: string;
|
|
1155
1143
|
readonly text: string;
|
|
1156
1144
|
readonly providerMetadata?: {
|
|
1157
1145
|
readonly [x: string]: {
|
|
@@ -1159,8 +1147,8 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1159
1147
|
};
|
|
1160
1148
|
} | undefined;
|
|
1161
1149
|
} | {
|
|
1162
|
-
readonly id: string;
|
|
1163
1150
|
readonly type: "text-end";
|
|
1151
|
+
readonly id: string;
|
|
1164
1152
|
readonly text?: string | undefined;
|
|
1165
1153
|
readonly providerMetadata?: {
|
|
1166
1154
|
readonly [x: string]: {
|
|
@@ -1168,16 +1156,16 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1168
1156
|
};
|
|
1169
1157
|
} | undefined;
|
|
1170
1158
|
} | {
|
|
1171
|
-
readonly id: string;
|
|
1172
1159
|
readonly type: "reasoning-start";
|
|
1160
|
+
readonly id: string;
|
|
1173
1161
|
readonly providerMetadata?: {
|
|
1174
1162
|
readonly [x: string]: {
|
|
1175
1163
|
readonly [x: string]: unknown;
|
|
1176
1164
|
};
|
|
1177
1165
|
} | undefined;
|
|
1178
1166
|
} | {
|
|
1179
|
-
readonly id: string;
|
|
1180
1167
|
readonly type: "reasoning-delta";
|
|
1168
|
+
readonly id: string;
|
|
1181
1169
|
readonly text: string;
|
|
1182
1170
|
readonly providerMetadata?: {
|
|
1183
1171
|
readonly [x: string]: {
|
|
@@ -1185,8 +1173,8 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1185
1173
|
};
|
|
1186
1174
|
} | undefined;
|
|
1187
1175
|
} | {
|
|
1188
|
-
readonly id: string;
|
|
1189
1176
|
readonly type: "reasoning-end";
|
|
1177
|
+
readonly id: string;
|
|
1190
1178
|
readonly text?: string | undefined;
|
|
1191
1179
|
readonly providerMetadata?: {
|
|
1192
1180
|
readonly [x: string]: {
|
|
@@ -1194,55 +1182,56 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1194
1182
|
};
|
|
1195
1183
|
} | undefined;
|
|
1196
1184
|
} | {
|
|
1197
|
-
readonly id: string;
|
|
1198
1185
|
readonly type: "tool-input-start";
|
|
1186
|
+
readonly id: string;
|
|
1199
1187
|
readonly name: string;
|
|
1188
|
+
readonly namespace?: string | undefined;
|
|
1189
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1200
1190
|
readonly providerMetadata?: {
|
|
1201
1191
|
readonly [x: string]: {
|
|
1202
1192
|
readonly [x: string]: unknown;
|
|
1203
1193
|
};
|
|
1204
1194
|
} | undefined;
|
|
1205
|
-
readonly namespace?: string | undefined;
|
|
1206
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1207
1195
|
} | {
|
|
1208
|
-
readonly id: string;
|
|
1209
1196
|
readonly type: "tool-input-delta";
|
|
1197
|
+
readonly id: string;
|
|
1210
1198
|
readonly name: string;
|
|
1199
|
+
readonly namespace?: string | undefined;
|
|
1211
1200
|
readonly text: string;
|
|
1212
1201
|
readonly input?: unknown;
|
|
1213
|
-
readonly namespace?: string | undefined;
|
|
1214
1202
|
} | {
|
|
1215
|
-
readonly id: string;
|
|
1216
1203
|
readonly type: "tool-input-end";
|
|
1204
|
+
readonly id: string;
|
|
1217
1205
|
readonly name: string;
|
|
1206
|
+
readonly namespace?: string | undefined;
|
|
1218
1207
|
readonly providerMetadata?: {
|
|
1219
1208
|
readonly [x: string]: {
|
|
1220
1209
|
readonly [x: string]: unknown;
|
|
1221
1210
|
};
|
|
1222
1211
|
} | undefined;
|
|
1223
|
-
readonly namespace?: string | undefined;
|
|
1224
1212
|
} | {
|
|
1225
|
-
readonly id: string;
|
|
1226
1213
|
readonly type: "tool-input-error";
|
|
1214
|
+
readonly id: string;
|
|
1227
1215
|
readonly name: string;
|
|
1228
|
-
readonly raw: string;
|
|
1229
1216
|
readonly namespace?: string | undefined;
|
|
1217
|
+
readonly raw: string;
|
|
1230
1218
|
} | {
|
|
1231
|
-
readonly id: string;
|
|
1232
1219
|
readonly type: "tool-call";
|
|
1220
|
+
readonly id: string;
|
|
1233
1221
|
readonly name: string;
|
|
1222
|
+
readonly namespace?: string | undefined;
|
|
1234
1223
|
readonly input: unknown;
|
|
1224
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1235
1225
|
readonly providerMetadata?: {
|
|
1236
1226
|
readonly [x: string]: {
|
|
1237
1227
|
readonly [x: string]: unknown;
|
|
1238
1228
|
};
|
|
1239
1229
|
} | undefined;
|
|
1240
|
-
readonly namespace?: string | undefined;
|
|
1241
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1242
1230
|
} | {
|
|
1243
|
-
readonly id: string;
|
|
1244
1231
|
readonly type: "tool-result";
|
|
1232
|
+
readonly id: string;
|
|
1245
1233
|
readonly name: string;
|
|
1234
|
+
readonly namespace?: string | undefined;
|
|
1246
1235
|
readonly result: {
|
|
1247
1236
|
readonly type: "json";
|
|
1248
1237
|
readonly value: unknown;
|
|
@@ -1276,28 +1265,19 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1276
1265
|
readonly name?: string | undefined;
|
|
1277
1266
|
})[];
|
|
1278
1267
|
} | undefined;
|
|
1268
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1279
1269
|
readonly providerMetadata?: {
|
|
1280
1270
|
readonly [x: string]: {
|
|
1281
1271
|
readonly [x: string]: unknown;
|
|
1282
1272
|
};
|
|
1283
1273
|
} | undefined;
|
|
1284
|
-
readonly namespace?: string | undefined;
|
|
1285
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1286
1274
|
} | {
|
|
1287
|
-
readonly id: string;
|
|
1288
1275
|
readonly type: "tool-error";
|
|
1289
|
-
readonly
|
|
1276
|
+
readonly id: string;
|
|
1290
1277
|
readonly name: string;
|
|
1291
|
-
readonly error?: unknown;
|
|
1292
|
-
readonly providerMetadata?: {
|
|
1293
|
-
readonly [x: string]: {
|
|
1294
|
-
readonly [x: string]: unknown;
|
|
1295
|
-
};
|
|
1296
|
-
} | undefined;
|
|
1297
1278
|
readonly namespace?: string | undefined;
|
|
1298
|
-
|
|
1299
|
-
readonly
|
|
1300
|
-
readonly media: import("./media.js").Asset;
|
|
1279
|
+
readonly message: string;
|
|
1280
|
+
readonly error?: unknown;
|
|
1301
1281
|
readonly providerMetadata?: {
|
|
1302
1282
|
readonly [x: string]: {
|
|
1303
1283
|
readonly [x: string]: unknown;
|
|
@@ -1305,33 +1285,41 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1305
1285
|
} | undefined;
|
|
1306
1286
|
} | {
|
|
1307
1287
|
readonly type: "step-finish";
|
|
1288
|
+
readonly index: number;
|
|
1308
1289
|
readonly reason: {
|
|
1309
|
-
readonly normalized: "
|
|
1290
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1310
1291
|
readonly raw?: string | undefined;
|
|
1311
1292
|
readonly category?: string | undefined;
|
|
1312
1293
|
readonly explanation?: string | undefined;
|
|
1313
1294
|
};
|
|
1314
|
-
readonly
|
|
1295
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1315
1296
|
readonly providerMetadata?: {
|
|
1316
1297
|
readonly [x: string]: {
|
|
1317
1298
|
readonly [x: string]: unknown;
|
|
1318
1299
|
};
|
|
1319
1300
|
} | undefined;
|
|
1320
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1321
1301
|
} | {
|
|
1322
1302
|
readonly type: "finish";
|
|
1323
1303
|
readonly reason: {
|
|
1324
|
-
readonly normalized: "
|
|
1304
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1325
1305
|
readonly raw?: string | undefined;
|
|
1326
1306
|
readonly category?: string | undefined;
|
|
1327
1307
|
readonly explanation?: string | undefined;
|
|
1328
1308
|
};
|
|
1309
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1310
|
+
readonly providerMetadata?: {
|
|
1311
|
+
readonly [x: string]: {
|
|
1312
|
+
readonly [x: string]: unknown;
|
|
1313
|
+
};
|
|
1314
|
+
} | undefined;
|
|
1315
|
+
} | {
|
|
1316
|
+
readonly type: "media";
|
|
1317
|
+
readonly media: import("./media.js").Asset;
|
|
1329
1318
|
readonly providerMetadata?: {
|
|
1330
1319
|
readonly [x: string]: {
|
|
1331
1320
|
readonly [x: string]: unknown;
|
|
1332
1321
|
};
|
|
1333
1322
|
} | undefined;
|
|
1334
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1335
1323
|
} | {
|
|
1336
1324
|
readonly type: "provider-error";
|
|
1337
1325
|
readonly message: string;
|
|
@@ -1341,33 +1329,33 @@ export declare const tool: (id: string, name: string, input: unknown) => (({
|
|
|
1341
1329
|
readonly [x: string]: unknown;
|
|
1342
1330
|
};
|
|
1343
1331
|
} | undefined;
|
|
1344
|
-
}
|
|
1345
|
-
export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[]) => Stream.Stream<({
|
|
1332
|
+
} | ({
|
|
1346
1333
|
readonly type: "compaction";
|
|
1347
1334
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1348
1335
|
readonly id?: string | undefined;
|
|
1349
|
-
readonly text?: string | null | undefined;
|
|
1350
1336
|
readonly encrypted?: string | undefined;
|
|
1337
|
+
readonly text?: string | null | undefined;
|
|
1351
1338
|
} & ({
|
|
1352
1339
|
readonly encrypted: string;
|
|
1353
1340
|
readonly text?: never;
|
|
1354
1341
|
} | {
|
|
1355
1342
|
readonly text: string | null;
|
|
1356
1343
|
readonly encrypted?: never;
|
|
1357
|
-
}))
|
|
1344
|
+
})))[];
|
|
1345
|
+
export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[]) => Stream.Stream<{
|
|
1358
1346
|
readonly type: "step-start";
|
|
1359
1347
|
readonly index: number;
|
|
1360
1348
|
} | {
|
|
1361
|
-
readonly id: string;
|
|
1362
1349
|
readonly type: "text-start";
|
|
1350
|
+
readonly id: string;
|
|
1363
1351
|
readonly providerMetadata?: {
|
|
1364
1352
|
readonly [x: string]: {
|
|
1365
1353
|
readonly [x: string]: unknown;
|
|
1366
1354
|
};
|
|
1367
1355
|
} | undefined;
|
|
1368
1356
|
} | {
|
|
1369
|
-
readonly id: string;
|
|
1370
1357
|
readonly type: "text-delta";
|
|
1358
|
+
readonly id: string;
|
|
1371
1359
|
readonly text: string;
|
|
1372
1360
|
readonly providerMetadata?: {
|
|
1373
1361
|
readonly [x: string]: {
|
|
@@ -1375,8 +1363,8 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1375
1363
|
};
|
|
1376
1364
|
} | undefined;
|
|
1377
1365
|
} | {
|
|
1378
|
-
readonly id: string;
|
|
1379
1366
|
readonly type: "text-end";
|
|
1367
|
+
readonly id: string;
|
|
1380
1368
|
readonly text?: string | undefined;
|
|
1381
1369
|
readonly providerMetadata?: {
|
|
1382
1370
|
readonly [x: string]: {
|
|
@@ -1384,16 +1372,16 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1384
1372
|
};
|
|
1385
1373
|
} | undefined;
|
|
1386
1374
|
} | {
|
|
1387
|
-
readonly id: string;
|
|
1388
1375
|
readonly type: "reasoning-start";
|
|
1376
|
+
readonly id: string;
|
|
1389
1377
|
readonly providerMetadata?: {
|
|
1390
1378
|
readonly [x: string]: {
|
|
1391
1379
|
readonly [x: string]: unknown;
|
|
1392
1380
|
};
|
|
1393
1381
|
} | undefined;
|
|
1394
1382
|
} | {
|
|
1395
|
-
readonly id: string;
|
|
1396
1383
|
readonly type: "reasoning-delta";
|
|
1384
|
+
readonly id: string;
|
|
1397
1385
|
readonly text: string;
|
|
1398
1386
|
readonly providerMetadata?: {
|
|
1399
1387
|
readonly [x: string]: {
|
|
@@ -1401,8 +1389,8 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1401
1389
|
};
|
|
1402
1390
|
} | undefined;
|
|
1403
1391
|
} | {
|
|
1404
|
-
readonly id: string;
|
|
1405
1392
|
readonly type: "reasoning-end";
|
|
1393
|
+
readonly id: string;
|
|
1406
1394
|
readonly text?: string | undefined;
|
|
1407
1395
|
readonly providerMetadata?: {
|
|
1408
1396
|
readonly [x: string]: {
|
|
@@ -1410,55 +1398,56 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1410
1398
|
};
|
|
1411
1399
|
} | undefined;
|
|
1412
1400
|
} | {
|
|
1413
|
-
readonly id: string;
|
|
1414
1401
|
readonly type: "tool-input-start";
|
|
1402
|
+
readonly id: string;
|
|
1415
1403
|
readonly name: string;
|
|
1404
|
+
readonly namespace?: string | undefined;
|
|
1405
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1416
1406
|
readonly providerMetadata?: {
|
|
1417
1407
|
readonly [x: string]: {
|
|
1418
1408
|
readonly [x: string]: unknown;
|
|
1419
1409
|
};
|
|
1420
1410
|
} | undefined;
|
|
1421
|
-
readonly namespace?: string | undefined;
|
|
1422
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1423
1411
|
} | {
|
|
1424
|
-
readonly id: string;
|
|
1425
1412
|
readonly type: "tool-input-delta";
|
|
1413
|
+
readonly id: string;
|
|
1426
1414
|
readonly name: string;
|
|
1415
|
+
readonly namespace?: string | undefined;
|
|
1427
1416
|
readonly text: string;
|
|
1428
1417
|
readonly input?: unknown;
|
|
1429
|
-
readonly namespace?: string | undefined;
|
|
1430
1418
|
} | {
|
|
1431
|
-
readonly id: string;
|
|
1432
1419
|
readonly type: "tool-input-end";
|
|
1420
|
+
readonly id: string;
|
|
1433
1421
|
readonly name: string;
|
|
1422
|
+
readonly namespace?: string | undefined;
|
|
1434
1423
|
readonly providerMetadata?: {
|
|
1435
1424
|
readonly [x: string]: {
|
|
1436
1425
|
readonly [x: string]: unknown;
|
|
1437
1426
|
};
|
|
1438
1427
|
} | undefined;
|
|
1439
|
-
readonly namespace?: string | undefined;
|
|
1440
1428
|
} | {
|
|
1441
|
-
readonly id: string;
|
|
1442
1429
|
readonly type: "tool-input-error";
|
|
1430
|
+
readonly id: string;
|
|
1443
1431
|
readonly name: string;
|
|
1444
|
-
readonly raw: string;
|
|
1445
1432
|
readonly namespace?: string | undefined;
|
|
1433
|
+
readonly raw: string;
|
|
1446
1434
|
} | {
|
|
1447
|
-
readonly id: string;
|
|
1448
1435
|
readonly type: "tool-call";
|
|
1436
|
+
readonly id: string;
|
|
1449
1437
|
readonly name: string;
|
|
1438
|
+
readonly namespace?: string | undefined;
|
|
1450
1439
|
readonly input: unknown;
|
|
1440
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1451
1441
|
readonly providerMetadata?: {
|
|
1452
1442
|
readonly [x: string]: {
|
|
1453
1443
|
readonly [x: string]: unknown;
|
|
1454
1444
|
};
|
|
1455
1445
|
} | undefined;
|
|
1456
|
-
readonly namespace?: string | undefined;
|
|
1457
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1458
1446
|
} | {
|
|
1459
|
-
readonly id: string;
|
|
1460
1447
|
readonly type: "tool-result";
|
|
1448
|
+
readonly id: string;
|
|
1461
1449
|
readonly name: string;
|
|
1450
|
+
readonly namespace?: string | undefined;
|
|
1462
1451
|
readonly result: {
|
|
1463
1452
|
readonly type: "json";
|
|
1464
1453
|
readonly value: unknown;
|
|
@@ -1492,28 +1481,19 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1492
1481
|
readonly name?: string | undefined;
|
|
1493
1482
|
})[];
|
|
1494
1483
|
} | undefined;
|
|
1484
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1495
1485
|
readonly providerMetadata?: {
|
|
1496
1486
|
readonly [x: string]: {
|
|
1497
1487
|
readonly [x: string]: unknown;
|
|
1498
1488
|
};
|
|
1499
1489
|
} | undefined;
|
|
1500
|
-
readonly namespace?: string | undefined;
|
|
1501
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1502
1490
|
} | {
|
|
1503
|
-
readonly id: string;
|
|
1504
1491
|
readonly type: "tool-error";
|
|
1505
|
-
readonly
|
|
1492
|
+
readonly id: string;
|
|
1506
1493
|
readonly name: string;
|
|
1507
|
-
readonly error?: unknown;
|
|
1508
|
-
readonly providerMetadata?: {
|
|
1509
|
-
readonly [x: string]: {
|
|
1510
|
-
readonly [x: string]: unknown;
|
|
1511
|
-
};
|
|
1512
|
-
} | undefined;
|
|
1513
1494
|
readonly namespace?: string | undefined;
|
|
1514
|
-
|
|
1515
|
-
readonly
|
|
1516
|
-
readonly media: import("./media.js").Asset;
|
|
1495
|
+
readonly message: string;
|
|
1496
|
+
readonly error?: unknown;
|
|
1517
1497
|
readonly providerMetadata?: {
|
|
1518
1498
|
readonly [x: string]: {
|
|
1519
1499
|
readonly [x: string]: unknown;
|
|
@@ -1521,33 +1501,41 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1521
1501
|
} | undefined;
|
|
1522
1502
|
} | {
|
|
1523
1503
|
readonly type: "step-finish";
|
|
1504
|
+
readonly index: number;
|
|
1524
1505
|
readonly reason: {
|
|
1525
|
-
readonly normalized: "
|
|
1506
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1526
1507
|
readonly raw?: string | undefined;
|
|
1527
1508
|
readonly category?: string | undefined;
|
|
1528
1509
|
readonly explanation?: string | undefined;
|
|
1529
1510
|
};
|
|
1530
|
-
readonly
|
|
1511
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1531
1512
|
readonly providerMetadata?: {
|
|
1532
1513
|
readonly [x: string]: {
|
|
1533
1514
|
readonly [x: string]: unknown;
|
|
1534
1515
|
};
|
|
1535
1516
|
} | undefined;
|
|
1536
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1537
1517
|
} | {
|
|
1538
1518
|
readonly type: "finish";
|
|
1539
1519
|
readonly reason: {
|
|
1540
|
-
readonly normalized: "
|
|
1520
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1541
1521
|
readonly raw?: string | undefined;
|
|
1542
1522
|
readonly category?: string | undefined;
|
|
1543
1523
|
readonly explanation?: string | undefined;
|
|
1544
1524
|
};
|
|
1525
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1526
|
+
readonly providerMetadata?: {
|
|
1527
|
+
readonly [x: string]: {
|
|
1528
|
+
readonly [x: string]: unknown;
|
|
1529
|
+
};
|
|
1530
|
+
} | undefined;
|
|
1531
|
+
} | {
|
|
1532
|
+
readonly type: "media";
|
|
1533
|
+
readonly media: import("./media.js").Asset;
|
|
1545
1534
|
readonly providerMetadata?: {
|
|
1546
1535
|
readonly [x: string]: {
|
|
1547
1536
|
readonly [x: string]: unknown;
|
|
1548
1537
|
};
|
|
1549
1538
|
} | undefined;
|
|
1550
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1551
1539
|
} | {
|
|
1552
1540
|
readonly type: "provider-error";
|
|
1553
1541
|
readonly message: string;
|
|
@@ -1557,33 +1545,33 @@ export declare const failAfter: (error: AIError, ...events: readonly LLMEvent[])
|
|
|
1557
1545
|
readonly [x: string]: unknown;
|
|
1558
1546
|
};
|
|
1559
1547
|
} | undefined;
|
|
1560
|
-
}
|
|
1561
|
-
export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Stream<({
|
|
1548
|
+
} | ({
|
|
1562
1549
|
readonly type: "compaction";
|
|
1563
1550
|
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1564
1551
|
readonly id?: string | undefined;
|
|
1565
|
-
readonly text?: string | null | undefined;
|
|
1566
1552
|
readonly encrypted?: string | undefined;
|
|
1553
|
+
readonly text?: string | null | undefined;
|
|
1567
1554
|
} & ({
|
|
1568
1555
|
readonly encrypted: string;
|
|
1569
1556
|
readonly text?: never;
|
|
1570
1557
|
} | {
|
|
1571
1558
|
readonly text: string | null;
|
|
1572
1559
|
readonly encrypted?: never;
|
|
1573
|
-
}))
|
|
1560
|
+
})), AIError, never>;
|
|
1561
|
+
export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Stream<{
|
|
1574
1562
|
readonly type: "step-start";
|
|
1575
1563
|
readonly index: number;
|
|
1576
1564
|
} | {
|
|
1577
|
-
readonly id: string;
|
|
1578
1565
|
readonly type: "text-start";
|
|
1566
|
+
readonly id: string;
|
|
1579
1567
|
readonly providerMetadata?: {
|
|
1580
1568
|
readonly [x: string]: {
|
|
1581
1569
|
readonly [x: string]: unknown;
|
|
1582
1570
|
};
|
|
1583
1571
|
} | undefined;
|
|
1584
1572
|
} | {
|
|
1585
|
-
readonly id: string;
|
|
1586
1573
|
readonly type: "text-delta";
|
|
1574
|
+
readonly id: string;
|
|
1587
1575
|
readonly text: string;
|
|
1588
1576
|
readonly providerMetadata?: {
|
|
1589
1577
|
readonly [x: string]: {
|
|
@@ -1591,8 +1579,8 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1591
1579
|
};
|
|
1592
1580
|
} | undefined;
|
|
1593
1581
|
} | {
|
|
1594
|
-
readonly id: string;
|
|
1595
1582
|
readonly type: "text-end";
|
|
1583
|
+
readonly id: string;
|
|
1596
1584
|
readonly text?: string | undefined;
|
|
1597
1585
|
readonly providerMetadata?: {
|
|
1598
1586
|
readonly [x: string]: {
|
|
@@ -1600,16 +1588,16 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1600
1588
|
};
|
|
1601
1589
|
} | undefined;
|
|
1602
1590
|
} | {
|
|
1603
|
-
readonly id: string;
|
|
1604
1591
|
readonly type: "reasoning-start";
|
|
1592
|
+
readonly id: string;
|
|
1605
1593
|
readonly providerMetadata?: {
|
|
1606
1594
|
readonly [x: string]: {
|
|
1607
1595
|
readonly [x: string]: unknown;
|
|
1608
1596
|
};
|
|
1609
1597
|
} | undefined;
|
|
1610
1598
|
} | {
|
|
1611
|
-
readonly id: string;
|
|
1612
1599
|
readonly type: "reasoning-delta";
|
|
1600
|
+
readonly id: string;
|
|
1613
1601
|
readonly text: string;
|
|
1614
1602
|
readonly providerMetadata?: {
|
|
1615
1603
|
readonly [x: string]: {
|
|
@@ -1617,8 +1605,8 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1617
1605
|
};
|
|
1618
1606
|
} | undefined;
|
|
1619
1607
|
} | {
|
|
1620
|
-
readonly id: string;
|
|
1621
1608
|
readonly type: "reasoning-end";
|
|
1609
|
+
readonly id: string;
|
|
1622
1610
|
readonly text?: string | undefined;
|
|
1623
1611
|
readonly providerMetadata?: {
|
|
1624
1612
|
readonly [x: string]: {
|
|
@@ -1626,55 +1614,56 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1626
1614
|
};
|
|
1627
1615
|
} | undefined;
|
|
1628
1616
|
} | {
|
|
1629
|
-
readonly id: string;
|
|
1630
1617
|
readonly type: "tool-input-start";
|
|
1618
|
+
readonly id: string;
|
|
1631
1619
|
readonly name: string;
|
|
1620
|
+
readonly namespace?: string | undefined;
|
|
1621
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1632
1622
|
readonly providerMetadata?: {
|
|
1633
1623
|
readonly [x: string]: {
|
|
1634
1624
|
readonly [x: string]: unknown;
|
|
1635
1625
|
};
|
|
1636
1626
|
} | undefined;
|
|
1637
|
-
readonly namespace?: string | undefined;
|
|
1638
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1639
1627
|
} | {
|
|
1640
|
-
readonly id: string;
|
|
1641
1628
|
readonly type: "tool-input-delta";
|
|
1629
|
+
readonly id: string;
|
|
1642
1630
|
readonly name: string;
|
|
1631
|
+
readonly namespace?: string | undefined;
|
|
1643
1632
|
readonly text: string;
|
|
1644
1633
|
readonly input?: unknown;
|
|
1645
|
-
readonly namespace?: string | undefined;
|
|
1646
1634
|
} | {
|
|
1647
|
-
readonly id: string;
|
|
1648
1635
|
readonly type: "tool-input-end";
|
|
1636
|
+
readonly id: string;
|
|
1649
1637
|
readonly name: string;
|
|
1638
|
+
readonly namespace?: string | undefined;
|
|
1650
1639
|
readonly providerMetadata?: {
|
|
1651
1640
|
readonly [x: string]: {
|
|
1652
1641
|
readonly [x: string]: unknown;
|
|
1653
1642
|
};
|
|
1654
1643
|
} | undefined;
|
|
1655
|
-
readonly namespace?: string | undefined;
|
|
1656
1644
|
} | {
|
|
1657
|
-
readonly id: string;
|
|
1658
1645
|
readonly type: "tool-input-error";
|
|
1646
|
+
readonly id: string;
|
|
1659
1647
|
readonly name: string;
|
|
1660
|
-
readonly raw: string;
|
|
1661
1648
|
readonly namespace?: string | undefined;
|
|
1649
|
+
readonly raw: string;
|
|
1662
1650
|
} | {
|
|
1663
|
-
readonly id: string;
|
|
1664
1651
|
readonly type: "tool-call";
|
|
1652
|
+
readonly id: string;
|
|
1665
1653
|
readonly name: string;
|
|
1654
|
+
readonly namespace?: string | undefined;
|
|
1666
1655
|
readonly input: unknown;
|
|
1656
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1667
1657
|
readonly providerMetadata?: {
|
|
1668
1658
|
readonly [x: string]: {
|
|
1669
1659
|
readonly [x: string]: unknown;
|
|
1670
1660
|
};
|
|
1671
1661
|
} | undefined;
|
|
1672
|
-
readonly namespace?: string | undefined;
|
|
1673
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1674
1662
|
} | {
|
|
1675
|
-
readonly id: string;
|
|
1676
1663
|
readonly type: "tool-result";
|
|
1664
|
+
readonly id: string;
|
|
1677
1665
|
readonly name: string;
|
|
1666
|
+
readonly namespace?: string | undefined;
|
|
1678
1667
|
readonly result: {
|
|
1679
1668
|
readonly type: "json";
|
|
1680
1669
|
readonly value: unknown;
|
|
@@ -1708,28 +1697,19 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1708
1697
|
readonly name?: string | undefined;
|
|
1709
1698
|
})[];
|
|
1710
1699
|
} | undefined;
|
|
1700
|
+
readonly providerExecuted?: boolean | undefined;
|
|
1711
1701
|
readonly providerMetadata?: {
|
|
1712
1702
|
readonly [x: string]: {
|
|
1713
1703
|
readonly [x: string]: unknown;
|
|
1714
1704
|
};
|
|
1715
1705
|
} | undefined;
|
|
1716
|
-
readonly namespace?: string | undefined;
|
|
1717
|
-
readonly providerExecuted?: boolean | undefined;
|
|
1718
1706
|
} | {
|
|
1719
|
-
readonly id: string;
|
|
1720
1707
|
readonly type: "tool-error";
|
|
1721
|
-
readonly
|
|
1708
|
+
readonly id: string;
|
|
1722
1709
|
readonly name: string;
|
|
1723
|
-
readonly error?: unknown;
|
|
1724
|
-
readonly providerMetadata?: {
|
|
1725
|
-
readonly [x: string]: {
|
|
1726
|
-
readonly [x: string]: unknown;
|
|
1727
|
-
};
|
|
1728
|
-
} | undefined;
|
|
1729
1710
|
readonly namespace?: string | undefined;
|
|
1730
|
-
|
|
1731
|
-
readonly
|
|
1732
|
-
readonly media: import("./media.js").Asset;
|
|
1711
|
+
readonly message: string;
|
|
1712
|
+
readonly error?: unknown;
|
|
1733
1713
|
readonly providerMetadata?: {
|
|
1734
1714
|
readonly [x: string]: {
|
|
1735
1715
|
readonly [x: string]: unknown;
|
|
@@ -1737,33 +1717,41 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1737
1717
|
} | undefined;
|
|
1738
1718
|
} | {
|
|
1739
1719
|
readonly type: "step-finish";
|
|
1720
|
+
readonly index: number;
|
|
1740
1721
|
readonly reason: {
|
|
1741
|
-
readonly normalized: "
|
|
1722
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1742
1723
|
readonly raw?: string | undefined;
|
|
1743
1724
|
readonly category?: string | undefined;
|
|
1744
1725
|
readonly explanation?: string | undefined;
|
|
1745
1726
|
};
|
|
1746
|
-
readonly
|
|
1727
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1747
1728
|
readonly providerMetadata?: {
|
|
1748
1729
|
readonly [x: string]: {
|
|
1749
1730
|
readonly [x: string]: unknown;
|
|
1750
1731
|
};
|
|
1751
1732
|
} | undefined;
|
|
1752
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1753
1733
|
} | {
|
|
1754
1734
|
readonly type: "finish";
|
|
1755
1735
|
readonly reason: {
|
|
1756
|
-
readonly normalized: "
|
|
1736
|
+
readonly normalized: "content-filter" | "error" | "length" | "stop" | "tool-calls" | "unknown";
|
|
1757
1737
|
readonly raw?: string | undefined;
|
|
1758
1738
|
readonly category?: string | undefined;
|
|
1759
1739
|
readonly explanation?: string | undefined;
|
|
1760
1740
|
};
|
|
1741
|
+
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1742
|
+
readonly providerMetadata?: {
|
|
1743
|
+
readonly [x: string]: {
|
|
1744
|
+
readonly [x: string]: unknown;
|
|
1745
|
+
};
|
|
1746
|
+
} | undefined;
|
|
1747
|
+
} | {
|
|
1748
|
+
readonly type: "media";
|
|
1749
|
+
readonly media: import("./media.js").Asset;
|
|
1761
1750
|
readonly providerMetadata?: {
|
|
1762
1751
|
readonly [x: string]: {
|
|
1763
1752
|
readonly [x: string]: unknown;
|
|
1764
1753
|
};
|
|
1765
1754
|
} | undefined;
|
|
1766
|
-
readonly usage?: import("./schema/events.js").Usage | undefined;
|
|
1767
1755
|
} | {
|
|
1768
1756
|
readonly type: "provider-error";
|
|
1769
1757
|
readonly message: string;
|
|
@@ -1773,7 +1761,19 @@ export declare const hangAfter: (...events: readonly LLMEvent[]) => Stream.Strea
|
|
|
1773
1761
|
readonly [x: string]: unknown;
|
|
1774
1762
|
};
|
|
1775
1763
|
} | undefined;
|
|
1776
|
-
}
|
|
1764
|
+
} | ({
|
|
1765
|
+
readonly type: "compaction";
|
|
1766
|
+
readonly provider: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
1767
|
+
readonly id?: string | undefined;
|
|
1768
|
+
readonly encrypted?: string | undefined;
|
|
1769
|
+
readonly text?: string | null | undefined;
|
|
1770
|
+
} & ({
|
|
1771
|
+
readonly encrypted: string;
|
|
1772
|
+
readonly text?: never;
|
|
1773
|
+
} | {
|
|
1774
|
+
readonly text: string | null;
|
|
1775
|
+
readonly encrypted?: never;
|
|
1776
|
+
})), never, never>;
|
|
1777
1777
|
/** Provides one shared implementation under the normal client and test-control tags. */
|
|
1778
1778
|
export declare const testLayer: (options?: LayerOptions) => Layer.Layer<import("./route/client.js").LLMClientService | Test, never, never>;
|
|
1779
1779
|
/** @deprecated Use testLayer; retained for published callers of the legacy control interface. */
|