{"version":3,"sources":["../../src/tools/types.ts"],"names":[],"mappings":";AAoMO,IAAM,UAAA,GAAa;AAAA,EACxB,GAAA,EAAK,0BAAA;AAAA,EACL,WAAA,EAAa,8BAAA;AAAA,EACb,WAAA,EAAa,uBAAA;AAAA,EACb,cAAA,EAAgB;AAClB;AAOO,IAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU;AAAA,IACR,OAAA;AAAA,IAAS,OAAA;AAAA,IAAS,QAAA;AAAA,IAAU,OAAA;AAAA,IAAS,MAAA;AAAA,IAAQ,KAAA;AAAA,IAAO,SAAA;AAAA,IACpD,OAAA;AAAA,IAAS,SAAA;AAAA,IAAW,QAAA;AAAA,IAAU,MAAA;AAAA,IAAQ,MAAA;AAAA,IAAQ,MAAA;AAAA,IAAQ;AAAA,GACxD;AAAA,EACA,OAAA,EAAS;AAAA,IACP,MAAA;AAAA,IAAQ,UAAA;AAAA,IAAY,OAAA;AAAA,IAAS,MAAA;AAAA,IAAQ,QAAA;AAAA,IAAU,OAAA;AAAA,IAAS,OAAA;AAAA,IAAS;AAAA;AAErE;AAEO,IAAM,aAAa,CAAC,GAAG,OAAO,QAAA,EAAU,GAAG,OAAO,OAAO;AAKzD,IAAM,SAAA,GAAY;AAAA,EACvB,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,sBAAA;AAAA,EACA;AACF","file":"types.mjs","sourcesContent":["/**\r\n * Shared types for LangVoice tools\r\n */\r\n\r\n// ============================================\r\n// Common Types\r\n// ============================================\r\n\r\n/**\r\n * Base result interface for all tool operations\r\n */\r\nexport interface BaseToolResult {\r\n  success: boolean;\r\n  error?: string;\r\n}\r\n\r\n/**\r\n * Result from TTS generation tools\r\n */\r\nexport interface TTSResult extends BaseToolResult {\r\n  audioBase64?: string;\r\n  audioBuffer?: Buffer;\r\n  duration?: number;\r\n  generationTime?: number;\r\n  charactersProcessed?: number;\r\n}\r\n\r\n/**\r\n * Result from list voices tool\r\n */\r\nexport interface VoicesResult extends BaseToolResult {\r\n  voices?: VoiceInfo[];\r\n}\r\n\r\n/**\r\n * Result from list languages tool\r\n */\r\nexport interface LanguagesResult extends BaseToolResult {\r\n  languages?: LanguageInfo[];\r\n}\r\n\r\n/**\r\n * Voice information\r\n */\r\nexport interface VoiceInfo {\r\n  id: string;\r\n  name: string;\r\n  gender?: string;\r\n  language?: string;\r\n  description?: string;\r\n}\r\n\r\n/**\r\n * Language information\r\n */\r\nexport interface LanguageInfo {\r\n  id: string;\r\n  name: string;\r\n  voices?: string[];\r\n}\r\n\r\n// ============================================\r\n// Tool Input Types\r\n// ============================================\r\n\r\n/**\r\n * Input for text-to-speech generation\r\n */\r\nexport interface TTSInput {\r\n  text: string;\r\n  voice?: string;\r\n  language?: string;\r\n  speed?: number;\r\n}\r\n\r\n/**\r\n * Input for multi-voice generation\r\n */\r\nexport interface MultiVoiceInput {\r\n  text: string;\r\n  language?: string;\r\n  speed?: number;\r\n}\r\n\r\n// ============================================\r\n// Function Schema Types\r\n// ============================================\r\n\r\n/**\r\n * JSON Schema property definition\r\n */\r\nexport interface SchemaProperty {\r\n  type: string;\r\n  description?: string;\r\n  enum?: string[];\r\n  default?: unknown;\r\n  minimum?: number;\r\n  maximum?: number;\r\n}\r\n\r\n/**\r\n * Function parameters schema\r\n */\r\nexport interface FunctionParameters {\r\n  type: 'object';\r\n  properties: Record<string, SchemaProperty>;\r\n  required: string[];\r\n  [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * Function schema definition\r\n */\r\nexport interface FunctionSchema {\r\n  name: string;\r\n  description: string;\r\n  parameters: FunctionParameters;\r\n}\r\n\r\n/**\r\n * OpenAI tool definition format\r\n */\r\nexport interface OpenAIToolDefinition {\r\n  type: 'function';\r\n  function: FunctionSchema;\r\n}\r\n\r\n/**\r\n * OpenAI tool call format\r\n */\r\nexport interface OpenAIToolCall {\r\n  id: string;\r\n  type: 'function';\r\n  function: {\r\n    name: string;\r\n    arguments: string;\r\n  };\r\n}\r\n\r\n// ============================================\r\n// AutoGen Types\r\n// ============================================\r\n\r\n/**\r\n * AutoGen function definition\r\n */\r\nexport interface AutoGenFunctionDef {\r\n  name: string;\r\n  description: string;\r\n  parameters: FunctionParameters;\r\n}\r\n\r\n/**\r\n * AutoGen tool configuration\r\n */\r\nexport interface AutoGenToolConfig {\r\n  functions: AutoGenFunctionDef[];\r\n}\r\n\r\n/**\r\n * AutoGen function call\r\n */\r\nexport interface AutoGenFunctionCall {\r\n  name: string;\r\n  arguments: Record<string, unknown> | string;\r\n}\r\n\r\n// ============================================\r\n// LangChain Types\r\n// ============================================\r\n\r\n/**\r\n * LangChain tool input schema\r\n */\r\nexport interface LangChainInputSchema {\r\n  type: 'object';\r\n  properties: Record<string, SchemaProperty>;\r\n  required?: string[];\r\n}\r\n\r\n/**\r\n * LangChain tool metadata\r\n */\r\nexport interface LangChainToolMetadata {\r\n  name: string;\r\n  description: string;\r\n  schema?: LangChainInputSchema;\r\n}\r\n\r\n// ============================================\r\n// Constants\r\n// ============================================\r\n\r\n/**\r\n * Tool name constants\r\n */\r\nexport const TOOL_NAMES = {\r\n  TTS: 'langvoice_text_to_speech',\r\n  MULTI_VOICE: 'langvoice_multi_voice_speech',\r\n  LIST_VOICES: 'langvoice_list_voices',\r\n  LIST_LANGUAGES: 'langvoice_list_languages',\r\n} as const;\r\n\r\nexport type ToolName = (typeof TOOL_NAMES)[keyof typeof TOOL_NAMES];\r\n\r\n/**\r\n * Available voices\r\n */\r\nexport const VOICES = {\r\n  AMERICAN: [\r\n    'heart', 'bella', 'nicole', 'sarah', 'nova', 'sky', 'jessica',\r\n    'river', 'michael', 'fenrir', 'eric', 'liam', 'onyx', 'adam',\r\n  ],\r\n  BRITISH: [\r\n    'emma', 'isabella', 'alice', 'lily', 'george', 'fable', 'lewis', 'daniel',\r\n  ],\r\n} as const;\r\n\r\nexport const ALL_VOICES = [...VOICES.AMERICAN, ...VOICES.BRITISH] as const;\r\n\r\n/**\r\n * Supported languages\r\n */\r\nexport const LANGUAGES = [\r\n  'american_english',\r\n  'british_english',\r\n  'spanish',\r\n  'french',\r\n  'hindi',\r\n  'italian',\r\n  'japanese',\r\n  'brazilian_portuguese',\r\n  'mandarin_chinese',\r\n] as const;\r\n\r\nexport type VoiceId = (typeof ALL_VOICES)[number];\r\nexport type LanguageId = (typeof LANGUAGES)[number];\r\n"]}