import { PrivacyConfig } from "../core/privacy.js"; import { AmplitudeLike, AmplitudeOrAI, AnthropicResponse, TrackFn } from "../types.js"; import { BaseAIProvider, ProviderCallOptions } from "./base.js"; //#region src/providers/anthropic.d.ts declare const ANTHROPIC_AVAILABLE: boolean; declare const _AnthropicModule: Record | null; interface AnthropicOptions { amplitude: AmplitudeOrAI; apiKey?: string; privacyConfig?: PrivacyConfig | null; propagateContext?: boolean; /** Pass the `@anthropic-ai/sdk` module directly to bypass `tryRequire` (required in bundler environments). */ anthropicModule?: unknown; /** * Existing `Anthropic` client to instrument instead of constructing a new one. * Its transport settings (baseURL, fetch, headers, proxy, timeouts) are kept. */ client?: unknown; } declare class Anthropic = Record> extends BaseAIProvider { private _client; readonly messages: WrappedMessages; private _propagateContext; constructor(options: AnthropicOptions); get client(): TClient; } declare class WrappedMessages { _original: Record; private _trackFn; private _amplitude; private _privacyConfig; private _propagateContext; constructor(client: unknown, trackFn: TrackFn, amplitude: AmplitudeLike, privacyConfig: PrivacyConfig | null, propagateContext: boolean); create(params: Record, options?: ProviderCallOptions, extraRequestOptions?: Record): Promise>; private _wrapStream; private _trackInputMessages; /** * Extract tool call events from Anthropic message arrays. * * Anthropic tool results appear as content blocks with type "tool_result" * inside role: "user" messages. We correlate tool_use_id with tool_use * blocks in the preceding assistant message to get tool names and inputs. */ private _extractToolCalls; } declare function extractAnthropicSystemPrompt(system: unknown): string | undefined; declare function extractAnthropicContent(content: Array> | undefined): { text: string; reasoning: string | undefined; toolCalls: Array>; }; //#endregion export { ANTHROPIC_AVAILABLE, Anthropic, AnthropicOptions, WrappedMessages, _AnthropicModule, extractAnthropicContent, extractAnthropicSystemPrompt }; //# sourceMappingURL=anthropic.d.ts.map