recker 1.0.20-next.b961eae → 1.0.20-next.e194d90

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 (425) hide show
  1. package/README.md +31 -0
  2. package/dist/ai/adaptive-timeout.d.ts +0 -1
  3. package/dist/ai/client.d.ts +0 -1
  4. package/dist/ai/client.js +6 -0
  5. package/dist/ai/index.d.ts +3 -1
  6. package/dist/ai/index.js +3 -0
  7. package/dist/ai/providers/anthropic.d.ts +0 -1
  8. package/dist/ai/providers/base.d.ts +0 -1
  9. package/dist/ai/providers/google.d.ts +59 -0
  10. package/dist/ai/providers/google.js +305 -0
  11. package/dist/ai/providers/index.d.ts +4 -1
  12. package/dist/ai/providers/index.js +2 -0
  13. package/dist/ai/providers/ollama.d.ts +44 -0
  14. package/dist/ai/providers/ollama.js +240 -0
  15. package/dist/ai/providers/openai.d.ts +0 -1
  16. package/dist/ai/rate-limiter.d.ts +0 -1
  17. package/dist/ai/vector/index.d.ts +2 -0
  18. package/dist/ai/vector/index.js +2 -0
  19. package/dist/ai/vector/similarity.d.ts +2 -0
  20. package/dist/ai/vector/similarity.js +27 -0
  21. package/dist/ai/vector/store.d.ts +27 -0
  22. package/dist/ai/vector/store.js +82 -0
  23. package/dist/bench/generator.d.ts +0 -1
  24. package/dist/bench/stats.d.ts +0 -1
  25. package/dist/cache/basic-file-storage.d.ts +12 -0
  26. package/dist/cache/basic-file-storage.js +50 -0
  27. package/dist/cache/file-storage.d.ts +25 -11
  28. package/dist/cache/file-storage.js +175 -30
  29. package/dist/cache/memory-limits.d.ts +0 -1
  30. package/dist/cache/memory-storage.d.ts +0 -1
  31. package/dist/cache/redis-storage.d.ts +0 -1
  32. package/dist/cli/handler.d.ts +2 -1
  33. package/dist/cli/handler.js +36 -5
  34. package/dist/cli/index.d.ts +0 -1
  35. package/dist/cli/index.js +559 -5
  36. package/dist/cli/presets.d.ts +0 -1
  37. package/dist/cli/tui/ai-chat.d.ts +0 -1
  38. package/dist/cli/tui/load-dashboard.d.ts +0 -1
  39. package/dist/cli/tui/scroll-buffer.d.ts +0 -1
  40. package/dist/cli/tui/search-panel.d.ts +0 -1
  41. package/dist/cli/tui/shell-search.d.ts +0 -1
  42. package/dist/cli/tui/shell.d.ts +0 -1
  43. package/dist/cli/tui/websocket.d.ts +0 -1
  44. package/dist/constants/http-status.d.ts +0 -1
  45. package/dist/constants.d.ts +0 -1
  46. package/dist/contract/index.d.ts +0 -1
  47. package/dist/cookies/memory-cookie-jar.d.ts +0 -1
  48. package/dist/core/client.d.ts +0 -1
  49. package/dist/core/client.js +1 -1
  50. package/dist/core/errors.d.ts +0 -1
  51. package/dist/core/index.d.ts +0 -1
  52. package/dist/core/request-promise.d.ts +0 -1
  53. package/dist/core/request.d.ts +0 -1
  54. package/dist/core/response.d.ts +0 -1
  55. package/dist/dns/index.d.ts +0 -1
  56. package/dist/dns/propagation.d.ts +0 -1
  57. package/dist/events/request-events.d.ts +0 -1
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +1 -0
  60. package/dist/mcp/client.d.ts +0 -1
  61. package/dist/mcp/contract.d.ts +0 -1
  62. package/dist/mcp/embeddings-loader.d.ts +0 -1
  63. package/dist/mcp/geoip-loader.d.ts +0 -1
  64. package/dist/mcp/index.d.ts +0 -1
  65. package/dist/mcp/ip-intel.d.ts +0 -1
  66. package/dist/mcp/search/hybrid-search.d.ts +0 -1
  67. package/dist/mcp/search/index.d.ts +0 -1
  68. package/dist/mcp/search/math.d.ts +0 -1
  69. package/dist/mcp/search/types.d.ts +0 -1
  70. package/dist/mcp/server.d.ts +6 -2
  71. package/dist/mcp/server.js +193 -151
  72. package/dist/mcp/tools/loader.d.ts +2 -0
  73. package/dist/mcp/tools/loader.js +41 -0
  74. package/dist/mcp/tools/network.d.ts +3 -0
  75. package/dist/mcp/tools/network.js +267 -0
  76. package/dist/mcp/tools/registry.d.ts +17 -0
  77. package/dist/mcp/tools/registry.js +37 -0
  78. package/dist/mcp/types.d.ts +0 -1
  79. package/dist/plugins/auth/api-key.d.ts +8 -0
  80. package/dist/plugins/auth/api-key.js +27 -0
  81. package/dist/plugins/auth/auth0.d.ts +33 -0
  82. package/dist/plugins/auth/auth0.js +94 -0
  83. package/dist/plugins/auth/aws-sigv4.d.ts +10 -0
  84. package/dist/plugins/auth/aws-sigv4.js +88 -0
  85. package/dist/plugins/auth/azure-ad.d.ts +48 -0
  86. package/dist/plugins/auth/azure-ad.js +152 -0
  87. package/dist/plugins/auth/basic.d.ts +7 -0
  88. package/dist/plugins/auth/basic.js +13 -0
  89. package/dist/plugins/auth/bearer.d.ts +8 -0
  90. package/dist/plugins/auth/bearer.js +17 -0
  91. package/dist/plugins/auth/cognito.d.ts +45 -0
  92. package/dist/plugins/auth/cognito.js +208 -0
  93. package/dist/plugins/auth/digest.d.ts +8 -0
  94. package/dist/plugins/auth/digest.js +100 -0
  95. package/dist/plugins/auth/firebase.d.ts +32 -0
  96. package/dist/plugins/auth/firebase.js +195 -0
  97. package/dist/plugins/auth/github-app.d.ts +36 -0
  98. package/dist/plugins/auth/github-app.js +170 -0
  99. package/dist/plugins/auth/google-service-account.d.ts +49 -0
  100. package/dist/plugins/auth/google-service-account.js +172 -0
  101. package/dist/plugins/auth/index.d.ts +15 -0
  102. package/dist/plugins/auth/index.js +15 -0
  103. package/dist/plugins/auth/mtls.d.ts +37 -0
  104. package/dist/plugins/auth/mtls.js +140 -0
  105. package/dist/plugins/auth/oauth2.d.ts +8 -0
  106. package/dist/plugins/auth/oauth2.js +26 -0
  107. package/dist/plugins/auth/oidc.d.ts +55 -0
  108. package/dist/plugins/auth/oidc.js +222 -0
  109. package/dist/plugins/auth/okta.d.ts +47 -0
  110. package/dist/plugins/auth/okta.js +157 -0
  111. package/dist/plugins/auth.d.ts +1 -45
  112. package/dist/plugins/auth.js +1 -268
  113. package/dist/plugins/cache.d.ts +0 -1
  114. package/dist/plugins/certificate-pinning.d.ts +59 -0
  115. package/dist/plugins/certificate-pinning.js +236 -0
  116. package/dist/plugins/circuit-breaker.d.ts +0 -1
  117. package/dist/plugins/compression.d.ts +0 -1
  118. package/dist/plugins/cookie-jar.d.ts +0 -1
  119. package/dist/plugins/dedup.d.ts +0 -1
  120. package/dist/plugins/graphql.d.ts +0 -1
  121. package/dist/plugins/grpc-web.d.ts +0 -1
  122. package/dist/plugins/har-player.d.ts +0 -1
  123. package/dist/plugins/har-recorder.d.ts +0 -1
  124. package/dist/plugins/hls.d.ts +0 -1
  125. package/dist/plugins/http2-push.d.ts +0 -1
  126. package/dist/plugins/http3.d.ts +0 -1
  127. package/dist/plugins/index.d.ts +27 -0
  128. package/dist/plugins/index.js +27 -0
  129. package/dist/plugins/interface-rotator.d.ts +0 -1
  130. package/dist/plugins/jsonrpc.d.ts +0 -1
  131. package/dist/plugins/logger.d.ts +0 -1
  132. package/dist/plugins/odata.d.ts +0 -1
  133. package/dist/plugins/pagination.d.ts +0 -1
  134. package/dist/plugins/proxy-rotator.d.ts +0 -1
  135. package/dist/plugins/rate-limit.d.ts +15 -0
  136. package/dist/plugins/rate-limit.js +162 -0
  137. package/dist/plugins/retry.d.ts +0 -1
  138. package/dist/plugins/scrape.d.ts +0 -1
  139. package/dist/plugins/server-timing.d.ts +0 -1
  140. package/dist/plugins/soap.d.ts +0 -1
  141. package/dist/plugins/user-agent.d.ts +0 -1
  142. package/dist/plugins/xml.d.ts +0 -1
  143. package/dist/plugins/xsrf.d.ts +0 -1
  144. package/dist/presets/anthropic.d.ts +0 -1
  145. package/dist/presets/aws.d.ts +0 -1
  146. package/dist/presets/azure-openai.d.ts +0 -1
  147. package/dist/presets/azure.d.ts +0 -1
  148. package/dist/presets/cloudflare.d.ts +0 -1
  149. package/dist/presets/cohere.d.ts +0 -1
  150. package/dist/presets/deepseek.d.ts +0 -1
  151. package/dist/presets/digitalocean.d.ts +0 -1
  152. package/dist/presets/discord.d.ts +0 -1
  153. package/dist/presets/fireworks.d.ts +0 -1
  154. package/dist/presets/gcp.d.ts +0 -1
  155. package/dist/presets/gemini.d.ts +0 -1
  156. package/dist/presets/github.d.ts +0 -1
  157. package/dist/presets/gitlab.d.ts +0 -1
  158. package/dist/presets/groq.d.ts +0 -1
  159. package/dist/presets/huggingface.d.ts +0 -1
  160. package/dist/presets/index.d.ts +0 -1
  161. package/dist/presets/linear.d.ts +0 -1
  162. package/dist/presets/mailgun.d.ts +0 -1
  163. package/dist/presets/meta.d.ts +0 -1
  164. package/dist/presets/mistral.d.ts +0 -1
  165. package/dist/presets/notion.d.ts +0 -1
  166. package/dist/presets/openai.d.ts +0 -1
  167. package/dist/presets/oracle.d.ts +0 -1
  168. package/dist/presets/perplexity.d.ts +0 -1
  169. package/dist/presets/registry.d.ts +0 -1
  170. package/dist/presets/replicate.d.ts +0 -1
  171. package/dist/presets/sinch.d.ts +0 -1
  172. package/dist/presets/slack.d.ts +0 -1
  173. package/dist/presets/stripe.d.ts +0 -1
  174. package/dist/presets/supabase.d.ts +0 -1
  175. package/dist/presets/tiktok.d.ts +0 -1
  176. package/dist/presets/together.d.ts +0 -1
  177. package/dist/presets/twilio.d.ts +0 -1
  178. package/dist/presets/vercel.d.ts +0 -1
  179. package/dist/presets/vultr.d.ts +0 -1
  180. package/dist/presets/xai.d.ts +0 -1
  181. package/dist/presets/youtube.d.ts +0 -1
  182. package/dist/protocols/ftp.d.ts +0 -1
  183. package/dist/protocols/index.d.ts +0 -1
  184. package/dist/protocols/sftp.d.ts +0 -1
  185. package/dist/protocols/telnet.d.ts +0 -1
  186. package/dist/recker.d.ts +0 -1
  187. package/dist/runner/request-runner.d.ts +0 -1
  188. package/dist/scrape/document.d.ts +0 -1
  189. package/dist/scrape/element.d.ts +0 -1
  190. package/dist/scrape/extractors.d.ts +0 -1
  191. package/dist/scrape/index.d.ts +0 -1
  192. package/dist/scrape/types.d.ts +0 -1
  193. package/dist/testing/index.d.ts +8 -1
  194. package/dist/testing/index.js +4 -0
  195. package/dist/testing/mock-dns-server.d.ts +69 -0
  196. package/dist/testing/mock-dns-server.js +269 -0
  197. package/dist/testing/mock-ftp-server.d.ts +89 -0
  198. package/dist/testing/mock-ftp-server.js +562 -0
  199. package/dist/testing/mock-hls-server.d.ts +0 -1
  200. package/dist/testing/mock-http-server.d.ts +0 -1
  201. package/dist/testing/mock-sse-server.d.ts +0 -1
  202. package/dist/testing/mock-telnet-server.d.ts +59 -0
  203. package/dist/testing/mock-telnet-server.js +273 -0
  204. package/dist/testing/mock-udp-server.d.ts +0 -1
  205. package/dist/testing/mock-websocket-server.d.ts +0 -1
  206. package/dist/testing/mock-whois-server.d.ts +56 -0
  207. package/dist/testing/mock-whois-server.js +234 -0
  208. package/dist/testing/mock.d.ts +0 -1
  209. package/dist/transport/base-udp.d.ts +0 -1
  210. package/dist/transport/fetch.d.ts +0 -1
  211. package/dist/transport/udp-response.d.ts +0 -1
  212. package/dist/transport/udp.d.ts +0 -1
  213. package/dist/transport/undici.d.ts +0 -1
  214. package/dist/types/ai.d.ts +0 -1
  215. package/dist/types/index.d.ts +0 -1
  216. package/dist/types/logger.d.ts +0 -1
  217. package/dist/types/udp.d.ts +0 -1
  218. package/dist/udp/index.d.ts +0 -1
  219. package/dist/utils/agent-manager.d.ts +0 -1
  220. package/dist/utils/body.d.ts +0 -1
  221. package/dist/utils/cert.d.ts +0 -1
  222. package/dist/utils/charset.d.ts +0 -1
  223. package/dist/utils/chart.d.ts +0 -1
  224. package/dist/utils/client-pool.d.ts +0 -1
  225. package/dist/utils/colors.d.ts +0 -1
  226. package/dist/utils/concurrency.d.ts +0 -1
  227. package/dist/utils/dns-toolkit.d.ts +0 -1
  228. package/dist/utils/dns.d.ts +0 -1
  229. package/dist/utils/doh.d.ts +0 -1
  230. package/dist/utils/download.d.ts +0 -1
  231. package/dist/utils/env-proxy.d.ts +0 -1
  232. package/dist/utils/header-parser.d.ts +0 -1
  233. package/dist/utils/html-cleaner.d.ts +0 -1
  234. package/dist/utils/link-header.d.ts +0 -1
  235. package/dist/utils/optional-require.d.ts +0 -1
  236. package/dist/utils/progress.d.ts +0 -1
  237. package/dist/utils/rdap.d.ts +0 -1
  238. package/dist/utils/request-pool.d.ts +0 -1
  239. package/dist/utils/security-grader.d.ts +0 -1
  240. package/dist/utils/sparkline.d.ts +0 -1
  241. package/dist/utils/sse.d.ts +0 -1
  242. package/dist/utils/streaming.d.ts +0 -1
  243. package/dist/utils/system-metrics.d.ts +0 -1
  244. package/dist/utils/tls-inspector.d.ts +0 -1
  245. package/dist/utils/try-fn.d.ts +0 -1
  246. package/dist/utils/upload.d.ts +0 -1
  247. package/dist/utils/user-agent.d.ts +0 -1
  248. package/dist/utils/whois.d.ts +0 -1
  249. package/dist/webrtc/index.d.ts +0 -1
  250. package/dist/websocket/client.d.ts +0 -1
  251. package/package.json +10 -3
  252. package/dist/ai/adaptive-timeout.d.ts.map +0 -1
  253. package/dist/ai/client.d.ts.map +0 -1
  254. package/dist/ai/index.d.ts.map +0 -1
  255. package/dist/ai/providers/anthropic.d.ts.map +0 -1
  256. package/dist/ai/providers/base.d.ts.map +0 -1
  257. package/dist/ai/providers/index.d.ts.map +0 -1
  258. package/dist/ai/providers/openai.d.ts.map +0 -1
  259. package/dist/ai/rate-limiter.d.ts.map +0 -1
  260. package/dist/bench/generator.d.ts.map +0 -1
  261. package/dist/bench/stats.d.ts.map +0 -1
  262. package/dist/cache/file-storage.d.ts.map +0 -1
  263. package/dist/cache/memory-limits.d.ts.map +0 -1
  264. package/dist/cache/memory-storage.d.ts.map +0 -1
  265. package/dist/cache/redis-storage.d.ts.map +0 -1
  266. package/dist/cli/handler.d.ts.map +0 -1
  267. package/dist/cli/index.d.ts.map +0 -1
  268. package/dist/cli/presets.d.ts.map +0 -1
  269. package/dist/cli/tui/ai-chat.d.ts.map +0 -1
  270. package/dist/cli/tui/load-dashboard.d.ts.map +0 -1
  271. package/dist/cli/tui/scroll-buffer.d.ts.map +0 -1
  272. package/dist/cli/tui/search-panel.d.ts.map +0 -1
  273. package/dist/cli/tui/shell-search.d.ts.map +0 -1
  274. package/dist/cli/tui/shell.d.ts.map +0 -1
  275. package/dist/cli/tui/websocket.d.ts.map +0 -1
  276. package/dist/constants/http-status.d.ts.map +0 -1
  277. package/dist/constants.d.ts.map +0 -1
  278. package/dist/contract/index.d.ts.map +0 -1
  279. package/dist/cookies/memory-cookie-jar.d.ts.map +0 -1
  280. package/dist/core/client.d.ts.map +0 -1
  281. package/dist/core/errors.d.ts.map +0 -1
  282. package/dist/core/index.d.ts.map +0 -1
  283. package/dist/core/request-promise.d.ts.map +0 -1
  284. package/dist/core/request.d.ts.map +0 -1
  285. package/dist/core/response.d.ts.map +0 -1
  286. package/dist/dns/index.d.ts.map +0 -1
  287. package/dist/dns/propagation.d.ts.map +0 -1
  288. package/dist/events/request-events.d.ts.map +0 -1
  289. package/dist/index.d.ts.map +0 -1
  290. package/dist/mcp/client.d.ts.map +0 -1
  291. package/dist/mcp/contract.d.ts.map +0 -1
  292. package/dist/mcp/embeddings-loader.d.ts.map +0 -1
  293. package/dist/mcp/geoip-loader.d.ts.map +0 -1
  294. package/dist/mcp/index.d.ts.map +0 -1
  295. package/dist/mcp/ip-intel.d.ts.map +0 -1
  296. package/dist/mcp/search/hybrid-search.d.ts.map +0 -1
  297. package/dist/mcp/search/index.d.ts.map +0 -1
  298. package/dist/mcp/search/math.d.ts.map +0 -1
  299. package/dist/mcp/search/types.d.ts.map +0 -1
  300. package/dist/mcp/server.d.ts.map +0 -1
  301. package/dist/mcp/types.d.ts.map +0 -1
  302. package/dist/plugins/auth.d.ts.map +0 -1
  303. package/dist/plugins/cache.d.ts.map +0 -1
  304. package/dist/plugins/circuit-breaker.d.ts.map +0 -1
  305. package/dist/plugins/compression.d.ts.map +0 -1
  306. package/dist/plugins/cookie-jar.d.ts.map +0 -1
  307. package/dist/plugins/dedup.d.ts.map +0 -1
  308. package/dist/plugins/graphql.d.ts.map +0 -1
  309. package/dist/plugins/grpc-web.d.ts.map +0 -1
  310. package/dist/plugins/har-player.d.ts.map +0 -1
  311. package/dist/plugins/har-recorder.d.ts.map +0 -1
  312. package/dist/plugins/hls.d.ts.map +0 -1
  313. package/dist/plugins/http2-push.d.ts.map +0 -1
  314. package/dist/plugins/http3.d.ts.map +0 -1
  315. package/dist/plugins/interface-rotator.d.ts.map +0 -1
  316. package/dist/plugins/jsonrpc.d.ts.map +0 -1
  317. package/dist/plugins/logger.d.ts.map +0 -1
  318. package/dist/plugins/odata.d.ts.map +0 -1
  319. package/dist/plugins/pagination.d.ts.map +0 -1
  320. package/dist/plugins/proxy-rotator.d.ts.map +0 -1
  321. package/dist/plugins/retry.d.ts.map +0 -1
  322. package/dist/plugins/scrape.d.ts.map +0 -1
  323. package/dist/plugins/server-timing.d.ts.map +0 -1
  324. package/dist/plugins/soap.d.ts.map +0 -1
  325. package/dist/plugins/user-agent.d.ts.map +0 -1
  326. package/dist/plugins/xml.d.ts.map +0 -1
  327. package/dist/plugins/xsrf.d.ts.map +0 -1
  328. package/dist/presets/anthropic.d.ts.map +0 -1
  329. package/dist/presets/aws.d.ts.map +0 -1
  330. package/dist/presets/azure-openai.d.ts.map +0 -1
  331. package/dist/presets/azure.d.ts.map +0 -1
  332. package/dist/presets/cloudflare.d.ts.map +0 -1
  333. package/dist/presets/cohere.d.ts.map +0 -1
  334. package/dist/presets/deepseek.d.ts.map +0 -1
  335. package/dist/presets/digitalocean.d.ts.map +0 -1
  336. package/dist/presets/discord.d.ts.map +0 -1
  337. package/dist/presets/fireworks.d.ts.map +0 -1
  338. package/dist/presets/gcp.d.ts.map +0 -1
  339. package/dist/presets/gemini.d.ts.map +0 -1
  340. package/dist/presets/github.d.ts.map +0 -1
  341. package/dist/presets/gitlab.d.ts.map +0 -1
  342. package/dist/presets/groq.d.ts.map +0 -1
  343. package/dist/presets/huggingface.d.ts.map +0 -1
  344. package/dist/presets/index.d.ts.map +0 -1
  345. package/dist/presets/linear.d.ts.map +0 -1
  346. package/dist/presets/mailgun.d.ts.map +0 -1
  347. package/dist/presets/meta.d.ts.map +0 -1
  348. package/dist/presets/mistral.d.ts.map +0 -1
  349. package/dist/presets/notion.d.ts.map +0 -1
  350. package/dist/presets/openai.d.ts.map +0 -1
  351. package/dist/presets/oracle.d.ts.map +0 -1
  352. package/dist/presets/perplexity.d.ts.map +0 -1
  353. package/dist/presets/registry.d.ts.map +0 -1
  354. package/dist/presets/replicate.d.ts.map +0 -1
  355. package/dist/presets/sinch.d.ts.map +0 -1
  356. package/dist/presets/slack.d.ts.map +0 -1
  357. package/dist/presets/stripe.d.ts.map +0 -1
  358. package/dist/presets/supabase.d.ts.map +0 -1
  359. package/dist/presets/tiktok.d.ts.map +0 -1
  360. package/dist/presets/together.d.ts.map +0 -1
  361. package/dist/presets/twilio.d.ts.map +0 -1
  362. package/dist/presets/vercel.d.ts.map +0 -1
  363. package/dist/presets/vultr.d.ts.map +0 -1
  364. package/dist/presets/xai.d.ts.map +0 -1
  365. package/dist/presets/youtube.d.ts.map +0 -1
  366. package/dist/protocols/ftp.d.ts.map +0 -1
  367. package/dist/protocols/index.d.ts.map +0 -1
  368. package/dist/protocols/sftp.d.ts.map +0 -1
  369. package/dist/protocols/telnet.d.ts.map +0 -1
  370. package/dist/recker.d.ts.map +0 -1
  371. package/dist/runner/request-runner.d.ts.map +0 -1
  372. package/dist/scrape/document.d.ts.map +0 -1
  373. package/dist/scrape/element.d.ts.map +0 -1
  374. package/dist/scrape/extractors.d.ts.map +0 -1
  375. package/dist/scrape/index.d.ts.map +0 -1
  376. package/dist/scrape/types.d.ts.map +0 -1
  377. package/dist/testing/index.d.ts.map +0 -1
  378. package/dist/testing/mock-hls-server.d.ts.map +0 -1
  379. package/dist/testing/mock-http-server.d.ts.map +0 -1
  380. package/dist/testing/mock-sse-server.d.ts.map +0 -1
  381. package/dist/testing/mock-udp-server.d.ts.map +0 -1
  382. package/dist/testing/mock-websocket-server.d.ts.map +0 -1
  383. package/dist/testing/mock.d.ts.map +0 -1
  384. package/dist/transport/base-udp.d.ts.map +0 -1
  385. package/dist/transport/fetch.d.ts.map +0 -1
  386. package/dist/transport/udp-response.d.ts.map +0 -1
  387. package/dist/transport/udp.d.ts.map +0 -1
  388. package/dist/transport/undici.d.ts.map +0 -1
  389. package/dist/types/ai.d.ts.map +0 -1
  390. package/dist/types/index.d.ts.map +0 -1
  391. package/dist/types/logger.d.ts.map +0 -1
  392. package/dist/types/udp.d.ts.map +0 -1
  393. package/dist/udp/index.d.ts.map +0 -1
  394. package/dist/utils/agent-manager.d.ts.map +0 -1
  395. package/dist/utils/body.d.ts.map +0 -1
  396. package/dist/utils/cert.d.ts.map +0 -1
  397. package/dist/utils/charset.d.ts.map +0 -1
  398. package/dist/utils/chart.d.ts.map +0 -1
  399. package/dist/utils/client-pool.d.ts.map +0 -1
  400. package/dist/utils/colors.d.ts.map +0 -1
  401. package/dist/utils/concurrency.d.ts.map +0 -1
  402. package/dist/utils/dns-toolkit.d.ts.map +0 -1
  403. package/dist/utils/dns.d.ts.map +0 -1
  404. package/dist/utils/doh.d.ts.map +0 -1
  405. package/dist/utils/download.d.ts.map +0 -1
  406. package/dist/utils/env-proxy.d.ts.map +0 -1
  407. package/dist/utils/header-parser.d.ts.map +0 -1
  408. package/dist/utils/html-cleaner.d.ts.map +0 -1
  409. package/dist/utils/link-header.d.ts.map +0 -1
  410. package/dist/utils/optional-require.d.ts.map +0 -1
  411. package/dist/utils/progress.d.ts.map +0 -1
  412. package/dist/utils/rdap.d.ts.map +0 -1
  413. package/dist/utils/request-pool.d.ts.map +0 -1
  414. package/dist/utils/security-grader.d.ts.map +0 -1
  415. package/dist/utils/sparkline.d.ts.map +0 -1
  416. package/dist/utils/sse.d.ts.map +0 -1
  417. package/dist/utils/streaming.d.ts.map +0 -1
  418. package/dist/utils/system-metrics.d.ts.map +0 -1
  419. package/dist/utils/tls-inspector.d.ts.map +0 -1
  420. package/dist/utils/try-fn.d.ts.map +0 -1
  421. package/dist/utils/upload.d.ts.map +0 -1
  422. package/dist/utils/user-agent.d.ts.map +0 -1
  423. package/dist/utils/whois.d.ts.map +0 -1
  424. package/dist/webrtc/index.d.ts.map +0 -1
  425. package/dist/websocket/client.d.ts.map +0 -1
@@ -0,0 +1,267 @@
1
+ import { createClient } from '../../core/client.js';
2
+ import { createDNS } from '../../dns/index.js';
3
+ import { createWhois } from '../../utils/whois.js';
4
+ import { createConnection } from 'net';
5
+ const dnsClient = createDNS({ provider: 'system' });
6
+ const whoisClient = createWhois();
7
+ async function httpRequest(args) {
8
+ const url = String(args.url || '');
9
+ const method = String(args.method || 'GET').toUpperCase();
10
+ const headers = args.headers || {};
11
+ const body = args.body;
12
+ const timeout = Number(args.timeout) || 10000;
13
+ const retries = Number(args.retries) || 0;
14
+ if (!url) {
15
+ return {
16
+ content: [{ type: 'text', text: 'Error: url is required' }],
17
+ isError: true,
18
+ };
19
+ }
20
+ try {
21
+ const client = createClient({
22
+ headers,
23
+ timeout,
24
+ retry: {
25
+ maxAttempts: retries,
26
+ },
27
+ });
28
+ let response;
29
+ switch (method) {
30
+ case 'GET':
31
+ response = await client.get(url);
32
+ break;
33
+ case 'POST':
34
+ response = await client.post(url, { json: body });
35
+ break;
36
+ case 'PUT':
37
+ response = await client.put(url, { json: body });
38
+ break;
39
+ case 'DELETE':
40
+ response = await client.delete(url);
41
+ break;
42
+ case 'PATCH':
43
+ response = await client.patch(url, { json: body });
44
+ break;
45
+ case 'HEAD':
46
+ response = await client.head(url);
47
+ break;
48
+ default:
49
+ return {
50
+ content: [{ type: 'text', text: `Error: Unsupported method ${method}` }],
51
+ isError: true,
52
+ };
53
+ }
54
+ const responseHeaders = {};
55
+ response.headers.forEach((val, key) => {
56
+ responseHeaders[key] = val;
57
+ });
58
+ const result = {
59
+ status: response.status,
60
+ statusText: response.statusText,
61
+ headers: responseHeaders,
62
+ data: await response.text(),
63
+ };
64
+ try {
65
+ result.data = JSON.parse(result.data);
66
+ }
67
+ catch {
68
+ }
69
+ return {
70
+ content: [{
71
+ type: 'text',
72
+ text: JSON.stringify(result, null, 2),
73
+ }],
74
+ };
75
+ }
76
+ catch (error) {
77
+ return {
78
+ content: [{
79
+ type: 'text',
80
+ text: `Request failed: ${error.message}`,
81
+ }],
82
+ isError: true,
83
+ };
84
+ }
85
+ }
86
+ async function dnsLookup(args) {
87
+ const domain = String(args.domain || '');
88
+ const type = String(args.type || 'A').toUpperCase();
89
+ if (!domain) {
90
+ return {
91
+ content: [{ type: 'text', text: 'Error: domain is required' }],
92
+ isError: true,
93
+ };
94
+ }
95
+ try {
96
+ let result;
97
+ if (type === 'ALL') {
98
+ result = await dnsClient.resolveAll(domain);
99
+ }
100
+ else {
101
+ result = await dnsClient.resolve(domain, type);
102
+ }
103
+ return {
104
+ content: [{
105
+ type: 'text',
106
+ text: JSON.stringify({ domain, type, result }, null, 2),
107
+ }],
108
+ };
109
+ }
110
+ catch (error) {
111
+ return {
112
+ content: [{
113
+ type: 'text',
114
+ text: `DNS lookup failed: ${error.message}`,
115
+ }],
116
+ isError: true,
117
+ };
118
+ }
119
+ }
120
+ async function whoisLookup(args) {
121
+ const query = String(args.query || '');
122
+ if (!query) {
123
+ return {
124
+ content: [{ type: 'text', text: 'Error: query is required' }],
125
+ isError: true,
126
+ };
127
+ }
128
+ try {
129
+ const result = await whoisClient.lookup(query);
130
+ return {
131
+ content: [{
132
+ type: 'text',
133
+ text: JSON.stringify({
134
+ server: result.server,
135
+ data: result.data,
136
+ }, null, 2),
137
+ }],
138
+ };
139
+ }
140
+ catch (error) {
141
+ return {
142
+ content: [{
143
+ type: 'text',
144
+ text: `WHOIS lookup failed: ${error.message}`,
145
+ }],
146
+ isError: true,
147
+ };
148
+ }
149
+ }
150
+ async function ping(args) {
151
+ const host = String(args.host || '');
152
+ const port = Number(args.port) || 80;
153
+ const timeout = Number(args.timeout) || 5000;
154
+ const count = Number(args.count) || 3;
155
+ if (!host) {
156
+ return {
157
+ content: [{ type: 'text', text: 'Error: host is required' }],
158
+ isError: true,
159
+ };
160
+ }
161
+ const results = [];
162
+ for (let i = 0; i < count; i++) {
163
+ const start = Date.now();
164
+ try {
165
+ await new Promise((resolve, reject) => {
166
+ const socket = createConnection({ host, port, timeout });
167
+ socket.on('connect', () => {
168
+ socket.destroy();
169
+ resolve();
170
+ });
171
+ socket.on('timeout', () => {
172
+ socket.destroy();
173
+ reject(new Error('Timeout'));
174
+ });
175
+ socket.on('error', (err) => {
176
+ socket.destroy();
177
+ reject(err);
178
+ });
179
+ });
180
+ results.push({ seq: i + 1, time: Date.now() - start });
181
+ }
182
+ catch (error) {
183
+ results.push({ seq: i + 1, error: error.message });
184
+ }
185
+ if (i < count - 1) {
186
+ await new Promise(r => setTimeout(r, 200));
187
+ }
188
+ }
189
+ const successful = results.filter(r => !r.error);
190
+ const totalTime = successful.reduce((acc, r) => acc + (r.time || 0), 0);
191
+ const avg = successful.length > 0 ? totalTime / successful.length : 0;
192
+ return {
193
+ content: [{
194
+ type: 'text',
195
+ text: JSON.stringify({
196
+ host,
197
+ port,
198
+ sent: count,
199
+ received: successful.length,
200
+ loss: `${((count - successful.length) / count * 100).toFixed(1)}%`,
201
+ avgLatency: `${avg.toFixed(2)}ms`,
202
+ details: results,
203
+ }, null, 2),
204
+ }],
205
+ };
206
+ }
207
+ export const networkTools = [
208
+ {
209
+ name: 'rek_http_request',
210
+ description: 'Perform an HTTP request to any URL using Recker\'s robust client. Supports all methods, headers, and automatic JSON parsing.',
211
+ inputSchema: {
212
+ type: 'object',
213
+ properties: {
214
+ url: { type: 'string', description: 'Target URL' },
215
+ method: { type: 'string', description: 'HTTP method (GET, POST, PUT, DELETE, etc.)', default: 'GET' },
216
+ headers: { type: 'object', description: 'Request headers' },
217
+ body: { type: 'object', description: 'JSON body for POST/PUT/PATCH' },
218
+ timeout: { type: 'number', description: 'Timeout in ms', default: 10000 },
219
+ retries: { type: 'number', description: 'Number of retries', default: 0 },
220
+ },
221
+ required: ['url'],
222
+ },
223
+ },
224
+ {
225
+ name: 'rek_dns_lookup',
226
+ description: 'Resolve DNS records for a domain. Supports A, AAAA, MX, TXT, NS, etc.',
227
+ inputSchema: {
228
+ type: 'object',
229
+ properties: {
230
+ domain: { type: 'string', description: 'Domain name to resolve' },
231
+ type: { type: 'string', description: 'Record type (A, AAAA, MX, TXT, NS, ALL)', default: 'A' },
232
+ },
233
+ required: ['domain'],
234
+ },
235
+ },
236
+ {
237
+ name: 'rek_whois_lookup',
238
+ description: 'Perform a WHOIS lookup for a domain or IP address to find registration info.',
239
+ inputSchema: {
240
+ type: 'object',
241
+ properties: {
242
+ query: { type: 'string', description: 'Domain or IP to lookup' },
243
+ },
244
+ required: ['query'],
245
+ },
246
+ },
247
+ {
248
+ name: 'rek_network_ping',
249
+ description: 'Check TCP connectivity to a host and port. Measures latency.',
250
+ inputSchema: {
251
+ type: 'object',
252
+ properties: {
253
+ host: { type: 'string', description: 'Hostname or IP' },
254
+ port: { type: 'number', description: 'Target port', default: 80 },
255
+ count: { type: 'number', description: 'Number of pings', default: 3 },
256
+ timeout: { type: 'number', description: 'Timeout per ping in ms', default: 5000 },
257
+ },
258
+ required: ['host'],
259
+ },
260
+ },
261
+ ];
262
+ export const networkToolHandlers = {
263
+ rek_http_request: httpRequest,
264
+ rek_dns_lookup: dnsLookup,
265
+ rek_whois_lookup: whoisLookup,
266
+ rek_network_ping: ping,
267
+ };
@@ -0,0 +1,17 @@
1
+ import type { MCPTool, MCPToolResult } from '../types.js';
2
+ export type MCPToolHandler = (args: Record<string, unknown>) => Promise<MCPToolResult>;
3
+ export interface ToolModule {
4
+ tools: MCPTool[];
5
+ handlers: Record<string, MCPToolHandler>;
6
+ }
7
+ export declare class ToolRegistry {
8
+ private tools;
9
+ private handlers;
10
+ constructor();
11
+ registerTool(tool: MCPTool, handler: MCPToolHandler): void;
12
+ registerModule(module: ToolModule): void;
13
+ getTool(name: string): MCPTool | undefined;
14
+ listTools(): MCPTool[];
15
+ callTool(name: string, args: Record<string, unknown>): Promise<MCPToolResult>;
16
+ hasTool(name: string): boolean;
17
+ }
@@ -0,0 +1,37 @@
1
+ export class ToolRegistry {
2
+ tools = new Map();
3
+ handlers = new Map();
4
+ constructor() { }
5
+ registerTool(tool, handler) {
6
+ if (this.tools.has(tool.name)) {
7
+ throw new Error(`Tool already registered: ${tool.name}`);
8
+ }
9
+ this.tools.set(tool.name, tool);
10
+ this.handlers.set(tool.name, handler);
11
+ }
12
+ registerModule(module) {
13
+ for (const tool of module.tools) {
14
+ const handler = module.handlers[tool.name];
15
+ if (!handler) {
16
+ throw new Error(`Handler missing for tool: ${tool.name}`);
17
+ }
18
+ this.registerTool(tool, handler);
19
+ }
20
+ }
21
+ getTool(name) {
22
+ return this.tools.get(name);
23
+ }
24
+ listTools() {
25
+ return Array.from(this.tools.values());
26
+ }
27
+ async callTool(name, args) {
28
+ const handler = this.handlers.get(name);
29
+ if (!handler) {
30
+ throw new Error(`Unknown tool: ${name}`);
31
+ }
32
+ return handler(args);
33
+ }
34
+ hasTool(name) {
35
+ return this.tools.has(name);
36
+ }
37
+ }
@@ -149,4 +149,3 @@ export interface MCPTransportOptions {
149
149
  retries?: number;
150
150
  transport?: any;
151
151
  }
152
- //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { Middleware, Plugin } from '../../types/index.js';
2
+ export interface ApiKeyAuthOptions {
3
+ key: string | (() => string | Promise<string>);
4
+ in?: 'header' | 'query';
5
+ name?: string;
6
+ }
7
+ export declare function apiKeyAuth(options: ApiKeyAuthOptions): Middleware;
8
+ export declare function apiKeyAuthPlugin(options: ApiKeyAuthOptions): Plugin;
@@ -0,0 +1,27 @@
1
+ export function apiKeyAuth(options) {
2
+ const location = options.in ?? 'header';
3
+ const name = options.name ?? 'X-API-Key';
4
+ return async (req, next) => {
5
+ const key = typeof options.key === 'function'
6
+ ? await options.key()
7
+ : options.key;
8
+ if (location === 'header') {
9
+ const newReq = req.withHeader(name, key);
10
+ return next(newReq);
11
+ }
12
+ else {
13
+ const url = new URL(req.url);
14
+ url.searchParams.set(name, key);
15
+ const newReq = {
16
+ ...req,
17
+ url: url.toString(),
18
+ };
19
+ return next(newReq);
20
+ }
21
+ };
22
+ }
23
+ export function apiKeyAuthPlugin(options) {
24
+ return (client) => {
25
+ client.use(apiKeyAuth(options));
26
+ };
27
+ }
@@ -0,0 +1,33 @@
1
+ import { Middleware, Plugin } from '../../types/index.js';
2
+ import { OIDCTokens } from './oidc.js';
3
+ export interface Auth0Options {
4
+ domain: string;
5
+ clientId: string;
6
+ clientSecret?: string;
7
+ audience?: string;
8
+ scopes?: string[];
9
+ accessToken?: string | (() => string | Promise<string>);
10
+ refreshToken?: string;
11
+ tokenStorage?: {
12
+ get: () => Promise<OIDCTokens | null>;
13
+ set: (tokens: OIDCTokens) => Promise<void>;
14
+ };
15
+ organization?: string;
16
+ connection?: string;
17
+ }
18
+ export declare function generateAuth0AuthUrl(options: Auth0Options & {
19
+ redirectUri: string;
20
+ state?: string;
21
+ usePKCE?: boolean;
22
+ }): Promise<{
23
+ url: string;
24
+ codeVerifier?: string;
25
+ }>;
26
+ export declare function exchangeAuth0Code(options: Auth0Options & {
27
+ code: string;
28
+ redirectUri: string;
29
+ codeVerifier?: string;
30
+ }): Promise<OIDCTokens>;
31
+ export declare function getAuth0UserInfo(domain: string, accessToken: string): Promise<Record<string, unknown>>;
32
+ export declare function auth0(options: Auth0Options): Middleware;
33
+ export declare function auth0Plugin(options: Auth0Options): Plugin;
@@ -0,0 +1,94 @@
1
+ import { oidc, generatePKCE } from './oidc.js';
2
+ export async function generateAuth0AuthUrl(options) {
3
+ const issuer = `https://${options.domain}`;
4
+ const pkce = options.usePKCE ? generatePKCE() : undefined;
5
+ const params = new URLSearchParams({
6
+ response_type: 'code',
7
+ client_id: options.clientId,
8
+ redirect_uri: options.redirectUri,
9
+ scope: (options.scopes || ['openid', 'profile', 'email']).join(' '),
10
+ });
11
+ if (options.audience) {
12
+ params.set('audience', options.audience);
13
+ }
14
+ if (options.state) {
15
+ params.set('state', options.state);
16
+ }
17
+ if (options.organization) {
18
+ params.set('organization', options.organization);
19
+ }
20
+ if (options.connection) {
21
+ params.set('connection', options.connection);
22
+ }
23
+ if (pkce) {
24
+ params.set('code_challenge', pkce.codeChallenge);
25
+ params.set('code_challenge_method', 'S256');
26
+ }
27
+ return {
28
+ url: `${issuer}/authorize?${params.toString()}`,
29
+ codeVerifier: pkce?.codeVerifier,
30
+ };
31
+ }
32
+ export async function exchangeAuth0Code(options) {
33
+ const tokenUrl = `https://${options.domain}/oauth/token`;
34
+ const params = {
35
+ grant_type: 'authorization_code',
36
+ client_id: options.clientId,
37
+ code: options.code,
38
+ redirect_uri: options.redirectUri,
39
+ };
40
+ if (options.clientSecret) {
41
+ params.client_secret = options.clientSecret;
42
+ }
43
+ if (options.codeVerifier) {
44
+ params.code_verifier = options.codeVerifier;
45
+ }
46
+ const response = await fetch(tokenUrl, {
47
+ method: 'POST',
48
+ headers: {
49
+ 'Content-Type': 'application/json',
50
+ },
51
+ body: JSON.stringify(params),
52
+ });
53
+ if (!response.ok) {
54
+ const error = await response.text();
55
+ throw new Error(`Auth0 token exchange failed: ${error}`);
56
+ }
57
+ const data = await response.json();
58
+ return {
59
+ accessToken: data.access_token,
60
+ refreshToken: data.refresh_token,
61
+ idToken: data.id_token,
62
+ expiresAt: data.expires_in ? Date.now() + data.expires_in * 1000 : undefined,
63
+ tokenType: data.token_type || 'Bearer',
64
+ };
65
+ }
66
+ export async function getAuth0UserInfo(domain, accessToken) {
67
+ const response = await fetch(`https://${domain}/userinfo`, {
68
+ headers: {
69
+ Authorization: `Bearer ${accessToken}`,
70
+ },
71
+ });
72
+ if (!response.ok) {
73
+ throw new Error(`Failed to get user info: ${response.status}`);
74
+ }
75
+ return response.json();
76
+ }
77
+ export function auth0(options) {
78
+ const issuer = `https://${options.domain}`;
79
+ return oidc({
80
+ issuer,
81
+ clientId: options.clientId,
82
+ clientSecret: options.clientSecret,
83
+ scopes: options.scopes || ['openid', 'profile', 'email'],
84
+ accessToken: options.accessToken,
85
+ refreshToken: options.refreshToken,
86
+ tokenStorage: options.tokenStorage,
87
+ audience: options.audience,
88
+ });
89
+ }
90
+ export function auth0Plugin(options) {
91
+ return (client) => {
92
+ client.use(auth0(options));
93
+ };
94
+ }
@@ -0,0 +1,10 @@
1
+ import { Middleware, Plugin } from '../../types/index.js';
2
+ export interface AWSSignatureV4Options {
3
+ accessKeyId: string;
4
+ secretAccessKey: string;
5
+ region: string;
6
+ service: string;
7
+ sessionToken?: string;
8
+ }
9
+ export declare function awsSignatureV4(options: AWSSignatureV4Options): Middleware;
10
+ export declare function awsSignatureV4Plugin(options: AWSSignatureV4Options): Plugin;
@@ -0,0 +1,88 @@
1
+ import { createHash, createHmac } from 'node:crypto';
2
+ function sha256(str) {
3
+ return createHash('sha256').update(str).digest('hex');
4
+ }
5
+ export function awsSignatureV4(options) {
6
+ return async (req, next) => {
7
+ const url = new URL(req.url);
8
+ const host = url.host;
9
+ const pathname = url.pathname;
10
+ const queryString = url.search.slice(1);
11
+ const now = new Date();
12
+ const amzDate = now.toISOString().replace(/[:-]|\.\d{3}/g, '');
13
+ const dateStamp = amzDate.slice(0, 8);
14
+ const method = req.method;
15
+ const canonicalUri = pathname || '/';
16
+ const canonicalQueryString = queryString
17
+ .split('&')
18
+ .filter(Boolean)
19
+ .sort()
20
+ .join('&');
21
+ let payload = '';
22
+ if (req.body) {
23
+ if (typeof req.body === 'string') {
24
+ payload = req.body;
25
+ }
26
+ else if (req.body instanceof ArrayBuffer) {
27
+ payload = Buffer.from(req.body).toString();
28
+ }
29
+ }
30
+ const payloadHash = sha256(payload);
31
+ const headers = {
32
+ host,
33
+ 'x-amz-date': amzDate,
34
+ 'x-amz-content-sha256': payloadHash,
35
+ };
36
+ if (options.sessionToken) {
37
+ headers['x-amz-security-token'] = options.sessionToken;
38
+ }
39
+ req.headers.forEach((value, key) => {
40
+ headers[key.toLowerCase()] = value;
41
+ });
42
+ const signedHeaders = Object.keys(headers).sort().join(';');
43
+ const canonicalHeaders = Object.keys(headers)
44
+ .sort()
45
+ .map(key => `${key}:${headers[key].trim()}\n`)
46
+ .join('');
47
+ const canonicalRequest = [
48
+ method,
49
+ canonicalUri,
50
+ canonicalQueryString,
51
+ canonicalHeaders,
52
+ signedHeaders,
53
+ payloadHash,
54
+ ].join('\n');
55
+ const algorithm = 'AWS4-HMAC-SHA256';
56
+ const credentialScope = `${dateStamp}/${options.region}/${options.service}/aws4_request`;
57
+ const stringToSign = [
58
+ algorithm,
59
+ amzDate,
60
+ credentialScope,
61
+ sha256(canonicalRequest),
62
+ ].join('\n');
63
+ const getSignatureKey = (key, dateStamp, regionName, serviceName) => {
64
+ const kDate = createHmac('sha256', `AWS4${key}`).update(dateStamp).digest();
65
+ const kRegion = createHmac('sha256', kDate).update(regionName).digest();
66
+ const kService = createHmac('sha256', kRegion).update(serviceName).digest();
67
+ const kSigning = createHmac('sha256', kService).update('aws4_request').digest();
68
+ return kSigning;
69
+ };
70
+ const signingKey = getSignatureKey(options.secretAccessKey, dateStamp, options.region, options.service);
71
+ const signature = createHmac('sha256', signingKey)
72
+ .update(stringToSign)
73
+ .digest('hex');
74
+ const authorizationHeader = `${algorithm} Credential=${options.accessKeyId}/${credentialScope}, SignedHeaders=${signedHeaders}, Signature=${signature}`;
75
+ let newReq = req.withHeader('Authorization', authorizationHeader);
76
+ newReq = newReq.withHeader('x-amz-date', amzDate);
77
+ newReq = newReq.withHeader('x-amz-content-sha256', payloadHash);
78
+ if (options.sessionToken) {
79
+ newReq = newReq.withHeader('x-amz-security-token', options.sessionToken);
80
+ }
81
+ return next(newReq);
82
+ };
83
+ }
84
+ export function awsSignatureV4Plugin(options) {
85
+ return (client) => {
86
+ client.use(awsSignatureV4(options));
87
+ };
88
+ }
@@ -0,0 +1,48 @@
1
+ import { Middleware, Plugin } from '../../types/index.js';
2
+ import { OIDCTokens } from './oidc.js';
3
+ export interface AzureADOptions {
4
+ tenantId: string;
5
+ clientId: string;
6
+ clientSecret?: string;
7
+ clientCertificate?: {
8
+ thumbprint: string;
9
+ privateKey: string;
10
+ };
11
+ scopes?: string[];
12
+ accessToken?: string | (() => string | Promise<string>);
13
+ refreshToken?: string;
14
+ tokenStorage?: {
15
+ get: () => Promise<OIDCTokens | null>;
16
+ set: (tokens: OIDCTokens) => Promise<void>;
17
+ };
18
+ cloudInstance?: string;
19
+ b2c?: {
20
+ tenantName: string;
21
+ policy: string;
22
+ };
23
+ }
24
+ export declare function generateAzureADAuthUrl(options: AzureADOptions & {
25
+ redirectUri: string;
26
+ state?: string;
27
+ nonce?: string;
28
+ usePKCE?: boolean;
29
+ prompt?: 'login' | 'none' | 'consent' | 'select_account';
30
+ loginHint?: string;
31
+ domainHint?: string;
32
+ }): Promise<{
33
+ url: string;
34
+ codeVerifier?: string;
35
+ }>;
36
+ export declare function exchangeAzureADCode(options: AzureADOptions & {
37
+ code: string;
38
+ redirectUri: string;
39
+ codeVerifier?: string;
40
+ }): Promise<OIDCTokens>;
41
+ export declare function azureADOnBehalfOf(options: AzureADOptions & {
42
+ assertion: string;
43
+ scope: string;
44
+ }): Promise<OIDCTokens>;
45
+ export declare function getAzureADUserInfo(accessToken: string): Promise<Record<string, unknown>>;
46
+ export declare function azureAD(options: AzureADOptions): Middleware;
47
+ export declare function azureADPlugin(options: AzureADOptions): Plugin;
48
+ export { azureAD as entraId, azureADPlugin as entraIdPlugin };