fmp-ai-tools 0.0.5 → 0.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/openai-tool-wrapper.ts","../../../src/types.ts","../../../src/providers/openai/company.ts","../../../src/providers/openai/calendar.ts","../../../src/providers/openai/economic.ts","../../../src/providers/openai/etf.ts","../../../src/providers/openai/financial.ts","../../../src/providers/openai/insider.ts","../../../src/providers/openai/institutional.ts","../../../src/providers/openai/market.ts","../../../src/providers/openai/quote.ts","../../../src/providers/openai/senate-house.ts","../../../src/providers/openai/stock.ts","../../../src/providers/openai/index.ts"],"names":["z","tool","FMP","symbolInputSchema"],"mappings":";;;;;;;AAUO,SAAS,iBAAsC,MAAA,EAA6B;AACjF,EAAA,MAAM,EAAE,IAAA,EAAM,WAAA,EAAa,WAAA,EAAa,SAAQ,GAAI,MAAA;AAEpD,EAAA,MAAM,aAAkC,EAAC;AACzC,EAAA,MAAM,WAAqB,EAAC;AAG5B,EAAA,IAAI,WAAA,YAAuBA,MAAE,SAAA,EAAW;AACtC,IAAA,MAAM,QAAQ,WAAA,CAAY,KAAA;AAC1B,IAAA,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAC,GAAA,EAAK,MAAM,CAAA,KAAM;AAC/C,MAAA,IAAI,UAAA,GAAa,IAAA;AACjB,MAAA,IAAI,YAAA,GAA0B,MAAA;AAC9B,MAAA,IAAI,gBAAA,GAAmB,EAAA;AAGvB,MAAA,IAAI,MAAA,IAAU,OAAO,MAAA,KAAW,QAAA,IAAY,iBAAiB,MAAA,EAAQ;AACnE,QAAA,MAAM,OAAQ,MAAA,CAAe,WAAA;AAC7B,QAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,UAAA,gBAAA,GAAmB,IAAA;AAAA;AACrB;AAIF,MAAA,IAAI,MAAA,YAAkBA,MAAE,WAAA,EA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,QAAA,GAAmB;AAAA,EAC9B,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,mBAAA;AAAA,EACA,gBAAA;AAAA,EACA,qBAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oBAAA;AAAA,EACA,oBAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,uBAAA;AAAA,EACA,sBAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport { tool } from '@openai/agents';\n\nexport interface OpenAIToolConfig<T extends z.ZodType> {\n name: string;\n description: string;\n inputSchema: T;\n execute: (args: z.infer<T>) => Promise<string>;\n}\n\nexport function createOpenAITool<T extends z.ZodType>(config: OpenAIToolConfig<T>) {\n const { name, description, inputSchema, execute } = config;\n\n const properties: Record<string, any> = {};\n const required: string[] = [];\n\n // Extract properties from Zod schema using type guards\n if (inputSchema instanceof z.ZodObject) {\n const shape = inputSchema.shape;\n Object.entries(shape).forEach(([key, schema]) => {\n let isRequired = true;\n let actualSchema: z.ZodType = schema as z.ZodType;\n let fieldDescription = '';\n\n // Extract description from the original schema\n if (schema && typeof schema === 'object' && 'description' in schema) {\n const desc = (schema as any).description;\n if (typeof desc === 'string') {\n fieldDescription = desc;\n }\n }\n\n // Handle optional fields\n if (schema instanceof z.ZodOptional) {\n isRequired = false;\n actualSchema = schema.unwrap();\n // If no description was found on the optional wrapper, try the unwrapped schema\n if (!fieldDescription && actualSchema.description) {\n fieldDescription = actualSchema.description;\n }\n }\n\n // Handle default values (they make fields optional)\n if (schema instanceof z.ZodDefault) {\n isRequired = false;\n actualSchema = schema.removeDefault();\n // If no description was found on the default wrapper, try the unwrapped schema\n if (!fieldDescription && actualSchema.description) {\n fieldDescription = actualSchema.description;\n }\n }\n\n // Map Zod types to OpenAI parameter types\n if (actualSchema instanceof z.ZodString) {\n properties[key] = {\n type: 'string',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodEnum) {\n properties[key] = {\n type: 'string',\n enum: actualSchema._def.values,\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodNumber) {\n properties[key] = {\n type: 'number',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodBoolean) {\n properties[key] = {\n type: 'boolean',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodArray) {\n properties[key] = {\n type: 'array',\n items: { type: 'string' }, // Default to string array, can be enhanced\n description: fieldDescription || `${key} parameter`,\n };\n } else {\n // Fallback for unknown types\n properties[key] = {\n type: 'string',\n description: fieldDescription || `${key} parameter`,\n };\n }\n\n if (isRequired) {\n required.push(key);\n }\n });\n }\n\n return tool({\n name,\n description,\n parameters: {\n type: 'object',\n properties,\n required,\n additionalProperties: false,\n },\n strict: false,\n execute: async (input: unknown) => {\n try {\n const validatedInput = inputSchema.parse(input);\n return await execute(validatedInput);\n } catch (error) {\n if (error instanceof z.ZodError) {\n return `Invalid input: ${error.errors.map(e => e.message).join(', ')}`;\n }\n return `Error executing ${name}: ${error instanceof Error ? error.message : String(error)}`;\n }\n },\n } as any);\n}\n","/**\n * Tool interface that matches the ai library's expected format\n * This is what the ai library produces when using their tool() function\n */\nexport interface Tool {\n type: 'function';\n function: {\n name: string;\n description: string;\n parameters: {\n type: 'object';\n properties: Record<string, any>;\n required: string[];\n };\n };\n execute: (args: any) => Promise<string>;\n}\n\n/**\n * Internal FMP API client instance\n * Used internally by the tools, not exported publicly\n */\nimport { FMP } from 'fmp-node-api';\n\n// Create a function to get the FMP client instance (internal use only)\nexport function getFMPClient() {\n return new FMP();\n}\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\nexport const getCompanyProfile = createOpenAITool({\n name: 'getCompanyProfile',\n description: 'Get the company profile for a company',\n inputSchema: z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n }),\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const companyProfile = await fmp.company.getCompanyProfile(symbol);\n return JSON.stringify(companyProfile.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Common input schema for calendar date range\nconst calendarInputSchema = z.object({\n from: z.string().optional().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\nexport const getEarningsCalendar = createOpenAITool({\n name: 'getEarningsCalendar',\n description: 'Get earnings calendar showing upcoming and recent earnings announcements',\n inputSchema: calendarInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const earningsCalendar = await fmp.calendar.getEarningsCalendar({ from, to });\n return JSON.stringify(earningsCalendar.data, null, 2);\n },\n});\n\nexport const getEconomicCalendar = createOpenAITool({\n name: 'getEconomicCalendar',\n description: 'Get economic calendar showing upcoming and recent economic events and indicators',\n inputSchema: calendarInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const economicCalendar = await fmp.calendar.getEconomicsCalendar({ from, to });\n return JSON.stringify(economicCalendar.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for treasury rates with date range\nconst treasuryRatesInputSchema = z.object({\n from: z.string().optional().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\n// Economic indicators enum and schema\nconst economicIndicatorNames = [\n 'GDP',\n 'realGDP',\n 'nominalPotentialGDP',\n 'realGDPPerCapita',\n 'federalFunds',\n 'CPI',\n 'inflationRate',\n 'inflation',\n 'retailSales',\n 'consumerSentiment',\n 'durableGoods',\n 'unemploymentRate',\n 'totalNonfarmPayroll',\n 'initialClaims',\n 'industrialProductionTotalIndex',\n 'newPrivatelyOwnedHousingUnitsStartedTotalUnits',\n 'totalVehicleSales',\n 'retailMoneyFunds',\n 'smoothedUSRecessionProbabilities',\n '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit',\n 'commercialBankInterestRateOnCreditCardPlansAllAccounts',\n '30YearFixedRateMortgageAverage',\n '15YearFixedRateMortgageAverage',\n] as const;\n\nconst economicIndicatorsInputSchema = z.object({\n name: z.enum(economicIndicatorNames).describe('The name of the economic indicator'),\n from: z.string().optional().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\nexport const getTreasuryRates = createOpenAITool({\n name: 'getTreasuryRates',\n description: 'Get treasury rates for different maturities over time',\n inputSchema: treasuryRatesInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const treasuryRates = await fmp.economic.getTreasuryRates({ from, to });\n return JSON.stringify(treasuryRates.data, null, 2);\n },\n});\n\nexport const getEconomicIndicators = createOpenAITool({\n name: 'getEconomicIndicators',\n description: 'Get economic indicators like GDP, unemployment rate, inflation, etc.',\n inputSchema: economicIndicatorsInputSchema,\n execute: async ({ name, from, to }) => {\n const fmp = getFMPClient();\n const economicIndicators = await fmp.economic.getEconomicIndicators({ name, from, to });\n return JSON.stringify(economicIndicators.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for ETF holdings with optional date\nconst etfHoldingsInputSchema = z.object({\n symbol: z.string().min(1, 'ETF symbol is required').describe('ETF symbol (e.g., SPY, QQQ, VTI)'),\n date: z.string().optional().describe('Date for holdings in YYYY-MM-DD format (optional)'),\n});\n\n// Input schema for ETF profile\nconst etfProfileInputSchema = z.object({\n symbol: z.string().min(1, 'ETF symbol is required').describe('ETF symbol (e.g., SPY, QQQ, VTI)'),\n});\n\nexport const getETFHoldings = createOpenAITool({\n name: 'getETFHoldings',\n description:\n 'Get ETF holdings for a specific ETF symbol, showing the underlying assets and their weights',\n inputSchema: etfHoldingsInputSchema,\n execute: async ({ symbol, date }) => {\n const fmp = getFMPClient();\n const params: any = { symbol };\n if (date) {\n params.date = date;\n }\n\n const etfHoldings = await fmp.etf.getHoldings(params);\n return JSON.stringify(etfHoldings.data, null, 2);\n },\n});\n\nexport const getETFProfile = createOpenAITool({\n name: 'getETFProfile',\n description: 'Get ETF profile information including fund details, expense ratio, and key metrics',\n inputSchema: etfProfileInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const etfProfile = await fmp.etf.getProfile(symbol);\n return JSON.stringify(etfProfile.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Common input schema for financial statements with symbol and period\nconst financialStatementInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n period: z\n .enum(['annual', 'quarter'])\n .default('annual')\n .describe('The period type (annual or quarter)'),\n});\n\nexport const getBalanceSheet = createOpenAITool({\n name: 'getBalanceSheet',\n description: 'Get balance sheet for a company showing assets, liabilities, and equity',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const balanceSheet = await fmp.financial.getBalanceSheet({ symbol, period });\n return JSON.stringify(balanceSheet.data, null, 2);\n },\n});\n\nexport const getIncomeStatement = createOpenAITool({\n name: 'getIncomeStatement',\n description: 'Get income statement for a company showing revenue, expenses, and profit',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const incomeStatement = await fmp.financial.getIncomeStatement({ symbol, period });\n return JSON.stringify(incomeStatement.data, null, 2);\n },\n});\n\nexport const getCashFlowStatement = createOpenAITool({\n name: 'getCashFlowStatement',\n description:\n 'Get cash flow statement for a company showing operating, investing, and financing cash flows',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const cashFlowStatement = await fmp.financial.getCashFlowStatement({ symbol, period });\n return JSON.stringify(cashFlowStatement.data, null, 2);\n },\n});\n\nexport const getFinancialRatios = createOpenAITool({\n name: 'getFinancialRatios',\n description:\n 'Get financial ratios for a company including profitability, liquidity, and efficiency metrics',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const financialRatios = await fmp.financial.getFinancialRatios({ symbol, period });\n return JSON.stringify(financialRatios.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for insider trading with symbol and optional page\nconst insiderTradingInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n page: z\n .number()\n .int()\n .min(0)\n .default(0)\n .describe('Page number for pagination (optional, defaults to 0)'),\n});\n\nexport const getInsiderTrading = createOpenAITool({\n name: 'getInsiderTrading',\n description:\n 'Get insider trading data for a specific stock symbol showing buy/sell transactions by company insiders',\n inputSchema: insiderTradingInputSchema,\n execute: async ({ symbol, page }) => {\n const fmp = getFMPClient();\n const insiderTrading = await fmp.insider.getInsiderTradesBySymbol(symbol, page);\n return JSON.stringify(insiderTrading.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for institutional holders with symbol\nconst institutionalHoldersInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\nexport const getInstitutionalHolders = createOpenAITool({\n name: 'getInstitutionalHolders',\n description:\n 'Get institutional holders for a specific stock symbol showing which institutions own shares and their holdings',\n inputSchema: institutionalHoldersInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const institutionalHolders = await fmp.institutional.getInstitutionalHolders({ symbol });\n\n // Return formatted JSON string\n return JSON.stringify(institutionalHolders.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Empty schema for tools that don't require parameters\nconst emptyInputSchema = z.object({});\n\nexport const getMarketPerformance = createOpenAITool({\n name: 'getMarketPerformance',\n description: 'Get overall market performance data including major indices performance',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const marketPerformance = await fmp.market.getMarketPerformance();\n return JSON.stringify(marketPerformance.data, null, 2);\n },\n});\n\nexport const getSectorPerformance = createOpenAITool({\n name: 'getSectorPerformance',\n description: 'Get sector performance data showing how different market sectors are performing',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const sectorPerformance = await fmp.market.getSectorPerformance();\n return JSON.stringify(sectorPerformance.data, null, 2);\n },\n});\n\nexport const getGainers = createOpenAITool({\n name: 'getGainers',\n description: 'Get top gaining stocks showing the best performing stocks of the day',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const gainers = await fmp.market.getGainers();\n return JSON.stringify(gainers.data, null, 2);\n },\n});\n\nexport const getLosers = createOpenAITool({\n name: 'getLosers',\n description: 'Get top losing stocks showing the worst performing stocks of the day',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const losers = await fmp.market.getLosers();\n return JSON.stringify(losers.data, null, 2);\n },\n});\n\nexport const getMostActive = createOpenAITool({\n name: 'getMostActive',\n description: 'Get most active stocks showing stocks with the highest trading volume',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const mostActive = await fmp.market.getMostActive();\n return JSON.stringify(mostActive.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for stock quote with symbol\nconst stockQuoteInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The symbol of the company to get the stock quote for'),\n});\n\nexport const getStockQuote = createOpenAITool({\n name: 'getStockQuote',\n description:\n 'Get the real-time stock quote for a company including price, volume, and market data',\n inputSchema: stockQuoteInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const stockQuote = await fmp.quote.getQuote(symbol);\n return JSON.stringify(stockQuote.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for symbol-based trading data\nconst symbolInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\n// Input schema for name-based trading data\nconst nameInputSchema = z.object({\n name: z.string().min(1, 'Name is required').describe('The name of the senator or representative'),\n});\n\n// Input schema for RSS feed with pagination\nconst rssFeedInputSchema = z.object({\n page: z\n .number()\n .int()\n .min(0)\n .default(0)\n .describe('Page number for pagination (optional, defaults to 0)'),\n});\n\nexport const getSenateTrading = createOpenAITool({\n name: 'getSenateTrading',\n description: 'Get senate trading data for a specific stock symbol showing senator transactions',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const senateTrading = await fmp.senateHouse.getSenateTrading({ symbol });\n return JSON.stringify(senateTrading.data, null, 2);\n },\n});\n\nexport const getHouseTrading = createOpenAITool({\n name: 'getHouseTrading',\n description:\n 'Get house trading data for a specific stock symbol showing representative transactions',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const houseTrading = await fmp.senateHouse.getHouseTrading({ symbol });\n return JSON.stringify(houseTrading.data, null, 2);\n },\n});\n\nexport const getSenateTradingByName = createOpenAITool({\n name: 'getSenateTradingByName',\n description:\n 'Get senate trading data for a specific senator by name showing their trading activity',\n inputSchema: nameInputSchema,\n execute: async ({ name }) => {\n const fmp = getFMPClient();\n const senateTradingByName = await fmp.senateHouse.getSenateTradingByName({ name });\n return JSON.stringify(senateTradingByName.data, null, 2);\n },\n});\n\nexport const getHouseTradingByName = createOpenAITool({\n name: 'getHouseTradingByName',\n description:\n 'Get house trading data for a specific representative by name showing their trading activity',\n inputSchema: nameInputSchema,\n execute: async ({ name }) => {\n const fmp = getFMPClient();\n const houseTradingByName = await fmp.senateHouse.getHouseTradingByName({ name });\n return JSON.stringify(houseTradingByName.data, null, 2);\n },\n});\n\nexport const getSenateTradingRSSFeed = createOpenAITool({\n name: 'getSenateTradingRSSFeed',\n description:\n 'Get senate trading data through RSS feed with pagination showing recent senate transactions',\n inputSchema: rssFeedInputSchema,\n execute: async ({ page }) => {\n const fmp = getFMPClient();\n const senateTradingRSSFeed = await fmp.senateHouse.getSenateTradingRSSFeed({ page });\n return JSON.stringify(senateTradingRSSFeed.data, null, 2);\n },\n});\n\nexport const getHouseTradingRSSFeed = createOpenAITool({\n name: 'getHouseTradingRSSFeed',\n description:\n 'Get house trading data through RSS feed with pagination showing recent house transactions',\n inputSchema: rssFeedInputSchema,\n execute: async ({ page }) => {\n const fmp = getFMPClient();\n const houseTradingRSSFeed = await fmp.senateHouse.getHouseTradingRSSFeed({ page });\n return JSON.stringify(houseTradingRSSFeed.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/types';\n\n// Input schema for symbol-based stock operations\nconst symbolInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\nexport const getMarketCap = createOpenAITool({\n name: 'getMarketCap',\n description: 'Get market capitalization for a company showing current market value',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const marketCap = await fmp.stock.getMarketCap(symbol);\n return JSON.stringify(marketCap.data, null, 2);\n },\n});\n\nexport const getStockSplits = createOpenAITool({\n name: 'getStockSplits',\n description: 'Get stock splits history for a company showing all historical stock split events',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const stockSplits = await fmp.stock.getStockSplits(symbol);\n return JSON.stringify(stockSplits.data, null, 2);\n },\n});\n\nexport const getDividendHistory = createOpenAITool({\n name: 'getDividendHistory',\n description: 'Get dividend history for a company showing all historical dividend payments',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const dividendHistory = await fmp.stock.getDividendHistory(symbol);\n return JSON.stringify(dividendHistory.data, null, 2);\n },\n});\n\nexport const stockTools = [getMarketCap, getStockSplits, getDividendHistory];\n","import type { Tool } from '@openai/agents';\nimport { getCompanyProfile } from './company';\nimport { getEarningsCalendar, getEconomicCalendar } from './calendar';\nimport { getTreasuryRates, getEconomicIndicators } from './economic';\nimport { getETFHoldings, getETFProfile } from './etf';\nimport {\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n} from './financial';\nimport { getInsiderTrading } from './insider';\nimport { getInstitutionalHolders } from './institutional';\nimport {\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n} from './market';\nimport { getStockQuote } from './quote';\nimport {\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n} from './senate-house';\nimport { getMarketCap, getStockSplits, getDividendHistory } from './stock';\n\n// Export individual tools for OpenAI agents\nexport {\n getCompanyProfile,\n getEarningsCalendar,\n getEconomicCalendar,\n getTreasuryRates,\n getEconomicIndicators,\n getETFHoldings,\n getETFProfile,\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n getInsiderTrading,\n getInstitutionalHolders,\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n getStockQuote,\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n getMarketCap,\n getStockSplits,\n getDividendHistory,\n};\n\n// Export tool groups as arrays for OpenAI Agents\nexport const companyTools = [getCompanyProfile] as Tool[];\nexport const calendarTools = [getEarningsCalendar, getEconomicCalendar] as Tool[];\nexport const economicTools = [getTreasuryRates, getEconomicIndicators] as Tool[];\nexport const etfTools = [getETFHoldings, getETFProfile] as Tool[];\nexport const financialTools = [\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n] as Tool[];\nexport const insiderTools = [getInsiderTrading] as Tool[];\nexport const institutionalTools = [getInstitutionalHolders] as Tool[];\nexport const marketTools = [\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n] as Tool[];\nexport const quoteTools = [getStockQuote] as Tool[];\nexport const senateHouseTools = [\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n] as Tool[];\nexport const stockTools = [getMarketCap, getStockSplits, getDividendHistory] as Tool[];\n\n// Combine all tools into a single array for convenience\nexport const fmpTools: Tool[] = [\n getCompanyProfile,\n getEarningsCalendar,\n getEconomicCalendar,\n getTreasuryRates,\n getEconomicIndicators,\n getETFHoldings,\n getETFProfile,\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n getInsiderTrading,\n getInstitutionalHolders,\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n getStockQuote,\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n getMarketCap,\n getStockSplits,\n getDividendHistory,\n];\n"]}
1
+ {"version":3,"sources":["../../../src/utils/version-check.ts","../../../src/utils/logger.ts","../../../src/utils/openai-tool-wrapper.ts","../../../src/client.ts","../../../src/providers/openai/company.ts","../../../src/providers/openai/calendar.ts","../../../src/providers/openai/economic.ts","../../../src/providers/openai/etf.ts","../../../src/providers/openai/financial.ts","../../../src/providers/openai/insider.ts","../../../src/providers/openai/institutional.ts","../../../src/providers/openai/market.ts","../../../src/providers/openai/quote.ts","../../../src/providers/openai/senate-house.ts","../../../src/providers/openai/stock.ts","../../../src/providers/openai/index.ts"],"names":["tool","z","FMP","symbolInputSchema"],"mappings":";;;;;;;;;;;;;;AAIO,SAAS,wBAAA,GAAiC;AAC/C,EAAA,IAAI;AAEF,IAAA,MAAM,EAAE,IAAA,EAAAA,KAAAA,EAAK,GAAI,UAAQ,gBAAgB,CAAA;AAIzC,IAAAA,KAAAA,CAAK;AAAA,MACH,IAAA,EAAM,MAAA;AAAA,MACN,WAAA,EAAa,MAAA;AAAA,MACb,YAAY,EAAE,IAAA,EAAM,QAAA,EAAU,UAAA,EAAY,EAAC,EAAE;AAAA,MAC7C,MAAA,EAAQ,IAAA;AAAA,MACR,SAAS,YAAY;AAAA,KACtB,CAAA;AAAA,WAGM,KAAA,EAAO;AAEd,IAAA,MAAM,eAAe,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAC1E,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA;;AAAA,eAAA,EAGoB,YAAY,CAAA;AAAA,KAClC;AAAA;AAEJ;;;ACdO,SAAS,mBAAA,GAA+B;AAC7C,EAAA,OAAO,OAAA,CAAQ,IAAI,yBAAA,KAA8B,MAAA;AACnD;AAMO,SAAS,wBAAA,GAAoC;AAClD,EAAA,OAAO,OAAA,CAA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EAC5B,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA;AACF;AACO,IAAM,YAAA,GAAe,CAAC,iBAAiB;AACvC,IAAM,kBAAA,GAAqB,CAAC,uBAAuB;AACnD,IAAM,WAAA,GAAc;AAAA,EACzB,oBAAA;AAAA,EACA,oBAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AACO,IAAM,UAAA,GAAa,CAAC,aAAa;AACjC,IAAM,gBAAA,GAAmB;AAAA,EAC9B,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,uBAAA;AAAA,EACA;AACF;AACO,IAAM,UAAA,GAAa,CAAC,YAAA,EAAc,cAAA,EAAgB,kBAAkB;AAGpE,IAAM,QAAA,GAA4B;AAAA,EACvC,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,mBAAA;AAAA,EACA,gBAAA;AAAA,EACA,qBAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA;AAAA,EACA,kBAAA;AAAA,EACA,oBAAA;AAAA,EACA,kBAAA;AAAA,EACA,iBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oBAAA;AAAA,EACA,oBAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,uBAAA;AAAA,EACA,sBAAA;AAAA,EACA,YAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF;AAGA,wBAAA,EAAyB","file":"index.js","sourcesContent":["/**\n * Checks if the installed version of @openai/agents is compatible\n * with this package. Throws an error if incompatible.\n */\nexport function checkOpenAIAgentsVersion(): void {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const { tool } = require('@openai/agents');\n\n // Test if the tool function accepts the new API structure\n // This is a runtime check that will fail with older versions\n tool({\n name: 'test',\n description: 'test',\n parameters: { type: 'object', properties: {} },\n strict: true,\n execute: async () => 'test',\n });\n\n // If we get here, the version is compatible (silent success)\n } catch (error) {\n // If the tool creation fails, it's likely an incompatible version\n const errorMessage = error instanceof Error ? error.message : String(error);\n throw new Error(\n `Incompatible @openai/agents version detected. ` +\n `This package requires version ^0.0.17 or higher due to breaking changes in the API. ` +\n `Please upgrade with: npm install @openai/agents@latest\\n\\n` +\n `Error details: ${errorMessage}`,\n );\n }\n}\n\n/**\n * Logs a warning if the version check fails but doesn't throw\n */\nexport function warnOpenAIAgentsVersion(): void {\n try {\n checkOpenAIAgentsVersion();\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error);\n console.warn('⚠️ Version compatibility warning:', errorMessage);\n }\n}\n","/**\n * Logger utility for tools package\n * Controls logging of API results based on environment variable\n */\n\ninterface LogOptions {\n toolName: string;\n input: unknown;\n result: unknown;\n executionTime?: number;\n}\n\n/**\n * Check if API result logging is enabled via environment variable\n * Defaults to false if not set\n */\nexport function isApiLoggingEnabled(): boolean {\n return process.env.FMP_TOOLS_LOG_API_RESULTS === 'true';\n}\n\n/**\n * Check if data-only logging is enabled via environment variable\n * Defaults to false if not set\n */\nexport function isDataOnlyLoggingEnabled(): boolean {\n return process.env.FMP_TOOLS_LOG_DATA_ONLY === 'true';\n}\n\n/**\n * Estimate token count for LLM context (JSON-optimized)\n * JSON has many structural characters that count as single tokens\n */\nfunction estimateTokenCount(text: string): number {\n // Try to parse as JSON first for better estimation\n try {\n const parsed = JSON.parse(text);\n return estimateTokenCountForData(parsed);\n } catch {\n // Not JSON, use text-based estimation\n return estimateTokenCountForText(text);\n }\n}\n\n/**\n * Estimate tokens for parsed JSON data\n */\nfunction estimateTokenCountForData(data: unknown): number {\n if (data === null || data === undefined) {\n return 1; // null/undefined is typically 1 token\n }\n\n if (typeof data === 'string') {\n // Strings are typically tokenized by words/symbols\n // Financial data often has short strings like \"AAPL\", \"USD\", etc.\n return Math.ceil(data.length / 3); // More conservative for short strings\n }\n\n if (typeof data === 'number') {\n // Numbers are typically 1-2 tokens depending on size\n return data.toString().length > 10 ? 2 : 1;\n }\n\n if (typeof data === 'boolean') {\n return 1; // true/false are single tokens\n }\n\n if (Array.isArray(data)) {\n // Arrays: count structural tokens + content tokens\n let tokens = 2; // [ and ]\n for (const item of data) {\n tokens += estimateTokenCountForData(item);\n if (data.indexOf(item) < data.length - 1) {\n tokens += 1; // comma separator\n }\n }\n return tokens;\n }\n\n if (typeof data === 'object') {\n // Objects: count structural tokens + key-value pairs\n let tokens = 2; // { and }\n const keys = Object.keys(data);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = (data as Record<string, unknown>)[key];\n\n // Key (quoted string)\n tokens += Math.ceil(key.length / 3);\n tokens += 2; // quotes around key\n\n // Colon separator\n tokens += 1;\n\n // Value\n tokens += estimateTokenCountForData(value);\n\n // Comma separator (except for last item)\n if (i < keys.length - 1) {\n tokens += 1;\n }\n }\n return tokens;\n }\n\n return 1; // fallback\n}\n\n/**\n * Estimate tokens for plain text (non-JSON)\n */\nfunction estimateTokenCountForText(text: string): number {\n // For plain text, use a more conservative estimate\n // Consider that financial data often has numbers, symbols, and abbreviations\n const words = text.split(/\\s+/).filter(word => word.length > 0);\n let tokens = 0;\n\n for (const word of words) {\n if (/^\\d+$/.test(word)) {\n // Pure numbers are typically 1-2 tokens\n tokens += word.length > 8 ? 2 : 1;\n } else if (/^[A-Z]+$/.test(word)) {\n // All caps (like stock symbols) are often single tokens\n tokens += 1;\n } else if (/^\\$[\\d,]+\\.?\\d*$/.test(word)) {\n // Currency amounts are typically 2-3 tokens\n tokens += 3;\n } else {\n // Regular words: roughly 3-4 characters per token\n tokens += Math.ceil(word.length / 3.5);\n }\n }\n\n return tokens;\n}\n\n/**\n * Get simple metadata about the result for LLM context\n */\nfunction getResultInfo(result: unknown): string {\n if (result === null || result === undefined) {\n return 'null/undefined';\n }\n\n if (typeof result === 'string') {\n const tokenCount = estimateTokenCount(result);\n try {\n const parsed = JSON.parse(result);\n if (Array.isArray(parsed)) {\n return `JSON string (array of ${parsed.length} items, ~${tokenCount} tokens)`;\n }\n } catch {\n // Not JSON\n }\n return `string (${result.length} chars, ~${tokenCount} tokens)`;\n }\n\n if (Array.isArray(result)) {\n const jsonStr = JSON.stringify(result);\n const tokenCount = estimateTokenCount(jsonStr);\n return `array (${result.length} items, ~${tokenCount} tokens)`;\n }\n\n if (typeof result === 'object') {\n const jsonStr = JSON.stringify(result);\n const tokenCount = estimateTokenCount(jsonStr);\n return `object (~${tokenCount} tokens)`;\n }\n\n return typeof result;\n}\n\n/**\n * Log API tool execution details when enabled\n */\nexport function logApiExecution(options: LogOptions): void {\n if (!isApiLoggingEnabled()) {\n return;\n }\n\n const { toolName, input, result, executionTime } = options;\n\n console.log('\\n' + '='.repeat(80));\n console.log(`🔧 FMP Tool Execution: ${toolName}`);\n console.log('='.repeat(80));\n\n console.log('\\n📥 Input:');\n console.log(JSON.stringify(input, null, 2));\n\n const resultInfo = getResultInfo(result);\n\n console.log(`🔧 ${toolName}: ${resultInfo}`);\n\n if (executionTime !== undefined) {\n console.log(`\\n⏱️ Execution Time: ${executionTime}ms`);\n }\n\n console.log('='.repeat(80) + '\\n');\n}\n\n/**\n * Log data-only information for LLM context (when enabled)\n */\nexport function logDataOnly(options: LogOptions): void {\n if (!isDataOnlyLoggingEnabled()) {\n return;\n }\n\n const { result } = options;\n\n console.log('\\n📤 Result:');\n if (typeof result === 'string') {\n try {\n // Try to parse and pretty-print if it's JSON\n const parsed = JSON.parse(result);\n console.log(JSON.stringify(parsed, null, 2));\n } catch {\n // If not JSON, log as-is\n console.log(result);\n }\n } else {\n console.log(JSON.stringify(result, null, 2));\n }\n\n console.log('='.repeat(80) + '\\n');\n}\n\n/**\n * Log API tool execution with timing\n */\nexport async function logApiExecutionWithTiming<T>(\n toolName: string,\n input: unknown,\n executeFn: () => Promise<T>,\n): Promise<T> {\n const startTime = Date.now();\n\n try {\n const result = await executeFn();\n const executionTime = Date.now() - startTime;\n\n logApiExecution({\n toolName,\n input,\n result,\n executionTime,\n });\n\n // Also log data-only info if enabled\n logDataOnly({\n toolName,\n input,\n result,\n executionTime,\n });\n\n return result;\n } catch (error) {\n const executionTime = Date.now() - startTime;\n\n // Log error case as well\n if (isApiLoggingEnabled()) {\n console.log('\\n' + '='.repeat(80));\n console.log(`❌ FMP Tool Execution Error: ${toolName}`);\n console.log('='.repeat(80));\n console.log('\\n📥 Input:');\n console.log(JSON.stringify(input, null, 2));\n console.log('\\n❌ Error:');\n console.log(error instanceof Error ? error.message : String(error));\n console.log(`\\n⏱️ Execution Time: ${executionTime}ms`);\n console.log('='.repeat(80) + '\\n');\n }\n\n throw error;\n }\n}\n","import { z } from 'zod';\nimport { tool } from '@openai/agents';\nimport { logApiExecutionWithTiming } from './logger';\n\nexport interface OpenAIToolConfig<T extends z.ZodObject<any>> {\n name: string;\n description: string;\n inputSchema: T;\n execute: (args: z.infer<T>) => Promise<string>;\n}\n\nexport function createOpenAITool<T extends z.ZodObject<any>>(config: OpenAIToolConfig<T>) {\n const { name, description, inputSchema, execute } = config;\n\n const properties: Record<string, any> = {};\n const required: string[] = [];\n\n // Extract properties from Zod schema using type guards\n if (inputSchema instanceof z.ZodObject) {\n const shape = inputSchema.shape;\n Object.entries(shape).forEach(([key, schema]) => {\n let isRequired = true;\n let actualSchema: z.ZodType = schema as z.ZodType;\n let fieldDescription = '';\n\n // Extract description from the original schema\n if (schema && typeof schema === 'object' && 'description' in schema) {\n const desc = (schema as any).description;\n if (typeof desc === 'string') {\n fieldDescription = desc;\n }\n }\n\n // Handle optional fields\n if (schema instanceof z.ZodOptional) {\n isRequired = false;\n actualSchema = schema.unwrap();\n // If no description was found on the optional wrapper, try the unwrapped schema\n if (!fieldDescription && actualSchema.description) {\n fieldDescription = actualSchema.description;\n }\n }\n\n // Handle default values (they make fields optional)\n if (schema instanceof z.ZodDefault) {\n isRequired = false;\n actualSchema = schema.removeDefault();\n // If no description was found on the default wrapper, try the unwrapped schema\n if (!fieldDescription && actualSchema.description) {\n fieldDescription = actualSchema.description;\n }\n }\n\n // Map Zod types to OpenAI parameter types\n if (actualSchema instanceof z.ZodString) {\n properties[key] = {\n type: 'string',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodEnum) {\n properties[key] = {\n type: 'string',\n enum: actualSchema._def.values,\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodNumber) {\n properties[key] = {\n type: 'number',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodBoolean) {\n properties[key] = {\n type: 'boolean',\n description: fieldDescription || `${key} parameter`,\n };\n } else if (actualSchema instanceof z.ZodArray) {\n properties[key] = {\n type: 'array',\n items: { type: 'string' }, // Default to string array, can be enhanced\n description: fieldDescription || `${key} parameter`,\n };\n } else {\n // Fallback for unknown types\n properties[key] = {\n type: 'string',\n description: fieldDescription || `${key} parameter`,\n };\n }\n\n if (isRequired) {\n required.push(key);\n }\n });\n }\n\n return tool({\n name,\n description,\n parameters: inputSchema as any,\n strict: true,\n execute: async (input: unknown) => {\n try {\n const validatedInput = inputSchema.parse(input);\n return await logApiExecutionWithTiming(name, validatedInput, () => execute(validatedInput));\n } catch (error) {\n if (error instanceof z.ZodError) {\n return `Invalid input: ${error.errors.map(e => e.message).join(', ')}`;\n }\n return `Error executing ${name}: ${error instanceof Error ? error.message : String(error)}`;\n }\n },\n });\n}\n","/**\n * Internal FMP API client instance\n * Used internally by the tools, not exported publicly\n */\nimport { FMP } from 'fmp-node-api';\n\n// Create a function to get the FMP client instance (internal use only)\nexport function getFMPClient() {\n return new FMP();\n}\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\nexport const getCompanyProfile = createOpenAITool({\n name: 'getCompanyProfile',\n description: 'Get the company profile for a company',\n inputSchema: z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n }),\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const companyProfile = await fmp.company.getCompanyProfile(symbol);\n return JSON.stringify(companyProfile.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Common input schema for calendar date range\nconst calendarInputSchema = z.object({\n from: z.string().optional().nullable().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().nullable().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\nexport const getEarningsCalendar = createOpenAITool({\n name: 'getEarningsCalendar',\n description: 'Get earnings calendar showing upcoming and recent earnings announcements',\n inputSchema: calendarInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const earningsCalendar = await fmp.calendar.getEarningsCalendar({\n from: from ?? undefined,\n to: to ?? undefined,\n });\n return JSON.stringify(earningsCalendar.data, null, 2);\n },\n});\n\nexport const getEconomicCalendar = createOpenAITool({\n name: 'getEconomicCalendar',\n description: 'Get economic calendar showing upcoming and recent economic events and indicators',\n inputSchema: calendarInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const economicCalendar = await fmp.calendar.getEconomicsCalendar({\n from: from ?? undefined,\n to: to ?? undefined,\n });\n return JSON.stringify(economicCalendar.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for treasury rates with date range\nconst treasuryRatesInputSchema = z.object({\n from: z.string().optional().nullable().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().nullable().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\n// Economic indicators enum and schema\nconst economicIndicatorNames = [\n 'GDP',\n 'realGDP',\n 'nominalPotentialGDP',\n 'realGDPPerCapita',\n 'federalFunds',\n 'CPI',\n 'inflationRate',\n 'inflation',\n 'retailSales',\n 'consumerSentiment',\n 'durableGoods',\n 'unemploymentRate',\n 'totalNonfarmPayroll',\n 'initialClaims',\n 'industrialProductionTotalIndex',\n 'newPrivatelyOwnedHousingUnitsStartedTotalUnits',\n 'totalVehicleSales',\n 'retailMoneyFunds',\n 'smoothedUSRecessionProbabilities',\n '3MonthOr90DayRatesAndYieldsCertificatesOfDeposit',\n 'commercialBankInterestRateOnCreditCardPlansAllAccounts',\n '30YearFixedRateMortgageAverage',\n '15YearFixedRateMortgageAverage',\n] as const;\n\nconst economicIndicatorsInputSchema = z.object({\n name: z.enum(economicIndicatorNames).describe('The name of the economic indicator'),\n from: z.string().optional().nullable().describe('Start date in YYYY-MM-DD format (optional)'),\n to: z.string().optional().nullable().describe('End date in YYYY-MM-DD format (optional)'),\n});\n\nexport const getTreasuryRates = createOpenAITool({\n name: 'getTreasuryRates',\n description: 'Get treasury rates for different maturities over time',\n inputSchema: treasuryRatesInputSchema,\n execute: async ({ from, to }) => {\n const fmp = getFMPClient();\n const treasuryRates = await fmp.economic.getTreasuryRates({\n from: from ?? undefined,\n to: to ?? undefined,\n });\n return JSON.stringify(treasuryRates.data, null, 2);\n },\n});\n\nexport const getEconomicIndicators = createOpenAITool({\n name: 'getEconomicIndicators',\n description: 'Get economic indicators like GDP, unemployment rate, inflation, etc.',\n inputSchema: economicIndicatorsInputSchema,\n execute: async ({ name, from, to }) => {\n const fmp = getFMPClient();\n const economicIndicators = await fmp.economic.getEconomicIndicators({\n name,\n from: from ?? undefined,\n to: to ?? undefined,\n });\n return JSON.stringify(economicIndicators.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for ETF holdings with optional date\nconst etfHoldingsInputSchema = z.object({\n symbol: z.string().min(1, 'ETF symbol is required').describe('ETF symbol (e.g., SPY, QQQ, VTI)'),\n date: z\n .string()\n .optional()\n .nullable()\n .describe('Date for holdings in YYYY-MM-DD format (optional)'),\n});\n\n// Input schema for ETF profile\nconst etfProfileInputSchema = z.object({\n symbol: z.string().min(1, 'ETF symbol is required').describe('ETF symbol (e.g., SPY, QQQ, VTI)'),\n});\n\nexport const getETFHoldings = createOpenAITool({\n name: 'getETFHoldings',\n description:\n 'Get ETF holdings for a specific ETF symbol, showing the underlying assets and their weights',\n inputSchema: etfHoldingsInputSchema,\n execute: async ({ symbol, date }) => {\n const fmp = getFMPClient();\n const params: any = { symbol };\n if (date) {\n params.date = date;\n }\n\n const etfHoldings = await fmp.etf.getHoldings(params);\n return JSON.stringify(etfHoldings.data, null, 2);\n },\n});\n\nexport const getETFProfile = createOpenAITool({\n name: 'getETFProfile',\n description: 'Get ETF profile information including fund details, expense ratio, and key metrics',\n inputSchema: etfProfileInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const etfProfile = await fmp.etf.getProfile(symbol);\n return JSON.stringify(etfProfile.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Common input schema for financial statements with symbol and period\nconst financialStatementInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n period: z\n .enum(['annual', 'quarter'])\n .default('annual')\n .describe('The period type (annual or quarter)'),\n});\n\nexport const getBalanceSheet = createOpenAITool({\n name: 'getBalanceSheet',\n description: 'Get balance sheet for a company showing assets, liabilities, and equity',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const balanceSheet = await fmp.financial.getBalanceSheet({ symbol, period });\n return JSON.stringify(balanceSheet.data, null, 2);\n },\n});\n\nexport const getIncomeStatement = createOpenAITool({\n name: 'getIncomeStatement',\n description: 'Get income statement for a company showing revenue, expenses, and profit',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const incomeStatement = await fmp.financial.getIncomeStatement({ symbol, period });\n return JSON.stringify(incomeStatement.data, null, 2);\n },\n});\n\nexport const getCashFlowStatement = createOpenAITool({\n name: 'getCashFlowStatement',\n description:\n 'Get cash flow statement for a company showing operating, investing, and financing cash flows',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const cashFlowStatement = await fmp.financial.getCashFlowStatement({ symbol, period });\n return JSON.stringify(cashFlowStatement.data, null, 2);\n },\n});\n\nexport const getFinancialRatios = createOpenAITool({\n name: 'getFinancialRatios',\n description:\n 'Get financial ratios for a company including profitability, liquidity, and efficiency metrics',\n inputSchema: financialStatementInputSchema,\n execute: async ({ symbol, period }) => {\n const fmp = getFMPClient();\n const financialRatios = await fmp.financial.getFinancialRatios({ symbol, period });\n return JSON.stringify(financialRatios.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for insider trading with symbol and optional page\nconst insiderTradingInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n page: z\n .number()\n .int()\n .min(0)\n .default(0)\n .describe('Page number for pagination (optional, defaults to 0)'),\n});\n\nexport const getInsiderTrading = createOpenAITool({\n name: 'getInsiderTrading',\n description:\n 'Get insider trading data for a specific stock symbol showing buy/sell transactions by company insiders',\n inputSchema: insiderTradingInputSchema,\n execute: async ({ symbol, page }) => {\n const fmp = getFMPClient();\n const insiderTrading = await fmp.insider.getInsiderTradesBySymbol(symbol, page);\n return JSON.stringify(insiderTrading.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for institutional holders with symbol\nconst institutionalHoldersInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\nexport const getInstitutionalHolders = createOpenAITool({\n name: 'getInstitutionalHolders',\n description:\n 'Get institutional holders for a specific stock symbol showing which institutions own shares and their holdings',\n inputSchema: institutionalHoldersInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const institutionalHolders = await fmp.institutional.getInstitutionalHolders({ symbol });\n\n // Return formatted JSON string\n return JSON.stringify(institutionalHolders.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Empty schema for tools that don't require parameters\nconst emptyInputSchema = z.object({});\n\nexport const getMarketPerformance = createOpenAITool({\n name: 'getMarketPerformance',\n description: 'Get overall market performance data including major indices performance',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const marketPerformance = await fmp.market.getMarketPerformance();\n return JSON.stringify(marketPerformance.data, null, 2);\n },\n});\n\nexport const getSectorPerformance = createOpenAITool({\n name: 'getSectorPerformance',\n description: 'Get sector performance data showing how different market sectors are performing',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const sectorPerformance = await fmp.market.getSectorPerformance();\n return JSON.stringify(sectorPerformance.data, null, 2);\n },\n});\n\nexport const getGainers = createOpenAITool({\n name: 'getGainers',\n description: 'Get top gaining stocks showing the best performing stocks of the day',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const gainers = await fmp.market.getGainers();\n return JSON.stringify(gainers.data, null, 2);\n },\n});\n\nexport const getLosers = createOpenAITool({\n name: 'getLosers',\n description: 'Get top losing stocks showing the worst performing stocks of the day',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const losers = await fmp.market.getLosers();\n return JSON.stringify(losers.data, null, 2);\n },\n});\n\nexport const getMostActive = createOpenAITool({\n name: 'getMostActive',\n description: 'Get most active stocks showing stocks with the highest trading volume',\n inputSchema: emptyInputSchema,\n execute: async () => {\n const fmp = getFMPClient();\n const mostActive = await fmp.market.getMostActive();\n return JSON.stringify(mostActive.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for stock quote with symbol\nconst stockQuoteInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The symbol of the company to get the stock quote for'),\n});\n\nexport const getStockQuote = createOpenAITool({\n name: 'getStockQuote',\n description:\n 'Get the real-time stock quote for a company including price, volume, and market data',\n inputSchema: stockQuoteInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const stockQuote = await fmp.quote.getQuote(symbol);\n return JSON.stringify(stockQuote.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for symbol-based trading data\nconst symbolInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('Stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\n// Input schema for name-based trading data\nconst nameInputSchema = z.object({\n name: z.string().min(1, 'Name is required').describe('The name of the senator or representative'),\n});\n\n// Input schema for RSS feed with pagination\nconst rssFeedInputSchema = z.object({\n page: z\n .number()\n .int()\n .min(0)\n .default(0)\n .describe('Page number for pagination (optional, defaults to 0)'),\n});\n\nexport const getSenateTrading = createOpenAITool({\n name: 'getSenateTrading',\n description: 'Get senate trading data for a specific stock symbol showing senator transactions',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const senateTrading = await fmp.senateHouse.getSenateTrading({ symbol });\n return JSON.stringify(senateTrading.data, null, 2);\n },\n});\n\nexport const getHouseTrading = createOpenAITool({\n name: 'getHouseTrading',\n description:\n 'Get house trading data for a specific stock symbol showing representative transactions',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const houseTrading = await fmp.senateHouse.getHouseTrading({ symbol });\n return JSON.stringify(houseTrading.data, null, 2);\n },\n});\n\nexport const getSenateTradingByName = createOpenAITool({\n name: 'getSenateTradingByName',\n description:\n 'Get senate trading data for a specific senator by name showing their trading activity',\n inputSchema: nameInputSchema,\n execute: async ({ name }) => {\n const fmp = getFMPClient();\n const senateTradingByName = await fmp.senateHouse.getSenateTradingByName({ name });\n return JSON.stringify(senateTradingByName.data, null, 2);\n },\n});\n\nexport const getHouseTradingByName = createOpenAITool({\n name: 'getHouseTradingByName',\n description:\n 'Get house trading data for a specific representative by name showing their trading activity',\n inputSchema: nameInputSchema,\n execute: async ({ name }) => {\n const fmp = getFMPClient();\n const houseTradingByName = await fmp.senateHouse.getHouseTradingByName({ name });\n return JSON.stringify(houseTradingByName.data, null, 2);\n },\n});\n\nexport const getSenateTradingRSSFeed = createOpenAITool({\n name: 'getSenateTradingRSSFeed',\n description:\n 'Get senate trading data through RSS feed with pagination showing recent senate transactions',\n inputSchema: rssFeedInputSchema,\n execute: async ({ page }) => {\n const fmp = getFMPClient();\n const senateTradingRSSFeed = await fmp.senateHouse.getSenateTradingRSSFeed({ page });\n return JSON.stringify(senateTradingRSSFeed.data, null, 2);\n },\n});\n\nexport const getHouseTradingRSSFeed = createOpenAITool({\n name: 'getHouseTradingRSSFeed',\n description:\n 'Get house trading data through RSS feed with pagination showing recent house transactions',\n inputSchema: rssFeedInputSchema,\n execute: async ({ page }) => {\n const fmp = getFMPClient();\n const houseTradingRSSFeed = await fmp.senateHouse.getHouseTradingRSSFeed({ page });\n return JSON.stringify(houseTradingRSSFeed.data, null, 2);\n },\n});\n","import { z } from 'zod';\nimport { createOpenAITool } from '@/utils/openai-tool-wrapper';\nimport { getFMPClient } from '@/client';\n\n// Input schema for symbol-based stock operations\nconst symbolInputSchema = z.object({\n symbol: z\n .string()\n .min(1, 'Stock symbol is required')\n .describe('The stock symbol (e.g., AAPL, MSFT, GOOGL)'),\n});\n\nexport const getMarketCap = createOpenAITool({\n name: 'getMarketCap',\n description: 'Get market capitalization for a company showing current market value',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const marketCap = await fmp.stock.getMarketCap(symbol);\n return JSON.stringify(marketCap.data, null, 2);\n },\n});\n\nexport const getStockSplits = createOpenAITool({\n name: 'getStockSplits',\n description: 'Get stock splits history for a company showing all historical stock split events',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const stockSplits = await fmp.stock.getStockSplits(symbol);\n return JSON.stringify(stockSplits.data, null, 2);\n },\n});\n\nexport const getDividendHistory = createOpenAITool({\n name: 'getDividendHistory',\n description: 'Get dividend history for a company showing all historical dividend payments',\n inputSchema: symbolInputSchema,\n execute: async ({ symbol }) => {\n const fmp = getFMPClient();\n const dividendHistory = await fmp.stock.getDividendHistory(symbol);\n return JSON.stringify(dividendHistory.data, null, 2);\n },\n});\n\nexport const stockTools = [getMarketCap, getStockSplits, getDividendHistory];\n","import type { Tool } from '@openai/agents';\nimport { checkOpenAIAgentsVersion } from '@/utils/version-check';\nimport { getCompanyProfile } from './company';\nimport { getEarningsCalendar, getEconomicCalendar } from './calendar';\nimport { getTreasuryRates, getEconomicIndicators } from './economic';\nimport { getETFHoldings, getETFProfile } from './etf';\nimport {\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n} from './financial';\nimport { getInsiderTrading } from './insider';\nimport { getInstitutionalHolders } from './institutional';\nimport {\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n} from './market';\nimport { getStockQuote } from './quote';\nimport {\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n} from './senate-house';\nimport { getMarketCap, getStockSplits, getDividendHistory } from './stock';\n\n// Export individual tools for OpenAI agents\nexport {\n getCompanyProfile,\n getEarningsCalendar,\n getEconomicCalendar,\n getTreasuryRates,\n getEconomicIndicators,\n getETFHoldings,\n getETFProfile,\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n getInsiderTrading,\n getInstitutionalHolders,\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n getStockQuote,\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n getMarketCap,\n getStockSplits,\n getDividendHistory,\n};\n\n// Export tool groups as arrays for OpenAI Agents\nexport const companyTools = [getCompanyProfile] as Tool<unknown>[];\nexport const calendarTools = [getEarningsCalendar, getEconomicCalendar] as Tool<unknown>[];\nexport const economicTools = [getTreasuryRates, getEconomicIndicators] as Tool<unknown>[];\nexport const etfTools = [getETFHoldings, getETFProfile] as Tool<unknown>[];\nexport const financialTools = [\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n] as Tool<unknown>[];\nexport const insiderTools = [getInsiderTrading] as Tool<unknown>[];\nexport const institutionalTools = [getInstitutionalHolders] as Tool<unknown>[];\nexport const marketTools = [\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n] as Tool<unknown>[];\nexport const quoteTools = [getStockQuote] as Tool<unknown>[];\nexport const senateHouseTools = [\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n] as Tool<unknown>[];\nexport const stockTools = [getMarketCap, getStockSplits, getDividendHistory] as Tool<unknown>[];\n\n// Combine all tools into a single array for convenience\nexport const fmpTools: Tool<unknown>[] = [\n getCompanyProfile,\n getEarningsCalendar,\n getEconomicCalendar,\n getTreasuryRates,\n getEconomicIndicators,\n getETFHoldings,\n getETFProfile,\n getBalanceSheet,\n getIncomeStatement,\n getCashFlowStatement,\n getFinancialRatios,\n getInsiderTrading,\n getInstitutionalHolders,\n getMarketPerformance,\n getSectorPerformance,\n getGainers,\n getLosers,\n getMostActive,\n getStockQuote,\n getSenateTrading,\n getHouseTrading,\n getSenateTradingByName,\n getHouseTradingByName,\n getSenateTradingRSSFeed,\n getHouseTradingRSSFeed,\n getMarketCap,\n getStockSplits,\n getDividendHistory,\n];\n\n// Check version compatibility when the module is imported\ncheckOpenAIAgentsVersion();\n"]}
@@ -2,15 +2,211 @@ import { z } from 'zod';
2
2
  import { tool } from '@openai/agents';
3
3
  import { FMP } from 'fmp-node-api';
4
4
 
5
- // src/providers/openai/company.ts
5
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
6
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
7
+ }) : x)(function(x) {
8
+ if (typeof require !== "undefined") return require.apply(this, arguments);
9
+ throw Error('Dynamic require of "' + x + '" is not supported');
10
+ });
11
+
12
+ // src/utils/version-check.ts
13
+ function checkOpenAIAgentsVersion() {
14
+ try {
15
+ const { tool: tool2 } = __require("@openai/agents");
16
+ tool2({
17
+ name: "test",
18
+ description: "test",
19
+ parameters: { type: "object", properties: {} },
20
+ strict: true,
21
+ execute: async () => "test"
22
+ });
23
+ } catch (error) {
24
+ const errorMessage = error instanceof Error ? error.message : String(error);
25
+ throw new Error(
26
+ `Incompatible @openai/agents version detected. This package requires version ^0.0.17 or higher due to breaking changes in the API. Please upgrade with: npm install @openai/agents@latest
27
+
28
+ Error details: ${errorMessage}`
29
+ );
30
+ }
31
+ }
32
+
33
+ // src/utils/logger.ts
34
+ function isApiLoggingEnabled() {
35
+ return process.env.FMP_TOOLS_LOG_API_RESULTS === "true";
36
+ }
37
+ function isDataOnlyLoggingEnabled() {
38
+ return process.env.FMP_TOOLS_LOG_DATA_ONLY === "true";
39
+ }
40
+ function estimateTokenCount(text) {
41
+ try {
42
+ const parsed = JSON.parse(text);
43
+ return estimateTokenCountForData(parsed);
44
+ } catch {
45
+ return estimateTokenCountForText(text);
46
+ }
47
+ }
48
+ function estimateTokenCountForData(data) {
49
+ if (data === null || data === void 0) {
50
+ return 1;
51
+ }
52
+ if (typeof data === "string") {
53
+ return Math.ceil(data.length / 3);
54
+ }
55
+ if (typeof data === "number") {
56
+ return data.toString().length > 10 ? 2 : 1;
57
+ }
58
+ if (typeof data === "boolean") {
59
+ return 1;
60
+ }
61
+ if (Array.isArray(data)) {
62
+ let tokens = 2;
63
+ for (const item of data) {
64
+ tokens += estimateTokenCountForData(item);
65
+ if (data.indexOf(item) < data.length - 1) {
66
+ tokens += 1;
67
+ }
68
+ }
69
+ return tokens;
70
+ }
71
+ if (typeof data === "object") {
72
+ let tokens = 2;
73
+ const keys = Object.keys(data);
74
+ for (let i = 0; i < keys.length; i++) {
75
+ const key = keys[i];
76
+ const value = data[key];
77
+ tokens += Math.ceil(key.length / 3);
78
+ tokens += 2;
79
+ tokens += 1;
80
+ tokens += estimateTokenCountForData(value);
81
+ if (i < keys.length - 1) {
82
+ tokens += 1;
83
+ }
84
+ }
85
+ return tokens;
86
+ }
87
+ return 1;
88
+ }
89
+ function estimateTokenCountForText(text) {
90
+ const words = text.split(/\s+/).filter((word) => word.length > 0);
91
+ let tokens = 0;
92
+ for (const word of words) {
93
+ if (/^\d+$/.test(word)) {
94
+ tokens += word.length > 8 ? 2 : 1;
95
+ } else if (/^[A-Z]+$/.test(word)) {
96
+ tokens += 1;
97
+ } else if (/^\$[\d,]+\.?\d*$/.test(word)) {
98
+ tokens += 3;
99
+ } else {
100
+ tokens += Math.ceil(word.length / 3.5);
101
+ }
102
+ }
103
+ return tokens;
104
+ }
105
+ function getResultInfo(result) {
106
+ if (result === null || result === void 0) {
107
+ return "null/undefined";
108
+ }
109
+ if (typeof result === "string") {
110
+ const tokenCount = estimateTokenCount(result);
111
+ try {
112
+ const parsed = JSON.parse(result);
113
+ if (Array.isArray(parsed)) {
114
+ return `JSON string (array of ${parsed.length} items, ~${tokenCount} tokens)`;
115
+ }
116
+ } catch {
117
+ }
118
+ return `string (${result.length} chars, ~${tokenCount} tokens)`;
119
+ }
120
+ if (Array.isArray(result)) {
121
+ const jsonStr = JSON.stringify(result);
122
+ const tokenCount = estimateTokenCount(jsonStr);
123
+ return `array (${result.length} items, ~${tokenCount} tokens)`;
124
+ }
125
+ if (typeof result === "object") {
126
+ const jsonStr = JSON.stringify(result);
127
+ const tokenCount = estimateTokenCount(jsonStr);
128
+ return `object (~${tokenCount} tokens)`;
129
+ }
130
+ return typeof result;
131
+ }
132
+ function logApiExecution(options) {
133
+ if (!isApiLoggingEnabled()) {
134
+ return;
135
+ }
136
+ const { toolName, input, result, executionTime } = options;
137
+ console.log("\n" + "=".repeat(80));
138
+ console.log(`\u{1F527} FMP Tool Execution: ${toolName}`);
139
+ console.log("=".repeat(80));
140
+ console.log("\n\u{1F4E5} Input:");
141
+ console.log(JSON.stringify(input, null, 2));
142
+ const resultInfo = getResultInfo(result);
143
+ console.log(`\u{1F527} ${toolName}: ${resultInfo}`);
144
+ if (executionTime !== void 0) {
145
+ console.log(`
146
+ \u23F1\uFE0F Execution Time: ${executionTime}ms`);
147
+ }
148
+ console.log("=".repeat(80) + "\n");
149
+ }
150
+ function logDataOnly(options) {
151
+ if (!isDataOnlyLoggingEnabled()) {
152
+ return;
153
+ }
154
+ const { result } = options;
155
+ console.log("\n\u{1F4E4} Result:");
156
+ if (typeof result === "string") {
157
+ try {
158
+ const parsed = JSON.parse(result);
159
+ console.log(JSON.stringify(parsed, null, 2));
160
+ } catch {
161
+ console.log(result);
162
+ }
163
+ } else {
164
+ console.log(JSON.stringify(result, null, 2));
165
+ }
166
+ console.log("=".repeat(80) + "\n");
167
+ }
168
+ async function logApiExecutionWithTiming(toolName, input, executeFn) {
169
+ const startTime = Date.now();
170
+ try {
171
+ const result = await executeFn();
172
+ const executionTime = Date.now() - startTime;
173
+ logApiExecution({
174
+ toolName,
175
+ input,
176
+ result,
177
+ executionTime
178
+ });
179
+ logDataOnly({
180
+ toolName,
181
+ input,
182
+ result,
183
+ executionTime
184
+ });
185
+ return result;
186
+ } catch (error) {
187
+ const executionTime = Date.now() - startTime;
188
+ if (isApiLoggingEnabled()) {
189
+ console.log("\n" + "=".repeat(80));
190
+ console.log(`\u274C FMP Tool Execution Error: ${toolName}`);
191
+ console.log("=".repeat(80));
192
+ console.log("\n\u{1F4E5} Input:");
193
+ console.log(JSON.stringify(input, null, 2));
194
+ console.log("\n\u274C Error:");
195
+ console.log(error instanceof Error ? error.message : String(error));
196
+ console.log(`
197
+ \u23F1\uFE0F Execution Time: ${executionTime}ms`);
198
+ console.log("=".repeat(80) + "\n");
199
+ }
200
+ throw error;
201
+ }
202
+ }
203
+
204
+ // src/utils/openai-tool-wrapper.ts
6
205
  function createOpenAITool(config) {
7
206
  const { name, description, inputSchema, execute } = config;
8
- const properties = {};
9
- const required = [];
10
207
  if (inputSchema instanceof z.ZodObject) {
11
208
  const shape = inputSchema.shape;
12
209
  Object.entries(shape).forEach(([key, schema]) => {
13
- let isRequired = true;
14
210
  let actualSchema = schema;
15
211
  let fieldDescription = "";
16
212
  if (schema && typeof schema === "object" && "description" in schema) {
@@ -20,72 +216,35 @@ function createOpenAITool(config) {
20
216
  }
21
217
  }
22
218
  if (schema instanceof z.ZodOptional) {
23
- isRequired = false;
24
219
  actualSchema = schema.unwrap();
25
220
  if (!fieldDescription && actualSchema.description) {
26
221
  fieldDescription = actualSchema.description;
27
222
  }
28
223
  }
29
224
  if (schema instanceof z.ZodDefault) {
30
- isRequired = false;
31
225
  actualSchema = schema.removeDefault();
32
226
  if (!fieldDescription && actualSchema.description) {
33
227
  fieldDescription = actualSchema.description;
34
228
  }
35
229
  }
36
- if (actualSchema instanceof z.ZodString) {
37
- properties[key] = {
38
- type: "string",
39
- description: fieldDescription || `${key} parameter`
40
- };
41
- } else if (actualSchema instanceof z.ZodEnum) {
42
- properties[key] = {
230
+ if (actualSchema instanceof z.ZodString) ; else if (actualSchema instanceof z.ZodEnum) {
231
+ ({
43
232
  type: "string",
44
233
  enum: actualSchema._def.values,
45
234
  description: fieldDescription || `${key} parameter`
46
- };
47
- } else if (actualSchema instanceof z.ZodNumber) {
48
- properties[key] = {
49
- type: "number",
50
- description: fieldDescription || `${key} parameter`
51
- };
52
- } else if (actualSchema instanceof z.ZodBoolean) {
53
- properties[key] = {
54
- type: "boolean",
55
- description: fieldDescription || `${key} parameter`
56
- };
57
- } else if (actualSchema instanceof z.ZodArray) {
58
- properties[key] = {
59
- type: "array",
60
- items: { type: "string" },
61
- // Default to string array, can be enhanced
62
- description: fieldDescription || `${key} parameter`
63
- };
64
- } else {
65
- properties[key] = {
66
- type: "string",
67
- description: fieldDescription || `${key} parameter`
68
- };
69
- }
70
- if (isRequired) {
71
- required.push(key);
72
- }
235
+ });
236
+ } else if (actualSchema instanceof z.ZodNumber) ; else if (actualSchema instanceof z.ZodBoolean) ; else if (actualSchema instanceof z.ZodArray) ; else ;
73
237
  });
74
238
  }
75
239
  return tool({
76
240
  name,
77
241
  description,
78
- parameters: {
79
- type: "object",
80
- properties,
81
- required,
82
- additionalProperties: false
83
- },
84
- strict: false,
242
+ parameters: inputSchema,
243
+ strict: true,
85
244
  execute: async (input) => {
86
245
  try {
87
246
  const validatedInput = inputSchema.parse(input);
88
- return await execute(validatedInput);
247
+ return await logApiExecutionWithTiming(name, validatedInput, () => execute(validatedInput));
89
248
  } catch (error) {
90
249
  if (error instanceof z.ZodError) {
91
250
  return `Invalid input: ${error.errors.map((e) => e.message).join(", ")}`;
@@ -113,8 +272,8 @@ var getCompanyProfile = createOpenAITool({
113
272
  }
114
273
  });
115
274
  var calendarInputSchema = z.object({
116
- from: z.string().optional().describe("Start date in YYYY-MM-DD format (optional)"),
117
- to: z.string().optional().describe("End date in YYYY-MM-DD format (optional)")
275
+ from: z.string().optional().nullable().describe("Start date in YYYY-MM-DD format (optional)"),
276
+ to: z.string().optional().nullable().describe("End date in YYYY-MM-DD format (optional)")
118
277
  });
119
278
  var getEarningsCalendar = createOpenAITool({
120
279
  name: "getEarningsCalendar",
@@ -122,7 +281,10 @@ var getEarningsCalendar = createOpenAITool({
122
281
  inputSchema: calendarInputSchema,
123
282
  execute: async ({ from, to }) => {
124
283
  const fmp = getFMPClient();
125
- const earningsCalendar = await fmp.calendar.getEarningsCalendar({ from, to });
284
+ const earningsCalendar = await fmp.calendar.getEarningsCalendar({
285
+ from: from ?? void 0,
286
+ to: to ?? void 0
287
+ });
126
288
  return JSON.stringify(earningsCalendar.data, null, 2);
127
289
  }
128
290
  });
@@ -132,13 +294,16 @@ var getEconomicCalendar = createOpenAITool({
132
294
  inputSchema: calendarInputSchema,
133
295
  execute: async ({ from, to }) => {
134
296
  const fmp = getFMPClient();
135
- const economicCalendar = await fmp.calendar.getEconomicsCalendar({ from, to });
297
+ const economicCalendar = await fmp.calendar.getEconomicsCalendar({
298
+ from: from ?? void 0,
299
+ to: to ?? void 0
300
+ });
136
301
  return JSON.stringify(economicCalendar.data, null, 2);
137
302
  }
138
303
  });
139
304
  var treasuryRatesInputSchema = z.object({
140
- from: z.string().optional().describe("Start date in YYYY-MM-DD format (optional)"),
141
- to: z.string().optional().describe("End date in YYYY-MM-DD format (optional)")
305
+ from: z.string().optional().nullable().describe("Start date in YYYY-MM-DD format (optional)"),
306
+ to: z.string().optional().nullable().describe("End date in YYYY-MM-DD format (optional)")
142
307
  });
143
308
  var economicIndicatorNames = [
144
309
  "GDP",
@@ -167,8 +332,8 @@ var economicIndicatorNames = [
167
332
  ];
168
333
  var economicIndicatorsInputSchema = z.object({
169
334
  name: z.enum(economicIndicatorNames).describe("The name of the economic indicator"),
170
- from: z.string().optional().describe("Start date in YYYY-MM-DD format (optional)"),
171
- to: z.string().optional().describe("End date in YYYY-MM-DD format (optional)")
335
+ from: z.string().optional().nullable().describe("Start date in YYYY-MM-DD format (optional)"),
336
+ to: z.string().optional().nullable().describe("End date in YYYY-MM-DD format (optional)")
172
337
  });
173
338
  var getTreasuryRates = createOpenAITool({
174
339
  name: "getTreasuryRates",
@@ -176,7 +341,10 @@ var getTreasuryRates = createOpenAITool({
176
341
  inputSchema: treasuryRatesInputSchema,
177
342
  execute: async ({ from, to }) => {
178
343
  const fmp = getFMPClient();
179
- const treasuryRates = await fmp.economic.getTreasuryRates({ from, to });
344
+ const treasuryRates = await fmp.economic.getTreasuryRates({
345
+ from: from ?? void 0,
346
+ to: to ?? void 0
347
+ });
180
348
  return JSON.stringify(treasuryRates.data, null, 2);
181
349
  }
182
350
  });
@@ -186,13 +354,17 @@ var getEconomicIndicators = createOpenAITool({
186
354
  inputSchema: economicIndicatorsInputSchema,
187
355
  execute: async ({ name, from, to }) => {
188
356
  const fmp = getFMPClient();
189
- const economicIndicators = await fmp.economic.getEconomicIndicators({ name, from, to });
357
+ const economicIndicators = await fmp.economic.getEconomicIndicators({
358
+ name,
359
+ from: from ?? void 0,
360
+ to: to ?? void 0
361
+ });
190
362
  return JSON.stringify(economicIndicators.data, null, 2);
191
363
  }
192
364
  });
193
365
  var etfHoldingsInputSchema = z.object({
194
366
  symbol: z.string().min(1, "ETF symbol is required").describe("ETF symbol (e.g., SPY, QQQ, VTI)"),
195
- date: z.string().optional().describe("Date for holdings in YYYY-MM-DD format (optional)")
367
+ date: z.string().optional().nullable().describe("Date for holdings in YYYY-MM-DD format (optional)")
196
368
  });
197
369
  var etfProfileInputSchema = z.object({
198
370
  symbol: z.string().min(1, "ETF symbol is required").describe("ETF symbol (e.g., SPY, QQQ, VTI)")
@@ -519,6 +691,7 @@ var fmpTools = [
519
691
  getStockSplits,
520
692
  getDividendHistory
521
693
  ];
694
+ checkOpenAIAgentsVersion();
522
695
 
523
696
  export { calendarTools, companyTools, economicTools, etfTools, financialTools, fmpTools, getBalanceSheet, getCashFlowStatement, getCompanyProfile, getDividendHistory, getETFHoldings, getETFProfile, getEarningsCalendar, getEconomicCalendar, getEconomicIndicators, getFinancialRatios, getGainers, getHouseTrading, getHouseTradingByName, getHouseTradingRSSFeed, getIncomeStatement, getInsiderTrading, getInstitutionalHolders, getLosers, getMarketCap, getMarketPerformance, getMostActive, getSectorPerformance, getSenateTrading, getSenateTradingByName, getSenateTradingRSSFeed, getStockQuote, getStockSplits, getTreasuryRates, insiderTools, institutionalTools, marketTools, quoteTools, senateHouseTools, stockTools };
524
697
  //# sourceMappingURL=index.mjs.map