@hasna/connectors 1.4.1 → 1.4.3

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 (499) hide show
  1. package/bin/index.js +1271 -317
  2. package/bin/mcp.js +524 -211
  3. package/bin/serve.js +1208 -256
  4. package/connectors/adobe/package.json +1 -1
  5. package/connectors/aitableai/package.json +1 -1
  6. package/connectors/alchemy/package.json +1 -1
  7. package/connectors/alerty/package.json +1 -1
  8. package/connectors/alienvault/package.json +1 -1
  9. package/connectors/alphamoon/package.json +1 -1
  10. package/connectors/alttextai/package.json +1 -1
  11. package/connectors/amadeus/package.json +1 -1
  12. package/connectors/amadeus/src/api/client.ts +6 -6
  13. package/connectors/amadeus/src/cli/index.ts +6 -6
  14. package/connectors/amadeus/src/utils/output.ts +5 -5
  15. package/connectors/amazon/package.json +1 -1
  16. package/connectors/amilia/package.json +1 -1
  17. package/connectors/amqpsender/package.json +1 -1
  18. package/connectors/announcekit/package.json +1 -1
  19. package/connectors/anthropic/.env.example +1 -1
  20. package/connectors/anyscale/package.json +1 -1
  21. package/connectors/apiary/package.json +1 -1
  22. package/connectors/apiflash/package.json +1 -1
  23. package/connectors/apitemplateio/package.json +1 -1
  24. package/connectors/apptivegrid/package.json +1 -1
  25. package/connectors/assemblyai/package.json +1 -1
  26. package/connectors/autom/package.json +1 -1
  27. package/connectors/automizy/package.json +1 -1
  28. package/connectors/autopilot/package.json +1 -1
  29. package/connectors/awscognito/package.json +1 -1
  30. package/connectors/bamboohr/package.json +1 -1
  31. package/connectors/bannerbear/package.json +1 -1
  32. package/connectors/baseten/package.json +1 -1
  33. package/connectors/box/package.json +1 -1
  34. package/connectors/brevo/package.json +1 -1
  35. package/connectors/calendly/package.json +1 -1
  36. package/connectors/cerebras/package.json +1 -1
  37. package/connectors/chargebee/package.json +1 -1
  38. package/connectors/clearbit/package.json +1 -1
  39. package/connectors/clickbank/README.md +2 -2
  40. package/connectors/cloudflare-workers/package.json +1 -1
  41. package/connectors/coda/package.json +1 -1
  42. package/connectors/coingecko/package.json +1 -1
  43. package/connectors/convertkit/package.json +1 -1
  44. package/connectors/customerio/package.json +1 -1
  45. package/connectors/databricks/package.json +1 -1
  46. package/connectors/datadog/package.json +1 -1
  47. package/connectors/datasoap/README.md +2 -2
  48. package/connectors/datasoap/package.json +1 -1
  49. package/connectors/datumbox/README.md +2 -2
  50. package/connectors/datumbox/package.json +1 -1
  51. package/connectors/dayschedule/README.md +2 -2
  52. package/connectors/dayschedule/package.json +1 -1
  53. package/connectors/deepgram/package.json +1 -1
  54. package/connectors/deepinfra/README.md +2 -2
  55. package/connectors/deepinfra/package.json +1 -1
  56. package/connectors/deepl/README.md +2 -2
  57. package/connectors/deepl/package.json +1 -1
  58. package/connectors/deepseek/package.json +1 -1
  59. package/connectors/demio/README.md +2 -2
  60. package/connectors/demio/package.json +1 -1
  61. package/connectors/descript/README.md +2 -2
  62. package/connectors/descript/package.json +1 -1
  63. package/connectors/detrack/README.md +2 -2
  64. package/connectors/detrack/package.json +1 -1
  65. package/connectors/devcycle/README.md +2 -2
  66. package/connectors/devcycle/package.json +1 -1
  67. package/connectors/dhl/README.md +2 -2
  68. package/connectors/dhl/package.json +1 -1
  69. package/connectors/docusign/package.json +1 -1
  70. package/connectors/dropbox/package.json +1 -1
  71. package/connectors/fal/package.json +1 -1
  72. package/connectors/fathom/package.json +1 -1
  73. package/connectors/fireworks/package.json +1 -1
  74. package/connectors/gitlab/package.json +1 -1
  75. package/connectors/googlechat/README.md +1 -2
  76. package/connectors/googledrive/src/api/client.ts +5 -5
  77. package/connectors/googledrive/src/api/files.ts +11 -11
  78. package/connectors/googledrive/src/api/folders.ts +2 -2
  79. package/connectors/googledrive/src/cli/index.ts +4 -4
  80. package/connectors/googledrive/src/utils/output.ts +3 -3
  81. package/connectors/googleforms/README.md +1 -2
  82. package/connectors/googleperspective/README.md +1 -2
  83. package/connectors/grafana/package.json +1 -1
  84. package/connectors/growbots/README.md +2 -2
  85. package/connectors/growbots/package.json +1 -1
  86. package/connectors/gumroad/package.json +1 -1
  87. package/connectors/gupshup/README.md +2 -2
  88. package/connectors/gupshup/package.json +1 -1
  89. package/connectors/guru/README.md +2 -2
  90. package/connectors/guru/package.json +1 -1
  91. package/connectors/hackernews/README.md +2 -2
  92. package/connectors/hackernews/package.json +1 -1
  93. package/connectors/halopsa/README.md +2 -2
  94. package/connectors/halopsa/package.json +1 -1
  95. package/connectors/handwrytten/README.md +2 -2
  96. package/connectors/handwrytten/package.json +1 -1
  97. package/connectors/hansei/README.md +2 -2
  98. package/connectors/hansei/package.json +1 -1
  99. package/connectors/harrypotterapi/README.md +2 -2
  100. package/connectors/harrypotterapi/package.json +1 -1
  101. package/connectors/harvest/README.md +2 -2
  102. package/connectors/harvest/package.json +1 -1
  103. package/connectors/headlesstesting/README.md +2 -2
  104. package/connectors/headlesstesting/package.json +1 -1
  105. package/connectors/homeassistant/package.json +1 -1
  106. package/connectors/klaviyo/package.json +1 -1
  107. package/connectors/lemonsqueezy/package.json +1 -1
  108. package/connectors/lighthouse/src/api/index.ts +1 -1
  109. package/connectors/linkedin/package.json +1 -1
  110. package/connectors/linkish/README.md +2 -2
  111. package/connectors/linkish/package.json +1 -1
  112. package/connectors/liveagent/README.md +2 -2
  113. package/connectors/liveagent/package.json +1 -1
  114. package/connectors/localazy/README.md +2 -2
  115. package/connectors/localazy/package.json +1 -1
  116. package/connectors/loginradius/README.md +2 -2
  117. package/connectors/loginradius/package.json +1 -1
  118. package/connectors/lokalise/README.md +2 -2
  119. package/connectors/lokalise/package.json +1 -1
  120. package/connectors/lonescale/README.md +2 -2
  121. package/connectors/lonescale/package.json +1 -1
  122. package/connectors/lucidchart/README.md +2 -2
  123. package/connectors/lucidchart/package.json +1 -1
  124. package/connectors/luma/package.json +1 -1
  125. package/connectors/magento2/README.md +2 -2
  126. package/connectors/magento2/package.json +1 -1
  127. package/connectors/mailcheck/README.md +2 -2
  128. package/connectors/mailcheck/package.json +1 -1
  129. package/connectors/mailchimp/package.json +1 -1
  130. package/connectors/mailerlite/README.md +2 -2
  131. package/connectors/mailerlite/package.json +1 -1
  132. package/connectors/mailersend/README.md +2 -2
  133. package/connectors/mailersend/package.json +1 -1
  134. package/connectors/mailify/README.md +2 -2
  135. package/connectors/mailify/package.json +1 -1
  136. package/connectors/mailjet/README.md +2 -2
  137. package/connectors/mailjet/package.json +1 -1
  138. package/connectors/mailmodo/README.md +2 -2
  139. package/connectors/mailmodo/package.json +1 -1
  140. package/connectors/malcore/README.md +2 -2
  141. package/connectors/malcore/package.json +1 -1
  142. package/connectors/mandrill/README.md +2 -2
  143. package/connectors/mandrill/package.json +1 -1
  144. package/connectors/marcomrobot/README.md +2 -2
  145. package/connectors/marcomrobot/package.json +1 -1
  146. package/connectors/marketingmasterio/README.md +2 -2
  147. package/connectors/marketingmasterio/package.json +1 -1
  148. package/connectors/marketplacer/README.md +2 -2
  149. package/connectors/marketplacer/package.json +1 -1
  150. package/connectors/marketstack/README.md +2 -2
  151. package/connectors/marketstack/package.json +1 -1
  152. package/connectors/matrix/README.md +1 -1
  153. package/connectors/matrix/package.json +1 -1
  154. package/connectors/mattermost/README.md +1 -1
  155. package/connectors/mattermost/package.json +1 -1
  156. package/connectors/mautic/README.md +1 -1
  157. package/connectors/mautic/package.json +1 -1
  158. package/connectors/mav/README.md +1 -1
  159. package/connectors/mav/package.json +1 -1
  160. package/connectors/maverick/README.md +1 -1
  161. package/connectors/maverick/package.json +1 -1
  162. package/connectors/mem/README.md +1 -1
  163. package/connectors/mem/package.json +1 -1
  164. package/connectors/messagebird/package.json +1 -1
  165. package/connectors/metabase/README.md +1 -1
  166. package/connectors/metabase/package.json +1 -1
  167. package/connectors/miro/package.json +1 -1
  168. package/connectors/mocean/package.json +1 -1
  169. package/connectors/modal/package.json +1 -1
  170. package/connectors/monday/package.json +1 -1
  171. package/connectors/monicacrm/package.json +1 -1
  172. package/connectors/moonclerk/package.json +1 -1
  173. package/connectors/moonmail/package.json +1 -1
  174. package/connectors/morph/package.json +1 -1
  175. package/connectors/mqtt/package.json +1 -1
  176. package/connectors/msg91/package.json +1 -1
  177. package/connectors/mubert/package.json +1 -1
  178. package/connectors/murf/package.json +1 -1
  179. package/connectors/mux/package.json +1 -1
  180. package/connectors/netlify/package.json +1 -1
  181. package/connectors/okta/package.json +1 -1
  182. package/connectors/paddle/package.json +1 -1
  183. package/connectors/perplexity/package.json +1 -1
  184. package/connectors/pinterest/package.json +1 -1
  185. package/connectors/pipedrive/package.json +1 -1
  186. package/connectors/plaid/package.json +1 -1
  187. package/connectors/quickchart/README.md +2 -2
  188. package/connectors/quintadb/README.md +2 -2
  189. package/connectors/rabbitmq/README.md +2 -2
  190. package/connectors/radar/README.md +2 -2
  191. package/connectors/raindrop/README.md +2 -2
  192. package/connectors/rapid7insightvm/README.md +2 -2
  193. package/connectors/raventools/README.md +2 -2
  194. package/connectors/rawgvideogamesdatabase/README.md +2 -2
  195. package/connectors/rdstationcrm/README.md +2 -2
  196. package/connectors/readai/README.md +2 -2
  197. package/connectors/roboflow/package.json +1 -1
  198. package/connectors/runway/package.json +1 -1
  199. package/connectors/sendgrid/package.json +1 -1
  200. package/connectors/shuffler/package.json +1 -1
  201. package/connectors/sierrainteractive/package.json +1 -1
  202. package/connectors/sifter/package.json +1 -1
  203. package/connectors/signaturit/package.json +1 -1
  204. package/connectors/signl4/package.json +1 -1
  205. package/connectors/simpleem/package.json +1 -1
  206. package/connectors/simplehash/package.json +1 -1
  207. package/connectors/simplekpi/package.json +1 -1
  208. package/connectors/simplelocalize/package.json +1 -1
  209. package/connectors/simplero/package.json +1 -1
  210. package/connectors/smartrecruiters/package.json +1 -1
  211. package/connectors/smtp2go/package.json +1 -1
  212. package/connectors/snowflake/package.json +1 -1
  213. package/connectors/sparkpost/package.json +1 -1
  214. package/connectors/split-in-batches/CLAUDE.md +1 -1
  215. package/connectors/split-in-batches/README.md +1 -1
  216. package/connectors/split-in-batches/src/api/client.test.ts +16 -17
  217. package/connectors/split-in-batches/src/api/client.ts +4 -3
  218. package/connectors/split-in-batches/src/cli/index.ts +1 -1
  219. package/connectors/split-io/package.json +1 -1
  220. package/connectors/split-io/src/api/client.test.ts +20 -0
  221. package/connectors/split-io/src/cli/index.ts +9 -9
  222. package/connectors/spreadsheet-file/.env.example +1 -1
  223. package/connectors/spreadsheet-file/CLAUDE.md +2 -2
  224. package/connectors/spreadsheet-file/README.md +3 -3
  225. package/connectors/spreadsheet-file/src/api/client.test.ts +8 -9
  226. package/connectors/spreadsheet-file/src/api/client.ts +4 -3
  227. package/connectors/spreadsheet-file/src/cli/index.ts +1 -1
  228. package/connectors/sprinklr/package.json +1 -1
  229. package/connectors/sprout-social/package.json +1 -1
  230. package/connectors/square/package.json +1 -1
  231. package/connectors/sse-trigger/.env.example +1 -1
  232. package/connectors/sse-trigger/CLAUDE.md +2 -2
  233. package/connectors/sse-trigger/README.md +1 -1
  234. package/connectors/sse-trigger/package.json +1 -1
  235. package/connectors/sse-trigger/src/api/client.test.ts +12 -8
  236. package/connectors/sse-trigger/src/api/client.ts +4 -3
  237. package/connectors/sse-trigger/src/api/index.ts +1 -1
  238. package/connectors/sse-trigger/src/cli/index.ts +1 -1
  239. package/connectors/sse-trigger/src/index.ts +1 -1
  240. package/connectors/stability-api-platform/AGENTS.md +2 -2
  241. package/connectors/stability-api-platform/CLAUDE.md +1 -1
  242. package/connectors/stability-api-platform/README.md +2 -2
  243. package/connectors/stability-api-platform/src/api/client.test.ts +17 -12
  244. package/connectors/stability-api-platform/src/api/client.ts +4 -3
  245. package/connectors/stability-api-platform/src/api/index.ts +0 -1
  246. package/connectors/stability-api-platform/src/cli/index.ts +1 -1
  247. package/connectors/stability-api-platform/src/index.ts +0 -1
  248. package/connectors/standout/package.json +1 -1
  249. package/connectors/statuspage/package.json +1 -1
  250. package/connectors/stop-and-error/.env.example +1 -1
  251. package/connectors/stop-and-error/CLAUDE.md +1 -1
  252. package/connectors/stop-and-error/README.md +1 -1
  253. package/connectors/stop-and-error/src/api/client.test.ts +12 -8
  254. package/connectors/stop-and-error/src/api/client.ts +4 -3
  255. package/connectors/stop-and-error/src/cli/index.ts +2 -2
  256. package/connectors/stoplight/package.json +1 -1
  257. package/connectors/stoplight-api-platform/package.json +1 -1
  258. package/connectors/strand-ai/CLAUDE.md +1 -1
  259. package/connectors/stripe-financial-connections/.env.example +1 -1
  260. package/connectors/stripe-financial-connections/CLAUDE.md +2 -2
  261. package/connectors/stripe-financial-connections/package.json +1 -1
  262. package/connectors/stripe-financial-connections/src/api/client.test.ts +34 -0
  263. package/connectors/stripe-financial-connections/src/api/client.ts +4 -3
  264. package/connectors/stripe-financial-connections/src/cli/index.ts +1 -1
  265. package/connectors/stripe-terminal/package.json +1 -1
  266. package/connectors/stytch/package.json +1 -1
  267. package/connectors/sucuri-api-platform/.env.example +1 -1
  268. package/connectors/sucuri-api-platform/CLAUDE.md +1 -1
  269. package/connectors/sucuri-api-platform/README.md +2 -2
  270. package/connectors/sucuri-api-platform/src/api/client.test.ts +9 -7
  271. package/connectors/sucuri-api-platform/src/api/client.ts +4 -3
  272. package/connectors/sucuri-api-platform/src/api/index.ts +1 -1
  273. package/connectors/sucuri-api-platform/src/cli/index.ts +1 -1
  274. package/connectors/sucuri-api-platform/src/index.ts +1 -1
  275. package/connectors/sumo-logic/package.json +1 -1
  276. package/connectors/supabase/package.json +1 -1
  277. package/connectors/supabase-api-platform/package.json +1 -1
  278. package/connectors/sysdig/package.json +1 -1
  279. package/connectors/tableau/package.json +1 -1
  280. package/connectors/takecareos/README.md +2 -2
  281. package/connectors/takecareos/package.json +1 -1
  282. package/connectors/telegram/src/api/bot.ts +20 -0
  283. package/connectors/telegram/src/api/client.ts +32 -0
  284. package/connectors/telegram/src/api/files.test.ts +103 -0
  285. package/connectors/telegram/src/api/index.ts +1 -0
  286. package/connectors/telegram/src/api/messages.test.ts +8 -2
  287. package/connectors/telegram/src/cli/files.test.ts +40 -0
  288. package/connectors/telegram/src/cli/files.ts +38 -0
  289. package/connectors/telegram/src/cli/index.ts +27 -30
  290. package/connectors/telegram/src/cli/updates.test.ts +176 -0
  291. package/connectors/telegram/src/cli/updates.ts +95 -0
  292. package/connectors/telegram/src/index.ts +1 -0
  293. package/connectors/telegram/src/types/index.ts +13 -0
  294. package/connectors/terraform-cloud/package.json +1 -1
  295. package/connectors/tettra-api-platform/CLAUDE.md +1 -1
  296. package/connectors/tettra-api-platform/README.md +2 -2
  297. package/connectors/tettra-api-platform/src/api/client.test.ts +7 -8
  298. package/connectors/tettra-api-platform/src/api/client.ts +4 -3
  299. package/connectors/tettra-api-platform/src/api/index.ts +1 -1
  300. package/connectors/tettra-api-platform/src/cli/index.ts +1 -1
  301. package/connectors/tettra-api-platform/src/index.ts +1 -1
  302. package/connectors/textit/package.json +1 -1
  303. package/connectors/thousandeyes/package.json +1 -1
  304. package/connectors/ticket-tailor/package.json +1 -1
  305. package/connectors/ticketsource/package.json +1 -1
  306. package/connectors/tiktokads/README.md +1 -1
  307. package/connectors/time-saved/package.json +1 -1
  308. package/connectors/tipalti/package.json +1 -1
  309. package/connectors/together-api-platform/.env.example +1 -1
  310. package/connectors/together-api-platform/CLAUDE.md +1 -1
  311. package/connectors/together-api-platform/README.md +1 -1
  312. package/connectors/together-api-platform/src/api/client.test.ts +11 -7
  313. package/connectors/together-api-platform/src/api/client.ts +4 -4
  314. package/connectors/together-api-platform/src/api/index.ts +1 -1
  315. package/connectors/together-api-platform/src/cli/index.ts +1 -1
  316. package/connectors/together-api-platform/src/index.ts +1 -1
  317. package/connectors/tomtom/AGENTS.md +1 -1
  318. package/connectors/totp/package.json +1 -1
  319. package/connectors/traverse/package.json +1 -1
  320. package/connectors/travo-ai/package.json +1 -1
  321. package/connectors/travo-real-estate/CLAUDE.md +1 -1
  322. package/connectors/travo-real-estate/README.md +1 -1
  323. package/connectors/travo-real-estate/src/api/client.test.ts +20 -16
  324. package/connectors/travo-real-estate/src/api/client.ts +4 -3
  325. package/connectors/travo-real-estate/src/utils/config.ts +2 -4
  326. package/connectors/tray-api-platform/CLAUDE.md +1 -1
  327. package/connectors/tray-api-platform/src/api/client.test.ts +17 -13
  328. package/connectors/tray-api-platform/src/api/client.ts +4 -3
  329. package/connectors/tray-api-platform/src/api/index.ts +1 -1
  330. package/connectors/tray-api-platform/src/cli/index.ts +1 -1
  331. package/connectors/tray-api-platform/src/index.ts +0 -1
  332. package/connectors/trigger-dev/package.json +1 -1
  333. package/connectors/trigger-dev-api-platform/package.json +1 -1
  334. package/connectors/turbot-pipes/package.json +1 -1
  335. package/connectors/turso/package.json +1 -1
  336. package/connectors/turso-api-platform/CLAUDE.md +1 -1
  337. package/connectors/turso-api-platform/README.md +2 -2
  338. package/connectors/turso-api-platform/package.json +1 -1
  339. package/connectors/turso-api-platform/src/api/client.test.ts +17 -13
  340. package/connectors/turso-api-platform/src/api/client.ts +4 -3
  341. package/connectors/turso-api-platform/src/cli/index.ts +2 -2
  342. package/connectors/twilio-api-platform/CLAUDE.md +1 -1
  343. package/connectors/twilio-api-platform/src/api/client.test.ts +11 -11
  344. package/connectors/twilio-api-platform/src/api/client.ts +4 -3
  345. package/connectors/twilio-api-platform/src/api/index.ts +1 -1
  346. package/connectors/twilio-api-platform/src/cli/index.ts +1 -1
  347. package/connectors/twilio-api-platform/src/index.ts +1 -1
  348. package/connectors/tyk-api-platform/.env.example +1 -1
  349. package/connectors/tyk-api-platform/CLAUDE.md +2 -2
  350. package/connectors/tyk-api-platform/README.md +1 -1
  351. package/connectors/tyk-api-platform/package.json +1 -1
  352. package/connectors/tyk-api-platform/src/api/client.test.ts +14 -15
  353. package/connectors/tyk-api-platform/src/api/client.ts +4 -3
  354. package/connectors/tyk-api-platform/src/api/index.ts +1 -1
  355. package/connectors/tyk-api-platform/src/cli/index.ts +1 -1
  356. package/connectors/tyk-api-platform/src/index.ts +1 -1
  357. package/connectors/umami/package.json +1 -1
  358. package/connectors/unifold/package.json +1 -1
  359. package/connectors/unione/package.json +1 -1
  360. package/connectors/uniprot/README.md +1 -1
  361. package/connectors/uniswap-api/package.json +1 -1
  362. package/connectors/ups/package.json +1 -1
  363. package/connectors/usereframe/package.json +1 -1
  364. package/connectors/vanta/package.json +1 -1
  365. package/connectors/vector-legal/.env.example +1 -1
  366. package/connectors/vector-legal/AGENTS.md +1 -1
  367. package/connectors/vector-legal/CLAUDE.md +1 -1
  368. package/connectors/vector-legal/README.md +1 -1
  369. package/connectors/vector-legal/src/api/client.test.ts +9 -5
  370. package/connectors/vector-legal/src/api/client.ts +4 -3
  371. package/connectors/vector-legal/src/api/index.ts +1 -1
  372. package/connectors/vector-legal/src/cli/index.ts +2 -2
  373. package/connectors/vector-legal/src/index.ts +0 -1
  374. package/connectors/vector-legal-api/CLAUDE.md +1 -1
  375. package/connectors/vector-legal-api/README.md +2 -2
  376. package/connectors/vector-legal-api/src/api/client.test.ts +12 -7
  377. package/connectors/vector-legal-api/src/api/client.ts +4 -3
  378. package/connectors/vector-legal-api/src/api/index.ts +1 -1
  379. package/connectors/vector-legal-api/src/cli/index.ts +1 -1
  380. package/connectors/vector-legal-api/src/index.ts +1 -2
  381. package/connectors/vela/package.json +1 -1
  382. package/connectors/velum-data-quality/.env.example +1 -1
  383. package/connectors/velum-data-quality/CLAUDE.md +1 -1
  384. package/connectors/velum-data-quality/src/api/client.test.ts +15 -16
  385. package/connectors/velum-data-quality/src/api/client.ts +4 -3
  386. package/connectors/velum-data-quality/src/api/index.ts +1 -1
  387. package/connectors/velum-data-quality/src/cli/index.ts +1 -1
  388. package/connectors/velum-data-quality/src/index.ts +0 -1
  389. package/connectors/velum-labs/package.json +1 -1
  390. package/connectors/vercel/package.json +1 -1
  391. package/connectors/vercel-api-platform/.env.example +1 -1
  392. package/connectors/vercel-api-platform/CLAUDE.md +2 -2
  393. package/connectors/vercel-api-platform/README.md +2 -2
  394. package/connectors/vercel-api-platform/src/api/client.test.ts +27 -6
  395. package/connectors/vercel-api-platform/src/api/client.ts +4 -3
  396. package/connectors/vercel-api-platform/src/api/index.ts +1 -1
  397. package/connectors/vercel-api-platform/src/cli/index.ts +2 -2
  398. package/connectors/vercel-api-platform/src/index.ts +0 -1
  399. package/connectors/vercel-blob/package.json +1 -1
  400. package/connectors/vercel-blob-platform/package.json +1 -1
  401. package/connectors/vercel-edge-config/package.json +1 -1
  402. package/connectors/vercel-edge-config-platform/package.json +1 -1
  403. package/connectors/veriphone/README.md +2 -2
  404. package/connectors/vertex-ai/package.json +1 -1
  405. package/connectors/vidyard/package.json +1 -1
  406. package/connectors/vonage/package.json +1 -1
  407. package/connectors/voygr/package.json +1 -1
  408. package/connectors/wait/package.json +1 -1
  409. package/connectors/walmart-marketplace/package.json +1 -1
  410. package/connectors/wato/package.json +1 -1
  411. package/connectors/wave-accounting/CLAUDE.md +1 -1
  412. package/connectors/wave-accounting/package.json +1 -1
  413. package/connectors/wave-accounting/src/utils/auth.ts +1 -1
  414. package/connectors/wayco/package.json +1 -1
  415. package/connectors/weaviate-api-platform/CLAUDE.md +1 -1
  416. package/connectors/weaviate-api-platform/src/api/client.test.ts +32 -7
  417. package/connectors/weaviate-api-platform/src/api/client.ts +4 -3
  418. package/connectors/weaviate-api-platform/src/api/index.ts +1 -1
  419. package/connectors/weaviate-api-platform/src/cli/index.ts +1 -1
  420. package/connectors/weaviate-api-platform/src/index.ts +1 -1
  421. package/connectors/webpagetest/package.json +1 -1
  422. package/connectors/weezevent/package.json +1 -1
  423. package/connectors/wikipedia/src/api/client.ts +1 -1
  424. package/connectors/wildcard/package.json +1 -1
  425. package/connectors/windmill/package.json +1 -1
  426. package/connectors/wise/package.json +1 -1
  427. package/connectors/withai/package.json +1 -1
  428. package/connectors/wiz/CLAUDE.md +1 -1
  429. package/connectors/wiz/package.json +1 -1
  430. package/connectors/wordfence/package.json +1 -1
  431. package/connectors/wordfence-api-platform/package.json +1 -1
  432. package/connectors/workflow-trigger/.env.example +1 -1
  433. package/connectors/workflow-trigger/CLAUDE.md +1 -1
  434. package/connectors/workflow-trigger/README.md +1 -1
  435. package/connectors/workflow-trigger/src/api/client.test.ts +10 -6
  436. package/connectors/workflow-trigger/src/api/client.ts +4 -3
  437. package/connectors/workflow-trigger/src/cli/index.ts +1 -1
  438. package/connectors/workos/package.json +1 -1
  439. package/connectors/write-binary-file/CLAUDE.md +1 -1
  440. package/connectors/write-binary-file/README.md +1 -1
  441. package/connectors/write-binary-file/package.json +1 -1
  442. package/connectors/write-binary-file/src/api/client.test.ts +16 -12
  443. package/connectors/write-binary-file/src/api/client.ts +4 -3
  444. package/connectors/write-binary-file/src/api/index.ts +1 -1
  445. package/connectors/write-binary-file/src/index.ts +1 -1
  446. package/connectors/wubookratechecker/src/api/client.test.ts +34 -0
  447. package/connectors/wubookratechecker/src/api/client.ts +3 -1
  448. package/connectors/wubookratechecker/src/api/index.ts +1 -1
  449. package/connectors/wubookratechecker/src/types/index.ts +1 -1
  450. package/connectors/xai/.env.example +1 -1
  451. package/connectors/xai-api-platform/.env.example +1 -1
  452. package/connectors/xai-api-platform/CLAUDE.md +1 -1
  453. package/connectors/xai-api-platform/README.md +1 -1
  454. package/connectors/xai-api-platform/src/api/client.test.ts +34 -9
  455. package/connectors/xai-api-platform/src/api/client.ts +4 -3
  456. package/connectors/xai-api-platform/src/api/index.ts +1 -1
  457. package/connectors/xai-api-platform/src/cli/index.ts +1 -1
  458. package/connectors/xai-api-platform/src/index.ts +1 -1
  459. package/connectors/xai-api-platform/src/utils/config.ts +3 -4
  460. package/connectors/xai-grok/.env.example +1 -1
  461. package/connectors/xai-grok/src/api/client.test.ts +3 -3
  462. package/connectors/xai-grok/src/cli/index.ts +1 -1
  463. package/connectors/xai-grok/src/utils/config.ts +1 -1
  464. package/connectors/ynab/package.json +1 -1
  465. package/connectors/you-com/README.md +2 -2
  466. package/connectors/you-com/package.json +1 -1
  467. package/connectors/yousign/package.json +1 -1
  468. package/connectors/zapier-api-platform/CLAUDE.md +1 -1
  469. package/connectors/zapier-api-platform/README.md +1 -1
  470. package/connectors/zapier-api-platform/src/api/client.test.ts +19 -14
  471. package/connectors/zapier-api-platform/src/api/client.ts +4 -3
  472. package/connectors/zapier-api-platform/src/api/index.ts +1 -1
  473. package/connectors/zapier-api-platform/src/cli/index.ts +1 -1
  474. package/connectors/zapier-api-platform/src/index.ts +1 -1
  475. package/connectors/zendesk/.env.example +4 -4
  476. package/connectors/zendesk/CLAUDE.md +1 -3
  477. package/connectors/zendesk/Makefile +18 -5
  478. package/connectors/zendesk/README.md +3 -8
  479. package/connectors/zendesk/SCAFFOLD.md +6 -5
  480. package/connectors/zerosettle/package.json +1 -1
  481. package/connectors/zoho-bigin/CLAUDE.md +1 -1
  482. package/connectors/zoho-campaigns/package.json +1 -1
  483. package/connectors/zoho-sign/package.json +1 -1
  484. package/connectors/zoho-subscriptions/CLAUDE.md +1 -1
  485. package/connectors/zohoprojects/CLAUDE.md +1 -1
  486. package/connectors/zolvo/package.json +1 -1
  487. package/connectors/zoom-api/package.json +1 -1
  488. package/connectors/zymbly/README.md +2 -2
  489. package/connectors/zymbly/package.json +1 -1
  490. package/dashboard/dist/assets/index-8uoGZF7B.js +280 -0
  491. package/dashboard/dist/index.html +1 -1
  492. package/dist/db/locks.d.ts +1 -1
  493. package/dist/index.js +17 -15
  494. package/dist/lib/connector-resolver.d.ts +1 -1
  495. package/dist/lib/llm.d.ts +1 -1
  496. package/dist/lib/open-browser.d.ts +18 -0
  497. package/dist/lib/open-browser.test.d.ts +1 -0
  498. package/package.json +6 -4
  499. package/dashboard/dist/assets/index-DlEljRrW.js +0 -285
package/bin/serve.js CHANGED
@@ -45,7 +45,6 @@ var __export = (target, all) => {
45
45
  });
46
46
  };
47
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
48
- var __require = import.meta.require;
49
48
 
50
49
  // src/db/sqlite-adapter.ts
51
50
  import { Database as BunDatabase } from "bun:sqlite";
@@ -797,7 +796,7 @@ var init_registry = __esm(() => {
797
796
  init_connector();
798
797
  });
799
798
 
800
- // node_modules/zod/v3/helpers/util.js
799
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
801
800
  var util, objectUtil, ZodParsedType, getParsedType = (data) => {
802
801
  const t = typeof data;
803
802
  switch (t) {
@@ -928,7 +927,7 @@ var init_util = __esm(() => {
928
927
  ]);
929
928
  });
930
929
 
931
- // node_modules/zod/v3/ZodError.js
930
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
932
931
  var ZodIssueCode, quotelessJson = (obj) => {
933
932
  const json = JSON.stringify(obj, null, 2);
934
933
  return json.replace(/"([^"]+)":/g, "$1:");
@@ -1049,7 +1048,7 @@ var init_ZodError = __esm(() => {
1049
1048
  };
1050
1049
  });
1051
1050
 
1052
- // node_modules/zod/v3/locales/en.js
1051
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
1053
1052
  var errorMap = (issue, _ctx) => {
1054
1053
  let message;
1055
1054
  switch (issue.code) {
@@ -1156,7 +1155,7 @@ var init_en = __esm(() => {
1156
1155
  en_default = errorMap;
1157
1156
  });
1158
1157
 
1159
- // node_modules/zod/v3/errors.js
1158
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
1160
1159
  function setErrorMap(map) {
1161
1160
  overrideErrorMap = map;
1162
1161
  }
@@ -1169,7 +1168,7 @@ var init_errors2 = __esm(() => {
1169
1168
  overrideErrorMap = en_default;
1170
1169
  });
1171
1170
 
1172
- // node_modules/zod/v3/helpers/parseUtil.js
1171
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
1173
1172
  function addIssueToContext(ctx, issueData) {
1174
1173
  const overrideMap = getErrorMap();
1175
1174
  const issue = makeIssue({
@@ -1274,10 +1273,10 @@ var init_parseUtil = __esm(() => {
1274
1273
  });
1275
1274
  });
1276
1275
 
1277
- // node_modules/zod/v3/helpers/typeAliases.js
1276
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js
1278
1277
  var init_typeAliases = () => {};
1279
1278
 
1280
- // node_modules/zod/v3/helpers/errorUtil.js
1279
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
1281
1280
  var errorUtil;
1282
1281
  var init_errorUtil = __esm(() => {
1283
1282
  (function(errorUtil2) {
@@ -1286,7 +1285,7 @@ var init_errorUtil = __esm(() => {
1286
1285
  })(errorUtil || (errorUtil = {}));
1287
1286
  });
1288
1287
 
1289
- // node_modules/zod/v3/types.js
1288
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
1290
1289
  class ParseInputLazyPath {
1291
1290
  constructor(parent, value, path, key) {
1292
1291
  this._cachedPath = [];
@@ -4637,7 +4636,7 @@ var init_types = __esm(() => {
4637
4636
  NEVER = INVALID;
4638
4637
  });
4639
4638
 
4640
- // node_modules/zod/v3/external.js
4639
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
4641
4640
  var exports_external = {};
4642
4641
  __export(exports_external, {
4643
4642
  void: () => voidType,
@@ -4757,7 +4756,7 @@ var init_external = __esm(() => {
4757
4756
  init_ZodError();
4758
4757
  });
4759
4758
 
4760
- // node_modules/zod/index.js
4759
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/index.js
4761
4760
  var init_zod = __esm(() => {
4762
4761
  init_external();
4763
4762
  init_external();
@@ -6434,7 +6433,7 @@ var package_default;
6434
6433
  var init_package = __esm(() => {
6435
6434
  package_default = {
6436
6435
  name: "@hasna/connectors",
6437
- version: "1.4.1",
6436
+ version: "1.4.3",
6438
6437
  description: "Open source connector library - Install API connectors with a single command",
6439
6438
  type: "module",
6440
6439
  bin: {
@@ -6476,10 +6475,11 @@ var init_package = __esm(() => {
6476
6475
  dev: "bun run ./src/cli/index.tsx",
6477
6476
  "check:package-secrets": "bun run scripts/check-package-secrets.ts",
6478
6477
  typecheck: "tsc --noEmit && tsc -p tsconfig.social.json --noEmit",
6479
- test: "bun test",
6478
+ test: "bun run build && bun test",
6480
6479
  "secrets:scan:npmrc": "bun run scripts/scan-npmrc-auth.mjs",
6481
6480
  "sdk:build": "cd sdk && bun run build",
6482
- prepublishOnly: "bun run secrets:scan:npmrc && bun run check:package-secrets && bun run build && bun test"
6481
+ prepublishOnly: "bun run secrets:scan:npmrc && bun run build && bun run check:package-secrets && bun test",
6482
+ prepack: "bun run build && bun run check:package-secrets"
6483
6483
  },
6484
6484
  keywords: [
6485
6485
  "connectors",
@@ -6500,7 +6500,8 @@ var init_package = __esm(() => {
6500
6500
  "@types/bun": "latest",
6501
6501
  "@types/react": "^18.2.0",
6502
6502
  "ink-testing-library": "^4.0.0",
6503
- typescript: "^5"
6503
+ typescript: "^5",
6504
+ "bun-types": "1.3.14"
6504
6505
  },
6505
6506
  dependencies: {
6506
6507
  "@hasna/events": "0.1.8",
@@ -7414,7 +7415,7 @@ var CONNECTOR_NAME = "imessage", COMMAND_SPECS, ROOT_HELP2, COMMAND_HELP2, COMMA
7414
7415
 
7415
7416
  ## Project Overview
7416
7417
 
7417
- connect-imessage is the bridge-first iMessage connector for the one-product open-connectors runtime. It intentionally targets a normalized HTTP bridge contract instead of native macOS automation so the same connector definition can run locally today and back future hosted channel adapters without rewriting the API surface.
7418
+ connect-imessage is the bridge-first iMessage connector for the one-product connectors runtime. It intentionally targets a normalized HTTP bridge contract instead of native macOS automation so the same connector definition can run locally today and back future hosted channel adapters without rewriting the API surface.
7418
7419
 
7419
7420
  The connector exposes profile/config management plus normalized health, conversation, and message operations. Inbound message consumption and outbound send/reply are all routed through the same internal connector definition and command runtime.
7420
7421
 
@@ -9199,7 +9200,9 @@ function guessKeyField(name) {
9199
9200
  const keyVar = docs.envVars.find((v) => v.variable.includes("API_KEY") || v.variable.includes("API_SECRET") || v.variable.includes("TOKEN") || v.variable.includes("SECRET"));
9200
9201
  if (keyVar) {
9201
9202
  const parts = keyVar.variable.toLowerCase().split("_");
9202
- const withoutPrefix = parts.slice(1);
9203
+ const connectorParts = name.toLowerCase().split(/[-_]/);
9204
+ const prefixLength = connectorParts.every((part, index) => parts[index] === part) ? connectorParts.length : 1;
9205
+ const withoutPrefix = parts.slice(prefixLength);
9203
9206
  if (withoutPrefix.length > 0) {
9204
9207
  return withoutPrefix.map((p, i) => i === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)).join("");
9205
9208
  }
@@ -9850,7 +9853,113 @@ var init_runner = __esm(() => {
9850
9853
  };
9851
9854
  });
9852
9855
 
9853
- // node_modules/ajv/dist/compile/codegen/code.js
9856
+ // ../../node_modules/.bun/content-type@1.0.5/node_modules/content-type/index.js
9857
+ var require_content_type = __commonJS((exports) => {
9858
+ /*!
9859
+ * content-type
9860
+ * Copyright(c) 2015 Douglas Christopher Wilson
9861
+ * MIT Licensed
9862
+ */
9863
+ var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;
9864
+ var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/;
9865
+ var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9866
+ var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g;
9867
+ var QUOTE_REGEXP = /([\\"])/g;
9868
+ var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;
9869
+ exports.format = format;
9870
+ exports.parse = parse;
9871
+ function format(obj) {
9872
+ if (!obj || typeof obj !== "object") {
9873
+ throw new TypeError("argument obj is required");
9874
+ }
9875
+ var parameters = obj.parameters;
9876
+ var type = obj.type;
9877
+ if (!type || !TYPE_REGEXP.test(type)) {
9878
+ throw new TypeError("invalid type");
9879
+ }
9880
+ var string = type;
9881
+ if (parameters && typeof parameters === "object") {
9882
+ var param;
9883
+ var params = Object.keys(parameters).sort();
9884
+ for (var i = 0;i < params.length; i++) {
9885
+ param = params[i];
9886
+ if (!TOKEN_REGEXP.test(param)) {
9887
+ throw new TypeError("invalid parameter name");
9888
+ }
9889
+ string += "; " + param + "=" + qstring(parameters[param]);
9890
+ }
9891
+ }
9892
+ return string;
9893
+ }
9894
+ function parse(string) {
9895
+ if (!string) {
9896
+ throw new TypeError("argument string is required");
9897
+ }
9898
+ var header = typeof string === "object" ? getcontenttype(string) : string;
9899
+ if (typeof header !== "string") {
9900
+ throw new TypeError("argument string is required to be a string");
9901
+ }
9902
+ var index = header.indexOf(";");
9903
+ var type = index !== -1 ? header.slice(0, index).trim() : header.trim();
9904
+ if (!TYPE_REGEXP.test(type)) {
9905
+ throw new TypeError("invalid media type");
9906
+ }
9907
+ var obj = new ContentType(type.toLowerCase());
9908
+ if (index !== -1) {
9909
+ var key;
9910
+ var match;
9911
+ var value;
9912
+ PARAM_REGEXP.lastIndex = index;
9913
+ while (match = PARAM_REGEXP.exec(header)) {
9914
+ if (match.index !== index) {
9915
+ throw new TypeError("invalid parameter format");
9916
+ }
9917
+ index += match[0].length;
9918
+ key = match[1].toLowerCase();
9919
+ value = match[2];
9920
+ if (value.charCodeAt(0) === 34) {
9921
+ value = value.slice(1, -1);
9922
+ if (value.indexOf("\\") !== -1) {
9923
+ value = value.replace(QESC_REGEXP, "$1");
9924
+ }
9925
+ }
9926
+ obj.parameters[key] = value;
9927
+ }
9928
+ if (index !== header.length) {
9929
+ throw new TypeError("invalid parameter format");
9930
+ }
9931
+ }
9932
+ return obj;
9933
+ }
9934
+ function getcontenttype(obj) {
9935
+ var header;
9936
+ if (typeof obj.getHeader === "function") {
9937
+ header = obj.getHeader("content-type");
9938
+ } else if (typeof obj.headers === "object") {
9939
+ header = obj.headers && obj.headers["content-type"];
9940
+ }
9941
+ if (typeof header !== "string") {
9942
+ throw new TypeError("content-type header is missing from object");
9943
+ }
9944
+ return header;
9945
+ }
9946
+ function qstring(val) {
9947
+ var str = String(val);
9948
+ if (TOKEN_REGEXP.test(str)) {
9949
+ return str;
9950
+ }
9951
+ if (str.length > 0 && !TEXT_REGEXP.test(str)) {
9952
+ throw new TypeError("invalid parameter value");
9953
+ }
9954
+ return '"' + str.replace(QUOTE_REGEXP, "\\$1") + '"';
9955
+ }
9956
+ function ContentType(type) {
9957
+ this.parameters = Object.create(null);
9958
+ this.type = type;
9959
+ }
9960
+ });
9961
+
9962
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
9854
9963
  var require_code = __commonJS((exports) => {
9855
9964
  Object.defineProperty(exports, "__esModule", { value: true });
9856
9965
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
@@ -10004,7 +10113,7 @@ var require_code = __commonJS((exports) => {
10004
10113
  exports.regexpCode = regexpCode;
10005
10114
  });
10006
10115
 
10007
- // node_modules/ajv/dist/compile/codegen/scope.js
10116
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
10008
10117
  var require_scope = __commonJS((exports) => {
10009
10118
  Object.defineProperty(exports, "__esModule", { value: true });
10010
10119
  exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = undefined;
@@ -10150,7 +10259,7 @@ var require_scope = __commonJS((exports) => {
10150
10259
  exports.ValueScope = ValueScope;
10151
10260
  });
10152
10261
 
10153
- // node_modules/ajv/dist/compile/codegen/index.js
10262
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
10154
10263
  var require_codegen = __commonJS((exports) => {
10155
10264
  Object.defineProperty(exports, "__esModule", { value: true });
10156
10265
  exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = undefined;
@@ -10860,7 +10969,7 @@ var require_codegen = __commonJS((exports) => {
10860
10969
  }
10861
10970
  });
10862
10971
 
10863
- // node_modules/ajv/dist/compile/util.js
10972
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
10864
10973
  var require_util = __commonJS((exports) => {
10865
10974
  Object.defineProperty(exports, "__esModule", { value: true });
10866
10975
  exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = undefined;
@@ -11024,7 +11133,7 @@ var require_util = __commonJS((exports) => {
11024
11133
  exports.checkStrictMode = checkStrictMode;
11025
11134
  });
11026
11135
 
11027
- // node_modules/ajv/dist/compile/names.js
11136
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
11028
11137
  var require_names = __commonJS((exports) => {
11029
11138
  Object.defineProperty(exports, "__esModule", { value: true });
11030
11139
  var codegen_1 = require_codegen();
@@ -11049,7 +11158,7 @@ var require_names = __commonJS((exports) => {
11049
11158
  exports.default = names;
11050
11159
  });
11051
11160
 
11052
- // node_modules/ajv/dist/compile/errors.js
11161
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
11053
11162
  var require_errors = __commonJS((exports) => {
11054
11163
  Object.defineProperty(exports, "__esModule", { value: true });
11055
11164
  exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = undefined;
@@ -11167,7 +11276,7 @@ var require_errors = __commonJS((exports) => {
11167
11276
  }
11168
11277
  });
11169
11278
 
11170
- // node_modules/ajv/dist/compile/validate/boolSchema.js
11279
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
11171
11280
  var require_boolSchema = __commonJS((exports) => {
11172
11281
  Object.defineProperty(exports, "__esModule", { value: true });
11173
11282
  exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = undefined;
@@ -11215,7 +11324,7 @@ var require_boolSchema = __commonJS((exports) => {
11215
11324
  }
11216
11325
  });
11217
11326
 
11218
- // node_modules/ajv/dist/compile/rules.js
11327
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
11219
11328
  var require_rules = __commonJS((exports) => {
11220
11329
  Object.defineProperty(exports, "__esModule", { value: true });
11221
11330
  exports.getRules = exports.isJSONType = undefined;
@@ -11243,7 +11352,7 @@ var require_rules = __commonJS((exports) => {
11243
11352
  exports.getRules = getRules;
11244
11353
  });
11245
11354
 
11246
- // node_modules/ajv/dist/compile/validate/applicability.js
11355
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
11247
11356
  var require_applicability = __commonJS((exports) => {
11248
11357
  Object.defineProperty(exports, "__esModule", { value: true });
11249
11358
  exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = undefined;
@@ -11263,7 +11372,7 @@ var require_applicability = __commonJS((exports) => {
11263
11372
  exports.shouldUseRule = shouldUseRule;
11264
11373
  });
11265
11374
 
11266
- // node_modules/ajv/dist/compile/validate/dataType.js
11375
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
11267
11376
  var require_dataType = __commonJS((exports) => {
11268
11377
  Object.defineProperty(exports, "__esModule", { value: true });
11269
11378
  exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = undefined;
@@ -11444,7 +11553,7 @@ var require_dataType = __commonJS((exports) => {
11444
11553
  }
11445
11554
  });
11446
11555
 
11447
- // node_modules/ajv/dist/compile/validate/defaults.js
11556
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
11448
11557
  var require_defaults = __commonJS((exports) => {
11449
11558
  Object.defineProperty(exports, "__esModule", { value: true });
11450
11559
  exports.assignDefaults = undefined;
@@ -11478,7 +11587,7 @@ var require_defaults = __commonJS((exports) => {
11478
11587
  }
11479
11588
  });
11480
11589
 
11481
- // node_modules/ajv/dist/vocabularies/code.js
11590
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
11482
11591
  var require_code2 = __commonJS((exports) => {
11483
11592
  Object.defineProperty(exports, "__esModule", { value: true });
11484
11593
  exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = undefined;
@@ -11607,7 +11716,7 @@ var require_code2 = __commonJS((exports) => {
11607
11716
  exports.validateUnion = validateUnion;
11608
11717
  });
11609
11718
 
11610
- // node_modules/ajv/dist/compile/validate/keyword.js
11719
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
11611
11720
  var require_keyword = __commonJS((exports) => {
11612
11721
  Object.defineProperty(exports, "__esModule", { value: true });
11613
11722
  exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = undefined;
@@ -11722,7 +11831,7 @@ var require_keyword = __commonJS((exports) => {
11722
11831
  exports.validateKeywordUsage = validateKeywordUsage;
11723
11832
  });
11724
11833
 
11725
- // node_modules/ajv/dist/compile/validate/subschema.js
11834
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
11726
11835
  var require_subschema = __commonJS((exports) => {
11727
11836
  Object.defineProperty(exports, "__esModule", { value: true });
11728
11837
  exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = undefined;
@@ -11802,7 +11911,7 @@ var require_subschema = __commonJS((exports) => {
11802
11911
  exports.extendSubschemaMode = extendSubschemaMode;
11803
11912
  });
11804
11913
 
11805
- // node_modules/fast-deep-equal/index.js
11914
+ // ../../node_modules/.bun/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
11806
11915
  var require_fast_deep_equal = __commonJS((exports, module) => {
11807
11916
  module.exports = function equal(a, b) {
11808
11917
  if (a === b)
@@ -11844,7 +11953,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
11844
11953
  };
11845
11954
  });
11846
11955
 
11847
- // node_modules/json-schema-traverse/index.js
11956
+ // ../../node_modules/.bun/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js
11848
11957
  var require_json_schema_traverse = __commonJS((exports, module) => {
11849
11958
  var traverse = module.exports = function(schema, opts, cb) {
11850
11959
  if (typeof opts == "function") {
@@ -11927,7 +12036,7 @@ var require_json_schema_traverse = __commonJS((exports, module) => {
11927
12036
  }
11928
12037
  });
11929
12038
 
11930
- // node_modules/ajv/dist/compile/resolve.js
12039
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
11931
12040
  var require_resolve = __commonJS((exports) => {
11932
12041
  Object.defineProperty(exports, "__esModule", { value: true });
11933
12042
  exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
@@ -12080,7 +12189,7 @@ var require_resolve = __commonJS((exports) => {
12080
12189
  exports.getSchemaRefs = getSchemaRefs;
12081
12190
  });
12082
12191
 
12083
- // node_modules/ajv/dist/compile/validate/index.js
12192
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
12084
12193
  var require_validate = __commonJS((exports) => {
12085
12194
  Object.defineProperty(exports, "__esModule", { value: true });
12086
12195
  exports.getData = exports.KeywordCxt = exports.validateFunctionCode = undefined;
@@ -12585,7 +12694,7 @@ var require_validate = __commonJS((exports) => {
12585
12694
  exports.getData = getData;
12586
12695
  });
12587
12696
 
12588
- // node_modules/ajv/dist/runtime/validation_error.js
12697
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
12589
12698
  var require_validation_error = __commonJS((exports) => {
12590
12699
  Object.defineProperty(exports, "__esModule", { value: true });
12591
12700
 
@@ -12599,7 +12708,7 @@ var require_validation_error = __commonJS((exports) => {
12599
12708
  exports.default = ValidationError;
12600
12709
  });
12601
12710
 
12602
- // node_modules/ajv/dist/compile/ref_error.js
12711
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
12603
12712
  var require_ref_error = __commonJS((exports) => {
12604
12713
  Object.defineProperty(exports, "__esModule", { value: true });
12605
12714
  var resolve_1 = require_resolve();
@@ -12614,7 +12723,7 @@ var require_ref_error = __commonJS((exports) => {
12614
12723
  exports.default = MissingRefError;
12615
12724
  });
12616
12725
 
12617
- // node_modules/ajv/dist/compile/index.js
12726
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
12618
12727
  var require_compile = __commonJS((exports) => {
12619
12728
  Object.defineProperty(exports, "__esModule", { value: true });
12620
12729
  exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = undefined;
@@ -12835,7 +12944,7 @@ var require_compile = __commonJS((exports) => {
12835
12944
  }
12836
12945
  });
12837
12946
 
12838
- // node_modules/ajv/dist/refs/data.json
12947
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
12839
12948
  var require_data = __commonJS((exports, module) => {
12840
12949
  module.exports = {
12841
12950
  $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
@@ -12852,7 +12961,7 @@ var require_data = __commonJS((exports, module) => {
12852
12961
  };
12853
12962
  });
12854
12963
 
12855
- // node_modules/fast-uri/lib/utils.js
12964
+ // ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js
12856
12965
  var require_utils = __commonJS((exports, module) => {
12857
12966
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
12858
12967
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -13163,7 +13272,7 @@ var require_utils = __commonJS((exports, module) => {
13163
13272
  };
13164
13273
  });
13165
13274
 
13166
- // node_modules/fast-uri/lib/schemes.js
13275
+ // ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js
13167
13276
  var require_schemes = __commonJS((exports, module) => {
13168
13277
  var { isUUID } = require_utils();
13169
13278
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -13337,7 +13446,7 @@ var require_schemes = __commonJS((exports, module) => {
13337
13446
  };
13338
13447
  });
13339
13448
 
13340
- // node_modules/fast-uri/index.js
13449
+ // ../../node_modules/.bun/fast-uri@3.1.5/node_modules/fast-uri/index.js
13341
13450
  var require_fast_uri = __commonJS((exports, module) => {
13342
13451
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
13343
13452
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -13351,7 +13460,12 @@ var require_fast_uri = __commonJS((exports, module) => {
13351
13460
  }
13352
13461
  function resolve(baseURI, relativeURI, options) {
13353
13462
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
13354
- const resolved = resolveComponent(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true);
13463
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
13464
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
13465
+ if (baseMalformed || relativeMalformed) {
13466
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
13467
+ }
13468
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
13355
13469
  schemelessOptions.skipEscape = true;
13356
13470
  return serialize(resolved, schemelessOptions);
13357
13471
  }
@@ -13478,6 +13592,7 @@ var require_fast_uri = __commonJS((exports, module) => {
13478
13592
  }
13479
13593
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
13480
13594
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
13595
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
13481
13596
  function getParseError(parsed, matches) {
13482
13597
  if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
13483
13598
  return 'URI path must start with "/" when authority is present.';
@@ -13512,6 +13627,20 @@ var require_fast_uri = __commonJS((exports, module) => {
13512
13627
  parsed.error = "URI authority must not contain a literal backslash.";
13513
13628
  malformedAuthorityOrPort = true;
13514
13629
  }
13630
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
13631
+ if (introducerMatch !== null) {
13632
+ const region = introducerMatch[1];
13633
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
13634
+ if (normalizedRegion.length >= 2) {
13635
+ if (normalizedRegion.slice(0, 2) !== "//") {
13636
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
13637
+ malformedAuthorityOrPort = true;
13638
+ } else if (region.length !== normalizedRegion.length) {
13639
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
13640
+ malformedAuthorityOrPort = true;
13641
+ }
13642
+ }
13643
+ }
13515
13644
  const matches = uri.match(URI_PARSE);
13516
13645
  if (matches) {
13517
13646
  parsed.scheme = matches[1];
@@ -13625,7 +13754,7 @@ var require_fast_uri = __commonJS((exports, module) => {
13625
13754
  module.exports.fastUri = fastUri;
13626
13755
  });
13627
13756
 
13628
- // node_modules/ajv/dist/runtime/uri.js
13757
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
13629
13758
  var require_uri = __commonJS((exports) => {
13630
13759
  Object.defineProperty(exports, "__esModule", { value: true });
13631
13760
  var uri = require_fast_uri();
@@ -13633,7 +13762,7 @@ var require_uri = __commonJS((exports) => {
13633
13762
  exports.default = uri;
13634
13763
  });
13635
13764
 
13636
- // node_modules/ajv/dist/core.js
13765
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/core.js
13637
13766
  var require_core = __commonJS((exports) => {
13638
13767
  Object.defineProperty(exports, "__esModule", { value: true });
13639
13768
  exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = undefined;
@@ -14226,7 +14355,7 @@ var require_core = __commonJS((exports) => {
14226
14355
  }
14227
14356
  });
14228
14357
 
14229
- // node_modules/ajv/dist/vocabularies/core/id.js
14358
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
14230
14359
  var require_id = __commonJS((exports) => {
14231
14360
  Object.defineProperty(exports, "__esModule", { value: true });
14232
14361
  var def = {
@@ -14238,7 +14367,7 @@ var require_id = __commonJS((exports) => {
14238
14367
  exports.default = def;
14239
14368
  });
14240
14369
 
14241
- // node_modules/ajv/dist/vocabularies/core/ref.js
14370
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
14242
14371
  var require_ref = __commonJS((exports) => {
14243
14372
  Object.defineProperty(exports, "__esModule", { value: true });
14244
14373
  exports.callRef = exports.getValidate = undefined;
@@ -14357,7 +14486,7 @@ var require_ref = __commonJS((exports) => {
14357
14486
  exports.default = def;
14358
14487
  });
14359
14488
 
14360
- // node_modules/ajv/dist/vocabularies/core/index.js
14489
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
14361
14490
  var require_core2 = __commonJS((exports) => {
14362
14491
  Object.defineProperty(exports, "__esModule", { value: true });
14363
14492
  var id_1 = require_id();
@@ -14375,7 +14504,7 @@ var require_core2 = __commonJS((exports) => {
14375
14504
  exports.default = core2;
14376
14505
  });
14377
14506
 
14378
- // node_modules/ajv/dist/vocabularies/validation/limitNumber.js
14507
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
14379
14508
  var require_limitNumber = __commonJS((exports) => {
14380
14509
  Object.defineProperty(exports, "__esModule", { value: true });
14381
14510
  var codegen_1 = require_codegen();
@@ -14404,7 +14533,7 @@ var require_limitNumber = __commonJS((exports) => {
14404
14533
  exports.default = def;
14405
14534
  });
14406
14535
 
14407
- // node_modules/ajv/dist/vocabularies/validation/multipleOf.js
14536
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
14408
14537
  var require_multipleOf = __commonJS((exports) => {
14409
14538
  Object.defineProperty(exports, "__esModule", { value: true });
14410
14539
  var codegen_1 = require_codegen();
@@ -14429,7 +14558,7 @@ var require_multipleOf = __commonJS((exports) => {
14429
14558
  exports.default = def;
14430
14559
  });
14431
14560
 
14432
- // node_modules/ajv/dist/runtime/ucs2length.js
14561
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
14433
14562
  var require_ucs2length = __commonJS((exports) => {
14434
14563
  Object.defineProperty(exports, "__esModule", { value: true });
14435
14564
  function ucs2length(str) {
@@ -14452,7 +14581,7 @@ var require_ucs2length = __commonJS((exports) => {
14452
14581
  ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
14453
14582
  });
14454
14583
 
14455
- // node_modules/ajv/dist/vocabularies/validation/limitLength.js
14584
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
14456
14585
  var require_limitLength = __commonJS((exports) => {
14457
14586
  Object.defineProperty(exports, "__esModule", { value: true });
14458
14587
  var codegen_1 = require_codegen();
@@ -14481,7 +14610,7 @@ var require_limitLength = __commonJS((exports) => {
14481
14610
  exports.default = def;
14482
14611
  });
14483
14612
 
14484
- // node_modules/ajv/dist/vocabularies/validation/pattern.js
14613
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
14485
14614
  var require_pattern = __commonJS((exports) => {
14486
14615
  Object.defineProperty(exports, "__esModule", { value: true });
14487
14616
  var code_1 = require_code2();
@@ -14515,7 +14644,7 @@ var require_pattern = __commonJS((exports) => {
14515
14644
  exports.default = def;
14516
14645
  });
14517
14646
 
14518
- // node_modules/ajv/dist/vocabularies/validation/limitProperties.js
14647
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
14519
14648
  var require_limitProperties = __commonJS((exports) => {
14520
14649
  Object.defineProperty(exports, "__esModule", { value: true });
14521
14650
  var codegen_1 = require_codegen();
@@ -14541,7 +14670,7 @@ var require_limitProperties = __commonJS((exports) => {
14541
14670
  exports.default = def;
14542
14671
  });
14543
14672
 
14544
- // node_modules/ajv/dist/vocabularies/validation/required.js
14673
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
14545
14674
  var require_required = __commonJS((exports) => {
14546
14675
  Object.defineProperty(exports, "__esModule", { value: true });
14547
14676
  var code_1 = require_code2();
@@ -14620,7 +14749,7 @@ var require_required = __commonJS((exports) => {
14620
14749
  exports.default = def;
14621
14750
  });
14622
14751
 
14623
- // node_modules/ajv/dist/vocabularies/validation/limitItems.js
14752
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
14624
14753
  var require_limitItems = __commonJS((exports) => {
14625
14754
  Object.defineProperty(exports, "__esModule", { value: true });
14626
14755
  var codegen_1 = require_codegen();
@@ -14646,7 +14775,7 @@ var require_limitItems = __commonJS((exports) => {
14646
14775
  exports.default = def;
14647
14776
  });
14648
14777
 
14649
- // node_modules/ajv/dist/runtime/equal.js
14778
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
14650
14779
  var require_equal = __commonJS((exports) => {
14651
14780
  Object.defineProperty(exports, "__esModule", { value: true });
14652
14781
  var equal = require_fast_deep_equal();
@@ -14654,7 +14783,7 @@ var require_equal = __commonJS((exports) => {
14654
14783
  exports.default = equal;
14655
14784
  });
14656
14785
 
14657
- // node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
14786
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
14658
14787
  var require_uniqueItems = __commonJS((exports) => {
14659
14788
  Object.defineProperty(exports, "__esModule", { value: true });
14660
14789
  var dataType_1 = require_dataType();
@@ -14718,7 +14847,7 @@ var require_uniqueItems = __commonJS((exports) => {
14718
14847
  exports.default = def;
14719
14848
  });
14720
14849
 
14721
- // node_modules/ajv/dist/vocabularies/validation/const.js
14850
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
14722
14851
  var require_const = __commonJS((exports) => {
14723
14852
  Object.defineProperty(exports, "__esModule", { value: true });
14724
14853
  var codegen_1 = require_codegen();
@@ -14744,7 +14873,7 @@ var require_const = __commonJS((exports) => {
14744
14873
  exports.default = def;
14745
14874
  });
14746
14875
 
14747
- // node_modules/ajv/dist/vocabularies/validation/enum.js
14876
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
14748
14877
  var require_enum = __commonJS((exports) => {
14749
14878
  Object.defineProperty(exports, "__esModule", { value: true });
14750
14879
  var codegen_1 = require_codegen();
@@ -14790,7 +14919,7 @@ var require_enum = __commonJS((exports) => {
14790
14919
  exports.default = def;
14791
14920
  });
14792
14921
 
14793
- // node_modules/ajv/dist/vocabularies/validation/index.js
14922
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
14794
14923
  var require_validation = __commonJS((exports) => {
14795
14924
  Object.defineProperty(exports, "__esModule", { value: true });
14796
14925
  var limitNumber_1 = require_limitNumber();
@@ -14820,7 +14949,7 @@ var require_validation = __commonJS((exports) => {
14820
14949
  exports.default = validation;
14821
14950
  });
14822
14951
 
14823
- // node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
14952
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
14824
14953
  var require_additionalItems = __commonJS((exports) => {
14825
14954
  Object.defineProperty(exports, "__esModule", { value: true });
14826
14955
  exports.validateAdditionalItems = undefined;
@@ -14870,7 +14999,7 @@ var require_additionalItems = __commonJS((exports) => {
14870
14999
  exports.default = def;
14871
15000
  });
14872
15001
 
14873
- // node_modules/ajv/dist/vocabularies/applicator/items.js
15002
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
14874
15003
  var require_items = __commonJS((exports) => {
14875
15004
  Object.defineProperty(exports, "__esModule", { value: true });
14876
15005
  exports.validateTuple = undefined;
@@ -14924,7 +15053,7 @@ var require_items = __commonJS((exports) => {
14924
15053
  exports.default = def;
14925
15054
  });
14926
15055
 
14927
- // node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
15056
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
14928
15057
  var require_prefixItems = __commonJS((exports) => {
14929
15058
  Object.defineProperty(exports, "__esModule", { value: true });
14930
15059
  var items_1 = require_items();
@@ -14938,7 +15067,7 @@ var require_prefixItems = __commonJS((exports) => {
14938
15067
  exports.default = def;
14939
15068
  });
14940
15069
 
14941
- // node_modules/ajv/dist/vocabularies/applicator/items2020.js
15070
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
14942
15071
  var require_items2020 = __commonJS((exports) => {
14943
15072
  Object.defineProperty(exports, "__esModule", { value: true });
14944
15073
  var codegen_1 = require_codegen();
@@ -14970,7 +15099,7 @@ var require_items2020 = __commonJS((exports) => {
14970
15099
  exports.default = def;
14971
15100
  });
14972
15101
 
14973
- // node_modules/ajv/dist/vocabularies/applicator/contains.js
15102
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
14974
15103
  var require_contains = __commonJS((exports) => {
14975
15104
  Object.defineProperty(exports, "__esModule", { value: true });
14976
15105
  var codegen_1 = require_codegen();
@@ -15061,7 +15190,7 @@ var require_contains = __commonJS((exports) => {
15061
15190
  exports.default = def;
15062
15191
  });
15063
15192
 
15064
- // node_modules/ajv/dist/vocabularies/applicator/dependencies.js
15193
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
15065
15194
  var require_dependencies = __commonJS((exports) => {
15066
15195
  Object.defineProperty(exports, "__esModule", { value: true });
15067
15196
  exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = undefined;
@@ -15146,7 +15275,7 @@ var require_dependencies = __commonJS((exports) => {
15146
15275
  exports.default = def;
15147
15276
  });
15148
15277
 
15149
- // node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
15278
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
15150
15279
  var require_propertyNames = __commonJS((exports) => {
15151
15280
  Object.defineProperty(exports, "__esModule", { value: true });
15152
15281
  var codegen_1 = require_codegen();
@@ -15186,7 +15315,7 @@ var require_propertyNames = __commonJS((exports) => {
15186
15315
  exports.default = def;
15187
15316
  });
15188
15317
 
15189
- // node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
15318
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
15190
15319
  var require_additionalProperties = __commonJS((exports) => {
15191
15320
  Object.defineProperty(exports, "__esModule", { value: true });
15192
15321
  var code_1 = require_code2();
@@ -15289,7 +15418,7 @@ var require_additionalProperties = __commonJS((exports) => {
15289
15418
  exports.default = def;
15290
15419
  });
15291
15420
 
15292
- // node_modules/ajv/dist/vocabularies/applicator/properties.js
15421
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
15293
15422
  var require_properties = __commonJS((exports) => {
15294
15423
  Object.defineProperty(exports, "__esModule", { value: true });
15295
15424
  var validate_1 = require_validate();
@@ -15344,7 +15473,7 @@ var require_properties = __commonJS((exports) => {
15344
15473
  exports.default = def;
15345
15474
  });
15346
15475
 
15347
- // node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
15476
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
15348
15477
  var require_patternProperties = __commonJS((exports) => {
15349
15478
  Object.defineProperty(exports, "__esModule", { value: true });
15350
15479
  var code_1 = require_code2();
@@ -15415,7 +15544,7 @@ var require_patternProperties = __commonJS((exports) => {
15415
15544
  exports.default = def;
15416
15545
  });
15417
15546
 
15418
- // node_modules/ajv/dist/vocabularies/applicator/not.js
15547
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
15419
15548
  var require_not = __commonJS((exports) => {
15420
15549
  Object.defineProperty(exports, "__esModule", { value: true });
15421
15550
  var util_1 = require_util();
@@ -15443,7 +15572,7 @@ var require_not = __commonJS((exports) => {
15443
15572
  exports.default = def;
15444
15573
  });
15445
15574
 
15446
- // node_modules/ajv/dist/vocabularies/applicator/anyOf.js
15575
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
15447
15576
  var require_anyOf = __commonJS((exports) => {
15448
15577
  Object.defineProperty(exports, "__esModule", { value: true });
15449
15578
  var code_1 = require_code2();
@@ -15457,7 +15586,7 @@ var require_anyOf = __commonJS((exports) => {
15457
15586
  exports.default = def;
15458
15587
  });
15459
15588
 
15460
- // node_modules/ajv/dist/vocabularies/applicator/oneOf.js
15589
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
15461
15590
  var require_oneOf = __commonJS((exports) => {
15462
15591
  Object.defineProperty(exports, "__esModule", { value: true });
15463
15592
  var codegen_1 = require_codegen();
@@ -15512,7 +15641,7 @@ var require_oneOf = __commonJS((exports) => {
15512
15641
  exports.default = def;
15513
15642
  });
15514
15643
 
15515
- // node_modules/ajv/dist/vocabularies/applicator/allOf.js
15644
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
15516
15645
  var require_allOf = __commonJS((exports) => {
15517
15646
  Object.defineProperty(exports, "__esModule", { value: true });
15518
15647
  var util_1 = require_util();
@@ -15536,7 +15665,7 @@ var require_allOf = __commonJS((exports) => {
15536
15665
  exports.default = def;
15537
15666
  });
15538
15667
 
15539
- // node_modules/ajv/dist/vocabularies/applicator/if.js
15668
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
15540
15669
  var require_if = __commonJS((exports) => {
15541
15670
  Object.defineProperty(exports, "__esModule", { value: true });
15542
15671
  var codegen_1 = require_codegen();
@@ -15602,7 +15731,7 @@ var require_if = __commonJS((exports) => {
15602
15731
  exports.default = def;
15603
15732
  });
15604
15733
 
15605
- // node_modules/ajv/dist/vocabularies/applicator/thenElse.js
15734
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
15606
15735
  var require_thenElse = __commonJS((exports) => {
15607
15736
  Object.defineProperty(exports, "__esModule", { value: true });
15608
15737
  var util_1 = require_util();
@@ -15617,7 +15746,7 @@ var require_thenElse = __commonJS((exports) => {
15617
15746
  exports.default = def;
15618
15747
  });
15619
15748
 
15620
- // node_modules/ajv/dist/vocabularies/applicator/index.js
15749
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
15621
15750
  var require_applicator = __commonJS((exports) => {
15622
15751
  Object.defineProperty(exports, "__esModule", { value: true });
15623
15752
  var additionalItems_1 = require_additionalItems();
@@ -15660,7 +15789,7 @@ var require_applicator = __commonJS((exports) => {
15660
15789
  exports.default = getApplicator;
15661
15790
  });
15662
15791
 
15663
- // node_modules/ajv/dist/vocabularies/format/format.js
15792
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
15664
15793
  var require_format = __commonJS((exports) => {
15665
15794
  Object.defineProperty(exports, "__esModule", { value: true });
15666
15795
  var codegen_1 = require_codegen();
@@ -15747,7 +15876,7 @@ var require_format = __commonJS((exports) => {
15747
15876
  exports.default = def;
15748
15877
  });
15749
15878
 
15750
- // node_modules/ajv/dist/vocabularies/format/index.js
15879
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
15751
15880
  var require_format2 = __commonJS((exports) => {
15752
15881
  Object.defineProperty(exports, "__esModule", { value: true });
15753
15882
  var format_1 = require_format();
@@ -15755,7 +15884,7 @@ var require_format2 = __commonJS((exports) => {
15755
15884
  exports.default = format;
15756
15885
  });
15757
15886
 
15758
- // node_modules/ajv/dist/vocabularies/metadata.js
15887
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
15759
15888
  var require_metadata = __commonJS((exports) => {
15760
15889
  Object.defineProperty(exports, "__esModule", { value: true });
15761
15890
  exports.contentVocabulary = exports.metadataVocabulary = undefined;
@@ -15775,7 +15904,7 @@ var require_metadata = __commonJS((exports) => {
15775
15904
  ];
15776
15905
  });
15777
15906
 
15778
- // node_modules/ajv/dist/vocabularies/draft7.js
15907
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
15779
15908
  var require_draft7 = __commonJS((exports) => {
15780
15909
  Object.defineProperty(exports, "__esModule", { value: true });
15781
15910
  var core_1 = require_core2();
@@ -15794,7 +15923,7 @@ var require_draft7 = __commonJS((exports) => {
15794
15923
  exports.default = draft7Vocabularies;
15795
15924
  });
15796
15925
 
15797
- // node_modules/ajv/dist/vocabularies/discriminator/types.js
15926
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
15798
15927
  var require_types = __commonJS((exports) => {
15799
15928
  Object.defineProperty(exports, "__esModule", { value: true });
15800
15929
  exports.DiscrError = undefined;
@@ -15805,7 +15934,7 @@ var require_types = __commonJS((exports) => {
15805
15934
  })(DiscrError || (exports.DiscrError = DiscrError = {}));
15806
15935
  });
15807
15936
 
15808
- // node_modules/ajv/dist/vocabularies/discriminator/index.js
15937
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
15809
15938
  var require_discriminator = __commonJS((exports) => {
15810
15939
  Object.defineProperty(exports, "__esModule", { value: true });
15811
15940
  var codegen_1 = require_codegen();
@@ -15907,7 +16036,7 @@ var require_discriminator = __commonJS((exports) => {
15907
16036
  exports.default = def;
15908
16037
  });
15909
16038
 
15910
- // node_modules/ajv/dist/refs/json-schema-draft-07.json
16039
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
15911
16040
  var require_json_schema_draft_07 = __commonJS((exports, module) => {
15912
16041
  module.exports = {
15913
16042
  $schema: "http://json-schema.org/draft-07/schema#",
@@ -16062,7 +16191,7 @@ var require_json_schema_draft_07 = __commonJS((exports, module) => {
16062
16191
  };
16063
16192
  });
16064
16193
 
16065
- // node_modules/ajv/dist/ajv.js
16194
+ // ../../node_modules/.bun/ajv@8.20.0/node_modules/ajv/dist/ajv.js
16066
16195
  var require_ajv = __commonJS((exports, module) => {
16067
16196
  Object.defineProperty(exports, "__esModule", { value: true });
16068
16197
  exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = undefined;
@@ -16130,7 +16259,7 @@ var require_ajv = __commonJS((exports, module) => {
16130
16259
  } });
16131
16260
  });
16132
16261
 
16133
- // node_modules/ajv-formats/dist/formats.js
16262
+ // ../../node_modules/.bun/ajv-formats@3.0.1/node_modules/ajv-formats/dist/formats.js
16134
16263
  var require_formats = __commonJS((exports) => {
16135
16264
  Object.defineProperty(exports, "__esModule", { value: true });
16136
16265
  exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
@@ -16307,7 +16436,7 @@ var require_formats = __commonJS((exports) => {
16307
16436
  }
16308
16437
  });
16309
16438
 
16310
- // node_modules/ajv-formats/dist/limit.js
16439
+ // ../../node_modules/.bun/ajv-formats@3.0.1/node_modules/ajv-formats/dist/limit.js
16311
16440
  var require_limit = __commonJS((exports) => {
16312
16441
  Object.defineProperty(exports, "__esModule", { value: true });
16313
16442
  exports.formatLimitDefinition = undefined;
@@ -16376,7 +16505,7 @@ var require_limit = __commonJS((exports) => {
16376
16505
  exports.default = formatLimitPlugin;
16377
16506
  });
16378
16507
 
16379
- // node_modules/ajv-formats/dist/index.js
16508
+ // ../../node_modules/.bun/ajv-formats@3.0.1/node_modules/ajv-formats/dist/index.js
16380
16509
  var require_dist = __commonJS((exports, module) => {
16381
16510
  Object.defineProperty(exports, "__esModule", { value: true });
16382
16511
  var formats_1 = require_formats();
@@ -16484,6 +16613,656 @@ var init_usage = __esm(() => {
16484
16613
  init_database();
16485
16614
  });
16486
16615
 
16616
+ // ../../node_modules/.bun/is-docker@3.0.0/node_modules/is-docker/index.js
16617
+ import fs from "fs";
16618
+ function hasDockerEnv() {
16619
+ try {
16620
+ fs.statSync("/.dockerenv");
16621
+ return true;
16622
+ } catch {
16623
+ return false;
16624
+ }
16625
+ }
16626
+ function hasDockerCGroup() {
16627
+ try {
16628
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
16629
+ } catch {
16630
+ return false;
16631
+ }
16632
+ }
16633
+ function isDocker() {
16634
+ if (isDockerCached === undefined) {
16635
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
16636
+ }
16637
+ return isDockerCached;
16638
+ }
16639
+ var isDockerCached;
16640
+ var init_is_docker = () => {};
16641
+
16642
+ // ../../node_modules/.bun/is-inside-container@1.0.0/node_modules/is-inside-container/index.js
16643
+ import fs2 from "fs";
16644
+ function isInsideContainer() {
16645
+ if (cachedResult === undefined) {
16646
+ cachedResult = hasContainerEnv() || isDocker();
16647
+ }
16648
+ return cachedResult;
16649
+ }
16650
+ var cachedResult, hasContainerEnv = () => {
16651
+ try {
16652
+ fs2.statSync("/run/.containerenv");
16653
+ return true;
16654
+ } catch {
16655
+ return false;
16656
+ }
16657
+ };
16658
+ var init_is_inside_container = __esm(() => {
16659
+ init_is_docker();
16660
+ });
16661
+
16662
+ // ../../node_modules/.bun/is-wsl@3.1.1/node_modules/is-wsl/index.js
16663
+ import process2 from "process";
16664
+ import os from "os";
16665
+ import fs3 from "fs";
16666
+ var isWsl = () => {
16667
+ if (process2.platform !== "linux") {
16668
+ return false;
16669
+ }
16670
+ if (os.release().toLowerCase().includes("microsoft")) {
16671
+ if (isInsideContainer()) {
16672
+ return false;
16673
+ }
16674
+ return true;
16675
+ }
16676
+ try {
16677
+ if (fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) {
16678
+ return !isInsideContainer();
16679
+ }
16680
+ } catch {}
16681
+ if (fs3.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs3.existsSync("/run/WSL")) {
16682
+ return !isInsideContainer();
16683
+ }
16684
+ return false;
16685
+ }, is_wsl_default;
16686
+ var init_is_wsl = __esm(() => {
16687
+ init_is_inside_container();
16688
+ is_wsl_default = process2.env.__IS_WSL_TEST__ ? isWsl : isWsl();
16689
+ });
16690
+
16691
+ // ../../node_modules/.bun/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
16692
+ import process3 from "process";
16693
+ import { Buffer as Buffer3 } from "buffer";
16694
+ import { promisify } from "util";
16695
+ import childProcess from "child_process";
16696
+ var execFile, powerShellPath = () => `${process3.env.SYSTEMROOT || process3.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`, executePowerShell = async (command, options = {}) => {
16697
+ const {
16698
+ powerShellPath: psPath,
16699
+ ...execFileOptions
16700
+ } = options;
16701
+ const encodedCommand = executePowerShell.encodeCommand(command);
16702
+ return execFile(psPath ?? powerShellPath(), [
16703
+ ...executePowerShell.argumentsPrefix,
16704
+ encodedCommand
16705
+ ], {
16706
+ encoding: "utf8",
16707
+ ...execFileOptions
16708
+ });
16709
+ };
16710
+ var init_powershell_utils = __esm(() => {
16711
+ execFile = promisify(childProcess.execFile);
16712
+ executePowerShell.argumentsPrefix = [
16713
+ "-NoProfile",
16714
+ "-NonInteractive",
16715
+ "-ExecutionPolicy",
16716
+ "Bypass",
16717
+ "-EncodedCommand"
16718
+ ];
16719
+ executePowerShell.encodeCommand = (command) => Buffer3.from(command, "utf16le").toString("base64");
16720
+ executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
16721
+ });
16722
+
16723
+ // ../../node_modules/.bun/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js
16724
+ function parseMountPointFromConfig(content) {
16725
+ for (const line of content.split(`
16726
+ `)) {
16727
+ if (/^\s*#/.test(line)) {
16728
+ continue;
16729
+ }
16730
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
16731
+ if (!match) {
16732
+ continue;
16733
+ }
16734
+ return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
16735
+ }
16736
+ }
16737
+
16738
+ // ../../node_modules/.bun/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
16739
+ import { promisify as promisify2 } from "util";
16740
+ import childProcess2 from "child_process";
16741
+ import fs4, { constants as fsConstants } from "fs/promises";
16742
+ var execFile2, wslDrivesMountPoint, powerShellPathFromWsl = async () => {
16743
+ const mountPoint = await wslDrivesMountPoint();
16744
+ return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
16745
+ }, powerShellPath2, canAccessPowerShellPromise, canAccessPowerShell = async () => {
16746
+ canAccessPowerShellPromise ??= (async () => {
16747
+ try {
16748
+ const psPath = await powerShellPath2();
16749
+ await fs4.access(psPath, fsConstants.X_OK);
16750
+ return true;
16751
+ } catch {
16752
+ return false;
16753
+ }
16754
+ })();
16755
+ return canAccessPowerShellPromise;
16756
+ }, wslDefaultBrowser = async () => {
16757
+ const psPath = await powerShellPath2();
16758
+ const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
16759
+ const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
16760
+ return stdout.trim();
16761
+ }, convertWslPathToWindows = async (path) => {
16762
+ if (/^[a-z]+:\/\//i.test(path)) {
16763
+ return path;
16764
+ }
16765
+ try {
16766
+ const { stdout } = await execFile2("wslpath", ["-aw", path], { encoding: "utf8" });
16767
+ return stdout.trim();
16768
+ } catch {
16769
+ return path;
16770
+ }
16771
+ };
16772
+ var init_wsl_utils = __esm(() => {
16773
+ init_is_wsl();
16774
+ init_powershell_utils();
16775
+ init_is_wsl();
16776
+ execFile2 = promisify2(childProcess2.execFile);
16777
+ wslDrivesMountPoint = (() => {
16778
+ const defaultMountPoint = "/mnt/";
16779
+ let mountPoint;
16780
+ return async function() {
16781
+ if (mountPoint) {
16782
+ return mountPoint;
16783
+ }
16784
+ const configFilePath = "/etc/wsl.conf";
16785
+ let isConfigFileExists = false;
16786
+ try {
16787
+ await fs4.access(configFilePath, fsConstants.F_OK);
16788
+ isConfigFileExists = true;
16789
+ } catch {}
16790
+ if (!isConfigFileExists) {
16791
+ return defaultMountPoint;
16792
+ }
16793
+ const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
16794
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
16795
+ if (parsedMountPoint === undefined) {
16796
+ return defaultMountPoint;
16797
+ }
16798
+ mountPoint = parsedMountPoint;
16799
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
16800
+ return mountPoint;
16801
+ };
16802
+ })();
16803
+ powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
16804
+ });
16805
+
16806
+ // ../../node_modules/.bun/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
16807
+ function defineLazyProperty(object4, propertyName, valueGetter) {
16808
+ const define = (value) => Object.defineProperty(object4, propertyName, { value, enumerable: true, writable: true });
16809
+ Object.defineProperty(object4, propertyName, {
16810
+ configurable: true,
16811
+ enumerable: true,
16812
+ get() {
16813
+ const result = valueGetter();
16814
+ define(result);
16815
+ return result;
16816
+ },
16817
+ set(value) {
16818
+ define(value);
16819
+ }
16820
+ });
16821
+ return object4;
16822
+ }
16823
+
16824
+ // ../../node_modules/.bun/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
16825
+ import { promisify as promisify3 } from "util";
16826
+ import process4 from "process";
16827
+ import { execFile as execFile3 } from "child_process";
16828
+ async function defaultBrowserId() {
16829
+ if (process4.platform !== "darwin") {
16830
+ throw new Error("macOS only");
16831
+ }
16832
+ const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
16833
+ const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
16834
+ const browserId = match?.groups.id ?? "com.apple.Safari";
16835
+ if (browserId === "com.apple.safari") {
16836
+ return "com.apple.Safari";
16837
+ }
16838
+ return browserId;
16839
+ }
16840
+ var execFileAsync;
16841
+ var init_default_browser_id = __esm(() => {
16842
+ execFileAsync = promisify3(execFile3);
16843
+ });
16844
+
16845
+ // ../../node_modules/.bun/run-applescript@7.1.0/node_modules/run-applescript/index.js
16846
+ import process5 from "process";
16847
+ import { promisify as promisify4 } from "util";
16848
+ import { execFile as execFile4, execFileSync } from "child_process";
16849
+ async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
16850
+ if (process5.platform !== "darwin") {
16851
+ throw new Error("macOS only");
16852
+ }
16853
+ const outputArguments = humanReadableOutput ? [] : ["-ss"];
16854
+ const execOptions = {};
16855
+ if (signal) {
16856
+ execOptions.signal = signal;
16857
+ }
16858
+ const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
16859
+ return stdout.trim();
16860
+ }
16861
+ var execFileAsync2;
16862
+ var init_run_applescript = __esm(() => {
16863
+ execFileAsync2 = promisify4(execFile4);
16864
+ });
16865
+
16866
+ // ../../node_modules/.bun/bundle-name@4.1.0/node_modules/bundle-name/index.js
16867
+ async function bundleName(bundleId) {
16868
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
16869
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
16870
+ }
16871
+ var init_bundle_name = __esm(() => {
16872
+ init_run_applescript();
16873
+ });
16874
+
16875
+ // ../../node_modules/.bun/default-browser@5.5.0/node_modules/default-browser/windows.js
16876
+ import { promisify as promisify5 } from "util";
16877
+ import { execFile as execFile5 } from "child_process";
16878
+ async function defaultBrowser(_execFileAsync = execFileAsync3) {
16879
+ const { stdout } = await _execFileAsync("reg", [
16880
+ "QUERY",
16881
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
16882
+ "/v",
16883
+ "ProgId"
16884
+ ]);
16885
+ const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
16886
+ if (!match) {
16887
+ throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
16888
+ }
16889
+ const { id } = match.groups;
16890
+ const dotIndex = id.lastIndexOf(".");
16891
+ const hyphenIndex = id.lastIndexOf("-");
16892
+ const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
16893
+ const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
16894
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
16895
+ }
16896
+ var execFileAsync3, windowsBrowserProgIds, _windowsBrowserProgIdMap, UnknownBrowserError;
16897
+ var init_windows = __esm(() => {
16898
+ execFileAsync3 = promisify5(execFile5);
16899
+ windowsBrowserProgIds = {
16900
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
16901
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
16902
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
16903
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
16904
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
16905
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
16906
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
16907
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
16908
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
16909
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
16910
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
16911
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
16912
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
16913
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
16914
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
16915
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
16916
+ };
16917
+ _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
16918
+ UnknownBrowserError = class UnknownBrowserError extends Error {
16919
+ };
16920
+ });
16921
+
16922
+ // ../../node_modules/.bun/default-browser@5.5.0/node_modules/default-browser/index.js
16923
+ import { promisify as promisify6 } from "util";
16924
+ import process6 from "process";
16925
+ import { execFile as execFile6 } from "child_process";
16926
+ async function defaultBrowser2() {
16927
+ if (process6.platform === "darwin") {
16928
+ const id = await defaultBrowserId();
16929
+ const name = await bundleName(id);
16930
+ return { name, id };
16931
+ }
16932
+ if (process6.platform === "linux") {
16933
+ const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
16934
+ const id = stdout.trim();
16935
+ const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
16936
+ return { name, id };
16937
+ }
16938
+ if (process6.platform === "win32") {
16939
+ return defaultBrowser();
16940
+ }
16941
+ throw new Error("Only macOS, Linux, and Windows are supported");
16942
+ }
16943
+ var execFileAsync4, titleize = (string4) => string4.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
16944
+ var init_default_browser = __esm(() => {
16945
+ init_default_browser_id();
16946
+ init_bundle_name();
16947
+ init_windows();
16948
+ init_windows();
16949
+ execFileAsync4 = promisify6(execFile6);
16950
+ });
16951
+
16952
+ // ../../node_modules/.bun/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
16953
+ import process7 from "process";
16954
+ var isInSsh, is_in_ssh_default;
16955
+ var init_is_in_ssh = __esm(() => {
16956
+ isInSsh = Boolean(process7.env.SSH_CONNECTION || process7.env.SSH_CLIENT || process7.env.SSH_TTY);
16957
+ is_in_ssh_default = isInSsh;
16958
+ });
16959
+
16960
+ // ../../node_modules/.bun/open@11.0.0/node_modules/open/index.js
16961
+ import process8 from "process";
16962
+ import path from "path";
16963
+ import { fileURLToPath as fileURLToPath6 } from "url";
16964
+ import childProcess3 from "child_process";
16965
+ import fs5, { constants as fsConstants2 } from "fs/promises";
16966
+ function detectArchBinary(binary) {
16967
+ if (typeof binary === "string" || Array.isArray(binary)) {
16968
+ return binary;
16969
+ }
16970
+ const { [arch]: archBinary } = binary;
16971
+ if (!archBinary) {
16972
+ throw new Error(`${arch} is not supported`);
16973
+ }
16974
+ return archBinary;
16975
+ }
16976
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
16977
+ if (wsl && is_wsl_default) {
16978
+ return detectArchBinary(wsl);
16979
+ }
16980
+ if (!platformBinary) {
16981
+ throw new Error(`${platform} is not supported`);
16982
+ }
16983
+ return detectArchBinary(platformBinary);
16984
+ }
16985
+ var fallbackAttemptSymbol, __dirname6, localXdgOpenPath, platform, arch, tryEachApp = async (apps, opener) => {
16986
+ if (apps.length === 0) {
16987
+ return;
16988
+ }
16989
+ const errors4 = [];
16990
+ for (const app of apps) {
16991
+ try {
16992
+ return await opener(app);
16993
+ } catch (error2) {
16994
+ errors4.push(error2);
16995
+ }
16996
+ }
16997
+ throw new AggregateError(errors4, "Failed to open in all supported apps");
16998
+ }, baseOpen = async (options) => {
16999
+ options = {
17000
+ wait: false,
17001
+ background: false,
17002
+ newInstance: false,
17003
+ allowNonzeroExitCode: false,
17004
+ ...options
17005
+ };
17006
+ const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
17007
+ delete options[fallbackAttemptSymbol];
17008
+ if (Array.isArray(options.app)) {
17009
+ return tryEachApp(options.app, (singleApp) => baseOpen({
17010
+ ...options,
17011
+ app: singleApp,
17012
+ [fallbackAttemptSymbol]: true
17013
+ }));
17014
+ }
17015
+ let { name: app, arguments: appArguments = [] } = options.app ?? {};
17016
+ appArguments = [...appArguments];
17017
+ if (Array.isArray(app)) {
17018
+ return tryEachApp(app, (appName) => baseOpen({
17019
+ ...options,
17020
+ app: {
17021
+ name: appName,
17022
+ arguments: appArguments
17023
+ },
17024
+ [fallbackAttemptSymbol]: true
17025
+ }));
17026
+ }
17027
+ if (app === "browser" || app === "browserPrivate") {
17028
+ const ids = {
17029
+ "com.google.chrome": "chrome",
17030
+ "google-chrome.desktop": "chrome",
17031
+ "com.brave.browser": "brave",
17032
+ "org.mozilla.firefox": "firefox",
17033
+ "firefox.desktop": "firefox",
17034
+ "com.microsoft.msedge": "edge",
17035
+ "com.microsoft.edge": "edge",
17036
+ "com.microsoft.edgemac": "edge",
17037
+ "microsoft-edge.desktop": "edge",
17038
+ "com.apple.safari": "safari"
17039
+ };
17040
+ const flags = {
17041
+ chrome: "--incognito",
17042
+ brave: "--incognito",
17043
+ firefox: "--private-window",
17044
+ edge: "--inPrivate"
17045
+ };
17046
+ let browser;
17047
+ if (is_wsl_default) {
17048
+ const progId = await wslDefaultBrowser();
17049
+ const browserInfo = _windowsBrowserProgIdMap.get(progId);
17050
+ browser = browserInfo ?? {};
17051
+ } else {
17052
+ browser = await defaultBrowser2();
17053
+ }
17054
+ if (browser.id in ids) {
17055
+ const browserName = ids[browser.id.toLowerCase()];
17056
+ if (app === "browserPrivate") {
17057
+ if (browserName === "safari") {
17058
+ throw new Error("Safari doesn't support opening in private mode via command line");
17059
+ }
17060
+ appArguments.push(flags[browserName]);
17061
+ }
17062
+ return baseOpen({
17063
+ ...options,
17064
+ app: {
17065
+ name: apps[browserName],
17066
+ arguments: appArguments
17067
+ }
17068
+ });
17069
+ }
17070
+ throw new Error(`${browser.name} is not supported as a default browser`);
17071
+ }
17072
+ let command;
17073
+ const cliArguments = [];
17074
+ const childProcessOptions = {};
17075
+ let shouldUseWindowsInWsl = false;
17076
+ if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
17077
+ shouldUseWindowsInWsl = await canAccessPowerShell();
17078
+ }
17079
+ if (platform === "darwin") {
17080
+ command = "open";
17081
+ if (options.wait) {
17082
+ cliArguments.push("--wait-apps");
17083
+ }
17084
+ if (options.background) {
17085
+ cliArguments.push("--background");
17086
+ }
17087
+ if (options.newInstance) {
17088
+ cliArguments.push("--new");
17089
+ }
17090
+ if (app) {
17091
+ cliArguments.push("-a", app);
17092
+ }
17093
+ } else if (platform === "win32" || shouldUseWindowsInWsl) {
17094
+ command = await powerShellPath2();
17095
+ cliArguments.push(...executePowerShell.argumentsPrefix);
17096
+ if (!is_wsl_default) {
17097
+ childProcessOptions.windowsVerbatimArguments = true;
17098
+ }
17099
+ if (is_wsl_default && options.target) {
17100
+ options.target = await convertWslPathToWindows(options.target);
17101
+ }
17102
+ const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
17103
+ if (options.wait) {
17104
+ encodedArguments.push("-Wait");
17105
+ }
17106
+ if (app) {
17107
+ encodedArguments.push(executePowerShell.escapeArgument(app));
17108
+ if (options.target) {
17109
+ appArguments.push(options.target);
17110
+ }
17111
+ } else if (options.target) {
17112
+ encodedArguments.push(executePowerShell.escapeArgument(options.target));
17113
+ }
17114
+ if (appArguments.length > 0) {
17115
+ appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
17116
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
17117
+ }
17118
+ options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
17119
+ if (!options.wait) {
17120
+ childProcessOptions.stdio = "ignore";
17121
+ }
17122
+ } else {
17123
+ if (app) {
17124
+ command = app;
17125
+ } else {
17126
+ const isBundled = !__dirname6 || __dirname6 === "/";
17127
+ let exeLocalXdgOpen = false;
17128
+ try {
17129
+ await fs5.access(localXdgOpenPath, fsConstants2.X_OK);
17130
+ exeLocalXdgOpen = true;
17131
+ } catch {}
17132
+ const useSystemXdgOpen = process8.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
17133
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
17134
+ }
17135
+ if (appArguments.length > 0) {
17136
+ cliArguments.push(...appArguments);
17137
+ }
17138
+ if (!options.wait) {
17139
+ childProcessOptions.stdio = "ignore";
17140
+ childProcessOptions.detached = true;
17141
+ }
17142
+ }
17143
+ if (platform === "darwin" && appArguments.length > 0) {
17144
+ cliArguments.push("--args", ...appArguments);
17145
+ }
17146
+ if (options.target) {
17147
+ cliArguments.push(options.target);
17148
+ }
17149
+ const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
17150
+ if (options.wait) {
17151
+ return new Promise((resolve, reject) => {
17152
+ subprocess.once("error", reject);
17153
+ subprocess.once("close", (exitCode) => {
17154
+ if (!options.allowNonzeroExitCode && exitCode !== 0) {
17155
+ reject(new Error(`Exited with code ${exitCode}`));
17156
+ return;
17157
+ }
17158
+ resolve(subprocess);
17159
+ });
17160
+ });
17161
+ }
17162
+ if (isFallbackAttempt) {
17163
+ return new Promise((resolve, reject) => {
17164
+ subprocess.once("error", reject);
17165
+ subprocess.once("spawn", () => {
17166
+ subprocess.once("close", (exitCode) => {
17167
+ subprocess.off("error", reject);
17168
+ if (exitCode !== 0) {
17169
+ reject(new Error(`Exited with code ${exitCode}`));
17170
+ return;
17171
+ }
17172
+ subprocess.unref();
17173
+ resolve(subprocess);
17174
+ });
17175
+ });
17176
+ });
17177
+ }
17178
+ subprocess.unref();
17179
+ return new Promise((resolve, reject) => {
17180
+ subprocess.once("error", reject);
17181
+ subprocess.once("spawn", () => {
17182
+ subprocess.off("error", reject);
17183
+ resolve(subprocess);
17184
+ });
17185
+ });
17186
+ }, open = (target, options) => {
17187
+ if (typeof target !== "string") {
17188
+ throw new TypeError("Expected a `target`");
17189
+ }
17190
+ return baseOpen({
17191
+ ...options,
17192
+ target
17193
+ });
17194
+ }, apps, open_default;
17195
+ var init_open = __esm(() => {
17196
+ init_wsl_utils();
17197
+ init_powershell_utils();
17198
+ init_default_browser();
17199
+ init_is_inside_container();
17200
+ init_is_in_ssh();
17201
+ fallbackAttemptSymbol = Symbol("fallbackAttempt");
17202
+ __dirname6 = import.meta.url ? path.dirname(fileURLToPath6(import.meta.url)) : "";
17203
+ localXdgOpenPath = path.join(__dirname6, "xdg-open");
17204
+ ({ platform, arch } = process8);
17205
+ apps = {
17206
+ browser: "browser",
17207
+ browserPrivate: "browserPrivate"
17208
+ };
17209
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
17210
+ darwin: "google chrome",
17211
+ win32: "chrome",
17212
+ linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
17213
+ }, {
17214
+ wsl: {
17215
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
17216
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
17217
+ }
17218
+ }));
17219
+ defineLazyProperty(apps, "brave", () => detectPlatformBinary({
17220
+ darwin: "brave browser",
17221
+ win32: "brave",
17222
+ linux: ["brave-browser", "brave"]
17223
+ }, {
17224
+ wsl: {
17225
+ ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
17226
+ x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
17227
+ }
17228
+ }));
17229
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
17230
+ darwin: "firefox",
17231
+ win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
17232
+ linux: "firefox"
17233
+ }, {
17234
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
17235
+ }));
17236
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
17237
+ darwin: "microsoft edge",
17238
+ win32: "msedge",
17239
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
17240
+ }, {
17241
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
17242
+ }));
17243
+ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
17244
+ darwin: "Safari"
17245
+ }));
17246
+ open_default = open;
17247
+ });
17248
+
17249
+ // src/lib/open-browser.ts
17250
+ var exports_open_browser = {};
17251
+ __export(exports_open_browser, {
17252
+ openBrowser: () => openBrowser
17253
+ });
17254
+ async function openBrowser(url) {
17255
+ try {
17256
+ await open_default(url);
17257
+ return { ok: true };
17258
+ } catch (error2) {
17259
+ return { ok: false, error: error2 };
17260
+ }
17261
+ }
17262
+ var init_open_browser = __esm(() => {
17263
+ init_open();
17264
+ });
17265
+
16487
17266
  // src/server/serve.ts
16488
17267
  import { existsSync as existsSync15, readdirSync as readdirSync9, readFileSync as readFileSync9, writeFileSync as writeFileSync7, mkdirSync as mkdirSync9 } from "fs";
16489
17268
 
@@ -16726,8 +17505,8 @@ async function runWorkflow(workflow) {
16726
17505
 
16727
17506
  // src/server/serve.ts
16728
17507
  init_database();
16729
- import { join as join14, dirname as dirname7, extname, basename as basename3 } from "path";
16730
- import { fileURLToPath as fileURLToPath6 } from "url";
17508
+ import { join as join14, dirname as dirname7, extname, basename as basename3, relative, resolve, sep } from "path";
17509
+ import { fileURLToPath as fileURLToPath7 } from "url";
16731
17510
 
16732
17511
  // src/lib/registry.ts
16733
17512
  init_builtins();
@@ -16848,7 +17627,7 @@ var connectors = [
16848
17627
  tags: ["ai", "llm", "grok"]
16849
17628
  },
16850
17629
  {
16851
- name: "xai-api-platform",
17630
+ name: "xai" + "-api-platform",
16852
17631
  displayName: "Xai API Platform",
16853
17632
  description: "Xai API Platform REST API for items, events, and search",
16854
17633
  category: "AI & ML",
@@ -18073,7 +18852,7 @@ var connectors = [
18073
18852
  tags: ["ai", "asset-management", "research"]
18074
18853
  },
18075
18854
  {
18076
- name: "xai-grok",
18855
+ name: "xai" + "-grok",
18077
18856
  displayName: "xAI Grok",
18078
18857
  description: "Grok models, Responses API, embeddings, media, files, batches, and collections",
18079
18858
  category: "AI & ML",
@@ -25269,7 +26048,42 @@ async function getConnectorCapabilityManifest(options = {}) {
25269
26048
  // src/server/serve.ts
25270
26049
  init_auth();
25271
26050
 
25272
- // node_modules/zod/v4/core/core.js
26051
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
26052
+ var import_content_type = __toESM(require_content_type(), 1);
26053
+ function mediaTypeEssence(header) {
26054
+ if (!header) {
26055
+ return;
26056
+ }
26057
+ try {
26058
+ return import_content_type.default.parse(header).type;
26059
+ } catch {
26060
+ const essence = (header.split(";", 1)[0] ?? "").trim().toLowerCase();
26061
+ if (essence === "" || header.slice(essence.length).includes(",")) {
26062
+ return;
26063
+ }
26064
+ return essence;
26065
+ }
26066
+ }
26067
+ function isJsonContentType(header) {
26068
+ if (header === "application/json") {
26069
+ return true;
26070
+ }
26071
+ return mediaTypeEssence(header) === "application/json";
26072
+ }
26073
+
26074
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
26075
+ var DEFAULT_SSE_KEEP_ALIVE_MS = 15000;
26076
+ var MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
26077
+ function armSseKeepAlive(intervalMs, onTick) {
26078
+ if (!Number.isFinite(intervalMs) || intervalMs < 1) {
26079
+ return;
26080
+ }
26081
+ const timer = setInterval(onTick, Math.min(intervalMs, MAX_TIMER_DELAY_MS));
26082
+ timer.unref?.();
26083
+ return timer;
26084
+ }
26085
+
26086
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/core.js
25273
26087
  var NEVER2 = Object.freeze({
25274
26088
  status: "aborted"
25275
26089
  });
@@ -25329,7 +26143,7 @@ function config(newConfig) {
25329
26143
  Object.assign(globalConfig, newConfig);
25330
26144
  return globalConfig;
25331
26145
  }
25332
- // node_modules/zod/v4/core/util.js
26146
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/util.js
25333
26147
  var exports_util = {};
25334
26148
  __export(exports_util, {
25335
26149
  unwrapMessage: () => unwrapMessage,
@@ -25843,7 +26657,7 @@ class Class {
25843
26657
  constructor(..._args) {}
25844
26658
  }
25845
26659
 
25846
- // node_modules/zod/v4/core/errors.js
26660
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/errors.js
25847
26661
  var initializer = (inst, def) => {
25848
26662
  inst.name = "$ZodError";
25849
26663
  Object.defineProperty(inst, "_zod", {
@@ -25917,7 +26731,7 @@ function formatError(error, _mapper) {
25917
26731
  return fieldErrors;
25918
26732
  }
25919
26733
 
25920
- // node_modules/zod/v4/core/parse.js
26734
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/parse.js
25921
26735
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
25922
26736
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
25923
26737
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -25968,7 +26782,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
25968
26782
  } : { success: true, data: result.value };
25969
26783
  };
25970
26784
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
25971
- // node_modules/zod/v4/core/regexes.js
26785
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/regexes.js
25972
26786
  var cuid = /^[cC][^\s-]{8,}$/;
25973
26787
  var cuid2 = /^[0-9a-z]+$/;
25974
26788
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
@@ -26026,7 +26840,7 @@ var _null = /null/i;
26026
26840
  var lowercase = /^[^A-Z]*$/;
26027
26841
  var uppercase = /^[^a-z]*$/;
26028
26842
 
26029
- // node_modules/zod/v4/core/checks.js
26843
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/checks.js
26030
26844
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
26031
26845
  var _a;
26032
26846
  inst._zod ?? (inst._zod = {});
@@ -26410,7 +27224,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
26410
27224
  };
26411
27225
  });
26412
27226
 
26413
- // node_modules/zod/v4/core/doc.js
27227
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/doc.js
26414
27228
  class Doc {
26415
27229
  constructor(args = []) {
26416
27230
  this.content = [];
@@ -26448,14 +27262,14 @@ class Doc {
26448
27262
  }
26449
27263
  }
26450
27264
 
26451
- // node_modules/zod/v4/core/versions.js
27265
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/versions.js
26452
27266
  var version = {
26453
27267
  major: 4,
26454
27268
  minor: 0,
26455
27269
  patch: 0
26456
27270
  };
26457
27271
 
26458
- // node_modules/zod/v4/core/schemas.js
27272
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/schemas.js
26459
27273
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
26460
27274
  var _a;
26461
27275
  inst ?? (inst = {});
@@ -27686,7 +28500,7 @@ function handleRefineResult(result, payload, input, inst) {
27686
28500
  payload.issues.push(issue(_iss));
27687
28501
  }
27688
28502
  }
27689
- // node_modules/zod/v4/locales/en.js
28503
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/locales/en.js
27690
28504
  var parsedType = (data) => {
27691
28505
  const t = typeof data;
27692
28506
  switch (t) {
@@ -27803,7 +28617,7 @@ function en_default2() {
27803
28617
  localeError: error()
27804
28618
  };
27805
28619
  }
27806
- // node_modules/zod/v4/core/registries.js
28620
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/registries.js
27807
28621
  var $output = Symbol("ZodOutput");
27808
28622
  var $input = Symbol("ZodInput");
27809
28623
 
@@ -27853,7 +28667,7 @@ function registry() {
27853
28667
  return new $ZodRegistry;
27854
28668
  }
27855
28669
  var globalRegistry = /* @__PURE__ */ registry();
27856
- // node_modules/zod/v4/core/api.js
28670
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/api.js
27857
28671
  function _string(Class2, params) {
27858
28672
  return new Class2({
27859
28673
  type: "string",
@@ -28288,7 +29102,7 @@ function _refine(Class2, fn, _params) {
28288
29102
  });
28289
29103
  return schema;
28290
29104
  }
28291
- // node_modules/zod/v4/core/to-json-schema.js
29105
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js
28292
29106
  class JSONSchemaGenerator {
28293
29107
  constructor(params) {
28294
29108
  this.counter = 0;
@@ -29040,7 +29854,7 @@ function isTransforming(_schema, _ctx) {
29040
29854
  }
29041
29855
  throw new Error(`Unknown schema type: ${def.type}`);
29042
29856
  }
29043
- // node_modules/zod/v4/classic/iso.js
29857
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/iso.js
29044
29858
  var exports_iso = {};
29045
29859
  __export(exports_iso, {
29046
29860
  time: () => time2,
@@ -29081,7 +29895,7 @@ function duration2(params) {
29081
29895
  return _isoDuration(ZodISODuration, params);
29082
29896
  }
29083
29897
 
29084
- // node_modules/zod/v4/classic/errors.js
29898
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/errors.js
29085
29899
  var initializer2 = (inst, issues) => {
29086
29900
  $ZodError.init(inst, issues);
29087
29901
  inst.name = "ZodError";
@@ -29110,13 +29924,13 @@ var ZodRealError = $constructor("ZodError", initializer2, {
29110
29924
  Parent: Error
29111
29925
  });
29112
29926
 
29113
- // node_modules/zod/v4/classic/parse.js
29927
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/parse.js
29114
29928
  var parse3 = /* @__PURE__ */ _parse(ZodRealError);
29115
29929
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
29116
29930
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
29117
29931
  var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
29118
29932
 
29119
- // node_modules/zod/v4/classic/schemas.js
29933
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/schemas.js
29120
29934
  var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
29121
29935
  $ZodType.init(inst, def);
29122
29936
  inst.def = def;
@@ -29721,10 +30535,10 @@ function superRefine(fn) {
29721
30535
  function preprocess(fn, schema) {
29722
30536
  return pipe(transform(fn), schema);
29723
30537
  }
29724
- // node_modules/zod/v4/classic/external.js
30538
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/classic/external.js
29725
30539
  config(en_default2());
29726
30540
 
29727
- // node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
30541
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
29728
30542
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
29729
30543
  var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
29730
30544
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
@@ -30571,17 +31385,19 @@ class UrlElicitationRequiredError extends McpError {
30571
31385
  }
30572
31386
  }
30573
31387
 
30574
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
31388
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
30575
31389
  class WebStandardStreamableHTTPServerTransport {
30576
31390
  constructor(options = {}) {
30577
31391
  this._started = false;
30578
31392
  this._hasHandledRequest = false;
30579
31393
  this._streamMapping = new Map;
30580
31394
  this._requestToStreamMapping = new Map;
31395
+ this._resumableStreams = new Set;
30581
31396
  this._requestResponseMap = new Map;
30582
31397
  this._initialized = false;
30583
31398
  this._enableJsonResponse = false;
30584
31399
  this._standaloneSseStreamId = "_GET_stream";
31400
+ this._closed = false;
30585
31401
  this.sessionIdGenerator = options.sessionIdGenerator;
30586
31402
  this._enableJsonResponse = options.enableJsonResponse ?? false;
30587
31403
  this._eventStore = options.eventStore;
@@ -30591,6 +31407,22 @@ class WebStandardStreamableHTTPServerTransport {
30591
31407
  this._allowedOrigins = options.allowedOrigins;
30592
31408
  this._enableDnsRebindingProtection = options.enableDnsRebindingProtection ?? false;
30593
31409
  this._retryInterval = options.retryInterval;
31410
+ this._keepAliveMs = options.keepAliveMs ?? DEFAULT_SSE_KEEP_ALIVE_MS;
31411
+ }
31412
+ startKeepAlive(controller, encoder) {
31413
+ if (this._closed)
31414
+ return;
31415
+ const timer = armSseKeepAlive(this._keepAliveMs, () => {
31416
+ try {
31417
+ controller.enqueue(encoder.encode(`: keepalive
31418
+
31419
+ `));
31420
+ } catch {
31421
+ if (timer !== undefined)
31422
+ clearInterval(timer);
31423
+ }
31424
+ });
31425
+ return timer;
30594
31426
  }
30595
31427
  async start() {
30596
31428
  if (this._started) {
@@ -30638,6 +31470,9 @@ class WebStandardStreamableHTTPServerTransport {
30638
31470
  return;
30639
31471
  }
30640
31472
  async handleRequest(req, options) {
31473
+ if (this._closed) {
31474
+ return this.createJsonErrorResponse(404, -32001, "Session not found");
31475
+ }
30641
31476
  if (!this.sessionIdGenerator && this._hasHandledRequest) {
30642
31477
  throw new Error("Stateless transport cannot be reused across requests. Create a new transport per request.");
30643
31478
  }
@@ -30677,6 +31512,7 @@ data:
30677
31512
  `;
30678
31513
  }
30679
31514
  controller.enqueue(encoder.encode(primingEvent));
31515
+ this._resumableStreams.add(streamId);
30680
31516
  }
30681
31517
  async handleGetRequest(req) {
30682
31518
  const acceptHeader = req.headers.get("accept");
@@ -30704,18 +31540,25 @@ data:
30704
31540
  }
30705
31541
  const encoder = new TextEncoder;
30706
31542
  let streamController;
31543
+ let keepAliveTimer = undefined;
30707
31544
  const readable = new ReadableStream({
30708
31545
  start: (controller) => {
30709
31546
  streamController = controller;
30710
31547
  },
30711
31548
  cancel: () => {
30712
- this._streamMapping.delete(this._standaloneSseStreamId);
31549
+ if (keepAliveTimer !== undefined) {
31550
+ clearInterval(keepAliveTimer);
31551
+ }
31552
+ if (this._streamMapping.get(this._standaloneSseStreamId)?.controller === streamController) {
31553
+ this._streamMapping.delete(this._standaloneSseStreamId);
31554
+ }
30713
31555
  }
30714
31556
  });
30715
31557
  const headers = {
30716
31558
  "Content-Type": "text/event-stream",
30717
31559
  "Cache-Control": "no-cache, no-transform",
30718
- Connection: "keep-alive"
31560
+ Connection: "keep-alive",
31561
+ "X-Accel-Buffering": "no"
30719
31562
  };
30720
31563
  if (this.sessionId !== undefined) {
30721
31564
  headers["mcp-session-id"] = this.sessionId;
@@ -30724,12 +31567,16 @@ data:
30724
31567
  controller: streamController,
30725
31568
  encoder,
30726
31569
  cleanup: () => {
31570
+ if (keepAliveTimer !== undefined) {
31571
+ clearInterval(keepAliveTimer);
31572
+ }
30727
31573
  this._streamMapping.delete(this._standaloneSseStreamId);
30728
31574
  try {
30729
31575
  streamController.close();
30730
31576
  } catch {}
30731
31577
  }
30732
31578
  });
31579
+ keepAliveTimer = this.startKeepAlive(streamController, encoder);
30733
31580
  return new Response(readable, { headers });
30734
31581
  }
30735
31582
  async replayEvents(lastEventId) {
@@ -30753,20 +31600,33 @@ data:
30753
31600
  const headers = {
30754
31601
  "Content-Type": "text/event-stream",
30755
31602
  "Cache-Control": "no-cache, no-transform",
30756
- Connection: "keep-alive"
31603
+ Connection: "keep-alive",
31604
+ "X-Accel-Buffering": "no"
30757
31605
  };
30758
31606
  if (this.sessionId !== undefined) {
30759
31607
  headers["mcp-session-id"] = this.sessionId;
30760
31608
  }
30761
31609
  const encoder = new TextEncoder;
30762
31610
  let streamController;
31611
+ let keepAliveTimer = undefined;
31612
+ let replayedStreamId = undefined;
31613
+ let cancelled = false;
30763
31614
  const readable = new ReadableStream({
30764
31615
  start: (controller) => {
30765
31616
  streamController = controller;
30766
31617
  },
30767
- cancel: () => {}
31618
+ cancel: () => {
31619
+ cancelled = true;
31620
+ if (keepAliveTimer !== undefined) {
31621
+ clearInterval(keepAliveTimer);
31622
+ }
31623
+ if (replayedStreamId !== undefined && this._streamMapping.get(replayedStreamId)?.controller === streamController) {
31624
+ this._streamMapping.delete(replayedStreamId);
31625
+ }
31626
+ }
30768
31627
  });
30769
- const replayedStreamId = await this._eventStore.replayEventsAfter(lastEventId, {
31628
+ const replayedEventIds = new Set;
31629
+ replayedStreamId = await this._eventStore.replayEventsAfter(lastEventId, {
30770
31630
  send: async (eventId, message) => {
30771
31631
  const success3 = this.writeSSEEvent(streamController, encoder, message, eventId);
30772
31632
  if (!success3) {
@@ -30774,19 +31634,34 @@ data:
30774
31634
  try {
30775
31635
  streamController.close();
30776
31636
  } catch {}
31637
+ } else {
31638
+ replayedEventIds.add(eventId);
30777
31639
  }
30778
31640
  }
30779
31641
  });
31642
+ if (this._closed || cancelled) {
31643
+ try {
31644
+ streamController.close();
31645
+ } catch {}
31646
+ return this.createJsonErrorResponse(404, -32001, "Session not found");
31647
+ }
31648
+ this._streamMapping.get(replayedStreamId)?.cleanup();
30780
31649
  this._streamMapping.set(replayedStreamId, {
30781
31650
  controller: streamController,
30782
31651
  encoder,
31652
+ replayedEventIds,
30783
31653
  cleanup: () => {
31654
+ if (keepAliveTimer !== undefined) {
31655
+ clearInterval(keepAliveTimer);
31656
+ }
30784
31657
  this._streamMapping.delete(replayedStreamId);
30785
31658
  try {
30786
31659
  streamController.close();
30787
31660
  } catch {}
30788
31661
  }
30789
31662
  });
31663
+ this._resumableStreams.add(replayedStreamId);
31664
+ keepAliveTimer = this.startKeepAlive(streamController, encoder);
30790
31665
  return new Response(readable, { headers });
30791
31666
  } catch (error2) {
30792
31667
  this.onerror?.(error2);
@@ -30836,7 +31711,7 @@ data:
30836
31711
  return this.createJsonErrorResponse(406, -32000, "Not Acceptable: Client must accept both application/json and text/event-stream");
30837
31712
  }
30838
31713
  const ct = req.headers.get("content-type");
30839
- if (!ct || !ct.includes("application/json")) {
31714
+ if (!isJsonContentType(ct)) {
30840
31715
  this.onerror?.(new Error("Unsupported Media Type: Content-Type must be application/json"));
30841
31716
  return this.createJsonErrorResponse(415, -32000, "Unsupported Media Type: Content-Type must be application/json");
30842
31717
  }
@@ -30866,6 +31741,9 @@ data:
30866
31741
  this.onerror?.(new Error("Parse error: Invalid JSON-RPC message"));
30867
31742
  return this.createJsonErrorResponse(400, -32700, "Parse error: Invalid JSON-RPC message");
30868
31743
  }
31744
+ if (this._closed) {
31745
+ return this.createJsonErrorResponse(404, -32001, "Session not found");
31746
+ }
30869
31747
  const isInitializationRequest = messages.some(isInitializeRequest);
30870
31748
  if (isInitializationRequest) {
30871
31749
  if (this._initialized && this.sessionId !== undefined) {
@@ -30892,6 +31770,9 @@ data:
30892
31770
  return protocolError;
30893
31771
  }
30894
31772
  }
31773
+ if (this._closed) {
31774
+ return this.createJsonErrorResponse(404, -32001, "Session not found");
31775
+ }
30895
31776
  const hasRequests = messages.some(isJSONRPCRequest);
30896
31777
  if (!hasRequests) {
30897
31778
  for (const message of messages) {
@@ -30922,18 +31803,25 @@ data:
30922
31803
  }
30923
31804
  const encoder = new TextEncoder;
30924
31805
  let streamController;
31806
+ let keepAliveTimer = undefined;
30925
31807
  const readable = new ReadableStream({
30926
31808
  start: (controller) => {
30927
31809
  streamController = controller;
30928
31810
  },
30929
31811
  cancel: () => {
30930
- this._streamMapping.delete(streamId);
31812
+ if (keepAliveTimer !== undefined) {
31813
+ clearInterval(keepAliveTimer);
31814
+ }
31815
+ if (this._streamMapping.get(streamId)?.controller === streamController) {
31816
+ this._streamMapping.delete(streamId);
31817
+ }
30931
31818
  }
30932
31819
  });
30933
31820
  const headers = {
30934
31821
  "Content-Type": "text/event-stream",
30935
- "Cache-Control": "no-cache",
30936
- Connection: "keep-alive"
31822
+ "Cache-Control": "no-cache, no-transform",
31823
+ Connection: "keep-alive",
31824
+ "X-Accel-Buffering": "no"
30937
31825
  };
30938
31826
  if (this.sessionId !== undefined) {
30939
31827
  headers["mcp-session-id"] = this.sessionId;
@@ -30944,6 +31832,9 @@ data:
30944
31832
  controller: streamController,
30945
31833
  encoder,
30946
31834
  cleanup: () => {
31835
+ if (keepAliveTimer !== undefined) {
31836
+ clearInterval(keepAliveTimer);
31837
+ }
30947
31838
  this._streamMapping.delete(streamId);
30948
31839
  try {
30949
31840
  streamController.close();
@@ -30953,19 +31844,33 @@ data:
30953
31844
  this._requestToStreamMapping.set(message.id, streamId);
30954
31845
  }
30955
31846
  }
30956
- await this.writePrimingEvent(streamController, encoder, streamId, clientProtocolVersion);
30957
- for (const message of messages) {
30958
- let closeSSEStream;
30959
- let closeStandaloneSSEStream;
30960
- if (isJSONRPCRequest(message) && this._eventStore && clientProtocolVersion >= "2025-11-25") {
30961
- closeSSEStream = () => {
30962
- this.closeSSEStream(message.id);
30963
- };
30964
- closeStandaloneSSEStream = () => {
30965
- this.closeStandaloneSSEStream();
30966
- };
31847
+ try {
31848
+ await this.writePrimingEvent(streamController, encoder, streamId, clientProtocolVersion);
31849
+ for (const message of messages) {
31850
+ let closeSSEStream;
31851
+ let closeStandaloneSSEStream;
31852
+ if (isJSONRPCRequest(message) && this._eventStore && clientProtocolVersion >= "2025-11-25") {
31853
+ closeSSEStream = () => {
31854
+ this.closeSSEStream(message.id);
31855
+ };
31856
+ closeStandaloneSSEStream = () => {
31857
+ this.closeStandaloneSSEStream();
31858
+ };
31859
+ }
31860
+ this.onmessage?.(message, { authInfo: options?.authInfo, requestInfo, closeSSEStream, closeStandaloneSSEStream });
30967
31861
  }
30968
- this.onmessage?.(message, { authInfo: options?.authInfo, requestInfo, closeSSEStream, closeStandaloneSSEStream });
31862
+ } catch (error2) {
31863
+ this._streamMapping.get(streamId)?.cleanup();
31864
+ this._resumableStreams.delete(streamId);
31865
+ for (const message of messages) {
31866
+ if (isJSONRPCRequest(message)) {
31867
+ this._requestToStreamMapping.delete(message.id);
31868
+ }
31869
+ }
31870
+ throw error2;
31871
+ }
31872
+ if (this._streamMapping.get(streamId)?.controller === streamController) {
31873
+ keepAliveTimer = this.startKeepAlive(streamController, encoder);
30969
31874
  }
30970
31875
  return new Response(readable, { status: 200, headers });
30971
31876
  } catch (error2) {
@@ -30982,9 +31887,12 @@ data:
30982
31887
  if (protocolError) {
30983
31888
  return protocolError;
30984
31889
  }
30985
- await Promise.resolve(this._onsessionclosed?.(this.sessionId));
30986
- await this.close();
30987
- return new Response(null, { status: 200 });
31890
+ try {
31891
+ await Promise.resolve(this._onsessionclosed?.(this.sessionId));
31892
+ return new Response(null, { status: 200 });
31893
+ } finally {
31894
+ await this.close();
31895
+ }
30988
31896
  }
30989
31897
  validateSession(req) {
30990
31898
  if (this.sessionIdGenerator === undefined) {
@@ -31014,11 +31922,16 @@ data:
31014
31922
  return;
31015
31923
  }
31016
31924
  async close() {
31925
+ if (this._closed) {
31926
+ return;
31927
+ }
31928
+ this._closed = true;
31017
31929
  this._streamMapping.forEach(({ cleanup }) => {
31018
31930
  cleanup();
31019
31931
  });
31020
31932
  this._streamMapping.clear();
31021
31933
  this._requestResponseMap.clear();
31934
+ this._resumableStreams.clear();
31022
31935
  this.onclose?.();
31023
31936
  }
31024
31937
  closeSSEStream(requestId) {
@@ -31053,7 +31966,7 @@ data:
31053
31966
  if (standaloneSse === undefined) {
31054
31967
  return;
31055
31968
  }
31056
- if (standaloneSse.controller && standaloneSse.encoder) {
31969
+ if (standaloneSse.controller && standaloneSse.encoder && (eventId === undefined || !standaloneSse.replayedEventIds?.has(eventId))) {
31057
31970
  this.writeSSEEvent(standaloneSse.controller, standaloneSse.encoder, message, eventId);
31058
31971
  }
31059
31972
  return;
@@ -31062,13 +31975,19 @@ data:
31062
31975
  if (!streamId) {
31063
31976
  throw new Error(`No connection established for request ID: ${String(requestId)}`);
31064
31977
  }
31065
- const stream = this._streamMapping.get(streamId);
31066
- if (!this._enableJsonResponse && stream?.controller && stream?.encoder) {
31978
+ let stream = this._streamMapping.get(streamId);
31979
+ if (!this._enableJsonResponse) {
31067
31980
  let eventId;
31068
31981
  if (this._eventStore) {
31069
31982
  eventId = await this._eventStore.storeEvent(streamId, message);
31983
+ stream = this._streamMapping.get(streamId);
31984
+ }
31985
+ if (stream?.controller && stream?.encoder && (eventId === undefined || !stream.replayedEventIds?.has(eventId))) {
31986
+ const written = this.writeSSEEvent(stream.controller, stream.encoder, message, eventId);
31987
+ if (written && eventId !== undefined) {
31988
+ this._resumableStreams.add(streamId);
31989
+ }
31070
31990
  }
31071
- this.writeSSEEvent(stream.controller, stream.encoder, message, eventId);
31072
31991
  }
31073
31992
  if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {
31074
31993
  this._requestResponseMap.set(requestId, message);
@@ -31076,6 +31995,25 @@ data:
31076
31995
  const allResponsesReady = relatedIds.every((id) => this._requestResponseMap.has(id));
31077
31996
  if (allResponsesReady) {
31078
31997
  if (!stream) {
31998
+ if (this._closed) {
31999
+ for (const id of relatedIds) {
32000
+ this._requestResponseMap.delete(id);
32001
+ this._requestToStreamMapping.delete(id);
32002
+ }
32003
+ return;
32004
+ }
32005
+ if (!this._enableJsonResponse && this._eventStore && this._resumableStreams.has(streamId)) {
32006
+ for (const id of relatedIds) {
32007
+ this._requestResponseMap.delete(id);
32008
+ this._requestToStreamMapping.delete(id);
32009
+ }
32010
+ this._resumableStreams.delete(streamId);
32011
+ return;
32012
+ }
32013
+ for (const id of relatedIds) {
32014
+ this._requestResponseMap.delete(id);
32015
+ this._requestToStreamMapping.delete(id);
32016
+ }
31079
32017
  throw new Error(`No connection established for request ID: ${String(requestId)}`);
31080
32018
  }
31081
32019
  if (this._enableJsonResponse && stream.resolveJson) {
@@ -31098,11 +32036,12 @@ data:
31098
32036
  this._requestResponseMap.delete(id);
31099
32037
  this._requestToStreamMapping.delete(id);
31100
32038
  }
32039
+ this._resumableStreams.delete(streamId);
31101
32040
  }
31102
32041
  }
31103
32042
  }
31104
32043
  }
31105
- // node_modules/zod/v4/mini/schemas.js
32044
+ // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v4/mini/schemas.js
31106
32045
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
31107
32046
  if (!inst._zod)
31108
32047
  throw new Error("Uninitialized schema in ZodMiniType.");
@@ -31144,7 +32083,7 @@ function object2(shape, params) {
31144
32083
  };
31145
32084
  return new ZodMiniObject(def);
31146
32085
  }
31147
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
32086
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
31148
32087
  function isZ4Schema(s) {
31149
32088
  const schema = s;
31150
32089
  return !!schema._zod;
@@ -31228,17 +32167,34 @@ function normalizeObjectSchema(schema) {
31228
32167
  }
31229
32168
  return;
31230
32169
  }
32170
+ function getDotPath(path) {
32171
+ if (path.length === 0) {
32172
+ return "object root";
32173
+ }
32174
+ return path.reduce((acc, seg, index) => {
32175
+ if (index === 0) {
32176
+ return String(seg);
32177
+ }
32178
+ if (typeof seg === "number") {
32179
+ return `${acc}[${seg}]`;
32180
+ }
32181
+ return `${acc}.${seg}`;
32182
+ }, "");
32183
+ }
31231
32184
  function getParseErrorMessage(error2) {
31232
32185
  if (error2 && typeof error2 === "object") {
32186
+ if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
32187
+ return error2.issues.map((i) => {
32188
+ if (!i.path?.length) {
32189
+ return i.message;
32190
+ }
32191
+ return `${i.message} at ${getDotPath(i.path)}`;
32192
+ }).join(`
32193
+ `);
32194
+ }
31233
32195
  if ("message" in error2 && typeof error2.message === "string") {
31234
32196
  return error2.message;
31235
32197
  }
31236
- if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
31237
- const firstIssue = error2.issues[0];
31238
- if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
31239
- return String(firstIssue.message);
31240
- }
31241
- }
31242
32198
  try {
31243
32199
  return JSON.stringify(error2);
31244
32200
  } catch {
@@ -31288,12 +32244,12 @@ function getLiteralValue(schema) {
31288
32244
  return;
31289
32245
  }
31290
32246
 
31291
- // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
32247
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
31292
32248
  function isTerminal(status) {
31293
32249
  return status === "completed" || status === "failed" || status === "cancelled";
31294
32250
  }
31295
32251
 
31296
- // node_modules/zod-to-json-schema/dist/esm/Options.js
32252
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/Options.js
31297
32253
  var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
31298
32254
  var defaultOptions = {
31299
32255
  name: undefined,
@@ -31326,7 +32282,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
31326
32282
  ...defaultOptions,
31327
32283
  ...options
31328
32284
  };
31329
- // node_modules/zod-to-json-schema/dist/esm/Refs.js
32285
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/Refs.js
31330
32286
  var getRefs = (options) => {
31331
32287
  const _options = getDefaultOptions(options);
31332
32288
  const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
@@ -31345,7 +32301,7 @@ var getRefs = (options) => {
31345
32301
  ]))
31346
32302
  };
31347
32303
  };
31348
- // node_modules/zod-to-json-schema/dist/esm/errorMessages.js
32304
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
31349
32305
  function addErrorMessage(res, key, errorMessage, refs) {
31350
32306
  if (!refs?.errorMessages)
31351
32307
  return;
@@ -31360,7 +32316,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
31360
32316
  res[key] = value;
31361
32317
  addErrorMessage(res, key, errorMessage, refs);
31362
32318
  }
31363
- // node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
32319
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
31364
32320
  var getRelativePath = (pathA, pathB) => {
31365
32321
  let i = 0;
31366
32322
  for (;i < pathA.length && i < pathB.length; i++) {
@@ -31369,7 +32325,7 @@ var getRelativePath = (pathA, pathB) => {
31369
32325
  }
31370
32326
  return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
31371
32327
  };
31372
- // node_modules/zod-to-json-schema/dist/esm/parsers/any.js
32328
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
31373
32329
  function parseAnyDef(refs) {
31374
32330
  if (refs.target !== "openAi") {
31375
32331
  return {};
@@ -31385,7 +32341,7 @@ function parseAnyDef(refs) {
31385
32341
  };
31386
32342
  }
31387
32343
 
31388
- // node_modules/zod-to-json-schema/dist/esm/parsers/array.js
32344
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
31389
32345
  function parseArrayDef(def, refs) {
31390
32346
  const res = {
31391
32347
  type: "array"
@@ -31409,7 +32365,7 @@ function parseArrayDef(def, refs) {
31409
32365
  return res;
31410
32366
  }
31411
32367
 
31412
- // node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
32368
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
31413
32369
  function parseBigintDef(def, refs) {
31414
32370
  const res = {
31415
32371
  type: "integer",
@@ -31455,24 +32411,24 @@ function parseBigintDef(def, refs) {
31455
32411
  return res;
31456
32412
  }
31457
32413
 
31458
- // node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
32414
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
31459
32415
  function parseBooleanDef() {
31460
32416
  return {
31461
32417
  type: "boolean"
31462
32418
  };
31463
32419
  }
31464
32420
 
31465
- // node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
32421
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
31466
32422
  function parseBrandedDef(_def, refs) {
31467
32423
  return parseDef(_def.type._def, refs);
31468
32424
  }
31469
32425
 
31470
- // node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
32426
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
31471
32427
  var parseCatchDef = (def, refs) => {
31472
32428
  return parseDef(def.innerType._def, refs);
31473
32429
  };
31474
32430
 
31475
- // node_modules/zod-to-json-schema/dist/esm/parsers/date.js
32431
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
31476
32432
  function parseDateDef(def, refs, overrideDateStrategy) {
31477
32433
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
31478
32434
  if (Array.isArray(strategy)) {
@@ -31517,7 +32473,7 @@ var integerDateParser = (def, refs) => {
31517
32473
  return res;
31518
32474
  };
31519
32475
 
31520
- // node_modules/zod-to-json-schema/dist/esm/parsers/default.js
32476
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
31521
32477
  function parseDefaultDef(_def, refs) {
31522
32478
  return {
31523
32479
  ...parseDef(_def.innerType._def, refs),
@@ -31525,12 +32481,12 @@ function parseDefaultDef(_def, refs) {
31525
32481
  };
31526
32482
  }
31527
32483
 
31528
- // node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
32484
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
31529
32485
  function parseEffectsDef(_def, refs) {
31530
32486
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
31531
32487
  }
31532
32488
 
31533
- // node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
32489
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
31534
32490
  function parseEnumDef(def) {
31535
32491
  return {
31536
32492
  type: "string",
@@ -31538,7 +32494,7 @@ function parseEnumDef(def) {
31538
32494
  };
31539
32495
  }
31540
32496
 
31541
- // node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
32497
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
31542
32498
  var isJsonSchema7AllOfType = (type) => {
31543
32499
  if ("type" in type && type.type === "string")
31544
32500
  return false;
@@ -31580,7 +32536,7 @@ function parseIntersectionDef(def, refs) {
31580
32536
  } : undefined;
31581
32537
  }
31582
32538
 
31583
- // node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
32539
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
31584
32540
  function parseLiteralDef(def, refs) {
31585
32541
  const parsedType2 = typeof def.value;
31586
32542
  if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") {
@@ -31600,7 +32556,7 @@ function parseLiteralDef(def, refs) {
31600
32556
  };
31601
32557
  }
31602
32558
 
31603
- // node_modules/zod-to-json-schema/dist/esm/parsers/string.js
32559
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
31604
32560
  var emojiRegex2 = undefined;
31605
32561
  var zodPatterns = {
31606
32562
  cuid: /^[cC][^\s-]{8,}$/,
@@ -31897,7 +32853,7 @@ function stringifyRegExpWithFlags(regex, refs) {
31897
32853
  return pattern;
31898
32854
  }
31899
32855
 
31900
- // node_modules/zod-to-json-schema/dist/esm/parsers/record.js
32856
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
31901
32857
  function parseRecordDef(def, refs) {
31902
32858
  if (refs.target === "openAi") {
31903
32859
  console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
@@ -31949,7 +32905,7 @@ function parseRecordDef(def, refs) {
31949
32905
  return schema;
31950
32906
  }
31951
32907
 
31952
- // node_modules/zod-to-json-schema/dist/esm/parsers/map.js
32908
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
31953
32909
  function parseMapDef(def, refs) {
31954
32910
  if (refs.mapStrategy === "record") {
31955
32911
  return parseRecordDef(def, refs);
@@ -31974,7 +32930,7 @@ function parseMapDef(def, refs) {
31974
32930
  };
31975
32931
  }
31976
32932
 
31977
- // node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
32933
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
31978
32934
  function parseNativeEnumDef(def) {
31979
32935
  const object3 = def.values;
31980
32936
  const actualKeys = Object.keys(def.values).filter((key) => {
@@ -31988,7 +32944,7 @@ function parseNativeEnumDef(def) {
31988
32944
  };
31989
32945
  }
31990
32946
 
31991
- // node_modules/zod-to-json-schema/dist/esm/parsers/never.js
32947
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
31992
32948
  function parseNeverDef(refs) {
31993
32949
  return refs.target === "openAi" ? undefined : {
31994
32950
  not: parseAnyDef({
@@ -31998,7 +32954,7 @@ function parseNeverDef(refs) {
31998
32954
  };
31999
32955
  }
32000
32956
 
32001
- // node_modules/zod-to-json-schema/dist/esm/parsers/null.js
32957
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
32002
32958
  function parseNullDef(refs) {
32003
32959
  return refs.target === "openApi3" ? {
32004
32960
  enum: ["null"],
@@ -32008,7 +32964,7 @@ function parseNullDef(refs) {
32008
32964
  };
32009
32965
  }
32010
32966
 
32011
- // node_modules/zod-to-json-schema/dist/esm/parsers/union.js
32967
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
32012
32968
  var primitiveMappings = {
32013
32969
  ZodString: "string",
32014
32970
  ZodNumber: "number",
@@ -32076,7 +33032,7 @@ var asAnyOf = (def, refs) => {
32076
33032
  return anyOf.length ? { anyOf } : undefined;
32077
33033
  };
32078
33034
 
32079
- // node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
33035
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
32080
33036
  function parseNullableDef(def, refs) {
32081
33037
  if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
32082
33038
  if (refs.target === "openApi3") {
@@ -32108,7 +33064,7 @@ function parseNullableDef(def, refs) {
32108
33064
  return base && { anyOf: [base, { type: "null" }] };
32109
33065
  }
32110
33066
 
32111
- // node_modules/zod-to-json-schema/dist/esm/parsers/number.js
33067
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
32112
33068
  function parseNumberDef(def, refs) {
32113
33069
  const res = {
32114
33070
  type: "number"
@@ -32157,7 +33113,7 @@ function parseNumberDef(def, refs) {
32157
33113
  return res;
32158
33114
  }
32159
33115
 
32160
- // node_modules/zod-to-json-schema/dist/esm/parsers/object.js
33116
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
32161
33117
  function parseObjectDef(def, refs) {
32162
33118
  const forceOptionalIntoNullable = refs.target === "openAi";
32163
33119
  const result = {
@@ -32227,7 +33183,7 @@ function safeIsOptional(schema) {
32227
33183
  }
32228
33184
  }
32229
33185
 
32230
- // node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
33186
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
32231
33187
  var parseOptionalDef = (def, refs) => {
32232
33188
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
32233
33189
  return parseDef(def.innerType._def, refs);
@@ -32246,7 +33202,7 @@ var parseOptionalDef = (def, refs) => {
32246
33202
  } : parseAnyDef(refs);
32247
33203
  };
32248
33204
 
32249
- // node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
33205
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
32250
33206
  var parsePipelineDef = (def, refs) => {
32251
33207
  if (refs.pipeStrategy === "input") {
32252
33208
  return parseDef(def.in._def, refs);
@@ -32266,12 +33222,12 @@ var parsePipelineDef = (def, refs) => {
32266
33222
  };
32267
33223
  };
32268
33224
 
32269
- // node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
33225
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
32270
33226
  function parsePromiseDef(def, refs) {
32271
33227
  return parseDef(def.type._def, refs);
32272
33228
  }
32273
33229
 
32274
- // node_modules/zod-to-json-schema/dist/esm/parsers/set.js
33230
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
32275
33231
  function parseSetDef(def, refs) {
32276
33232
  const items = parseDef(def.valueType._def, {
32277
33233
  ...refs,
@@ -32291,7 +33247,7 @@ function parseSetDef(def, refs) {
32291
33247
  return schema;
32292
33248
  }
32293
33249
 
32294
- // node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
33250
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
32295
33251
  function parseTupleDef(def, refs) {
32296
33252
  if (def.rest) {
32297
33253
  return {
@@ -32319,24 +33275,24 @@ function parseTupleDef(def, refs) {
32319
33275
  }
32320
33276
  }
32321
33277
 
32322
- // node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
33278
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
32323
33279
  function parseUndefinedDef(refs) {
32324
33280
  return {
32325
33281
  not: parseAnyDef(refs)
32326
33282
  };
32327
33283
  }
32328
33284
 
32329
- // node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
33285
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
32330
33286
  function parseUnknownDef(refs) {
32331
33287
  return parseAnyDef(refs);
32332
33288
  }
32333
33289
 
32334
- // node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
33290
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
32335
33291
  var parseReadonlyDef = (def, refs) => {
32336
33292
  return parseDef(def.innerType._def, refs);
32337
33293
  };
32338
33294
 
32339
- // node_modules/zod-to-json-schema/dist/esm/selectParser.js
33295
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/selectParser.js
32340
33296
  var selectParser = (def, typeName, refs) => {
32341
33297
  switch (typeName) {
32342
33298
  case ZodFirstPartyTypeKind.ZodString:
@@ -32414,7 +33370,7 @@ var selectParser = (def, typeName, refs) => {
32414
33370
  }
32415
33371
  };
32416
33372
 
32417
- // node_modules/zod-to-json-schema/dist/esm/parseDef.js
33373
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/parseDef.js
32418
33374
  function parseDef(def, refs, forceResolution = false) {
32419
33375
  const seenItem = refs.seen.get(def);
32420
33376
  if (refs.override) {
@@ -32469,7 +33425,7 @@ var addMeta = (def, refs, jsonSchema) => {
32469
33425
  }
32470
33426
  return jsonSchema;
32471
33427
  };
32472
- // node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
33428
+ // ../../node_modules/.bun/zod-to-json-schema@3.25.2+27912429049419a2/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
32473
33429
  var zodToJsonSchema = (schema, options) => {
32474
33430
  const refs = getRefs(options);
32475
33431
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
@@ -32529,7 +33485,7 @@ var zodToJsonSchema = (schema, options) => {
32529
33485
  }
32530
33486
  return combined;
32531
33487
  };
32532
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
33488
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
32533
33489
  function mapMiniTarget(t) {
32534
33490
  if (!t)
32535
33491
  return "draft-7";
@@ -32571,7 +33527,7 @@ function parseWithCompat(schema, data) {
32571
33527
  return result.data;
32572
33528
  }
32573
33529
 
32574
- // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
33530
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
32575
33531
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
32576
33532
 
32577
33533
  class Protocol {
@@ -33412,7 +34368,7 @@ function mergeCapabilities(base, additional) {
33412
34368
  return result;
33413
34369
  }
33414
34370
 
33415
- // node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
34371
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
33416
34372
  var import_ajv = __toESM(require_ajv(), 1);
33417
34373
  var import_ajv_formats = __toESM(require_dist(), 1);
33418
34374
  function createDefaultAjvInstance() {
@@ -33452,7 +34408,7 @@ class AjvJsonSchemaValidator {
33452
34408
  }
33453
34409
  }
33454
34410
 
33455
- // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
34411
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
33456
34412
  class ExperimentalServerTasks {
33457
34413
  constructor(_server) {
33458
34414
  this._server = _server;
@@ -33530,7 +34486,7 @@ class ExperimentalServerTasks {
33530
34486
  }
33531
34487
  }
33532
34488
 
33533
- // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
34489
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
33534
34490
  function assertToolsCallTaskCapability(requests, method, entityName) {
33535
34491
  if (!requests) {
33536
34492
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -33565,7 +34521,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
33565
34521
  }
33566
34522
  }
33567
34523
 
33568
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
34524
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
33569
34525
  class Server extends Protocol {
33570
34526
  constructor(_serverInfo, options) {
33571
34527
  super(options);
@@ -33613,16 +34569,7 @@ class Server extends Protocol {
33613
34569
  if (!methodSchema) {
33614
34570
  throw new Error("Schema is missing a method literal");
33615
34571
  }
33616
- let methodValue;
33617
- if (isZ4Schema(methodSchema)) {
33618
- const v4Schema = methodSchema;
33619
- const v4Def = v4Schema._zod?.def;
33620
- methodValue = v4Def?.value ?? v4Schema.value;
33621
- } else {
33622
- const v3Schema = methodSchema;
33623
- const legacyDef = v3Schema._def;
33624
- methodValue = legacyDef?.value ?? v3Schema.value;
33625
- }
34572
+ const methodValue = getLiteralValue(methodSchema);
33626
34573
  if (typeof methodValue !== "string") {
33627
34574
  throw new Error("Schema method literal must be a string");
33628
34575
  }
@@ -33898,7 +34845,7 @@ class Server extends Protocol {
33898
34845
  }
33899
34846
  }
33900
34847
 
33901
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
34848
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
33902
34849
  var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
33903
34850
  function isCompletable(schema) {
33904
34851
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -33912,7 +34859,7 @@ var McpZodTypeKind;
33912
34859
  McpZodTypeKind2["Completable"] = "McpCompletable";
33913
34860
  })(McpZodTypeKind || (McpZodTypeKind = {}));
33914
34861
 
33915
- // node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
34862
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
33916
34863
  var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
33917
34864
  function validateToolName(name) {
33918
34865
  const warnings = [];
@@ -33970,7 +34917,7 @@ function validateAndWarnToolName(name) {
33970
34917
  return result.isValid;
33971
34918
  }
33972
34919
 
33973
- // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
34920
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
33974
34921
  class ExperimentalMcpServerTasks {
33975
34922
  constructor(_mcpServer) {
33976
34923
  this._mcpServer = _mcpServer;
@@ -33985,7 +34932,7 @@ class ExperimentalMcpServerTasks {
33985
34932
  }
33986
34933
  }
33987
34934
 
33988
- // node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
34935
+ // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
33989
34936
  init_zod();
33990
34937
 
33991
34938
  class McpServer {
@@ -36037,7 +36984,7 @@ function logActivity(action, connector, detail) {
36037
36984
  function resolveDashboardDir() {
36038
36985
  const candidates = [];
36039
36986
  try {
36040
- const scriptDir = dirname7(fileURLToPath6(import.meta.url));
36987
+ const scriptDir = dirname7(fileURLToPath7(import.meta.url));
36041
36988
  candidates.push(join14(scriptDir, "..", "dashboard", "dist"));
36042
36989
  candidates.push(join14(scriptDir, "..", "..", "dashboard", "dist"));
36043
36990
  } catch {}
@@ -36153,9 +37100,9 @@ function serveStaticFile(filePath) {
36153
37100
  if (!existsSync15(filePath))
36154
37101
  return null;
36155
37102
  const ext = extname(filePath);
36156
- const contentType = MIME_TYPES[ext] || "application/octet-stream";
37103
+ const contentType2 = MIME_TYPES[ext] || "application/octet-stream";
36157
37104
  return new Response(Bun.file(filePath), {
36158
- headers: { "Content-Type": contentType }
37105
+ headers: { "Content-Type": contentType2 }
36159
37106
  });
36160
37107
  }
36161
37108
  async function findAvailablePort(preferred, strict = false) {
@@ -36208,12 +37155,12 @@ Dashboard not found at: ${dashboardDir}`);
36208
37155
  port,
36209
37156
  async fetch(req) {
36210
37157
  const url2 = new URL(req.url);
36211
- const path = url2.pathname;
37158
+ const path2 = url2.pathname;
36212
37159
  const method = req.method;
36213
37160
  const mcpResponse = await handleMcpHttpRequest(req);
36214
37161
  if (mcpResponse)
36215
37162
  return mcpResponse;
36216
- if (path === "/api/connectors" && method === "GET") {
37163
+ if (path2 === "/api/connectors" && method === "GET") {
36217
37164
  const compact = url2.searchParams.get("compact") === "true";
36218
37165
  const fieldsParam = url2.searchParams.get("fields");
36219
37166
  const fields = fieldsParam ? new Set(fieldsParam.split(",").map((f) => f.trim())) : null;
@@ -36233,7 +37180,7 @@ Dashboard not found at: ${dashboardDir}`);
36233
37180
  }
36234
37181
  return jsonStripped(data, 200, port);
36235
37182
  }
36236
- if (path === "/api/connectors/manifest" && method === "GET") {
37183
+ if (path2 === "/api/connectors/manifest" && method === "GET") {
36237
37184
  const connectorNames = url2.searchParams.get("connectors")?.split(",").map((name) => name.trim()).filter(Boolean);
36238
37185
  const includeOperations = url2.searchParams.get("includeOperations") === "true";
36239
37186
  const manifest = await getConnectorCapabilityManifest({
@@ -36242,7 +37189,7 @@ Dashboard not found at: ${dashboardDir}`);
36242
37189
  });
36243
37190
  return json(manifest, 200, port);
36244
37191
  }
36245
- const singleMatch = path.match(/^\/api\/connectors\/([^/]+)$/);
37192
+ const singleMatch = path2.match(/^\/api\/connectors\/([^/]+)$/);
36246
37193
  if (singleMatch && method === "GET") {
36247
37194
  const name = singleMatch[1];
36248
37195
  if (!isValidConnectorName(name))
@@ -36262,7 +37209,7 @@ Dashboard not found at: ${dashboardDir}`);
36262
37209
  overview: docs?.overview || null
36263
37210
  }, 200, port);
36264
37211
  }
36265
- const operationsMatch = path.match(/^\/api\/connectors\/([^/]+)\/operations$/);
37212
+ const operationsMatch = path2.match(/^\/api\/connectors\/([^/]+)\/operations$/);
36266
37213
  if (operationsMatch && method === "GET") {
36267
37214
  const name = operationsMatch[1];
36268
37215
  if (!isValidConnectorName(name))
@@ -36283,7 +37230,7 @@ Dashboard not found at: ${dashboardDir}`);
36283
37230
  helpText: ops.helpText
36284
37231
  }, 200, port);
36285
37232
  }
36286
- const operationHelpMatch = path.match(/^\/api\/connectors\/([^/]+)\/operations\/([^/]+)$/);
37233
+ const operationHelpMatch = path2.match(/^\/api\/connectors\/([^/]+)\/operations\/([^/]+)$/);
36287
37234
  if (operationHelpMatch && method === "GET") {
36288
37235
  const name = operationHelpMatch[1];
36289
37236
  const command = decodeURIComponent(operationHelpMatch[2]);
@@ -36298,7 +37245,7 @@ Dashboard not found at: ${dashboardDir}`);
36298
37245
  const help = await getConnectorCommandHelp(name, command);
36299
37246
  return json({ connector: name, displayName: meta.displayName, command, help }, 200, port);
36300
37247
  }
36301
- const operationRunMatch = path.match(/^\/api\/connectors\/([^/]+)\/operations\/run$/);
37248
+ const operationRunMatch = path2.match(/^\/api\/connectors\/([^/]+)\/operations\/run$/);
36302
37249
  if (operationRunMatch && method === "POST") {
36303
37250
  const name = operationRunMatch[1];
36304
37251
  if (!isValidConnectorName(name))
@@ -36362,7 +37309,7 @@ ${result.stderr}`;
36362
37309
  }, 500, port);
36363
37310
  }
36364
37311
  }
36365
- const keyMatch = path.match(/^\/api\/connectors\/([^/]+)\/key$/);
37312
+ const keyMatch = path2.match(/^\/api\/connectors\/([^/]+)\/key$/);
36366
37313
  if (keyMatch && method === "POST") {
36367
37314
  const name = keyMatch[1];
36368
37315
  if (!isValidConnectorName(name))
@@ -36381,7 +37328,7 @@ ${result.stderr}`;
36381
37328
  return json({ error: e instanceof Error ? e.message : "Failed to save key" }, 500, port);
36382
37329
  }
36383
37330
  }
36384
- const refreshMatch = path.match(/^\/api\/connectors\/([^/]+)\/refresh$/);
37331
+ const refreshMatch = path2.match(/^\/api\/connectors\/([^/]+)\/refresh$/);
36385
37332
  if (refreshMatch && method === "POST") {
36386
37333
  const name = refreshMatch[1];
36387
37334
  if (!isValidConnectorName(name))
@@ -36394,7 +37341,7 @@ ${result.stderr}`;
36394
37341
  return json({ success: false, error: e instanceof Error ? e.message : "Failed to refresh" }, 500, port);
36395
37342
  }
36396
37343
  }
36397
- const installMatch = path.match(/^\/api\/connectors\/([^/]+)\/install$/);
37344
+ const installMatch = path2.match(/^\/api\/connectors\/([^/]+)\/install$/);
36398
37345
  if (installMatch && method === "POST") {
36399
37346
  const name = installMatch[1];
36400
37347
  if (!isValidConnectorName(name))
@@ -36413,7 +37360,7 @@ ${result.stderr}`;
36413
37360
  return json({ error: e instanceof Error ? e.message : "Failed to install connector" }, 500, port);
36414
37361
  }
36415
37362
  }
36416
- const uninstallMatch = path.match(/^\/api\/connectors\/([^/]+)\/uninstall$/);
37363
+ const uninstallMatch = path2.match(/^\/api\/connectors\/([^/]+)\/uninstall$/);
36417
37364
  if (uninstallMatch && method === "POST") {
36418
37365
  const name = uninstallMatch[1];
36419
37366
  if (!isValidConnectorName(name))
@@ -36429,7 +37376,7 @@ ${result.stderr}`;
36429
37376
  return json({ error: e instanceof Error ? e.message : "Failed to uninstall connector" }, 500, port);
36430
37377
  }
36431
37378
  }
36432
- if (path === "/api/update" && method === "POST") {
37379
+ if (path2 === "/api/update" && method === "POST") {
36433
37380
  try {
36434
37381
  const installed = getInstalledConnectors();
36435
37382
  if (installed.length === 0) {
@@ -36445,10 +37392,10 @@ ${result.stderr}`;
36445
37392
  return json({ error: e instanceof Error ? e.message : "Failed to update" }, 500, port);
36446
37393
  }
36447
37394
  }
36448
- if (path === "/api/activity" && method === "GET") {
37395
+ if (path2 === "/api/activity" && method === "GET") {
36449
37396
  return json(activityLog, 200, port);
36450
37397
  }
36451
- if (path === "/api/hot" && method === "GET") {
37398
+ if (path2 === "/api/hot" && method === "GET") {
36452
37399
  const { getTopConnectors: getTopConnectors2 } = await Promise.resolve().then(() => (init_usage(), exports_usage));
36453
37400
  const { getPromotedConnectors: getPromotedConnectors2 } = await Promise.resolve().then(() => (init_promotions(), exports_promotions));
36454
37401
  const limit = parseInt(url2.searchParams.get("limit") || "10", 10);
@@ -36458,7 +37405,7 @@ ${result.stderr}`;
36458
37405
  const promoted = new Set(getPromotedConnectors2(db));
36459
37406
  return json(top.map((t) => ({ ...t, promoted: promoted.has(t.connector) })), 200, port);
36460
37407
  }
36461
- const promoteMatch = path.match(/^\/api\/connectors\/([^/]+)\/promote$/);
37408
+ const promoteMatch = path2.match(/^\/api\/connectors\/([^/]+)\/promote$/);
36462
37409
  if (promoteMatch && method === "POST") {
36463
37410
  const name = promoteMatch[1];
36464
37411
  if (!getConnector(name))
@@ -36472,13 +37419,13 @@ ${result.stderr}`;
36472
37419
  const removed = demoteConnector2(promoteMatch[1], getDatabase3());
36473
37420
  return json({ success: removed, connector: promoteMatch[1] }, 200, port);
36474
37421
  }
36475
- if (path === "/api/llm" && method === "GET") {
37422
+ if (path2 === "/api/llm" && method === "GET") {
36476
37423
  const config2 = getLlmConfig();
36477
37424
  if (!config2)
36478
37425
  return json({ configured: false }, 200, port);
36479
37426
  return json({ configured: true, provider: config2.provider, model: config2.model, key: maskKey(config2.api_key), strip: config2.strip }, 200, port);
36480
37427
  }
36481
- if (path === "/api/llm" && method === "POST") {
37428
+ if (path2 === "/api/llm" && method === "POST") {
36482
37429
  const body = await req.json().catch(() => ({}));
36483
37430
  const validProviders = ["cerebras", "groq", "openai", "anthropic"];
36484
37431
  const provider = body.provider;
@@ -36492,7 +37439,7 @@ ${result.stderr}`;
36492
37439
  saveLlmConfig({ provider, model, api_key, strip });
36493
37440
  return json({ success: true, provider, model, strip }, 200, port);
36494
37441
  }
36495
- if (path === "/api/llm/test" && method === "POST") {
37442
+ if (path2 === "/api/llm/test" && method === "POST") {
36496
37443
  const config2 = getLlmConfig();
36497
37444
  if (!config2)
36498
37445
  return json({ error: "No LLM configured" }, 400, port);
@@ -36504,17 +37451,17 @@ ${result.stderr}`;
36504
37451
  return json({ success: false, error: e instanceof Error ? e.message : String(e) }, 500, port);
36505
37452
  }
36506
37453
  }
36507
- if (path === "/api/jobs" && method === "GET") {
37454
+ if (path2 === "/api/jobs" && method === "GET") {
36508
37455
  return json(listJobs(getDatabase3()), 200, port);
36509
37456
  }
36510
- if (path === "/api/jobs" && method === "POST") {
37457
+ if (path2 === "/api/jobs" && method === "POST") {
36511
37458
  const body = await req.json().catch(() => ({}));
36512
37459
  if (!body.name || !body.connector || !body.command || !body.cron)
36513
37460
  return json({ error: "name, connector, command, cron required" }, 400, port);
36514
37461
  const job = createJob({ name: body.name, connector: body.connector, command: body.command, args: body.args ?? [], cron: body.cron, strip: !!body.strip }, getDatabase3());
36515
37462
  return json(job, 201, port);
36516
37463
  }
36517
- const jobMatch = path.match(/^\/api\/jobs\/([^/]+)$/);
37464
+ const jobMatch = path2.match(/^\/api\/jobs\/([^/]+)$/);
36518
37465
  if (jobMatch) {
36519
37466
  const db = getDatabase3();
36520
37467
  const job = getJobByName(jobMatch[1]) ?? getDatabase3().query("SELECT * FROM connector_jobs WHERE id = ?").get(jobMatch[1]);
@@ -36536,7 +37483,7 @@ ${result.stderr}`;
36536
37483
  return json(updated, 200, port);
36537
37484
  }
36538
37485
  }
36539
- const jobRunMatch = path.match(/^\/api\/jobs\/([^/]+)\/run$/);
37486
+ const jobRunMatch = path2.match(/^\/api\/jobs\/([^/]+)\/run$/);
36540
37487
  if (jobRunMatch && method === "POST") {
36541
37488
  const db = getDatabase3();
36542
37489
  const job = getJobByName(jobRunMatch[1], db);
@@ -36545,17 +37492,17 @@ ${result.stderr}`;
36545
37492
  const result = await triggerJob(job, db);
36546
37493
  return json(result, 200, port);
36547
37494
  }
36548
- if (path === "/api/workflows" && method === "GET") {
37495
+ if (path2 === "/api/workflows" && method === "GET") {
36549
37496
  return json(listWorkflows(getDatabase3()), 200, port);
36550
37497
  }
36551
- if (path === "/api/workflows" && method === "POST") {
37498
+ if (path2 === "/api/workflows" && method === "POST") {
36552
37499
  const body = await req.json().catch(() => ({}));
36553
37500
  if (!body.name || !body.steps)
36554
37501
  return json({ error: "name and steps required" }, 400, port);
36555
37502
  const wf = createWorkflow({ name: body.name, steps: body.steps }, getDatabase3());
36556
37503
  return json(wf, 201, port);
36557
37504
  }
36558
- const wfMatch = path.match(/^\/api\/workflows\/([^/]+)$/);
37505
+ const wfMatch = path2.match(/^\/api\/workflows\/([^/]+)$/);
36559
37506
  if (wfMatch) {
36560
37507
  const db = getDatabase3();
36561
37508
  const wf = getWorkflowByName(wfMatch[1], db);
@@ -36568,7 +37515,7 @@ ${result.stderr}`;
36568
37515
  return json({ success: true }, 200, port);
36569
37516
  }
36570
37517
  }
36571
- const wfRunMatch = path.match(/^\/api\/workflows\/([^/]+)\/run$/);
37518
+ const wfRunMatch = path2.match(/^\/api\/workflows\/([^/]+)\/run$/);
36572
37519
  if (wfRunMatch && method === "POST") {
36573
37520
  const wf = getWorkflowByName(wfRunMatch[1], getDatabase3());
36574
37521
  if (!wf)
@@ -36576,10 +37523,10 @@ ${result.stderr}`;
36576
37523
  const result = await runWorkflow(wf);
36577
37524
  return json(result, 200, port);
36578
37525
  }
36579
- if (path === "/api/agents" && method === "GET") {
37526
+ if (path2 === "/api/agents" && method === "GET") {
36580
37527
  return json(listAgents(), 200, port);
36581
37528
  }
36582
- if (path === "/api/agents/register" && method === "POST") {
37529
+ if (path2 === "/api/agents/register" && method === "POST") {
36583
37530
  const body = await req.json().catch(() => ({}));
36584
37531
  const name = typeof body.name === "string" ? body.name : null;
36585
37532
  if (!name)
@@ -36593,15 +37540,15 @@ ${result.stderr}`;
36593
37540
  return json(result, 409, port);
36594
37541
  return json(result, 200, port);
36595
37542
  }
36596
- if (path.startsWith("/api/agents/") && method === "DELETE") {
36597
- const agentName = path.slice("/api/agents/".length);
37543
+ if (path2.startsWith("/api/agents/") && method === "DELETE") {
37544
+ const agentName = path2.slice("/api/agents/".length);
36598
37545
  const agent = getAgentByName(agentName);
36599
37546
  if (!agent)
36600
37547
  return json({ error: "Agent not found" }, 404, port);
36601
37548
  deleteAgent(agent.id);
36602
37549
  return json({ success: true }, 200, port);
36603
37550
  }
36604
- const rateMatch = path.match(/^\/api\/rate\/([^/]+)\/([^/]+)$/);
37551
+ const rateMatch = path2.match(/^\/api\/rate\/([^/]+)\/([^/]+)$/);
36605
37552
  if (rateMatch && method === "GET") {
36606
37553
  const [, agentId, connector] = rateMatch;
36607
37554
  const limit = parseInt(url2.searchParams.get("limit") || "60", 10);
@@ -36609,7 +37556,7 @@ ${result.stderr}`;
36609
37556
  const result = consume ? checkRateBudget(agentId, connector, limit) : getRateBudget(agentId, connector, limit);
36610
37557
  return json(result, 200, port);
36611
37558
  }
36612
- const profilesMatch = path.match(/^\/api\/connectors\/([^/]+)\/profiles$/);
37559
+ const profilesMatch = path2.match(/^\/api\/connectors\/([^/]+)\/profiles$/);
36613
37560
  if (profilesMatch && method === "GET") {
36614
37561
  const name = profilesMatch[1];
36615
37562
  if (!isValidConnectorName(name))
@@ -36631,7 +37578,7 @@ ${result.stderr}`;
36631
37578
  return json({ error: e instanceof Error ? e.message : "Failed to list profiles" }, 500, port);
36632
37579
  }
36633
37580
  }
36634
- const profileSwitchMatch = path.match(/^\/api\/connectors\/([^/]+)\/profiles\/switch$/);
37581
+ const profileSwitchMatch = path2.match(/^\/api\/connectors\/([^/]+)\/profiles\/switch$/);
36635
37582
  if (profileSwitchMatch && method === "POST") {
36636
37583
  const name = profileSwitchMatch[1];
36637
37584
  if (!isValidConnectorName(name))
@@ -36650,7 +37597,7 @@ ${result.stderr}`;
36650
37597
  return json({ error: e instanceof Error ? e.message : "Failed to switch profile" }, 500, port);
36651
37598
  }
36652
37599
  }
36653
- const profileDeleteMatch = path.match(/^\/api\/connectors\/([^/]+)\/profiles\/([^/]+)$/);
37600
+ const profileDeleteMatch = path2.match(/^\/api\/connectors\/([^/]+)\/profiles\/([^/]+)$/);
36654
37601
  if (profileDeleteMatch && method === "DELETE") {
36655
37602
  const name = profileDeleteMatch[1];
36656
37603
  const profile = profileDeleteMatch[2];
@@ -36668,7 +37615,7 @@ ${result.stderr}`;
36668
37615
  return json({ error: e instanceof Error ? e.message : "Failed to delete profile" }, 500, port);
36669
37616
  }
36670
37617
  }
36671
- if (path === "/api/export" && method === "GET") {
37618
+ if (path2 === "/api/export" && method === "GET") {
36672
37619
  try {
36673
37620
  const connectDir = getConnectorsHome();
36674
37621
  const result = {};
@@ -36718,7 +37665,7 @@ ${result.stderr}`;
36718
37665
  return json({ error: e instanceof Error ? e.message : "Failed to export credentials" }, 500, port);
36719
37666
  }
36720
37667
  }
36721
- if (path === "/api/import" && method === "POST") {
37668
+ if (path2 === "/api/import" && method === "POST") {
36722
37669
  try {
36723
37670
  const contentLength = parseInt(req.headers.get("content-length") || "0", 10);
36724
37671
  if (contentLength > MAX_BODY_SIZE)
@@ -36751,7 +37698,7 @@ ${result.stderr}`;
36751
37698
  return json({ error: e instanceof Error ? e.message : "Failed to import credentials" }, 500, port);
36752
37699
  }
36753
37700
  }
36754
- const oauthStartMatch = path.match(/^\/oauth\/([^/]+)\/start$/);
37701
+ const oauthStartMatch = path2.match(/^\/oauth\/([^/]+)\/start$/);
36755
37702
  if (oauthStartMatch && method === "GET") {
36756
37703
  const name = oauthStartMatch[1];
36757
37704
  const redirectUri = `http://localhost:${port}/oauth/${name}/callback`;
@@ -36761,7 +37708,7 @@ ${result.stderr}`;
36761
37708
  }
36762
37709
  return Response.redirect(authUrl, 302);
36763
37710
  }
36764
- const oauthCallbackMatch = path.match(/^\/oauth\/([^/]+)\/callback$/);
37711
+ const oauthCallbackMatch = path2.match(/^\/oauth\/([^/]+)\/callback$/);
36765
37712
  if (oauthCallbackMatch && method === "GET") {
36766
37713
  const name = oauthCallbackMatch[1];
36767
37714
  const code = url2.searchParams.get("code");
@@ -36795,11 +37742,14 @@ ${result.stderr}`;
36795
37742
  });
36796
37743
  }
36797
37744
  if (dashboardExists && (method === "GET" || method === "HEAD")) {
36798
- if (path !== "/") {
36799
- const filePath = join14(dashboardDir, path);
36800
- const res2 = serveStaticFile(filePath);
36801
- if (res2)
36802
- return res2;
37745
+ if (path2 !== "/") {
37746
+ const filePath = join14(dashboardDir, path2);
37747
+ const rel = relative(dashboardDir, resolve(filePath));
37748
+ if (!rel.startsWith("..") && !rel.includes(`..${sep}`) && rel !== "") {
37749
+ const res2 = serveStaticFile(filePath);
37750
+ if (res2)
37751
+ return res2;
37752
+ }
36803
37753
  }
36804
37754
  const indexPath = join14(dashboardDir, "index.html");
36805
37755
  const res = serveStaticFile(indexPath);
@@ -36822,9 +37772,11 @@ ${result.stderr}`;
36822
37772
  console.log(`Connectors Dashboard running at ${url}`);
36823
37773
  if (shouldOpen) {
36824
37774
  try {
36825
- const { exec } = await import("child_process");
36826
- const openCmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
36827
- exec(`${openCmd} ${url}`);
37775
+ const { openBrowser: openBrowser2 } = await Promise.resolve().then(() => (init_open_browser(), exports_open_browser));
37776
+ const opened = await openBrowser2(url);
37777
+ if (!opened.ok) {
37778
+ console.log(`If the browser did not open, visit ${url} manually.`);
37779
+ }
36828
37780
  } catch {}
36829
37781
  }
36830
37782
  return port;