@tool-bridge/server 0.21.1 → 0.22.1

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.
Files changed (178) hide show
  1. package/dist/admin.js +170 -0
  2. package/dist/airtable-ML2GIGCH.js +790 -0
  3. package/dist/{alt_text_generator_ai-W7O34SNG.js → alt_text_generator_ai-FGYQAF2A.js} +12 -11
  4. package/dist/{amap-VOX4T2AW.js → amap-G7V65NGK.js} +221 -220
  5. package/dist/anthropic-6ZK24TBB.js +203 -0
  6. package/dist/apify-VDGYHP6W.js +248 -0
  7. package/dist/brave_search-TAATLZOS.js +302 -0
  8. package/dist/chunk-2IAI3XQM.js +302 -0
  9. package/dist/chunk-7ISGFRC6.js +161 -0
  10. package/dist/{chunk-E6JCVKW6.js → chunk-BNMLA2RC.js} +3 -3
  11. package/dist/chunk-HA4BGL6C.js +8429 -0
  12. package/dist/{chunk-KMTT3I6D.js → chunk-RMAWSG7E.js} +19172 -25717
  13. package/dist/{chunk-XYBU3WZH.js → chunk-RTW5VRTK.js} +3 -3
  14. package/dist/chunk-U7PTOA3U.js +7320 -0
  15. package/dist/chunk-UY6ANCOY.js +378 -0
  16. package/dist/{chunk-ATK45BXV.js → chunk-X7ZUTKHR.js} +4 -2
  17. package/dist/circleci-BQ2UWXL2.js +389 -0
  18. package/dist/clerk-2JYWQNOI.js +1019 -0
  19. package/dist/cohere-6MI7AQM4.js +185 -0
  20. package/dist/{confluence-B3EWPZVE.js → confluence-6Y6GDETF.js} +105 -104
  21. package/dist/{convertapi-EUWSQYPF.js → convertapi-HBZCSWOX.js} +32 -31
  22. package/dist/{currencyapi-KVTIK3GL.js → currencyapi-337U5TGI.js} +71 -71
  23. package/dist/deepseek-OSPASO7O.js +210 -0
  24. package/dist/docker_hub-3ATQOY5L.js +933 -0
  25. package/dist/dropbox-LSA4GM2Y.js +1305 -0
  26. package/dist/dub-VZPJSPI6.js +680 -0
  27. package/dist/e2b-6SDYQZL2.js +278 -0
  28. package/dist/exa-B6EUYDVP.js +332 -0
  29. package/dist/{fal_ai-23E7JPNT.js → fal_ai-K4Q27IME.js} +81 -80
  30. package/dist/{feishu-7QRIDUV6.js → feishu-4TKXG4SU.js} +528 -572
  31. package/dist/{feishu_custom_bot-TJ4K7QNJ.js → feishu_custom_bot-7CTEAKRB.js} +57 -53
  32. package/dist/figma-OUKSZLD5.js +777 -0
  33. package/dist/firehydrant-7MOYL7QH.js +563 -0
  34. package/dist/{fixer-BWON27UO.js → fixer-H2BV2NO4.js} +34 -33
  35. package/dist/fly-PXKY6PNH.js +469 -0
  36. package/dist/{front-QCGXYEDJ.js → front-UZYIV5DW.js} +104 -104
  37. package/dist/geocodio-NSYO7TFP.js +213 -0
  38. package/dist/ghost-QBKKQQMF.js +338 -0
  39. package/dist/github-ENLSJ4CL.js +5421 -0
  40. package/dist/gmail-KQSDEB47.js +1887 -0
  41. package/dist/googlecalendar-5YCX4SZF.js +2524 -0
  42. package/dist/{googledocs-BUHL4J2H.js → googledocs-SSWIVFKA.js} +341 -340
  43. package/dist/{grafana-GLU2DWF2.js → grafana-TF2LXDQA.js} +221 -220
  44. package/dist/graphhopper-CURBVHYK.js +325 -0
  45. package/dist/index.d.ts +1132 -332
  46. package/dist/index.js +31 -14
  47. package/dist/{ip2proxy-EZ64Y4ZH.js → ip2proxy-YNVMTZEM.js} +28 -27
  48. package/dist/ipgeolocation_io-NAU7VJ4J.js +315 -0
  49. package/dist/ipqualityscore-OT63L4TI.js +279 -0
  50. package/dist/{jina_ai-EFBHTBXL.js → jina_ai-6WBMBGWM.js} +23 -23
  51. package/dist/{jira-HQSHAA5K.js → jira-DVDVTHNO.js} +118 -117
  52. package/dist/langsmith-IM5N4YAU.js +593 -0
  53. package/dist/lemlist-277SHUQF.js +289 -0
  54. package/dist/{linear-K7RYFYAD.js → linear-AEPH7B5V.js} +327 -326
  55. package/dist/logsnag-VEWRAGBG.js +150 -0
  56. package/dist/main.js +57 -280
  57. package/dist/{mattermost-S2BRCWLQ.js → mattermost-Q3A2BIZA.js} +59 -58
  58. package/dist/mem0-AXS7GZGI.js +544 -0
  59. package/dist/memos-7TXG4ZTU.js +744 -0
  60. package/dist/{metabase-MMSEPCOF.js → metabase-NSVACWQM.js} +90 -89
  61. package/dist/mistral_ai-YZ52RGD4.js +1196 -0
  62. package/dist/{mother_duck-H7PCQNZ2.js → mother_duck-XLLL6FVL.js} +94 -93
  63. package/dist/ngrok-4O4W3WZW.js +356 -0
  64. package/dist/{notes-PFMKRO33.js → notes-YTB3TJOO.js} +11 -9
  65. package/dist/notion-4W4O7J7V.js +940 -0
  66. package/dist/open_exchange_rates-23QJXVO5.js +215 -0
  67. package/dist/openai-ZS7GLSLH.js +800 -0
  68. package/dist/opengraph_io-PMVH7OYI.js +362 -0
  69. package/dist/openrouter-ONRGFNB6.js +441 -0
  70. package/dist/outline-UCUYZZ7J.js +599 -0
  71. package/dist/paddle-35HTKTUL.js +454 -0
  72. package/dist/perplexity-NVOBYN24.js +220 -0
  73. package/dist/pinecone-55CJY73C.js +571 -0
  74. package/dist/{pipedrive-Y2O7QGFF.js → pipedrive-WMCAKS72.js} +99 -98
  75. package/dist/polar-SM4ZM53B.js +395 -0
  76. package/dist/posthog-NWCXVXNJ.js +3464 -0
  77. package/dist/postmark-QJV5PHUQ.js +427 -0
  78. package/dist/{prerender-MENYM2TY.js → prerender-2W7UT4SC.js} +31 -30
  79. package/dist/{pubmed-GOXUVVH5.js → pubmed-VVV7XYLU.js} +239 -238
  80. package/dist/{railway-V2SID4WV.js → railway-KGI57S3O.js} +118 -117
  81. package/dist/readwise-AGHTQB42.js +470 -0
  82. package/dist/render-O4HBROCK.js +461 -0
  83. package/dist/{replicate-756MXPYX.js → replicate-KWBOMX7D.js} +81 -80
  84. package/dist/{resend-ZKH3BTBI.js → resend-DRH6Y6I4.js} +20 -16
  85. package/dist/rootly-XGCUDW6X.js +336 -0
  86. package/dist/{scrapfly-NSRHFDIQ.js → scrapfly-OIQ3OY6L.js} +62 -61
  87. package/dist/{scrapingbee-OQHLAVEY.js → scrapingbee-OCZO4FHX.js} +56 -56
  88. package/dist/{screenshot_fyi-DVWG3AXC.js → screenshot_fyi-CUNGFZOC.js} +16 -16
  89. package/dist/semantic_scholar-3UJRLKES.js +611 -0
  90. package/dist/{sentry-546MNDJG.js → sentry-5BWVZFJV.js} +208 -207
  91. package/dist/{shodan-C3OON3Z3.js → shodan-HI37CTEW.js} +62 -61
  92. package/dist/shopify-LJ2EV2HH.js +610 -0
  93. package/dist/stripe-3LHMV55K.js +585 -0
  94. package/dist/{supabase-U2SL4D63.js → supabase-H2KPX3Q2.js} +245 -244
  95. package/dist/tavily-FBEWGH3Z.js +326 -0
  96. package/dist/telegram-MYYO3JND.js +1767 -0
  97. package/dist/{telnyx-CXQ4EZUX.js → telnyx-H4ALEGAX.js} +57 -56
  98. package/dist/todoist-OBWICA5Q.js +664 -0
  99. package/dist/trello-GUFUJRWO.js +1080 -0
  100. package/dist/turso-NIAK4UMS.js +416 -0
  101. package/dist/{twilio-4PDBJKWX.js → twilio-K6SLK2CX.js} +70 -69
  102. package/dist/umami-42RS2EPS.js +389 -0
  103. package/dist/unsplash-V7TOTETT.js +351 -0
  104. package/dist/{upstash_redis-G4LQBYHA.js → upstash_redis-AWQMB6Y3.js} +51 -50
  105. package/dist/uptimerobot-AZC2DHOT.js +483 -0
  106. package/dist/v2ex-4TVRNMLS.js +667 -0
  107. package/dist/vercel-DPHTJ3XR.js +1076 -0
  108. package/dist/{wolfram_alpha_api-3G4PUJWB.js → wolfram_alpha_api-XAG7IXBW.js} +36 -35
  109. package/dist/wordpress-KMPKVGUX.js +812 -0
  110. package/dist/workos-PKB2YR7S.js +664 -0
  111. package/dist/zhihu-Y4H4XYPB.js +254 -0
  112. package/package.json +18 -9
  113. package/dist/airtable-LLZDFN7M.js +0 -789
  114. package/dist/anthropic-G23NN3X5.js +0 -202
  115. package/dist/apify-Y3SS734K.js +0 -247
  116. package/dist/brave_search-ZC7OAPSZ.js +0 -301
  117. package/dist/chunk-R6P4XAE5.js +0 -248
  118. package/dist/chunk-U7B6DS2O.js +0 -977
  119. package/dist/chunk-UZM2RXZH.js +0 -23436
  120. package/dist/circleci-3BAX5FCG.js +0 -388
  121. package/dist/clerk-6LEM6TNU.js +0 -1019
  122. package/dist/cloudflare_dns-KINYTJUD.js +0 -588
  123. package/dist/cohere-XCJ5AJ6B.js +0 -185
  124. package/dist/deepseek-PC5YGNC5.js +0 -209
  125. package/dist/docker_hub-C3MA5FU6.js +0 -932
  126. package/dist/dropbox-XBV7Z2IR.js +0 -1304
  127. package/dist/dub-LDOFG3HC.js +0 -679
  128. package/dist/e2b-JMCPSVBW.js +0 -277
  129. package/dist/exa-RAK7O7RD.js +0 -331
  130. package/dist/figma-E6IX5DTH.js +0 -773
  131. package/dist/firehydrant-ZBLPQREE.js +0 -562
  132. package/dist/fly-ZH3HFCZJ.js +0 -468
  133. package/dist/geocodio-YGNI7DA4.js +0 -212
  134. package/dist/ghost-EVSGKH2Q.js +0 -337
  135. package/dist/github-MA2BGRCJ.js +0 -5420
  136. package/dist/gmail-E5E6AADE.js +0 -1886
  137. package/dist/googlecalendar-BTLFPXTD.js +0 -2523
  138. package/dist/graphhopper-WSMB3TCD.js +0 -324
  139. package/dist/ipgeolocation_io-AA7HAS22.js +0 -315
  140. package/dist/ipqualityscore-BHJXVTJT.js +0 -277
  141. package/dist/langsmith-5W6SCT6F.js +0 -592
  142. package/dist/lemlist-HJWH6UMK.js +0 -288
  143. package/dist/logsnag-4KFOHL37.js +0 -150
  144. package/dist/mem0-CAW43CIC.js +0 -543
  145. package/dist/memos-TWEGPKFM.js +0 -740
  146. package/dist/mistral_ai-64BGZQHP.js +0 -1195
  147. package/dist/ngrok-GQCUGZKJ.js +0 -356
  148. package/dist/notion-DQWZWP4N.js +0 -936
  149. package/dist/open_exchange_rates-QMMD735E.js +0 -214
  150. package/dist/openai-W6PX32NZ.js +0 -799
  151. package/dist/opengraph_io-HNDBXYNW.js +0 -361
  152. package/dist/openrouter-JJYMEAUL.js +0 -437
  153. package/dist/outline-MCBNQZYY.js +0 -595
  154. package/dist/paddle-D2SKLUDN.js +0 -453
  155. package/dist/perplexity-XIFMKUAE.js +0 -219
  156. package/dist/pinecone-HUFTALV2.js +0 -570
  157. package/dist/polar-TYTOMOSR.js +0 -394
  158. package/dist/posthog-43JAR3VW.js +0 -3463
  159. package/dist/postmark-KL2QJYSG.js +0 -426
  160. package/dist/readwise-CI4GIMMJ.js +0 -469
  161. package/dist/render-SUBJ6YRZ.js +0 -460
  162. package/dist/rootly-CD2LJHPI.js +0 -336
  163. package/dist/semantic_scholar-T4A252KW.js +0 -610
  164. package/dist/shopify-Y2HN2MCQ.js +0 -609
  165. package/dist/stripe-VE3CD3AY.js +0 -584
  166. package/dist/tavily-KCZHK6HE.js +0 -326
  167. package/dist/telegram-3URFBCMY.js +0 -1766
  168. package/dist/todoist-HNPWNYTD.js +0 -663
  169. package/dist/trello-3W2MIXRP.js +0 -1079
  170. package/dist/turso-2EQF7C2Z.js +0 -415
  171. package/dist/umami-5REN7TGP.js +0 -388
  172. package/dist/unsplash-EIXL424F.js +0 -350
  173. package/dist/uptimerobot-KNJ3EYLY.js +0 -482
  174. package/dist/v2ex-RHJ234PZ.js +0 -666
  175. package/dist/vercel-AS6NCIC7.js +0 -1075
  176. package/dist/wordpress-KNDAAUV7.js +0 -811
  177. package/dist/workos-R6UITSJ7.js +0 -663
  178. package/dist/zhihu-AGK4HILK.js +0 -253
@@ -1,326 +0,0 @@
1
- import {
2
- createAuthedClient
3
- } from "./chunk-XYBU3WZH.js";
4
- import "./chunk-E6JCVKW6.js";
5
- import {
6
- asJsonObject
7
- } from "./chunk-JXHMDBAY.js";
8
- import {
9
- createProviderPlugin,
10
- upstreamError
11
- } from "./chunk-ATK45BXV.js";
12
- import "./chunk-U7B6DS2O.js";
13
- import {
14
- external_exports
15
- } from "./chunk-UZM2RXZH.js";
16
- import "./chunk-U67V476Y.js";
17
-
18
- // ../plugins/src/tavily/api.ts
19
- var SERVICE = "tavily";
20
- var REQUEST_TIMEOUT_MS = 3e4;
21
- var http = createAuthedClient({
22
- baseUrl: "https://api.tavily.com/",
23
- service: SERVICE,
24
- auth: { kind: "bearer" },
25
- headers: { accept: "application/json" },
26
- errorMessage: {
27
- keys: ["detail", "error", "message"],
28
- fallback: (status) => `Tavily \u8FD4\u56DE HTTP ${status}`
29
- },
30
- mapTransportError: ({ kind, message }) => kind === "timeout" ? upstreamError(504, `Tavily ${REQUEST_TIMEOUT_MS / 1e3}s \u5185\u6CA1\u6709\u8FD4\u56DE`) : upstreamError(502, message === void 0 ? "Tavily \u8BF7\u6C42\u5931\u8D25" : `Tavily \u8BF7\u6C42\u5931\u8D25:${message}`)
31
- });
32
- async function request(ctx, options) {
33
- const { data } = await http.request(ctx, {
34
- path: options.path,
35
- method: options.method,
36
- ...options.body === void 0 ? {} : { json: options.body },
37
- timeoutMs: REQUEST_TIMEOUT_MS,
38
- invalidJsonMessage: "Tavily \u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94"
39
- });
40
- if (data === void 0) return {};
41
- const result = asJsonObject(data);
42
- if (result === void 0) throw upstreamError(502, "Tavily \u54CD\u5E94\u4E0D\u662F\u5BF9\u8C61");
43
- return result;
44
- }
45
- function search(input, ctx) {
46
- return request(ctx, { method: "POST", path: "search", body: input });
47
- }
48
- function extract(input, ctx) {
49
- return request(ctx, { method: "POST", path: "extract", body: input });
50
- }
51
- function map(input, ctx) {
52
- return request(ctx, { method: "POST", path: "map", body: input });
53
- }
54
- function crawl(input, ctx) {
55
- return request(ctx, { method: "POST", path: "crawl", body: input });
56
- }
57
- function createResearch(input, ctx) {
58
- return request(ctx, { method: "POST", path: "research", body: input });
59
- }
60
- function getResearch(input, ctx) {
61
- return request(ctx, { method: "GET", path: `research/${encodeURIComponent(input.request_id)}` });
62
- }
63
- function getUsage(_input, ctx) {
64
- return request(ctx, { method: "GET", path: "usage" });
65
- }
66
-
67
- // ../plugins/src/tavily/schema.ts
68
- var searchInput = external_exports.strictObject({
69
- query: external_exports.string().min(1).describe("The search query to execute with Tavily."),
70
- search_depth: external_exports.enum(["advanced", "basic", "fast", "ultra-fast"]).describe("Controls the latency-versus-relevance tradeoff for Tavily Search.").optional(),
71
- chunks_per_source: external_exports.int().min(1).max(3).describe("The maximum number of chunks to return per source.").optional(),
72
- max_results: external_exports.int().min(0).max(20).describe("The maximum number of search results to return.").optional(),
73
- topic: external_exports.enum(["general", "news", "finance"]).describe("The search category used by Tavily.").optional(),
74
- time_range: external_exports.enum(["day", "week", "month", "year", "d", "w", "m", "y"]).describe("The date range shortcut used to filter results.").optional(),
75
- start_date: external_exports.iso.date().describe("Only return results after this YYYY-MM-DD date.").optional(),
76
- end_date: external_exports.iso.date().describe("Only return results before this YYYY-MM-DD date.").optional(),
77
- include_answer: external_exports.union([external_exports.boolean().describe("Whether to include an answer."), external_exports.enum(["basic", "advanced"]).describe("The answer detail level.")]).optional(),
78
- include_raw_content: external_exports.union([external_exports.boolean().describe("Whether to include raw content."), external_exports.enum(["markdown", "text"]).describe("The raw content format.")]).optional(),
79
- include_images: external_exports.boolean().describe("Whether to include top-level and per-result images.").optional(),
80
- include_image_descriptions: external_exports.boolean().describe("Whether to include descriptions for returned images.").optional(),
81
- include_favicon: external_exports.boolean().describe("Whether to include favicons for returned results.").optional(),
82
- include_domains: external_exports.array(external_exports.string().min(1).describe("A domain name to include.")).min(1).describe("Domains that Tavily should include in the search results.").optional(),
83
- exclude_domains: external_exports.array(external_exports.string().min(1).describe("A domain name to exclude.")).min(1).describe("Domains that Tavily should exclude from the search results.").optional(),
84
- country: external_exports.string().describe("A country name used to boost results for general searches.").optional(),
85
- auto_parameters: external_exports.boolean().describe("Whether Tavily should auto-configure search parameters.").optional(),
86
- exact_match: external_exports.boolean().describe("Whether Tavily should require quoted exact phrases to match exactly.").optional(),
87
- include_usage: external_exports.boolean().describe("Whether to include credit usage details in the response.").optional()
88
- }).describe("The input payload for a Tavily Search request.");
89
- var searchOutput = external_exports.looseObject({
90
- query: external_exports.string().describe("The search query that was executed."),
91
- results: external_exports.array(external_exports.looseObject({
92
- title: external_exports.string().describe("The source title.").optional(),
93
- url: external_exports.string().describe("The source URL.").optional(),
94
- content: external_exports.string().describe("The extracted snippet or summary for the source.").optional(),
95
- score: external_exports.number().describe("The relevance score of the source.").optional(),
96
- raw_content: external_exports.string().describe("The cleaned page content when include_raw_content is enabled.").nullable().optional(),
97
- favicon: external_exports.string().describe("The favicon URL for the result when include_favicon is enabled.").nullable().optional(),
98
- images: external_exports.array(external_exports.looseObject({
99
- url: external_exports.string().describe("The image URL.").optional(),
100
- description: external_exports.string().describe("A short description for the image.").optional()
101
- }).describe("An image item returned by Tavily.")).describe("Images extracted from this result.").optional(),
102
- published_date: external_exports.string().describe("The published date for the result when Tavily can determine it.").optional()
103
- }).describe("A single Tavily search result.")).describe("The ranked search results returned by Tavily."),
104
- response_time: external_exports.union([external_exports.number().describe("The total response time reported by Tavily."), external_exports.string().describe("The total response time reported by Tavily.")]),
105
- request_id: external_exports.string().describe("A unique request identifier for Tavily support and debugging."),
106
- answer: external_exports.string().describe("A Tavily-generated answer for the query."),
107
- images: external_exports.array(external_exports.looseObject({
108
- url: external_exports.string().describe("The image URL.").optional(),
109
- description: external_exports.string().describe("A short description for the image.").optional()
110
- }).describe("An image item returned by Tavily.")).describe("Query-related images returned by Tavily."),
111
- auto_parameters: external_exports.looseObject({}).describe("Auto-selected parameters returned by Tavily when enabled."),
112
- usage: external_exports.looseObject({
113
- credits: external_exports.number().describe("The number of API credits consumed by the request.").optional()
114
- }).describe("Credit usage details returned by Tavily.")
115
- }).describe("The Tavily Search response payload.");
116
- var extractInput = external_exports.strictObject({
117
- urls: external_exports.array(external_exports.url().describe("A source URL.")).min(1).describe("The URLs that Tavily should extract content from."),
118
- query: external_exports.string().describe("An optional query used to rerank extracted chunks.").optional(),
119
- chunks_per_source: external_exports.int().min(1).max(5).describe("The maximum number of chunks to return per source when query is provided.").optional(),
120
- extract_depth: external_exports.enum(["basic", "advanced"]).describe("Controls whether Tavily uses basic or advanced extraction.").optional(),
121
- include_images: external_exports.boolean().describe("Whether to include images found on each page.").optional(),
122
- include_favicon: external_exports.boolean().describe("Whether to include the favicon URL for each page.").optional(),
123
- format: external_exports.enum(["markdown", "text"]).describe("The format of the extracted page content.").optional(),
124
- timeout: external_exports.number().min(1).max(60).describe("The extraction timeout in seconds.").optional(),
125
- include_usage: external_exports.boolean().describe("Whether to include credit usage details in the response.").optional()
126
- }).describe("The input payload for a Tavily Extract request.");
127
- var extractOutput = external_exports.looseObject({
128
- results: external_exports.array(external_exports.looseObject({
129
- url: external_exports.string().describe("The processed source URL.").optional(),
130
- raw_content: external_exports.string().describe("The extracted page content in the selected format.").optional(),
131
- images: external_exports.array(external_exports.looseObject({
132
- url: external_exports.string().describe("The image URL.").optional(),
133
- description: external_exports.string().describe("A short description for the image.").optional()
134
- }).describe("An image item returned by Tavily.")).describe("Images extracted from the source.").optional(),
135
- favicon: external_exports.string().describe("The favicon URL for the source when include_favicon is enabled.").optional()
136
- }).describe("An extracted Tavily result item.")).describe("The successful extraction results returned by Tavily."),
137
- failed_results: external_exports.array(external_exports.looseObject({
138
- url: external_exports.string().describe("The source URL that failed.").optional(),
139
- error: external_exports.string().describe("The failure reason returned by Tavily.").optional()
140
- }).describe("A failed Tavily extraction result.")).describe("URLs that Tavily could not extract successfully."),
141
- response_time: external_exports.number().describe("The total response time reported by Tavily."),
142
- request_id: external_exports.string().describe("A unique request identifier for Tavily support and debugging."),
143
- usage: external_exports.looseObject({
144
- credits: external_exports.number().describe("The number of API credits consumed by the request.").optional()
145
- }).describe("Credit usage details returned by Tavily.")
146
- }).describe("The Tavily Extract response payload.");
147
- var mapInput = external_exports.strictObject({
148
- url: external_exports.url().describe("The root URL that Tavily should map."),
149
- instructions: external_exports.string().describe("Natural-language instructions that guide the mapping.").optional(),
150
- max_depth: external_exports.int().min(1).max(5).describe("The maximum mapping depth.").optional(),
151
- max_breadth: external_exports.int().min(1).max(500).describe("The maximum number of links to follow per level.").optional(),
152
- limit: external_exports.int().min(1).describe("The maximum number of links Tavily should process.").optional(),
153
- select_paths: external_exports.array(external_exports.string().min(1).describe("A path selection pattern.")).min(1).describe("Regex patterns used to include only matching URL paths.").optional(),
154
- select_domains: external_exports.array(external_exports.string().min(1).describe("A domain selection pattern.")).min(1).describe("Regex patterns used to include only matching domains.").optional(),
155
- exclude_paths: external_exports.array(external_exports.string().min(1).describe("A path exclusion pattern.")).min(1).describe("Regex patterns used to exclude matching URL paths.").optional(),
156
- exclude_domains: external_exports.array(external_exports.string().min(1).describe("A domain exclusion pattern.")).min(1).describe("Regex patterns used to exclude matching domains.").optional(),
157
- allow_external: external_exports.boolean().describe("Whether external domain links can appear in the results.").optional(),
158
- timeout: external_exports.number().min(10).max(150).describe("The mapping timeout in seconds.").optional(),
159
- include_usage: external_exports.boolean().describe("Whether to include credit usage details in the response.").optional()
160
- }).describe("The input payload for a Tavily Map request.");
161
- var mapOutput = external_exports.looseObject({
162
- base_url: external_exports.string().describe("The base URL that Tavily mapped."),
163
- results: external_exports.array(external_exports.string().min(1)).describe("The URLs discovered during the mapping operation."),
164
- response_time: external_exports.number().describe("The total response time reported by Tavily."),
165
- request_id: external_exports.string().describe("A unique request identifier for Tavily support and debugging."),
166
- usage: external_exports.looseObject({
167
- credits: external_exports.number().describe("The number of API credits consumed by the request.").optional()
168
- }).describe("Credit usage details returned by Tavily.")
169
- }).describe("The Tavily Map response payload.");
170
- var crawlInput = external_exports.strictObject({
171
- url: external_exports.url().describe("The root URL that Tavily should crawl."),
172
- instructions: external_exports.string().describe("Natural-language instructions that guide the crawl.").optional(),
173
- max_depth: external_exports.int().min(1).max(5).describe("The maximum crawl depth.").optional(),
174
- max_breadth: external_exports.int().min(1).max(500).describe("The maximum number of links to follow per crawl level.").optional(),
175
- limit: external_exports.int().min(1).describe("The maximum number of links Tavily should process.").optional(),
176
- select_paths: external_exports.array(external_exports.string().min(1).describe("A path selection pattern.")).min(1).describe("Regex patterns used to include only matching URL paths.").optional(),
177
- select_domains: external_exports.array(external_exports.string().min(1).describe("A domain selection pattern.")).min(1).describe("Regex patterns used to include only matching domains.").optional(),
178
- exclude_paths: external_exports.array(external_exports.string().min(1).describe("A path exclusion pattern.")).min(1).describe("Regex patterns used to exclude matching URL paths.").optional(),
179
- exclude_domains: external_exports.array(external_exports.string().min(1).describe("A domain exclusion pattern.")).min(1).describe("Regex patterns used to exclude matching domains.").optional(),
180
- allow_external: external_exports.boolean().describe("Whether external domain links can appear in the results.").optional(),
181
- include_images: external_exports.boolean().describe("Whether to include images in crawled results.").optional(),
182
- extract_depth: external_exports.enum(["basic", "advanced"]).describe("Controls whether Tavily uses basic or advanced extraction.").optional(),
183
- format: external_exports.enum(["markdown", "text"]).describe("The format of the extracted page content.").optional(),
184
- include_favicon: external_exports.boolean().describe("Whether to include a favicon URL for each crawled result.").optional(),
185
- timeout: external_exports.number().min(10).max(150).describe("The crawl timeout in seconds.").optional(),
186
- include_usage: external_exports.boolean().describe("Whether to include credit usage details in the response.").optional()
187
- }).describe("The input payload for a Tavily Crawl request.");
188
- var crawlOutput = external_exports.looseObject({
189
- base_url: external_exports.string().describe("The base URL that Tavily crawled."),
190
- results: external_exports.array(external_exports.looseObject({
191
- url: external_exports.string().describe("The processed source URL.").optional(),
192
- raw_content: external_exports.string().describe("The extracted page content in the selected format.").optional(),
193
- images: external_exports.array(external_exports.looseObject({
194
- url: external_exports.string().describe("The image URL.").optional(),
195
- description: external_exports.string().describe("A short description for the image.").optional()
196
- }).describe("An image item returned by Tavily.")).describe("Images extracted from the source.").optional(),
197
- favicon: external_exports.string().describe("The favicon URL for the source when include_favicon is enabled.").optional()
198
- }).describe("An extracted Tavily result item.")).describe("The extracted results returned by Tavily Crawl."),
199
- response_time: external_exports.number().describe("The total response time reported by Tavily."),
200
- request_id: external_exports.string().describe("A unique request identifier for Tavily support and debugging."),
201
- usage: external_exports.looseObject({
202
- credits: external_exports.number().describe("The number of API credits consumed by the request.").optional()
203
- }).describe("Credit usage details returned by Tavily.")
204
- }).describe("The Tavily Crawl response payload.");
205
- var createResearchInput = external_exports.strictObject({
206
- input: external_exports.string().min(1).describe("The research task or question to investigate."),
207
- model: external_exports.enum(["mini", "pro", "auto"]).describe("Research model to use.").optional(),
208
- stream: external_exports.literal(false).describe("Must be false or omitted. Tavily SSE streaming is not supported.").optional(),
209
- output_schema: external_exports.looseObject({}).describe("JSON Schema for structured research output.").optional(),
210
- citation_format: external_exports.enum(["numbered", "mla", "apa", "chicago"]).describe("The format for citations in the research report.").optional(),
211
- include_domains: external_exports.array(external_exports.string().min(1).describe("A domain to prioritize.")).max(20).describe("Soft source preference domains.").optional(),
212
- exclude_domains: external_exports.array(external_exports.string().min(1).describe("A domain to exclude.")).max(20).describe("Hard source blocklist domains.").optional(),
213
- output_length: external_exports.enum(["short", "standard", "long"]).describe("The target research response length.").optional(),
214
- files: external_exports.array(external_exports.strictObject({
215
- name: external_exports.string().min(1).describe("The file name, including extension."),
216
- data: external_exports.string().min(1).describe("The base64-encoded file contents."),
217
- type: external_exports.literal("base64").describe("The encoded file content type.")
218
- }).describe("A base64-encoded .txt, .md, or .json file attached to a Tavily Research request.")).min(1).max(5).describe("Up to 5 .txt, .md, or .json files to use as additional research sources.").optional()
219
- }).describe("The input payload for creating a Tavily Research task.");
220
- var createResearchOutput = external_exports.looseObject({
221
- request_id: external_exports.string().min(1).describe("A unique identifier for the research task.").optional(),
222
- status: external_exports.enum(["pending", "in_progress", "completed", "failed"]).describe("The current research task status.").optional(),
223
- input: external_exports.string().describe("The research task or question investigated.").optional(),
224
- model: external_exports.enum(["mini", "pro", "auto"]).describe("The model used by the research agent.").optional(),
225
- content: external_exports.unknown().describe("The final research report content.").optional(),
226
- sources: external_exports.array(external_exports.looseObject({}).describe("A source used in a Tavily Research result.")).describe("Sources used in the research.").optional(),
227
- response_time: external_exports.number().describe("The response time reported by Tavily.").optional()
228
- }).describe("A Tavily Research task response.");
229
- var getResearchInput = external_exports.strictObject({
230
- request_id: external_exports.string().min(1).describe("The unique identifier of the research task.")
231
- }).describe("The input payload for retrieving a Tavily Research task.");
232
- var getResearchOutput = external_exports.looseObject({
233
- request_id: external_exports.string().min(1).describe("A unique identifier for the research task.").optional(),
234
- status: external_exports.enum(["pending", "in_progress", "completed", "failed"]).describe("The current research task status.").optional(),
235
- input: external_exports.string().describe("The research task or question investigated.").optional(),
236
- model: external_exports.enum(["mini", "pro", "auto"]).describe("The model used by the research agent.").optional(),
237
- content: external_exports.unknown().describe("The final research report content.").optional(),
238
- sources: external_exports.array(external_exports.looseObject({}).describe("A source used in a Tavily Research result.")).describe("Sources used in the research.").optional(),
239
- response_time: external_exports.number().describe("The response time reported by Tavily.").optional()
240
- }).describe("A Tavily Research task response.");
241
- var getUsageInput = external_exports.strictObject({}).describe("The input payload for a Tavily usage request.");
242
- var getUsageOutput = external_exports.strictObject({
243
- key: external_exports.looseObject({
244
- usage: external_exports.number().describe("The total usage for the API key.").optional(),
245
- limit: external_exports.number().describe("The usage limit for the API key.").optional(),
246
- search_usage: external_exports.number().describe("Search credits consumed by the API key.").optional(),
247
- extract_usage: external_exports.number().describe("Extract credits consumed by the API key.").optional(),
248
- crawl_usage: external_exports.number().describe("Crawl credits consumed by the API key.").optional(),
249
- map_usage: external_exports.number().describe("Map credits consumed by the API key.").optional(),
250
- research_usage: external_exports.number().describe("Research credits consumed by the API key.").optional()
251
- }).describe("Usage details for the specific API key."),
252
- account: external_exports.looseObject({
253
- current_plan: external_exports.string().describe("The current account plan name.").optional(),
254
- plan_usage: external_exports.number().describe("The total plan usage for the account.").optional(),
255
- plan_limit: external_exports.number().describe("The plan limit for the account.").optional(),
256
- paygo_usage: external_exports.number().describe("The pay-as-you-go usage for the account.").optional(),
257
- paygo_limit: external_exports.number().describe("The pay-as-you-go limit for the account.").optional()
258
- }).describe("Plan and usage information for the account.")
259
- }).describe("The Tavily usage response payload.");
260
- var tavilyActions = {
261
- search: {
262
- description: "Execute a Tavily Search query and return ranked source results.",
263
- effect: "write",
264
- inputSchema: searchInput,
265
- outputSchema: external_exports.toJSONSchema(searchOutput, { io: "output", unrepresentable: "any" })
266
- },
267
- extract: {
268
- description: "Extract structured page content from one or more URLs with Tavily.",
269
- effect: "write",
270
- inputSchema: extractInput,
271
- outputSchema: external_exports.toJSONSchema(extractOutput, { io: "output", unrepresentable: "any" })
272
- },
273
- map: {
274
- description: "Discover URLs from a website with Tavily Map.",
275
- effect: "write",
276
- inputSchema: mapInput,
277
- outputSchema: external_exports.toJSONSchema(mapOutput, { io: "output", unrepresentable: "any" })
278
- },
279
- crawl: {
280
- description: "Crawl a website and extract content from discovered pages with Tavily.",
281
- effect: "write",
282
- inputSchema: crawlInput,
283
- outputSchema: external_exports.toJSONSchema(crawlOutput, { io: "output", unrepresentable: "any" })
284
- },
285
- create_research: {
286
- description: "Start an asynchronous Tavily Research task and return a request ID for polling.",
287
- effect: "write",
288
- inputSchema: createResearchInput,
289
- outputSchema: external_exports.toJSONSchema(createResearchOutput, { io: "output", unrepresentable: "any" })
290
- },
291
- get_research: {
292
- description: "Get the current status and result for a Tavily Research task.",
293
- effect: "read",
294
- inputSchema: getResearchInput,
295
- outputSchema: external_exports.toJSONSchema(getResearchOutput, { io: "output", unrepresentable: "any" })
296
- },
297
- get_usage: {
298
- description: "Get API key and account usage details from Tavily.",
299
- effect: "read",
300
- inputSchema: getUsageInput,
301
- outputSchema: external_exports.toJSONSchema(getUsageOutput, { io: "output", unrepresentable: "any" })
302
- }
303
- };
304
-
305
- // ../plugins/src/tavily/index.ts
306
- function createTavilyPlugin() {
307
- return createProviderPlugin({
308
- description: "Tavily",
309
- actions: tavilyActions,
310
- credentialProbe: "get_usage",
311
- handlers: {
312
- search,
313
- extract,
314
- map,
315
- crawl,
316
- create_research: createResearch,
317
- get_research: getResearch,
318
- get_usage: getUsage
319
- }
320
- });
321
- }
322
- var tavily_default = createTavilyPlugin();
323
- export {
324
- createTavilyPlugin,
325
- tavily_default as default
326
- };