@veryfront/ext-llm-anthropic 0.1.985
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +159 -0
- package/esm/_dnt.polyfills.d.ts +50 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +37 -0
- package/esm/_dnt.shims.d.ts +12 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +68 -0
- package/esm/anthropic-provider.d.ts +26 -0
- package/esm/anthropic-provider.d.ts.map +1 -0
- package/esm/anthropic-provider.js +206 -0
- package/esm/anthropic-request-builder.d.ts +98 -0
- package/esm/anthropic-request-builder.d.ts.map +1 -0
- package/esm/anthropic-request-builder.js +403 -0
- package/esm/anthropic-stream.d.ts +12 -0
- package/esm/anthropic-stream.d.ts.map +1 -0
- package/esm/anthropic-stream.js +413 -0
- package/esm/index.d.ts +13 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +34 -0
- package/esm/package.json +3 -0
- package/package.json +63 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { readProviderOptions, stringifyJsonValue, unwrapToolInputSchema, } from "veryfront/provider/shared";
|
|
2
|
+
function normalizeAnthropicToolChoice(toolChoice) {
|
|
3
|
+
if (typeof toolChoice === "string") {
|
|
4
|
+
return { type: toolChoice };
|
|
5
|
+
}
|
|
6
|
+
return toolChoice;
|
|
7
|
+
}
|
|
8
|
+
function toSnakeCaseRecord(record) {
|
|
9
|
+
return Object.fromEntries(Object.entries(record).map(([key, value]) => [
|
|
10
|
+
key.replace(/[A-Z]/g, (match) => `_${match.toLowerCase()}`),
|
|
11
|
+
value,
|
|
12
|
+
]));
|
|
13
|
+
}
|
|
14
|
+
function deepSnakeCase(value) {
|
|
15
|
+
if (Array.isArray(value)) {
|
|
16
|
+
return value.map(deepSnakeCase);
|
|
17
|
+
}
|
|
18
|
+
if (value !== null && typeof value === "object") {
|
|
19
|
+
return Object.fromEntries(Object.entries(value).map(([key, v]) => [
|
|
20
|
+
key.replace(/[A-Z]/g, (match) => `_${match.toLowerCase()}`),
|
|
21
|
+
deepSnakeCase(v),
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
function pushAnthropicUserContent(messages, content) {
|
|
27
|
+
if (content.length === 0) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const lastMessage = messages.at(-1);
|
|
31
|
+
if (lastMessage?.role === "user") {
|
|
32
|
+
lastMessage.content.push(...content);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
messages.push({
|
|
36
|
+
role: "user",
|
|
37
|
+
content,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function toAnthropicUserContent(parts) {
|
|
41
|
+
const content = [];
|
|
42
|
+
for (const part of parts) {
|
|
43
|
+
if (part.type === "text") {
|
|
44
|
+
if (part.text.length > 0) {
|
|
45
|
+
content.push({ type: "text", text: part.text });
|
|
46
|
+
}
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
if (part.type === "image" || part.mediaType.startsWith("image/")) {
|
|
50
|
+
content.push({
|
|
51
|
+
type: "image",
|
|
52
|
+
source: {
|
|
53
|
+
type: "url",
|
|
54
|
+
url: part.url,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return content;
|
|
60
|
+
}
|
|
61
|
+
function resolveAnthropicCacheControlBlock(ttl) {
|
|
62
|
+
if (ttl === undefined || ttl === false) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
if (ttl === "1h") {
|
|
66
|
+
return { type: "ephemeral", ttl: "1h" };
|
|
67
|
+
}
|
|
68
|
+
return { type: "ephemeral" };
|
|
69
|
+
}
|
|
70
|
+
function toAnthropicMessages(prompt, systemCacheControl) {
|
|
71
|
+
const systemParts = [];
|
|
72
|
+
const messages = [];
|
|
73
|
+
const lastUserIndex = prompt.findLastIndex((message) => message.role === "user");
|
|
74
|
+
const lastHistoricalAssistantTextIndex = prompt.findLastIndex((message, index) => index < lastUserIndex &&
|
|
75
|
+
message.role === "assistant" &&
|
|
76
|
+
message.content.some((part) => part.type === "text" && part.text.length > 0));
|
|
77
|
+
let skippingHistoricalToolResults = false;
|
|
78
|
+
let pendingToolUseIds = new Set();
|
|
79
|
+
for (const [index, message] of prompt.entries()) {
|
|
80
|
+
switch (message.role) {
|
|
81
|
+
case "system":
|
|
82
|
+
skippingHistoricalToolResults = false;
|
|
83
|
+
pendingToolUseIds = new Set();
|
|
84
|
+
if (message.content.length > 0) {
|
|
85
|
+
systemParts.push(message.content);
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
case "user":
|
|
89
|
+
skippingHistoricalToolResults = false;
|
|
90
|
+
pendingToolUseIds = new Set();
|
|
91
|
+
pushAnthropicUserContent(messages, toAnthropicUserContent(message.content));
|
|
92
|
+
break;
|
|
93
|
+
case "assistant": {
|
|
94
|
+
skippingHistoricalToolResults = false;
|
|
95
|
+
const shouldCompactCompletedToolRound = index < lastHistoricalAssistantTextIndex &&
|
|
96
|
+
message.content.some((part) => part.type === "tool-call");
|
|
97
|
+
const assistantContent = shouldCompactCompletedToolRound
|
|
98
|
+
? message.content.filter((part) => part.type === "text" && part.text.length > 0)
|
|
99
|
+
: message.content;
|
|
100
|
+
if (assistantContent.length === 0) {
|
|
101
|
+
skippingHistoricalToolResults = shouldCompactCompletedToolRound;
|
|
102
|
+
pendingToolUseIds = new Set();
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
pendingToolUseIds = new Set(assistantContent.flatMap((part) => part.type === "tool-call" ? [part.toolCallId] : []));
|
|
106
|
+
messages.push({
|
|
107
|
+
role: "assistant",
|
|
108
|
+
content: assistantContent.map((part) => {
|
|
109
|
+
if (part.type === "text") {
|
|
110
|
+
return { type: "text", text: part.text };
|
|
111
|
+
}
|
|
112
|
+
if (part.type === "reasoning") {
|
|
113
|
+
if (typeof part.redactedData === "string") {
|
|
114
|
+
return {
|
|
115
|
+
type: "redacted_thinking",
|
|
116
|
+
data: part.redactedData,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
type: "thinking",
|
|
121
|
+
thinking: part.text ?? "",
|
|
122
|
+
...(typeof part.signature === "string" ? { signature: part.signature } : {}),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
type: "tool_use",
|
|
127
|
+
id: part.toolCallId,
|
|
128
|
+
name: part.toolName,
|
|
129
|
+
input: part.input,
|
|
130
|
+
};
|
|
131
|
+
}),
|
|
132
|
+
});
|
|
133
|
+
skippingHistoricalToolResults = shouldCompactCompletedToolRound;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
case "tool": {
|
|
137
|
+
if (skippingHistoricalToolResults) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
const matchingToolResults = message.content.filter((part) => pendingToolUseIds.has(part.toolCallId));
|
|
141
|
+
if (matchingToolResults.length === 0) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
pushAnthropicUserContent(messages, matchingToolResults.map((part) => ({
|
|
145
|
+
type: "tool_result",
|
|
146
|
+
tool_use_id: part.toolCallId,
|
|
147
|
+
content: stringifyJsonValue(part.output.value),
|
|
148
|
+
})));
|
|
149
|
+
for (const part of matchingToolResults) {
|
|
150
|
+
pendingToolUseIds.delete(part.toolCallId);
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (systemParts.length === 0) {
|
|
157
|
+
return { messages };
|
|
158
|
+
}
|
|
159
|
+
const joined = systemParts.join("\n\n");
|
|
160
|
+
if (systemCacheControl) {
|
|
161
|
+
return {
|
|
162
|
+
system: [{
|
|
163
|
+
type: "text",
|
|
164
|
+
text: joined,
|
|
165
|
+
cache_control: systemCacheControl,
|
|
166
|
+
}],
|
|
167
|
+
messages,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return { system: joined, messages };
|
|
171
|
+
}
|
|
172
|
+
const ANTHROPIC_TOOL_VERSION_ALIASES = {
|
|
173
|
+
code_execution: "code_execution_20260120",
|
|
174
|
+
computer_use: "computer_20250124",
|
|
175
|
+
computer: "computer_20250124",
|
|
176
|
+
text_editor: "text_editor_20250728",
|
|
177
|
+
bash: "bash_20250124",
|
|
178
|
+
memory: "memory_20250818",
|
|
179
|
+
web_search: "web_search_20250305",
|
|
180
|
+
web_fetch: "web_fetch_20250910",
|
|
181
|
+
};
|
|
182
|
+
function resolveAnthropicProviderType(rawType) {
|
|
183
|
+
if (/_\d{8}$/.test(rawType)) {
|
|
184
|
+
return rawType;
|
|
185
|
+
}
|
|
186
|
+
return ANTHROPIC_TOOL_VERSION_ALIASES[rawType] ?? rawType;
|
|
187
|
+
}
|
|
188
|
+
function toAnthropicTools(tools, toolsCacheControl) {
|
|
189
|
+
if (!tools) {
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
const normalized = [];
|
|
193
|
+
for (const tool of tools) {
|
|
194
|
+
if (tool.type === "function") {
|
|
195
|
+
normalized.push({
|
|
196
|
+
name: tool.name,
|
|
197
|
+
...(typeof tool.description === "string" ? { description: tool.description } : {}),
|
|
198
|
+
input_schema: unwrapToolInputSchema(tool.inputSchema),
|
|
199
|
+
});
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (!tool.id.startsWith("anthropic.")) {
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
const rawType = tool.id.slice("anthropic.".length);
|
|
206
|
+
if (rawType.length === 0) {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
normalized.push({
|
|
210
|
+
type: resolveAnthropicProviderType(rawType),
|
|
211
|
+
name: tool.name,
|
|
212
|
+
...toSnakeCaseRecord(tool.args),
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (normalized.length === 0) {
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
if (toolsCacheControl) {
|
|
219
|
+
const lastIndex = normalized.length - 1;
|
|
220
|
+
normalized[lastIndex] = {
|
|
221
|
+
...normalized[lastIndex],
|
|
222
|
+
cache_control: toolsCacheControl,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
return normalized;
|
|
226
|
+
}
|
|
227
|
+
function getAnthropicModelCapabilities(modelId) {
|
|
228
|
+
if (modelId.includes("claude-opus-4-6")) {
|
|
229
|
+
return { maxOutputTokens: 128_000, isKnownModel: true };
|
|
230
|
+
}
|
|
231
|
+
if (modelId.includes("claude-sonnet-4-6")) {
|
|
232
|
+
return { maxOutputTokens: 64_000, isKnownModel: true };
|
|
233
|
+
}
|
|
234
|
+
if (modelId.includes("claude-sonnet-4-5") ||
|
|
235
|
+
modelId.includes("claude-opus-4-5") ||
|
|
236
|
+
modelId.includes("claude-haiku-4-5")) {
|
|
237
|
+
return { maxOutputTokens: 64_000, isKnownModel: true };
|
|
238
|
+
}
|
|
239
|
+
if (modelId.includes("claude-opus-4-1")) {
|
|
240
|
+
return { maxOutputTokens: 32_000, isKnownModel: true };
|
|
241
|
+
}
|
|
242
|
+
if (modelId.includes("claude-sonnet-4-")) {
|
|
243
|
+
return { maxOutputTokens: 64_000, isKnownModel: true };
|
|
244
|
+
}
|
|
245
|
+
if (modelId.includes("claude-opus-4-")) {
|
|
246
|
+
return { maxOutputTokens: 32_000, isKnownModel: true };
|
|
247
|
+
}
|
|
248
|
+
if (modelId.includes("claude-3-haiku")) {
|
|
249
|
+
return { maxOutputTokens: 4096, isKnownModel: true };
|
|
250
|
+
}
|
|
251
|
+
return { maxOutputTokens: 4096, isKnownModel: false };
|
|
252
|
+
}
|
|
253
|
+
function resolveAnthropicMaxTokens(modelId, callerMaxOutputTokens) {
|
|
254
|
+
const { maxOutputTokens: modelMax, isKnownModel } = getAnthropicModelCapabilities(modelId);
|
|
255
|
+
const requested = callerMaxOutputTokens ?? modelMax;
|
|
256
|
+
if (isKnownModel && requested > modelMax) {
|
|
257
|
+
return modelMax;
|
|
258
|
+
}
|
|
259
|
+
return requested;
|
|
260
|
+
}
|
|
261
|
+
function resolveAnthropicThinkingBudget(option) {
|
|
262
|
+
if (!option || option.enabled !== true) {
|
|
263
|
+
return undefined;
|
|
264
|
+
}
|
|
265
|
+
if (typeof option.budgetTokens === "number" && option.budgetTokens >= 1024) {
|
|
266
|
+
return option.budgetTokens;
|
|
267
|
+
}
|
|
268
|
+
switch (option.effort) {
|
|
269
|
+
case "low":
|
|
270
|
+
return 1024;
|
|
271
|
+
case "high":
|
|
272
|
+
return 16_384;
|
|
273
|
+
case "max":
|
|
274
|
+
return 32_768;
|
|
275
|
+
case "medium":
|
|
276
|
+
default:
|
|
277
|
+
return 4096;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function resolveAnthropicProviderThinkingBudget(options) {
|
|
281
|
+
const thinking = options.thinking;
|
|
282
|
+
if (thinking === null || typeof thinking !== "object" || Array.isArray(thinking)) {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
const record = thinking;
|
|
286
|
+
if (record.type !== "enabled") {
|
|
287
|
+
return undefined;
|
|
288
|
+
}
|
|
289
|
+
const budgetTokens = record.budget_tokens;
|
|
290
|
+
if (typeof budgetTokens === "number" && Number.isFinite(budgetTokens) && budgetTokens >= 1024) {
|
|
291
|
+
return budgetTokens;
|
|
292
|
+
}
|
|
293
|
+
return undefined;
|
|
294
|
+
}
|
|
295
|
+
export function buildAnthropicMessagesRequest(modelId, providerName, options, stream, warnings) {
|
|
296
|
+
const systemCacheControl = resolveAnthropicCacheControlBlock(options.cacheControl?.system);
|
|
297
|
+
const toolsCacheControl = resolveAnthropicCacheControlBlock(options.cacheControl?.tools);
|
|
298
|
+
const { system, messages } = toAnthropicMessages(options.prompt, systemCacheControl);
|
|
299
|
+
const anthropicTools = toAnthropicTools(options.tools, toolsCacheControl);
|
|
300
|
+
const rawProviderOptions = readProviderOptions(options.providerOptions, "anthropic", providerName);
|
|
301
|
+
const thinkingBudget = resolveAnthropicThinkingBudget(options.reasoning);
|
|
302
|
+
const providerThinkingBudget = resolveAnthropicProviderThinkingBudget(rawProviderOptions);
|
|
303
|
+
const effectiveThinkingBudget = thinkingBudget ?? providerThinkingBudget;
|
|
304
|
+
const thinkingEnabled = effectiveThinkingBudget !== undefined;
|
|
305
|
+
if (options.presencePenalty !== undefined) {
|
|
306
|
+
warnings.push({
|
|
307
|
+
type: "unsupported-setting",
|
|
308
|
+
provider: "anthropic",
|
|
309
|
+
setting: "presencePenalty",
|
|
310
|
+
details: "Anthropic Messages API has no equivalent and the value was dropped.",
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
if (options.frequencyPenalty !== undefined) {
|
|
314
|
+
warnings.push({
|
|
315
|
+
type: "unsupported-setting",
|
|
316
|
+
provider: "anthropic",
|
|
317
|
+
setting: "frequencyPenalty",
|
|
318
|
+
details: "Anthropic Messages API has no equivalent and the value was dropped.",
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
if (options.seed !== undefined) {
|
|
322
|
+
warnings.push({
|
|
323
|
+
type: "unsupported-setting",
|
|
324
|
+
provider: "anthropic",
|
|
325
|
+
setting: "seed",
|
|
326
|
+
details: "Anthropic Messages API does not support deterministic seeding.",
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (options.topK !== undefined) {
|
|
330
|
+
warnings.push({
|
|
331
|
+
type: "unsupported-setting",
|
|
332
|
+
provider: "anthropic",
|
|
333
|
+
setting: "topK",
|
|
334
|
+
details: "Anthropic Messages API does not expose top_k on this surface.",
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
if (options.stopSequences && options.stopSequences.length > 4) {
|
|
338
|
+
warnings.push({
|
|
339
|
+
type: "unsupported-setting",
|
|
340
|
+
provider: "anthropic",
|
|
341
|
+
setting: "stopSequences",
|
|
342
|
+
details: `Anthropic accepts at most 4 stop sequences; ${options.stopSequences.length} were provided and the extras were truncated.`,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
if (thinkingEnabled && options.temperature !== undefined) {
|
|
346
|
+
warnings.push({
|
|
347
|
+
type: "unsupported-setting",
|
|
348
|
+
provider: "anthropic",
|
|
349
|
+
setting: "temperature",
|
|
350
|
+
details: "Dropped because Anthropic rejects sampling params when extended thinking is enabled.",
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
if (thinkingEnabled && options.topP !== undefined) {
|
|
354
|
+
warnings.push({
|
|
355
|
+
type: "unsupported-setting",
|
|
356
|
+
provider: "anthropic",
|
|
357
|
+
setting: "topP",
|
|
358
|
+
details: "Dropped because Anthropic rejects sampling params when extended thinking is enabled.",
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
if (options.responseFormat && options.responseFormat.type !== "text") {
|
|
362
|
+
warnings.push({
|
|
363
|
+
type: "unsupported-setting",
|
|
364
|
+
provider: "anthropic",
|
|
365
|
+
setting: "responseFormat",
|
|
366
|
+
details: "Anthropic Messages API does not have a structured-output response_format equivalent. Use a tool with the schema as input_schema instead.",
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
const baseMaxTokens = resolveAnthropicMaxTokens(modelId, options.maxOutputTokens);
|
|
370
|
+
const maxTokens = thinkingEnabled
|
|
371
|
+
? Math.min(baseMaxTokens + (effectiveThinkingBudget ?? 0), getAnthropicModelCapabilities(modelId).maxOutputTokens)
|
|
372
|
+
: baseMaxTokens;
|
|
373
|
+
const body = {
|
|
374
|
+
model: modelId,
|
|
375
|
+
messages,
|
|
376
|
+
max_tokens: maxTokens,
|
|
377
|
+
...(stream ? { stream: true } : {}),
|
|
378
|
+
...(system ? { system } : {}),
|
|
379
|
+
...(!thinkingEnabled && options.temperature !== undefined
|
|
380
|
+
? { temperature: options.temperature }
|
|
381
|
+
: {}),
|
|
382
|
+
...(!thinkingEnabled && options.topP !== undefined ? { top_p: options.topP } : {}),
|
|
383
|
+
...(options.stopSequences && options.stopSequences.length > 0
|
|
384
|
+
? { stop_sequences: options.stopSequences.slice(0, 4) }
|
|
385
|
+
: {}),
|
|
386
|
+
...(anthropicTools ? { tools: anthropicTools } : {}),
|
|
387
|
+
...(options.toolChoice !== undefined
|
|
388
|
+
? { tool_choice: normalizeAnthropicToolChoice(options.toolChoice) }
|
|
389
|
+
: {}),
|
|
390
|
+
...(thinkingBudget !== undefined
|
|
391
|
+
? { thinking: { type: "enabled", budget_tokens: thinkingBudget } }
|
|
392
|
+
: {}),
|
|
393
|
+
...(typeof options.userId === "string" && options.userId.length > 0
|
|
394
|
+
? { metadata: { user_id: options.userId } }
|
|
395
|
+
: {}),
|
|
396
|
+
...(options.mcpServers && options.mcpServers.length > 0
|
|
397
|
+
? { mcp_servers: deepSnakeCase(options.mcpServers) }
|
|
398
|
+
: {}),
|
|
399
|
+
...(options.anthropicContainer !== undefined ? { container: options.anthropicContainer } : {}),
|
|
400
|
+
};
|
|
401
|
+
Object.assign(body, rawProviderOptions);
|
|
402
|
+
return body;
|
|
403
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RuntimeUsage } from "veryfront/provider/shared";
|
|
2
|
+
type AnthropicStreamOptions = {
|
|
3
|
+
clientToolUseTrailingUsageGraceMs?: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function normalizeAnthropicFinishReason(raw: unknown): string | {
|
|
6
|
+
unified: string;
|
|
7
|
+
raw: string;
|
|
8
|
+
} | null;
|
|
9
|
+
export declare function extractAnthropicUsage(payload: unknown): RuntimeUsage | undefined;
|
|
10
|
+
export declare function streamAnthropicCompatibleParts(stream: ReadableStream<Uint8Array>, options?: AnthropicStreamOptions): AsyncIterable<unknown>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=anthropic-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic-stream.d.ts","sourceRoot":"","sources":["../src/anthropic-stream.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgB9D,KAAK,sBAAsB,GAAG;IAC5B,iCAAiC,CAAC,EAAE,MAAM,CAAC;CAC5C,CAAC;AAmBF,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,OAAO,GACX,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBlD;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CA+DhF;AAqED,wBAAuB,8BAA8B,CACnD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,GAAE,sBAA2B,GACnC,aAAa,CAAC,OAAO,CAAC,CAoUxB"}
|