import type { ContentBlockParam, ToolUseBlock, Usage } from '@anthropic-ai/sdk/resources'; import type { ProviderEvent } from '../../provider.js'; import type { ToolResult } from '../shared/tool-result.js'; export type { ToolResult, RenderHints } from '../shared/tool-result.js'; export { MODEL_PRICING, deriveCallCostUsd } from './pricing.js'; export type { ModelPricing, CacheWriteSplit, AnthropicSpeed, SpeedPricingContext, } from './pricing.js'; export { toProviderUsage } from './usage.js'; export type { RunTurnInput, AnthropicClientLike, WireToolDef, AnthropicMessagesCreateParams, } from './request-types.js'; export type AuthMode = 'oauth' | 'api-key'; export interface ToolCall { id: string; name: string; input: unknown; signal: AbortSignal; } export type TranslateOutput = { kind: 'event'; event: ProviderEvent; } | { kind: 'turn-result'; result: TurnResult; }; export interface TranslateCtx { sessionId: string; } export interface TurnResult { stopReason: string | null; assistantBlocks: ContentBlockParam[]; toolUseBlocks: ToolUseBlock[]; usage: Usage | null; text: string; } export type ToolCategory = 'read' | 'write' | 'shell' | 'subagent' | 'skill' | 'dag' | 'mcp' | 'web' | 'browser' | 'planning' | 'schedule' | 'other'; export interface AnthropicToolDef { name: string; description?: string; input_schema: { type: 'object'; properties?: Record; required?: string[]; [k: string]: unknown; }; category?: ToolCategory; concurrencySafe?: boolean; riskClass?: 'safe' | 'caution' | 'destructive'; } export interface ToolDispatcher { execute(call: ToolCall): Promise; executeBatch?(calls: ToolCall[], onActivity?: (activeIds: readonly string[]) => void): Promise; setResolveBase?(cwd: string): void; setAllowAll?(allow: boolean): void; } export { sumProviderUsage } from '../../usage.js';