@veroq/ai 1.0.0

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/dist/index.js ADDED
@@ -0,0 +1,911 @@
1
+ // src/tools/veroq-search.ts
2
+ import { tool } from "ai";
3
+ import { z } from "zod";
4
+ import { PolarisClient } from "polaris-news-api";
5
+ var veroqSearch = (options = {}) => tool({
6
+ description: "Search verified intelligence briefs with confidence scores and bias ratings across 18 verticals.",
7
+ parameters: z.object({
8
+ query: z.string().describe("The search query"),
9
+ category: z.string().optional().describe("Category slug (e.g. ai_ml, markets, crypto)"),
10
+ depth: z.enum(["fast", "standard", "deep"]).optional().describe("Speed tier: fast skips extras, deep adds entity cross-refs"),
11
+ limit: z.number().optional().describe("Max results to return (default 10)")
12
+ }),
13
+ execute: async ({ query, category, depth, limit }) => {
14
+ const client = new PolarisClient({ apiKey: options.apiKey });
15
+ return client.search(query, { category, depth, perPage: limit });
16
+ }
17
+ });
18
+
19
+ // src/tools/veroq-feed.ts
20
+ import { tool as tool2 } from "ai";
21
+ import { z as z2 } from "zod";
22
+ import { PolarisClient as PolarisClient2 } from "polaris-news-api";
23
+ var veroqFeed = (options = {}) => tool2({
24
+ description: "Get the latest verified intelligence briefs from the VEROQ knowledge feed, optionally filtered by category.",
25
+ parameters: z2.object({
26
+ category: z2.string().optional().describe("Category slug to filter by (e.g. technology, markets)"),
27
+ limit: z2.number().optional().describe("Max briefs to return (default 20)")
28
+ }),
29
+ execute: async ({ category, limit }) => {
30
+ const client = new PolarisClient2({ apiKey: options.apiKey });
31
+ return client.agentFeed({ category, limit });
32
+ }
33
+ });
34
+
35
+ // src/tools/veroq-brief.ts
36
+ import { tool as tool3 } from "ai";
37
+ import { z as z3 } from "zod";
38
+ import { PolarisClient as PolarisClient3 } from "polaris-news-api";
39
+ var veroqBrief = (options = {}) => tool3({
40
+ description: "Get a specific verified news brief by ID with full analysis, sources, and counter-arguments.",
41
+ parameters: z3.object({
42
+ id: z3.string().describe("The brief ID to retrieve")
43
+ }),
44
+ execute: async ({ id }) => {
45
+ const client = new PolarisClient3({ apiKey: options.apiKey });
46
+ return client.brief(id);
47
+ }
48
+ });
49
+
50
+ // src/tools/veroq-extract.ts
51
+ import { tool as tool4 } from "ai";
52
+ import { z as z4 } from "zod";
53
+ import { PolarisClient as PolarisClient4 } from "polaris-news-api";
54
+ var veroqExtract = (options = {}) => tool4({
55
+ description: "Extract clean article content from URLs. Returns structured text with metadata.",
56
+ parameters: z4.object({
57
+ urls: z4.array(z4.string()).min(1).max(5).describe("URLs to extract article content from (1-5)")
58
+ }),
59
+ execute: async ({ urls }) => {
60
+ const client = new PolarisClient4({ apiKey: options.apiKey });
61
+ return client.extract(urls);
62
+ }
63
+ });
64
+
65
+ // src/tools/veroq-entities.ts
66
+ import { tool as tool5 } from "ai";
67
+ import { z as z5 } from "zod";
68
+ import { PolarisClient as PolarisClient5 } from "polaris-news-api";
69
+ var veroqEntities = (options = {}) => tool5({
70
+ description: "Look up news coverage for a specific entity (company, person, technology).",
71
+ parameters: z5.object({
72
+ name: z5.string().describe(
73
+ "Entity name to look up (e.g. OpenAI, Elon Musk, quantum computing)"
74
+ )
75
+ }),
76
+ execute: async ({ name }) => {
77
+ const client = new PolarisClient5({ apiKey: options.apiKey });
78
+ return client.entityBriefs(name);
79
+ }
80
+ });
81
+
82
+ // src/tools/veroq-trending.ts
83
+ import { tool as tool6 } from "ai";
84
+ import { z as z6 } from "zod";
85
+ import { PolarisClient as PolarisClient6 } from "polaris-news-api";
86
+ var veroqTrending = (options = {}) => tool6({
87
+ description: "Get trending entities across the news \u2014 the people, companies, and topics generating the most coverage right now.",
88
+ parameters: z6.object({
89
+ limit: z6.number().optional().describe("Max entities to return (default 10)")
90
+ }),
91
+ execute: async ({ limit }) => {
92
+ const client = new PolarisClient6({ apiKey: options.apiKey });
93
+ return client.trendingEntities(limit);
94
+ }
95
+ });
96
+
97
+ // src/tools/veroq-compare.ts
98
+ import { tool as tool7 } from "ai";
99
+ import { z as z7 } from "zod";
100
+ import { PolarisClient as PolarisClient7 } from "polaris-news-api";
101
+ var veroqCompare = (options = {}) => tool7({
102
+ description: "Compare how different news outlets covered the same story. Shows framing, bias, and what each side emphasizes or omits.",
103
+ parameters: z7.object({
104
+ briefId: z7.string().describe("The brief ID to compare source coverage for")
105
+ }),
106
+ execute: async ({ briefId }) => {
107
+ const client = new PolarisClient7({ apiKey: options.apiKey });
108
+ return client.compareSources(briefId);
109
+ }
110
+ });
111
+
112
+ // src/tools/veroq-research.ts
113
+ import { tool as tool8 } from "ai";
114
+ import { z as z8 } from "zod";
115
+ import { PolarisClient as PolarisClient8 } from "polaris-news-api";
116
+ var veroqResearch = (options = {}) => tool8({
117
+ description: "Deep research across verified intelligence briefs. Synthesizes a comprehensive report with key findings and information gaps. Costs 5 API credits.",
118
+ parameters: z8.object({
119
+ query: z8.string().describe("Research query to investigate"),
120
+ category: z8.string().optional().describe("Category slug to focus research (e.g. ai_ml, policy)"),
121
+ maxSources: z8.number().optional().describe("Maximum briefs to analyze (1-50, default 20)")
122
+ }),
123
+ execute: async ({ query, category, maxSources }) => {
124
+ const client = new PolarisClient8({ apiKey: options.apiKey });
125
+ return client.research(query, { category, maxSources });
126
+ }
127
+ });
128
+
129
+ // src/tools/veroq-verify.ts
130
+ import { tool as tool9 } from "ai";
131
+ import { z as z9 } from "zod";
132
+ import { PolarisClient as PolarisClient9 } from "polaris-news-api";
133
+ var veroqVerify = (options = {}) => tool9({
134
+ description: "Fact-check a claim against the VEROQ brief corpus. Returns a verdict (supported/contradicted/partially_supported/unverifiable) with confidence, sources, and nuances.",
135
+ parameters: z9.object({
136
+ claim: z9.string().min(10).max(1e3).describe("The claim to fact-check"),
137
+ context: z9.string().optional().describe("Category to narrow the search (e.g. 'tech', 'policy')")
138
+ }),
139
+ execute: async ({ claim, context }) => {
140
+ const client = new PolarisClient9({ apiKey: options.apiKey });
141
+ return client.verify(claim, { context });
142
+ }
143
+ });
144
+
145
+ // src/tools/veroq-timeline.ts
146
+ import { tool as tool10 } from "ai";
147
+ import { z as z10 } from "zod";
148
+ import { PolarisClient as PolarisClient10 } from "polaris-news-api";
149
+ var veroqTimeline = (options = {}) => tool10({
150
+ description: "Get the story evolution timeline for a living brief \u2014 shows how coverage developed over time with versioned updates, confidence changes, and new sources.",
151
+ parameters: z10.object({
152
+ briefId: z10.string().describe("Brief ID")
153
+ }),
154
+ execute: async ({ briefId }) => {
155
+ const client = new PolarisClient10({ apiKey: options.apiKey });
156
+ return client.timeline(briefId);
157
+ }
158
+ });
159
+
160
+ // src/tools/veroq-forecast.ts
161
+ import { tool as tool11 } from "ai";
162
+ import { z as z11 } from "zod";
163
+ import { PolarisClient as PolarisClient11 } from "polaris-news-api";
164
+ var veroqForecast = (options = {}) => tool11({
165
+ description: "Generate a forward-looking forecast for a topic based on current intelligence trends, momentum signals, and historical patterns.",
166
+ parameters: z11.object({
167
+ topic: z11.string().describe("Topic to forecast future developments for"),
168
+ depth: z11.enum(["fast", "standard", "deep"]).optional().describe("Analysis depth")
169
+ }),
170
+ execute: async ({ topic, depth }) => {
171
+ const client = new PolarisClient11({ apiKey: options.apiKey });
172
+ return client.forecast(topic, { depth });
173
+ }
174
+ });
175
+
176
+ // src/tools/veroq-contradictions.ts
177
+ import { tool as tool12 } from "ai";
178
+ import { z as z12 } from "zod";
179
+ import { PolarisClient as PolarisClient12 } from "polaris-news-api";
180
+ var veroqContradictions = (options = {}) => tool12({
181
+ description: "Find contradictions across the intelligence brief network \u2014 stories where sources disagree on facts, framing, or conclusions.",
182
+ parameters: z12.object({
183
+ severity: z12.string().optional().describe("Filter by severity level (e.g. high, medium, low)")
184
+ }),
185
+ execute: async ({ severity }) => {
186
+ const client = new PolarisClient12({ apiKey: options.apiKey });
187
+ return client.contradictions({ severity });
188
+ }
189
+ });
190
+
191
+ // src/tools/veroq-events.ts
192
+ import { tool as tool13 } from "ai";
193
+ import { z as z13 } from "zod";
194
+ import { PolarisClient as PolarisClient13 } from "polaris-news-api";
195
+ var veroqEvents = (options = {}) => tool13({
196
+ description: "Get notable events detected across intelligence briefs \u2014 significant developments, announcements, and inflection points.",
197
+ parameters: z13.object({
198
+ type: z13.string().optional().describe("Event type to filter by"),
199
+ subject: z13.string().optional().describe("Subject or entity to filter events for")
200
+ }),
201
+ execute: async ({ type, subject }) => {
202
+ const client = new PolarisClient13({ apiKey: options.apiKey });
203
+ return client.events({ type, subject });
204
+ }
205
+ });
206
+
207
+ // src/tools/veroq-web-search.ts
208
+ import { tool as tool14 } from "ai";
209
+ import { z as z14 } from "zod";
210
+ import { PolarisClient as PolarisClient14 } from "polaris-news-api";
211
+ var veroqWebSearch = (options = {}) => tool14({
212
+ description: "Search the web with optional VEROQ trust scoring. Returns web results with relevance and optional verification.",
213
+ parameters: z14.object({
214
+ query: z14.string().describe("Web search query"),
215
+ limit: z14.number().optional().describe("Max results to return (default 5)"),
216
+ freshness: z14.string().optional().describe("Freshness filter (e.g. 'day', 'week', 'month')"),
217
+ region: z14.string().optional().describe("Region code (e.g. 'us', 'eu')"),
218
+ verify: z14.boolean().optional().describe("Enable VEROQ trust scoring on results")
219
+ }),
220
+ execute: async ({ query, limit, freshness, region, verify }) => {
221
+ const client = new PolarisClient14({ apiKey: options.apiKey });
222
+ return client.webSearch(query, { limit, freshness, region, verify });
223
+ }
224
+ });
225
+
226
+ // src/tools/veroq-crawl.ts
227
+ import { tool as tool15 } from "ai";
228
+ import { z as z15 } from "zod";
229
+ import { PolarisClient as PolarisClient15 } from "polaris-news-api";
230
+ var veroqCrawl = (options = {}) => tool15({
231
+ description: "Extract structured content from a URL with optional link following. Returns page content, metadata, and optionally discovered links.",
232
+ parameters: z15.object({
233
+ url: z15.string().url().describe("URL to crawl and extract content from"),
234
+ depth: z15.number().optional().describe("Crawl depth (default 1)"),
235
+ max_pages: z15.number().optional().describe("Max pages to crawl (default 5)"),
236
+ include_links: z15.boolean().optional().describe("Include extracted links in response")
237
+ }),
238
+ execute: async ({ url, depth, max_pages, include_links }) => {
239
+ const client = new PolarisClient15({ apiKey: options.apiKey });
240
+ return client.crawl(url, { depth, max_pages, include_links });
241
+ }
242
+ });
243
+
244
+ // src/tools/veroq-ticker-resolve.ts
245
+ import { tool as tool16 } from "ai";
246
+ import { z as z16 } from "zod";
247
+ import { PolarisClient as PolarisClient16 } from "polaris-news-api";
248
+ var veroqTickerResolve = (options = {}) => tool16({
249
+ description: "Resolve ticker symbols to company names and sectors. Pass one or more comma-separated symbols to validate them against the VEROQ knowledge base.",
250
+ parameters: z16.object({
251
+ q: z16.string().describe(
252
+ "Comma-separated ticker symbols to resolve (e.g. AAPL,MSFT,TSLA)"
253
+ )
254
+ }),
255
+ execute: async ({ q }) => {
256
+ const client = new PolarisClient16({ apiKey: options.apiKey });
257
+ const symbols = q.split(",").map((s) => s.trim());
258
+ return client.tickerResolve(symbols);
259
+ }
260
+ });
261
+
262
+ // src/tools/veroq-ticker.ts
263
+ import { tool as tool17 } from "ai";
264
+ import { z as z17 } from "zod";
265
+ import { PolarisClient as PolarisClient17 } from "polaris-news-api";
266
+ var veroqTicker = (options = {}) => tool17({
267
+ description: "Look up a single ticker symbol to get its brief count, sentiment, sector, and last mention timestamp.",
268
+ parameters: z17.object({
269
+ symbol: z17.string().describe("Ticker symbol to look up (e.g. AAPL)")
270
+ }),
271
+ execute: async ({ symbol }) => {
272
+ const client = new PolarisClient17({ apiKey: options.apiKey });
273
+ return client.ticker(symbol);
274
+ }
275
+ });
276
+
277
+ // src/tools/veroq-ticker-history.ts
278
+ import { tool as tool18 } from "ai";
279
+ import { z as z18 } from "zod";
280
+ import { PolarisClient as PolarisClient18 } from "polaris-news-api";
281
+ var veroqTickerHistory = (options = {}) => tool18({
282
+ description: "Get daily sentiment timeseries for a ticker symbol \u2014 tracks how news sentiment has changed over time.",
283
+ parameters: z18.object({
284
+ symbol: z18.string().describe("Ticker symbol (e.g. AAPL)"),
285
+ days: z18.number().optional().describe("Number of days of history to return (default 30)")
286
+ }),
287
+ execute: async ({ symbol, days }) => {
288
+ const client = new PolarisClient18({ apiKey: options.apiKey });
289
+ return client.tickerHistory(symbol, { days });
290
+ }
291
+ });
292
+
293
+ // src/tools/veroq-ticker-score.ts
294
+ import { tool as tool19 } from "ai";
295
+ import { z as z19 } from "zod";
296
+ import { PolarisClient as PolarisClient19 } from "polaris-news-api";
297
+ var veroqTickerScore = (options = {}) => tool19({
298
+ description: "Get a composite trading signal score for a ticker, combining sentiment, momentum, volume, and other intelligence signals into a single score.",
299
+ parameters: z19.object({
300
+ symbol: z19.string().describe("Ticker symbol to score (e.g. AAPL)")
301
+ }),
302
+ execute: async ({ symbol }) => {
303
+ const client = new PolarisClient19({ apiKey: options.apiKey });
304
+ return client.tickerScore(symbol);
305
+ }
306
+ });
307
+
308
+ // src/tools/veroq-sectors.ts
309
+ import { tool as tool20 } from "ai";
310
+ import { z as z20 } from "zod";
311
+ import { PolarisClient as PolarisClient20 } from "polaris-news-api";
312
+ var veroqSectors = (options = {}) => tool20({
313
+ description: "Get all market sectors with sentiment overview \u2014 shows which sectors are trending positive or negative based on intelligence coverage.",
314
+ parameters: z20.object({
315
+ days: z20.number().optional().describe("Lookback window in days (default 7)")
316
+ }),
317
+ execute: async ({ days }) => {
318
+ const client = new PolarisClient20({ apiKey: options.apiKey });
319
+ return client.sectors({ days });
320
+ }
321
+ });
322
+
323
+ // src/tools/veroq-portfolio-feed.ts
324
+ import { tool as tool21 } from "ai";
325
+ import { z as z21 } from "zod";
326
+ import { PolarisClient as PolarisClient21 } from "polaris-news-api";
327
+ var veroqPortfolioFeed = (options = {}) => tool21({
328
+ description: "Pass portfolio holdings (tickers + weights) and get ranked intelligence briefs relevant to your positions.",
329
+ parameters: z21.object({
330
+ holdings: z21.array(
331
+ z21.object({
332
+ ticker: z21.string().describe("Ticker symbol (e.g. AAPL)"),
333
+ weight: z21.number().describe("Portfolio weight as a decimal (e.g. 0.25 for 25%)")
334
+ })
335
+ ).min(1).describe("Array of portfolio holdings with ticker and weight"),
336
+ days: z21.number().optional().describe("Lookback window in days (default 7)"),
337
+ limit: z21.number().optional().describe("Max briefs to return (default 20)")
338
+ }),
339
+ execute: async ({ holdings, days, limit }) => {
340
+ const client = new PolarisClient21({ apiKey: options.apiKey });
341
+ return client.portfolioFeed(holdings, { days, limit });
342
+ }
343
+ });
344
+
345
+ // src/tools/veroq-events-calendar.ts
346
+ import { tool as tool22 } from "ai";
347
+ import { z as z22 } from "zod";
348
+ import { PolarisClient as PolarisClient22 } from "polaris-news-api";
349
+ var veroqEventsCalendar = (options = {}) => tool22({
350
+ description: "Get structured market events (earnings, launches, regulatory deadlines, etc.) filterable by ticker and event type.",
351
+ parameters: z22.object({
352
+ ticker: z22.string().optional().describe("Filter events for a specific ticker symbol"),
353
+ type: z22.string().optional().describe("Filter by event type (e.g. earnings, launch, regulatory)"),
354
+ days: z22.number().optional().describe("Lookback/lookahead window in days (default 30)"),
355
+ limit: z22.number().optional().describe("Max events to return (default 30)")
356
+ }),
357
+ execute: async ({ ticker, type, days, limit }) => {
358
+ const client = new PolarisClient22({ apiKey: options.apiKey });
359
+ return client.eventsCalendar({ ticker, type, days, limit });
360
+ }
361
+ });
362
+
363
+ // src/tools/veroq-candles.ts
364
+ import { tool as tool23 } from "ai";
365
+ import { z as z23 } from "zod";
366
+
367
+ // src/tools/_fetch.ts
368
+ var DEFAULT_BASE_URL = "https://api.thepolarisreport.com";
369
+ async function veroqGet(options, path, params) {
370
+ const base = (options.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, "");
371
+ const qs = new URLSearchParams();
372
+ if (params) {
373
+ for (const [k, v] of Object.entries(params)) {
374
+ if (v !== void 0) qs.set(k, v);
375
+ }
376
+ }
377
+ const qsStr = qs.toString();
378
+ const url = `${base}${path}${qsStr ? `?${qsStr}` : ""}`;
379
+ const headers = { "Content-Type": "application/json" };
380
+ if (options.apiKey) headers["Authorization"] = `Bearer ${options.apiKey}`;
381
+ const res = await fetch(url, { headers });
382
+ if (!res.ok) throw new Error(`VEROQ API error ${res.status}`);
383
+ return res.json();
384
+ }
385
+ async function veroqPost(options, path, body) {
386
+ const base = (options.baseUrl || DEFAULT_BASE_URL).replace(/\/+$/, "");
387
+ const url = `${base}${path}`;
388
+ const headers = { "Content-Type": "application/json" };
389
+ if (options.apiKey) headers["Authorization"] = `Bearer ${options.apiKey}`;
390
+ const res = await fetch(url, { method: "POST", headers, body: JSON.stringify(body) });
391
+ if (!res.ok) throw new Error(`VEROQ API error ${res.status}`);
392
+ return res.json();
393
+ }
394
+
395
+ // src/tools/veroq-candles.ts
396
+ var veroqCandles = (options = {}) => tool23({
397
+ description: "Get OHLCV candlestick data for a ticker symbol. Returns date, open, high, low, close, and volume for each period.",
398
+ parameters: z23.object({
399
+ symbol: z23.string().describe("Ticker symbol (e.g. AAPL, MSFT)"),
400
+ interval: z23.enum(["1d", "1wk", "1mo"]).optional().describe("Candle interval (default 1d)"),
401
+ range: z23.enum(["1mo", "3mo", "6mo", "1y", "2y", "5y"]).optional().describe("Date range (default 6mo)")
402
+ }),
403
+ execute: async ({ symbol, interval, range }) => {
404
+ return veroqGet(options, `/api/v1/ticker/${encodeURIComponent(symbol)}/candles`, {
405
+ interval,
406
+ range
407
+ });
408
+ }
409
+ });
410
+
411
+ // src/tools/veroq-technicals.ts
412
+ import { tool as tool24 } from "ai";
413
+ import { z as z24 } from "zod";
414
+ var veroqTechnicals = (options = {}) => tool24({
415
+ description: "Get all technical indicators and a signal summary for a ticker. Includes SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Stochastic, ADX, OBV, and VWAP with an overall buy/sell/neutral verdict.",
416
+ parameters: z24.object({
417
+ symbol: z24.string().describe("Ticker symbol (e.g. NVDA)"),
418
+ range: z24.enum(["1mo", "3mo", "6mo", "1y", "2y", "5y"]).optional().describe("Date range for indicator calculation (default 6mo)")
419
+ }),
420
+ execute: async ({ symbol, range }) => {
421
+ return veroqGet(options, `/api/v1/ticker/${encodeURIComponent(symbol)}/technicals`, {
422
+ range
423
+ });
424
+ }
425
+ });
426
+
427
+ // src/tools/veroq-market-movers.ts
428
+ import { tool as tool25 } from "ai";
429
+ import { z as z25 } from "zod";
430
+ var veroqMarketMovers = (options = {}) => tool25({
431
+ description: "Get top market movers \u2014 gainers, losers, and most active stocks by volume. Useful for a quick snapshot of what is moving in the market right now.",
432
+ parameters: z25.object({}),
433
+ execute: async () => {
434
+ return veroqGet(options, "/api/v1/market/movers");
435
+ }
436
+ });
437
+
438
+ // src/tools/veroq-economy.ts
439
+ import { tool as tool26 } from "ai";
440
+ import { z as z26 } from "zod";
441
+ var veroqEconomy = (options = {}) => tool26({
442
+ description: "Get economic indicators from the FRED API. Without an indicator slug, returns a summary of all key indicators (GDP, CPI, unemployment, etc.). With a slug, returns that indicator's history.",
443
+ parameters: z26.object({
444
+ indicator: z26.string().optional().describe("Indicator slug (e.g. gdp, cpi, unemployment, fed_funds). Omit for summary of all."),
445
+ limit: z26.number().optional().describe("Number of historical observations to return (default 30, max 100)")
446
+ }),
447
+ execute: async ({ indicator, limit }) => {
448
+ const path = indicator ? `/api/v1/economy/${encodeURIComponent(indicator)}` : "/api/v1/economy";
449
+ return veroqGet(options, path, {
450
+ limit: limit !== void 0 ? String(limit) : void 0
451
+ });
452
+ }
453
+ });
454
+
455
+ // src/tools/veroq-forex.ts
456
+ import { tool as tool27 } from "ai";
457
+ import { z as z27 } from "zod";
458
+ var veroqForex = (options = {}) => tool27({
459
+ description: "Get forex exchange rates. Without a pair, returns all major forex pairs. With a pair (e.g. EURUSD), returns that specific rate and change data.",
460
+ parameters: z27.object({
461
+ pair: z27.string().optional().describe("Forex pair (e.g. EURUSD, GBPUSD, USDJPY). Omit for all pairs.")
462
+ }),
463
+ execute: async ({ pair }) => {
464
+ const path = pair ? `/api/v1/forex/${encodeURIComponent(pair.toUpperCase())}` : "/api/v1/forex";
465
+ return veroqGet(options, path);
466
+ }
467
+ });
468
+
469
+ // src/tools/veroq-commodities.ts
470
+ import { tool as tool28 } from "ai";
471
+ import { z as z28 } from "zod";
472
+ var veroqCommodities = (options = {}) => tool28({
473
+ description: "Get commodity prices. Without a symbol, returns all tracked commodities (gold, oil, silver, etc.). With a symbol, returns that commodity's current price and change data.",
474
+ parameters: z28.object({
475
+ symbol: z28.string().optional().describe("Commodity slug (e.g. gold, oil, silver, natural_gas). Omit for all.")
476
+ }),
477
+ execute: async ({ symbol }) => {
478
+ const path = symbol ? `/api/v1/commodities/${encodeURIComponent(symbol.toLowerCase())}` : "/api/v1/commodities";
479
+ return veroqGet(options, path);
480
+ }
481
+ });
482
+
483
+ // src/tools/veroq-crypto.ts
484
+ import { tool as tool29 } from "ai";
485
+ import { z as z29 } from "zod";
486
+ var veroqCrypto = (options = {}) => tool29({
487
+ description: "Get crypto market data. Without a symbol, returns market overview (total market cap, BTC dominance, etc.). With a symbol (e.g. BTC, ETH, SOL), returns that token's price, volume, and metadata.",
488
+ parameters: z29.object({
489
+ symbol: z29.string().optional().describe("Crypto symbol (e.g. BTC, ETH, SOL). Omit for market overview.")
490
+ }),
491
+ execute: async ({ symbol }) => {
492
+ const path = symbol ? `/api/v1/crypto/${encodeURIComponent(symbol.toUpperCase())}` : "/api/v1/crypto";
493
+ return veroqGet(options, path);
494
+ }
495
+ });
496
+
497
+ // src/tools/veroq-crypto-defi.ts
498
+ import { tool as tool30 } from "ai";
499
+ import { z as z30 } from "zod";
500
+ var veroqCryptoDefi = (options = {}) => tool30({
501
+ description: "Get DeFi (decentralized finance) data. Without a protocol, returns TVL overview with top protocols and chain breakdown. With a protocol slug (e.g. aave, uniswap), returns that protocol's TVL history and details.",
502
+ parameters: z30.object({
503
+ protocol: z30.string().optional().describe("DeFi protocol slug (e.g. aave, uniswap, lido). Omit for overview.")
504
+ }),
505
+ execute: async ({ protocol }) => {
506
+ const path = protocol ? `/api/v1/crypto/defi/${encodeURIComponent(protocol.toLowerCase())}` : "/api/v1/crypto/defi";
507
+ return veroqGet(options, path);
508
+ }
509
+ });
510
+
511
+ // src/tools/veroq-backtest.ts
512
+ import { tool as tool31 } from "ai";
513
+ import { z as z31 } from "zod";
514
+ import { PolarisClient as PolarisClient23 } from "polaris-news-api";
515
+ var veroqBacktest = (options = {}) => tool31({
516
+ description: "Backtest a news-driven trading strategy. Define entry/exit filters based on sentiment, RSI, and other signals, then see historical performance including return, drawdown, Sharpe ratio, and win rate.",
517
+ parameters: z31.object({
518
+ strategy: z31.object({
519
+ entry_filters: z31.record(z31.unknown()).describe("Entry signal filters (e.g. { rsi_below: 30, sentiment_above: 0.3 })"),
520
+ exit_filters: z31.record(z31.unknown()).describe("Exit signal filters (e.g. { rsi_above: 50 })"),
521
+ asset_type: z31.string().optional().describe("Asset type filter (e.g. equity, crypto)"),
522
+ sector: z31.string().optional().describe("Sector filter (e.g. Semiconductors, Technology)")
523
+ }).describe("Strategy definition with entry/exit filters"),
524
+ period: z31.string().optional().describe("Backtest period (e.g. 1y, 6mo, 3mo). Default: 1y")
525
+ }),
526
+ execute: async ({ strategy, period }) => {
527
+ const client = new PolarisClient23({ apiKey: options.apiKey });
528
+ return client.backtest(strategy, { period: period ?? "1y" });
529
+ }
530
+ });
531
+
532
+ // src/tools/veroq-correlation.ts
533
+ import { tool as tool32 } from "ai";
534
+ import { z as z32 } from "zod";
535
+ import { PolarisClient as PolarisClient24 } from "polaris-news-api";
536
+ var veroqCorrelation = (options = {}) => tool32({
537
+ description: "Get a news-sentiment correlation matrix for multiple tickers. Shows how closely related their coverage patterns and sentiment movements are over a given period.",
538
+ parameters: z32.object({
539
+ tickers: z32.array(z32.string()).min(2).describe("Array of ticker symbols to correlate (e.g. ['NVDA', 'AMD', 'INTC'])"),
540
+ days: z32.number().optional().describe("Lookback period in days (default 30)")
541
+ }),
542
+ execute: async ({ tickers, days }) => {
543
+ const client = new PolarisClient24({ apiKey: options.apiKey });
544
+ return client.correlation(tickers, { days: days ?? 30 });
545
+ }
546
+ });
547
+
548
+ // src/tools/veroq-screener.ts
549
+ import { tool as tool33 } from "ai";
550
+ import { z as z33 } from "zod";
551
+ import { PolarisClient as PolarisClient25 } from "polaris-news-api";
552
+ var veroqScreener = (options = {}) => tool33({
553
+ description: "Screen stocks using natural language. Describe what you're looking for (e.g. 'oversold tech stocks with upcoming earnings') and get matching tickers with scores.",
554
+ parameters: z33.object({
555
+ query: z33.string().describe("Natural language screening query"),
556
+ limit: z33.number().optional().describe("Max results to return (default 20)")
557
+ }),
558
+ execute: async ({ query, limit }) => {
559
+ const client = new PolarisClient25({ apiKey: options.apiKey });
560
+ return client.screenerNatural(query, { limit });
561
+ }
562
+ });
563
+
564
+ // src/tools/veroq-news-impact.ts
565
+ import { tool as tool34 } from "ai";
566
+ import { z as z34 } from "zod";
567
+ import { PolarisClient as PolarisClient26 } from "polaris-news-api";
568
+ var veroqNewsImpact = (options = {}) => tool34({
569
+ description: "Analyze the impact of news coverage on a ticker's price and sentiment. Shows how recent news events correlated with price movements.",
570
+ parameters: z34.object({
571
+ symbol: z34.string().describe("Ticker symbol to analyze (e.g. NVDA)")
572
+ }),
573
+ execute: async ({ symbol }) => {
574
+ const client = new PolarisClient26({ apiKey: options.apiKey });
575
+ return client.newsImpact(symbol);
576
+ }
577
+ });
578
+
579
+ // src/tools/veroq-competitors.ts
580
+ import { tool as tool35 } from "ai";
581
+ import { z as z35 } from "zod";
582
+ import { PolarisClient as PolarisClient27 } from "polaris-news-api";
583
+ var veroqCompetitors = (options = {}) => tool35({
584
+ description: "Get the competitive landscape for a ticker. Returns competitors with comparative sentiment, coverage volume, and sector positioning.",
585
+ parameters: z35.object({
586
+ symbol: z35.string().describe("Ticker symbol to get competitors for (e.g. NVDA)")
587
+ }),
588
+ execute: async ({ symbol }) => {
589
+ const client = new PolarisClient27({ apiKey: options.apiKey });
590
+ return client.competitors(symbol);
591
+ }
592
+ });
593
+
594
+ // src/tools/veroq-social-sentiment.ts
595
+ import { tool as tool36 } from "ai";
596
+ import { z as z36 } from "zod";
597
+ var veroqSocialSentiment = (options = {}) => tool36({
598
+ description: "Get social media sentiment for a ticker symbol \u2014 tracks mentions, sentiment scores, and trending status across social platforms.",
599
+ parameters: z36.object({
600
+ symbol: z36.string().describe("Ticker symbol to look up (e.g. AAPL)")
601
+ }),
602
+ execute: async ({ symbol }) => {
603
+ const path = `/api/v1/ticker/${encodeURIComponent(symbol.toUpperCase())}/social`;
604
+ return veroqGet(options, path);
605
+ }
606
+ });
607
+
608
+ // src/tools/veroq-social-trending.ts
609
+ import { tool as tool37 } from "ai";
610
+ import { z as z37 } from "zod";
611
+ var veroqSocialTrending = (options = {}) => tool37({
612
+ description: "Get trending tickers on social media \u2014 shows which stocks and crypto are generating the most buzz across social platforms right now.",
613
+ parameters: z37.object({
614
+ limit: z37.number().optional().describe("Max results to return (default 20)")
615
+ }),
616
+ execute: async ({ limit }) => {
617
+ return veroqGet(options, "/api/v1/social/trending", {
618
+ limit: limit !== void 0 ? String(limit) : void 0
619
+ });
620
+ }
621
+ });
622
+
623
+ // src/tools/veroq-ipo-calendar.ts
624
+ import { tool as tool38 } from "ai";
625
+ import { z as z38 } from "zod";
626
+ var veroqIpoCalendar = (options = {}) => tool38({
627
+ description: "Get upcoming IPOs \u2014 lists companies preparing to go public with expected dates, price ranges, and exchange listings.",
628
+ parameters: z38.object({
629
+ limit: z38.number().optional().describe("Max results to return (default 20)")
630
+ }),
631
+ execute: async ({ limit }) => {
632
+ return veroqGet(options, "/api/v1/ipo/calendar", {
633
+ limit: limit !== void 0 ? String(limit) : void 0
634
+ });
635
+ }
636
+ });
637
+
638
+ // src/tools/veroq-ticker-news.ts
639
+ import { tool as tool39 } from "ai";
640
+ import { z as z39 } from "zod";
641
+ var veroqTickerNews = (options = {}) => tool39({
642
+ description: "Get recent news articles for a specific ticker symbol \u2014 returns headlines, sources, timestamps, and sentiment for each article.",
643
+ parameters: z39.object({
644
+ symbol: z39.string().describe("Ticker symbol to get news for (e.g. AAPL)"),
645
+ limit: z39.number().optional().describe("Max articles to return (default 20)")
646
+ }),
647
+ execute: async ({ symbol, limit }) => {
648
+ const path = `/api/v1/ticker/${encodeURIComponent(symbol.toUpperCase())}/news`;
649
+ return veroqGet(options, path, {
650
+ limit: limit !== void 0 ? String(limit) : void 0
651
+ });
652
+ }
653
+ });
654
+
655
+ // src/tools/veroq-ticker-analysis.ts
656
+ import { tool as tool40 } from "ai";
657
+ import { z as z40 } from "zod";
658
+ var veroqTickerAnalysis = (options = {}) => tool40({
659
+ description: "Get a full analysis for a ticker symbol \u2014 includes sentiment breakdown, technical signals, news summary, and an overall outlook.",
660
+ parameters: z40.object({
661
+ symbol: z40.string().describe("Ticker symbol to analyze (e.g. NVDA)")
662
+ }),
663
+ execute: async ({ symbol }) => {
664
+ const path = `/api/v1/ticker/${encodeURIComponent(symbol.toUpperCase())}/analysis`;
665
+ return veroqGet(options, path);
666
+ }
667
+ });
668
+
669
+ // src/tools/veroq-search-suggest.ts
670
+ import { tool as tool41 } from "ai";
671
+ import { z as z41 } from "zod";
672
+ var veroqSearchSuggest = (options = {}) => tool41({
673
+ description: "Get search autocomplete suggestions \u2014 returns matching topics, tickers, and entities as the user types a query.",
674
+ parameters: z41.object({
675
+ q: z41.string().describe("Partial search query to get suggestions for")
676
+ }),
677
+ execute: async ({ q }) => {
678
+ return veroqGet(options, "/api/v1/search/suggest", { q });
679
+ }
680
+ });
681
+
682
+ // src/tools/veroq-defi-protocol.ts
683
+ import { tool as tool42 } from "ai";
684
+ import { z as z42 } from "zod";
685
+ var veroqDefiProtocol = (options = {}) => tool42({
686
+ description: "Get detailed data for a specific DeFi protocol \u2014 includes TVL history, chain breakdown, token info, and protocol metrics.",
687
+ parameters: z42.object({
688
+ protocol: z42.string().describe("DeFi protocol slug (e.g. aave, uniswap, lido)")
689
+ }),
690
+ execute: async ({ protocol }) => {
691
+ const path = `/api/v1/crypto/defi/${encodeURIComponent(protocol.toLowerCase())}`;
692
+ return veroqGet(options, path);
693
+ }
694
+ });
695
+
696
+ // src/tools/veroq-economy-indicator.ts
697
+ import { tool as tool43 } from "ai";
698
+ import { z as z43 } from "zod";
699
+ var veroqEconomyIndicator = (options = {}) => tool43({
700
+ description: "Get data for a specific economic indicator \u2014 returns historical observations, current value, and trend for indicators like GDP, CPI, unemployment, and fed funds rate.",
701
+ parameters: z43.object({
702
+ indicator: z43.string().describe("Economic indicator slug (e.g. gdp, cpi, unemployment, fed_funds)"),
703
+ limit: z43.number().optional().describe("Number of historical observations to return (default 30, max 100)")
704
+ }),
705
+ execute: async ({ indicator, limit }) => {
706
+ const path = `/api/v1/economy/${encodeURIComponent(indicator)}`;
707
+ return veroqGet(options, path, {
708
+ limit: limit !== void 0 ? String(limit) : void 0
709
+ });
710
+ }
711
+ });
712
+
713
+ // src/tools/veroq-generate-report.ts
714
+ import { tool as tool44 } from "ai";
715
+ import { z as z44 } from "zod";
716
+ import { PolarisClient as PolarisClient28 } from "polaris-news-api";
717
+ var veroqGenerateReport = (options = {}) => tool44({
718
+ description: "Generate an AI-powered research report for a given ticker symbol. Returns a comprehensive analysis including fundamentals, technicals, and news sentiment.",
719
+ parameters: z44.object({
720
+ ticker: z44.string().describe("The ticker symbol to generate a report for (e.g. AAPL, BTC)"),
721
+ tier: z44.string().optional().describe("Report tier \u2014 'quick' for a fast summary or 'deep' for full analysis (default 'quick')")
722
+ }),
723
+ execute: async ({ ticker, tier }) => {
724
+ const client = new PolarisClient28({ apiKey: options.apiKey });
725
+ return client.generateReport(ticker, tier);
726
+ }
727
+ });
728
+
729
+ // src/tools/veroq-get-report.ts
730
+ import { tool as tool45 } from "ai";
731
+ import { z as z45 } from "zod";
732
+ import { PolarisClient as PolarisClient29 } from "polaris-news-api";
733
+ var veroqGetReport = (options = {}) => tool45({
734
+ description: "Retrieve a previously generated report by its ID. Returns the full report content including all analysis sections.",
735
+ parameters: z45.object({
736
+ reportId: z45.string().describe("The report ID to retrieve")
737
+ }),
738
+ execute: async ({ reportId }) => {
739
+ const client = new PolarisClient29({ apiKey: options.apiKey });
740
+ return client.getReport(reportId);
741
+ }
742
+ });
743
+
744
+ // src/tools/veroq-ask.ts
745
+ import { tool as tool46 } from "ai";
746
+ import { z as z46 } from "zod";
747
+ var veroqAsk = (options = {}) => tool46({
748
+ description: "Ask any question about markets, companies, economics, or geopolitics and get an AI-generated answer grounded in verified intelligence briefs. The most versatile tool in the VEROQ toolkit.",
749
+ parameters: z46.object({
750
+ question: z46.string().describe("The question to ask (e.g. 'What is driving NVIDIA stock price this week?')")
751
+ }),
752
+ execute: async ({ question }) => {
753
+ return veroqPost(options, "/api/v1/ask", { question });
754
+ }
755
+ });
756
+
757
+ // src/tools/veroq-full.ts
758
+ import { tool as tool47 } from "ai";
759
+ import { z as z47 } from "zod";
760
+ var veroqFull = (options = {}) => tool47({
761
+ description: "Get a comprehensive full profile for a ticker symbol \u2014 combines price, fundamentals, technicals, sentiment, news, and analyst data in a single call.",
762
+ parameters: z47.object({
763
+ ticker: z47.string().describe("Ticker symbol to look up (e.g. AAPL, BTC, ETH)")
764
+ }),
765
+ execute: async ({ ticker }) => {
766
+ const path = `/api/v1/ticker/${encodeURIComponent(ticker.toUpperCase())}/full`;
767
+ return veroqGet(options, path);
768
+ }
769
+ });
770
+
771
+ // src/tools/veroq-insider.ts
772
+ import { tool as tool48 } from "ai";
773
+ import { z as z48 } from "zod";
774
+ var veroqInsider = (options = {}) => tool48({
775
+ description: "Get recent insider trading activity for a ticker symbol \u2014 shows buys, sells, and option exercises by company officers and directors.",
776
+ parameters: z48.object({
777
+ ticker: z48.string().describe("Ticker symbol to look up insider trades for (e.g. AAPL)")
778
+ }),
779
+ execute: async ({ ticker }) => {
780
+ const path = `/api/v1/ticker/${encodeURIComponent(ticker.toUpperCase())}/insider`;
781
+ return veroqGet(options, path);
782
+ }
783
+ });
784
+
785
+ // src/tools/veroq-filings.ts
786
+ import { tool as tool49 } from "ai";
787
+ import { z as z49 } from "zod";
788
+ var veroqFilings = (options = {}) => tool49({
789
+ description: "Get recent SEC filings for a ticker symbol \u2014 includes 10-K, 10-Q, 8-K, and other regulatory filings with links and summaries.",
790
+ parameters: z49.object({
791
+ ticker: z49.string().describe("Ticker symbol to look up filings for (e.g. TSLA)")
792
+ }),
793
+ execute: async ({ ticker }) => {
794
+ const path = `/api/v1/ticker/${encodeURIComponent(ticker.toUpperCase())}/filings`;
795
+ return veroqGet(options, path);
796
+ }
797
+ });
798
+
799
+ // src/tools/veroq-analysts.ts
800
+ import { tool as tool50 } from "ai";
801
+ import { z as z50 } from "zod";
802
+ var veroqAnalysts = (options = {}) => tool50({
803
+ description: "Get Wall Street analyst ratings and price targets for a ticker symbol \u2014 includes consensus rating, target prices, and recent upgrades/downgrades.",
804
+ parameters: z50.object({
805
+ ticker: z50.string().describe("Ticker symbol to look up analyst ratings for (e.g. MSFT)")
806
+ }),
807
+ execute: async ({ ticker }) => {
808
+ const path = `/api/v1/ticker/${encodeURIComponent(ticker.toUpperCase())}/analysts`;
809
+ return veroqGet(options, path);
810
+ }
811
+ });
812
+
813
+ // src/tools/veroq-congress.ts
814
+ import { tool as tool51 } from "ai";
815
+ import { z as z51 } from "zod";
816
+ var veroqCongress = (options = {}) => tool51({
817
+ description: "Get recent stock trades disclosed by U.S. Congress members. Optionally filter by a specific ticker symbol.",
818
+ parameters: z51.object({
819
+ symbol: z51.string().optional().describe("Ticker symbol to filter trades (e.g. NVDA). Omit for all recent congressional trades.")
820
+ }),
821
+ execute: async ({ symbol }) => {
822
+ return veroqGet(options, "/api/v1/congress/trades", {
823
+ symbol: symbol ? symbol.toUpperCase() : void 0
824
+ });
825
+ }
826
+ });
827
+
828
+ // src/tools/veroq-institutions.ts
829
+ import { tool as tool52 } from "ai";
830
+ import { z as z52 } from "zod";
831
+ var veroqInstitutions = (options = {}) => tool52({
832
+ description: "Get institutional ownership data for a ticker symbol \u2014 shows top holders, recent position changes, and ownership concentration.",
833
+ parameters: z52.object({
834
+ ticker: z52.string().describe("Ticker symbol to look up institutional ownership for (e.g. GOOG)")
835
+ }),
836
+ execute: async ({ ticker }) => {
837
+ const path = `/api/v1/ticker/${encodeURIComponent(ticker.toUpperCase())}/institutions`;
838
+ return veroqGet(options, path);
839
+ }
840
+ });
841
+
842
+ // src/tools/veroq-run-agent.ts
843
+ import { tool as tool53 } from "ai";
844
+ import { z as z53 } from "zod";
845
+ var veroqRunAgent = (options = {}) => tool53({
846
+ description: "Run a VEROQ agent by its slug with custom inputs. Agents perform multi-step research, analysis, and reporting workflows.",
847
+ parameters: z53.object({
848
+ slug: z53.string().describe("The agent slug to run (e.g. 'earnings-analyzer', 'sector-report')"),
849
+ inputs: z53.record(z53.unknown()).describe("Key-value inputs to pass to the agent")
850
+ }),
851
+ execute: async ({ slug, inputs }) => {
852
+ const path = `/api/v1/agents/run/${encodeURIComponent(slug)}`;
853
+ return veroqPost(options, path, inputs);
854
+ }
855
+ });
856
+ export {
857
+ veroqAnalysts,
858
+ veroqAsk,
859
+ veroqBacktest,
860
+ veroqBrief,
861
+ veroqCandles,
862
+ veroqCommodities,
863
+ veroqCompare,
864
+ veroqCompetitors,
865
+ veroqCongress,
866
+ veroqContradictions,
867
+ veroqCorrelation,
868
+ veroqCrawl,
869
+ veroqCrypto,
870
+ veroqCryptoDefi,
871
+ veroqDefiProtocol,
872
+ veroqEconomy,
873
+ veroqEconomyIndicator,
874
+ veroqEntities,
875
+ veroqEvents,
876
+ veroqEventsCalendar,
877
+ veroqExtract,
878
+ veroqFeed,
879
+ veroqFilings,
880
+ veroqForecast,
881
+ veroqForex,
882
+ veroqFull,
883
+ veroqGenerateReport,
884
+ veroqGetReport,
885
+ veroqInsider,
886
+ veroqInstitutions,
887
+ veroqIpoCalendar,
888
+ veroqMarketMovers,
889
+ veroqNewsImpact,
890
+ veroqPortfolioFeed,
891
+ veroqResearch,
892
+ veroqRunAgent,
893
+ veroqScreener,
894
+ veroqSearch,
895
+ veroqSearchSuggest,
896
+ veroqSectors,
897
+ veroqSocialSentiment,
898
+ veroqSocialTrending,
899
+ veroqTechnicals,
900
+ veroqTicker,
901
+ veroqTickerAnalysis,
902
+ veroqTickerHistory,
903
+ veroqTickerNews,
904
+ veroqTickerResolve,
905
+ veroqTickerScore,
906
+ veroqTimeline,
907
+ veroqTrending,
908
+ veroqVerify,
909
+ veroqWebSearch
910
+ };
911
+ //# sourceMappingURL=index.js.map